mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Fixed Chandra, Pyromaster only casting cards, not playing. Add Oracle's Vault to MLP
This commit is contained in:
parent
ff382cf0a6
commit
adc3b2ccac
2 changed files with 113 additions and 106 deletions
|
@ -32,6 +32,7 @@ import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||||
|
@ -211,11 +212,7 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
||||||
Card card = library.removeFromTop(game);
|
Card card = library.removeFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName() + " <this card may be played the turn it was exiled>", source.getSourceId(), game, Zone.LIBRARY, true);
|
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName() + " <this card may be played the turn it was exiled>", source.getSourceId(), game, Zone.LIBRARY, true);
|
||||||
if (!card.getManaCost().isEmpty()) {
|
game.addEffect(new ChandraPyromasterPlayEffect(new MageObjectReference(card, game)), source);
|
||||||
ContinuousEffect effect = new ChandraPyromasterCastFromExileEffect();
|
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
|
||||||
game.addEffect(effect, source);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -223,15 +220,19 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChandraPyromasterCastFromExileEffect extends AsThoughEffectImpl {
|
class ChandraPyromasterPlayEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
public ChandraPyromasterCastFromExileEffect() {
|
private final MageObjectReference objectReference;
|
||||||
|
|
||||||
|
public ChandraPyromasterPlayEffect(MageObjectReference objectReference) {
|
||||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||||
staticText = "You may play the card from exile this turn";
|
this.objectReference = objectReference;
|
||||||
|
staticText = "you may play that card until end of turn";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChandraPyromasterCastFromExileEffect(final ChandraPyromasterCastFromExileEffect effect) {
|
public ChandraPyromasterPlayEffect(final ChandraPyromasterPlayEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
this.objectReference = effect.objectReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -240,14 +241,19 @@ class ChandraPyromasterCastFromExileEffect extends AsThoughEffectImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChandraPyromasterCastFromExileEffect copy() {
|
public ChandraPyromasterPlayEffect copy() {
|
||||||
return new ChandraPyromasterCastFromExileEffect(this);
|
return new ChandraPyromasterPlayEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
if (targetPointer.getTargets(game, source).contains(sourceId)) {
|
if (objectReference.refersTo(objectId, game) && affectedControllerId.equals(source.getControllerId())) {
|
||||||
return game.getState().getZone(sourceId) == Zone.EXILED;
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller != null) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
discard();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class LaunchParty extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Mizzium Meddler", 31, Rarity.RARE, mage.cards.m.MizziumMeddler.class));
|
cards.add(new SetCardInfo("Mizzium Meddler", 31, Rarity.RARE, mage.cards.m.MizziumMeddler.class));
|
||||||
cards.add(new SetCardInfo("Mondronen Shaman", 17, Rarity.RARE, mage.cards.m.MondronenShaman.class));
|
cards.add(new SetCardInfo("Mondronen Shaman", 17, Rarity.RARE, mage.cards.m.MondronenShaman.class));
|
||||||
cards.add(new SetCardInfo("Obelisk of Alara", 5, Rarity.RARE, mage.cards.o.ObeliskOfAlara.class));
|
cards.add(new SetCardInfo("Obelisk of Alara", 5, Rarity.RARE, mage.cards.o.ObeliskOfAlara.class));
|
||||||
|
cards.add(new SetCardInfo("Oracle's Vault", 39, Rarity.RARE, mage.cards.o.OraclesVault.class));
|
||||||
cards.add(new SetCardInfo("Phyrexian Metamorph", 14, Rarity.RARE, mage.cards.p.PhyrexianMetamorph.class));
|
cards.add(new SetCardInfo("Phyrexian Metamorph", 14, Rarity.RARE, mage.cards.p.PhyrexianMetamorph.class));
|
||||||
cards.add(new SetCardInfo("Quicksmith Rebel", 38, Rarity.RARE, mage.cards.q.QuicksmithRebel.class));
|
cards.add(new SetCardInfo("Quicksmith Rebel", 38, Rarity.RARE, mage.cards.q.QuicksmithRebel.class));
|
||||||
cards.add(new SetCardInfo("Restoration Angel", 18, Rarity.RARE, mage.cards.r.RestorationAngel.class));
|
cards.add(new SetCardInfo("Restoration Angel", 18, Rarity.RARE, mage.cards.r.RestorationAngel.class));
|
||||||
|
|
Loading…
Reference in a new issue