remove calls to mode.getEffects().add and mode.getTargets().add , and replace them with addEffect and addTarget . This way we hide the implementation of the modes. Cards should not be interested in how an effect is to be added, rather they should just be able to use a service for that. Refer to Law of Demeter or Principle of Least Knowledge

This commit is contained in:
Ingmar Goudt 2019-01-01 14:18:24 +01:00
parent dad4ce3312
commit 4b857f24c0
220 changed files with 559 additions and 559 deletions

View file

@ -26,8 +26,8 @@ public final class Abrade extends CardImpl {
// Destroy target artifact.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetArtifactPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -29,8 +29,8 @@ public final class AbunasChant extends CardImpl {
this.getSpellAbility().addEffect(new GainLifeEffect(5));
//or prevent the next 5 damage that would be dealt to target creature this turn.
Mode mode = new Mode();
mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 5));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 5));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().getModes().addMode(mode);
// Entwine {2}
this.addAbility(new EntwineAbility("{2}"));

View file

@ -39,14 +39,14 @@ public final class AbzanCharm extends CardImpl {
// *You draw two cards and you lose 2 life
Mode mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(2));
mode.getEffects().add(new LoseLifeSourceControllerEffect(2));
mode.addEffect(new DrawCardSourceControllerEffect(2));
mode.addEffect(new LoseLifeSourceControllerEffect(2));
this.getSpellAbility().addMode(mode);
// *Distribute two +1/+1 counters among one or two target creatures.
mode = new Mode();
mode.getEffects().add(new DistributeCountersEffect(CounterType.P1P1, 2, false, "one or two target creatures"));
mode.getTargets().add(new TargetCreaturePermanentAmount(2));
mode.addEffect(new DistributeCountersEffect(CounterType.P1P1, 2, false, "one or two target creatures"));
mode.addTarget(new TargetCreaturePermanentAmount(2));
this.getSpellAbility().addMode(mode);
}

View file

@ -38,8 +38,8 @@ public final class ActiveVolcano extends CardImpl {
// or return target Island to its owner's hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetPermanent(filterIsland));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetPermanent(filterIsland));
this.getSpellAbility().addMode(mode);
}

View file

@ -33,7 +33,7 @@ public final class AetherShockwave extends CardImpl {
this.getSpellAbility().addEffect(new TapAllEffect(filterSpirit));
Mode mode = new Mode();
mode.getEffects().add(new TapAllEffect(filterNonSpirit));
mode.addEffect(new TapAllEffect(filterNonSpirit));
this.getSpellAbility().addMode(mode);
}

View file

@ -31,8 +31,8 @@ public final class Afterburn extends CardImpl {
// Remove target creature from combat.
Mode mode = new Mode();
mode.getEffects().add(new RemoveFromCombatTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new RemoveFromCombatTargetEffect());
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -36,7 +36,7 @@ public final class AinokGuide extends CardImpl {
// * Search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it.
Mode mode = new Mode();
mode.getEffects().add(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true));
mode.addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -26,8 +26,8 @@ public final class AlabasterPotion extends CardImpl {
this.getSpellAbility().addEffect(new GainLifeTargetEffect(new ManacostVariableValue()));
this.getSpellAbility().addTarget(new TargetPlayer());
Mode mode = new Mode();
mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()));
mode.getTargets().add(new TargetAnyTarget());
mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
}

View file

@ -27,8 +27,8 @@ public final class AlleyEvasion extends CardImpl {
// Return target creature you control to its owner's hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetControlledCreaturePermanent());
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetControlledCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -55,7 +55,7 @@ public final class AtalyaSamiteMaster extends CardImpl {
// or you gain X life
Mode mode = new Mode();
mode.getEffects().add(new GainLifeEffect(new ManacostVariableValue()).setText("You gain X life. Spend only white mana on X."));
mode.addEffect(new GainLifeEffect(new ManacostVariableValue()).setText("You gain X life. Spend only white mana on X."));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -35,22 +35,22 @@ public final class AtarkasCommand extends CardImpl {
// or Atarka's Command deals 3 damage to each opponent;
Mode mode = new Mode();
mode.getEffects().add(new DamagePlayersEffect(3, TargetController.OPPONENT));
mode.addEffect(new DamagePlayersEffect(3, TargetController.OPPONENT));
this.getSpellAbility().addMode(mode);
// or You may put a land card from your hand onto the battlefield;
mode = new Mode();
mode.getEffects().add(new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A));
mode.addEffect(new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A));
this.getSpellAbility().addMode(mode);
// or Creatures you control get +1/+1 and gain reach until the end of turn.
mode = new Mode();
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn);
effect.setText("Creatures you control get +1/+1");
mode.getEffects().add(effect);
mode.addEffect(effect);
effect = new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
effect.setText("and gain reach until the end of turn");
mode.getEffects().add(effect);
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
}

View file

@ -37,15 +37,15 @@ public final class AustereCommand extends CardImpl {
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterArtifactPermanent("artifacts")));
// or destroy all enchantments;
Mode mode = new Mode();
mode.getEffects().add(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
mode.addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
this.getSpellAbility().getModes().addMode(mode);
// or destroy all creatures with converted mana cost 3 or less;
mode = new Mode();
mode.getEffects().add(new DestroyAllEffect(filter3orLess));
mode.addEffect(new DestroyAllEffect(filter3orLess));
this.getSpellAbility().getModes().addMode(mode);
// or destroy all creatures with converted mana cost 4 or greater.
mode = new Mode();
mode.getEffects().add(new DestroyAllEffect(filter4orMore));
mode.addEffect(new DestroyAllEffect(filter4orMore));
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -38,8 +38,8 @@ public final class AvenSurveyor extends CardImpl {
// * Return target creature to its owner's hand
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetCreaturePermanent());
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -29,13 +29,13 @@ public final class AzoriusCharm extends CardImpl {
// or draw a card;
Mode mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(1));
mode.addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addMode(mode);
// or put target attacking or blocking creature on top of its owner's library.
mode = new Mode();
mode.getTargets().add(new TargetAttackingOrBlockingCreature());
mode.getEffects().add(new PutOnLibraryTargetEffect(true));
mode.addTarget(new TargetAttackingOrBlockingCreature());
mode.addEffect(new PutOnLibraryTargetEffect(true));
this.getSpellAbility().addMode(mode);
}

View file

@ -33,8 +33,8 @@ public final class BalmOfRestoration extends CardImpl {
// or prevent the next 2 damage that would be dealt to any target this turn.
Mode mode = new Mode();
mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2));
mode.getTargets().add(new TargetAnyTarget());
mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2));
mode.addTarget(new TargetAnyTarget());
ability.addMode(mode);
this.addAbility(ability);

View file

@ -36,13 +36,13 @@ public final class BantCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
// or put target creature on the bottom of its owner's library;
Mode mode = new Mode();
mode.getEffects().add(new PutOnLibraryTargetEffect(false));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new PutOnLibraryTargetEffect(false));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
// or counter target instant spell.
mode = new Mode();
mode.getEffects().add(new CounterTargetEffect());
mode.getTargets().add(new TargetSpell(filter));
mode.addEffect(new CounterTargetEffect());
mode.addTarget(new TargetSpell(filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -26,8 +26,8 @@ public final class BarbedLightning extends CardImpl {
// or Barbed Lightning deals 3 damage to target player.
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetPlayerOrPlaneswalker());
mode.addEffect(new DamageTargetEffect(3));
mode.addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().getModes().addMode(mode);
// Entwine {2}

View file

@ -34,8 +34,8 @@ public final class BetrayalOfFlesh extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// or return target creature card from your graveyard to the battlefield.
Mode mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToBattlefieldTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
mode.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().getModes().addMode(mode);
// Entwine-Sacrifice three lands.
this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("three lands"), true))));

View file

@ -54,14 +54,14 @@ public final class BlessedAlliance extends CardImpl {
Mode mode = new Mode();
effect = new UntapTargetEffect();
effect.setText("Untap up to two target creatures");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(0, 2, filterCreature, false));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(0, 2, filterCreature, false));
this.getSpellAbility().addMode(mode);
// Target opponent sacrifices an attacking creature.
mode = new Mode();
mode.getEffects().add(new SacrificeEffect(new FilterAttackingCreature(), 1, "Target opponent"));
mode.getTargets().add(new TargetPlayer(1, 1, false, filterSacrifice));
mode.addEffect(new SacrificeEffect(new FilterAttackingCreature(), 1, "Target opponent"));
mode.addTarget(new TargetPlayer(1, 1, false, filterSacrifice));
this.getSpellAbility().addMode(mode);
}

View file

@ -42,8 +42,8 @@ public final class BlindingBeam extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(2,2));
// or creatures don't untap during target player's next untap step.
Mode mode = new Mode();
mode.getEffects().add(new BlindingBeamEffect());
mode.getTargets().add(new TargetPlayer());
mode.addEffect(new BlindingBeamEffect());
mode.addTarget(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode);
// Entwine {1}

View file

@ -41,7 +41,7 @@ public final class BlizzardSpecter extends CardImpl {
// or that player discards a card.
Mode mode = new Mode();
mode.getEffects().add(new DiscardTargetEffect(1, false));
mode.addEffect(new DiscardTargetEffect(1, false));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -38,8 +38,8 @@ public final class BlueElementalBlast extends CardImpl {
this.getSpellAbility().addTarget(new TargetSpell(filterSpell));
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetPermanent(filterPermanent));
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetPermanent(filterPermanent));
this.getSpellAbility().addMode(mode);
}

View file

@ -33,12 +33,12 @@ public final class BorosCharm extends CardImpl {
Mode mode = new Mode();
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledPermanent(), false);
effect.setText("permanents you control are indestructible this turn");
mode.getEffects().add(effect);
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
//or target creature gains double strike until end of turn.
Mode mode2 = new Mode();
mode2.getEffects().add(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
mode2.getTargets().add(new TargetCreaturePermanent());
mode2.addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
mode2.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode2);
}

View file

@ -32,7 +32,7 @@ public final class BorrowedGrace extends CardImpl {
// Creatures you control get +0/+2 until end of turn.
Mode mode = new Mode();
mode.getEffects().add(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
mode.addEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
this.getSpellAbility().addMode(mode);
}

View file

@ -45,8 +45,8 @@ public final class BorrowedHostility extends CardImpl {
Mode mode = new Mode();
effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
effect.setText("Target creature gains first strike until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterFirstStrike));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterFirstStrike));
this.getSpellAbility().addMode(mode);
}

View file

@ -43,8 +43,8 @@ public final class BorrowedMalevolence extends CardImpl {
Mode mode = new Mode();
effect = new BoostTargetEffect(-1, -1, Duration.EndOfTurn);
effect.setText("Target creature gets -1/-1 until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreatureMinus));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterCreatureMinus));
this.getSpellAbility().addMode(mode);
}

View file

@ -56,18 +56,18 @@ public final class BowOfNylea extends CardImpl {
ability.addCost(new TapSourceCost());
// or Bow of Nylea deals 2 damage to target creature with flying;
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(2));
mode.addEffect(new DamageTargetEffect(2));
Target target = new TargetCreaturePermanent(filterFlying);
mode.getTargets().add(target);
mode.addTarget(target);
ability.addMode(mode);
// or you gain 3 life;
mode = new Mode();
mode.getEffects().add(new GainLifeEffect(3));
mode.addEffect(new GainLifeEffect(3));
ability.addMode(mode);
// or put up to four target cards from your graveyard on the bottom of your library in any order.
mode = new Mode();
mode.getEffects().add(new PutCardsFromGraveyardToLibraryEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(0,4, new FilterCard()));
mode.addEffect(new PutCardsFromGraveyardToLibraryEffect());
mode.addTarget(new TargetCardInYourGraveyard(0,4, new FilterCard()));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -44,8 +44,8 @@ public final class BranchingBolt extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filterFlying));
// or Branching Bolt deals 3 damage to target creature without flying.
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetCreaturePermanent(filterNotFlying));
mode.addEffect(new DamageTargetEffect(3));
mode.addTarget(new TargetCreaturePermanent(filterNotFlying));
this.getSpellAbility().addMode(mode);
}

View file

@ -49,13 +49,13 @@ public final class BreyaEtheriumShaper extends CardImpl {
// Target creature gets -4/-4 until end of turn.
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
ability.addMode(mode);
// or You gain 5 life.
mode = new Mode();
mode.getEffects().add(new GainLifeEffect(5));
mode.addEffect(new GainLifeEffect(5));
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -43,11 +43,11 @@ public final class BrutalExpulsion extends CardImpl {
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
// or Brutal Expulsion deals 2 damage to target creature or planeswalker. If that permanent would be put into a graveyard this turn, exile it instead.
Mode mode = new Mode();
mode.getTargets().add(new TargetCreatureOrPlaneswalker());
mode.getEffects().add(new DamageTargetEffect(2));
mode.addTarget(new TargetCreatureOrPlaneswalker());
mode.addEffect(new DamageTargetEffect(2));
Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn);
effect.setText("If that permanent would be put into a graveyard this turn, exile it instead");
mode.getEffects().add(effect);
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
this.getSpellAbility().addWatcher(new DamagedByWatcher(true));
}

View file

@ -49,8 +49,8 @@ public final class BrutalizerExarch extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), false);
// or put target noncreature permanent on the bottom of its owner's library.
Mode mode = new Mode();
mode.getEffects().add(new BrutalizerExarchEffect2());
mode.getTargets().add(new TargetPermanent(filter));
mode.addEffect(new BrutalizerExarchEffect2());
mode.addTarget(new TargetPermanent(filter));
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -39,9 +39,9 @@ public final class BuccaneersBravado extends CardImpl {
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn).setText("and gains first strike until end of turn"));
// Target Pirate gets +1/+1 and gains double strike until end of turn.
Mode mode = new Mode();
mode.getTargets().add(new TargetPermanent(filter));
mode.getEffects().add(new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("Target Pirate gets +1/+1"));
mode.getEffects().add(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn).setText("and gains double strike until end of turn"));
mode.addTarget(new TargetPermanent(filter));
mode.addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn).setText("Target Pirate gets +1/+1"));
mode.addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn).setText("and gains double strike until end of turn"));
this.getSpellAbility().addMode(mode);
}

View file

@ -37,13 +37,13 @@ public final class ChaosCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetPermanent(filter));
// or Chaos Charm deals 1 damage to target creature
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(1));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new DamageTargetEffect(1));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
// or target creature gains haste until end of turn.
mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -40,13 +40,13 @@ public final class ClanDefiance extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
// Clan Defiance deals X damage to target creature without flying;
Mode mode1 = new Mode();
mode1.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
mode1.getTargets().add(new TargetCreaturePermanent(filter2));
mode1.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
mode1.addTarget(new TargetCreaturePermanent(filter2));
this.getSpellAbility().addMode(mode1);
// and/or Clan Defiance deals X damage to target player.
Mode mode2 = new Mode();
mode2.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
mode2.getTargets().add(new TargetPlayerOrPlaneswalker());
mode2.addEffect(new DamageTargetEffect(new ManacostVariableValue()));
mode2.addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addMode(mode2);
}

View file

@ -27,7 +27,7 @@ public final class CleansingNova extends CardImpl {
// Destroy all artifacts and enchantments.
Mode mode = new Mode();
mode.getEffects().add(new DestroyAllEffect(filter));
mode.addEffect(new DestroyAllEffect(filter));
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -31,8 +31,8 @@ public final class CleansingRay extends CardImpl {
// - Destroy target enchantment.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetEnchantmentPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetEnchantmentPermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -65,19 +65,19 @@ public final class CollectiveBrutality extends CardImpl {
Mode mode = new Mode();
effect = new BoostTargetEffect(-2, -2, Duration.EndOfTurn);
effect.setText("Target creature gets -2/-2 until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreatureMinus));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterCreatureMinus));
this.getSpellAbility().addMode(mode);
// Target opponent loses 2 life and you gain 2 life.
mode = new Mode();
effect = new LoseLifeTargetEffect(2);
effect.setText("Target opponent loses 2 life");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetPlayer(1, 1, false, filterLoseLife));
mode.addEffect(effect);
mode.addTarget(new TargetPlayer(1, 1, false, filterLoseLife));
effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");
mode.getEffects().add(effect);
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
}

View file

@ -49,16 +49,16 @@ public final class CollectiveDefiance extends CardImpl {
Mode mode = new Mode();
Effect effect = new DamageTargetEffect(4);
effect.setText("{this} deals 4 damage to target creature");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().addMode(mode);
// Collective Defiance deals 3 damage to target opponent or planeswalker.
mode = new Mode();
effect = new DamageTargetEffect(3);
effect.setText("{this} deals 3 damage to target opponent or planeswalker");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetOpponentOrPlaneswalker());
mode.addEffect(effect);
mode.addTarget(new TargetOpponentOrPlaneswalker());
this.getSpellAbility().addMode(mode);
}

View file

@ -68,16 +68,16 @@ public final class CollectiveEffort extends CardImpl {
Mode mode = new Mode();
Effect effect = new DestroyTargetEffect();
effect.setText("Destroy target enchantment");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetEnchantmentPermanent(filterDestroyEnchantment));
mode.addEffect(effect);
mode.addTarget(new TargetEnchantmentPermanent(filterDestroyEnchantment));
this.getSpellAbility().addMode(mode);
// Put a +1/+1 counter on each creature target player controls.
mode = new Mode();
effect = new CollectiveEffortEffect();
effect.setText("Put a +1/+1 counter on each creature target player controls");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetPlayer(1, 1, false, filterPlayer));
mode.addEffect(effect);
mode.addTarget(new TargetPlayer(1, 1, false, filterPlayer));
this.getSpellAbility().addMode(mode);
}

View file

@ -24,8 +24,8 @@ public final class ConsultTheNecrosages extends CardImpl {
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new DrawCardTargetEffect(2));
Mode mode = new Mode();
mode.getTargets().add(new TargetPlayer());
mode.getEffects().add(new DiscardTargetEffect(2));
mode.addTarget(new TargetPlayer());
mode.addEffect(new DiscardTargetEffect(2));
this.getSpellAbility().addMode(mode);
}

View file

@ -41,8 +41,8 @@ public final class ConsumingBonfire extends CardImpl {
//or Consuming Bonfire deals 7 damage to target Treefolk creature.
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(7));
mode.getTargets().add(new TargetPermanent(filter2));
mode.addEffect(new DamageTargetEffect(7));
mode.addTarget(new TargetPermanent(filter2));
this.getSpellAbility().addMode(mode);
}

View file

@ -41,8 +41,8 @@ public final class ConsumingSinkhole extends CardImpl {
// Consuming Sinkhole deals 4 damage to target player.
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(4));
mode.getTargets().add(new TargetPlayerOrPlaneswalker());
mode.addEffect(new DamageTargetEffect(4));
mode.addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addMode(mode);
}

View file

@ -37,14 +37,14 @@ public final class CrosissCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetPermanent());
// or destroy target nonblack creature, and it can't be regenerated;
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect(true));
mode.getTargets().add(new TargetCreaturePermanent(filter));
mode.addEffect(new DestroyTargetEffect(true));
mode.addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addMode(mode);
// or destroy target artifact.
mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.addEffect(new DestroyTargetEffect());
Target target = new TargetArtifactPermanent();
mode.getTargets().add(target);
mode.addTarget(target);
this.getSpellAbility().addMode(mode);
}

View file

@ -38,15 +38,15 @@ public final class CrueltyOfTheSith extends CardImpl {
// Target player sacrifices a creture.
Mode mode = new Mode();
mode.getEffects().add(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, "Target player"));
mode.getTargets().add(new TargetPlayer());
mode.addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, "Target player"));
mode.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode);
// Cruelty of the Sith deals 3 damage to target player. That player discards a card.
mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getEffects().add(new DiscardTargetEffect(1));
mode.getTargets().add(new TargetPlayer());
mode.addEffect(new DamageTargetEffect(3));
mode.addEffect(new DiscardTargetEffect(1));
mode.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode);
}

View file

@ -28,8 +28,8 @@ public final class CrushContraband extends CardImpl {
this.getSpellAbility().addEffect(new ExileTargetEffect());
Mode mode1 = new Mode();
mode1.getTargets().add(new TargetEnchantmentPermanent());
mode1.getEffects().add(new ExileTargetEffect());
mode1.addTarget(new TargetEnchantmentPermanent());
mode1.addEffect(new ExileTargetEffect());
this.getSpellAbility().addMode(mode1);
}

View file

@ -34,8 +34,8 @@ public final class CrushingCanopy extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect());
// * Destroy target enchantment.
Mode mode = new Mode();
mode.getTargets().add(new TargetEnchantmentPermanent());
mode.getEffects().add(new DestroyTargetEffect());
mode.addTarget(new TargetEnchantmentPermanent());
mode.addEffect(new DestroyTargetEffect());
this.getSpellAbility().addMode(mode);
}

View file

@ -33,8 +33,8 @@ public final class CrushingVines extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Mode mode = new Mode();
mode.getTargets().add(new TargetArtifactPermanent());
mode.getEffects().add(new DestroyTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
mode.addEffect(new DestroyTargetEffect());
this.getSpellAbility().addMode(mode);
}

View file

@ -32,7 +32,7 @@ public final class CruxOfFate extends CardImpl {
this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent(SubType.DRAGON, "Dragon creatures")));
// * Destroy all non-Dragon creatures.
Mode mode = new Mode();
mode.getEffects().add(new DestroyAllEffect(new FilterCreaturePermanent(filterNonDragon)));
mode.addEffect(new DestroyAllEffect(new FilterCreaturePermanent(filterNonDragon)));
this.getSpellAbility().addMode(mode);
}

View file

@ -39,16 +39,16 @@ public final class CrypticCommand extends CardImpl {
this.getSpellAbility().addTarget(new TargetSpell());
// or return target permanent to its owner's hand;
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetPermanent());
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetPermanent());
this.getSpellAbility().getModes().addMode(mode);
// or tap all creatures your opponents control;
mode = new Mode();
mode.getEffects().add(new CrypticCommandEffect());
mode.addEffect(new CrypticCommandEffect());
this.getSpellAbility().getModes().addMode(mode);
// or draw a card.
mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(1));
mode.addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -33,14 +33,14 @@ public final class DarigaazsCharm extends CardImpl {
// or Darigaaz's Charm deals 3 damage to any target;
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetAnyTarget());
mode.addEffect(new DamageTargetEffect(3));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
// or target creature gets +3/+3 until end of turn.
mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -39,13 +39,13 @@ public final class DawnCharm extends CardImpl {
this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true));
// or regenerate target creature;
Mode mode = new Mode();
mode.getEffects().add(new RegenerateTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new RegenerateTargetEffect());
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
// or counter target spell that targets you.
mode = new Mode();
mode.getEffects().add(new CounterTargetEffect());
mode.getTargets().add(new TargetSpell(filter));
mode.addEffect(new CounterTargetEffect());
mode.addTarget(new TargetSpell(filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -36,8 +36,8 @@ public final class DawnToDusk extends CardImpl {
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filterCard));
// and/or destroy target enchantment.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetEnchantmentPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetEnchantmentPermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -31,7 +31,7 @@ public final class DeafeningClarion extends CardImpl {
// Creatures you control gain lifelink until end of turn.
Mode mode = new Mode();
mode.getEffects().add(new GainAbilityControlledEffect(
mode.addEffect(new GainAbilityControlledEffect(
LifelinkAbility.getInstance(),
Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURES

View file

@ -43,8 +43,8 @@ public final class DeceiverExarch extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new UntapTargetEffect());
ability.addTarget(new TargetControlledPermanent());
Mode mode = new Mode();
mode.getEffects().add(new TapTargetEffect());
mode.getTargets().add(new TargetPermanent(filter));
mode.addEffect(new TapTargetEffect());
mode.addTarget(new TargetPermanent(filter));
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -33,8 +33,8 @@ public final class DefiantOgre extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false);
// * Destroy target artifact.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetArtifactPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -43,8 +43,8 @@ public final class DelayTactic extends CardImpl {
// Creatures target opponent controls don't untap during his or her next untap step.
Mode mode = new Mode();
mode.getEffects().add(new DelayTacticEffect());
mode.getTargets().add(new TargetOpponent());
mode.addEffect(new DelayTacticEffect());
mode.addTarget(new TargetOpponent());
this.getSpellAbility().addMode(mode);
}

View file

@ -38,18 +38,18 @@ public final class DemonicPact extends CardImpl {
// - Target opponent discards two cards
Mode mode = new Mode();
mode.getTargets().add(new TargetOpponent());
mode.getEffects().add(new DiscardTargetEffect(2));
mode.addTarget(new TargetOpponent());
mode.addEffect(new DiscardTargetEffect(2));
ability.addMode(mode);
// - Draw two cards
mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(2));
mode.addEffect(new DrawCardSourceControllerEffect(2));
ability.addMode(mode);
// - You lose the game.
mode = new Mode();
mode.getEffects().add(new LoseGameSourceControllerEffect());
mode.addEffect(new LoseGameSourceControllerEffect());
ability.addMode(mode);
this.addAbility(ability);

View file

@ -37,7 +37,7 @@ public final class DestructiveTampering extends CardImpl {
// * Creatures without flying can't block this turn.
Mode mode = new Mode();
mode.getEffects().add(new CantBlockAllEffect(filter, Duration.EndOfTurn));
mode.addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn));
this.getSpellAbility().addMode(mode);
}

View file

@ -47,14 +47,14 @@ public final class DimirCharm extends CardImpl {
//or destroy target creature with power 2 or less
Mode mode1 = new Mode();
mode1.getEffects().add(new DestroyTargetEffect());
mode1.getTargets().add(new TargetCreaturePermanent(filterCreature));
mode1.addEffect(new DestroyTargetEffect());
mode1.addTarget(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().addMode(mode1);
//or look at the top three cards of target player's library, then put one back and the rest into that player's graveyard
Mode mode2 = new Mode();
mode2.getEffects().add(new DimirCharmEffect());
mode2.getTargets().add(new TargetPlayer());
mode2.addEffect(new DimirCharmEffect());
mode2.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode2);
}

View file

@ -52,19 +52,19 @@ public final class DiscipleOfTheRing extends CardImpl {
// or Disciple of the Ring gets +1/+1 until end of turn;
Mode mode = new Mode();
mode.getEffects().add(new BoostSourceEffect(1, 1, Duration.EndOfTurn));
mode.addEffect(new BoostSourceEffect(1, 1, Duration.EndOfTurn));
ability.addMode(mode);
// or Tap target creature;
mode = new Mode();
mode.getEffects().add(new TapTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new TapTargetEffect());
mode.addTarget(new TargetCreaturePermanent());
ability.addMode(mode);
// or Untap target creature.
mode = new Mode();
mode.getEffects().add(new UntapTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new UntapTargetEffect());
mode.addTarget(new TargetCreaturePermanent());
ability.addMode(mode);
this.addAbility(ability);

View file

@ -52,7 +52,7 @@ public final class DisplayOfDominance extends CardImpl {
// or Permanents you control can't be the targets of blue or black spells your opponents control this turn
Mode mode = new Mode();
mode.getEffects().add(new DisplayOfDominanceEffect());
mode.addEffect(new DisplayOfDominanceEffect());
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -37,9 +37,9 @@ public final class Doomfall extends CardImpl {
// Target opponent reveals their hand. You choose a nonland card from it. Exile that card.
Mode mode = new Mode();
mode.getEffects().add(new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND)
mode.addEffect(new ExileCardYouChooseTargetOpponentEffect(StaticFilters.FILTER_CARD_A_NON_LAND)
.setText("Target opponent reveals their hand. You choose a nonland card from it. Exile that card"));
mode.getTargets().add(new TargetOpponent());
mode.addTarget(new TargetOpponent());
this.getSpellAbility().addMode(mode);
}

View file

@ -33,9 +33,9 @@ public final class DreamsGrip extends CardImpl {
//or untap target permanent.
Mode mode = new Mode();
TargetPermanent target2 = new TargetPermanent(new FilterPermanent("Permanent to untap"));
mode.getTargets().add(target2);
mode.addTarget(target2);
Effect untapEffect = new UntapTargetEffect();
mode.getEffects().add(untapEffect);
mode.addEffect(untapEffect);
this.getSpellAbility().addMode(mode);
// Entwine {1}

View file

@ -26,12 +26,12 @@ public final class DromarsCharm extends CardImpl {
// Choose one - You gain 5 life; or counter target spell; or target creature gets -2/-2 until end of turn.
this.getSpellAbility().addEffect(new GainLifeEffect(5));
Mode mode = new Mode();
mode.getEffects().add(new CounterTargetEffect());
mode.getTargets().add(new TargetSpell());
mode.addEffect(new CounterTargetEffect());
mode.addTarget(new TargetSpell());
this.getSpellAbility().addMode(mode);
mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(-2, -2, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -52,25 +52,25 @@ public final class DromokasCommand extends CardImpl {
Mode mode = new Mode();
Effect effect = new SacrificeEffect(filterEnchantment, 1, "target player");
effect.setText("Target player sacrifices an enchantment");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetPlayer());
mode.addEffect(effect);
mode.addTarget(new TargetPlayer());
this.getSpellAbility().getModes().addMode(mode);
// Put a +1/+1 counter on target creature;
mode = new Mode();
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance());
effect.setText("Put a +1/+1 counter on target creature");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent(filterCreature));
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent(filterCreature));
this.getSpellAbility().getModes().addMode(mode);
// or Target creature you control fights target creature you don't control.
mode = new Mode();
effect = new FightTargetsEffect();
effect.setText("Target creature you control fights target creature you don't control");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetControlledCreaturePermanent());
mode.getTargets().add(new TargetCreaturePermanent(filterUncontrolledCreature));
mode.addEffect(effect);
mode.addTarget(new TargetControlledCreaturePermanent());
mode.addTarget(new TargetCreaturePermanent(filterUncontrolledCreature));
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -40,7 +40,7 @@ public final class DustOfMoments extends CardImpl {
// Or put two time counters on each permanent with a time counter on it and each suspended card
Mode mode = new Mode();
mode.getEffects().add(new AddCountersEffect());
mode.addEffect(new AddCountersEffect());
this.getSpellAbility().addMode(mode);
}

View file

@ -35,14 +35,14 @@ public final class EbonyCharm extends CardImpl {
// or exile up to three target cards from a single graveyard;
Mode mode = new Mode();
mode.getEffects().add(new EbonyCharmExileEffect());
mode.getTargets().add((new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard"))));
mode.addEffect(new EbonyCharmExileEffect());
mode.addTarget((new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard"))));
this.getSpellAbility().addMode(mode);
// or target creature gains fear until end of turn.
mode = new Mode();
mode.getTargets().add(new TargetCreaturePermanent());
mode.getEffects().add(new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
mode.addEffect(new GainAbilityTargetEffect(FearAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addMode(mode);
}

View file

@ -40,14 +40,14 @@ public final class EmeraldCharm extends CardImpl {
// or destroy target non-Aura enchantment;
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetEnchantmentPermanent(filter));
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetEnchantmentPermanent(filter));
this.getSpellAbility().addMode(mode);
// or target creature loses flying until end of turn.
mode = new Mode();
mode.getEffects().add(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -25,8 +25,8 @@ public final class EnergyBolt extends CardImpl {
this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
Mode mode = new Mode();
mode.getEffects().add(new GainLifeTargetEffect(new ManacostVariableValue()));
mode.getTargets().add(new TargetPlayer());
mode.addEffect(new GainLifeTargetEffect(new ManacostVariableValue()));
mode.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode);
}

View file

@ -43,8 +43,8 @@ public final class EnergyChamber extends CardImpl {
// or put a charge counter on target noncreature artifact.
Mode mode = new Mode();
mode.getEffects().add(new AddCountersTargetEffect(CounterType.CHARGE.createInstance(), Outcome.BoostCreature));
mode.getTargets().add(new TargetPermanent(filter2));
mode.addEffect(new AddCountersTargetEffect(CounterType.CHARGE.createInstance(), Outcome.BoostCreature));
mode.addTarget(new TargetPermanent(filter2));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -41,10 +41,10 @@ public final class EngineeredMight extends CardImpl {
Mode mode = new Mode();
effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn);
effect.setText("Creatures you control get +2/+2");
mode.getEffects().add(effect);
mode.addEffect(effect);
effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent());
effect.setText("and gain vigilance until end of turn");
mode.getEffects().add(effect);
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);
}

View file

@ -42,8 +42,8 @@ public final class EntomberExarch extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
Mode mode = new Mode();
mode.getEffects().add(new EntomberExarchEffect());
mode.getTargets().add(new TargetOpponent());
mode.addEffect(new EntomberExarchEffect());
mode.addTarget(new TargetOpponent());
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -27,12 +27,12 @@ public final class EsperCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetEnchantmentPermanent());
// or draw two cards;
Mode mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(2));
mode.addEffect(new DrawCardSourceControllerEffect(2));
this.getSpellAbility().addMode(mode);
// or target player discards two cards.
mode = new Mode();
mode.getEffects().add(new DiscardTargetEffect(2));
mode.getTargets().add(new TargetPlayer());
mode.addEffect(new DiscardTargetEffect(2));
mode.addTarget(new TargetPlayer());
this.getSpellAbility().addMode(mode);
}

View file

@ -37,12 +37,12 @@ public final class EtherwroughtPage extends CardImpl {
// or look at the top card of your library, then you may put that card into your graveyard;
Mode mode = new Mode();
mode.getEffects().add(new EtherwroughtPageEffect());
mode.addEffect(new EtherwroughtPageEffect());
ability.addMode(mode);
// or each opponent loses 1 life
Mode mode1 = new Mode();
mode1.getEffects().add(new LoseLifeOpponentsEffect(1));
mode1.addEffect(new LoseLifeOpponentsEffect(1));
ability.addMode(mode1);
this.addAbility(ability);

View file

@ -31,14 +31,14 @@ public final class EvolutionCharm extends CardImpl {
// or return target creature card from your graveyard to your hand;
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addMode(mode);
// or target creature gains flying until end of turn.
mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -26,7 +26,7 @@ public final class Fascination extends CardImpl {
// * Each player puts the top X cards of their library into their graveyard.
Mode mode = new Mode();
mode.getEffects().add(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(new ManacostVariableValue(), TargetController.ANY));
mode.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(new ManacostVariableValue(), TargetController.ANY));
this.getSpellAbility().addMode(mode);
}

View file

@ -37,8 +37,8 @@ public final class FeastOrFamine extends CardImpl {
// or destroy target nonartifact, nonblack creature and it can't be regenerated.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect(true));
mode.getTargets().add(new TargetCreaturePermanent(filter));
mode.addEffect(new DestroyTargetEffect(true));
mode.addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -38,14 +38,14 @@ public final class FerocityOfTheUnderworld extends CardImpl {
// Copy target instant or sorcery spell. You may choose new targets for the copy.
Mode mode = new Mode();
mode.getEffects().add(new CopyTargetSpellEffect());
mode.getTargets().add(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
mode.addEffect(new CopyTargetSpellEffect());
mode.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
this.getSpellAbility().addMode(mode);
// Return target card from your graveyard to your hand.
mode = new Mode();
mode.getEffects().add(new ReturnFromGraveyardToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard());
mode.addEffect(new ReturnFromGraveyardToHandTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard());
this.getSpellAbility().addMode(mode);
}

View file

@ -36,13 +36,13 @@ public final class FeverCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// or target creature gets +2/+0 until end of turn
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(2, 0, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
// or Fever Charm deals 3 damage to target Wizard creature.
mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(3));
mode.getTargets().add(new TargetCreaturePermanent(filter));
mode.addEffect(new DamageTargetEffect(3));
mode.addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -32,13 +32,13 @@ public final class FieryConfluence extends CardImpl {
// Fiery Confluence deals 2 damage to each opponent;
Mode mode = new Mode();
mode.getEffects().add(new DamagePlayersEffect(2, TargetController.OPPONENT));
mode.addEffect(new DamagePlayersEffect(2, TargetController.OPPONENT));
this.getSpellAbility().getModes().addMode(mode);
// Destroy target artifact.
mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetArtifactPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -27,8 +27,8 @@ public final class FieryIntervention extends CardImpl {
// -Destroy target artifact.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetArtifactPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetArtifactPermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -21,7 +21,7 @@ public final class FinalRevels extends CardImpl {
this.getSpellAbility().addEffect(new BoostAllEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
Mode mode = new Mode();
mode.getEffects().add(new BoostAllEffect(0, -2, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
mode.addEffect(new BoostAllEffect(0, -2, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
this.getSpellAbility().addMode(mode);
}

View file

@ -27,8 +27,8 @@ public final class FissureVent extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect());
Mode mode1 = new Mode();
mode1.getTargets().add(new TargetNonBasicLandPermanent());
mode1.getEffects().add(new DestroyTargetEffect());
mode1.addTarget(new TargetNonBasicLandPermanent());
mode1.addEffect(new DestroyTargetEffect());
this.getSpellAbility().addMode(mode1);
}

View file

@ -37,8 +37,8 @@ public final class FlashFlood extends CardImpl {
this.getSpellAbility().addTarget(new TargetPermanent(filter1));
// or return target Mountain to its owner's hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetPermanent(filter2));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetPermanent(filter2));
this.getSpellAbility().addMode(mode);
}

View file

@ -43,8 +43,8 @@ public final class ForceStasis extends CardImpl {
// Return target instant or sorcery spell you don't control to its owner's hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetSpell(filter));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetSpell(filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -22,7 +22,7 @@ public final class Fortify extends CardImpl {
// Choose one - Creatures you control get +2/+0 until end of turn; or creatures you control get +0/+2 until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn));
Mode mode = new Mode();
mode.getEffects().add(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
mode.addEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
this.getSpellAbility().addMode(mode);
}

View file

@ -30,8 +30,8 @@ public final class FortuitousFind extends CardImpl {
// or Return target creature card from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addMode(mode);
}

View file

@ -28,12 +28,12 @@ public final class FuneralCharm extends CardImpl {
this.getSpellAbility().addEffect(new DiscardTargetEffect(1));
this.getSpellAbility().addTarget(new TargetPlayer());
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(2, -1, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(2, -1, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
mode = new Mode();
mode.getEffects().add(new GainAbilityTargetEffect(new SwampwalkAbility(), Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new GainAbilityTargetEffect(new SwampwalkAbility(), Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}

View file

@ -52,16 +52,16 @@ public final class FuryCharm extends CardImpl {
Mode mode = new Mode();
Effect effect = new BoostTargetEffect(1,1, Duration.EndOfTurn);
effect.setText("target creature gets +1/+1");
mode.getEffects().add(effect);
mode.addEffect(effect);
effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(),Duration.EndOfTurn);
effect.setText("and gains trample until end of turn");
mode.getEffects().add(effect);
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(effect);
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().getModes().addMode(mode);
// or remove two time counters from target permanent or suspended card.
mode = new Mode();
mode.getTargets().add(new TargetPermanentOrSuspendedCard());
mode.getEffects().add(new FuryCharmRemoveCounterEffect());
mode.addTarget(new TargetPermanentOrSuspendedCard());
mode.addEffect(new FuryCharmRemoveCounterEffect());
this.getSpellAbility().getModes().addMode(mode);
}

View file

@ -33,8 +33,8 @@ public final class GhoulcallersChant extends CardImpl {
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// or return two target Zombie cards from your graveyard to your hand.
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetCardInYourGraveyard(2, filter));
mode.addEffect(new ReturnToHandTargetEffect());
mode.addTarget(new TargetCardInYourGraveyard(2, filter));
this.getSpellAbility().addMode(mode);
}

View file

@ -50,8 +50,8 @@ public final class GoblinCratermaker extends CardImpl {
// Destroy target colorless nonland permanent.
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetPermanent(filter));
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetPermanent(filter));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -29,13 +29,13 @@ public final class GolgariCharm extends CardImpl {
// or destroy target enchantment;
Mode mode = new Mode();
mode.getEffects().add(new DestroyTargetEffect());
mode.getTargets().add(new TargetEnchantmentPermanent());
mode.addEffect(new DestroyTargetEffect());
mode.addTarget(new TargetEnchantmentPermanent());
this.getSpellAbility().addMode(mode);
// or regenerate each creature you control.
mode = new Mode();
mode.getEffects().add(new RegenerateAllEffect(new FilterControlledCreaturePermanent()));
mode.addEffect(new RegenerateAllEffect(new FilterControlledCreaturePermanent()));
this.getSpellAbility().addMode(mode);
}

View file

@ -48,10 +48,10 @@ public final class GrabTheReins extends CardImpl {
this.getSpellAbility().addTarget(target);
// or sacrifice a creature, then Grab the Reins deals damage equal to that creature's power to any target.
Mode mode = new Mode();
mode.getEffects().add(new GrabTheReinsEffect());
mode.addEffect(new GrabTheReinsEffect());
TargetAnyTarget target2 = new TargetAnyTarget();
target2.setTargetName("a creature or player to damage");
mode.getTargets().add(target2);
mode.addTarget(target2);
this.getSpellAbility().getModes().addMode(mode);
// Entwine {2}{R}

View file

@ -60,7 +60,7 @@ public final class GrenzoHavocRaiser extends CardImpl {
Ability ability = new GrenzoHavocRaiserTriggeredAbility(effect);
//or Exile the top card of that player's library. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
Mode mode = new Mode();
mode.getEffects().add(new GrenzoHavocRaiserEffect());
mode.addEffect(new GrenzoHavocRaiserEffect());
ability.addMode(mode);
this.addAbility(ability);
}

View file

@ -30,8 +30,8 @@ public final class GrimDiscovery extends CardImpl {
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
// and/or return target land card from your graveyard to your hand.
Mode mode1 = new Mode();
mode1.getEffects().add(new ReturnToHandTargetEffect());
mode1.getTargets().add(new TargetCardInYourGraveyard(filterLandCard));
mode1.addEffect(new ReturnToHandTargetEffect());
mode1.addTarget(new TargetCardInYourGraveyard(filterLandCard));
this.getSpellAbility().addMode(mode1);
}

View file

@ -28,12 +28,12 @@ public final class GrixisCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetPermanent());
// or target creature gets -4/-4 until end of turn;
Mode mode = new Mode();
mode.getEffects().add(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
mode.getTargets().add(new TargetCreaturePermanent());
mode.addEffect(new BoostTargetEffect(-4, -4, Duration.EndOfTurn));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
// or creatures you control get +2/+0 until end of turn.
mode = new Mode();
mode.getEffects().add(new BoostControlledEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
mode.addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
this.getSpellAbility().addMode(mode);
}

View file

@ -43,12 +43,12 @@ public final class GruulCharm extends CardImpl {
// or gain control of all permanents you own;
Mode mode = new Mode();
mode.getEffects().add(new GainControlAllEffect(Duration.EndOfGame, filter2));
mode.addEffect(new GainControlAllEffect(Duration.EndOfGame, filter2));
this.getSpellAbility().addMode(mode);
// or Gruul Charm deals 3 damage to each creature with flying.
Mode mode2 = new Mode();
mode2.getEffects().add(new DamageAllEffect(3, filter3));
mode2.addEffect(new DamageAllEffect(3, filter3));
this.getSpellAbility().addMode(mode2);
}

View file

@ -25,8 +25,8 @@ public final class HealingLeaves extends CardImpl {
this.getSpellAbility().addEffect(new GainLifeTargetEffect(3));
this.getSpellAbility().addTarget(new TargetPlayer());
Mode mode = new Mode();
mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3));
mode.getTargets().add(new TargetAnyTarget());
mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
}

View file

@ -27,8 +27,8 @@ public final class HealingSalve extends CardImpl {
this.getSpellAbility().addTarget(new TargetPlayer());
Mode mode = new Mode();
mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3));
mode.getTargets().add(new TargetAnyTarget());
mode.addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3));
mode.addTarget(new TargetAnyTarget());
this.getSpellAbility().addMode(mode);
}

View file

@ -40,12 +40,12 @@ public final class HearthCharm extends CardImpl {
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter1));
// or attacking creatures get +1/+0 until end of turn
Mode mode = new Mode();
mode.getEffects().add(new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false));
mode.addEffect(new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false));
this.getSpellAbility().addMode(mode);
// or target creature with power 2 or less is unblockable this turn.
mode = new Mode();
mode.getEffects().add(new CantBeBlockedTargetEffect());
mode.getTargets().add(new TargetCreaturePermanent(filter3));
mode.addEffect(new CantBeBlockedTargetEffect());
mode.addTarget(new TargetCreaturePermanent(filter3));
this.getSpellAbility().addMode(mode);
}

Some files were not shown because too many files have changed in this diff Show more