mirror of
https://github.com/correl/mage.git
synced 2024-11-24 19:19:56 +00:00
refactored flashback to remove unnecessary timing rule argument
This commit is contained in:
parent
05e80e3a02
commit
d93475a5bb
145 changed files with 192 additions and 234 deletions
|
@ -25,7 +25,7 @@ public final class AbandonThePost extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{R}")));
|
||||
}
|
||||
|
||||
private AbandonThePost(final AbandonThePost card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class AcornHarvest extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SquirrelToken(), 2));
|
||||
|
||||
// Flashback-{1}{G} - Pay 3 life.
|
||||
FlashbackAbility ability = new FlashbackAbility(new ManaCostsImpl("{1}{G}"), TimingRule.SORCERY);
|
||||
FlashbackAbility ability = new FlashbackAbility(this, new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new PayLifeCost(3));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class AncestralTribute extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new GainLifeEffect((new CardsInControllerGraveyardCount(new FilterCard(), 2))));
|
||||
|
||||
// Flashback {9}{W}{W}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{9}{W}{W}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{9}{W}{W}{W}")));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class AncientGrudge extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{G}")));
|
||||
}
|
||||
|
||||
private AncientGrudge(final AncientGrudge card) {
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class AngelfireIgnition extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Flashback {2}{R}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{2}{R}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{2}{R}{W}")));
|
||||
}
|
||||
|
||||
private AngelfireIgnition(final AngelfireIgnition card) {
|
||||
|
|
|
@ -32,7 +32,7 @@ public final class ArcaneInfusion extends CardImpl {
|
|||
"Put the rest on the bottom of your library in a random order."));
|
||||
|
||||
// Flashback {3}{U}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{U}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{U}{R}")));
|
||||
}
|
||||
|
||||
private ArcaneInfusion(final ArcaneInfusion card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class ArmyOfTheDamned extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 13, true, false));
|
||||
|
||||
// Flashback {7}{B}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{B}{B}{B}")));
|
||||
}
|
||||
|
||||
private ArmyOfTheDamned(final ArmyOfTheDamned card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class ArtfulDodge extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// Flashback {U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{U}")));
|
||||
}
|
||||
|
||||
private ArtfulDodge(final ArtfulDodge card) {
|
||||
|
|
|
@ -93,15 +93,7 @@ class BackdraftHellkiteEffect extends ContinuousEffectImpl {
|
|||
if (card == null) {
|
||||
return;
|
||||
}
|
||||
FlashbackAbility ability = null;
|
||||
if (card.isInstant(game)) {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
|
||||
} else if (card.isSorcery(game)) {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
|
||||
}
|
||||
if (ability == null) {
|
||||
return;
|
||||
}
|
||||
FlashbackAbility ability = new FlashbackAbility(card, card.getManaCost());
|
||||
ability.setSourceId(cardId);
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class BashToBits extends CardImpl {
|
|||
Target target = new TargetArtifactPermanent();
|
||||
this.getSpellAbility().addTarget(target);
|
||||
// Flashback {4}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{R}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{4}{R}{R}")));
|
||||
}
|
||||
|
||||
private BashToBits(final BashToBits card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class BattleScreech extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BirdToken(), 2));
|
||||
|
||||
// Flashback-Tap three untapped white creatures you control.
|
||||
this.addAbility(new FlashbackAbility(new TapTargetCost(new TargetControlledCreaturePermanent(3,3, filter, true)), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new TapTargetCost(new TargetControlledCreaturePermanent(3,3, filter, true))));
|
||||
}
|
||||
|
||||
private BattleScreech(final BattleScreech card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class BeastAttack extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2()));
|
||||
|
||||
// Flashback {2}{G}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{G}{G}{G}")));
|
||||
}
|
||||
|
||||
private BeastAttack(final BeastAttack card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ public final class BlastFromThePast extends CardImpl {
|
|||
// Kicker {2}{R}
|
||||
this.addAbility(new KickerAbility("{2}{R}"));
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}")));
|
||||
// Buyback {4}{R}
|
||||
this.addAbility(new BuybackAbility("{4}{R}"));
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class BumpInTheNight extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
|
||||
// Flashback {5}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{R}")));
|
||||
}
|
||||
|
||||
private BumpInTheNight(final BumpInTheNight card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class BurningOil extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAttackingOrBlockingCreature());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
// Flashback {3}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{W}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{W}")));
|
||||
}
|
||||
|
||||
private BurningOil(final BurningOil card) {
|
||||
|
|
|
@ -12,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -36,9 +35,9 @@ public final class CabalTherapy extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CabalTherapyEffect());
|
||||
|
||||
// Flashback-Sacrifice a creature.
|
||||
this.addAbility(new FlashbackAbility(
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT, true)),
|
||||
TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new SacrificeTargetCost(
|
||||
new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
)));
|
||||
}
|
||||
|
||||
private CabalTherapy(final CabalTherapy card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class CacklingCounterpart extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
// Flashback {5}{U}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{U}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{U}{U}")));
|
||||
}
|
||||
|
||||
private CacklingCounterpart(final CacklingCounterpart card) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class CalibratedBlast extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CalibratedBlastEffect());
|
||||
|
||||
// Flashback {3}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{R}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{R}{R}")));
|
||||
}
|
||||
|
||||
private CalibratedBlast(final CalibratedBlast card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class CallOfTheHerd extends CardImpl {
|
|||
// Create a 3/3 green Elephant creature token.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken()));
|
||||
// Flashback {3}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{G}")));
|
||||
}
|
||||
|
||||
private CallOfTheHerd(final CallOfTheHerd card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class CanopyClaws extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{G}")));
|
||||
}
|
||||
|
||||
private CanopyClaws(final CanopyClaws card) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public final class CantStayAway extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
|
||||
|
||||
// Flashback {3}{W}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{W}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{W}{B}")));
|
||||
}
|
||||
|
||||
private CantStayAway(final CantStayAway card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class ChainersEdict extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// Flashback {5}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{B}{B}")));
|
||||
}
|
||||
|
||||
private ChainersEdict(final ChainersEdict card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class ChatterOfTheSquirrel extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SquirrelToken()));
|
||||
|
||||
// Flashback {1}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{G}")));
|
||||
}
|
||||
|
||||
private ChatterOfTheSquirrel(final ChatterOfTheSquirrel card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class ChillOfForeboding extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new MillCardsEachPlayerEffect(5, TargetController.ANY));
|
||||
|
||||
// Flashback {7}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{U}")));
|
||||
}
|
||||
|
||||
private ChillOfForeboding(final ChillOfForeboding card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class CoffinPurge extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInGraveyard());
|
||||
|
||||
// Flashback {B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{B}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{B}")));
|
||||
}
|
||||
|
||||
private CoffinPurge(final CoffinPurge card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class Conflagrate extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
|
||||
|
||||
// Flashback-{R}{R}, Discard X cards.
|
||||
Ability ability = new FlashbackAbility(new ManaCostsImpl("{R}{R}"), TimingRule.SORCERY);
|
||||
Ability ability = new FlashbackAbility(this, new ManaCostsImpl("{R}{R}"));
|
||||
ability.addCost(new DiscardXTargetCost(new FilterCard("cards")));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class CorpseCobble extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CorpseCobbleEffect());
|
||||
|
||||
// Flashback {3}{U}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{U}{B}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{U}{B}")));
|
||||
}
|
||||
|
||||
private CorpseCobble(final CorpseCobble card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class CrawlFromTheCellar extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 1, filter, false));
|
||||
|
||||
// Flashback {3}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{B}")));
|
||||
}
|
||||
|
||||
private CrawlFromTheCellar(final CrawlFromTheCellar card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class CreepingRenaissance extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreepingRenaissanceEffect());
|
||||
|
||||
// Flashback {5}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{G}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{G}{G}")));
|
||||
}
|
||||
|
||||
private CreepingRenaissance(final CreepingRenaissance card) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class CripplingFatigue extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn));
|
||||
|
||||
// Flashback-{1}{B}, Pay 3 life
|
||||
Ability ability = new FlashbackAbility(new ManaCostsImpl("{1}{B}"), TimingRule.SORCERY);
|
||||
Ability ability = new FlashbackAbility(this, new ManaCostsImpl("{1}{B}"));
|
||||
ability.addCost(new PayLifeCost(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class CroakingCounterpart extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
|
||||
// Flashback {3}{G}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{G}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{G}{U}")));
|
||||
}
|
||||
|
||||
private CroakingCounterpart(final CroakingCounterpart card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class CrushOfWurms extends CardImpl {
|
|||
// Put three 6/6 green Wurm creature tokens onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new WurmToken(), 3));
|
||||
// Flashback {9}{G}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{9}{G}{G}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{9}{G}{G}{G}")));
|
||||
}
|
||||
|
||||
private CrushOfWurms(final CrushOfWurms card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class DeadlyAllure extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{G}")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DeepAnalysis extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// Flashback-{1}{U}, Pay 3 life.
|
||||
FlashbackAbility ability = new FlashbackAbility(new ManaCostsImpl("{1}{U}"), TimingRule.SORCERY);
|
||||
FlashbackAbility ability = new FlashbackAbility(this, new ManaCostsImpl("{1}{U}"));
|
||||
ability.addCost(new PayLifeCost(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DeepReconnaissance extends CardImpl {
|
|||
// Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true));
|
||||
// Flashback {4}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{4}{G}")));
|
||||
}
|
||||
|
||||
private DeepReconnaissance(final DeepReconnaissance card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DefyGravity extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
// Flashback {U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{U}")));
|
||||
}
|
||||
|
||||
private DefyGravity(final DefyGravity card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class Dematerialize extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent());
|
||||
// Flashback {5}{U}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{U}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{U}{U}")));
|
||||
}
|
||||
|
||||
private Dematerialize(final Dematerialize card) {
|
||||
|
|
|
@ -29,7 +29,7 @@ public final class DesperateRavings extends CardImpl {
|
|||
// Draw two cards, then discard a card at random.
|
||||
this.getSpellAbility().addEffect(new DesperateRavingsEffect());
|
||||
// Flashback {2}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{U}")));
|
||||
}
|
||||
|
||||
private DesperateRavings(final DesperateRavings card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DevilsPlay extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.REGULAR));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
// Flashback {X}{R}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{X}{R}{R}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{X}{R}{R}{R}")));
|
||||
}
|
||||
|
||||
private DevilsPlay(final DevilsPlay card) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public final class DireStrainRampage extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
|
||||
// Flashback {3}{R}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{R}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{R}{G}")));
|
||||
}
|
||||
|
||||
private DireStrainRampage(final DireStrainRampage card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class DiregrafRebirth extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
|
||||
// Flashback {5}{B}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{5}{B}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{5}{B}{G}")));
|
||||
}
|
||||
|
||||
private DiregrafRebirth(final DiregrafRebirth card) {
|
||||
|
|
|
@ -35,7 +35,7 @@ public final class DivineReckoning extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DivineReckoningEffect());
|
||||
|
||||
// Flashback {5}{W}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{W}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{W}{W}")));
|
||||
}
|
||||
|
||||
private DivineReckoning(final DivineReckoning card) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -23,21 +21,24 @@ import mage.game.events.DamageEvent;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class DralnuLichLord extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("instant or sorcery card in your graveyard");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.INSTANT.getPredicate(),
|
||||
CardType.SORCERY.getPredicate()));
|
||||
CardType.SORCERY.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public DralnuLichLord(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
@ -46,10 +47,10 @@ public final class DralnuLichLord extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// If damage would be dealt to Dralnu, Lich Lord, sacrifice that many permanents instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DralnuLichLordReplacementEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new DralnuLichLordReplacementEffect()));
|
||||
|
||||
// {tap}: Target instant or sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DralnuLichLordFlashbackEffect(), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(new DralnuLichLordFlashbackEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -117,13 +118,7 @@ class DralnuLichLordFlashbackEffect extends ContinuousEffectImpl {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null) {
|
||||
FlashbackAbility ability;
|
||||
if (card.isInstant(game)) {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
|
||||
}
|
||||
else {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
|
||||
}
|
||||
FlashbackAbility ability = new FlashbackAbility(card, card.getManaCost());
|
||||
ability.setSourceId(card.getId());
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
|
|
|
@ -30,7 +30,7 @@ public final class DreadReturn extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
|
||||
// Flashback-Sacrifice three creatures.
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, filter)), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new SacrificeTargetCost(new TargetControlledPermanent(3, filter))));
|
||||
}
|
||||
|
||||
private DreadReturn(final DreadReturn card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class DreamTwist extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(3));
|
||||
|
||||
// Flashback {1}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{U}")));
|
||||
}
|
||||
|
||||
private DreamTwist(final DreamTwist card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class DryadsRevival extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard());
|
||||
|
||||
// Flashback {4}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{4}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{G}")));
|
||||
}
|
||||
|
||||
private DryadsRevival(final DryadsRevival card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class EarthRift extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetLandPermanent());
|
||||
// Flashback {5}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{R}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{R}{R}")));
|
||||
}
|
||||
|
||||
private EarthRift(final EarthRift card) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class EchoOfEons extends CardImpl {
|
|||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
// Flashback {2}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{U}")));
|
||||
}
|
||||
|
||||
private EchoOfEons(final EchoOfEons card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class ElectricRevelation extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2));
|
||||
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{R}")));
|
||||
}
|
||||
|
||||
private ElectricRevelation(final ElectricRevelation card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class ElephantAmbush extends CardImpl {
|
|||
// Create a 3/3 green Elephant creature token.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken()));
|
||||
// Flashback {6}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{G}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{6}{G}{G}")));
|
||||
}
|
||||
|
||||
private ElephantAmbush(final ElephantAmbush card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class Embolden extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4));
|
||||
|
||||
// Flashback {1}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{W}")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class EngulfingFlames extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "It"));
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}")));
|
||||
}
|
||||
|
||||
private EngulfingFlames(final EngulfingFlames card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class FaithfulMending extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DiscardControllerEffect(2).concatBy(", then"));
|
||||
|
||||
// Flashback {1}{W}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{1}{W}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{1}{W}{U}")));
|
||||
}
|
||||
|
||||
private FaithfulMending(final FaithfulMending card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class FaithlessLooting extends CardImpl {
|
|||
// Draw two cards, then discard two cards.
|
||||
this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(2,2));
|
||||
// Flashback {2}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{R}")));
|
||||
}
|
||||
|
||||
private FaithlessLooting(final FaithlessLooting card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class FeelingOfDread extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
|
||||
// Flashback {1}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{U}")));
|
||||
}
|
||||
|
||||
private FeelingOfDread(final FeelingOfDread card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class FerventDenial extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
// Flashback {5}{U}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{U}{U}"),TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{U}{U}")));
|
||||
}
|
||||
|
||||
private FerventDenial(final FerventDenial card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class Firebolt extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DamageTargetEffect(2));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
// Flashback {4}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{4}{R}")));
|
||||
}
|
||||
|
||||
private Firebolt(final Firebolt card) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class FirecatBlitz extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new FirecatBlitzEffect());
|
||||
|
||||
// Flashback-{R}{R}, Sacrifice X Mountains.
|
||||
Ability ability = new FlashbackAbility(new SacrificeXTargetCost(filter), TimingRule.SORCERY);
|
||||
Ability ability = new FlashbackAbility(this, new SacrificeXTargetCost(filter));
|
||||
ability.addManaCost(new ManaCostsImpl("{R}{R}"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class FiresOfUndeath extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(2));
|
||||
// Flashback {5}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{B}")));
|
||||
}
|
||||
|
||||
private FiresOfUndeath(final FiresOfUndeath card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class FlaringPain extends CardImpl {
|
|||
// Damage can't be prevented this turn.
|
||||
this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn", false, false));
|
||||
// Flashback {R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{R}")));
|
||||
}
|
||||
|
||||
private FlaringPain(final FlaringPain card) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class FlashOfDefiance extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn));
|
||||
|
||||
// Flashback-{1}{R}, Pay 3 life.
|
||||
Ability ability = new FlashbackAbility(new ManaCostsImpl("{1}{R}"), TimingRule.SORCERY);
|
||||
Ability ability = new FlashbackAbility(this, new ManaCostsImpl("{1}{R}"));
|
||||
ability.addCost(new PayLifeCost(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class FlashOfInsight extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new FlashOfInsightEffect());
|
||||
|
||||
// Flashback-{1}{U}, Exile X blue cards from your graveyard.
|
||||
Ability ability = new FlashbackAbility(new ManaCostsImpl("{1}{U}"), TimingRule.INSTANT);
|
||||
Ability ability = new FlashbackAbility(this, new ManaCostsImpl("{1}{U}"));
|
||||
FilterCard filter = new FilterCard("blue cards from your graveyard");
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
filter.add(Predicates.not(new CardIdPredicate(getId())));
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class FolkMedicine extends CardImpl {
|
|||
DynamicValue amount = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(amount));
|
||||
// Flashback {1}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{W}")));
|
||||
}
|
||||
|
||||
private FolkMedicine(final FolkMedicine card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class ForbiddenAlchemy extends CardImpl {
|
|||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
|
||||
// Flashback {6}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{6}{B}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{6}{B}")));
|
||||
}
|
||||
|
||||
private ForbiddenAlchemy(final ForbiddenAlchemy card) {
|
||||
|
|
|
@ -29,7 +29,7 @@ public final class GalvanicIteration extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new GalvanicIterationAbility()));
|
||||
|
||||
// Flashback {1}{U}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{1}{U}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{1}{U}{R}")));
|
||||
}
|
||||
|
||||
private GalvanicIteration(final GalvanicIteration card) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class GazeOfJustice extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Flashback {5}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{W}")));
|
||||
}
|
||||
|
||||
private GazeOfJustice(final GazeOfJustice card) {
|
||||
|
|
|
@ -25,7 +25,7 @@ public final class Geistflame extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}")));
|
||||
}
|
||||
|
||||
private Geistflame(final Geistflame card) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public final class GhoulcallersHarvest extends CardImpl {
|
|||
this.getSpellAbility().addHint(hint);
|
||||
|
||||
// Flashback {3}{B}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{B}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{B}{G}")));
|
||||
}
|
||||
|
||||
private GhoulcallersHarvest(final GhoulcallersHarvest card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class GnawToTheBone extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new GainLifeEffect(value));
|
||||
|
||||
// Flashback {2}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{G}")));
|
||||
}
|
||||
|
||||
private GnawToTheBone(final GnawToTheBone card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class GraspOfPhantoms extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Flashback {7}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{U}")));
|
||||
}
|
||||
|
||||
private GraspOfPhantoms(final GraspOfPhantoms card) {
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class GrizzlyFate extends CardImpl {
|
|||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
// Flashback {5}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{G}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{G}{G}")));
|
||||
}
|
||||
|
||||
private GrizzlyFate(final GrizzlyFate card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class HomesteadCourage extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||
|
||||
// Flashback {W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{W}")));
|
||||
}
|
||||
|
||||
private HomesteadCourage(final HomesteadCourage card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class HowlingGale extends CardImpl {
|
|||
effect.setText("and each player");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
// Flashback {1}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{G}")));
|
||||
}
|
||||
|
||||
private HowlingGale(final HowlingGale card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class HungryForMore extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new HungryForMoreEffect());
|
||||
|
||||
// Flashback {1}{B}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{1}{B}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{1}{B}{R}")));
|
||||
}
|
||||
|
||||
private HungryForMore(final HungryForMore card) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class IgniteTheFuture extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new IgniteTheFutureEffect());
|
||||
|
||||
// Flashback {7}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{R}")));
|
||||
}
|
||||
|
||||
private IgniteTheFuture(final IgniteTheFuture card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class IncreasingAmbition extends CardImpl {
|
|||
));
|
||||
|
||||
// Flashback {7}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{B}")));
|
||||
}
|
||||
|
||||
private IncreasingAmbition(final IncreasingAmbition card) {
|
||||
|
|
|
@ -29,7 +29,7 @@ public final class IncreasingConfusion extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// Flashback {X}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{X}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{X}{U}")));
|
||||
}
|
||||
|
||||
private IncreasingConfusion(final IncreasingConfusion card) {
|
||||
|
|
|
@ -29,7 +29,7 @@ public final class IncreasingDevotion extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new IncreasingDevotionEffect());
|
||||
|
||||
// Flashback {7}{W}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{W}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{W}{W}")));
|
||||
}
|
||||
|
||||
private IncreasingDevotion(final IncreasingDevotion card) {
|
||||
|
|
|
@ -30,7 +30,7 @@ public final class IncreasingSavagery extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Flashback {5}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{G}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{G}{G}")));
|
||||
}
|
||||
|
||||
private IncreasingSavagery(final IncreasingSavagery card) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public final class IncreasingVengeance extends CardImpl {
|
|||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
// Flashback {3}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}{R}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}{R}")));
|
||||
}
|
||||
|
||||
private IncreasingVengeance(final IncreasingVengeance card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class JoinTheDance extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new HumanToken(), 2));
|
||||
|
||||
// Flashback {3}{G}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{G}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{3}{G}{W}")));
|
||||
}
|
||||
|
||||
private JoinTheDance(final JoinTheDance card) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class Kaleidoscorch extends CardImpl {
|
|||
this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE);
|
||||
|
||||
// Flashback {4}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{4}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{R}")));
|
||||
}
|
||||
|
||||
private Kaleidoscorch(final Kaleidoscorch card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class KrosanReclamation extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInTargetPlayersGraveyard(2));
|
||||
|
||||
// Flashback {1}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{G}")));
|
||||
}
|
||||
|
||||
private KrosanReclamation(final KrosanReclamation card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class LavaDart extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
|
||||
// Flashback-Sacrifice a Mountain.
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new SacrificeTargetCost(new TargetControlledPermanent(filter))));
|
||||
}
|
||||
|
||||
private LavaDart(final LavaDart card) {
|
||||
|
|
|
@ -104,9 +104,7 @@ class LierDiscipleOfTheDrownedFlashbackEffect extends ContinuousEffectImpl {
|
|||
return false;
|
||||
}
|
||||
for (Card card : player.getGraveyard().getCards(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game)) {
|
||||
Ability ability = new FlashbackAbility(
|
||||
card.getManaCost(), card.isInstant(game) ? TimingRule.INSTANT : TimingRule.SORCERY
|
||||
);
|
||||
Ability ability = new FlashbackAbility(card, card.getManaCost());
|
||||
ability.setSourceId(card.getId());
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class LightningSurge extends CardImpl {
|
|||
this.getSpellAbility().addEffect(effect);
|
||||
|
||||
// Flashback {5}{R}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{R}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{R}{R}")));
|
||||
}
|
||||
|
||||
private LightningSurge(final LightningSurge card) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class LingeringSouls extends CardImpl {
|
|||
// Create two 1/1 white Spirit creature tokens with flying.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritWhiteToken(), 2));
|
||||
// Flashback {1}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{1}{B}")));
|
||||
}
|
||||
|
||||
private LingeringSouls(final LingeringSouls card) {
|
||||
|
|
|
@ -36,7 +36,7 @@ public final class MarshalingCry extends CardImpl {
|
|||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
|
||||
|
||||
// Flashback {3}{W}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{W}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{W}")));
|
||||
}
|
||||
|
||||
private MarshalingCry(final MarshalingCry card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class MassDiminish extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
// Flashback {3}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{U}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{U}")));
|
||||
}
|
||||
|
||||
private MassDiminish(final MassDiminish card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class MemorysJourney extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInTargetPlayersGraveyard(3));
|
||||
|
||||
// Flashback {G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{G}")));
|
||||
}
|
||||
|
||||
private MemorysJourney(final MemorysJourney card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class MoanOfTheUnhallowed extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CreateTokenEffect(new ZombieToken(), 2));
|
||||
|
||||
// Flashback {5}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{B}{B}")));
|
||||
}
|
||||
|
||||
private MoanOfTheUnhallowed(final MoanOfTheUnhallowed card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class MomentaryBlink extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false));
|
||||
|
||||
// Flashback {3}{U}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{U}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{U}")));
|
||||
}
|
||||
|
||||
private MomentaryBlink(final MomentaryBlink card) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class MomentsPeace extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
|
||||
|
||||
// Flashback {2}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{G}")));
|
||||
}
|
||||
|
||||
private MomentsPeace(final MomentsPeace card) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class MorbidHunger extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(3));
|
||||
// Flashback {7}{B}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{7}{B}{B}")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class MorgueTheft extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE));
|
||||
// Flashback {4}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{B}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{4}{B}")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public final class MysticRetrieval extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
|
||||
// Flashback {2}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{2}{R}")));
|
||||
}
|
||||
|
||||
private MysticRetrieval(final MysticRetrieval card) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class MysticalTeachings extends CardImpl {
|
|||
// Search your library for an instant card or a card with flash, reveal it, and put it into your hand. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true));
|
||||
// Flashback {5}{B}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}"), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{5}{B}")));
|
||||
}
|
||||
|
||||
private MysticalTeachings(final MysticalTeachings card) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class NightbirdsClutches extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
// Flashback {3}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{3}{R}")));
|
||||
}
|
||||
|
||||
private NightbirdsClutches(final NightbirdsClutches card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class ParallelEvolution extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new ParallelEvolutionEffect());
|
||||
|
||||
// Flashback {4}{G}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{G}{G}{G}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl("{4}{G}{G}{G}")));
|
||||
}
|
||||
|
||||
private ParallelEvolution(final ParallelEvolution card) {
|
||||
|
|
|
@ -22,12 +22,11 @@ public final class PastInFlames extends CardImpl {
|
|||
public PastInFlames(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
|
||||
|
||||
// Each instant and sorcery card in your graveyard gains flashback until end of turn. The flashback cost is equal to its mana cost.
|
||||
this.getSpellAbility().addEffect(new PastInFlamesEffect());
|
||||
|
||||
// Flashback {4}{R}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{R}"), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{R}")));
|
||||
|
||||
}
|
||||
|
||||
|
@ -73,25 +72,18 @@ class PastInFlamesEffect extends ContinuousEffectImpl {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
player.getGraveyard().stream().filter((cardId) -> (affectedObjectList.contains(new MageObjectReference(cardId, game)))).forEachOrdered((cardId) -> {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
FlashbackAbility ability = null;
|
||||
if (card.isInstant(game)) {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.INSTANT);
|
||||
} else if (card.isSorcery(game)) {
|
||||
ability = new FlashbackAbility(card.getManaCost(), TimingRule.SORCERY);
|
||||
}
|
||||
if (ability != null) {
|
||||
FlashbackAbility ability = new FlashbackAbility(card, card.getManaCost());
|
||||
ability.setSourceId(cardId);
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
}
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue