From f31bfa829e9a4df88aa76ff96e6efbeebf34519e Mon Sep 17 00:00:00 2001 From: ninthworld Date: Mon, 16 Jul 2018 20:55:05 -0700 Subject: [PATCH 1/8] add Star Wars expansion sets to the Star Wars set --- Mage.Sets/pom.xml | 3 +- Mage.Sets/src/mage/cards/a/Afterburn.java | 47 +++++ .../src/mage/cards/a/AstromechDroid.java | 63 ++++++ .../src/mage/cards/b/BludgeoningPain.java | 36 ++++ Mage.Sets/src/mage/cards/b/BorGullet.java | 42 ++++ .../src/mage/cards/c/CantoBightEnforcer.java | 48 +++++ .../src/mage/cards/c/CantonicaCasino.java | 79 +++++++ Mage.Sets/src/mage/cards/c/CaptainPhasma.java | 67 ++++++ .../src/mage/cards/c/ChewbaccaTheBeast.java | 60 ++++++ Mage.Sets/src/mage/cards/c/ChirrutImwe.java | 100 +++++++++ Mage.Sets/src/mage/cards/c/CodeSlice.java | 50 +++++ Mage.Sets/src/mage/cards/c/Conscription.java | 49 +++++ .../src/mage/cards/c/CorellianGunship.java | 45 ++++ Mage.Sets/src/mage/cards/d/DelayTactic.java | 91 +++++++++ Mage.Sets/src/mage/cards/d/Despair.java | 36 ++++ .../src/mage/cards/d/DirectorKrennic.java | 60 ++++++ Mage.Sets/src/mage/cards/d/DroidUprising.java | 46 +++++ Mage.Sets/src/mage/cards/d/DrydenVos.java | 57 ++++++ Mage.Sets/src/mage/cards/e/EnfysNest.java | 88 ++++++++ Mage.Sets/src/mage/cards/f/Fathier.java | 40 ++++ Mage.Sets/src/mage/cards/f/Finn.java | 59 ++++++ .../mage/cards/f/FirstOrderDreadnought.java | 49 +++++ Mage.Sets/src/mage/cards/f/FlameTrooper.java | 50 +++++ .../src/mage/cards/f/ForceProjection.java | 95 +++++++++ .../src/mage/cards/f/ForceProtection.java | 36 ++++ Mage.Sets/src/mage/cards/f/ForceStasis.java | 59 ++++++ .../src/mage/cards/f/ForceTelepathy.java | 38 ++++ Mage.Sets/src/mage/cards/g/GeneralHux.java | 58 ++++++ .../mage/cards/g/GerrerasRevolutionary.java | 37 ++++ .../src/mage/cards/h/HammerheadCorvette.java | 63 ++++++ .../src/mage/cards/h/HanSoloScrumrat.java | 113 ++++++++++ .../src/mage/cards/i/ImperialHovertank.java | 84 ++++++++ Mage.Sets/src/mage/cards/i/Inspire.java | 39 ++++ .../mage/cards/j/JynErsoAndCassianAndor.java | 50 +++++ .../src/mage/cards/k/KalevanStarYacht.java | 50 +++++ Mage.Sets/src/mage/cards/k/KyloRen.java | 114 +++++++++++ .../cards/l/LukeSkywalkerTheLastJedi.java | 69 +++++++ .../src/mage/cards/m/MaelstromBlockade.java | 34 +++ Mage.Sets/src/mage/cards/m/MouseDroid.java | 41 ++++ Mage.Sets/src/mage/cards/m/MudTrooper.java | 59 ++++++ Mage.Sets/src/mage/cards/o/Occupation.java | 193 ++++++++++++++++++ Mage.Sets/src/mage/cards/o/OuterRimGang.java | 49 +++++ Mage.Sets/src/mage/cards/p/PoeDameron.java | 54 +++++ Mage.Sets/src/mage/cards/p/PorgNest.java | 44 ++++ .../src/mage/cards/p/PraetorianTrooper.java | 49 +++++ Mage.Sets/src/mage/cards/r/RangeTrooper.java | 92 +++++++++ Mage.Sets/src/mage/cards/r/Rathtar.java | 49 +++++ Mage.Sets/src/mage/cards/r/Resistance.java | 60 ++++++ .../src/mage/cards/r/ResistanceBomber.java | 60 ++++++ Mage.Sets/src/mage/cards/r/Rey.java | 97 +++++++++ Mage.Sets/src/mage/cards/r/RiotTrooper.java | 50 +++++ Mage.Sets/src/mage/cards/s/SaiTok.java | 47 +++++ Mage.Sets/src/mage/cards/s/SalvageTrader.java | 171 ++++++++++++++++ .../src/mage/cards/s/SinsOfTheFather.java | 79 +++++++ .../src/mage/cards/s/SupremeLeaderSnoke.java | 156 ++++++++++++++ Mage.Sets/src/mage/cards/t/TIESilencer.java | 89 ++++++++ Mage.Sets/src/mage/cards/t/TIEStriker.java | 36 ++++ .../src/mage/cards/t/ThermalDetonator.java | 51 +++++ Mage.Sets/src/mage/cards/t/TobiasBeckett.java | 185 +++++++++++++++++ Mage.Sets/src/mage/cards/u/UWing.java | 73 +++++++ .../src/mage/cards/u/UndergroundForum.java | 62 ++++++ .../src/mage/cards/u/UpsilonClassShuttle.java | 50 +++++ Mage.Sets/src/mage/cards/v/VadersCommand.java | 74 +++++++ Mage.Sets/src/mage/cards/v/Vulptex.java | 42 ++++ Mage.Sets/src/mage/sets/StarWars.java | 68 ++++++ .../src/main/java/mage/constants/SubType.java | 4 + Mage/src/main/java/mage/game/GameImpl.java | 1 + .../command/emblems/LukeSkywalkerEmblem.java | 61 ++++++ .../mage/game/permanent/token/PorgToken.java | 39 ++++ .../game/permanent/token/TrooperToken2.java | 36 ++++ .../PlayerLostLifeNonCombatWatcher.java | 84 ++++++++ Utils/mtg-cards-data.txt | 66 ++++++ 72 files changed, 4574 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/a/Afterburn.java create mode 100644 Mage.Sets/src/mage/cards/a/AstromechDroid.java create mode 100644 Mage.Sets/src/mage/cards/b/BludgeoningPain.java create mode 100644 Mage.Sets/src/mage/cards/b/BorGullet.java create mode 100644 Mage.Sets/src/mage/cards/c/CantoBightEnforcer.java create mode 100644 Mage.Sets/src/mage/cards/c/CantonicaCasino.java create mode 100644 Mage.Sets/src/mage/cards/c/CaptainPhasma.java create mode 100644 Mage.Sets/src/mage/cards/c/ChewbaccaTheBeast.java create mode 100644 Mage.Sets/src/mage/cards/c/ChirrutImwe.java create mode 100644 Mage.Sets/src/mage/cards/c/CodeSlice.java create mode 100644 Mage.Sets/src/mage/cards/c/Conscription.java create mode 100644 Mage.Sets/src/mage/cards/c/CorellianGunship.java create mode 100644 Mage.Sets/src/mage/cards/d/DelayTactic.java create mode 100644 Mage.Sets/src/mage/cards/d/Despair.java create mode 100644 Mage.Sets/src/mage/cards/d/DirectorKrennic.java create mode 100644 Mage.Sets/src/mage/cards/d/DroidUprising.java create mode 100644 Mage.Sets/src/mage/cards/d/DrydenVos.java create mode 100644 Mage.Sets/src/mage/cards/e/EnfysNest.java create mode 100644 Mage.Sets/src/mage/cards/f/Fathier.java create mode 100644 Mage.Sets/src/mage/cards/f/Finn.java create mode 100644 Mage.Sets/src/mage/cards/f/FirstOrderDreadnought.java create mode 100644 Mage.Sets/src/mage/cards/f/FlameTrooper.java create mode 100644 Mage.Sets/src/mage/cards/f/ForceProjection.java create mode 100644 Mage.Sets/src/mage/cards/f/ForceProtection.java create mode 100644 Mage.Sets/src/mage/cards/f/ForceStasis.java create mode 100644 Mage.Sets/src/mage/cards/f/ForceTelepathy.java create mode 100644 Mage.Sets/src/mage/cards/g/GeneralHux.java create mode 100644 Mage.Sets/src/mage/cards/g/GerrerasRevolutionary.java create mode 100644 Mage.Sets/src/mage/cards/h/HammerheadCorvette.java create mode 100644 Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java create mode 100644 Mage.Sets/src/mage/cards/i/ImperialHovertank.java create mode 100644 Mage.Sets/src/mage/cards/i/Inspire.java create mode 100644 Mage.Sets/src/mage/cards/j/JynErsoAndCassianAndor.java create mode 100644 Mage.Sets/src/mage/cards/k/KalevanStarYacht.java create mode 100644 Mage.Sets/src/mage/cards/k/KyloRen.java create mode 100644 Mage.Sets/src/mage/cards/l/LukeSkywalkerTheLastJedi.java create mode 100644 Mage.Sets/src/mage/cards/m/MaelstromBlockade.java create mode 100644 Mage.Sets/src/mage/cards/m/MouseDroid.java create mode 100644 Mage.Sets/src/mage/cards/m/MudTrooper.java create mode 100644 Mage.Sets/src/mage/cards/o/Occupation.java create mode 100644 Mage.Sets/src/mage/cards/o/OuterRimGang.java create mode 100644 Mage.Sets/src/mage/cards/p/PoeDameron.java create mode 100644 Mage.Sets/src/mage/cards/p/PorgNest.java create mode 100644 Mage.Sets/src/mage/cards/p/PraetorianTrooper.java create mode 100644 Mage.Sets/src/mage/cards/r/RangeTrooper.java create mode 100644 Mage.Sets/src/mage/cards/r/Rathtar.java create mode 100644 Mage.Sets/src/mage/cards/r/Resistance.java create mode 100644 Mage.Sets/src/mage/cards/r/ResistanceBomber.java create mode 100644 Mage.Sets/src/mage/cards/r/Rey.java create mode 100644 Mage.Sets/src/mage/cards/r/RiotTrooper.java create mode 100644 Mage.Sets/src/mage/cards/s/SaiTok.java create mode 100644 Mage.Sets/src/mage/cards/s/SalvageTrader.java create mode 100644 Mage.Sets/src/mage/cards/s/SinsOfTheFather.java create mode 100644 Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java create mode 100644 Mage.Sets/src/mage/cards/t/TIESilencer.java create mode 100644 Mage.Sets/src/mage/cards/t/TIEStriker.java create mode 100644 Mage.Sets/src/mage/cards/t/ThermalDetonator.java create mode 100644 Mage.Sets/src/mage/cards/t/TobiasBeckett.java create mode 100644 Mage.Sets/src/mage/cards/u/UWing.java create mode 100644 Mage.Sets/src/mage/cards/u/UndergroundForum.java create mode 100644 Mage.Sets/src/mage/cards/u/UpsilonClassShuttle.java create mode 100644 Mage.Sets/src/mage/cards/v/VadersCommand.java create mode 100644 Mage.Sets/src/mage/cards/v/Vulptex.java create mode 100644 Mage/src/main/java/mage/game/command/emblems/LukeSkywalkerEmblem.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/PorgToken.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/TrooperToken2.java create mode 100644 Mage/src/main/java/mage/watchers/common/PlayerLostLifeNonCombatWatcher.java diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml index 8beaf1af44..25ff2d47ef 100644 --- a/Mage.Sets/pom.xml +++ b/Mage.Sets/pom.xml @@ -20,7 +20,8 @@ ${project.groupId} mage - ${mage-version} + 1.4.30 + jar log4j diff --git a/Mage.Sets/src/mage/cards/a/Afterburn.java b/Mage.Sets/src/mage/cards/a/Afterburn.java new file mode 100644 index 0000000000..8747051002 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/Afterburn.java @@ -0,0 +1,47 @@ +package mage.cards.a; + +import java.util.UUID; + +import mage.abilities.Mode; +import mage.abilities.effects.common.RemoveFromCombatTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Afterburn extends CardImpl { + + public Afterburn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); + + + // Choose One - + // Target creature gains haste and first strike until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("Target creature gains haste")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn).setText("and first strike until end of turn")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Remove target creature from combat. + Mode mode = new Mode(); + mode.getEffects().add(new RemoveFromCombatTargetEffect()); + mode.getTargets().add(new TargetCreaturePermanent()); + this.getSpellAbility().addMode(mode); + } + + public Afterburn(final Afterburn card) { + super(card); + } + + @Override + public Afterburn copy() { + return new Afterburn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AstromechDroid.java b/Mage.Sets/src/mage/cards/a/AstromechDroid.java new file mode 100644 index 0000000000..492a15aa25 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AstromechDroid.java @@ -0,0 +1,63 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.RepairAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class AstromechDroid extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("starship creature"); + + static { + filter.add(new SubtypePredicate(SubType.STARSHIP)); + } + + public AstromechDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}"); + + this.subtype.add(SubType.DROID); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // {T}: Target starship creature you control gets +1/+1 and gains vigilance until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(1, 1, Duration.EndOfTurn) + .setText("Target starship creature you control gets +1/+1"), + new TapSourceCost()); + ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn) + .setText("and gains vigilance until end of turn")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // Repair 4 + this.addAbility(new RepairAbility(4)); + } + + public AstromechDroid(final AstromechDroid card) { + super(card); + } + + @Override + public AstromechDroid copy() { + return new AstromechDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BludgeoningPain.java b/Mage.Sets/src/mage/cards/b/BludgeoningPain.java new file mode 100644 index 0000000000..8d23c725ef --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BludgeoningPain.java @@ -0,0 +1,36 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class BludgeoningPain extends CardImpl { + + public BludgeoningPain(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + + // Target creature gets -2/-2 until end of turn. Tap that creature. + this.getSpellAbility().addEffect(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new TapTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public BludgeoningPain(final BludgeoningPain card) { + super(card); + } + + @Override + public BludgeoningPain copy() { + return new BludgeoningPain(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BorGullet.java b/Mage.Sets/src/mage/cards/b/BorGullet.java new file mode 100644 index 0000000000..a19260fa65 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BorGullet.java @@ -0,0 +1,42 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetOpponent; + +/** + * + * @author NinthWorld + */ +public final class BorGullet extends CardImpl { + + public BorGullet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); + + this.subtype.add(SubType.HORROR); + this.subtype.add(SubType.CEPHALID); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Bor Gullet enters the battlefield, target opponent reveals his or her hand. You choose a card from it. That player discards that card. + Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardCardYouChooseTargetEffect()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public BorGullet(final BorGullet card) { + super(card); + } + + @Override + public BorGullet copy() { + return new BorGullet(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CantoBightEnforcer.java b/Mage.Sets/src/mage/cards/c/CantoBightEnforcer.java new file mode 100644 index 0000000000..66559ce80f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CantoBightEnforcer.java @@ -0,0 +1,48 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class CantoBightEnforcer extends CardImpl { + + public CantoBightEnforcer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Canto Bight Enforcer enters the battlefield, you may put a bounty counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, put a +1/+1 counter on Canto Bight Enforcer. + this.addAbility(new BountyAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()))); + } + + public CantoBightEnforcer(final CantoBightEnforcer card) { + super(card); + } + + @Override + public CantoBightEnforcer copy() { + return new CantoBightEnforcer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CantonicaCasino.java b/Mage.Sets/src/mage/cards/c/CantonicaCasino.java new file mode 100644 index 0000000000..4c528b303d --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CantonicaCasino.java @@ -0,0 +1,79 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.RollDiceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author NinthWorld + */ +public final class CantonicaCasino extends CardImpl { + + public CantonicaCasino(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + + // {T}: Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life. + this.addAbility(new SimpleActivatedAbility(new CantonicaCasinoEffect(), new TapSourceCost())); + } + + public CantonicaCasino(final CantonicaCasino card) { + super(card); + } + + @Override + public CantonicaCasino copy() { + return new CantonicaCasino(this); + } +} + +class CantonicaCasinoEffect extends OneShotEffect { + + public CantonicaCasinoEffect() { + super(Outcome.Neutral); + staticText = "Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life"; + } + + public CantonicaCasinoEffect(final CantonicaCasinoEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + if(you != null) { + // Roll two six-sided dice + int dice1 = you.rollDice(game, 6); + int dice2 = you.rollDice(game, 6); + + if(dice1 == dice2) { + // If you roll doubles, gain 10 life + you.gainLife(10, game, source); + return false; + } + else { + // Otherwise, lose 1 life + you.loseLife(1, game, false); + return false; + } + } + return false; + } + + @Override + public CantonicaCasinoEffect copy() { + return new CantonicaCasinoEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CaptainPhasma.java b/Mage.Sets/src/mage/cards/c/CaptainPhasma.java new file mode 100644 index 0000000000..829342d2b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CaptainPhasma.java @@ -0,0 +1,67 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.TrooperToken; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author NinthWorld + */ +public final class CaptainPhasma extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Nontoken trooper creatures"); + private static final FilterCreatureCard filterCard = new FilterCreatureCard("Trooper card"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + filter.add(Predicates.not(new TokenPredicate())); + filterCard.add(new SubtypePredicate(SubType.TROOPER)); + } + + public CaptainPhasma(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Nontoken Trooper creatures you control have "When this creature enters the battlefield, create 1/1/ white Trooper creature token." + Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TrooperToken()) + .setText("When this creature enters the battlefield, create a 1/1 white Trooper creature token"), + false, true); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false))); + + // {W}{U}{B}{R}{G}: Search your library for a Trooper creature card, reveal it, put it into your hand, then shuffle your library. + this.addAbility(new SimpleActivatedAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true), new ManaCostsImpl("{W}{U}{B}{R}{G}"))); + } + + public CaptainPhasma(final CaptainPhasma card) { + super(card); + } + + @Override + public CaptainPhasma copy() { + return new CaptainPhasma(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChewbaccaTheBeast.java b/Mage.Sets/src/mage/cards/c/ChewbaccaTheBeast.java new file mode 100644 index 0000000000..d206feff7e --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChewbaccaTheBeast.java @@ -0,0 +1,60 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.PartnerWithAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherTargetPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.AttackingPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class ChewbaccaTheBeast extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target attacking creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(new AnotherPredicate()); + filter.add(new AttackingPredicate()); + } + + public ChewbaccaTheBeast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.WOOKIEE); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Partner with Han Solo, Scrumrat + this.addAbility(new PartnerWithAbility("Han Solo, Scrumrat")); + + // Whenever Chewbacca, the Beast attacks, another target attacking creature you control gains indestructible until end of turn. + Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ChewbaccaTheBeast(final ChewbaccaTheBeast card) { + super(card); + } + + @Override + public ChewbaccaTheBeast copy() { + return new ChewbaccaTheBeast(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ChirrutImwe.java b/Mage.Sets/src/mage/cards/c/ChirrutImwe.java new file mode 100644 index 0000000000..99140f6827 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChirrutImwe.java @@ -0,0 +1,100 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.PreventCombatDamageToSourceEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author NinthWorld + */ +public final class ChirrutImwe extends CardImpl { + + public ChirrutImwe(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Chirrut Imwe can block up to two additional creatures. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ChirrutImweEffect())); + + // {1}{W}: Prevent all combat damage that would be dealt to Chirrut Imwe until end of turn. + Effect effect = new PreventCombatDamageToSourceEffect(Duration.EndOfTurn); + effect.setText("Prevent all combat damage that would be dealt to {this} until end of turn"); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{W}"))); + } + + public ChirrutImwe(final ChirrutImwe card) { + super(card); + } + + @Override + public ChirrutImwe copy() { + return new ChirrutImwe(this); + } +} + +class ChirrutImweEffect extends ContinuousEffectImpl { + + public ChirrutImweEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "{this} can block up to two additional creatures"; + } + + public ChirrutImweEffect(final ChirrutImweEffect effect) { + super(effect); + } + + @Override + public ChirrutImweEffect copy() { + return new ChirrutImweEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent perm = game.getPermanent(source.getSourceId()); + if(perm != null) { + switch(layer) { + case RulesEffects: + // maxBlocks = 0 equals to "can block any number of creatures" + if(perm.getMaxBlocks() > 0) { + perm.setMaxBlocks(perm.getMaxBlocks() + 2); + } + break; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.RulesEffects; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/c/CodeSlice.java b/Mage.Sets/src/mage/cards/c/CodeSlice.java new file mode 100644 index 0000000000..ca8ae2fa83 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CodeSlice.java @@ -0,0 +1,50 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.abilities.effects.common.combat.CantBlockAllEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.CounterPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class CodeSlice extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Artifact creatures with bounty counters on them"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + filter.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public CodeSlice(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); + + + // Put a bounty counter on target creature. + this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Artifact creatures with bounty counters on them can't block this turn. + this.getSpellAbility().addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn)); + } + + public CodeSlice(final CodeSlice card) { + super(card); + } + + @Override + public CodeSlice copy() { + return new CodeSlice(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/Conscription.java b/Mage.Sets/src/mage/cards/c/Conscription.java new file mode 100644 index 0000000000..103a2d695a --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/Conscription.java @@ -0,0 +1,49 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.abilities.effects.common.continuous.BecomesChosenCreatureTypeTargetEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTypeTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Conscription extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); + } + + public Conscription(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); + + + // Gain control of target creature with power 2 or less. It becomes a Trooper in addition to its other types. + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfGame)); + this.getSpellAbility().addEffect(new BecomesCreatureTypeTargetEffect(Duration.EndOfGame, SubType.TROOPER, false) + .setText("It becomes a Trooper in addition to its other types")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public Conscription(final Conscription card) { + super(card); + } + + @Override + public Conscription copy() { + return new Conscription(this); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CorellianGunship.java b/Mage.Sets/src/mage/cards/c/CorellianGunship.java new file mode 100644 index 0000000000..68e8971002 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CorellianGunship.java @@ -0,0 +1,45 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetPlayerOrPlaneswalker; + +/** + * + * @author NinthWorld + */ +public final class CorellianGunship extends CardImpl { + + public CorellianGunship(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // When Corellian Gunship enters the battlefield, it deals 1 damage to target player or planeswalker. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1)); + ability.addTarget(new TargetPlayerOrPlaneswalker()); + this.addAbility(ability); + } + + public CorellianGunship(final CorellianGunship card) { + super(card); + } + + @Override + public CorellianGunship copy() { + return new CorellianGunship(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DelayTactic.java b/Mage.Sets/src/mage/cards/d/DelayTactic.java new file mode 100644 index 0000000000..0353df6c84 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DelayTactic.java @@ -0,0 +1,91 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author NinthWorld + */ +public final class DelayTactic extends CardImpl { + + public DelayTactic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + + // Choose one - + // Creatures you control gain hexproof until end of turn. + this.getSpellAbility().addEffect(new GainAbilityAllEffect(HexproofAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()) + .setText("Creatures you control gain hexproof until end of turn")); + + // 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()); + this.getSpellAbility().addMode(mode); + } + + public DelayTactic(final DelayTactic card) { + super(card); + } + + @Override + public DelayTactic copy() { + return new DelayTactic(this); + } +} + +// Based on ManaVaporsEffect +class DelayTacticEffect extends OneShotEffect { + + DelayTacticEffect() { + super(Outcome.Benefit); + this.staticText = "Creatures target opponent controls don't untap during his or her next untap step"; + } + + DelayTacticEffect(final DelayTacticEffect effect) { + super(effect); + } + + @Override + public DelayTacticEffect copy() { + return new DelayTacticEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(targetPlayer.getId())); + ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter); + effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); + game.addEffect(effect, source); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/d/Despair.java b/Mage.Sets/src/mage/cards/d/Despair.java new file mode 100644 index 0000000000..70bc420db2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/Despair.java @@ -0,0 +1,36 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.effects.common.SacrificeOpponentsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Despair extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature"); + + public Despair(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}"); + + + // Each opponent sacrifices a creature. + this.getSpellAbility().addEffect(new SacrificeOpponentsEffect(filter)); + } + + public Despair(final Despair card) { + super(card); + } + + @Override + public Despair copy() { + return new Despair(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DirectorKrennic.java b/Mage.Sets/src/mage/cards/d/DirectorKrennic.java new file mode 100644 index 0000000000..2a528a3d21 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DirectorKrennic.java @@ -0,0 +1,60 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SupertypePredicate; +import mage.game.permanent.token.TrooperToken2; +import mage.target.TargetPermanent; + +/** + * + * @author NinthWorld + */ +public final class DirectorKrennic extends CardImpl { + + private static final FilterPermanent filterLand = new FilterPermanent("basic land"); + + static { + filterLand.add(new CardTypePredicate(CardType.LAND)); + filterLand.add(new SupertypePredicate(SuperType.BASIC)); + } + + public DirectorKrennic(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Director Krennic enters the battlefield, create two 1/1 black Trooper creature tokens. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TrooperToken2(), 2))); + + // When Director Krennic leaves the battlefield, destroy target basic land. + Ability ability = new LeavesBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetPermanent(filterLand)); + this.addAbility(ability); + } + + public DirectorKrennic(final DirectorKrennic card) { + super(card); + } + + @Override + public DirectorKrennic copy() { + return new DirectorKrennic(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DroidUprising.java b/Mage.Sets/src/mage/cards/d/DroidUprising.java new file mode 100644 index 0000000000..3657276640 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DroidUprising.java @@ -0,0 +1,46 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.TapAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.permanent.token.DroidToken; + +/** + * + * @author NinthWorld + */ +public final class DroidUprising extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonartifact creatures"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public DroidUprising(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{W}"); + + + // Tap all nonartifact creatures. + this.getSpellAbility().addEffect(new TapAllEffect(filter)); + + // Create two colorless 1/1 Droid artifact creature tokens. + this.getSpellAbility().addEffect(new CreateTokenEffect(new DroidToken(), 2)); + } + + public DroidUprising(final DroidUprising card) { + super(card); + } + + @Override + public DroidUprising copy() { + return new DroidUprising(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DrydenVos.java b/Mage.Sets/src/mage/cards/d/DrydenVos.java new file mode 100644 index 0000000000..f35bcd6b86 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DrydenVos.java @@ -0,0 +1,57 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class DrydenVos extends CardImpl { + + public DrydenVos(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Menace + this.addAbility(new MenaceAbility()); + + // When Dryden Vos enters the battlefield, put a bounty counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, Dryden Vos deals 2 damage to any target. + Ability ability2 = new BountyAbility(new DamageTargetEffect(2)); + ability2.addTarget(new TargetAnyTarget()); + this.addAbility(ability2); + } + + public DrydenVos(final DrydenVos card) { + super(card); + } + + @Override + public DrydenVos copy() { + return new DrydenVos(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EnfysNest.java b/Mage.Sets/src/mage/cards/e/EnfysNest.java new file mode 100644 index 0000000000..0fb3a495b8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EnfysNest.java @@ -0,0 +1,88 @@ +package mage.cards.e; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetOpponentsCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class EnfysNest extends CardImpl { + + public EnfysNest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Whenever Enfys Nest enters the battlefield, you may exile target creature an opponent controls. If you do, that player gains life equal to that creature's power. + Ability ability = new EntersBattlefieldTriggeredAbility(new EnfysNestEffect(), true); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + public EnfysNest(final EnfysNest card) { + super(card); + } + + @Override + public EnfysNest copy() { + return new EnfysNest(this); + } +} + +class EnfysNestEffect extends ExileTargetEffect { + + public EnfysNestEffect() { + super(); + staticText = "you may exile target creature an opponent controls. If you do, that player gains life equal to that creature's power"; + } + + public EnfysNestEffect(final EnfysNestEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); + if(permanent != null) { + // you may exile target creature an opponent controls + if(!super.apply(game, source)) { + return false; + } + + // If you do, that player gains life equal to that creature's power. + Player player = game.getPlayer(permanent.getControllerId()); + player.gainLife(permanent.getPower().getValue(), game, source); + + return true; + } + return false; + } + + @Override + public EnfysNestEffect copy() { + return new EnfysNestEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/f/Fathier.java b/Mage.Sets/src/mage/cards/f/Fathier.java new file mode 100644 index 0000000000..c2efdc0e86 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Fathier.java @@ -0,0 +1,40 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MonstrosityAbility; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author NinthWorld + */ +public final class Fathier extends CardImpl { + + public Fathier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {4}{R}{R}: Monstrosity 2. + this.addAbility(new MonstrosityAbility("{4}{R}{R}", 2)); + } + + public Fathier(final Fathier card) { + super(card); + } + + @Override + public Fathier copy() { + return new Fathier(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/Finn.java b/Mage.Sets/src/mage/cards/f/Finn.java new file mode 100644 index 0000000000..b4429e90ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Finn.java @@ -0,0 +1,59 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Finn extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another nontoken creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(Predicates.not(new TokenPredicate())); + } + + public Finn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Finn or another nontoken creature you control enters the battlefield under your control, you gain 1 life for each nontoken creature you control. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, + new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)) + .setText("you gain 1 life for each nontoken creature you control"), + filter, false)); + } + + public Finn(final Finn card) { + super(card); + } + + @Override + public Finn copy() { + return new Finn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FirstOrderDreadnought.java b/Mage.Sets/src/mage/cards/f/FirstOrderDreadnought.java new file mode 100644 index 0000000000..631141df28 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FirstOrderDreadnought.java @@ -0,0 +1,49 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class FirstOrderDreadnought extends CardImpl { + + public FirstOrderDreadnought(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{B}{B}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // {2}{B}, {T}: Destroy target creature. + Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FirstOrderDreadnought(final FirstOrderDreadnought card) { + super(card); + } + + @Override + public FirstOrderDreadnought copy() { + return new FirstOrderDreadnought(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlameTrooper.java b/Mage.Sets/src/mage/cards/f/FlameTrooper.java new file mode 100644 index 0000000000..1dd4adb8db --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlameTrooper.java @@ -0,0 +1,50 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author NinthWorld + */ +public final class FlameTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public FlameTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have menace. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter, false))); + } + + public FlameTrooper(final FlameTrooper card) { + super(card); + } + + @Override + public FlameTrooper copy() { + return new FlameTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForceProjection.java b/Mage.Sets/src/mage/cards/f/ForceProjection.java new file mode 100644 index 0000000000..a29ec11982 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForceProjection.java @@ -0,0 +1,95 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BecomesTargetTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author NinthWorld + */ +public final class ForceProjection extends CardImpl { + + public ForceProjection(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{U}"); + + + // Create a token that is a copy of target creature you control except that it is an Illusion in addition to its other types and gains "When this creature becomes the target of a spell, sacrifice it." + this.getSpellAbility().addEffect(new ForceProjectionEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + // Scry 2. + this.getSpellAbility().addEffect(new ScryEffect(2)); + } + + public ForceProjection(final ForceProjection card) { + super(card); + } + + @Override + public ForceProjection copy() { + return new ForceProjection(this); + } +} + +class ForceProjectionEffect extends OneShotEffect { + + public ForceProjectionEffect() { + super(Outcome.Copy); + this.staticText = "Create a token that is a copy of target creature you control except that it is an Illusion " + + "in addition to its other types and gains \"When this creature becomes the target of a spell, sacrifice it.\""; + } + + public ForceProjectionEffect(final ForceProjectionEffect effect) { + super(effect); + } + + @Override + public ForceProjectionEffect copy() { + return new ForceProjectionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); + if (controller != null && permanent != null) { + // Create a token that is a copy of target creature + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true); + effect.setTargetPointer(new FixedTarget(permanent, game)); + + // except that it is an Illusion in addition to its other types + effect.setAdditionalSubType(SubType.SPIRIT); + effect.apply(game, source); + + // and gains "When this creature becomes the target of a spell, sacrifice it." + Effect sacrificeEffect = new SacrificeSourceEffect(); + sacrificeEffect.setTargetPointer(new FixedTarget(effect.getAddedPermanent().get(0), game)); + TriggeredAbility ability = new BecomesTargetTriggeredAbility(sacrificeEffect, new FilterSpell()); + game.addTriggeredAbility(ability); + + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForceProtection.java b/Mage.Sets/src/mage/cards/f/ForceProtection.java new file mode 100644 index 0000000000..6220950236 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForceProtection.java @@ -0,0 +1,36 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.GainProtectionFromColorTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class ForceProtection extends CardImpl { + + public ForceProtection(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); + + + // Target creature you control gains protection from color of your choice until end of turn. Scry 1. + this.getSpellAbility().addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ScryEffect(1)); + } + + public ForceProtection(final ForceProtection card) { + super(card); + } + + @Override + public ForceProtection copy() { + return new ForceProtection(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForceStasis.java b/Mage.Sets/src/mage/cards/f/ForceStasis.java new file mode 100644 index 0000000000..ed4e6e25ae --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForceStasis.java @@ -0,0 +1,59 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.Mode; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetSpell; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class ForceStasis extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("instant or sorcery spell you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + filter.add(new CardTypePredicate(CardType.INSTANT)); + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public ForceStasis(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + + // Choose one - + // Tap target creature. It doesn't untap during its controller's next untap step. + getSpellAbility().addEffect(new TapTargetEffect()); + getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect() + .setText("It doesn't untap during its controller's next untap step")); + getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // 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)); + this.getSpellAbility().addMode(mode); + } + + public ForceStasis(final ForceStasis card) { + super(card); + } + + @Override + public ForceStasis copy() { + return new ForceStasis(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/ForceTelepathy.java b/Mage.Sets/src/mage/cards/f/ForceTelepathy.java new file mode 100644 index 0000000000..44c666abf2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/ForceTelepathy.java @@ -0,0 +1,38 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +/** + * + * @author NinthWorld + */ +public final class ForceTelepathy extends CardImpl { + + public ForceTelepathy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U/B}"); + + + // Target player reveals his or her hand. + this.getSpellAbility().addEffect(new RevealHandTargetEffect().setText("Target player reveals his or her hand")); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Scry 2 + this.getSpellAbility().addEffect(new ScryEffect(2)); + } + + public ForceTelepathy(final ForceTelepathy card) { + super(card); + } + + @Override + public ForceTelepathy copy() { + return new ForceTelepathy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GeneralHux.java b/Mage.Sets/src/mage/cards/g/GeneralHux.java new file mode 100644 index 0000000000..ba726cf67a --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GeneralHux.java @@ -0,0 +1,58 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TokenPredicate; + +/** + * + * @author NinthWorld + */ +public final class GeneralHux extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another nontoken creature you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(Predicates.not(new TokenPredicate())); + } + + public GeneralHux(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever General Hux or another nontoken creature enters the battlefield under your control, until end of turn, target creature gains "{B}: This creature gets +1/+1 until end of turn." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}")); + Effect effect = new GainAbilityTargetEffect(ability, Duration.EndOfTurn); + effect.setText("until end of turn, target creature gains \"{B}: This creature gets +1/+1 until end of turn.\""); + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false)); + } + + public GeneralHux(final GeneralHux card) { + super(card); + } + + @Override + public GeneralHux copy() { + return new GeneralHux(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GerrerasRevolutionary.java b/Mage.Sets/src/mage/cards/g/GerrerasRevolutionary.java new file mode 100644 index 0000000000..88de831f12 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GerrerasRevolutionary.java @@ -0,0 +1,37 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksEachCombatStaticAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author NinthWorld + */ +public final class GerrerasRevolutionary extends CardImpl { + + public GerrerasRevolutionary(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.BARABEL); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Gerrera's Revolutionary attacks each turn if able. + this.addAbility(new AttacksEachCombatStaticAbility()); + } + + public GerrerasRevolutionary(final GerrerasRevolutionary card) { + super(card); + } + + @Override + public GerrerasRevolutionary copy() { + return new GerrerasRevolutionary(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HammerheadCorvette.java b/Mage.Sets/src/mage/cards/h/HammerheadCorvette.java new file mode 100644 index 0000000000..4fcedfed34 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HammerheadCorvette.java @@ -0,0 +1,63 @@ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class HammerheadCorvette extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Starship creature defending player controls"); + + static { + filter.add(new SubtypePredicate(SubType.STARSHIP)); + filter.add(new DefendingPlayerControlsPredicate()); + } + + public HammerheadCorvette(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever Hammerhead Corvette attacks, you may untap target Starship creature defending player controls and have that creature block Hammerhead Corvette this turn if able. + Effect effect1 = new UntapTargetEffect(); + Effect effect2 = new MustBeBlockedByTargetSourceEffect(Duration.EndOfTurn); + Ability ability = new AttacksTriggeredAbility(effect1, true, + "Whenever {this} attacks, you may uptap target Starship creature defending player controls and have that creature block {this} this turn if able"); + ability.addEffect(effect2); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public HammerheadCorvette(final HammerheadCorvette card) { + super(card); + } + + @Override + public HammerheadCorvette copy() { + return new HammerheadCorvette(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java b/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java new file mode 100644 index 0000000000..eda1cb0950 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java @@ -0,0 +1,113 @@ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbilities; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.PartnerWithAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class HanSoloScrumrat extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control"); + + static { + filter.add(new AnotherPredicate()); + } + + public HanSoloScrumrat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Partner with Chewbacca, the Beast + this.addAbility(new PartnerWithAbility("Chewbacca, the Beast")); + + // R: Han Solo, Scrumrat gains first strike until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + + // Whenever Han Solo, Scrumrat deals damage during your turn, put a +1/+1 counter on another target creature you control. + Ability ability = new HanSoloScrumratTriggeredAbility(); + ability.addTarget(new TargetControlledCreaturePermanent(filter)); + this.addAbility(ability); + } + + public HanSoloScrumrat(final HanSoloScrumrat card) { + super(card); + } + + @Override + public HanSoloScrumrat copy() { + return new HanSoloScrumrat(this); + } +} + +class HanSoloScrumratTriggeredAbility extends DelayedTriggeredAbility { + + public HanSoloScrumratTriggeredAbility() { + super(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), Duration.EndOfTurn, false); + } + + public HanSoloScrumratTriggeredAbility(final HanSoloScrumratTriggeredAbility ability) { + super(ability); + } + + @Override + public HanSoloScrumratTriggeredAbility copy() { + return new HanSoloScrumratTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + switch(event.getType()) { + case DAMAGED_CREATURE: + case DAMAGED_PLAYER: + case DAMAGED_PLANESWALKER: + return true; + } + return false; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent target = game.getPermanent(this.getFirstTarget()); + if (target != null && event.getSourceId().equals(target.getId()) && MyTurnCondition.instance.apply(game, this)) { + for (Effect effect : this.getEffects()) { + effect.setValue("damage", event.getAmount()); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} creature deals damage during your turn, " + super.getRule(); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/i/ImperialHovertank.java b/Mage.Sets/src/mage/cards/i/ImperialHovertank.java new file mode 100644 index 0000000000..e1160654c2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/ImperialHovertank.java @@ -0,0 +1,84 @@ +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author NinthWorld + */ +public final class ImperialHovertank extends CardImpl { + + public ImperialHovertank(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}{B}"); + + this.subtype.add(SubType.TROOPER); + this.subtype.add(SubType.CONSTRUCT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever a Trooper creature you control attacks, defending player loses 1 life and you gain 1 life. + this.addAbility(new ImperialHovertankTriggeredAbility()); + } + + public ImperialHovertank(final ImperialHovertank card) { + super(card); + } + + @Override + public ImperialHovertank copy() { + return new ImperialHovertank(this); + } +} + +class ImperialHovertankTriggeredAbility extends TriggeredAbilityImpl { + + public ImperialHovertankTriggeredAbility() { + super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1)); + this.addEffect(new GainLifeEffect(1)); + } + + public ImperialHovertankTriggeredAbility(final ImperialHovertankTriggeredAbility ability) { + super(ability); + } + + @Override + public ImperialHovertankTriggeredAbility copy() { + return new ImperialHovertankTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ATTACKER_DECLARED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent source = game.getPermanent(event.getSourceId()); + if (source != null && source.isControlledBy(controllerId) && source.hasSubtype(SubType.TROOPER, game)) { + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(event.getSourceId(), game); + this.getEffects().get(0).setTargetPointer(new FixedTarget(defendingPlayerId)); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever a Trooper creature you control attacks, defending player loses 1 life and you gain 1 life."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/i/Inspire.java b/Mage.Sets/src/mage/cards/i/Inspire.java new file mode 100644 index 0000000000..05aeea299b --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/Inspire.java @@ -0,0 +1,39 @@ +package mage.cards.i; + +import java.util.UUID; + +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Inspire extends CardImpl { + + public Inspire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); + + + // Untap target creature. + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Inspire(final Inspire card) { + super(card); + } + + @Override + public Inspire copy() { + return new Inspire(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JynErsoAndCassianAndor.java b/Mage.Sets/src/mage/cards/j/JynErsoAndCassianAndor.java new file mode 100644 index 0000000000..df0a62ed4b --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JynErsoAndCassianAndor.java @@ -0,0 +1,50 @@ +package mage.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class JynErsoAndCassianAndor extends CardImpl { + + public JynErsoAndCassianAndor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of combat on your turn, target creature gets +1/+0 and gains haste until end of turn. + Ability ability = new BeginningOfCombatTriggeredAbility( + new BoostTargetEffect(1, 0, Duration.EndOfTurn) + .setText("target creature gets +1/+0"), + TargetController.YOU, false); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn) + .setText("and gains haste until end of turn")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public JynErsoAndCassianAndor(final JynErsoAndCassianAndor card) { + super(card); + } + + @Override + public JynErsoAndCassianAndor copy() { + return new JynErsoAndCassianAndor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KalevanStarYacht.java b/Mage.Sets/src/mage/cards/k/KalevanStarYacht.java new file mode 100644 index 0000000000..6886f9d012 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KalevanStarYacht.java @@ -0,0 +1,50 @@ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class KalevanStarYacht extends CardImpl { + + public KalevanStarYacht(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // When Kalevan Star Yacht enters the battlefield, lose 1 life, draw a card, and put a bounty counter on up to one target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(1)); + ability.addEffect(new DrawCardSourceControllerEffect(1)); + ability.addEffect(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability); + } + + public KalevanStarYacht(final KalevanStarYacht card) { + super(card); + } + + @Override + public KalevanStarYacht copy() { + return new KalevanStarYacht(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KyloRen.java b/Mage.Sets/src/mage/cards/k/KyloRen.java new file mode 100644 index 0000000000..19326d1925 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KyloRen.java @@ -0,0 +1,114 @@ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.AttacksEachCombatStaticAbility; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.abilities.dynamicvalue.LockedInDynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.*; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class KyloRen extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); + + static { + filter.add(new DefendingPlayerControlsPredicate()); + } + + public KyloRen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SITH); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Kylo Ren attacks each turn if able. + this.addAbility(new AttacksEachCombatStaticAbility()); + + // Whenever Kylo Ren attacks, it gets +1/+0 for each creature in your graveyard and you may tap target creature defending player controls. + CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE); + Effect effect = new BoostSourceEffect(value, new StaticValue(0), Duration.WhileOnBattlefield); + effect.setText("it gets +1/+0 for each creature in your graveyard"); + Ability ability = new AttacksTriggeredAbility(effect, false); + ability.addEffect(new KyloRenTapTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false)); + this.addAbility(ability); + } + + public KyloRen(final KyloRen card) { + super(card); + } + + @Override + public KyloRen copy() { + return new KyloRen(this); + } +} + +class KyloRenTapTargetEffect extends TapTargetEffect { + + public KyloRenTapTargetEffect() { + super(); + } + + public KyloRenTapTargetEffect(final KyloRenTapTargetEffect effect) { + super(effect); + } + + @Override + public KyloRenTapTargetEffect copy() { + return new KyloRenTapTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + if(player != null && permanent != null) { + if(player.chooseUse(outcome, "Tap target creature defending player controls (" + permanent.getLogName() + ")", source, game)) { + super.apply(game, source); + } + } + return false; + } + + @Override + public String getText(Mode mode) { + return "and you may tap target creature defending player controls"; + } +} diff --git a/Mage.Sets/src/mage/cards/l/LukeSkywalkerTheLastJedi.java b/Mage.Sets/src/mage/cards/l/LukeSkywalkerTheLastJedi.java new file mode 100644 index 0000000000..37f18bdf53 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LukeSkywalkerTheLastJedi.java @@ -0,0 +1,69 @@ +package mage.cards.l; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.command.emblems.LukeSkywalkerEmblem; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class LukeSkywalkerTheLastJedi extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("noncreature permanent"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public LukeSkywalkerTheLastJedi(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.LUKE); + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); + + // +1: Put two +1/+1 counters on up to one target creature. + Ability ability1 = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), 2); + ability1.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability1); + + // -3: Put target noncreature permanent on top of its owner's library. + Ability ability2 = new LoyaltyAbility(new PutOnLibraryTargetEffect(true), -3); + ability2.addTarget(new TargetPermanent(filter)); + this.addAbility(ability2); + + // -6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi. + Ability ability3 = new LoyaltyAbility(new GetEmblemEffect(new LukeSkywalkerEmblem()), -6); + ability3.addEffect(new ExileSourceEffect()); + this.addAbility(ability3); + } + + public LukeSkywalkerTheLastJedi(final LukeSkywalkerTheLastJedi card) { + super(card); + } + + @Override + public LukeSkywalkerTheLastJedi copy() { + return new LukeSkywalkerTheLastJedi(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MaelstromBlockade.java b/Mage.Sets/src/mage/cards/m/MaelstromBlockade.java new file mode 100644 index 0000000000..f846763df6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaelstromBlockade.java @@ -0,0 +1,34 @@ +package mage.cards.m; + +import java.util.UUID; + +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author NinthWorld + */ +public final class MaelstromBlockade extends CardImpl { + + public MaelstromBlockade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W/B}"); + + + // Exile target attacking creature. + this.getSpellAbility().addEffect(new ExileTargetEffect()); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + } + + public MaelstromBlockade(final MaelstromBlockade card) { + super(card); + } + + @Override + public MaelstromBlockade copy() { + return new MaelstromBlockade(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MouseDroid.java b/Mage.Sets/src/mage/cards/m/MouseDroid.java new file mode 100644 index 0000000000..1d911de668 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MouseDroid.java @@ -0,0 +1,41 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.RepairAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author NinthWorld + */ +public final class MouseDroid extends CardImpl { + + public MouseDroid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.DROID); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // When Mouse Droid dies, draw a card. + this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(1))); + + // Repair 3 + this.addAbility(new RepairAbility(3)); + } + + public MouseDroid(final MouseDroid card) { + super(card); + } + + @Override + public MouseDroid copy() { + return new MouseDroid(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MudTrooper.java b/Mage.Sets/src/mage/cards/m/MudTrooper.java new file mode 100644 index 0000000000..0fc2f6d128 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MudTrooper.java @@ -0,0 +1,59 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ColorlessManaCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author NinthWorld + */ +public final class MudTrooper extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Trooper creatures you control"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public MudTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Trooper creatures you control have "2: This creature gets +1/+1 until end of turn." + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(1, 1, Duration.EndOfTurn) + .setText("This creature gets +1/+1 until end of turn"), + new GenericManaCost(2)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false))); + } + + public MudTrooper(final MudTrooper card) { + super(card); + } + + @Override + public MudTrooper copy() { + return new MudTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/Occupation.java b/Mage.Sets/src/mage/cards/o/Occupation.java new file mode 100644 index 0000000000..52e7aeae9d --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/Occupation.java @@ -0,0 +1,193 @@ +package mage.cards.o; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantAttackBlockTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.EntersTheBattlefieldEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.turn.Step; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Occupation extends CardImpl { + + public Occupation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}{B}"); + + + // Creatures your opponents control enter the battlefield tapped. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OccupationTapEffect())); + + // {W}{B}: Target creature can't attack or block this turn, and its activated abilities can't be activated until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new OccupationOneShotEffect("Target creature can't attack or block this turn, and its activated abilities can't be activated until end of turn"), + new ManaCostsImpl("{W}{B}")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Occupation(final Occupation card) { + super(card); + } + + @Override + public Occupation copy() { + return new Occupation(this); + } +} + +class OccupationTapEffect extends ReplacementEffectImpl { + + OccupationTapEffect() { + super(Duration.WhileOnBattlefield, Outcome.Tap); + staticText = "Creatures your opponents control enter the battlefield tapped"; + } + + OccupationTapEffect(final OccupationTapEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Permanent target = ((EntersTheBattlefieldEvent) event).getTarget(); + if (target != null) { + target.setTapped(true); + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget(); + if (permanent != null && permanent.isCreature()) { + return true; + } + } + return false; + } + + @Override + public OccupationTapEffect copy() { + return new OccupationTapEffect(this); + } +} + +class OccupationOneShotEffect extends OneShotEffect { + + public OccupationOneShotEffect() { + super(Outcome.LoseAbility); + } + + public OccupationOneShotEffect(String ruleText) { + super(Outcome.LoseAbility); + staticText = ruleText; + } + + public OccupationOneShotEffect(final OccupationOneShotEffect effect) { + super(effect); + } + + @Override + public OccupationOneShotEffect copy() { + return new OccupationOneShotEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + OccupationRestrictionEffect effect = new OccupationRestrictionEffect(); + game.addEffect(effect, source); + return true; + } +} + +class OccupationRestrictionEffect extends RestrictionEffect { + + public OccupationRestrictionEffect() { + super(Duration.Custom); + staticText = ""; + } + + public OccupationRestrictionEffect(final OccupationRestrictionEffect effect) { + super(effect); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); + } + } + } + + @Override + public boolean isInactive(Ability source, Game game) { + if (game.getPhase().getStep().getType() == PhaseStep.UNTAP + && game.getStep().getStepPart() == Step.StepPart.PRE) { + if (game.isActivePlayer(source.getControllerId()) + || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) { + for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.addInfo("Can't attack or block and its activated abilities can't be activated." + getId(), "", game); + } + } + return true; + } + } + return false; + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (this.targetPointer.getTargets(game, source).contains(permanent.getId())) { + return true; + } + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { + return false; + } + + @Override + public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { + return false; + } + + @Override + public OccupationRestrictionEffect copy() { + return new OccupationRestrictionEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/o/OuterRimGang.java b/Mage.Sets/src/mage/cards/o/OuterRimGang.java new file mode 100644 index 0000000000..ea112908e2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OuterRimGang.java @@ -0,0 +1,49 @@ +package mage.cards.o; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.CounterPredicate; + +/** + * + * @author NinthWorld + */ +public final class OuterRimGang extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature with a bounty counter on it"); + + static { + filter.add(new CounterPredicate(CounterType.BOUNTY)); + } + + public OuterRimGang(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Outer Rim Gang enters the battlefield, each creature with a bounty counter on it gets -2/-2 until end of turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BoostAllEffect(-2, -2, Duration.EndOfTurn, filter, false))); + } + + public OuterRimGang(final OuterRimGang card) { + super(card); + } + + @Override + public OuterRimGang copy() { + return new OuterRimGang(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PoeDameron.java b/Mage.Sets/src/mage/cards/p/PoeDameron.java new file mode 100644 index 0000000000..f0e7d9c6a8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PoeDameron.java @@ -0,0 +1,54 @@ +package mage.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TokenPredicate; + +/** + * + * @author NinthWorld + */ +public final class PoeDameron extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another nontoken creature you control"); + private static final FilterCreaturePermanent filterStarship = new FilterCreaturePermanent("starship creatures you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + filter.add(Predicates.not(new TokenPredicate())); + filterStarship.add(new ControllerPredicate(TargetController.YOU)); + filterStarship.add(new SubtypePredicate(SubType.STARSHIP)); + } + + public PoeDameron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Poe Dameron or another nontoken creature enters the battlefield under your control, starship creatures you control get +1/+1 until end of turn. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.EndOfTurn, filterStarship, false), filter, false)); + } + + public PoeDameron(final PoeDameron card) { + super(card); + } + + @Override + public PoeDameron copy() { + return new PoeDameron(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PorgNest.java b/Mage.Sets/src/mage/cards/p/PorgNest.java new file mode 100644 index 0000000000..d5c0394652 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PorgNest.java @@ -0,0 +1,44 @@ +package mage.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.permanent.token.PorgToken; + +/** + * + * @author NinthWorld + */ +public final class PorgNest extends CardImpl { + + public PorgNest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.BIRD); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // At the beginning of your upkeep, create a 0/1 green Bird creature token named Porg with "{G}: Monstrosity 1." + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new PorgToken()), TargetController.YOU, false)); + } + + public PorgNest(final PorgNest card) { + super(card); + } + + @Override + public PorgNest copy() { + return new PorgNest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PraetorianTrooper.java b/Mage.Sets/src/mage/cards/p/PraetorianTrooper.java new file mode 100644 index 0000000000..0c9bd16aa1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PraetorianTrooper.java @@ -0,0 +1,49 @@ +package mage.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author NinthWorld + */ +public final class PraetorianTrooper extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public PraetorianTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have double strike. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + } + + public PraetorianTrooper(final PraetorianTrooper card) { + super(card); + } + + @Override + public PraetorianTrooper copy() { + return new PraetorianTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RangeTrooper.java b/Mage.Sets/src/mage/cards/r/RangeTrooper.java new file mode 100644 index 0000000000..6dfb18ef5e --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RangeTrooper.java @@ -0,0 +1,92 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author NinthWorld + */ +public final class RangeTrooper extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Trooper creatures you control"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public RangeTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trooper creatures you control have "When this creature enters that battlefield, you may exile target creature. Return that creature to the battlefield at the beginning of the next end step." + Ability ability = new EntersBattlefieldTriggeredAbility(new RangeTrooperEffect(), true, true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, filter, false))); + } + + public RangeTrooper(final RangeTrooper card) { + super(card); + } + + @Override + public RangeTrooper copy() { + return new RangeTrooper(this); + } +} + +class RangeTrooperEffect extends OneShotEffect { + + public RangeTrooperEffect() { + super(Outcome.Detriment); + staticText = "When this creature enters the battlefield, you may exile target creature. Return that creature to the battlefield at the beginning of the next end step"; + } + + public RangeTrooperEffect(final RangeTrooperEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (permanent != null && sourceObject != null) { + if (permanent.moveToExile(source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game)) { + Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(); + effect.setText("Return that card to the battlefield under its owner's control at the beginning of the next end step"); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source); + return true; + } + } + return false; + } + + @Override + public RangeTrooperEffect copy() { + return new RangeTrooperEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/r/Rathtar.java b/Mage.Sets/src/mage/cards/r/Rathtar.java new file mode 100644 index 0000000000..379cb23c4f --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Rathtar.java @@ -0,0 +1,49 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesMonstrousSourceTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Rathtar extends CardImpl { + + public Rathtar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); + + this.subtype.add(SubType.BEAST); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {5}{G}{G}: Monstrosity 2. + this.addAbility(new MonstrosityAbility("{5}{G}{G}", 2)); + + // When Rathtar becomes monstrous, any number of target creatures must block it this turn if able. + Ability ability = new BecomesMonstrousSourceTriggeredAbility( + new BlocksIfAbleTargetEffect(Duration.EndOfTurn).setText("any number of target creatures must block it this turn if able")); + ability.addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + this.addAbility(ability); + } + + public Rathtar(final Rathtar card) { + super(card); + } + + @Override + public Rathtar copy() { + return new Rathtar(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Resistance.java b/Mage.Sets/src/mage/cards/r/Resistance.java new file mode 100644 index 0000000000..b7586d9c95 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Resistance.java @@ -0,0 +1,60 @@ +package mage.cards.r; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.combat.AttacksIfAbleTargetEffect; +import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.AttacksThisTurnMarkerAbility; +import mage.abilities.keyword.BlocksThisTurnMarkerAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Resistance extends CardImpl { + + public Resistance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}"); + + + // Whenever a creature enters the battlefield under your control, Resistance deals 1 damage to each opponent. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), StaticFilters.FILTER_PERMANENT_CREATURE, false)); + + // {R}{W}: Target creature gains haste until end of turn and must attack or block this turn if able. + Ability ability = new SimpleActivatedAbility( + new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn) + .setText("Target creature gains haste until end of turn"), + new ManaCostsImpl("{R}{W}")); + ability.addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn).setText("and must attack")); + //ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "").setText("")); + ability.addEffect(new BlocksIfAbleTargetEffect(Duration.EndOfTurn).setText("or block this turn if able")); + //ability.addEffect(new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "").setText("")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Resistance(final Resistance card) { + super(card); + } + + @Override + public Resistance copy() { + return new Resistance(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/ResistanceBomber.java b/Mage.Sets/src/mage/cards/r/ResistanceBomber.java new file mode 100644 index 0000000000..bcfbc62cf5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ResistanceBomber.java @@ -0,0 +1,60 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.decorator.ConditionalActivatedAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class ResistanceBomber extends CardImpl { + + public ResistanceBomber(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Resistance Bomber enters the battlefield with a charge counter on it. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.CHARGE.createInstance()) + .setText("with a charge counter on it"))); + + // Remove a charge counter from Resistance Bomber: Resistance Bomber deals 5 damage to target creature. Activate this ability only if Resistance Bomber is attacking. + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, + new DamageTargetEffect(5), + new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()), + SourceAttackingCondition.instance); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ResistanceBomber(final ResistanceBomber card) { + super(card); + } + + @Override + public ResistanceBomber copy() { + return new ResistanceBomber(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/Rey.java b/Mage.Sets/src/mage/cards/r/Rey.java new file mode 100644 index 0000000000..042ed7829d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Rey.java @@ -0,0 +1,97 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldOrLeavesSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardsImpl; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author NinthWorld + */ +public final class Rey extends CardImpl { + + public Rey(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever Rey enters or leaves the battlefield, reveal the top card of target player's library. You gain life equal to that card's converted mana cost. + Ability ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new ReyEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public Rey(final Rey card) { + super(card); + } + + @Override + public Rey copy() { + return new Rey(this); + } +} + +class ReyEffect extends OneShotEffect { + + public ReyEffect() { + super(Outcome.Detriment); + staticText = "reveal the top card of target player's library. You gain life equal to that card's converted mana cost"; + } + + public ReyEffect(final ReyEffect effect) { + super(effect); + } + + @Override + public ReyEffect copy() { + return new ReyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if(targetPlayer != null && controller != null) { + if(targetPlayer.getLibrary().hasCards()) { + // reveal the top card of target player's library. + Card topCard = targetPlayer.getLibrary().getFromTop(game); + CardsImpl reveal = new CardsImpl(); + reveal.add(topCard); + targetPlayer.revealCards(source, reveal, game); + + // You gain life equal to that card's converted mana cost. + if (topCard != null) { + controller.gainLife(topCard.getConvertedManaCost(), game, source); + } + } + + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/r/RiotTrooper.java b/Mage.Sets/src/mage/cards/r/RiotTrooper.java new file mode 100644 index 0000000000..47e14b1107 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RiotTrooper.java @@ -0,0 +1,50 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureAllEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author NinthWorld + */ +public final class RiotTrooper extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("trooper creatures you control"); + + static { + filter.add(new SubtypePredicate(SubType.TROOPER)); + } + + public RiotTrooper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.TROOPER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Each trooper creature you control can block an additional creature each combat. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new CanBlockAdditionalCreatureAllEffect(1, filter, Duration.WhileOnBattlefield) + .setText("Each trooper creature you control can block an additional creature each combat"))); + } + + public RiotTrooper(final RiotTrooper card) { + super(card); + } + + @Override + public RiotTrooper copy() { + return new RiotTrooper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SaiTok.java b/Mage.Sets/src/mage/cards/s/SaiTok.java new file mode 100644 index 0000000000..04d1f9daa4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SaiTok.java @@ -0,0 +1,47 @@ +package mage.cards.s; + +import java.util.UUID; + +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlaneswalker; + +/** + * + * @author NinthWorld + */ +public final class SaiTok extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature or planeswalker if it has converted mana cost 4 or less"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + filter.add(new CardTypePredicate(CardType.PLANESWALKER)); + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5)); + } + + public SaiTok(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}"); + + + // Destroy target creature or planeswalker if it has converted mana cost 4 or less. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public SaiTok(final SaiTok card) { + super(card); + } + + @Override + public SaiTok copy() { + return new SaiTok(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SalvageTrader.java b/Mage.Sets/src/mage/cards/s/SalvageTrader.java new file mode 100644 index 0000000000..3412430d50 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SalvageTrader.java @@ -0,0 +1,171 @@ +package mage.cards.s; + +import java.util.*; + +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.ExchangeControlTargetEffect; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterArtifactCard; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetCard; +import mage.target.common.TargetArtifactPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author NinthWorld + */ +public final class SalvageTrader extends CardImpl { + + private static final FilterArtifactPermanent filterYou = new FilterArtifactPermanent("artifact you control"); + + static { + filterYou.add(new ControllerPredicate(TargetController.YOU)); + } + + public SalvageTrader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.CROLUTE); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {T}: Exchange control of target artifact you control and target artifact an opponent controls with the same converted mana cost. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SalvageTraderEffect(), new TapSourceCost()); + ability.addTarget(new TargetArtifactPermanent(filterYou)); + this.addAbility(ability); + } + + public SalvageTrader(final SalvageTrader card) { + super(card); + } + + @Override + public SalvageTrader copy() { + return new SalvageTrader(this); + } +} + +// effect is based on JuxtaposeEffect +// which is based on ExchangeControlTargetEffect +class SalvageTraderEffect extends ContinuousEffectImpl { + + private final Map zoneChangeCounter; + private final Map lockedControllers; + + public SalvageTraderEffect() { + super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + staticText = "Exchange control of target artifact you control and target artifact an opponent controls with the same converted mana cost"; + + this.zoneChangeCounter = new HashMap<>(); + this.lockedControllers = new HashMap<>(); + } + + public SalvageTraderEffect(final SalvageTraderEffect effect) { + super(effect); + + this.zoneChangeCounter = new HashMap<>(effect.zoneChangeCounter); + this.lockedControllers = new HashMap<>(effect.lockedControllers); + } + + @Override + public void init(Ability source, Game game) { + Player you = game.getPlayer(source.getControllerId()); + Permanent permanent1 = game.getPermanent(targetPointer.getFirst(game, source)); + MageObject sourceObject = game.getCard(source.getSourceId()); + + if(you != null && permanent1 != null) { + FilterArtifactCard filterArtifactCard = new FilterArtifactCard(); + filterArtifactCard.add(new ControllerPredicate(TargetController.OPPONENT)); + filterArtifactCard.add(new SpellZonePredicate(Zone.BATTLEFIELD)); + filterArtifactCard.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, permanent1.getConvertedManaCost())); + + FilterArtifactPermanent filterArtifactPermanent = new FilterArtifactPermanent(); + filterArtifactPermanent.add(new ControllerPredicate(TargetController.OPPONENT)); + filterArtifactPermanent.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, permanent1.getConvertedManaCost())); + + Cards cards = new CardsImpl(); + for(Permanent permanent : game.getBattlefield().getAllActivePermanents(filterArtifactPermanent, game)) { + cards.add(permanent); + } + + Player opponent = null; + Permanent permanent2 = null; + TargetCard targetCard = new TargetCard(Zone.BATTLEFIELD, filterArtifactCard); + if(you.choose(Outcome.Benefit, cards, targetCard, game)) { + permanent2 = game.getPermanent(targetCard.getFirstTarget()); + if(permanent2 != null) { + opponent = game.getPlayer(permanent2.getControllerId()); + } + } + + if (opponent != null) { + // exchange works only for two different controllers + if (permanent1.isControlledBy(permanent2.getControllerId())) { + // discard effect if controller of both permanents is the same + discard(); + return; + } + this.lockedControllers.put(permanent1.getId(), permanent2.getControllerId()); + this.zoneChangeCounter.put(permanent1.getId(), permanent1.getZoneChangeCounter(game)); + this.lockedControllers.put(permanent2.getId(), permanent1.getControllerId()); + this.zoneChangeCounter.put(permanent2.getId(), permanent2.getZoneChangeCounter(game)); + + permanent1.changeControllerId(opponent.getId(), game); + permanent2.changeControllerId(you.getId(), game); + game.informPlayers(new StringBuilder(sourceObject != null ? sourceObject.getLogName() : "").append(": ").append(you.getLogName()) + .append(" and ").append(opponent.getLogName()).append(" exchange control of ").append(permanent1.getLogName()) + .append(" and ").append(permanent2.getName()).toString()); + } else { + // discard if there are less than 2 permanents + discard(); + } + } + } + + @Override + public boolean apply(Game game, Ability source) { + Set toDelete = new HashSet<>(); + for (Map.Entry entry : zoneChangeCounter.entrySet()) { + Permanent permanent = game.getPermanent(entry.getKey()); + if (permanent == null || permanent.getZoneChangeCounter(game) != entry.getValue()) { + // control effect cease if the same permanent is no longer on the battlefield + toDelete.add(entry.getKey()); + continue; + } + permanent.changeControllerId(lockedControllers.get(permanent.getId()), game); + } + if (!toDelete.isEmpty()) { + for (UUID uuid : toDelete) { + zoneChangeCounter.remove(uuid); + } + if (zoneChangeCounter.isEmpty()) { + discard(); + return false; + } + } + return true; + } + + @Override + public SalvageTraderEffect copy() { + return new SalvageTraderEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/SinsOfTheFather.java b/Mage.Sets/src/mage/cards/s/SinsOfTheFather.java new file mode 100644 index 0000000000..ecf28eb1c4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SinsOfTheFather.java @@ -0,0 +1,79 @@ +package mage.cards.s; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author NinthWorld + */ +public final class SinsOfTheFather extends CardImpl { + + public SinsOfTheFather(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + + // Exile target player's graveyard. That player loses 1 life for each instant or sorcery card exiled this way. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new SinsOfTheFatherEffect()); + } + + public SinsOfTheFather(final SinsOfTheFather card) { + super(card); + } + + @Override + public SinsOfTheFather copy() { + return new SinsOfTheFather(this); + } +} + +class SinsOfTheFatherEffect extends OneShotEffect { + + private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard(); + + public SinsOfTheFatherEffect() { + super(Outcome.Detriment); + staticText = "Exile target player's graveyard. That player loses 1 life for each instant or sorcery card exiled this way"; + } + + public SinsOfTheFatherEffect(final SinsOfTheFatherEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + if(you != null && targetPlayer != null) { + int exiledCards = 0; + for(Card card : targetPlayer.getGraveyard().getCards(game)) { + if(filter.match(card, game)) { + if(card.moveToExile(null, "", source.getSourceId(), game)) { + exiledCards++; + } + } + } + targetPlayer.loseLife(exiledCards, game, false); + return true; + } + return false; + } + + @Override + public SinsOfTheFatherEffect copy() { + return new SinsOfTheFatherEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java b/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java new file mode 100644 index 0000000000..2dae9ebe81 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java @@ -0,0 +1,156 @@ +package mage.cards.s; + +import java.util.Iterator; +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.PayVariableLoyaltyCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.*; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.Counter; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.players.PlayerList; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.common.PlayerLostLifeNonCombatWatcher; +import mage.watchers.common.PlayerLostLifeWatcher; + +/** + * + * @author NinthWorld + */ +public final class SupremeLeaderSnoke extends CardImpl { + + UUID ability3Id; + + public SupremeLeaderSnoke(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{U}{B}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SNOKE); + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); + + // +1: Put a loyalty counter on Supreme Leader Snoke for each life lost by all opponents from noncombat sources this turn. + Ability ability1 = new LoyaltyAbility(new SupremeLeaderSnokeCounterEffect(CounterType.LOYALTY.createInstance()), 1); + this.addAbility(ability1); + + // -1: Draw a card and lose 1 life. + Ability ability2 = new LoyaltyAbility(new DrawCardSourceControllerEffect(1), -1); + ability2.addEffect(new LoseLifeSourceControllerEffect(1).setText("and lose 1 life")); + this.addAbility(ability2); + + // -X: Gain control of target creature with converted mana cost X. Untap that creature. It gains haste. Sacrifice that creature at the beginning of the next end step. + Ability ability3 = new LoyaltyAbility(new GainControlTargetEffect(Duration.WhileOnBattlefield) + .setText("Gain control of target creature with converted mana cost X")); + ability3.addEffect(new UntapTargetEffect().setText("Untap that creature")); + ability3.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield).setText("It gains haste")); + ability3.addEffect(new GainAbilityTargetEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()), Duration.WhileOnBattlefield) + .setText("Sacrifice that creature at the beginning of the next end step")); + ability3Id = ability2.getOriginalId(); + ability3.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability3); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(ability3Id)) { + int cmc = 0; + for (Cost cost : ability.getCosts()) { + if (cost instanceof PayVariableLoyaltyCost) { + cmc = ((PayVariableLoyaltyCost) cost).getAmount(); + } + } + FilterCreaturePermanent newFilter = StaticFilters.FILTER_PERMANENT_CREATURE.copy(); + newFilter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, cmc)); + ability.getTargets().clear(); + ability.addTarget(new TargetCreaturePermanent(newFilter)); + } + } + + public SupremeLeaderSnoke(final SupremeLeaderSnoke card) { + super(card); + this.ability3Id = card.ability3Id; + } + + @Override + public SupremeLeaderSnoke copy() { + return new SupremeLeaderSnoke(this); + } +} + +class OpponentNoncombatLostLifeCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability source, Effect effect) { + PlayerLostLifeNonCombatWatcher watcher = (PlayerLostLifeNonCombatWatcher) game.getState().getWatchers().get(PlayerLostLifeNonCombatWatcher.class.getSimpleName()); + if(watcher != null) { + return watcher.getAllOppLifeLost(source.getControllerId(), game); + } + return 0; + } + + @Override + public DynamicValue copy() { + return new OpponentNoncombatLostLifeCount(); + } + + @Override + public String getMessage() { + return "life lost by all opponents from noncombat sources this turn"; + } +} + +class SupremeLeaderSnokeCounterEffect extends OneShotEffect { + + protected final Counter counter; + + public SupremeLeaderSnokeCounterEffect(Counter counter) { + super(Outcome.Benefit); + this.counter = counter; + staticText = "Put a loyalty counter on {this} for each life lost by all opponents from noncombat sources this turn"; + } + + public SupremeLeaderSnokeCounterEffect(final SupremeLeaderSnokeCounterEffect effect) { + super(effect); + this.counter = effect.counter; + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if(permanent != null) { + int amount = new OpponentNoncombatLostLifeCount().calculate(game, source, this); + if(amount > 0) { + Counter counterToAdd = counter.copy(); + counterToAdd.add(amount - counter.getCount()); + permanent.addCounters(counterToAdd, source, game); + } + } + return true; + } + + @Override + public SupremeLeaderSnokeCounterEffect copy() { + return new SupremeLeaderSnokeCounterEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/TIESilencer.java b/Mage.Sets/src/mage/cards/t/TIESilencer.java new file mode 100644 index 0000000000..4a5d60d45e --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TIESilencer.java @@ -0,0 +1,89 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class TIESilencer extends CardImpl { + + public TIESilencer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}{R}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever TIE Silencer attacks, it deals 1 damage to defending player and 1 damage to up to one target creature that player controls. + Ability ability = new AttacksTriggeredAbility(new TIESilencerEffect(), false); + ability.addTarget(new TargetCreaturePermanent(0, 1)); + this.addAbility(ability); + } + + public TIESilencer(final TIESilencer card) { + super(card); + } + + @Override + public TIESilencer copy() { + return new TIESilencer(this); + } +} + +class TIESilencerEffect extends OneShotEffect { + + public TIESilencerEffect() { + super(Outcome.Damage); + staticText = "it deals 1 damage to defending player and 1 damage to up to one target creature that player controls"; + } + + public TIESilencerEffect(final TIESilencerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID defender = game.getCombat().getDefendingPlayerId(source.getSourceId(), game); + if(defender != null) { + game.damagePlayerOrPlaneswalker(defender, 1, source.getSourceId(), game, false, true); + + UUID target = source.getTargets().getFirstTarget(); + Permanent permanent = game.getPermanent(target); + if(permanent != null) { + permanent.damage(1, source.getSourceId(), game, false, true); + } + + return true; + } + return false; + } + + public TIESilencerEffect copy() { + return new TIESilencerEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/TIEStriker.java b/Mage.Sets/src/mage/cards/t/TIEStriker.java new file mode 100644 index 0000000000..6d81f390cb --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TIEStriker.java @@ -0,0 +1,36 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author NinthWorld + */ +public final class TIEStriker extends CardImpl { + + public TIEStriker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + } + + public TIEStriker(final TIEStriker card) { + super(card); + } + + @Override + public TIEStriker copy() { + return new TIEStriker(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/ThermalDetonator.java b/Mage.Sets/src/mage/cards/t/ThermalDetonator.java new file mode 100644 index 0000000000..c57818d5ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThermalDetonator.java @@ -0,0 +1,51 @@ +package mage.cards.t; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author NinthWorld + */ +public final class ThermalDetonator extends CardImpl { + + private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("creature without spaceflight or target player"); + + static { + filter.add(Predicates.not(new AbilityPredicate(SpaceflightAbility.class))); + } + + public ThermalDetonator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + + // {2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer(filter)); + this.addAbility(ability); + } + + public ThermalDetonator(final ThermalDetonator card) { + super(card); + } + + @Override + public ThermalDetonator copy() { + return new ThermalDetonator(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TobiasBeckett.java b/Mage.Sets/src/mage/cards/t/TobiasBeckett.java new file mode 100644 index 0000000000..041b8a6e1f --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TobiasBeckett.java @@ -0,0 +1,185 @@ +package mage.cards.t; + +import java.util.Objects; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.*; +import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.BountyAbility; +import mage.cards.Card; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.CounterType; +import mage.game.ExileZone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.ManaPoolItem; +import mage.players.Player; +import mage.target.common.TargetOpponentsCreaturePermanent; +import mage.target.targetpointer.FixedTarget; +import mage.util.CardUtil; + +/** + * + * @author NinthWorld + */ +public final class TobiasBeckett extends CardImpl { + + public TobiasBeckett(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.HUNTER); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Tobias Becket enters the battlefield, put a bounty counter on target creature an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance())); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + + // Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, exile the top card of that player's library. You may cast cards exiled this way and spend mana as though it were mana of any type to cast that spell. + this.addAbility(new BountyAbility(new TobiasBeckettEffect(), false, true)); + } + + public TobiasBeckett(final TobiasBeckett card) { + super(card); + } + + @Override + public TobiasBeckett copy() { + return new TobiasBeckett(this); + } +} + +// Based on GrenzoHavocRaiserEffect +class TobiasBeckettEffect extends OneShotEffect { + + public TobiasBeckettEffect() { + super(Outcome.Exile); + staticText = "exile the top card of that player's library. You may cast cards exiled this way and spend mana as though it were mana of any type to cast that spell"; + } + + public TobiasBeckettEffect(final TobiasBeckettEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent bountyTriggered = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if(bountyTriggered != null) { + Player opponent = game.getPlayer(bountyTriggered.getControllerId()); + if (opponent != null) { + MageObject sourceObject = game.getObject(source.getSourceId()); + UUID exileId = CardUtil.getCardExileZoneId(game, source); + Card card = opponent.getLibrary().getFromTop(game); + if (card != null) { + // move card to exile + controller.moveCardToExileWithInfo(card, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); + // Add effects only if the card has a spellAbility (e.g. not for lands). + if (card.getSpellAbility() != null) { + // allow to cast the card + game.addEffect(new TobiasBeckettCastFromExileEffect(card.getId(), exileId), source); + // and you may spend mana as though it were mana of any color to cast it + ContinuousEffect effect = new TobiasBeckettSpendAnyManaEffect(); + effect.setTargetPointer(new FixedTarget(card.getId())); + game.addEffect(effect, source); + } + } + return true; + } + } + } + return false; + } + + @Override + public TobiasBeckettEffect copy() { + return new TobiasBeckettEffect(this); + } +} + +// Based on GrenzoHavocRaiserCastFromExileEffect +class TobiasBeckettCastFromExileEffect extends AsThoughEffectImpl { + + private UUID cardId; + private UUID exileId; + + public TobiasBeckettCastFromExileEffect(UUID cardId, UUID exileId) { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); + staticText = "You may cast that card and you may spend mana as though it were mana of any color to cast it"; + this.cardId = cardId; + this.exileId = exileId; + } + + public TobiasBeckettCastFromExileEffect(final TobiasBeckettCastFromExileEffect effect) { + super(effect); + this.cardId = effect.cardId; + this.exileId = effect.exileId; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public TobiasBeckettCastFromExileEffect copy() { + return new TobiasBeckettCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + if (sourceId.equals(cardId) && source.isControlledBy(affectedControllerId)) { + ExileZone exileZone = game.getState().getExile().getExileZone(exileId); + return exileZone != null && exileZone.contains(cardId); + } + return false; + } +} + +// Based on GrenzoHavocRaiserSpendAnyManaEffect +class TobiasBeckettSpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect { + + public TobiasBeckettSpendAnyManaEffect() { + super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.EndOfTurn, Outcome.Benefit); + staticText = "you may spend mana as though it were mana of any color to cast it"; + } + + public TobiasBeckettSpendAnyManaEffect(final TobiasBeckettSpendAnyManaEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public TobiasBeckettSpendAnyManaEffect copy() { + return new TobiasBeckettSpendAnyManaEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return source.isControlledBy(affectedControllerId) + && Objects.equals(objectId, ((FixedTarget) getTargetPointer()).getTarget()) + && ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1 == game.getState().getZoneChangeCounter(objectId) + && (((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1 == game.getState().getZoneChangeCounter(objectId)) + && game.getState().getZone(objectId) == Zone.STACK; + } + + @Override + public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) { + return mana.getFirstAvailable(); + } + +} diff --git a/Mage.Sets/src/mage/cards/u/UWing.java b/Mage.Sets/src/mage/cards/u/UWing.java new file mode 100644 index 0000000000..8496ec7d27 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UWing.java @@ -0,0 +1,73 @@ +package mage.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author NinthWorld + */ +public final class UWing extends CardImpl { + + public UWing(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // As long as U-Wing is tapped, it gets +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), + SourceTappedCondition.instance, + "As long as {this} is tapped, it gets +1/+0"))); + + // As long as U-Wing is untapped, it gets +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(0, 1, Duration.WhileOnBattlefield), + SourceUntappedCondition.instance, + "As long as {this} is untapped, it gets +0/+1"))); + } + + public UWing(final UWing card) { + super(card); + } + + @Override + public UWing copy() { + return new UWing(this); + } +} + +enum SourceUntappedCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + if (permanent != null) { + return !permanent.isTapped(); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/u/UndergroundForum.java b/Mage.Sets/src/mage/cards/u/UndergroundForum.java new file mode 100644 index 0000000000..f079faedc1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UndergroundForum.java @@ -0,0 +1,62 @@ +package mage.cards.u; + +import java.util.UUID; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ColorlessManaCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.effects.mana.AddManaChosenColorEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.ConditionalColoredManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class UndergroundForum extends CardImpl { + + public UndergroundForum(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + + // T: Add {1}. + this.addAbility(new ColorlessManaAbility()); + + // {1}, {T}: Add {B}, {R}, or {G}. + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.BlackMana(1), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(1), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(1), new GenericManaCost(1)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {2}, {T}: Put a bounty counter on target creature. + Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), new GenericManaCost(2)); + ability2.addCost(new TapSourceCost()); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability2); + } + + public UndergroundForum(final UndergroundForum card) { + super(card); + } + + @Override + public UndergroundForum copy() { + return new UndergroundForum(this); + } +} diff --git a/Mage.Sets/src/mage/cards/u/UpsilonClassShuttle.java b/Mage.Sets/src/mage/cards/u/UpsilonClassShuttle.java new file mode 100644 index 0000000000..1fc560a584 --- /dev/null +++ b/Mage.Sets/src/mage/cards/u/UpsilonClassShuttle.java @@ -0,0 +1,50 @@ +package mage.cards.u; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.SpaceflightAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class UpsilonClassShuttle extends CardImpl { + + public UpsilonClassShuttle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}"); + + this.subtype.add(SubType.STARSHIP); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Spaceflight + this.addAbility(SpaceflightAbility.getInstance()); + + // Whenever Upsilon-class Shuttle attacks, target creature you control gains spaceflight until end of turn. + Ability ability = new AttacksTriggeredAbility( + new GainAbilityTargetEffect(SpaceflightAbility.getInstance(), Duration.EndOfTurn) + .setText("target creature you control gains spaceflight until end of turn"), + false); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public UpsilonClassShuttle(final UpsilonClassShuttle card) { + super(card); + } + + @Override + public UpsilonClassShuttle copy() { + return new UpsilonClassShuttle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VadersCommand.java b/Mage.Sets/src/mage/cards/v/VadersCommand.java new file mode 100644 index 0000000000..d9facdc1ba --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VadersCommand.java @@ -0,0 +1,74 @@ +package mage.cards.v; + +import java.util.UUID; + +import mage.abilities.Mode; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; +import mage.target.TargetSpell; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class VadersCommand extends CardImpl { + + private static final FilterPermanent filterPlaneswalker = new FilterPermanent("planeswalker"); + private static final FilterCreaturePermanent filterNonArtifact = new FilterCreaturePermanent("nonartifact creature"); + + static { + filterPlaneswalker.add(new CardTypePredicate(CardType.PLANESWALKER)); + filterNonArtifact.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT))); + } + + public VadersCommand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + + + // Choose two - + this.getSpellAbility().getModes().setMinModes(2); + this.getSpellAbility().getModes().setMaxModes(2); + + // Counter target spell unless its controller pays 5 life. + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new PayLifeCost(5)) + .setText("Counter target spell unless its controller pays 5 life")); + this.getSpellAbility().addTarget(new TargetSpell()); + + // Destroy target planeswalker. + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetPermanent(filterPlaneswalker)); + this.getSpellAbility().addMode(mode); + + // Destroy target nonartifact creature. + mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetCreaturePermanent(filterNonArtifact)); + this.getSpellAbility().addMode(mode); + + // Gain 5 life. + mode = new Mode(); + mode.getEffects().add(new GainLifeEffect(5).setText("Gain 5 life")); + this.getSpellAbility().addMode(mode); + } + + public VadersCommand(final VadersCommand card) { + super(card); + } + + @Override + public VadersCommand copy() { + return new VadersCommand(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/Vulptex.java b/Mage.Sets/src/mage/cards/v/Vulptex.java new file mode 100644 index 0000000000..1c8bcb5c61 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/Vulptex.java @@ -0,0 +1,42 @@ +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author NinthWorld + */ +public final class Vulptex extends CardImpl { + + public Vulptex(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.FOX); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Vulptex enters the battlefield, put a +1/+1 counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public Vulptex(final Vulptex card) { + super(card); + } + + @Override + public Vulptex copy() { + return new Vulptex(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StarWars.java b/Mage.Sets/src/mage/sets/StarWars.java index 639afc2c3b..bab95291ae 100644 --- a/Mage.Sets/src/mage/sets/StarWars.java +++ b/Mage.Sets/src/mage/sets/StarWars.java @@ -35,6 +35,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Acquire Target", 65, Rarity.COMMON, mage.cards.a.AcquireTarget.class)); cards.add(new SetCardInfo("Admiral Ackbar", 35, Rarity.RARE, mage.cards.a.AdmiralAckbar.class)); cards.add(new SetCardInfo("Adroit Hateflayer", 162, Rarity.COMMON, mage.cards.a.AdroitHateflayer.class)); + cards.add(new SetCardInfo("Afterburn", 600, Rarity.COMMON, mage.cards.a.Afterburn.class)); cards.add(new SetCardInfo("Anakin Skywalker", 163, Rarity.MYTHIC, mage.cards.a.AnakinSkywalker.class)); cards.add(new SetCardInfo("Ancient Holocron", 230, Rarity.UNCOMMON, mage.cards.a.AncientHolocron.class)); cards.add(new SetCardInfo("Aqualish Bounty Hunter", 66, Rarity.COMMON, mage.cards.a.AqualishBountyHunter.class)); @@ -42,6 +43,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Arrest", 2, Rarity.COMMON, mage.cards.a.Arrest.class)); cards.add(new SetCardInfo("Asajj Ventress", 164, Rarity.RARE, mage.cards.a.AsajjVentress.class)); cards.add(new SetCardInfo("AT-ST", 128, Rarity.RARE, mage.cards.a.ATST.class)); + cards.add(new SetCardInfo("Astromech Droid", 400, Rarity.COMMON, mage.cards.a.AstromechDroid.class)); cards.add(new SetCardInfo("Aurra Sing, Bane of Jedi", 165, Rarity.MYTHIC, mage.cards.a.AurraSingBaneOfJedi.class)); cards.add(new SetCardInfo("Bantha Herd", 3, Rarity.RARE, mage.cards.b.BanthaHerd.class)); cards.add(new SetCardInfo("Bathe in Bacta", 129, Rarity.COMMON, mage.cards.b.BatheInBacta.class)); @@ -49,7 +51,10 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Bib Fortuna", 68, Rarity.RARE, mage.cards.b.BibFortuna.class)); cards.add(new SetCardInfo("Black Market Dealer", 69, Rarity.UNCOMMON, mage.cards.b.BlackMarketDealer.class)); cards.add(new SetCardInfo("Blind Worship", 166, Rarity.RARE, mage.cards.b.BlindWorship.class)); + cards.add(new SetCardInfo("Bludgeoning Pain", 300, Rarity.COMMON, mage.cards.b.BludgeoningPain.class)); + cards.add(new SetCardInfo("Buried Ruin", 401, Rarity.COMMON, mage.cards.b.BuriedRuin.class)); cards.add(new SetCardInfo("Boba Fett", 167, Rarity.MYTHIC, mage.cards.b.BobaFett.class)); + cards.add(new SetCardInfo("Bor Gullet", 301, Rarity.UNCOMMON, mage.cards.b.BorGullet.class)); cards.add(new SetCardInfo("Bossk", 131, Rarity.RARE, mage.cards.b.Bossk.class)); cards.add(new SetCardInfo("Bounty Collector", 132, Rarity.UNCOMMON, mage.cards.b.BountyCollector.class)); cards.add(new SetCardInfo("Bounty Sniper", 98, Rarity.UNCOMMON, mage.cards.b.BountySniper.class)); @@ -57,14 +62,22 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Bull Rancor", 168, Rarity.RARE, mage.cards.b.BullRancor.class)); cards.add(new SetCardInfo("C-3PO and R2D2", 169, Rarity.RARE, mage.cards.c.C3POAndR2D2.class)); cards.add(new SetCardInfo("Cantina Band", 6, Rarity.COMMON, mage.cards.c.CantinaBand.class)); + cards.add(new SetCardInfo("Canto Bight Enforcer", 500, Rarity.UNCOMMON, mage.cards.c.CantoBightEnforcer.class)); + cards.add(new SetCardInfo("Cantonica Casino", 501, Rarity.RARE, mage.cards.c.CantonicaCasino.class)); + cards.add(new SetCardInfo("Captain Phasma", 502, Rarity.RARE, mage.cards.c.CaptainPhasma.class)); cards.add(new SetCardInfo("Capture", 99, Rarity.COMMON, mage.cards.c.Capture.class)); cards.add(new SetCardInfo("Carbonite Chamber", 170, Rarity.UNCOMMON, mage.cards.c.CarboniteChamber.class)); cards.add(new SetCardInfo("Chewbacca", 171, Rarity.RARE, mage.cards.c.Chewbacca.class)); + cards.add(new SetCardInfo("Chewbacca, the Beast", 601, Rarity.RARE, mage.cards.c.ChewbaccaTheBeast.class)); cards.add(new SetCardInfo("Chief Chirpa", 172, Rarity.RARE, mage.cards.c.ChiefChirpa.class)); + cards.add(new SetCardInfo("Chirrut Imwe", 302, Rarity.RARE, mage.cards.c.ChirrutImwe.class)); cards.add(new SetCardInfo("Cloaking Device", 38, Rarity.COMMON, mage.cards.c.CloakingDevice.class)); + cards.add(new SetCardInfo("Code Slice", 503, Rarity.COMMON, mage.cards.c.CodeSlice.class)); cards.add(new SetCardInfo("Commander Cody", 173, Rarity.RARE, mage.cards.c.CommanderCody.class)); cards.add(new SetCardInfo("Condemn", 7, Rarity.UNCOMMON, mage.cards.c.Condemn.class)); + cards.add(new SetCardInfo("Conscription", 602, Rarity.UNCOMMON, mage.cards.c.Conscription.class)); cards.add(new SetCardInfo("Corellian Corvette", 133, Rarity.UNCOMMON, mage.cards.c.CorellianCorvette.class)); + cards.add(new SetCardInfo("Corellian Gunship", 603, Rarity.COMMON, mage.cards.c.CorellianGunship.class)); cards.add(new SetCardInfo("Crossfire", 100, Rarity.COMMON, mage.cards.c.Crossfire.class)); cards.add(new SetCardInfo("Cruelty of the Sith", 174, Rarity.UNCOMMON, mage.cards.c.CrueltyOfTheSith.class)); cards.add(new SetCardInfo("Cunning Abduction", 175, Rarity.RARE, mage.cards.c.CunningAbduction.class)); @@ -77,21 +90,31 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Darth Tyranus", 180, Rarity.MYTHIC, mage.cards.d.DarthTyranus.class)); cards.add(new SetCardInfo("Darth Vader", 140, Rarity.MYTHIC, mage.cards.d.DarthVader.class)); cards.add(new SetCardInfo("Death Trooper", 71, Rarity.UNCOMMON, mage.cards.d.DeathTrooper.class)); + cards.add(new SetCardInfo("Delay Tactic", 504, Rarity.COMMON, mage.cards.d.DelayTactic.class)); cards.add(new SetCardInfo("Deploy The Troops", 8, Rarity.UNCOMMON, mage.cards.d.DeployTheTroops.class)); + cards.add(new SetCardInfo("Despair", 604, Rarity.UNCOMMON, mage.cards.d.Despair.class)); + cards.add(new SetCardInfo("Director Krennic", 303, Rarity.RARE, mage.cards.d.DirectorKrennic.class)); cards.add(new SetCardInfo("Doom Blade", 72, Rarity.UNCOMMON, mage.cards.d.DoomBlade.class)); cards.add(new SetCardInfo("Droid Commando", 73, Rarity.COMMON, mage.cards.d.DroidCommando.class)); cards.add(new SetCardInfo("Droid Factory", 239, Rarity.COMMON, mage.cards.d.DroidFactory.class)); cards.add(new SetCardInfo("Droid Foundry", 240, Rarity.UNCOMMON, mage.cards.d.DroidFoundry.class)); + cards.add(new SetCardInfo("Droid Uprising", 605, Rarity.UNCOMMON, mage.cards.d.DroidUprising.class)); cards.add(new SetCardInfo("Droideka", 9, Rarity.UNCOMMON, mage.cards.d.Droideka.class)); cards.add(new SetCardInfo("Drone Holocron", 232, Rarity.COMMON, mage.cards.d.DroneHolocron.class)); + cards.add(new SetCardInfo("Dryden Vos", 606, Rarity.RARE, mage.cards.d.DrydenVos.class)); cards.add(new SetCardInfo("Echo Base Commando", 181, Rarity.RARE, mage.cards.e.EchoBaseCommando.class)); cards.add(new SetCardInfo("EMP Blast", 10, Rarity.UNCOMMON, mage.cards.e.EMPBlast.class)); + cards.add(new SetCardInfo("Enfys Nest", 607, Rarity.MYTHIC, mage.cards.e.EnfysNest.class)); cards.add(new SetCardInfo("Escape Pod", 11, Rarity.COMMON, mage.cards.e.EscapePod.class)); cards.add(new SetCardInfo("Ewok Ambush", 134, Rarity.COMMON, mage.cards.e.EwokAmbush.class)); cards.add(new SetCardInfo("Ewok Firedancers", 135, Rarity.COMMON, mage.cards.e.EwokFiredancers.class)); cards.add(new SetCardInfo("Ewok Village", 241, Rarity.UNCOMMON, mage.cards.e.EwokVillage.class)); cards.add(new SetCardInfo("Exogorth", 136, Rarity.RARE, mage.cards.e.Exogorth.class)); + cards.add(new SetCardInfo("Fathier", 505, Rarity.COMMON, mage.cards.f.Fathier.class)); cards.add(new SetCardInfo("Ferocity of the Underworld", 182, Rarity.UNCOMMON, mage.cards.f.FerocityOfTheUnderworld.class)); + cards.add(new SetCardInfo("Finn", 402, Rarity.UNCOMMON, mage.cards.f.Finn.class)); + cards.add(new SetCardInfo("First Order Dreadnought", 506, Rarity.MYTHIC, mage.cards.f.FirstOrderDreadnought.class)); + cards.add(new SetCardInfo("Flame Trooper", 403, Rarity.COMMON, mage.cards.f.FlameTrooper.class)); cards.add(new SetCardInfo("Flames of Remembrance", 102, Rarity.RARE, mage.cards.f.FlamesOfRemembrance.class)); cards.add(new SetCardInfo("Force Choke", 183, Rarity.COMMON, mage.cards.f.ForceChoke.class)); cards.add(new SetCardInfo("Force Denial", 39, Rarity.COMMON, mage.cards.f.ForceDenial.class)); @@ -99,25 +122,35 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Force Healing", 12, Rarity.COMMON, mage.cards.f.ForceHealing.class)); cards.add(new SetCardInfo("Force Lightning", 103, Rarity.RARE, mage.cards.f.ForceLightning.class)); cards.add(new SetCardInfo("Force Mastery", 184, Rarity.RARE, mage.cards.f.ForceMastery.class)); + cards.add(new SetCardInfo("Force Projection", 507, Rarity.RARE, mage.cards.f.ForceProjection.class)); + cards.add(new SetCardInfo("Force Protection", 304, Rarity.COMMON, mage.cards.f.ForceProtection.class)); cards.add(new SetCardInfo("Force Pull", 137, Rarity.COMMON, mage.cards.f.ForcePull.class)); cards.add(new SetCardInfo("Force Push", 40, Rarity.UNCOMMON, mage.cards.f.ForcePush.class)); cards.add(new SetCardInfo("Force Reflex", 13, Rarity.COMMON, mage.cards.f.ForceReflex.class)); cards.add(new SetCardInfo("Force Scream", 104, Rarity.UNCOMMON, mage.cards.f.ForceScream.class)); cards.add(new SetCardInfo("Force Spark", 105, Rarity.COMMON, mage.cards.f.ForceSpark.class)); + cards.add(new SetCardInfo("Force Stasis", 404, Rarity.COMMON, mage.cards.f.ForceStasis.class)); + cards.add(new SetCardInfo("Force Telepathy", 508, Rarity.COMMON, mage.cards.f.ForceTelepathy.class)); cards.add(new SetCardInfo("Forest", "268a", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Forest", "268b", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Forest", "268c", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Forest", "268d", Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Fulfill Contract", 224, Rarity.COMMON, mage.cards.f.FulfillContract.class)); + cards.add(new SetCardInfo("Gamble", 608, Rarity.RARE, mage.cards.g.Gamble.class)); cards.add(new SetCardInfo("Gamorrean Prison Guard", 106, Rarity.UNCOMMON, mage.cards.g.GamorreanPrisonGuard.class)); cards.add(new SetCardInfo("General Grievous", 185, Rarity.MYTHIC, mage.cards.g.GeneralGrievous.class)); + cards.add(new SetCardInfo("General Hux", 405, Rarity.UNCOMMON, mage.cards.g.GeneralHux.class)); + cards.add(new SetCardInfo("Gerrera's Revolutionary", 305, Rarity.COMMON, mage.cards.g.GerrerasRevolutionary.class)); cards.add(new SetCardInfo("Gifted Initiate", 14, Rarity.COMMON, mage.cards.g.GiftedInitiate.class)); + cards.add(new SetCardInfo("Glorious Charge", 509, Rarity.COMMON, mage.cards.g.GloriousCharge.class)); cards.add(new SetCardInfo("Grand Moff Tarkin", 75, Rarity.RARE, mage.cards.g.GrandMoffTarkin.class)); cards.add(new SetCardInfo("Greater Krayt Dragon", 186, Rarity.MYTHIC, mage.cards.g.GreaterKraytDragon.class)); cards.add(new SetCardInfo("Greedo", 187, Rarity.RARE, mage.cards.g.Greedo.class)); cards.add(new SetCardInfo("Gundark", 107, Rarity.UNCOMMON, mage.cards.g.Gundark.class)); cards.add(new SetCardInfo("Gungan Captain", 41, Rarity.COMMON, mage.cards.g.GunganCaptain.class)); + cards.add(new SetCardInfo("Hammerhead Corvette", 306, Rarity.UNCOMMON, mage.cards.h.HammerheadCorvette.class)); cards.add(new SetCardInfo("Han Solo", 108, Rarity.RARE, mage.cards.h.HanSolo.class)); + cards.add(new SetCardInfo("Han Solo, Scrumrat", 609, Rarity.RARE, mage.cards.h.HanSoloScrumrat.class)); cards.add(new SetCardInfo("Hazard Trooper", 76, Rarity.UNCOMMON, mage.cards.h.HazardTrooper.class)); cards.add(new SetCardInfo("Head Hunting", 77, Rarity.COMMON, mage.cards.h.HeadHunting.class)); cards.add(new SetCardInfo("Heavy Trooper", 78, Rarity.COMMON, mage.cards.h.HeavyTrooper.class)); @@ -129,8 +162,10 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("IG-88B", 79, Rarity.RARE, mage.cards.i.IG88B.class)); cards.add(new SetCardInfo("Images of the Past", 190, Rarity.COMMON, mage.cards.i.ImagesOfThePast.class)); cards.add(new SetCardInfo("Imperial Gunner", 109, Rarity.COMMON, mage.cards.i.ImperialGunner.class)); + cards.add(new SetCardInfo("Imperial Hovertank", 307, Rarity.UNCOMMON, mage.cards.i.ImperialHovertank.class)); cards.add(new SetCardInfo("Impulsive Wager", 110, Rarity.COMMON, mage.cards.i.ImpulsiveWager.class)); cards.add(new SetCardInfo("Insatiable Rakghoul", 80, Rarity.COMMON, mage.cards.i.InsatiableRakghoul.class)); + cards.add(new SetCardInfo("Inspire", 510, Rarity.COMMON, mage.cards.i.Inspire.class)); cards.add(new SetCardInfo("Interrogation", 81, Rarity.COMMON, mage.cards.i.Interrogation.class)); cards.add(new SetCardInfo("Ion Cannon", 15, Rarity.COMMON, mage.cards.i.IonCannon.class)); cards.add(new SetCardInfo("Iron Fist of the Empire", 191, Rarity.RARE, mage.cards.i.IronFistOfTheEmpire.class)); @@ -158,8 +193,11 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Jedi Training", 45, Rarity.UNCOMMON, mage.cards.j.JediTraining.class)); cards.add(new SetCardInfo("Jump Trooper", 46, Rarity.UNCOMMON, mage.cards.j.JumpTrooper.class)); cards.add(new SetCardInfo("Jungle Village", 245, Rarity.UNCOMMON, mage.cards.j.JungleVillage.class)); + cards.add(new SetCardInfo("Jyn Erso and Cassian Andor", 308, Rarity.RARE, mage.cards.j.JynErsoAndCassianAndor.class)); + cards.add(new SetCardInfo("Kalevan Star Yacht", 610, Rarity.UNCOMMON, mage.cards.k.KalevanStarYacht.class)); cards.add(new SetCardInfo("Kamino Cloning Facility", 246, Rarity.RARE, mage.cards.k.KaminoCloningFacility.class)); cards.add(new SetCardInfo("Ki-Adi-Mundi", 142, Rarity.RARE, mage.cards.k.KiAdiMundi.class)); + cards.add(new SetCardInfo("Kylo Ren", 406, Rarity.MYTHIC, mage.cards.k.KyloRen.class)); cards.add(new SetCardInfo("LAAT Gunship", 20, Rarity.UNCOMMON, mage.cards.l.LAATGunship.class)); cards.add(new SetCardInfo("Lando Calrissian", 21, Rarity.RARE, mage.cards.l.LandoCalrissian.class)); cards.add(new SetCardInfo("Legacy of the Beloved", 143, Rarity.RARE, mage.cards.l.LegacyOfTheBeloved.class)); @@ -167,7 +205,9 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Lightsaber", 234, Rarity.COMMON, mage.cards.l.Lightsaber.class)); cards.add(new SetCardInfo("Loyal Tauntaun", 22, Rarity.COMMON, mage.cards.l.LoyalTauntaun.class)); cards.add(new SetCardInfo("Luke Skywalker", 195, Rarity.MYTHIC, mage.cards.l.LukeSkywalker.class)); + cards.add(new SetCardInfo("Luke Skywalker, the Last Jedi", 511, Rarity.MYTHIC, mage.cards.l.LukeSkywalkerTheLastJedi.class)); cards.add(new SetCardInfo("Mace Windu", 47, Rarity.RARE, mage.cards.m.MaceWindu.class)); + cards.add(new SetCardInfo("Maelstrom Blockade", 611, Rarity.COMMON, mage.cards.m.MaelstromBlockade.class)); cards.add(new SetCardInfo("Maintenance Droid", 196, Rarity.COMMON, mage.cards.m.MaintenanceDroid.class)); cards.add(new SetCardInfo("Maintenance Hangar", 23, Rarity.RARE, mage.cards.m.MaintenanceHangar.class)); cards.add(new SetCardInfo("Mantellian Savrip", 144, Rarity.UNCOMMON, mage.cards.m.MantellianSavrip.class)); @@ -183,6 +223,8 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Mountain", "264b", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Mountain", "264c", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Mountain", "264d", Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); + cards.add(new SetCardInfo("Mouse Droid", 512, Rarity.COMMON, mage.cards.m.MouseDroid.class)); + cards.add(new SetCardInfo("Mud Trooper", 612, Rarity.UNCOMMON, mage.cards.m.MudTrooper.class)); cards.add(new SetCardInfo("N-1 Starfighter", 225, Rarity.COMMON, mage.cards.n.N1Starfighter.class)); cards.add(new SetCardInfo("Nebulon-B Frigate", 25, Rarity.COMMON, mage.cards.n.NebulonBFrigate.class)); cards.add(new SetCardInfo("Neophyte Hateflayer", 82, Rarity.COMMON, mage.cards.n.NeophyteHateflayer.class)); @@ -193,10 +235,12 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Novice Bounty Hunter", 114, Rarity.COMMON, mage.cards.n.NoviceBountyHunter.class)); cards.add(new SetCardInfo("Nute Gunray", 199, Rarity.RARE, mage.cards.n.NuteGunray.class)); cards.add(new SetCardInfo("Obi-Wan Kenobi", 200, Rarity.MYTHIC, mage.cards.o.ObiWanKenobi.class)); + cards.add(new SetCardInfo("Occupation", 309, Rarity.UNCOMMON, mage.cards.o.Occupation.class)); cards.add(new SetCardInfo("Open Season", 83, Rarity.UNCOMMON, mage.cards.o.OpenSeason.class)); cards.add(new SetCardInfo("Orbital Bombardment", 26, Rarity.RARE, mage.cards.o.OrbitalBombardment.class)); cards.add(new SetCardInfo("Order 66", 84, Rarity.RARE, mage.cards.o.Order66.class)); cards.add(new SetCardInfo("Ortolan Keyboardist", 50, Rarity.COMMON, mage.cards.o.OrtolanKeyboardist.class)); + cards.add(new SetCardInfo("Outer Rim Gang", 407, Rarity.COMMON, mage.cards.o.OuterRimGang.class)); cards.add(new SetCardInfo("Outer Rim Slaver", 201, Rarity.COMMON, mage.cards.o.OuterRimSlaver.class)); cards.add(new SetCardInfo("Outlaw Holocron", 235, Rarity.COMMON, mage.cards.o.OutlawHolocron.class)); cards.add(new SetCardInfo("Personal Energy Shield", 51, Rarity.COMMON, mage.cards.p.PersonalEnergyShield.class)); @@ -205,6 +249,9 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Plains", "252c", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Plains", "252d", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Plo Koon", 27, Rarity.RARE, mage.cards.p.PloKoon.class)); + cards.add(new SetCardInfo("Poe Dameron", 408, Rarity.UNCOMMON, mage.cards.p.PoeDameron.class)); + cards.add(new SetCardInfo("Porg Nest", 513, Rarity.UNCOMMON, mage.cards.p.PorgNest.class)); + cards.add(new SetCardInfo("Praetorian Trooper", 514, Rarity.RARE, mage.cards.p.PraetorianTrooper.class)); cards.add(new SetCardInfo("Precipice of Mortis", 202, Rarity.RARE, mage.cards.p.PrecipiceOfMortis.class)); cards.add(new SetCardInfo("Predator's Strike", 151, Rarity.COMMON, mage.cards.p.PredatorsStrike.class)); cards.add(new SetCardInfo("Preordain", 34, Rarity.UNCOMMON, mage.cards.p.Preordain.class)); @@ -214,19 +261,27 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Qui-Gon Jinn", 205, Rarity.RARE, mage.cards.q.QuiGonJinn.class)); cards.add(new SetCardInfo("Raging Reek", 115, Rarity.COMMON, mage.cards.r.RagingReek.class)); cards.add(new SetCardInfo("Rallying Fire", 116, Rarity.COMMON, mage.cards.r.RallyingFire.class)); + cards.add(new SetCardInfo("Range Trooper", 613, Rarity.UNCOMMON, mage.cards.r.RangeTrooper.class)); + cards.add(new SetCardInfo("Rathtar", 409, Rarity.COMMON, mage.cards.r.Rathtar.class)); cards.add(new SetCardInfo("Ravenous Wampa", 226, Rarity.UNCOMMON, mage.cards.r.RavenousWampa.class)); cards.add(new SetCardInfo("Regression", 152, Rarity.UNCOMMON, mage.cards.r.Regression.class)); cards.add(new SetCardInfo("Republic Frigate", 53, Rarity.COMMON, mage.cards.r.RepublicFrigate.class)); cards.add(new SetCardInfo("Repurpose", 85, Rarity.COMMON, mage.cards.r.Repurpose.class)); + cards.add(new SetCardInfo("Resistance", 310, Rarity.UNCOMMON, mage.cards.r.Resistance.class)); + cards.add(new SetCardInfo("Resistance Bomber", 515, Rarity.UNCOMMON, mage.cards.r.ResistanceBomber.class)); cards.add(new SetCardInfo("Revenge", 117, Rarity.COMMON, mage.cards.r.Revenge.class)); + cards.add(new SetCardInfo("Rey", 410, Rarity.RARE, mage.cards.r.Rey.class)); cards.add(new SetCardInfo("Riding Ronto", 28, Rarity.UNCOMMON, mage.cards.r.RidingRonto.class)); + cards.add(new SetCardInfo("Riot Trooper", 411, Rarity.COMMON, mage.cards.r.RiotTrooper.class)); cards.add(new SetCardInfo("Rocket Trooper", 118, Rarity.RARE, mage.cards.r.RocketTrooper.class)); cards.add(new SetCardInfo("Rogue's Passage", 248, Rarity.UNCOMMON, mage.cards.r.RoguesPassage.class)); cards.add(new SetCardInfo("Rule of two", 86, Rarity.UNCOMMON, mage.cards.r.RuleOfTwo.class)); cards.add(new SetCardInfo("Rumination", 54, Rarity.COMMON, mage.cards.r.Rumination.class)); cards.add(new SetCardInfo("Rumor Monger", 206, Rarity.UNCOMMON, mage.cards.r.RumorMonger.class)); cards.add(new SetCardInfo("Sabacc Game", 55, Rarity.UNCOMMON, mage.cards.s.SabaccGame.class)); + cards.add(new SetCardInfo("Sai Tok", 516, Rarity.UNCOMMON, mage.cards.s.SaiTok.class)); cards.add(new SetCardInfo("Salvage Squad", 207, Rarity.COMMON, mage.cards.s.SalvageSquad.class)); + cards.add(new SetCardInfo("Salvage Trader", 412, Rarity.COMMON, mage.cards.s.SalvageTrader.class)); cards.add(new SetCardInfo("Sand Trooper", 29, Rarity.COMMON, mage.cards.s.SandTrooper.class)); cards.add(new SetCardInfo("Sarlacc Pit", 208, Rarity.RARE, mage.cards.s.SarlaccPit.class)); cards.add(new SetCardInfo("Scout the Perimeter", 153, Rarity.COMMON, mage.cards.s.ScoutThePerimeter.class)); @@ -241,6 +296,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Shadow Trooper", 56, Rarity.COMMON, mage.cards.s.ShadowTrooper.class)); cards.add(new SetCardInfo("Shock Trooper", 119, Rarity.UNCOMMON, mage.cards.s.ShockTrooper.class)); cards.add(new SetCardInfo("Show of Dominance", 156, Rarity.UNCOMMON, mage.cards.s.ShowOfDominance.class)); + cards.add(new SetCardInfo("Sins of the Father", 413, Rarity.COMMON, mage.cards.s.SinsOfTheFather.class)); cards.add(new SetCardInfo("Sith Assassin", 87, Rarity.UNCOMMON, mage.cards.s.SithAssassin.class)); cards.add(new SetCardInfo("Sith Citadel", 249, Rarity.UNCOMMON, mage.cards.s.SithCitadel.class)); cards.add(new SetCardInfo("Sith Evoker", 88, Rarity.COMMON, mage.cards.s.SithEvoker.class)); @@ -262,6 +318,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Star Destroyer", 217, Rarity.RARE, mage.cards.s.StarDestroyer.class)); cards.add(new SetCardInfo("Strike Team Commando", 227, Rarity.COMMON, mage.cards.s.StrikeTeamCommando.class)); cards.add(new SetCardInfo("Super Battle Droid", 59, Rarity.COMMON, mage.cards.s.SuperBattleDroid.class)); + cards.add(new SetCardInfo("Supreme Leader Snoke", 517, Rarity.MYTHIC, mage.cards.s.SupremeLeaderSnoke.class)); cards.add(new SetCardInfo("Surprise Maneuver", 60, Rarity.COMMON, mage.cards.s.SurpriseManeuver.class)); cards.add(new SetCardInfo("Swamp", "260a", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); cards.add(new SetCardInfo("Swamp", "260b", Rarity.LAND, mage.cards.basiclands.Swamp.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); @@ -279,17 +336,26 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("The Death Star", 1, Rarity.MYTHIC, mage.cards.t.TheDeathStar.class)); cards.add(new SetCardInfo("TIE Bomber", 93, Rarity.UNCOMMON, mage.cards.t.TIEBomber.class)); cards.add(new SetCardInfo("TIE Interceptor", 94, Rarity.COMMON, mage.cards.t.TIEInterceptor.class)); + cards.add(new SetCardInfo("TIE Silencer", 518, Rarity.RARE, mage.cards.t.TIESilencer.class)); + cards.add(new SetCardInfo("TIE Striker", 312, Rarity.COMMON, mage.cards.t.TIEStriker.class)); + cards.add(new SetCardInfo("Thermal Detonator", 311, Rarity.COMMON, mage.cards.t.ThermalDetonator.class)); + cards.add(new SetCardInfo("Tobias Beckett", 614, Rarity.RARE, mage.cards.t.TobiasBeckett.class)); cards.add(new SetCardInfo("Trade Federation Battleship", 219, Rarity.RARE, mage.cards.t.TradeFederationBattleship.class)); cards.add(new SetCardInfo("Tri-Fighter", 228, Rarity.COMMON, mage.cards.t.TriFighter.class)); cards.add(new SetCardInfo("Trooper Armor", 237, Rarity.UNCOMMON, mage.cards.t.TrooperArmor.class)); cards.add(new SetCardInfo("Trooper Commando", 157, Rarity.UNCOMMON, mage.cards.t.TrooperCommando.class)); cards.add(new SetCardInfo("Twi'lek Seductress", 158, Rarity.COMMON, mage.cards.t.TwilekSeductress.class)); + cards.add(new SetCardInfo("U-Wing", 313, Rarity.UNCOMMON, mage.cards.u.UWing.class)); cards.add(new SetCardInfo("Ugnaught Scrap Worker", 61, Rarity.COMMON, mage.cards.u.UgnaughtScrapWorker.class)); + cards.add(new SetCardInfo("Underground Forum", 615, Rarity.UNCOMMON, mage.cards.u.UndergroundForum.class)); cards.add(new SetCardInfo("Underworld Slums", 251, Rarity.COMMON, mage.cards.u.UnderworldSlums.class)); cards.add(new SetCardInfo("Unity of the Droids", 220, Rarity.UNCOMMON, mage.cards.u.UnityOfTheDroids.class)); cards.add(new SetCardInfo("Unruly Sureshot", 95, Rarity.UNCOMMON, mage.cards.u.UnrulySureshot.class)); + cards.add(new SetCardInfo("Upsilon-class Shuttle", 414, Rarity.COMMON, mage.cards.u.UpsilonClassShuttle.class)); cards.add(new SetCardInfo("V-Wing", 126, Rarity.COMMON, mage.cards.v.VWing.class)); + cards.add(new SetCardInfo("Vader's Command", 314, Rarity.RARE, mage.cards.v.VadersCommand.class)); cards.add(new SetCardInfo("Vapor Snag", 62, Rarity.COMMON, mage.cards.v.VaporSnag.class)); + cards.add(new SetCardInfo("Vulptex", 519, Rarity.COMMON, mage.cards.v.Vulptex.class)); cards.add(new SetCardInfo("Weequay Beastmaster", 127, Rarity.UNCOMMON, mage.cards.w.WeequayBeastmaster.class)); cards.add(new SetCardInfo("Wild Holocron", 238, Rarity.COMMON, mage.cards.w.WildHolocron.class)); cards.add(new SetCardInfo("Wisdom of the Jedi", 221, Rarity.UNCOMMON, mage.cards.w.WisdomOfTheJedi.class)); @@ -301,5 +367,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Y-Wing", 63, Rarity.UNCOMMON, mage.cards.y.YWing.class)); cards.add(new SetCardInfo("Yoda, Jedi Master", 223, Rarity.MYTHIC, mage.cards.y.YodaJediMaster.class)); cards.add(new SetCardInfo("Zam Wesell", 64, Rarity.RARE, mage.cards.z.ZamWesell.class)); + cards.add(new SetCardInfo("Island", "520a", Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); + cards.add(new SetCardInfo("Plains", "520b", Rarity.LAND, mage.cards.basiclands.Plains.class, new CardGraphicInfo(FrameStyle.ZEN_FULL_ART_BASIC, true))); } } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index cb53325148..9b8c203a03 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -64,6 +64,7 @@ public enum SubType { AZRA("Azra", SubTypeSet.CreatureType), // B BADGER("Badger", SubTypeSet.CreatureType), + BARABEL("Barabel", SubTypeSet.CreatureType, true), // Star Wars BARBARIAN("Barbarian", SubTypeSet.CreatureType), BASILISK("Basilisk", SubTypeSet.CreatureType), BAT("Bat", SubTypeSet.CreatureType), @@ -99,6 +100,7 @@ public enum SubType { COWARD("Coward", SubTypeSet.CreatureType), CRAB("Crab", SubTypeSet.CreatureType), CROCODILE("Crocodile", SubTypeSet.CreatureType), + CROLUTE("Crolute", SubTypeSet.CreatureType, true), // Star Wars CYBORG("Cyborg", SubTypeSet.CreatureType, true), // Star Wars CYCLOPS("Cyclops", SubTypeSet.CreatureType), // D @@ -204,6 +206,7 @@ public enum SubType { LICID("Licid", SubTypeSet.CreatureType), LIZARD("Lizard", SubTypeSet.CreatureType), LOBSTER("Lobster", SubTypeSet.CreatureType, true), // Unglued + LUKE("Luke", SubTypeSet.PlaneswalkerType, true), // Star Wars // M MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars MANTICORE("Manticore", SubTypeSet.CreatureType), @@ -312,6 +315,7 @@ public enum SubType { SPONGE("Sponge", SubTypeSet.CreatureType), SQUID("Squid", SubTypeSet.CreatureType), SQUIRREL("Squirrel", SubTypeSet.CreatureType), + SNOKE("Snoke", SubTypeSet.PlaneswalkerType, true), // Star Wars STARFISH("Starfish", SubTypeSet.CreatureType), STARSHIP("Starship", SubTypeSet.CreatureType, true), // Star Wars SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index abfd93c49d..654ebf91af 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1022,6 +1022,7 @@ public abstract class GameImpl implements Game, Serializable { watchers.add(new CastSpellLastTurnWatcher()); watchers.add(new CastSpellYourLastTurnWatcher()); watchers.add(new PlayerLostLifeWatcher()); + watchers.add(new PlayerLostLifeNonCombatWatcher()); watchers.add(new BlockedAttackerWatcher()); watchers.add(new DamageDoneWatcher()); watchers.add(new PlanarRollWatcher()); diff --git a/Mage/src/main/java/mage/game/command/emblems/LukeSkywalkerEmblem.java b/Mage/src/main/java/mage/game/command/emblems/LukeSkywalkerEmblem.java new file mode 100644 index 0000000000..037d7c0cdf --- /dev/null +++ b/Mage/src/main/java/mage/game/command/emblems/LukeSkywalkerEmblem.java @@ -0,0 +1,61 @@ +package mage.game.command.emblems; + +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.PreventAllDamageByAllPermanentsEffect; +import mage.abilities.effects.common.PreventAllDamageToPlayersEffect; +import mage.constants.*; +import mage.game.Game; +import mage.game.command.Emblem; +import mage.game.events.GameEvent; +import mage.game.permanent.token.CatToken2; +import mage.game.turn.Phase; +import mage.players.Player; + +/** + * + * @author NinthWorld + */ +public class LukeSkywalkerEmblem extends Emblem { + + // -6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi. + public LukeSkywalkerEmblem() { + this.setName("Emblem Luke Skywalker"); + this.setExpansionSetCodeForImage("SWS"); + this.getAbilities().add(new SimpleStaticAbility(Zone.BATTLEFIELD, new LukeSkywalkerEmblemEffect())); + } +} + +class LukeSkywalkerEmblemEffect extends PreventionEffectImpl { + + public LukeSkywalkerEmblemEffect() { + super(Duration.Custom, Integer.MAX_VALUE, false); + staticText = "Prevent all damage that would be dealt to you during combat"; + } + + public LukeSkywalkerEmblemEffect(final LukeSkywalkerEmblemEffect effect) { + super(effect); + } + + @Override + public LukeSkywalkerEmblemEffect copy() { + return new LukeSkywalkerEmblemEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (game.getPhase().getType() == TurnPhase.COMBAT + && super.applies(event, source, game) + && event.getType() == GameEvent.EventType.DAMAGE_PLAYER) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && game.getState().getPlayersInRange(controller.getId(), game).contains(event.getTargetId())) { + return true; + } + } + return false; + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/PorgToken.java b/Mage/src/main/java/mage/game/permanent/token/PorgToken.java new file mode 100644 index 0000000000..fc09a8c7a5 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PorgToken.java @@ -0,0 +1,39 @@ + + +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.MonstrosityAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Collections; + +/** + * + * @author NinthWorld + */ +public final class PorgToken extends TokenImpl { + + public PorgToken() { + super("Porg", "0/1 green Bird creature token named Porg with \"{G}: Monstrosity 1.\""); + availableImageSetCodes.addAll(Collections.singletonList("SWS")); + + cardType.add(CardType.CREATURE); + subtype.add(SubType.BIRD); + + color.setGreen(true); + power = new MageInt(0); + toughness = new MageInt(1); + + this.addAbility(new MonstrosityAbility("{G}", 1)); + } + + public PorgToken(final PorgToken token) { + super(token); + } + + public PorgToken copy() { + return new PorgToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/TrooperToken2.java b/Mage/src/main/java/mage/game/permanent/token/TrooperToken2.java new file mode 100644 index 0000000000..6a35e1f365 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TrooperToken2.java @@ -0,0 +1,36 @@ + +package mage.game.permanent.token; + +import java.util.Collections; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * + * @author NinthWorld + */ +public final class TrooperToken2 extends TokenImpl { + + public TrooperToken2() { + super("Trooper", "1/1 black Trooper creature token"); + availableImageSetCodes.addAll(Collections.singletonList("SWS")); + this.setTokenType(2); + + cardType.add(CardType.CREATURE); + subtype.add(SubType.TROOPER); + + color.setBlack(true); + power = new MageInt(1); + toughness = new MageInt(1); + } + + public TrooperToken2(final TrooperToken2 token) { + super(token); + } + + public TrooperToken2 copy() { + return new TrooperToken2(this); + } +} diff --git a/Mage/src/main/java/mage/watchers/common/PlayerLostLifeNonCombatWatcher.java b/Mage/src/main/java/mage/watchers/common/PlayerLostLifeNonCombatWatcher.java new file mode 100644 index 0000000000..2c7300286c --- /dev/null +++ b/Mage/src/main/java/mage/watchers/common/PlayerLostLifeNonCombatWatcher.java @@ -0,0 +1,84 @@ + +package mage.watchers.common; + +import mage.constants.WatcherScope; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.watchers.Watcher; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; + +/* + * Counts amount of life lost from noncombat sources current or last turn by players. + * This watcher is automatically started in gameImpl.init for each game + * + * @author NinthWorld + */ +public class PlayerLostLifeNonCombatWatcher extends Watcher { + + private final Map amountOfLifeLostThisTurn = new HashMap<>(); + private final Map amountOfLifeLostLastTurn = new HashMap<>(); + + public PlayerLostLifeNonCombatWatcher() { + super(PlayerLostLifeNonCombatWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public PlayerLostLifeNonCombatWatcher(final PlayerLostLifeNonCombatWatcher watcher) { + super(watcher); + for (Entry entry : watcher.amountOfLifeLostThisTurn.entrySet()) { + amountOfLifeLostThisTurn.put(entry.getKey(), entry.getValue()); + } + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.LOST_LIFE && !event.getFlag()) { + UUID playerId = event.getPlayerId(); + if (playerId != null) { + Integer amount = amountOfLifeLostThisTurn.get(playerId); + if (amount == null) { + amount = event.getAmount(); + } else { + amount = amount + event.getAmount(); + } + amountOfLifeLostThisTurn.put(playerId, amount); + } + } + } + + public int getLiveLost(UUID playerId) { + return amountOfLifeLostThisTurn.getOrDefault(playerId, 0); + } + + public int getAllOppLifeLost(UUID playerId, Game game) { + int amount = 0; + for (UUID opponentId : this.amountOfLifeLostThisTurn.keySet()) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null && opponent.hasOpponent(playerId, game)) { + amount += this.amountOfLifeLostThisTurn.getOrDefault(opponentId, 0); + } + } + return amount; + } + + public int getLiveLostLastTurn(UUID playerId) { + return amountOfLifeLostLastTurn.getOrDefault(playerId, 0); + } + + @Override + public void reset() { + amountOfLifeLostLastTurn.clear(); + amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn); + amountOfLifeLostThisTurn.clear(); + } + + @Override + public PlayerLostLifeNonCombatWatcher copy() { + return new PlayerLostLifeNonCombatWatcher(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 14b5fd976a..e46cfcb636 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33925,3 +33925,69 @@ Cleansing Screech|Global Series: Jiang Yanggu & Mu Yanling|37|C|{4}{R}|Sorcery|| Timber Gorge|Global Series: Jiang Yanggu & Mu Yanling|38|C||Land|||Timber Gorge enters the battlefield tapped.${T}: Add {R} or {G}.| Mountain|Global Series: Jiang Yanggu & Mu Yanling|39|C||Basic Land - Mountain|||({T}: Add {R}.)| Forest|Global Series: Jiang Yanggu & Mu Yanling|40|C||Basic Land - Forest|||({T}: Add {G}.)| +Bludgeoning Pain|Star Wars|300|C|{1}{B}|Instant|||Target creature gets -2/-2 until end of turn. Tap that creature.| +Bor Gullet|Star Wars|301|U|{3}{U}{B}|Creature - Horror Cephalid|4|4|When Bor Gullet enters the battlefield, target opponent reveals his or her hand. You choose a card from it. That player discards that card.| +Chirrut Imwe|Star Wars|302|R|{G}{W}{U}|Legendary Creature - Human Monk|3|3|Chirrut Imwe can block up to two additional creatures.${1}{W}: Prevent all combat damage that would be dealt to Chirrut Imwe until end of turn.| +Director Krennic|Star Wars|303|R|{3}{B}{B}|Legendary Creature - Human Advisor|3|4|When Director Krennic enters the battlefield, create two 1/1 black Trooper creature tokens.$When Director Krennic leaves the battlefield, destroy target basic land.| +Force Protection|Star Wars|304|C|{W}|Instant|||Target creature you control gains protection from color of your choice until end of turn. Scry 1.| +Gerrera's Revolutionary|Star Wars|305|C|{R}|Creature - Barabel Rebel|2|1|Gerrera's Revolutionary attacks each turn if able.| +Hammerhead Corvette|Star Wars|306|U|{3}{G}|Artifact Creature - Rebel Starship|3|3|Spaceflight$Whenever Hammerhead Corvette attacks, you may untap target Starship creature defending player controls and have that creature block Hammerhead Corvette this turn if able.| +Imperial Hovertank|Star Wars|307|U|{4}{W}{B}|Artifact Creature - Trooper Construct|4|4|Whenever a Trooper creature you control attacks, defending player loses 1 life and you gain 1 life.| +Jyn Erso and Cassian Andor|Star Wars|308|R|{2}{R}{W}|Legendary Creature - Human Rebel|4|4|At the beginning of combat on your turn, target creature gets +1/+0 and gains haste until end of turn.| +Occupation|Star Wars|309|U|{W}{B}|Enchantment|||Creatures your opponents control enter the battlefield tapped.${W}{B}: Target creature can't attack or block this turn, and its activated abilities can't be activated until end of turn.| +Resistance|Star Wars|310|U|{R}{W}|Enchantment|||Whenever a creature enters the battlefield under your control, Resistance deals 1 damage to each opponent.${R}{W}: Target creature gains haste until end of turn and must attack or block this turn if able.| +Thermal Detonator|Star Wars|311|C|{1}|Artifact|||{2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player.| +TIE Striker|Star Wars|312|C|{1}{B}|Artifact Creature - Starship|2|1|Spaceflight| +U-Wing|Star Wars|313|U|{2}{U}|Artifact Creature - Rebel Starship|2|2|Spaceflight$As long as U-Wing is tapped, it gets +1/+0.$As long as U-Wing is untapped, it gets +0/+1.| +Vader's Command|Star Wars|314|R|{2}{B}{B}|Instant|||Choose two -$ Counter target spell unless its controller pays 5 life.$ Destroy target planeswalker.$ Destroy target nonartifact creature.$ Gain 5 life.| +Astromech Droid|Star Wars|400|C|{W}|Artifact Creature - Droid|0|1|{T}: Target starship creature you control gets +1/+1 and gains vigilance until end of turn.$Repair 4| +Buried Ruin|Star Wars|401|C||Land|||{T}: Add {1} to your mana pool.${2}, {T}, Sacrifice Buried Ruin: Return target artifact card from your graveyard to your hand.| +Finn|Star Wars|402|U|{3}{G}|Legendary Creature - Human Trooper Soldier|3|3|Whenever Finn or another nontoken creature you control enters the battlefield under your control, you gain 1 life for each nontoken creature you control.| +Flame Trooper|Star Wars|403|C|{2}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have menace.| +Force Stasis|Star Wars|404|C|{1}{U}|Instant|||Choose one -$ Tap target creature. It doesn't untap during its controller's next untap step.$ Return target instant or sorcery spell you don't control to its owner's hand.| +General Hux|Star Wars|405|U|{3}{B}|Legendary Creature - Human Advisor|3|3|Whenever General Hux or another nontoken creature enters the battlefield under your control, until end of turn, target creature gains "{B}: This creature gets +1/+1 until end of turn."| +Kylo Ren|Star Wars|406|M|{1}{U}{B}{R}|Legendary Creature - Human Sith|3|3|Haste, first strike$Kylo Ren attacks each turn if able.$Whenever Kylo Ren attacks, it gets +1/+0 for each creature in your graveyard and you may tap target creature defending player controls.| +Outer Rim Gang|Star Wars|407|C|{2}{B}{R}{G}|Creature - Human Rogue Hunter|4|4|When Outer Rim Gang enters the battlefield, each creature with a bounty counter on it gets -2/-2 until end of turn.| +Poe Dameron|Star Wars|408|U|{3}{W}|Legendary Creature - Human Soldier|3|3|Whenever Poe Dameron or another nontoken creature enters the battlefield under your control, starship creatures you control get +1/+1 until end of turn.| +Rathtar|Star Wars|409|C|{2}{R}{G}|Creature - Beast|4|4|{5}{G}{G}: Monstrosity 2.$When Rathtar becomes monstrous, any number of target creatures must block it this turn if able.| +Rey|Star Wars|410|R|{G}{W}{U}|Legendary Creature - Human Knight|3|3|Vigilance, first strike$Whenever Rey enters or leaves the battlefield, reveal the top card of target player's library. You gain life equal to that card's converted mana cost.| +Riot Trooper|Star Wars|411|C|{2}{W}|Creature - Human Trooper|2|2|Each trooper creature you control can block an additional creature each combat.| +Salvage Trader|Star Wars|412|C|{3}{U}|Creature - Crolute|2|3|{T}: Exchange control of target artifact you control and target artifact an opponent controls with the same converted mana cost.| +Sins of the Father|Star Wars|413|C|{1}{B}|Sorcery|||Exile target player's graveyard. That player loses 1 life for each instant or sorcery card exiled this way.| +Upsilon-class Shuttle|Star Wars|414|C|{5}|Artifact Creature - Starship|2|3|Spaceflight$Whenever Upsilon-class Shuttle attacks, target creature you control gains spaceflight until end of turn.| +Canto Bight Enforcer|Star Wars|500|U|{1}{B}|Creature - Human Hunter|2|2|When Canto Bight Enforcer enters the battlefield, you may put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, put a +1/+1 counter on Canto Bight Enforcer.| +Cantonica Casino|Star Wars|501|R|{2}|Artifact|||{T}: Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life.| +Captain Phasma|Star Wars|502|R|{4}{W}|Legendary Creature - Human Trooper|4|4|Nontoken Trooper creatures you control have "When this creature enters the battlefield, creature 1/1/ white Trooper creature token."${W}{U}{B}{R}{G}: Search your library for a Trooper creature card, reveal it, put it into your hand, then shuffle your library.| +Code Slice|Star Wars|503|C|{R}|Sorcery|||Put a bounty counter on target creature.$Artifact creatures with bounty counters on them can't block this turn.| +Delay Tactic|Star Wars|504|C|{1}{U}|Instant|||Choose one -$ Creatures you control gain hexproof until end of turn.$ Creatures target opponent controls don't untap during his or her next untap step.| +Fathier|Star Wars|505|C|{2}{R}{R}|Creature - Beast|3|3|Haste${4}{R}{R}: Monstrosity 2.| +First Order Dreadnought|Star Wars|506|M|{4}{B}{B}|Artifact Creature - Starship|5|6|Spaceflight${2}{B}, {T}: Destroy target creature.| +Force Projection|Star Wars|507|R|{1}{U}{U}|Sorcery|||Create a token that is a copy of target creature except that it is an Illusion in addition to its other types and gains "When this creature becomes the target of a spell, sacrifice it."$Scry 2.| +Force Telepathy|Star Wars|508|C|{UB}|Instant|||Target player reveals his or her hand.$Scry 2| +Glorious Charge|Star Wars|509|C|{1}{W}|Instant|||Creatures you control get +1/+1 until end of turn.| +Inspire|Star Wars|510|C|{1}{U}|Instant|||Untap target creature.$Draw a card.| +Luke Skywalker, the Last Jedi|Star Wars|511|M|{2}{G}{W}|Legendary Planeswalker - Luke|||+1: Put two +1/+1 counters on up to one target creature.$-3: Put target noncreature permanent on top of its owner's library.$-6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi.| +Mouse Droid|Star Wars|512|C|{1}{U}|Artifact Creature - Droid|0|1|When Mouse Droid dies, draw a card.$Repair 3| +Porg Nest|Star Wars|513|U|{2}{G}|Creature - Bird|0|2|Defender$At the beginning of your upkeep, create a 0/1 green Bird creature token named Porg with "{G}: Monstrosity 1."| +Praetorian Trooper|Star Wars|514|R|{3}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have double strike.| +Resistance Bomber|Star Wars|515|U|{3}{R}|Artifact Creature - Rebel Starship|2|2|Spaceflight$Resistance Bomber enters the battlefield with a charge counter on it.$Remove a charge counter from Resistance Bomber: Resistance Bomber deals 5 damage to target creature. Activate this ability only if Resistance Bomber is attacking.| +Sai Tok|Star Wars|516|U|{B}{B}|Instant|||Destroy target creature or planeswalker if it has converted mana cost 4 or less.| +Supreme Leader Snoke|Star Wars|517|M|{U}{B}{R}|Legendary Planeswalker - Snoke|||+1: Put a loyalty counter on Supreme Leader Snoke for each life lost by all opponents from noncombat sources this turn.$-1: Draw a card and lose 1 life.$-X: Gain control of target creature with converted mana cost X. Untap that creature. It gains haste. Sacrifice that creature at the beginning of the next end step.| +TIE Silencer|Star Wars|518|R|{1}{B}{R}|Artifact Creature - Starship|2|2|Haste$Spaceflight$Whenever TIE Silencer attacks, it deals 1 damage to defending player and 1 damage to up to one target creature that player controls.| +Vulptex|Star Wars|519|C|{1}{W}|Creature - Fox|1|1|When Vulptex enters the battlefield, put a +1/+1 counter on target creature.| +Afterburn|Star Wars|600|C|{R}|Instant|||Choose One -$ Target creature gains haste and first strike until end of turn.$ Remove target creature from combat.| +Chewbacca, the Beast|Star Wars|601|R|{1}{G}{G}|Legendary Creature - Wookie Warrior|3|3|Partner with Han Solo, Scrumrat$Whenever Chewbacca, the Beast attacks, another target attacking creature you control gains indestructible until end of turn.| +Conscription|Star Wars|602|U|{2}{U}{U}|Sorcery|||Gain control of target creature with power 2 or less. It becomes a Trooper in addition to its other types.| +Corellian Gunship|Star Wars|603|C|{R}|Artifact Creature - Starship|1|1|Spaceflight$When Corellian Gunship enters the battlefield, it deals 1 damage to target player or planeswalker.| +Despair|Star Wars|604|U|{B}{B}|Instant|||Each opponent sacrifices a creature.| +Droid Uprising|Star Wars|605|U|{2}{W}{W}|Instant|||Tap all nonartifact creatures.$Create two colorless 1/1 Droid artifact creature tokens.| +Dryden Vos|Star Wars|606|R|{1}{B}{R}|Legendary Creature - Human Rogue|2|3|Menace$When Dryden Vos enters the battlefield, put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, Dryden Vos deals 2 damage to any target.| +Enfys Nest|Star Wars|607|M|{G}{W}|Legendary Creature - Human Rebel|2|1|Vigilance$Whenever Enfys Nest enters the battlefield, you may exile target creature an opponent controls. If you do, that player gains life equal to that creature's power.| +Gamble|Star Wars|608|R|{R}|Sorcery|||Search you library for a card, put that card into your hand, discard a card at random, then shuffle your library.| +Han Solo, Scrumrat|Star Wars|609|R|{2}{W}|Legendary Creature - Human Rogue|2|2|Partner with Chewbacca, the Beast$R: Han Solo, Scrumrat gains first strike until end of turn.$Whenever Han Solo, Scrumrat deals damage during your turn, put a +1/+1 counter on another target creature you control.| +Kalevan Star Yacht|Star Wars|610|U|{3}{B}|Artifact Creature - Starship|2|3|Spaceflight$When Kalevan Star Yacht enters the battlefield, lose 1 life, draw a card, and put a bounty counter on up to one target creature.| +Maelstrom Blockade|Star Wars|611|C|{2}{WB}|Instant|||Exile target attacking creature.| +Mud Trooper|Star Wars|612|U|{B}|Creature - Human Trooper|1|1|Trooper creatures you control have "2: This creature gets +1/+1 until end of turn."| +Range Trooper|Star Wars|613|U|{3}{W}|Creature - Human Trooper|2|2|Trooper creatures you control have "When this creature enters that battlefield, you may exile target creature. Return that creature to the battlefield at the beginning of the next end step."| +Tobias Beckett|Star Wars|614|R|{3}{B}|Legendary Creature - Human Hunter|4|3|When Tobias Becket enters the battlefield, put a bounty counter on target creature an opponent controls.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, exile the top card of that player's library. You may cast cards exiled this way and spend mana as though it were mana of any type to cast that spell.| +Underground Forum|Star Wars|615|U||Land|||T: Add {1}.${1}, {T}: Add {B}, {R}, or {G}.${2}, {T}: Put a bounty counter on target creature.| \ No newline at end of file From 86107de54ef72e25cd69276975de14131b822d91 Mon Sep 17 00:00:00 2001 From: ninthworld Date: Mon, 16 Jul 2018 21:16:20 -0700 Subject: [PATCH 2/8] Merge remote-tracking branch 'upstream/master' # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. --- .../util/CardViewEDHPowerLevelComparator.java | 6 +- .../dl/sources/WizardCardsImageSource.java | 22 +- .../src/mage/player/human/HumanPlayer.java | 12 +- .../java/mage/server/game/GameController.java | 22 +- .../src/mage/cards/a/AbzanBeastmaster.java | 4 +- Mage.Sets/src/mage/cards/a/AetherWeb.java | 88 +++ Mage.Sets/src/mage/cards/a/Aetherplasm.java | 93 +++ .../src/mage/cards/a/AfflictedDeserter.java | 4 +- .../src/mage/cards/a/AidFromTheCowl.java | 4 +- .../src/mage/cards/a/AirdropAeronauts.java | 4 +- .../src/mage/cards/a/AjaniWiseCounselor.java | 3 +- Mage.Sets/src/mage/cards/a/AjanisComrade.java | 4 +- .../src/mage/cards/a/AjanisLastStand.java | 4 +- .../src/mage/cards/a/AkutaBornOfAsh.java | 4 +- Mage.Sets/src/mage/cards/a/AnaBattlemage.java | 6 +- Mage.Sets/src/mage/cards/a/AnaSanctuary.java | 4 +- .../src/mage/cards/a/AngelOfDeliverance.java | 4 +- .../src/mage/cards/a/AngelOfTheDireHour.java | 4 +- Mage.Sets/src/mage/cards/a/AnimateDead.java | 4 +- .../src/mage/cards/a/ApothecaryGeist.java | 4 +- .../mage/cards/a/ApproachOfTheSecondSun.java | 2 +- .../mage/cards/a/ArahboRoarOfTheWorld.java | 4 +- .../src/mage/cards/a/ArguelsBloodFast.java | 4 +- .../src/mage/cards/a/ArtisanOfForms.java | 8 +- Mage.Sets/src/mage/cards/a/AsajjVentress.java | 4 +- Mage.Sets/src/mage/cards/a/AsylumVisitor.java | 4 +- .../src/mage/cards/a/AuroraChampion.java | 4 +- .../src/mage/cards/b/BalduvianFallen.java | 89 +++ Mage.Sets/src/mage/cards/b/BaneOfHanweir.java | 4 +- Mage.Sets/src/mage/cards/b/BarrenGlory.java | 4 +- Mage.Sets/src/mage/cards/b/BattleOfWits.java | 4 +- .../mage/cards/b/BellowingSaddlebrute.java | 4 +- .../src/mage/cards/b/BenalishEmissary.java | 4 +- .../mage/cards/b/BladeTribeBerserkers.java | 5 +- .../src/mage/cards/b/BleakCovenVampires.java | 5 +- .../src/mage/cards/b/BloodchiefAscension.java | 4 +- .../src/mage/cards/b/BloodhallPriest.java | 4 +- .../src/mage/cards/b/BlowflyInfestation.java | 6 +- Mage.Sets/src/mage/cards/b/BoobyTrap.java | 97 +++ .../mage/cards/b/BoseijuWhoSheltersAll.java | 47 +- Mage.Sets/src/mage/cards/b/BrandedHowler.java | 4 +- .../src/mage/cards/b/BreachingLeviathan.java | 4 +- .../src/mage/cards/b/BreakneckRider.java | 4 +- .../src/mage/cards/b/BrinkOfMadness.java | 4 +- Mage.Sets/src/mage/cards/b/BudokaPupil.java | 5 +- .../src/mage/cards/b/BullRushBruiser.java | 4 +- ...{BurntheImpure.java => BurnTheImpure.java} | 23 +- .../src/mage/cards/b/BurningEyeZubera.java | 4 +- .../src/mage/cards/c/CaligoSkinWitch.java | 4 +- Mage.Sets/src/mage/cards/c/CallForUnity.java | 4 +- .../src/mage/cards/c/CallOfTheFullMoon.java | 4 +- .../src/mage/cards/c/CallToTheGrave.java | 4 +- Mage.Sets/src/mage/cards/c/CallowJushi.java | 5 +- Mage.Sets/src/mage/cards/c/CemeteryPuca.java | 4 +- Mage.Sets/src/mage/cards/c/CetaSanctuary.java | 4 +- .../src/mage/cards/c/ChakramRetriever.java | 3 +- .../src/mage/cards/c/ChanceEncounter.java | 4 +- .../src/mage/cards/c/ChoArrimLegate.java | 2 +- Mage.Sets/src/mage/cards/c/Chronozoa.java | 4 +- Mage.Sets/src/mage/cards/c/CitadelSiege.java | 3 +- .../src/mage/cards/c/CitanulWoodreaders.java | 4 +- .../src/mage/cards/c/ClockworkAvian.java | 4 +- .../src/mage/cards/c/ClockworkBeast.java | 4 +- .../src/mage/cards/c/ClockworkSteed.java | 4 +- .../src/mage/cards/c/ClockworkSwarm.java | 4 +- Mage.Sets/src/mage/cards/c/CoalStoker.java | 4 +- .../src/mage/cards/c/ColossalMajesty.java | 4 +- .../src/mage/cards/c/ComplexAutomaton.java | 4 +- .../src/mage/cards/c/ConsulsLieutenant.java | 4 +- .../src/mage/cards/c/ConvalescentCare.java | 4 +- .../src/mage/cards/c/ConvictedKiller.java | 4 +- .../mage/cards/c/CountlessGearsRenegade.java | 4 +- Mage.Sets/src/mage/cards/c/CoverOfWinter.java | 102 +++ .../src/mage/cards/c/CrestedSunmare.java | 4 +- .../src/mage/cards/c/CryptolithFragment.java | 4 +- Mage.Sets/src/mage/cards/c/CunningBandit.java | 5 +- .../src/mage/cards/c/CuriousHomunculus.java | 4 +- .../src/mage/cards/c/CurseOfTheCabal.java | 14 +- .../src/mage/cards/c/CyclopeanGiant.java | 44 ++ .../src/mage/cards/d/DacksDuplicate.java | 4 +- .../src/mage/cards/d/DanceOfTheDead.java | 4 +- .../src/mage/cards/d/DaredevilDragster.java | 4 +- .../mage/cards/d/DarigaazReincarnated.java | 14 +- .../src/mage/cards/d/DarkApprenticeship.java | 4 +- Mage.Sets/src/mage/cards/d/DarthMaul.java | 4 +- .../src/mage/cards/d/DaybreakRanger.java | 4 +- .../src/mage/cards/d/DeadeyeBrawler.java | 4 +- .../src/mage/cards/d/DeadeyeHarpooner.java | 4 +- .../src/mage/cards/d/DeadeyeRigHauler.java | 4 +- .../src/mage/cards/d/DeadeyeTormentor.java | 4 +- Mage.Sets/src/mage/cards/d/DeadlyGrub.java | 4 +- .../mage/cards/d/DeathOfAThousandStings.java | 4 +- Mage.Sets/src/mage/cards/d/DeathSpark.java | 4 +- .../src/mage/cards/d/DeathbringerRegent.java | 4 +- Mage.Sets/src/mage/cards/d/DeepSeaKraken.java | 4 +- .../src/mage/cards/d/DeepwoodLegate.java | 2 +- .../src/mage/cards/d/DefenseOfTheHeart.java | 4 +- Mage.Sets/src/mage/cards/d/DegaSanctuary.java | 4 +- Mage.Sets/src/mage/cards/d/DemonicRising.java | 4 +- Mage.Sets/src/mage/cards/d/DesertsHold.java | 4 +- Mage.Sets/src/mage/cards/d/Dichotomancy.java | 98 +++ .../src/mage/cards/d/DimensionalBreach.java | 4 +- .../src/mage/cards/d/DimirDoppelganger.java | 4 +- Mage.Sets/src/mage/cards/d/Domestication.java | 4 +- .../src/mage/cards/d/DominatorDrone.java | 4 +- .../src/mage/cards/d/DragonmasterOutcast.java | 4 +- Mage.Sets/src/mage/cards/d/DrainPower.java | 2 + .../src/mage/cards/d/DreadCacodemon.java | 4 +- Mage.Sets/src/mage/cards/d/DreadWanderer.java | 11 +- Mage.Sets/src/mage/cards/d/DreamPillager.java | 6 +- .../src/mage/cards/d/DreamcallerSiren.java | 4 +- Mage.Sets/src/mage/cards/d/DreampodDruid.java | 4 +- .../src/mage/cards/d/DreamspoilerWitches.java | 5 +- .../src/mage/cards/d/DuergarHedgeMage.java | 6 +- .../src/mage/cards/d/DuneriderOutlaw.java | 4 +- .../src/mage/cards/d/DuskwatchRecruiter.java | 4 +- Mage.Sets/src/mage/cards/d/DwynensElite.java | 4 +- Mage.Sets/src/mage/cards/e/EarwigSquad.java | 4 +- Mage.Sets/src/mage/cards/e/EdgarMarkov.java | 4 +- Mage.Sets/src/mage/cards/e/Electryte.java | 2 +- .../mage/cards/e/EmissaryOfTheSleepless.java | 4 +- .../src/mage/cards/e/EpharaGodOfThePolis.java | 6 +- Mage.Sets/src/mage/cards/e/EpicStruggle.java | 4 +- Mage.Sets/src/mage/cards/e/ErgRaiders.java | 4 +- Mage.Sets/src/mage/cards/e/EvilTwin.java | 4 +- .../src/mage/cards/e/ExcavationElephant.java | 4 +- .../src/mage/cards/e/ExileIntoDarkness.java | 4 +- .../src/mage/cards/e/ExtricatorOfSin.java | 4 +- .../src/mage/cards/e/EyesOfTheWisent.java | 3 +- .../src/mage/cards/f/FaerieMiscreant.java | 4 +- .../src/mage/cards/f/FaerieTauntings.java | 3 +- .../mage/cards/f/FairgroundsTrumpeter.java | 4 +- .../src/mage/cards/f/FaithfulSquire.java | 4 +- .../src/mage/cards/f/FanaticOfXenagos.java | 4 +- .../src/mage/cards/f/FathomFleetCaptain.java | 4 +- .../src/mage/cards/f/FeastOnTheFallen.java | 4 +- .../src/mage/cards/f/FelidarSovereign.java | 4 +- Mage.Sets/src/mage/cards/f/FiremaneAngel.java | 4 +- Mage.Sets/src/mage/cards/f/FirstResponse.java | 4 +- .../mage/cards/f/FlameWreathedPhoenix.java | 4 +- .../src/mage/cards/f/FlameheartWerewolf.java | 4 +- .../src/mage/cards/f/FlamewakePhoenix.java | 4 +- Mage.Sets/src/mage/cards/f/FoundryHornet.java | 4 +- Mage.Sets/src/mage/cards/f/FrontierSiege.java | 5 +- Mage.Sets/src/mage/cards/f/FurnaceDragon.java | 4 +- .../src/mage/cards/g/GatekeeperOfMalakir.java | 4 +- .../src/mage/cards/g/GatstafArsonists.java | 4 +- Mage.Sets/src/mage/cards/g/GatstafHowler.java | 4 +- .../src/mage/cards/g/GatstafRavagers.java | 4 +- .../src/mage/cards/g/GatstafShepherd.java | 4 +- .../src/mage/cards/g/GeierReachBandit.java | 4 +- .../src/mage/cards/g/GenesisChamber.java | 4 +- .../src/mage/cards/g/GhirapurOrrery.java | 4 +- .../src/mage/cards/g/GhituChronicler.java | 4 +- .../src/mage/cards/g/GhituJourneymage.java | 4 +- .../src/mage/cards/g/GibberingFiend.java | 4 +- .../{GiftofGrowth.java => GiftOfGrowth.java} | 11 +- Mage.Sets/src/mage/cards/g/Gigantiform.java | 4 +- Mage.Sets/src/mage/cards/g/Gigantoplasm.java | 4 +- Mage.Sets/src/mage/cards/g/GildedCerodon.java | 4 +- .../mage/cards/g/GiselaTheBrokenBlade.java | 4 +- .../mage/cards/g/GlenElendraPranksters.java | 3 +- Mage.Sets/src/mage/cards/g/Glimmervoid.java | 4 +- .../src/mage/cards/g/GoblinBushwhacker.java | 4 +- .../src/mage/cards/g/GoblinRuinblaster.java | 4 +- Mage.Sets/src/mage/cards/g/GrafRats.java | 5 +- .../src/mage/cards/g/GraveScrabbler.java | 4 +- .../src/mage/cards/g/GreenerPastures.java | 4 +- .../src/mage/cards/g/GrizzledOutcasts.java | 4 +- .../mage/cards/g/GrowingRitesOfItlimoc.java | 4 +- .../src/mage/cards/g/GwyllionHedgeMage.java | 6 +- Mage.Sets/src/mage/cards/h/HagHedgeMage.java | 6 +- .../mage/cards/h/HanweirMilitiaCaptain.java | 4 +- .../src/mage/cards/h/HanweirWatchkeep.java | 4 +- .../mage/cards/h/HaphazardBombardment.java | 4 +- .../mage/cards/h/HeartPiercerManticore.java | 61 +- .../mage/cards/h/HeartstabberMosquito.java | 4 +- Mage.Sets/src/mage/cards/h/HeatShimmer.java | 4 +- .../src/mage/cards/h/HeirOfTheWilds.java | 4 +- Mage.Sets/src/mage/cards/h/HelixPinnacle.java | 4 +- .../src/mage/cards/h/HellfireMongrel.java | 4 +- .../src/mage/cards/h/HellkiteTyrant.java | 4 +- .../mage/cards/h/HermitOfTheNatterknolls.java | 3 +- .../mage/cards/h/HeroicReinforcements.java | 4 +- .../src/mage/cards/h/HiddenAncients.java | 4 +- Mage.Sets/src/mage/cards/h/HiddenGibbons.java | 5 +- .../src/mage/cards/h/HiddenGuerrillas.java | 5 +- .../src/mage/cards/h/HiddenHerbalists.java | 4 +- Mage.Sets/src/mage/cards/h/HiddenHerd.java | 5 +- Mage.Sets/src/mage/cards/h/HiddenSpider.java | 5 +- .../src/mage/cards/h/HiddenStockpile.java | 4 +- .../src/mage/cards/h/HinterlandHermit.java | 4 +- .../src/mage/cards/h/HinterlandLogger.java | 4 +- .../src/mage/cards/h/HinterlandScourge.java | 4 +- Mage.Sets/src/mage/cards/h/HiredMuscle.java | 5 +- .../src/mage/cards/h/HollowbornBarghest.java | 4 +- .../mage/cards/h/HollowhengeScavenger.java | 4 +- Mage.Sets/src/mage/cards/h/HowlpackAlpha.java | 3 +- .../src/mage/cards/h/HowlpackOfEstwald.java | 4 +- .../mage/cards/h/HuntmasterOfTheFells.java | 4 +- Mage.Sets/src/mage/cards/h/Hypnox.java | 4 +- Mage.Sets/src/mage/cards/i/ImaginaryPet.java | 4 +- .../src/mage/cards/i/ImpendingDisaster.java | 4 +- Mage.Sets/src/mage/cards/i/ImperialMask.java | 4 +- .../mage/cards/i/InallaArchmageRitualist.java | 4 +- Mage.Sets/src/mage/cards/i/InameAsOne.java | 4 +- .../src/mage/cards/i/IncreasingAmbition.java | 4 +- .../src/mage/cards/i/IncreasingConfusion.java | 4 +- .../src/mage/cards/i/IncreasingDevotion.java | 4 +- .../src/mage/cards/i/IncreasingSavagery.java | 4 +- .../src/mage/cards/i/IncreasingVengeance.java | 4 +- .../src/mage/cards/i/InexorableBlob.java | 8 +- .../src/mage/cards/i/InfernoHellion.java | 4 +- .../src/mage/cards/i/InstigatorGang.java | 4 +- .../src/mage/cards/i/IronFistOfTheEmpire.java | 4 +- Mage.Sets/src/mage/cards/i/Ironfang.java | 4 +- .../src/mage/cards/i/IshkanahGrafwidow.java | 4 +- .../src/mage/cards/i/IvoryCraneNetsuke.java | 4 +- Mage.Sets/src/mage/cards/i/IvoryGargoyle.java | 54 ++ Mage.Sets/src/mage/cards/j/JaggedPoppet.java | 4 +- .../src/mage/cards/j/JeeringInstigator.java | 4 +- .../src/mage/cards/j/JosuVessLichKnight.java | 4 +- .../src/mage/cards/k/KangeeAerieKeeper.java | 4 +- .../src/mage/cards/k/KarplusanHound.java | 4 +- Mage.Sets/src/mage/cards/k/KeeperOfKeys.java | 4 +- .../src/mage/cards/k/KeeperOfTheBeasts.java | 111 +++ .../src/mage/cards/k/KeldonBerserker.java | 4 +- .../src/mage/cards/k/KeldonOverseer.java | 4 +- .../src/mage/cards/k/KessigForgemaster.java | 4 +- Mage.Sets/src/mage/cards/k/Kezzerdrix.java | 4 +- .../mage/cards/k/KikiJikiMirrorBreaker.java | 4 +- Mage.Sets/src/mage/cards/k/KitsuneMystic.java | 5 +- .../mage/cards/k/KiyomaroFirstToStand.java | 4 +- .../src/mage/cards/k/KjeldoranHomeGuard.java | 4 +- .../mage/cards/k/KnightOfTheWhiteOrchid.java | 4 +- Mage.Sets/src/mage/cards/k/Kookus.java | 4 +- Mage.Sets/src/mage/cards/k/KorAeronaut.java | 10 +- .../src/mage/cards/k/KorSanctifiers.java | 4 +- .../cards/k/KozilekTheGreatDistortion.java | 4 +- .../src/mage/cards/k/KrallenhordeHowler.java | 4 +- .../src/mage/cards/k/KrallenhordeKiller.java | 4 +- .../src/mage/cards/k/KrallenhordeWantons.java | 4 +- .../src/mage/cards/k/KrondTheDawnClad.java | 4 +- Mage.Sets/src/mage/cards/k/KrosanDruid.java | 4 +- Mage.Sets/src/mage/cards/k/KruinOutlaw.java | 4 +- Mage.Sets/src/mage/cards/k/KyrenLegate.java | 2 +- .../src/mage/cards/k/KytheonHeroOfAkros.java | 4 +- .../src/mage/cards/l/LagonnaBandElder.java | 4 +- .../src/mage/cards/l/LambholtButcher.java | 4 +- Mage.Sets/src/mage/cards/l/LambholtElder.java | 4 +- .../src/mage/cards/l/LambholtPacifist.java | 4 +- .../mage/cards/l/LamplighterOfSelhoff.java | 4 +- Mage.Sets/src/mage/cards/l/LandTax.java | 4 +- .../src/mage/cards/l/LatchkeyFaerie.java | 4 +- Mage.Sets/src/mage/cards/l/LavabornMuse.java | 4 +- .../mage/cards/l/LazavDimirMastermind.java | 4 +- .../src/mage/cards/l/LeoninVanguard.java | 4 +- Mage.Sets/src/mage/cards/l/Leviathan.java | 2 +- Mage.Sets/src/mage/cards/l/Lifeline.java | 4 +- .../src/mage/cards/l/LilianasContract.java | 4 +- .../src/mage/cards/l/LinvalaThePreserver.java | 6 +- .../src/mage/cards/l/LivingArtifact.java | 5 +- Mage.Sets/src/mage/cards/l/LoneRider.java | 4 +- .../cards/l/LoneWolfOfTheNatterknolls.java | 5 +- .../src/mage/cards/l/LudevicsTestSubject.java | 2 +- .../src/mage/cards/l/LumengridDrake.java | 4 +- .../src/mage/cards/l/LuminarchAscension.java | 4 +- Mage.Sets/src/mage/cards/m/MadDog.java | 4 +- .../src/mage/cards/m/MaliciousAffliction.java | 4 +- Mage.Sets/src/mage/cards/m/ManaBloom.java | 4 +- Mage.Sets/src/mage/cards/m/ManaVault.java | 4 +- Mage.Sets/src/mage/cards/m/ManicScribe.java | 4 +- .../src/mage/cards/m/MaraudingLooter.java | 4 +- .../src/mage/cards/m/MarduHeartPiercer.java | 4 +- .../src/mage/cards/m/MarduHordechief.java | 4 +- .../src/mage/cards/m/MarduSkullhunter.java | 4 +- .../src/mage/cards/m/MarduWarshrieker.java | 4 +- .../src/mage/cards/m/MarshalsAnthem.java | 5 +- .../src/mage/cards/m/MaskOfIntolerance.java | 4 +- Mage.Sets/src/mage/cards/m/Massacre.java | 2 +- .../src/mage/cards/m/MausoleumHarpy.java | 4 +- .../src/mage/cards/m/MayorOfAvabruck.java | 4 +- .../src/mage/cards/m/MercilessPredator.java | 4 +- .../src/mage/cards/m/MercurialPretender.java | 6 +- .../src/mage/cards/m/MightMakesRight.java | 4 +- .../src/mage/cards/m/MindwrackDemon.java | 4 +- .../src/mage/cards/m/MinionReflector.java | 6 +- .../src/mage/cards/m/MirrorSigilSergeant.java | 4 +- .../mage/cards/m/MizziumTransreliquat.java | 4 +- Mage.Sets/src/mage/cards/m/MoggSalvage.java | 2 +- Mage.Sets/src/mage/cards/m/MoldShambler.java | 4 +- .../src/mage/cards/m/MoltenFirebird.java | 52 ++ .../src/mage/cards/m/MonasterySiege.java | 10 +- .../src/mage/cards/m/MondronenShaman.java | 4 +- .../src/mage/cards/m/MoonriseIntruder.java | 4 +- .../src/mage/cards/m/MoonscarredWerewolf.java | 4 +- .../src/mage/cards/m/MorkrutBanshee.java | 4 +- Mage.Sets/src/mage/cards/m/MortalCombat.java | 4 +- Mage.Sets/src/mage/cards/m/Mournwillow.java | 4 +- Mage.Sets/src/mage/cards/m/MuseVessel.java | 185 +++++ Mage.Sets/src/mage/cards/m/MyrServitor.java | 4 +- Mage.Sets/src/mage/cards/m/MysticBarrier.java | 100 +-- Mage.Sets/src/mage/cards/n/NantukoShaman.java | 4 +- .../src/mage/cards/n/NavigatorsRuin.java | 4 +- .../src/mage/cards/n/NearDeathExperience.java | 4 +- Mage.Sets/src/mage/cards/n/NeckBreaker.java | 4 +- .../src/mage/cards/n/NecraSanctuary.java | 4 +- Mage.Sets/src/mage/cards/n/Necromancy.java | 4 +- .../src/mage/cards/n/NessianDemolok.java | 4 +- .../src/mage/cards/n/NessianWildsRavager.java | 4 +- Mage.Sets/src/mage/cards/n/NetherSpirit.java | 4 +- Mage.Sets/src/mage/cards/n/Nightcreep.java | 100 +++ .../src/mage/cards/n/NightfallPredator.java | 4 +- .../mage/cards/n/NightscapeBattlemage.java | 6 +- Mage.Sets/src/mage/cards/n/Nihilith.java | 4 +- .../src/mage/cards/n/NissaVastwoodSeer.java | 4 +- .../src/mage/cards/n/NoggleHedgeMage.java | 6 +- Mage.Sets/src/mage/cards/o/OathOfChandra.java | 4 +- Mage.Sets/src/mage/cards/o/OathOfLiliana.java | 4 +- .../mage/cards/o/OathkeeperTakenosDaisho.java | 4 +- .../src/mage/cards/o/ObsessiveSkinner.java | 4 +- Mage.Sets/src/mage/cards/o/OgreSavant.java | 5 +- Mage.Sets/src/mage/cards/o/OneOfThePack.java | 4 +- Mage.Sets/src/mage/cards/o/OpalArchangel.java | 5 +- Mage.Sets/src/mage/cards/o/OpalCaryatid.java | 4 +- Mage.Sets/src/mage/cards/o/OpalChampion.java | 5 +- Mage.Sets/src/mage/cards/o/OpalGargoyle.java | 5 +- Mage.Sets/src/mage/cards/o/OpalGuardian.java | 5 +- .../src/mage/cards/o/OpalLakeGatekeepers.java | 4 +- Mage.Sets/src/mage/cards/o/Ophiomancer.java | 4 +- Mage.Sets/src/mage/cards/o/OracleOfBones.java | 4 +- .../src/mage/cards/o/OranRiefRecluse.java | 4 +- Mage.Sets/src/mage/cards/o/OrcishMine.java | 103 +++ Mage.Sets/src/mage/cards/o/Ornitharch.java | 4 +- Mage.Sets/src/mage/cards/o/OsaiVultures.java | 4 +- .../src/mage/cards/o/OversoldCemetery.java | 4 +- .../cards/p/PadeemConsulOfInnovation.java | 4 +- Mage.Sets/src/mage/cards/p/PalaceSiege.java | 3 +- .../src/mage/cards/p/PaladinOfAtonement.java | 4 +- Mage.Sets/src/mage/cards/p/PardicDragon.java | 4 +- .../src/mage/cards/p/PatriciansScorn.java | 4 +- Mage.Sets/src/mage/cards/p/PaupersCage.java | 4 +- Mage.Sets/src/mage/cards/p/Pestilence.java | 4 +- .../src/mage/cards/p/PhageTheUntouchable.java | 4 +- .../src/mage/cards/p/PhantasmalImage.java | 4 +- Mage.Sets/src/mage/cards/p/PharagaxGiant.java | 4 +- Mage.Sets/src/mage/cards/p/PitKeeper.java | 4 +- .../src/mage/cards/p/PlanarCollapse.java | 4 +- Mage.Sets/src/mage/cards/p/PlatedPegasus.java | 83 +++ Mage.Sets/src/mage/cards/p/PortalMage.java | 9 +- Mage.Sets/src/mage/cards/p/Portcullis.java | 5 +- Mage.Sets/src/mage/cards/p/PouncingWurm.java | 4 +- .../src/mage/cards/p/PredatoryFocus.java | 81 +++ .../src/mage/cards/p/PrematureBurial.java | 143 ++++ .../src/mage/cards/p/ProgenitorMimic.java | 8 +- .../src/mage/cards/p/ProwlingPangolin.java | 2 +- Mage.Sets/src/mage/cards/p/Pyrohemia.java | 4 +- Mage.Sets/src/mage/cards/q/QueenMarchesa.java | 4 +- .../mage/cards/q/QuicksilverGargantuan.java | 2 +- Mage.Sets/src/mage/cards/r/RaidersWake.java | 4 +- Mage.Sets/src/mage/cards/r/RakaSanctuary.java | 4 +- .../src/mage/cards/r/RakdosAugermage.java | 94 +++ .../src/mage/cards/r/RakdosRiteknife.java | 103 +++ .../src/mage/cards/r/RampagingWerewolf.java | 4 +- .../src/mage/cards/r/RasputinDreamweaver.java | 4 +- .../src/mage/cards/r/RavagerOfTheFells.java | 4 +- .../src/mage/cards/r/RecklessBushwhacker.java | 4 +- Mage.Sets/src/mage/cards/r/RecklessWaif.java | 4 +- .../src/mage/cards/r/ReclusiveWight.java | 4 +- .../src/mage/cards/r/RefreshingRain.java | 2 +- .../src/mage/cards/r/RegalBloodlord.java | 4 +- .../src/mage/cards/r/RegnaTheRedeemer.java | 4 +- Mage.Sets/src/mage/cards/r/ReiverDemon.java | 4 +- .../src/mage/cards/r/RekindledFlame.java | 4 +- .../src/mage/cards/r/RenegadeRallier.java | 4 +- .../src/mage/cards/r/ResplendentGriffin.java | 4 +- Mage.Sets/src/mage/cards/r/RevelInRiches.java | 4 +- .../src/mage/cards/r/RevenantPatriarch.java | 4 +- Mage.Sets/src/mage/cards/r/RhoxMeditant.java | 4 +- .../src/mage/cards/r/RingOfEvosIsle.java | 4 +- Mage.Sets/src/mage/cards/r/RingOfKalonia.java | 4 +- Mage.Sets/src/mage/cards/r/RingOfThune.java | 4 +- Mage.Sets/src/mage/cards/r/RingOfValkas.java | 4 +- Mage.Sets/src/mage/cards/r/RingOfXathrid.java | 4 +- Mage.Sets/src/mage/cards/r/RocEgg.java | 2 +- Mage.Sets/src/mage/cards/r/RuinRaider.java | 4 +- Mage.Sets/src/mage/cards/r/RukhEgg.java | 3 +- .../src/mage/cards/r/RushingTideZubera.java | 4 +- .../src/mage/cards/r/RushwoodLegate.java | 2 +- .../src/mage/cards/s/SabertoothOutrider.java | 4 +- .../src/mage/cards/s/SageOfAncientLore.java | 4 +- .../mage/cards/s/SakashimaTheImpostor.java | 4 +- Mage.Sets/src/mage/cards/s/SandStrangler.java | 4 +- .../src/mage/cards/s/SaprazzanLegate.java | 5 +- Mage.Sets/src/mage/cards/s/Sarcomancy.java | 4 +- .../src/mage/cards/s/SarkhanDragonsoul.java | 9 +- .../src/mage/cards/s/SaruliGatekeepers.java | 4 +- .../src/mage/cards/s/ScabClanBerserker.java | 4 +- Mage.Sets/src/mage/cards/s/ScaldingTongs.java | 4 +- .../src/mage/cards/s/ScholarOfStars.java | 4 +- .../src/mage/cards/s/ScionOfVituGhazi.java | 5 +- .../src/mage/cards/s/ScornedVillager.java | 4 +- .../src/mage/cards/s/ScourgeOfTheThrone.java | 4 +- .../src/mage/cards/s/ScreechingSilcaw.java | 5 +- Mage.Sets/src/mage/cards/s/SecondChance.java | 4 +- .../src/mage/cards/s/SedraxisAlchemist.java | 4 +- Mage.Sets/src/mage/cards/s/SeeRed.java | 4 +- .../src/mage/cards/s/SelkieHedgeMage.java | 6 +- .../src/mage/cards/s/ShadowbornDemon.java | 4 +- .../src/mage/cards/s/ShapeOfTheWiitigo.java | 133 ++++ .../src/mage/cards/s/ShipwreckLooter.java | 4 +- .../src/mage/cards/s/ShivanEmissary.java | 4 +- .../src/mage/cards/s/ShorelineSalvager.java | 4 +- .../src/mage/cards/s/ShriekingGrotesque.java | 4 +- Mage.Sets/src/mage/cards/s/ShrikeHarpy.java | 4 +- .../mage/cards/s/ShrineOfBoundlessGrowth.java | 7 +- .../src/mage/cards/s/ShrineOfBurningRage.java | 10 +- .../mage/cards/s/ShrineOfLimitlessPower.java | 8 +- .../mage/cards/s/ShrineOfLoyalLegions.java | 8 +- .../mage/cards/s/ShrineOfPiercingVision.java | 7 +- Mage.Sets/src/mage/cards/s/SickleDancer.java | 4 +- Mage.Sets/src/mage/cards/s/SiegeBehemoth.java | 56 +- .../src/mage/cards/s/SilkweaverElite.java | 4 +- .../src/mage/cards/s/SilverpeltWerewolf.java | 4 +- .../mage/cards/s/SirenOfTheFangedCoast.java | 4 +- Mage.Sets/src/mage/cards/s/SithAssassin.java | 4 +- .../src/mage/cards/s/SithInquisitor.java | 4 +- Mage.Sets/src/mage/cards/s/SithMagic.java | 4 +- .../src/mage/cards/s/SithManipulator.java | 6 +- Mage.Sets/src/mage/cards/s/SithMarauder.java | 4 +- Mage.Sets/src/mage/cards/s/SithMindseer.java | 4 +- Mage.Sets/src/mage/cards/s/SithSorcerer.java | 4 +- Mage.Sets/src/mage/cards/s/SivvisRuse.java | 2 +- Mage.Sets/src/mage/cards/s/SkylineDespot.java | 4 +- .../mage/cards/s/SlaughterhouseBouncer.java | 4 +- .../mage/cards/s/SlinnVodaTheRisingDeep.java | 4 +- .../mage/cards/s/SmeltWardGatekeepers.java | 4 +- .../mage/cards/s/SnakeOfTheGoldenGrove.java | 4 +- .../src/mage/cards/s/SokenzanRenegade.java | 4 +- Mage.Sets/src/mage/cards/s/SolemnRecruit.java | 4 +- .../src/mage/cards/s/SolitaryHunter.java | 4 +- Mage.Sets/src/mage/cards/s/SoulSwallower.java | 4 +- Mage.Sets/src/mage/cards/s/SpiritMirror.java | 4 +- .../src/mage/cards/s/SpiritualSanctuary.java | 4 +- Mage.Sets/src/mage/cards/s/SplinterTwin.java | 4 +- .../src/mage/cards/s/StalkingVampire.java | 3 +- Mage.Sets/src/mage/cards/s/StalkingYeti.java | 4 +- .../src/mage/cards/s/StampedingElkHerd.java | 4 +- .../src/mage/cards/s/SteamcoreWeird.java | 4 +- .../src/mage/cards/s/StormFleetArsonist.java | 4 +- .../mage/cards/s/StormFleetPyromancer.java | 4 +- Mage.Sets/src/mage/cards/s/StormFleetSpy.java | 4 +- Mage.Sets/src/mage/cards/s/StormTheVault.java | 4 +- .../mage/cards/s/StormscapeBattlemage.java | 6 +- Mage.Sets/src/mage/cards/s/StreetSavvy.java | 80 +++ Mage.Sets/src/mage/cards/s/Submerge.java | 2 +- Mage.Sets/src/mage/cards/s/SummonersEgg.java | 2 +- Mage.Sets/src/mage/cards/s/SunDroplet.java | 5 +- .../src/mage/cards/s/SunscapeBattlemage.java | 6 +- .../src/mage/cards/s/SunspireGatekeepers.java | 4 +- Mage.Sets/src/mage/cards/s/SupplyCaravan.java | 4 +- .../src/mage/cards/s/SurrakTheHuntCaller.java | 4 +- Mage.Sets/src/mage/cards/s/SwiftSilence.java | 79 ++ .../src/mage/cards/t/TaigamOjutaiMaster.java | 4 +- Mage.Sets/src/mage/cards/t/TempestOwl.java | 4 +- .../mage/cards/t/TemptWithImmortality.java | 4 +- .../src/mage/cards/t/TemptWithVengeance.java | 4 +- .../mage/cards/t/TerritorialAllosaurus.java | 4 +- .../src/mage/cards/t/TerrorOfKruinPass.java | 4 +- .../src/mage/cards/t/TestOfEndurance.java | 4 +- .../src/mage/cards/t/ThaumaticCompass.java | 4 +- .../src/mage/cards/t/ThespiansStage.java | 4 +- .../src/mage/cards/t/ThickSkinnedGoblin.java | 76 ++ .../src/mage/cards/t/ThicketElemental.java | 4 +- Mage.Sets/src/mage/cards/t/ThirstingAxe.java | 4 +- .../mage/cards/t/ThornscapeBattlemage.java | 6 +- Mage.Sets/src/mage/cards/t/ThranQuarry.java | 4 +- .../{ThroneofGeth.java => ThroneOfGeth.java} | 14 +- Mage.Sets/src/mage/cards/t/Thumbscrews.java | 4 +- Mage.Sets/src/mage/cards/t/ThunderBrute.java | 4 +- .../mage/cards/t/ThunderscapeBattlemage.java | 6 +- .../src/mage/cards/t/TilonallisKnight.java | 4 +- .../src/mage/cards/t/TimberShredder.java | 4 +- .../src/mage/cards/t/TimelyHordemate.java | 4 +- .../src/mage/cards/t/TinStreetHooligan.java | 4 +- .../src/mage/cards/t/TolarianEmissary.java | 4 +- .../src/mage/cards/t/ToolcraftExemplar.java | 4 +- .../src/mage/cards/t/ToothCollector.java | 4 +- Mage.Sets/src/mage/cards/t/Topplegeist.java | 4 +- Mage.Sets/src/mage/cards/t/TorchSlinger.java | 4 +- .../src/mage/cards/t/TormentedPariah.java | 4 +- .../src/mage/cards/t/TovolarsMagehunter.java | 4 +- .../src/mage/cards/t/TriumphOfCruelty.java | 4 +- .../src/mage/cards/t/TriumphOfFerocity.java | 4 +- .../src/mage/cards/t/TwilightProphet.java | 4 +- Mage.Sets/src/mage/cards/t/Twinflame.java | 4 +- .../src/mage/cards/t/TyrantOfValakut.java | 4 +- .../src/mage/cards/u/UbulSarGatekeepers.java | 4 +- .../mage/cards/u/UlrichOfTheKrallenhorde.java | 4 +- .../mage/cards/u/UlrichUncontestedAlpha.java | 4 +- Mage.Sets/src/mage/cards/u/UlvenwaldBear.java | 4 +- .../src/mage/cards/u/UlvenwaldMystics.java | 4 +- .../mage/cards/u/UlvenwaldPrimordials.java | 4 +- .../src/mage/cards/u/UnexpectedlyAbsent.java | 3 +- .../src/mage/cards/u/UnquenchableThirst.java | 4 +- .../mage/cards/u/UnstableShapeshifter.java | 4 +- .../src/mage/cards/u/UrborgEmissary.java | 4 +- Mage.Sets/src/mage/cards/u/UrborgStalker.java | 4 +- Mage.Sets/src/mage/cards/v/VengefulRebel.java | 4 +- .../src/mage/cards/v/VentifactBottle.java | 4 +- .../src/mage/cards/v/VerdelothTheAncient.java | 4 +- .../src/mage/cards/v/VerduranEmissary.java | 4 +- .../src/mage/cards/v/VesuvanDoppelganger.java | 6 +- .../src/mage/cards/v/VesuvanShapeshifter.java | 4 +- .../src/mage/cards/v/VigeanIntuition.java | 124 ++++ .../src/mage/cards/v/VildinPackAlpha.java | 4 +- .../src/mage/cards/v/VillageIronsmith.java | 4 +- .../src/mage/cards/v/VillageMessenger.java | 4 +- .../src/mage/cards/v/VillagersOfEstwald.java | 4 +- .../src/mage/cards/v/VirtussManeuver.java | 3 +- Mage.Sets/src/mage/cards/v/VivienReid.java | 8 +- .../src/mage/cards/v/VoiceOfResurgence.java | 70 +- Mage.Sets/src/mage/cards/v/VoyagerDrake.java | 5 +- .../src/mage/cards/v/VraskasConquistador.java | 4 +- Mage.Sets/src/mage/cards/w/Wakedancer.java | 4 +- .../src/mage/cards/w/WakeningSunsAvatar.java | 4 +- .../src/mage/cards/w/WanderingChampion.java | 4 +- .../src/mage/cards/w/WaterspoutElemental.java | 4 +- .../src/mage/cards/w/WeatherseedTotem.java | 5 +- .../src/mage/cards/w/WellOfDiscovery.java | 4 +- Mage.Sets/src/mage/cards/w/WellOfLife.java | 4 +- .../mage/cards/w/WerewolfOfAncientHunger.java | 4 +- .../src/mage/cards/w/WerewolfRansacker.java | 4 +- .../src/mage/cards/w/WhirlingDervish.java | 4 +- Mage.Sets/src/mage/cards/w/WildPair.java | 4 +- Mage.Sets/src/mage/cards/w/WildbloodPack.java | 4 +- Mage.Sets/src/mage/cards/w/WingmateRoc.java | 4 +- .../src/mage/cards/w/WitheringWisps.java | 4 +- .../src/mage/cards/w/WolfbittenCaptive.java | 4 +- .../src/mage/cards/w/WoodlandSleuth.java | 4 +- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 251 +++++++ ...reathofGeists.java => WreathOfGeists.java} | 10 +- Mage.Sets/src/mage/cards/w/WretchedCamel.java | 4 +- Mage.Sets/src/mage/cards/w/WritOfPassage.java | 7 +- .../mage/cards/z/ZacamaPrimalCalamity.java | 4 +- Mage.Sets/src/mage/cards/z/ZealotsEnDal.java | 4 +- Mage.Sets/src/mage/sets/Alliances.java | 1 + Mage.Sets/src/mage/sets/Coldsnap.java | 3 + .../mage/sets/CommanderAnthologyVolumeII.java | 675 +++++++++--------- Mage.Sets/src/mage/sets/Dissension.java | 7 + Mage.Sets/src/mage/sets/Dominaria.java | 2 +- Mage.Sets/src/mage/sets/Exodus.java | 3 +- Mage.Sets/src/mage/sets/FourthEdition.java | 595 +++++++-------- Mage.Sets/src/mage/sets/Guildpact.java | 2 + Mage.Sets/src/mage/sets/Homelands.java | 1 + Mage.Sets/src/mage/sets/Innistrad.java | 2 +- .../src/mage/sets/LimitedEditionAlpha.java | 1 + .../src/mage/sets/LimitedEditionBeta.java | 1 + Mage.Sets/src/mage/sets/MastersEditionII.java | 1 + Mage.Sets/src/mage/sets/MastersEditionIV.java | 1 + Mage.Sets/src/mage/sets/MirrodinBesieged.java | 2 +- Mage.Sets/src/mage/sets/NinthEdition.java | 1 + Mage.Sets/src/mage/sets/PlanarChaos.java | 2 + Mage.Sets/src/mage/sets/ScarsOfMirrodin.java | 2 +- Mage.Sets/src/mage/sets/Tempest.java | 1 + Mage.Sets/src/mage/sets/TimeSpiral.java | 5 + Mage.Sets/src/mage/sets/UnlimitedEdition.java | 1 + .../oneshot/library/PutToLibraryTest.java | 34 +- .../cards/copy/KikiJikiMirrorBreakerTest.java | 10 +- .../org/mage/test/combat/FirstStrikeTest.java | 40 ++ .../java/org/mage/test/player/TestPlayer.java | 58 +- .../java/org/mage/test/stub/PlayerStub.java | 22 + .../java/mage/verify/VerifyCardDataTest.java | 8 +- ...nctuaryInterveningIfTriggeredAbility.java} | 6 +- .../costs/AlternativeCostSourceAbility.java | 2 +- .../abilities/costs/mana/ManaCostImpl.java | 4 +- .../abilities/costs/mana/ManaCostsImpl.java | 36 +- ...ditionalInterveningIfTriggeredAbility.java | 104 +++ .../ConditionalTriggeredAbility.java | 9 +- .../abilities/effects/ContinuousEffects.java | 2 +- .../common/CreateTokenCopyTargetEffect.java | 28 +- .../effects/common/DoIfCostPaid.java | 1 + .../LookLibraryAndPickControllerEffect.java | 1 + .../RevealHandSourceControllerEffect.java | 42 ++ .../SkipNextDrawStepControllerEffect.java | 74 ++ .../continuous/BecomesColorAllEffect.java | 154 ++++ .../counter/RemoveCountersAttachedEffect.java | 91 +++ .../abilities/effects/keyword/EchoEffect.java | 94 +++ .../keyword/CumulativeUpkeepAbility.java | 3 +- .../mage/abilities/keyword/EchoAbility.java | 80 +-- .../mage/abilities/keyword/EvokeAbility.java | 4 +- .../mage/abilities/keyword/RepairAbility.java | 14 +- .../abilities/keyword/SuspendAbility.java | 18 +- .../abilities/meta/OrTriggeredAbility.java | 136 ++++ Mage/src/main/java/mage/cards/CardImpl.java | 2 +- .../mage/constants/AsThoughEffectType.java | 3 +- .../main/java/mage/counters/CounterType.java | 1 + .../mageobject/AbilityPredicate.java | 9 +- .../mageobject/VariableManaCostPredicate.java | 8 +- .../predicate/other/OwnerIdPredicate.java | 4 +- .../other/PlayerCanGainLifePredicate.java | 7 +- .../permanent/CounterAnyPredicate.java | 8 +- .../permanent/EnchantedPredicate.java | 15 +- .../permanent/EquippedPredicate.java | 17 +- Mage/src/main/java/mage/game/Game.java | 2 + Mage/src/main/java/mage/game/GameImpl.java | 32 + .../main/java/mage/game/combat/Combat.java | 65 +- .../java/mage/game/combat/CombatGroup.java | 34 +- .../game/permanent/token/AvatarToken2.java | 3 +- .../game/permanent/token/BeastToken4.java | 45 ++ Mage/src/main/java/mage/game/stack/Spell.java | 16 + .../main/java/mage/game/stack/SpellStack.java | 5 +- Mage/src/main/java/mage/players/ManaPool.java | 59 +- Mage/src/main/java/mage/players/Player.java | 6 + .../main/java/mage/players/PlayerImpl.java | 45 +- Mage/src/main/java/mage/util/CardUtil.java | 13 +- .../common/AttackedLastTurnWatcher.java | 6 +- Utils/known-sets.txt | 1 + Utils/mtg-cards-data.txt | 16 +- Utils/mtg-sets-data.txt | 1 + 620 files changed, 5627 insertions(+), 2239 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AetherWeb.java create mode 100644 Mage.Sets/src/mage/cards/a/Aetherplasm.java create mode 100644 Mage.Sets/src/mage/cards/b/BalduvianFallen.java create mode 100644 Mage.Sets/src/mage/cards/b/BoobyTrap.java rename Mage.Sets/src/mage/cards/b/{BurntheImpure.java => BurnTheImpure.java} (69%) create mode 100644 Mage.Sets/src/mage/cards/c/CoverOfWinter.java create mode 100644 Mage.Sets/src/mage/cards/c/CyclopeanGiant.java create mode 100644 Mage.Sets/src/mage/cards/d/Dichotomancy.java rename Mage.Sets/src/mage/cards/g/{GiftofGrowth.java => GiftOfGrowth.java} (84%) create mode 100644 Mage.Sets/src/mage/cards/i/IvoryGargoyle.java create mode 100644 Mage.Sets/src/mage/cards/k/KeeperOfTheBeasts.java create mode 100644 Mage.Sets/src/mage/cards/m/MoltenFirebird.java create mode 100644 Mage.Sets/src/mage/cards/m/MuseVessel.java create mode 100644 Mage.Sets/src/mage/cards/n/Nightcreep.java create mode 100644 Mage.Sets/src/mage/cards/o/OrcishMine.java create mode 100644 Mage.Sets/src/mage/cards/p/PlatedPegasus.java create mode 100644 Mage.Sets/src/mage/cards/p/PredatoryFocus.java create mode 100644 Mage.Sets/src/mage/cards/p/PrematureBurial.java create mode 100644 Mage.Sets/src/mage/cards/r/RakdosAugermage.java create mode 100644 Mage.Sets/src/mage/cards/r/RakdosRiteknife.java create mode 100644 Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java create mode 100644 Mage.Sets/src/mage/cards/s/StreetSavvy.java create mode 100644 Mage.Sets/src/mage/cards/s/SwiftSilence.java create mode 100644 Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java rename Mage.Sets/src/mage/cards/t/{ThroneofGeth.java => ThroneOfGeth.java} (80%) create mode 100644 Mage.Sets/src/mage/cards/v/VigeanIntuition.java create mode 100644 Mage.Sets/src/mage/cards/w/WordOfCommand.java rename Mage.Sets/src/mage/cards/w/{WreathofGeists.java => WreathOfGeists.java} (86%) create mode 100644 Mage.Tests/src/test/java/org/mage/test/combat/FirstStrikeTest.java rename Mage/src/main/java/mage/abilities/common/{SanctuaryTriggeredAbility.java => SanctuaryInterveningIfTriggeredAbility.java} (86%) create mode 100644 Mage/src/main/java/mage/abilities/decorator/ConditionalInterveningIfTriggeredAbility.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/RevealHandSourceControllerEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/SkipNextDrawStepControllerEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorAllEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java create mode 100644 Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/BeastToken4.java diff --git a/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java b/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java index f8175f9518..31239d1d95 100644 --- a/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java +++ b/Mage.Client/src/main/java/mage/client/util/CardViewEDHPowerLevelComparator.java @@ -11,7 +11,7 @@ import mage.view.CardView; */ public class CardViewEDHPowerLevelComparator implements Comparator { - public int getPowerLevel(CardView card) { + private int getPowerLevel(CardView card) { int thisMaxPower = 0; @@ -306,7 +306,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { thisMaxPower = Math.max(thisMaxPower, 1); } - if (card.getCardTypes().contains("Plainswalker")) { + if (card.isPlanesWalker()) { if (card.getName().toLowerCase(Locale.ENGLISH).equals("jace, the mind sculptor")) { thisMaxPower = Math.max(thisMaxPower, 6); } @@ -509,7 +509,7 @@ public class CardViewEDHPowerLevelComparator implements Comparator { @Override public int compare(CardView o1, CardView o2) { - return Integer.valueOf(getPowerLevel(o1)).compareTo(getPowerLevel(o2)); + return Integer.compare(getPowerLevel(o1), getPowerLevel(o2)); } } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java index e4103359ba..142a1866b4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/WizardCardsImageSource.java @@ -1,13 +1,6 @@ - package org.mage.plugins.card.dl.sources; -import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.InetSocketAddress; -import java.net.Proxy; -import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; @@ -19,18 +12,12 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import java.util.prefs.Preferences; - import mage.cards.Sets; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; import mage.cards.repository.CardRepository; -import mage.client.MageFrame; import mage.client.dialog.PreferencesDialog; -import mage.remote.Connection; -import mage.remote.Connection.ProxyType; import org.apache.log4j.Logger; -import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; @@ -235,7 +222,7 @@ public enum WizardCardsImageSource implements CardImageSource { supportedSets.add("AKH"); supportedSets.add("MPS"); supportedSets.add("CMA"); -// supportedSets.add("CM2"); // Commander Anthology, Vol. II + supportedSets.add("CM2"); // Commander Anthology, Vol. II supportedSets.add("E01"); supportedSets.add("HOU"); supportedSets.add("C17"); @@ -249,7 +236,10 @@ public enum WizardCardsImageSource implements CardImageSource { supportedSets.add("RIX"); // Rivals of Ixalan supportedSets.add("A25"); // Masters 25 supportedSets.add("DOM"); // Dominaria -// supportedSets.add("M19"); // Core 2019 + supportedSets.add("M19"); // Core 2019 +// supportedSets.add("GRN"); // Guilds of Ravnica +// supportedSets.add("RNA"); // Ravnica Allegiance +// supportedSets.add("C18"); // Commander 2018 sets = new HashMap<>(); setsAliases = new HashMap<>(); @@ -286,7 +276,7 @@ public enum WizardCardsImageSource implements CardImageSource { setsAliases.put("C16", "Commander 2016"); setsAliases.put("C17", "Commander 2017"); setsAliases.put("CMA", "Commander Anthology"); -// setsAliases.put("CM2", "Commander Anthology, Vol. II"); + setsAliases.put("CM2", "Commander Anthology 2018"); setsAliases.put("CHK", "Champions of Kamigawa"); setsAliases.put("CHR", "Chronicles"); setsAliases.put("CMD", "Magic: The Gathering-Commander"); diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 09cdb8e02a..a8122e52b4 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -341,8 +341,18 @@ public class HumanPlayer extends PlayerImpl { replacementEffectChoice.getChoices().clear(); replacementEffectChoice.setKeyChoices(rEffects); + + // Check if there are different ones + int differentChoices = 0; + String lastChoice = ""; + for (String value : replacementEffectChoice.getKeyChoices().values()) { + if (!lastChoice.equalsIgnoreCase(value)) { + lastChoice = value; + differentChoices++; + } + } - while (!abort) { + while (!abort && differentChoices > 1) { updateGameStatePriority("chooseEffect", game); prepareForResponse(game); if (!isExecutingMacro()) { diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 78ce2b7dc5..a9593816c7 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -1,4 +1,3 @@ - package mage.server.game; import java.io.*; @@ -1149,7 +1148,7 @@ public class GameController implements GameCallback { sb.append(state.getTurnMods()); sb.append("
getTurnNum: "); sb.append(state.getTurnNum()); - + sb.append("
Using plane chase?:" + state.isPlaneChase()); if (state.isPlaneChase()) { Plane currentPlane = state.getCurrentPlane(); @@ -1157,7 +1156,7 @@ public class GameController implements GameCallback { sb.append("
Current plane:" + currentPlane.getName()); } } - + sb.append("
Future Timeout:"); if (futureTimeout != null) { sb.append("Cancelled?="); @@ -1188,8 +1187,13 @@ public class GameController implements GameCallback { sb.append("
Active player is: "); sb.append(game.getPlayer(state.getActivePlayerId()).getName()); + PassAbility pass = new PassAbility(); if (game.getPlayer(state.getActivePlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getActivePlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null) { currentPhase.getStep().skipStep(game, state.getActivePlayerId()); @@ -1204,6 +1208,10 @@ public class GameController implements GameCallback { sb.append("
getChoosingPlayerId: "); if (state.getChoosingPlayerId() != null) { if (game.getPlayer(state.getChoosingPlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getChoosingPlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null && !fixedAlready) { currentPhase.getStep().endStep(game, state.getActivePlayerId()); @@ -1218,7 +1226,11 @@ public class GameController implements GameCallback { sb.append("
Player with Priority is: "); if (state.getPriorityPlayerId() != null) { - if (game.getPlayer(state.getPriorityPlayerId()).hasLeft()) { + if (game.getPlayer(state.getPriorityPlayerId()).hasLeft()) { + Player p = game.getPlayer(state.getPriorityPlayerId()); + if (p != null) { + p.concede(game); + } Phase currentPhase = game.getPhase(); if (currentPhase != null && !fixedAlready) { currentPhase.getStep().skipStep(game, state.getActivePlayerId()); @@ -1228,7 +1240,7 @@ public class GameController implements GameCallback { } sb.append(game.getPlayer(state.getPriorityPlayerId()).getName()); sb.append(""); - } + } sb.append("
Future Timeout:"); if (futureTimeout != null) { diff --git a/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java b/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java index 21d42c45d8..e050309518 100644 --- a/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java +++ b/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.ControlsCreatureGreatestToughnessCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class AbzanBeastmaster extends CardImpl { this.toughness = new MageInt(1); // At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false), ControlsCreatureGreatestToughnessCondition.instance, "At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness." diff --git a/Mage.Sets/src/mage/cards/a/AetherWeb.java b/Mage.Sets/src/mage/cards/a/AetherWeb.java new file mode 100644 index 0000000000..339ba6c037 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AetherWeb.java @@ -0,0 +1,88 @@ +package mage.cards.a; + +import java.util.UUID; + +import mage.abilities.StaticAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.ReachAbility; +import mage.constants.*; +import mage.abilities.keyword.FlashAbility; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.effects.common.AttachEffect; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; + +/** + * + * @author noahg + */ +public final class AetherWeb extends CardImpl { + + public AetherWeb(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow. + StaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1) + .setText("Enchanted creature gets +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow.")); + staticAbility.addEffect(new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.AURA).setText("")); + staticAbility.addEffect(new AetherWebEffect()); + this.addAbility(staticAbility); + } + + public AetherWeb(final AetherWeb card) { + super(card); + } + + @Override + public AetherWeb copy() { + return new AetherWeb(this); + } +} + +class AetherWebEffect extends AsThoughEffectImpl { + + public AetherWebEffect() { + super(AsThoughEffectType.BLOCK_SHADOW, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = ""; + } + + public AetherWebEffect(final AetherWebEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public AetherWebEffect copy() { + return new AetherWebEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game); + return sourcePermanent != null && sourceId.equals(sourcePermanent.getAttachedTo()); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/a/Aetherplasm.java b/Mage.Sets/src/mage/cards/a/Aetherplasm.java new file mode 100644 index 0000000000..29862c661d --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/Aetherplasm.java @@ -0,0 +1,93 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author noahg + */ +public final class Aetherplasm extends CardImpl { + + public Aetherplasm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + + this.subtype.add(SubType.ILLUSION); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Aetherplasm blocks a creature, you may return Aetherplasm to its owner's hand. If you do, you may put a creature card from your hand onto the battlefield blocking that creature. + this.addAbility(new BlocksTriggeredAbility(new DoIfCostPaid(new AetherplasmEffect(), new ReturnToHandFromBattlefieldSourceCost()), false, true)); + } + + public Aetherplasm(final Aetherplasm card) { + super(card); + } + + @Override + public Aetherplasm copy() { + return new Aetherplasm(this); + } +} + +class AetherplasmEffect extends OneShotEffect { + + public AetherplasmEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "you may put a creature card from your hand onto the battlefield blocking that creature"; + } + + public AetherplasmEffect(AetherplasmEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + if (player.chooseUse(Outcome.PutCardInPlay, "Put a creature card from your hand onto the battlefield?", source, game)) { + TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A); + if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) { + Card card = game.getCard(target.getFirstTarget()); + if (card != null) { + Permanent blockedCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (player.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, false, null) + && game.getCombat() != null && blockedCreature != null) { + CombatGroup attacker = game.getCombat().findGroup(blockedCreature.getId()); + Permanent putIntoPlay = game.getPermanent(target.getFirstTarget()); + if (putIntoPlay != null && putIntoPlay.isCreature() && attacker != null) { + game.getCombat().findGroup(blockedCreature.getId()).addBlocker(putIntoPlay.getId(), source.getControllerId(), game); + + } + } + } + } + } + return true; + } + + @Override + public AetherplasmEffect copy() { + return new AetherplasmEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AfflictedDeserter.java b/Mage.Sets/src/mage/cards/a/AfflictedDeserter.java index 3b54846938..3cbe3dbff4 100644 --- a/Mage.Sets/src/mage/cards/a/AfflictedDeserter.java +++ b/Mage.Sets/src/mage/cards/a/AfflictedDeserter.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class AfflictedDeserter extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Afflicted Deserter. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public AfflictedDeserter(final AfflictedDeserter card) { diff --git a/Mage.Sets/src/mage/cards/a/AidFromTheCowl.java b/Mage.Sets/src/mage/cards/a/AidFromTheCowl.java index f0509b855c..8f35a937e2 100644 --- a/Mage.Sets/src/mage/cards/a/AidFromTheCowl.java +++ b/Mage.Sets/src/mage/cards/a/AidFromTheCowl.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.*; import mage.constants.CardType; @@ -33,7 +33,7 @@ public final class AidFromTheCowl extends CardImpl { // Revolt — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, // reveal the top card of your library. If it is a permanent card, you may put it onto the battlefield. Otherwise, put it on the bottom of your library. TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AidFromTheCowlEffect(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher()); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher()); } public AidFromTheCowl(final AidFromTheCowl card) { diff --git a/Mage.Sets/src/mage/cards/a/AirdropAeronauts.java b/Mage.Sets/src/mage/cards/a/AirdropAeronauts.java index 9cd725b673..9e79fe61da 100644 --- a/Mage.Sets/src/mage/cards/a/AirdropAeronauts.java +++ b/Mage.Sets/src/mage/cards/a/AirdropAeronauts.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class AirdropAeronauts extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Revolt — When Airdrop Aeronauts enters the battlefield, if a permanent you controlled left the battlefield this turn, you gain 5 life. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new GainLifeEffect(5), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, you gain 5 life." diff --git a/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java b/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java index a7927876eb..13636ab6ca 100644 --- a/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java +++ b/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java @@ -34,7 +34,7 @@ public final class AjaniWiseCounselor extends CardImpl { // +2: You gain 1 life for each creature you control. this.addAbility(new LoyaltyAbility(new GainLifeEffect( new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE) - ).setText("you gain 1 life for each "), 2)); + ).setText("you gain 1 life for each creature you control"), 2)); // −3: Creatures you control get +2/+2 until end of turn. this.addAbility(new LoyaltyAbility( @@ -46,6 +46,7 @@ public final class AjaniWiseCounselor extends CardImpl { CounterType.P1P1.createInstance(), new ControllerLifeCount() ).setText("put X +1/+1 counters on target creature, where X is your life total"), -9); + this.addAbility(ability); } public AjaniWiseCounselor(final AjaniWiseCounselor card) { diff --git a/Mage.Sets/src/mage/cards/a/AjanisComrade.java b/Mage.Sets/src/mage/cards/a/AjanisComrade.java index df0f010c29..bb26d2ac24 100644 --- a/Mage.Sets/src/mage/cards/a/AjanisComrade.java +++ b/Mage.Sets/src/mage/cards/a/AjanisComrade.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -43,7 +43,7 @@ public final class AjanisComrade extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // At the beginning of combat on your turn, if you control an Ajani planeswalker, put a +1/+1 counter on Ajani's Comrade. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filter), "At the beginning of combat on your turn, if you control an Ajani planeswalker, put a +1/+1 counter on {this}.")); diff --git a/Mage.Sets/src/mage/cards/a/AjanisLastStand.java b/Mage.Sets/src/mage/cards/a/AjanisLastStand.java index 10e72b763e..8be2b128f1 100644 --- a/Mage.Sets/src/mage/cards/a/AjanisLastStand.java +++ b/Mage.Sets/src/mage/cards/a/AjanisLastStand.java @@ -5,7 +5,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.DiscardedByOpponentTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; @@ -39,7 +39,7 @@ public final class AjanisLastStand extends CardImpl { this.addAbility(new AjanisLastStandTriggeredAbility()); // When a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new DiscardedByOpponentTriggeredAbility(new CreateTokenEffect(new AvatarToken2())), new PermanentsOnTheBattlefieldCondition(filter), "When a spell or ability an opponent controls causes you to discard this card, " diff --git a/Mage.Sets/src/mage/cards/a/AkutaBornOfAsh.java b/Mage.Sets/src/mage/cards/a/AkutaBornOfAsh.java index b405eb8984..fddd9d69a5 100644 --- a/Mage.Sets/src/mage/cards/a/AkutaBornOfAsh.java +++ b/Mage.Sets/src/mage/cards/a/AkutaBornOfAsh.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; import mage.abilities.keyword.HasteAbility; @@ -40,7 +40,7 @@ public final class AkutaBornOfAsh extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); // At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filterSwamp))), TargetController.YOU, false), diff --git a/Mage.Sets/src/mage/cards/a/AnaBattlemage.java b/Mage.Sets/src/mage/cards/a/AnaBattlemage.java index efae604ac2..f77efb80a8 100644 --- a/Mage.Sets/src/mage/cards/a/AnaBattlemage.java +++ b/Mage.Sets/src/mage/cards/a/AnaBattlemage.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.abilities.keyword.KickerAbility; @@ -51,12 +51,12 @@ public final class AnaBattlemage extends CardImpl { // When Ana Battlemage enters the battlefield, if it was kicked with its {2}{U} kicker, target player discards three cards. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(3)); ability.addTarget(new TargetOpponent()); - this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{U}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{2}{U}"), "When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, target player discards three cards.")); // When Ana Battlemage enters the battlefield, if it was kicked with its {1}{B} kicker, tap target untapped creature and that creature deals damage equal to its power to its controller. ability = new EntersBattlefieldTriggeredAbility(new AnaBattlemageKickerEffect()); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{1}{B}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{1}{B}"), "When {this} enters the battlefield, if it was kicked with its {1}{B} kicker, tap target untapped creature and that creature deals damage equal to its power to its controller.")); } diff --git a/Mage.Sets/src/mage/cards/a/AnaSanctuary.java b/Mage.Sets/src/mage/cards/a/AnaSanctuary.java index 3580234a44..6d36663883 100644 --- a/Mage.Sets/src/mage/cards/a/AnaSanctuary.java +++ b/Mage.Sets/src/mage/cards/a/AnaSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.a; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; @@ -27,7 +27,7 @@ public final class AnaSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); // At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead. - Ability ability = new SanctuaryTriggeredAbility( + Ability ability = new SanctuaryInterveningIfTriggeredAbility( new BoostEffect(1), new BoostEffect(5), ObjectColor.BLACK, ObjectColor.BLUE, "At the beginning of your upkeep, if you control a blue or black permanent, " + "target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead." diff --git a/Mage.Sets/src/mage/cards/a/AngelOfDeliverance.java b/Mage.Sets/src/mage/cards/a/AngelOfDeliverance.java index 9fd7226ac9..166342229b 100644 --- a/Mage.Sets/src/mage/cards/a/AngelOfDeliverance.java +++ b/Mage.Sets/src/mage/cards/a/AngelOfDeliverance.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -46,7 +46,7 @@ public final class AngelOfDeliverance extends CardImpl { // Delirium — Whenever Angel of Deliverance deals damage, if there are four or more card types among cards in your graveyard, // exile target creature an opponent controls. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AngelOfDeliveranceDealsDamageTriggeredAbility(), DeliriumCondition.instance, "Delirium — Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls" diff --git a/Mage.Sets/src/mage/cards/a/AngelOfTheDireHour.java b/Mage.Sets/src/mage/cards/a/AngelOfTheDireHour.java index b312075ab0..2b3826169c 100644 --- a/Mage.Sets/src/mage/cards/a/AngelOfTheDireHour.java +++ b/Mage.Sets/src/mage/cards/a/AngelOfTheDireHour.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ExileAllEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; @@ -34,7 +34,7 @@ public final class AngelOfTheDireHour extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ExileAllEffect(new FilterAttackingCreature("attacking creatures")), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, exile all attacking creatures."), diff --git a/Mage.Sets/src/mage/cards/a/AnimateDead.java b/Mage.Sets/src/mage/cards/a/AnimateDead.java index 90374b5bc9..c74a187ef3 100644 --- a/Mage.Sets/src/mage/cards/a/AnimateDead.java +++ b/Mage.Sets/src/mage/cards/a/AnimateDead.java @@ -8,7 +8,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -47,7 +47,7 @@ public final class AnimateDead extends CardImpl { // When Animate Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" // and gains "enchant creature put onto the battlefield with Animate Dead." Return enchanted creature card to the battlefield // under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false), SourceOnBattlefieldCondition.instance, "When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it."); diff --git a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java index 623fa69122..97bf7f87a6 100644 --- a/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java +++ b/Mage.Sets/src/mage/cards/a/ApothecaryGeist.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class ApothecaryGeist extends CardImpl { // When Apothecary Geist enters the battlefield, if you control another Spirit, you gain 3 life. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Spirit, you gain 3 life.")); diff --git a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java index 34e1ac8375..1877fee325 100644 --- a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java +++ b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java @@ -43,7 +43,7 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect { public ApproachOfTheSecondSunEffect() { super(Outcome.Win); this.staticText - = "If {this} was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. " + = "If this spell was cast from your hand and you've cast another spell named Approach of the Second Sun this game, you win the game. " + "Otherwise, put {this} into its owner's library seventh from the top and you gain 7 life."; } diff --git a/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java b/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java index 1d7ce04018..9eb4e17736 100644 --- a/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java +++ b/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java @@ -7,7 +7,7 @@ import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldOrCommandZoneCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; @@ -56,7 +56,7 @@ public final class ArahboRoarOfTheWorld extends CardImpl { this.toughness = new MageInt(5); // Eminence — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(Zone.ALL, new BoostTargetEffect(3, 3, Duration.EndOfTurn), TargetController.YOU, false, false), SourceOnBattlefieldOrCommandZoneCondition.instance, "Eminence — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn."); diff --git a/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java b/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java index c8ff49c106..89be4d3219 100644 --- a/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java +++ b/Mage.Sets/src/mage/cards/a/ArguelsBloodFast.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.FatefulHourCondition; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -40,7 +40,7 @@ public final class ArguelsBloodFast extends CardImpl { // At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, true), FatefulHourCondition.instance, "At the beginning of your upkeep, if you have 5 or less life, you may transform {this}" diff --git a/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java b/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java index fb83369e99..ac415c8439 100644 --- a/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java +++ b/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java @@ -32,9 +32,9 @@ public final class ArtisanOfForms extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Heroic — Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability. + // Heroic — Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature, except it has this ability. Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new ArtisanOfFormsApplyToPermanent(), true); - effect.setText("have {this} become a copy of target creature and gain this ability"); + effect.setText("have {this} become a copy of target creature, except it has this ability"); Ability ability = new HeroicAbility(effect, true); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); @@ -55,7 +55,7 @@ class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent { @Override public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) { Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent()); - effect.setText("have {this} become a copy of target creature and gain this ability"); + effect.setText("have {this} become a copy of target creature, except it has this ability"); mageObject.getAbilities().add(new HeroicAbility(effect, true)); return true; } @@ -63,7 +63,7 @@ class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent { @Override public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) { Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent()); - effect.setText("have {this} become a copy of target creature and gain this ability"); + effect.setText("have {this} become a copy of target creature, except it has this ability"); permanent.addAbility(new HeroicAbility(effect, true), game); return true; } diff --git a/Mage.Sets/src/mage/cards/a/AsajjVentress.java b/Mage.Sets/src/mage/cards/a/AsajjVentress.java index d93d1aacdf..3e2aa60f81 100644 --- a/Mage.Sets/src/mage/cards/a/AsajjVentress.java +++ b/Mage.Sets/src/mage/cards/a/AsajjVentress.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.BecomesBlockedTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.BlockedCreatureCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect; @@ -45,7 +45,7 @@ public final class AsajjVentress extends CardImpl { this.addAbility(new BecomesBlockedTriggeredAbility(effect, false)); // Hate — Whenever Asajj Ventress attacks, if an opponent lost life from a source other than combat damage this turn, target creature blocks this turn if able. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new BlocksIfAbleTargetEffect(Duration.EndOfTurn), false), HateCondition.instance, "Hate — Whenever Asajj Ventress attacks, if an opponent lost life from a source other than combat damage this turn, target creature blocks this turn if able"); diff --git a/Mage.Sets/src/mage/cards/a/AsylumVisitor.java b/Mage.Sets/src/mage/cards/a/AsylumVisitor.java index c7b7031a53..bf7ea122ec 100644 --- a/Mage.Sets/src/mage/cards/a/AsylumVisitor.java +++ b/Mage.Sets/src/mage/cards/a/AsylumVisitor.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; @@ -33,7 +33,7 @@ public final class AsylumVisitor extends CardImpl { this.toughness = new MageInt(1); // At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life. - Ability ability = new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false), new CardsInHandCondition(ComparisonType.EQUAL_TO, 0, null, TargetController.ACTIVE), "At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life."); Effect effect = new LoseLifeSourceControllerEffect(1); diff --git a/Mage.Sets/src/mage/cards/a/AuroraChampion.java b/Mage.Sets/src/mage/cards/a/AuroraChampion.java index 6e851079e0..365bb5f82e 100644 --- a/Mage.Sets/src/mage/cards/a/AuroraChampion.java +++ b/Mage.Sets/src/mage/cards/a/AuroraChampion.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class AuroraChampion extends CardImpl { this.toughness = new MageInt(2); // Whenever Aurora Champion attacks, if your team controls another Warrior, tap target creature. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new TapTargetEffect(), false), new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks, if your team controls another Warrior, tap target creature." diff --git a/Mage.Sets/src/mage/cards/b/BalduvianFallen.java b/Mage.Sets/src/mage/cards/b/BalduvianFallen.java new file mode 100644 index 0000000000..6191b9cf44 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BalduvianFallen.java @@ -0,0 +1,89 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ManaEvent; + +/** + * + * @author noahg + */ +public final class BalduvianFallen extends CardImpl { + + public BalduvianFallen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Cumulative upkeep {1} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); + + // Whenever Balduvian Fallen's cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way. + this.addAbility(new BalduvianFallenAbility()); + } + + public BalduvianFallen(final BalduvianFallen card) { + super(card); + } + + @Override + public BalduvianFallen copy() { + return new BalduvianFallen(this); + } +} + +class BalduvianFallenAbility extends TriggeredAbilityImpl { + + public BalduvianFallenAbility() { + super(Zone.BATTLEFIELD, null, false); + } + + public BalduvianFallenAbility(final BalduvianFallenAbility ability) { + super(ability); + } + + @Override + public BalduvianFallenAbility copy() { + return new BalduvianFallenAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.PAID_CUMULATIVE_UPKEEP; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + this.getEffects().clear(); + if(event.getSourceId() != null && event.getSourceId().equals(this.getSourceId()) && event instanceof ManaEvent) { + ManaEvent manaEvent = (ManaEvent) event; + int total = manaEvent.getMana().getBlack() + manaEvent.getMana().getRed(); + if (total > 0) { + this.getEffects().add(new BoostSourceEffect(total, 0, Duration.EndOfTurn)); + } + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this}'s cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java b/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java index 97ca612948..a21b4c8dee 100644 --- a/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java +++ b/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -38,7 +38,7 @@ public final class BaneOfHanweir extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Bane of Hanweir. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public BaneOfHanweir(final BaneOfHanweir card) { diff --git a/Mage.Sets/src/mage/cards/b/BarrenGlory.java b/Mage.Sets/src/mage/cards/b/BarrenGlory.java index 5ea7683cac..78113c6343 100644 --- a/Mage.Sets/src/mage/cards/b/BarrenGlory.java +++ b/Mage.Sets/src/mage/cards/b/BarrenGlory.java @@ -6,7 +6,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.CompoundCondition; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class BarrenGlory extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}"); // At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, you win the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), new CompoundCondition( new CardsInHandCondition(ComparisonType.EQUAL_TO, 0), diff --git a/Mage.Sets/src/mage/cards/b/BattleOfWits.java b/Mage.Sets/src/mage/cards/b/BattleOfWits.java index 50fb2ac402..9a0808abc2 100644 --- a/Mage.Sets/src/mage/cards/b/BattleOfWits.java +++ b/Mage.Sets/src/mage/cards/b/BattleOfWits.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class BattleOfWits extends CardImpl { // At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new BattleOfWitsCondition(), "At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new BattleOfWitsCondition(), "At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game.")); } public BattleOfWits(final BattleOfWits card) { diff --git a/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java b/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java index 27742c3450..10b298ca19 100644 --- a/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java +++ b/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class BellowingSaddlebrute extends CardImpl { this.toughness = new MageInt(5); // Raid - When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(4)), new InvertCondition(RaidCondition.instance), "Raid — When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn" diff --git a/Mage.Sets/src/mage/cards/b/BenalishEmissary.java b/Mage.Sets/src/mage/cards/b/BenalishEmissary.java index b70c84ccdd..db324f7b89 100644 --- a/Mage.Sets/src/mage/cards/b/BenalishEmissary.java +++ b/Mage.Sets/src/mage/cards/b/BenalishEmissary.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class BenalishEmissary extends CardImpl { // When Benalish Emissary enters the battlefield, if it was kicked, destroy target land. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); ability.addTarget(new TargetLandPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target land.")); } diff --git a/Mage.Sets/src/mage/cards/b/BladeTribeBerserkers.java b/Mage.Sets/src/mage/cards/b/BladeTribeBerserkers.java index 816f145ab2..fef59f0aaa 100644 --- a/Mage.Sets/src/mage/cards/b/BladeTribeBerserkers.java +++ b/Mage.Sets/src/mage/cards/b/BladeTribeBerserkers.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MetalcraftCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; @@ -31,9 +31,10 @@ public final class BladeTribeBerserkers extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); + //Metalcraft - When Blade-Tribe Berserkers enters the battlefield, if you control three or more artifacts, Blade-Tribe Berserkers gets +3/+3 and gains haste until end of turn. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false); ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); - this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.instance, effectText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText)); } public BladeTribeBerserkers(final BladeTribeBerserkers card) { diff --git a/Mage.Sets/src/mage/cards/b/BleakCovenVampires.java b/Mage.Sets/src/mage/cards/b/BleakCovenVampires.java index a72ec31ee5..605e3cf3b2 100644 --- a/Mage.Sets/src/mage/cards/b/BleakCovenVampires.java +++ b/Mage.Sets/src/mage/cards/b/BleakCovenVampires.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MetalcraftCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; @@ -31,12 +31,13 @@ public final class BleakCovenVampires extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(3); + //Metalcraft - When Bleak Coven Vampires enters the battlefield, if you control three or more artifacts, target player loses 4 life and you gain 4 life. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(4), false); ability.addEffect(new GainLifeEffect(4)); Target target = new TargetPlayer(); ability.addTarget(target); - this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.instance, effectText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText)); } public BleakCovenVampires(final BleakCovenVampires card) { diff --git a/Mage.Sets/src/mage/cards/b/BloodchiefAscension.java b/Mage.Sets/src/mage/cards/b/BloodchiefAscension.java index 9c49ebe1de..03c7f50310 100644 --- a/Mage.Sets/src/mage/cards/b/BloodchiefAscension.java +++ b/Mage.Sets/src/mage/cards/b/BloodchiefAscension.java @@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility; import mage.abilities.condition.common.OpponentLostLifeCondition; import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -38,7 +38,7 @@ public final class BloodchiefAscension extends CardImpl { true)); // Whenever a card is put into an opponent's graveyard from anywhere, if Bloodchief Ascension has three or more quest counters on it, you may have that player lose 2 life. If you do, you gain 2 life. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new PutCardIntoGraveFromAnywhereAllTriggeredAbility( new LoseLifeTargetEffect(2), true, new FilterCard("a card"), TargetController.OPPONENT, SetTargetPointer.PLAYER), new SourceHasCounterCondition(CounterType.QUEST, 3, Integer.MAX_VALUE), diff --git a/Mage.Sets/src/mage/cards/b/BloodhallPriest.java b/Mage.Sets/src/mage/cards/b/BloodhallPriest.java index 77995b35a9..86e9224fc8 100644 --- a/Mage.Sets/src/mage/cards/b/BloodhallPriest.java +++ b/Mage.Sets/src/mage/cards/b/BloodhallPriest.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility; import mage.abilities.condition.common.HellbentCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class BloodhallPriest extends CardImpl { // Whenever Bloodhall Priest enters the battlefield or attacks, if you have no cards in hand, Bloodhall Priest deals 2 damage to any target. TriggeredAbility triggeredAbility = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageTargetEffect(2)); triggeredAbility.addTarget(new TargetAnyTarget()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, HellbentCondition.instance, "Whenever {this} enters the battlefield or attacks, if you have no cards in hand, {this} deals 2 damage to any target" diff --git a/Mage.Sets/src/mage/cards/b/BlowflyInfestation.java b/Mage.Sets/src/mage/cards/b/BlowflyInfestation.java index 1ed1d11e8e..82ee8fe770 100644 --- a/Mage.Sets/src/mage/cards/b/BlowflyInfestation.java +++ b/Mage.Sets/src/mage/cards/b/BlowflyInfestation.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -34,12 +34,12 @@ public final class BlowflyInfestation extends CardImpl { public BlowflyInfestation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); - + //Whenever a creature dies, if it had a -1/-1 counter on it, put a -1/-1 counter on target creature. Effect effect = new BlowflyInfestationEffect(); TriggeredAbility triggeredAbility = new DiesCreatureTriggeredAbility(effect, false, false, true); triggeredAbility.addTarget(new TargetCreaturePermanent()); Condition condition = new BlowflyInfestationCondition(); - this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, condition, rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggeredAbility, condition, rule)); } diff --git a/Mage.Sets/src/mage/cards/b/BoobyTrap.java b/Mage.Sets/src/mage/cards/b/BoobyTrap.java new file mode 100644 index 0000000000..ed7c8d844b --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BoobyTrap.java @@ -0,0 +1,97 @@ +package mage.cards.b; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.abilities.effects.common.ChooseOpponentEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author noahg + */ +public final class BoobyTrap extends CardImpl { + + public BoobyTrap(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + + // As Booby Trap enters the battlefield, name a card other than a basic land card and choose an opponent. + AsEntersBattlefieldAbility etbAbility = new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NOT_BASIC_LAND_NAME)); + etbAbility.addEffect(new ChooseOpponentEffect(Outcome.Damage)); + this.addAbility(etbAbility); + + // The chosen player reveals each card he or she draws. + // When the chosen player draws the named card, sacrifice Booby Trap. If you do, Booby Trap deals 10 damage to that player. + this.addAbility(new BoobyTrapTriggeredAbility()); + } + + public BoobyTrap(final BoobyTrap card) { + super(card); + } + + @Override + public BoobyTrap copy() { + return new BoobyTrap(this); + } +} + +class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl { + + public BoobyTrapTriggeredAbility() { + super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(10, true, "that player"), new SacrificeSourceCost(), "", false), false); + } + + public BoobyTrapTriggeredAbility(BoobyTrapTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DREW_CARD; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Player controller = game.getPlayer(getControllerId()); + if (event.getPlayerId() == null || game.getState() == null || controller == null) { + return false; + } + if (event.getPlayerId().equals(game.getState().getValue(getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY))) { + Card drawn = game.getCard(event.getTargetId()); + if (drawn != null) { + controller.revealCards(this, new CardsImpl(drawn), game); + if (drawn.getName().equals(game.getState().getValue(getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { + //Set target + this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId())); + return true; + } + } + } + return false; + } + + @Override + public BoobyTrapTriggeredAbility copy() { + return new BoobyTrapTriggeredAbility(this); + } + + @Override + public String getRule() { + return "The chosen player reveals each card he or she draws.\n" + + "When the chosen player draws the named card, sacrifice {this}. If you do, {this} deals 10 damage to that player."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java index 4f89ff76b2..9e19d3430a 100644 --- a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java +++ b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java @@ -13,11 +13,10 @@ import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.mana.SimpleManaAbility; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.filter.FilterCard; -import mage.filter.common.FilterInstantOrSorceryCard; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; @@ -42,9 +41,9 @@ public final class BoseijuWhoSheltersAll extends CardImpl { SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, mana, new TapSourceCost()); ability.addCost(new PayLifeCost(2)); ability.getEffects().get(0).setText("Add {C}. If that mana is spent on an instant or sorcery spell, that spell can't be countered"); - this.addAbility(ability); + this.addAbility(ability, new BoseijuWhoSheltersAllWatcher(ability.getOriginalId())); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoseijuWhoSheltersAllCantCounterEffect()), new BoseijuWhoSheltersAllWatcher()); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new BoseijuWhoSheltersAllCantCounterEffect())); } public BoseijuWhoSheltersAll(final BoseijuWhoSheltersAll card) { @@ -59,14 +58,18 @@ public final class BoseijuWhoSheltersAll extends CardImpl { class BoseijuWhoSheltersAllWatcher extends Watcher { - public List spells = new ArrayList<>(); + private List spells = new ArrayList<>(); + private final String originalId; - public BoseijuWhoSheltersAllWatcher() { - super(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), WatcherScope.GAME); + public BoseijuWhoSheltersAllWatcher(UUID originalId) { + super(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), WatcherScope.CARD); + this.originalId = originalId.toString(); } public BoseijuWhoSheltersAllWatcher(final BoseijuWhoSheltersAllWatcher watcher) { super(watcher); + this.spells.addAll(watcher.spells); + this.originalId = watcher.originalId; } @Override @@ -77,14 +80,19 @@ class BoseijuWhoSheltersAllWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { - MageObject object = game.getObject(event.getSourceId()); - // TODO: Replace identification by name by better method that also works if ability is copied from other land with other name - if (object != null && object.getName().equals("Boseiju, Who Shelters All") && event.getFlag()) { - spells.add(event.getTargetId()); + if (event.getData() != null && event.getData().equals(originalId)) { + Card spell = game.getSpell(event.getTargetId()); + if (spell != null && (spell.isInstant() || spell.isSorcery())) { + spells.add(event.getTargetId()); + } } } } + public boolean spellCantBeCountered(UUID spellId) { + return spells.contains(spellId); + } + @Override public void reset() { super.reset(); @@ -94,10 +102,8 @@ class BoseijuWhoSheltersAllWatcher extends Watcher { class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffectImpl { - private static final FilterCard filter = new FilterInstantOrSorceryCard(); - public BoseijuWhoSheltersAllCantCounterEffect() { - super(Duration.WhileOnBattlefield, Outcome.Benefit); + super(Duration.EndOfGame, Outcome.Benefit); staticText = null; } @@ -119,7 +125,7 @@ class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffe public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null) { - return "This spell can't be countered (" + sourceObject.getName() + ")."; + return "This spell can't be countered because mana from " + sourceObject.getName() + " was spent to cast it."; } return null; } @@ -131,13 +137,8 @@ class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffe @Override public boolean applies(GameEvent event, Ability source, Game game) { - BoseijuWhoSheltersAllWatcher watcher = (BoseijuWhoSheltersAllWatcher) game.getState().getWatchers().get(BoseijuWhoSheltersAllWatcher.class.getSimpleName()); + BoseijuWhoSheltersAllWatcher watcher = (BoseijuWhoSheltersAllWatcher) game.getState().getWatchers().get(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), source.getSourceId()); Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null && watcher.spells.contains(spell.getId())) { - if (filter.match(spell.getCard(), game)) { - return true; - } - } - return false; + return spell != null && watcher != null && watcher.spellCantBeCountered(spell.getId()); } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/b/BrandedHowler.java b/Mage.Sets/src/mage/cards/b/BrandedHowler.java index f6774d1cc8..f51fc8c26a 100644 --- a/Mage.Sets/src/mage/cards/b/BrandedHowler.java +++ b/Mage.Sets/src/mage/cards/b/BrandedHowler.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class BrandedHowler extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public BrandedHowler(final BrandedHowler card) { diff --git a/Mage.Sets/src/mage/cards/b/BreachingLeviathan.java b/Mage.Sets/src/mage/cards/b/BreachingLeviathan.java index 02dfd31524..3171564a79 100644 --- a/Mage.Sets/src/mage/cards/b/BreachingLeviathan.java +++ b/Mage.Sets/src/mage/cards/b/BreachingLeviathan.java @@ -9,7 +9,7 @@ import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; @@ -40,7 +40,7 @@ public final class BreachingLeviathan extends CardImpl { this.toughness = new MageInt(9); // When Breaching Leviathan enters the battlefield, if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new BreachingLeviathanEffect(), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps."), diff --git a/Mage.Sets/src/mage/cards/b/BreakneckRider.java b/Mage.Sets/src/mage/cards/b/BreakneckRider.java index 1622d77d4e..015fdf0395 100644 --- a/Mage.Sets/src/mage/cards/b/BreakneckRider.java +++ b/Mage.Sets/src/mage/cards/b/BreakneckRider.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class BreakneckRider extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public BreakneckRider(final BreakneckRider card) { diff --git a/Mage.Sets/src/mage/cards/b/BrinkOfMadness.java b/Mage.Sets/src/mage/cards/b/BrinkOfMadness.java index 6e726cdf76..fe17742f0b 100644 --- a/Mage.Sets/src/mage/cards/b/BrinkOfMadness.java +++ b/Mage.Sets/src/mage/cards/b/BrinkOfMadness.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.Card; @@ -37,7 +37,7 @@ public final class BrinkOfMadness extends CardImpl { ability.addEffect(new BrinkOfMadnessEffect()); ability.addTarget(new TargetOpponent()); CardsInHandCondition contition = new CardsInHandCondition(ComparisonType.EQUAL_TO, 0); - this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards their hand.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards their hand.")); } diff --git a/Mage.Sets/src/mage/cards/b/BudokaPupil.java b/Mage.Sets/src/mage/cards/b/BudokaPupil.java index c09d9a1225..d665178aa5 100644 --- a/Mage.Sets/src/mage/cards/b/BudokaPupil.java +++ b/Mage.Sets/src/mage/cards/b/BudokaPupil.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -20,7 +20,6 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.events.GameEvent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; import java.util.UUID; @@ -44,7 +43,7 @@ public final class BudokaPupil extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); // At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new IchigaWhoTopplesOaks()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/b/BullRushBruiser.java b/Mage.Sets/src/mage/cards/b/BullRushBruiser.java index 508f309439..ac0cfeaab9 100644 --- a/Mage.Sets/src/mage/cards/b/BullRushBruiser.java +++ b/Mage.Sets/src/mage/cards/b/BullRushBruiser.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.constants.SubType; @@ -36,7 +36,7 @@ public final class BullRushBruiser extends CardImpl { this.toughness = new MageInt(3); // Whenever Bull-Rush Bruiser attacks, if your team controls another Warrior, Bull-Rush Bruiser gains first strike until end of turn. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), false), new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks, if your team controls another Warrior, " diff --git a/Mage.Sets/src/mage/cards/b/BurntheImpure.java b/Mage.Sets/src/mage/cards/b/BurnTheImpure.java similarity index 69% rename from Mage.Sets/src/mage/cards/b/BurntheImpure.java rename to Mage.Sets/src/mage/cards/b/BurnTheImpure.java index 5d6e6bd321..9c57bb8b0d 100644 --- a/Mage.Sets/src/mage/cards/b/BurntheImpure.java +++ b/Mage.Sets/src/mage/cards/b/BurnTheImpure.java @@ -18,40 +18,41 @@ import mage.target.common.TargetCreaturePermanent; * * @author ayratn */ -public final class BurntheImpure extends CardImpl { +public final class BurnTheImpure extends CardImpl { - public BurntheImpure(UUID ownerId, CardSetInfo setInfo) { + public BurnTheImpure(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); + // Burn the Impure deals 3 damage to target creature. If that creature has infect, Burn the Impure deals 3 damage to that creature’s controller. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BurntheImpureEffect()); + this.getSpellAbility().addEffect(new BurnTheImpureEffect()); } - public BurntheImpure(final BurntheImpure card) { + public BurnTheImpure(final BurnTheImpure card) { super(card); } @Override - public BurntheImpure copy() { - return new BurntheImpure(this); + public BurnTheImpure copy() { + return new BurnTheImpure(this); } } -class BurntheImpureEffect extends OneShotEffect { +class BurnTheImpureEffect extends OneShotEffect { - public BurntheImpureEffect() { + public BurnTheImpureEffect() { super(Outcome.Damage); staticText = "{this} deals 3 damage to target creature. If that creature has infect, {this} deals 3 damage to that creature's controller."; } - public BurntheImpureEffect(final BurntheImpureEffect effect) { + public BurnTheImpureEffect(final BurnTheImpureEffect effect) { super(effect); } @Override - public BurntheImpureEffect copy() { - return new BurntheImpureEffect(this); + public BurnTheImpureEffect copy() { + return new BurnTheImpureEffect(this); } @Override diff --git a/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java b/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java index 1aa46781da..e916504a73 100644 --- a/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java +++ b/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class BurningEyeZubera extends CardImpl { this.toughness = new MageInt(3); // When Burning-Eye Zubera dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to any target. - Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DamageTargetEffect(3)),new SourceGotFourDamage(), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(new DamageTargetEffect(3)),new SourceGotFourDamage(), "When {this} dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to any target"); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java b/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java index 511993aa51..1ecf21e9cc 100644 --- a/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java +++ b/Mage.Sets/src/mage/cards/c/CaligoSkinWitch.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.discard.DiscardEachPlayerEffect; import mage.abilities.keyword.KickerAbility; @@ -32,7 +32,7 @@ public final class CaligoSkinWitch extends CardImpl { this.addAbility(new KickerAbility("{3}{B}")); // When Caligo Skin-Witch enters the battlefield, if it was kicked, each opponent discards two cards. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect( new StaticValue(2), false, diff --git a/Mage.Sets/src/mage/cards/c/CallForUnity.java b/Mage.Sets/src/mage/cards/c/CallForUnity.java index 89acf06212..cb5c59b1c3 100644 --- a/Mage.Sets/src/mage/cards/c/CallForUnity.java +++ b/Mage.Sets/src/mage/cards/c/CallForUnity.java @@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -34,7 +34,7 @@ public final class CallForUnity extends CardImpl { // Revolt — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a unity counter on Call for Unity. TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.UNITY.createInstance(), true), false); - this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher()); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher()); // Creatures you control get +1/+1 for each unity counter on Call for Unity. Effect effect = new BoostControlledEffect(new CountersSourceCount(CounterType.UNITY), new CountersSourceCount(CounterType.UNITY), Duration.WhileOnBattlefield, diff --git a/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java b/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java index 15e9bc38b7..c6346f70b1 100644 --- a/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java +++ b/Mage.Sets/src/mage/cards/c/CallOfTheFullMoon.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -47,7 +47,7 @@ public final class CallOfTheFullMoon extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, sacrifice Call of the Full Moon. TriggeredAbility ability2 = new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability2, TwoOrMoreSpellsWereCastLastTurnCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, TwoOrMoreSpellsWereCastLastTurnCondition.instance, "At the beginning of each upkeep, if a player cast two or more spells last turn, sacrifice {this}.")); } diff --git a/Mage.Sets/src/mage/cards/c/CallToTheGrave.java b/Mage.Sets/src/mage/cards/c/CallToTheGrave.java index f639bab5c1..5fa2e10f40 100644 --- a/Mage.Sets/src/mage/cards/c/CallToTheGrave.java +++ b/Mage.Sets/src/mage/cards/c/CallToTheGrave.java @@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.CreatureCountCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class CallToTheGrave extends CardImpl { this.addAbility(ability); // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); } public CallToTheGrave(final CallToTheGrave card) { diff --git a/Mage.Sets/src/mage/cards/c/CallowJushi.java b/Mage.Sets/src/mage/cards/c/CallowJushi.java index d0c38ae02e..3c5915d34f 100644 --- a/Mage.Sets/src/mage/cards/c/CallowJushi.java +++ b/Mage.Sets/src/mage/cards/c/CallowJushi.java @@ -10,7 +10,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -24,7 +24,6 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.events.GameEvent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.TargetSpell; /** @@ -47,7 +46,7 @@ public final class CallowJushi extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); // At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new JarakuTheInterloper()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java index 89b065aa71..37498a7238 100644 --- a/Mage.Sets/src/mage/cards/c/CemeteryPuca.java +++ b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java @@ -36,7 +36,7 @@ public final class CemeteryPuca extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // Whenever a creature dies, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature and gains this ability. + // Whenever a creature dies, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature, except it has this ability. this.addAbility(new DiesCreatureTriggeredAbility(new DoIfCostPaid(new CemeteryPucaEffect(), new ManaCostsImpl("{1}")), false, new FilterCreaturePermanent("a creature"), true)); } @@ -55,7 +55,7 @@ class CemeteryPucaEffect extends OneShotEffect { public CemeteryPucaEffect() { super(Outcome.Copy); - staticText = " {this} becomes a copy of that creature and gains this ability"; + staticText = " {this} becomes a copy of that creature, except it has this ability"; } public CemeteryPucaEffect(final CemeteryPucaEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java index 920b60d38f..8bd830649f 100644 --- a/Mage.Sets/src/mage/cards/c/CetaSanctuary.java +++ b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.c; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,7 +20,7 @@ public final class CetaSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); // At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card. - Ability ability = new SanctuaryTriggeredAbility( + Ability ability = new SanctuaryInterveningIfTriggeredAbility( new DrawDiscardControllerEffect(1, 1), new DrawDiscardControllerEffect(2, 1), ObjectColor.GREEN, ObjectColor.RED, "At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. " + "If you control a red permanent and a green permanent, instead draw two cards, then discard a card." diff --git a/Mage.Sets/src/mage/cards/c/ChakramRetriever.java b/Mage.Sets/src/mage/cards/c/ChakramRetriever.java index 70c5af3f67..fd4704236d 100644 --- a/Mage.Sets/src/mage/cards/c/ChakramRetriever.java +++ b/Mage.Sets/src/mage/cards/c/ChakramRetriever.java @@ -1,7 +1,6 @@ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; @@ -15,6 +14,8 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 diff --git a/Mage.Sets/src/mage/cards/c/ChanceEncounter.java b/Mage.Sets/src/mage/cards/c/ChanceEncounter.java index f417f603a9..84d4fbbac8 100644 --- a/Mage.Sets/src/mage/cards/c/ChanceEncounter.java +++ b/Mage.Sets/src/mage/cards/c/ChanceEncounter.java @@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class ChanceEncounter extends CardImpl { // At the beginning of your upkeep, if Chance Encounter has ten or more luck counters on it, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE), "At the beginning of your upkeep, if {this} has ten or more luck counters on it, you win the game")); } diff --git a/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java b/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java index 95ba4e0204..22c24cc6b9 100644 --- a/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java +++ b/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java @@ -41,7 +41,7 @@ public final class ChoArrimLegate extends CardImpl { // Protection from black this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); - // If an opponent controls a Swamp and you control a Plains, you may cast Cho-Arrim Legate without paying its mana cost. + // If an opponent controls a Swamp and you control a Plains, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Swamp and you control a Plains", new OpponentControlsPermanentCondition(filterSwamp), new PermanentsOnTheBattlefieldCondition(filterPlains)); diff --git a/Mage.Sets/src/mage/cards/c/Chronozoa.java b/Mage.Sets/src/mage/cards/c/Chronozoa.java index fb63297fc1..81a6153913 100644 --- a/Mage.Sets/src/mage/cards/c/Chronozoa.java +++ b/Mage.Sets/src/mage/cards/c/Chronozoa.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.LastTimeCounterRemovedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -46,7 +46,7 @@ public final class Chronozoa extends CardImpl { // When Chronozoa is put into a graveyard from play, if it had no time counters on it, create two tokens that are copies of it. Effect effect = new CreateTokenCopySourceEffect(2); effect.setText("create two tokens that are copies of it"); - this.addAbility(new ConditionalTriggeredAbility(new DiesTriggeredAbility(effect, false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(effect, false), LastTimeCounterRemovedCondition.instance, "When {this} dies, if it had no time counters on it, create two tokens that are copies of it.")); } diff --git a/Mage.Sets/src/mage/cards/c/CitadelSiege.java b/Mage.Sets/src/mage/cards/c/CitadelSiege.java index 35620c0ced..86093720e5 100644 --- a/Mage.Sets/src/mage/cards/c/CitadelSiege.java +++ b/Mage.Sets/src/mage/cards/c/CitadelSiege.java @@ -1,7 +1,6 @@ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; @@ -21,6 +20,8 @@ import mage.game.Game; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java b/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java index a2bada5d74..0f8813d79d 100644 --- a/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java +++ b/Mage.Sets/src/mage/cards/c/CitanulWoodreaders.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class CitanulWoodreaders extends CardImpl { this.addAbility(new KickerAbility("{2}{G}")); // When Citanul Woodreaders enters the battlefield, if it was kicked, draw two cards. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(2)), KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, draw two cards." diff --git a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java index cd2903327e..7eabddb97f 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkAvian.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkAvian.java @@ -11,7 +11,7 @@ import mage.abilities.condition.common.IsStepCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -51,7 +51,7 @@ public final class ClockworkAvian extends CardImpl { )); // At end of combat, if Clockwork Avian attacked or blocked this combat, remove a +1/+0 counter from it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), diff --git a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java index 9efa2a076d..e02f4434b4 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkBeast.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkBeast.java @@ -11,7 +11,7 @@ import mage.abilities.condition.common.IsStepCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -47,7 +47,7 @@ public final class ClockworkBeast extends CardImpl { )); // At end of combat, if Clockwork Beast attacked or blocked this combat, remove a +1/+0 counter from it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), diff --git a/Mage.Sets/src/mage/cards/c/ClockworkSteed.java b/Mage.Sets/src/mage/cards/c/ClockworkSteed.java index 06743d0ae2..fe4557ef8d 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkSteed.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkSteed.java @@ -12,7 +12,7 @@ import mage.abilities.condition.common.IsStepCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; @@ -58,7 +58,7 @@ public final class ClockworkSteed extends CardImpl { this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); // At end of combat, if Clockwork Steed attacked or blocked this combat, remove a +1/+0 counter from it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), diff --git a/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java index f56893ebcc..4480d844ce 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkSwarm.java @@ -12,7 +12,7 @@ import mage.abilities.condition.common.IsStepCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; @@ -62,7 +62,7 @@ public final class ClockworkSwarm extends CardImpl { this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); // At end of combat, if Clockwork Swarm attacked or blocked this combat, remove a +1/+0 counter from it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."), diff --git a/Mage.Sets/src/mage/cards/c/CoalStoker.java b/Mage.Sets/src/mage/cards/c/CoalStoker.java index cfe982d61c..17ead83cd5 100644 --- a/Mage.Sets/src/mage/cards/c/CoalStoker.java +++ b/Mage.Sets/src/mage/cards/c/CoalStoker.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.Mana; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.mana.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class CoalStoker extends CardImpl { this.toughness = new MageInt(3); // When Coal Stoker enters the battlefield, if you cast it from your hand, add {R}{R}{R}. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3)), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, add {R}{R}{R}."), diff --git a/Mage.Sets/src/mage/cards/c/ColossalMajesty.java b/Mage.Sets/src/mage/cards/c/ColossalMajesty.java index 3d26ff69c7..abd4bd9d6f 100644 --- a/Mage.Sets/src/mage/cards/c/ColossalMajesty.java +++ b/Mage.Sets/src/mage/cards/c/ColossalMajesty.java @@ -3,7 +3,7 @@ package mage.cards.c; import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.FerociousCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,7 +20,7 @@ public final class ColossalMajesty extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); // At the beginning of your upkeep, if you control a creature with power 4 or greater, draw a card. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( new DrawCardSourceControllerEffect(1), TargetController.YOU, false diff --git a/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java b/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java index 2d1c8d2bab..3697c4ab9f 100644 --- a/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java +++ b/Mage.Sets/src/mage/cards/c/ComplexAutomaton.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class ComplexAutomaton extends CardImpl { // At the beginning of your upkeep, if you control seven or more permanents, return Complex Automaton to its owner's hand. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(), ComparisonType.MORE_THAN, 6), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(), ComparisonType.MORE_THAN, 6), "At the beginning of your upkeep, if you control seven or more permanents, return Complex Automaton to its owner's hand.")); } diff --git a/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java b/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java index 57c34427a9..1653c18a41 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java +++ b/Mage.Sets/src/mage/cards/c/ConsulsLieutenant.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.RenownedSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.RenownAbility; @@ -34,7 +34,7 @@ public final class ConsulsLieutenant extends CardImpl { // Renown 1 this.addAbility(new RenownAbility(1)); // Whenever Consul's Lieutenant attacks, if it's renowned, other attacking creatures you control get +1/+1 until end of turn. - this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility( new BoostControlledEffect(1, 1, Duration.EndOfTurn, new FilterAttackingCreature("other attacking creatures you control"), true), false), RenownedSourceCondition.instance, "Whenever Consul's Lieutenant attacks, if it's renowned, other attacking creatures you control get +1/+1 until end of turn.")); diff --git a/Mage.Sets/src/mage/cards/c/ConvalescentCare.java b/Mage.Sets/src/mage/cards/c/ConvalescentCare.java index cd762d6a15..6153f6735d 100644 --- a/Mage.Sets/src/mage/cards/c/ConvalescentCare.java +++ b/Mage.Sets/src/mage/cards/c/ConvalescentCare.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.XorLessLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.GainLifeEffect; @@ -27,7 +27,7 @@ public final class ConvalescentCare extends CardImpl { Effect effect = new DrawCardSourceControllerEffect(1); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(3), TargetController.YOU, false); ability.addEffect(effect); - this.addAbility(new ConditionalTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card.")); } public ConvalescentCare(final ConvalescentCare card) { diff --git a/Mage.Sets/src/mage/cards/c/ConvictedKiller.java b/Mage.Sets/src/mage/cards/c/ConvictedKiller.java index 333cf8dd3e..513878588f 100644 --- a/Mage.Sets/src/mage/cards/c/ConvictedKiller.java +++ b/Mage.Sets/src/mage/cards/c/ConvictedKiller.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class ConvictedKiller extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Convicted Killer. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public ConvictedKiller(final ConvictedKiller card) { diff --git a/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java b/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java index 1244c5d128..72a01268b1 100644 --- a/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java +++ b/Mage.Sets/src/mage/cards/c/CountlessGearsRenegade.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class CountlessGearsRenegade extends CardImpl { // Revolt — When Countless Gears Renegade enters the battlefield, if a permanent you controlled // left the battlefield this turn, create a 1/1 colorless Servo artifact creature token. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new CreateTokenEffect(new ServoToken(), 1), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, create a 1/1 colorless Servo artifact creature token."); diff --git a/Mage.Sets/src/mage/cards/c/CoverOfWinter.java b/Mage.Sets/src/mage/cards/c/CoverOfWinter.java new file mode 100644 index 0000000000..5497f041bb --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CoverOfWinter.java @@ -0,0 +1,102 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectData; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author noahg + */ +public final class CoverOfWinter extends CardImpl { + + public CoverOfWinter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.addSuperType(SuperType.SNOW); + + // Cumulative upkeep {S} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{S}"))); + + // If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on Cover of Winter. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CoverOfWinterEffect())); + + // {S}: Put an age counter on Cover of Winter. + this.addAbility(new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.AGE.createInstance()), new ManaCostsImpl("{S}"))); + } + + public CoverOfWinter(final CoverOfWinter card) { + super(card); + } + + @Override + public CoverOfWinter copy() { + return new CoverOfWinter(this); + } +} + +class CoverOfWinterEffect extends PreventionEffectImpl { + + public CoverOfWinterEffect() { + super(Duration.WhileOnBattlefield, -1, true); + this.staticText = "If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on {this}"; + } + + public CoverOfWinterEffect(CoverOfWinterEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER || event.getType() == GameEvent.EventType.DAMAGE_CREATURE; + } + + @Override + protected PreventionEffectData preventDamageAction(GameEvent event, Ability source, Game game) { + Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game); + if (sourcePermanent != null) { + return game.preventDamage(event, source, game, sourcePermanent.getCounters(game).getCount(CounterType.AGE)); + } else { + this.discard(); + return game.preventDamage(event, source, game, 0); + } + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER + && event.getTargetId().equals(source.getControllerId())) { + return super.applies(event, source, game); + } + + if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public CoverOfWinterEffect copy() { + return new CoverOfWinterEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/c/CrestedSunmare.java b/Mage.Sets/src/mage/cards/c/CrestedSunmare.java index 9367d010c9..bdfcd07bb7 100644 --- a/Mage.Sets/src/mage/cards/c/CrestedSunmare.java +++ b/Mage.Sets/src/mage/cards/c/CrestedSunmare.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.YouGainedLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.abilities.keyword.IndestructibleAbility; @@ -47,7 +47,7 @@ public final class CrestedSunmare extends CardImpl { // At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token. this.addAbility( - new ConditionalTriggeredAbility( + new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new CrestedSunmareToken()), TargetController.ANY, false), new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0), "At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token."), diff --git a/Mage.Sets/src/mage/cards/c/CryptolithFragment.java b/Mage.Sets/src/mage/cards/c/CryptolithFragment.java index 394fed8a8d..2980d3aa90 100644 --- a/Mage.Sets/src/mage/cards/c/CryptolithFragment.java +++ b/Mage.Sets/src/mage/cards/c/CryptolithFragment.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.condition.common.XorLessLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeAllPlayersEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -39,7 +39,7 @@ public final class CryptolithFragment extends CardImpl { // At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new XorLessLifeCondition(XorLessLifeCondition.CheckType.EACH_PLAYER, 10), "At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.")); diff --git a/Mage.Sets/src/mage/cards/c/CunningBandit.java b/Mage.Sets/src/mage/cards/c/CunningBandit.java index 5afd4f65c2..911eeccd41 100644 --- a/Mage.Sets/src/mage/cards/c/CunningBandit.java +++ b/Mage.Sets/src/mage/cards/c/CunningBandit.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -24,7 +24,6 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.events.GameEvent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; /** @@ -47,7 +46,7 @@ public final class CunningBandit extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); // At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new AzamukiTreacheryIncarnate()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java index 4904159e50..183beb3ef6 100644 --- a/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java +++ b/Mage.Sets/src/mage/cards/c/CuriousHomunculus.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.abilities.mana.ConditionalColorlessManaAbility; @@ -42,7 +42,7 @@ public final class CuriousHomunculus extends CardImpl { // At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform Curious Homunculus. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new InstantOrSorceryCardsInControllerGraveCondition(3), "At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform {this}")); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java index d9fbded941..8e2ab315d4 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheCabal.java @@ -7,7 +7,7 @@ import mage.abilities.condition.common.SuspendedCondition; import mage.abilities.costs.Cost; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -45,7 +45,7 @@ public final class CurseOfTheCabal extends CardImpl { // Suspend 2-{2}{B}{B} this.addAbility(new SuspendAbility(2, new ManaCostsImpl("{2}{B}{B}"), this)); // At the beginning of each player's upkeep, if Curse of the Cabal is suspended, that player may sacrifice a permanent. If he or she does, put two time counters on Curse of the Cabal. - this.addAbility(new CurseOfTheCabalTriggeredAbility()); + this.addAbility(new CurseOfTheCabalInterveningIfTriggeredAbility()); } public CurseOfTheCabal(final CurseOfTheCabal card) { @@ -99,9 +99,9 @@ class CurseOfTheCabalSacrificeEffect extends OneShotEffect { } } -class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility { +class CurseOfTheCabalInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility { - public CurseOfTheCabalTriggeredAbility() { + public CurseOfTheCabalInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility( Zone.EXILED, new CurseOfTheCabalTriggeredAbilityConditionalDelay(), TargetController.ANY, false, true @@ -113,13 +113,13 @@ class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility { // counters aren't placed } - public CurseOfTheCabalTriggeredAbility(final CurseOfTheCabalTriggeredAbility effect) { + public CurseOfTheCabalInterveningIfTriggeredAbility(final CurseOfTheCabalInterveningIfTriggeredAbility effect) { super(effect); } @Override - public CurseOfTheCabalTriggeredAbility copy() { - return new CurseOfTheCabalTriggeredAbility(this); + public CurseOfTheCabalInterveningIfTriggeredAbility copy() { + return new CurseOfTheCabalInterveningIfTriggeredAbility(this); } } diff --git a/Mage.Sets/src/mage/cards/c/CyclopeanGiant.java b/Mage.Sets/src/mage/cards/c/CyclopeanGiant.java new file mode 100644 index 0000000000..1c04cdb2a6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CyclopeanGiant.java @@ -0,0 +1,44 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author noahg + */ +public final class CyclopeanGiant extends CardImpl { + + public CyclopeanGiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.GIANT); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // When Cyclopean Giant dies, target land becomes a Swamp. Exile Cyclopean Giant. + DiesTriggeredAbility ability = new DiesTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.EndOfGame, SubType.SWAMP)); + ability.addEffect(new ExileSourceEffect()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public CyclopeanGiant(final CyclopeanGiant card) { + super(card); + } + + @Override + public CyclopeanGiant copy() { + return new CyclopeanGiant(this); + } +} diff --git a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java index 3bed9903fb..646597f79c 100644 --- a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java +++ b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java @@ -32,9 +32,9 @@ public final class DacksDuplicate extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it gains haste and dethrone. + // You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it has haste and dethrone. Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new DacksDuplicateApplyToPermanent()); - effect.setText("as a copy of any creature on the battlefield except it gains haste and dethrone"); + effect.setText("as a copy of any creature on the battlefield except it has haste and dethrone"); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java b/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java index 380ce8d79a..40b8b5a6f3 100644 --- a/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java +++ b/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java @@ -11,7 +11,7 @@ import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -52,7 +52,7 @@ public final class DanceOfTheDead extends CardImpl { Ability enchantAbility = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(enchantAbility); // When Dance of the Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard" and gains "enchant creature put onto the battlefield with Dance of the Dead." Put enchanted creature card to the battlefield tapped under your control and attach Dance of the Dead to it. When Dance of the Dead leaves the battlefield, that creature's controller sacrifices it. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DanceOfTheDeadReAttachEffect(), false), SourceOnBattlefieldCondition.instance, "When {this} enters the battlefield, if it's on the battlefield, " diff --git a/Mage.Sets/src/mage/cards/d/DaredevilDragster.java b/Mage.Sets/src/mage/cards/d/DaredevilDragster.java index 66d9cad930..112af1122a 100644 --- a/Mage.Sets/src/mage/cards/d/DaredevilDragster.java +++ b/Mage.Sets/src/mage/cards/d/DaredevilDragster.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; import mage.abilities.condition.common.AttackedOrBlockedThisCombatSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.CrewAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class DaredevilDragster extends CardImpl { this.toughness = new MageInt(4); // At end of combat, if Daredevil Dragster attacked or blocked this combat, put a velocity counter on it. Then if it has two or more velocity counters on it, sacrifice it and draw two cards. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new DaredevilDragsterEffect(), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, put a velocity counter on it. Then if it has two or more velocity counters on it, sacrifice it and draw two cards."), diff --git a/Mage.Sets/src/mage/cards/d/DarigaazReincarnated.java b/Mage.Sets/src/mage/cards/d/DarigaazReincarnated.java index d8c3f04ece..e4623e5e5a 100644 --- a/Mage.Sets/src/mage/cards/d/DarigaazReincarnated.java +++ b/Mage.Sets/src/mage/cards/d/DarigaazReincarnated.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; @@ -59,7 +59,7 @@ public final class DarigaazReincarnated extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DarigaazReincarnatedDiesEffect())); // At the beginning of your upkeep, if Darigaaz is exiled with an egg counter on it, remove an egg counter from it. Then if Darigaaz has no egg counters on it, return it to the battlefield. - this.addAbility(new DarigaazReincarnatedTriggeredAbility()); + this.addAbility(new DarigaazReincarnatedInterveningIfTriggeredAbility()); } public DarigaazReincarnated(final DarigaazReincarnated card) { @@ -119,22 +119,22 @@ class DarigaazReincarnatedDiesEffect extends ReplacementEffectImpl { } -class DarigaazReincarnatedTriggeredAbility extends ConditionalTriggeredAbility { +class DarigaazReincarnatedInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility { - public DarigaazReincarnatedTriggeredAbility() { + public DarigaazReincarnatedInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility(Zone.EXILED, new DarigaazReincarnatedReturnEffect(), TargetController.YOU, false), DarigaazReincarnatedCondition.instance, "At the beginning of your upkeep, if {this} is exiled with an egg counter on it, " + "remove an egg counter from it. Then if {this} has no egg counters on it, return it to the battlefield"); } - public DarigaazReincarnatedTriggeredAbility(final DarigaazReincarnatedTriggeredAbility effect) { + public DarigaazReincarnatedInterveningIfTriggeredAbility(final DarigaazReincarnatedInterveningIfTriggeredAbility effect) { super(effect); } @Override - public DarigaazReincarnatedTriggeredAbility copy() { - return new DarigaazReincarnatedTriggeredAbility(this); + public DarigaazReincarnatedInterveningIfTriggeredAbility copy() { + return new DarigaazReincarnatedInterveningIfTriggeredAbility(this); } } diff --git a/Mage.Sets/src/mage/cards/d/DarkApprenticeship.java b/Mage.Sets/src/mage/cards/d/DarkApprenticeship.java index 43224cdd75..f4db672b49 100644 --- a/Mage.Sets/src/mage/cards/d/DarkApprenticeship.java +++ b/Mage.Sets/src/mage/cards/d/DarkApprenticeship.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,7 +24,7 @@ public final class DarkApprenticeship extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); // Hate — At the beggining of your end step, if an opponent lost life from source other than combat damage this turn, Dark Apprenticeship deals 2 damage to target player. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new DamageTargetEffect(2), TargetController.YOU, false), HateCondition.instance, "Hate — At the beggining of your end step, if an opponent lost life from source other than combat damage this turn, Dark Apprenticeship deals 2 damage to target player."); diff --git a/Mage.Sets/src/mage/cards/d/DarthMaul.java b/Mage.Sets/src/mage/cards/d/DarthMaul.java index a34a33fcc5..9805ceecc7 100644 --- a/Mage.Sets/src/mage/cards/d/DarthMaul.java +++ b/Mage.Sets/src/mage/cards/d/DarthMaul.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.combat.CantBeBlockedByTargetSourceEffect; import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.HasteAbility; @@ -40,7 +40,7 @@ public final class DarthMaul extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Hate — Whenever Darth Maul attacks, if an opponent loses life from a source other than combat damage this turn, target creature can't block this turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new CantBeBlockedByTargetSourceEffect(Duration.EndOfTurn), false), HateCondition.instance, "Hate — Whenever Darth Maul attacks, if an opponent loses life from a source other than combat damage this turn, target creature can't block this turn."); diff --git a/Mage.Sets/src/mage/cards/d/DaybreakRanger.java b/Mage.Sets/src/mage/cards/d/DaybreakRanger.java index d26396ac69..19f86a0c96 100644 --- a/Mage.Sets/src/mage/cards/d/DaybreakRanger.java +++ b/Mage.Sets/src/mage/cards/d/DaybreakRanger.java @@ -9,7 +9,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.FlyingAbility; @@ -56,7 +56,7 @@ public final class DaybreakRanger extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Daybreak Ranger. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public DaybreakRanger(final DaybreakRanger card) { diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java index e3f3b085b8..88ace23bc5 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeBrawler.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.CitysBlessingCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.constants.SubType; import mage.abilities.keyword.DeathtouchAbility; @@ -35,7 +35,7 @@ public final class DeadeyeBrawler extends CardImpl { this.addAbility(new AscendAbility()); // Whenever Deadeye Brawler deals combat damage to a player, if you have the city's blessing, draw a card. - this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility( new DrawCardSourceControllerEffect(1), false, false), CitysBlessingCondition.instance, "Whenever {this} deals combat damage to a player, if you have the city's blessing, draw a card.")); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java b/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java index cf49c07804..eeb855dd35 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeHarpooner.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,7 +39,7 @@ public final class DeadeyeHarpooner extends CardImpl { this.toughness = new MageInt(2); // Revolt — When Deadeye Harpooner enters the battlefield, if a permanent you controlled left the battlefield this turn, destroy target tapped creature an opponent controls. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new DestroyTargetEffect(), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, destroy target tapped creature an opponent controls." diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java b/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java index 2330ad10d2..96cba582c9 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeRigHauler.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class DeadeyeRigHauler extends CardImpl { this.toughness = new MageInt(2); // Raid— When Deadeye Rig-Hauler enters the battlefield, if you attacked with a creature this turn, you may return target creature to its owner's hand. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), RaidCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, you may return target creature to its owner's hand."); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java b/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java index fabc2fb55f..2a7df4690c 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeTormentor.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class DeadeyeTormentor extends CardImpl { this.toughness = new MageInt(2); // Raid — When Deadeye Tormentor enters the battlefield, if you attacked with a creature this turn, target opponent discards a card. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card."); ability.addTarget(new TargetOpponent()); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/d/DeadlyGrub.java b/Mage.Sets/src/mage/cards/d/DeadlyGrub.java index 3bfc96c366..ddf8afee2d 100644 --- a/Mage.Sets/src/mage/cards/d/DeadlyGrub.java +++ b/Mage.Sets/src/mage/cards/d/DeadlyGrub.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.LastTimeCounterRemovedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.VanishingSacrificeAbility; @@ -38,7 +38,7 @@ public final class DeadlyGrub extends CardImpl { this.addAbility(new VanishingUpkeepAbility(3)); this.addAbility(new VanishingSacrificeAbility()); // When Deadly Grub dies, if it had no time counters on it, create a 6/1 green Insect creature token with shroud. - this.addAbility(new ConditionalTriggeredAbility(new DiesTriggeredAbility(new CreateTokenEffect(new DeadlyGrubToken(), 1)), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(new CreateTokenEffect(new DeadlyGrubToken(), 1)), LastTimeCounterRemovedCondition.instance, "When {this} dies, if it had no time counters on it, create a 6/1 green Insect creature token with shroud.")); } diff --git a/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java b/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java index 29217e9fc8..90113472ed 100644 --- a/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java +++ b/Mage.Sets/src/mage/cards/d/DeathOfAThousandStings.java @@ -4,7 +4,7 @@ package mage.cards.d; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; @@ -37,7 +37,7 @@ public final class DeathOfAThousandStings extends CardImpl { this.getSpellAbility().addEffect(effect); // At the beginning of your upkeep, if you have more cards in hand than each opponent, you may return Death of a Thousand Stings from your graveyard to your hand. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true), diff --git a/Mage.Sets/src/mage/cards/d/DeathSpark.java b/Mage.Sets/src/mage/cards/d/DeathSpark.java index ed91140269..fea3d9c3bf 100644 --- a/Mage.Sets/src/mage/cards/d/DeathSpark.java +++ b/Mage.Sets/src/mage/cards/d/DeathSpark.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; @@ -35,7 +35,7 @@ public final class DeathSpark extends CardImpl { this.getSpellAbility().addTarget(new TargetAnyTarget()); // At the beginning of your upkeep, if Death Spark is in your graveyard with a creature card directly above it, you may pay {1}. If you do, return Death Spark to your hand. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new GenericManaCost(1)), diff --git a/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java b/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java index dcfd3b4b74..4aa59062ae 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java +++ b/Mage.Sets/src/mage/cards/d/DeathbringerRegent.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class DeathbringerRegent extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Deathbringer Regent enters the battlefield, if you cast it from your hand and there are five or more other creatures on the battlefield, destroy all other creatures. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter), false), new DeathbringerRegentCondition(), "When {this} enters the battlefield, if you cast it from your hand and there are five or more other creatures on the battlefield, destroy all other creatures."), diff --git a/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java b/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java index 5af9ee3b8d..0d02f4049b 100644 --- a/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java +++ b/Mage.Sets/src/mage/cards/d/DeepSeaKraken.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.SpellCastAllTriggeredAbility; import mage.abilities.condition.common.SuspendedCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.abilities.keyword.CantBeBlockedSourceAbility; import mage.abilities.keyword.SuspendAbility; @@ -45,7 +45,7 @@ public final class DeepSeaKraken extends CardImpl { // Suspend 9-{2}{U} this.addAbility(new SuspendAbility(9, new ManaCostsImpl("{2}{U}"), this)); // Whenever an opponent casts a spell, if Deep-Sea Kraken is suspended, remove a time counter from it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new SpellCastAllTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), filter, false, SetTargetPointer.NONE), SuspendedCondition.instance, "Whenever an opponent casts a spell, if Deep-Sea Kraken is suspended, remove a time counter from it.")); } diff --git a/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java b/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java index fc2be84121..d0dcb0ca4b 100644 --- a/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java +++ b/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java @@ -40,7 +40,7 @@ public final class DeepwoodLegate extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // If an opponent controls a Forest and you control a Swamp, you may cast Deepwood Legate without paying its mana cost. + // If an opponent controls a Forest and you control a Swamp, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Forest and you control a Swamp", new OpponentControlsPermanentCondition(filterForest), new PermanentsOnTheBattlefieldCondition(filterSwamp)); diff --git a/Mage.Sets/src/mage/cards/d/DefenseOfTheHeart.java b/Mage.Sets/src/mage/cards/d/DefenseOfTheHeart.java index a668098a14..f703fa2169 100644 --- a/Mage.Sets/src/mage/cards/d/DefenseOfTheHeart.java +++ b/Mage.Sets/src/mage/cards/d/DefenseOfTheHeart.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class DefenseOfTheHeart extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false); ability.addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, new FilterCreatureCard()), false, Outcome.PutLandInPlay)); DefenseOfTheHeartCondition contition = new DefenseOfTheHeartCondition(); - this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice {this}, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice {this}, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library")); } diff --git a/Mage.Sets/src/mage/cards/d/DegaSanctuary.java b/Mage.Sets/src/mage/cards/d/DegaSanctuary.java index 87bcf90913..7c9e60a17a 100644 --- a/Mage.Sets/src/mage/cards/d/DegaSanctuary.java +++ b/Mage.Sets/src/mage/cards/d/DegaSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.d; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,7 +20,7 @@ public final class DegaSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. If you control a black permanent and a red permanent, you gain 4 life instead. - Ability ability = new SanctuaryTriggeredAbility( + Ability ability = new SanctuaryInterveningIfTriggeredAbility( new GainLifeEffect(2), new GainLifeEffect(4), ObjectColor.BLACK, ObjectColor.RED, "At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. " + "If you control a black permanent and a red permanent, you gain 4 life instead." diff --git a/Mage.Sets/src/mage/cards/d/DemonicRising.java b/Mage.Sets/src/mage/cards/d/DemonicRising.java index b1ba4ead5e..b3547c47d5 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicRising.java +++ b/Mage.Sets/src/mage/cards/d/DemonicRising.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.condition.common.CreatureCountCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class DemonicRising extends CardImpl { // At the beginning of your end step, if you control exactly one creature, create a 5/5 black Demon creature token with flying. TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new DemonToken()), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new CreatureCountCondition(1, TargetController.YOU), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new CreatureCountCondition(1, TargetController.YOU), ruleText)); } public DemonicRising(final DemonicRising card) { diff --git a/Mage.Sets/src/mage/cards/d/DesertsHold.java b/Mage.Sets/src/mage/cards/d/DesertsHold.java index 6232b4e97f..eca577bfd7 100644 --- a/Mage.Sets/src/mage/cards/d/DesertsHold.java +++ b/Mage.Sets/src/mage/cards/d/DesertsHold.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.OrCondition; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.combat.CantBlockAttackActivateAttachedEffect; @@ -51,7 +51,7 @@ public final class DesertsHold extends CardImpl { this.addAbility(ability); // When Desert's Hold enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you gain 3 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), diff --git a/Mage.Sets/src/mage/cards/d/Dichotomancy.java b/Mage.Sets/src/mage/cards/d/Dichotomancy.java new file mode 100644 index 0000000000..c788c4dc8f --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/Dichotomancy.java @@ -0,0 +1,98 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.*; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetOpponent; + +/** + * + * @author noahg + */ +public final class Dichotomancy extends CardImpl { + + public Dichotomancy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{7}{U}{U}"); + + + // For each tapped nonland permanent target opponent controls, search that player’s library for a card with the same name as that permanent and put it onto the battlefield under your control. Then that player shuffles their library. + this.getSpellAbility().addEffect(new DichotomancyEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + + // Suspend 3-{1}{U}{U} + this.addAbility(new SuspendAbility(3, new ManaCostsImpl("{1}{U}{U}"), this)); + } + + public Dichotomancy(final Dichotomancy card) { + super(card); + } + + @Override + public Dichotomancy copy() { + return new Dichotomancy(this); + } +} + +class DichotomancyEffect extends OneShotEffect { + + private static final FilterNonlandPermanent filter = new FilterNonlandPermanent(); + + static { + filter.add(new TappedPredicate()); + } + + public DichotomancyEffect() { + super(Outcome.PutCardInPlay); + this.staticText = "For each tapped nonland permanent target opponent controls, search that player’s library for a card with the same name as that permanent and put it onto the battlefield under your control. Then that player shuffles their library"; + } + + public DichotomancyEffect(DichotomancyEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && opponent != null) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, opponent.getId(), game)) { + String name = permanent.getName(); + FilterCard filterCard = new FilterCard("card named \""+name+'"'); + filterCard.add(new NamePredicate(name)); + TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filterCard); + if (controller.searchLibrary(target, game, opponent.getId())) { + controller.moveCards(opponent.getLibrary().getCard(target.getFirstTarget(), game), Zone.BATTLEFIELD, source, game); + } + } + opponent.shuffleLibrary(source, game); + return true; + } + return false; + } + + @Override + public DichotomancyEffect copy() { + return new DichotomancyEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/d/DimensionalBreach.java b/Mage.Sets/src/mage/cards/d/DimensionalBreach.java index b66f823f33..28131d4099 100644 --- a/Mage.Sets/src/mage/cards/d/DimensionalBreach.java +++ b/Mage.Sets/src/mage/cards/d/DimensionalBreach.java @@ -6,7 +6,7 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class DimensionalBreach extends CardImpl { // Exile all permanents. For as long as any of those cards remain exiled, at the beginning of each player's upkeep, that player returns one of the exiled cards he or she owns to the battlefield. this.getSpellAbility().addEffect(new DimensionalBreachExileEffect()); - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new DimensionalBreachReturnFromExileEffect(), TargetController.ANY, false, true, null), new CardsStillInExileCondition(), null)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new DimensionalBreachReturnFromExileEffect(), TargetController.ANY, false, true, null), new CardsStillInExileCondition(), null)); } diff --git a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java index a70951a13d..388d4d7bfb 100644 --- a/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java +++ b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java @@ -36,7 +36,7 @@ public final class DimirDoppelganger extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(2); - // {1}{U}{B}: Exile target creature card from a graveyard. Dimir Doppelganger becomes a copy of that card and gains this ability. + // {1}{U}{B}: Exile target creature card from a graveyard. Dimir Doppelganger becomes a copy of that card, except it has this ability. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}")); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard"))); this.addAbility(ability); @@ -57,7 +57,7 @@ class DimirDoppelgangerEffect extends OneShotEffect { DimirDoppelgangerEffect() { super(Outcome.Copy); - staticText = "Exile target creature card from a graveyard. {this} becomes a copy of that card and gains this ability"; + staticText = "Exile target creature card from a graveyard. {this} becomes a copy of that card, except it has this ability"; } DimirDoppelgangerEffect(final DimirDoppelgangerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/Domestication.java b/Mage.Sets/src/mage/cards/d/Domestication.java index e0279047ed..63f91fba20 100644 --- a/Mage.Sets/src/mage/cards/d/Domestication.java +++ b/Mage.Sets/src/mage/cards/d/Domestication.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.continuous.ControlEnchantedEffect; @@ -46,7 +46,7 @@ public final class Domestication extends CardImpl { // At the beginning of your end step, if enchanted creature's power is 4 or greater, sacrifice Domestication. TriggeredAbility ability2 = new BeginningOfYourEndStepTriggeredAbility(new SacrificeSourceEffect(), false); - this.addAbility(new ConditionalTriggeredAbility(ability2, new DomesticationCondition(), "At the beginning of your end step, if enchanted creature's power is 4 or greater, sacrifice {this}")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new DomesticationCondition(), "At the beginning of your end step, if enchanted creature's power is 4 or greater, sacrifice {this}")); } public Domestication(final Domestication card) { diff --git a/Mage.Sets/src/mage/cards/d/DominatorDrone.java b/Mage.Sets/src/mage/cards/d/DominatorDrone.java index d1c8a863f8..3a06feb1f1 100644 --- a/Mage.Sets/src/mage/cards/d/DominatorDrone.java +++ b/Mage.Sets/src/mage/cards/d/DominatorDrone.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.abilities.keyword.DevoidAbility; import mage.abilities.keyword.IngestAbility; @@ -47,7 +47,7 @@ public final class DominatorDrone extends CardImpl { // When Dominator Drone enters the battlefield, if you control another colorless creature, each opponent loses 2 life. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new LoseLifeOpponentsEffect(2)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another colorless creature, each opponent loses 2 life.")); diff --git a/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java b/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java index 16eb905545..9ae855120e 100644 --- a/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java +++ b/Mage.Sets/src/mage/cards/d/DragonmasterOutcast.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,7 +40,7 @@ public final class DragonmasterOutcast extends CardImpl { // At the beginning of your upkeep, if you control six or more lands, create a 5/5 red Dragon creature token with flying. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken2(), 1), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 5), "At the beginning of your upkeep, if you control six or more lands, create a 5/5 red Dragon creature token with flying.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 5), "At the beginning of your upkeep, if you control six or more lands, create a 5/5 red Dragon creature token with flying.")); } public DragonmasterOutcast(final DragonmasterOutcast card) { diff --git a/Mage.Sets/src/mage/cards/d/DrainPower.java b/Mage.Sets/src/mage/cards/d/DrainPower.java index e07e7f3c1c..e22c3f803d 100644 --- a/Mage.Sets/src/mage/cards/d/DrainPower.java +++ b/Mage.Sets/src/mage/cards/d/DrainPower.java @@ -78,6 +78,7 @@ class DrainPowerEffect extends OneShotEffect { TargetPermanent target = null; while (true) { + targetPlayer.setPayManaMode(true); manaAbilitiesMap.clear(); for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, targetPlayer.getId(), game)) { if (!ignorePermanents.contains(permanent)) { @@ -138,6 +139,7 @@ class DrainPowerEffect extends OneShotEffect { } } } + targetPlayer.setPayManaMode(false); // 106.12. One card (Drain Power) causes one player to lose unspent mana and another to add “the mana lost this way.” (Note that these may be the same player.) // This empties the former player's mana pool and causes the mana emptied this way to be put into the latter player's mana pool. Which permanents, spells, and/or diff --git a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java index 3a0f8eb6eb..9b8e1ad205 100644 --- a/Mage.Sets/src/mage/cards/d/DreadCacodemon.java +++ b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.TapAllEffect; import mage.cards.CardImpl; @@ -45,7 +45,7 @@ public final class DreadCacodemon extends CardImpl { // if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(opponentsCreatures, false)); ability.addEffect(new TapAllEffect(otherCreaturesYouControl)); - this.addAbility(new ConditionalTriggeredAbility(ability, CastFromHandSourceCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control."), new CastFromHandWatcher()); } diff --git a/Mage.Sets/src/mage/cards/d/DreadWanderer.java b/Mage.Sets/src/mage/cards/d/DreadWanderer.java index 9bc5b6c82a..87b9d1b768 100644 --- a/Mage.Sets/src/mage/cards/d/DreadWanderer.java +++ b/Mage.Sets/src/mage/cards/d/DreadWanderer.java @@ -1,4 +1,3 @@ - package mage.cards.d; import java.util.UUID; @@ -34,7 +33,15 @@ public final class DreadWanderer extends CardImpl { // {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. // Activate this ability only any time you could cast a sorcery and only if you have one or fewer cards in hand. - ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{2}{B}"), HeckbentCondition.instance); + ConditionalActivatedAbility ability = new ConditionalActivatedAbility( + Zone.GRAVEYARD, + new ReturnSourceFromGraveyardToBattlefieldEffect(), + new ManaCostsImpl("{2}{B}"), + HeckbentCondition.instance, + "{2}{B}: Return {this} from your graveyard to the battlefield. " + + "Activate this ability only any time you could cast a sorcery " + + "and only if you have one or fewer cards in hand." + ); ability.setTiming(TimingRule.SORCERY); addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DreamPillager.java b/Mage.Sets/src/mage/cards/d/DreamPillager.java index ad7ca79d2e..e0eefc81fe 100644 --- a/Mage.Sets/src/mage/cards/d/DreamPillager.java +++ b/Mage.Sets/src/mage/cards/d/DreamPillager.java @@ -37,7 +37,7 @@ public final class DreamPillager extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Dream Pillager deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way. + // Whenever Dream Pillager deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards from among those exiled cards. this.addAbility(new DreamPillagerTriggeredAbility()); } @@ -84,7 +84,7 @@ class DreamPillagerTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way."; + return "Whenever {this} deals combat damage to a player, exile that many cards from the top of your library. Until end of turn, you may cast nonland cards from among those exiled cards."; } } @@ -92,7 +92,7 @@ class DreamPillagerEffect extends OneShotEffect { public DreamPillagerEffect() { super(Outcome.Benefit); - this.staticText = "exile that many cards from the top of your library. Until end of turn, you may cast nonland cards exiled this way"; + this.staticText = "exile that many cards from the top of your library. Until end of turn, you may cast nonland cards from among those exiled cards"; } public DreamPillagerEffect(final DreamPillagerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java index be11454a28..01d62c7422 100644 --- a/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java +++ b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.CanBlockOnlyFlyingAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; @@ -56,7 +56,7 @@ public final class DreamcallerSiren extends CardImpl { // When Dreamcaller Siren enters the battlefield, if you control another Pirate, tap up to two nonland permanents. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); ability.addTarget(new TargetNonlandPermanent(0, 2, false)); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), "when {this} enters the battlefield, if you control another Pirate, tap up to two target nonland permanents.")); } diff --git a/Mage.Sets/src/mage/cards/d/DreampodDruid.java b/Mage.Sets/src/mage/cards/d/DreampodDruid.java index 21023d9b29..c500aafa13 100644 --- a/Mage.Sets/src/mage/cards/d/DreampodDruid.java +++ b/Mage.Sets/src/mage/cards/d/DreampodDruid.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.EnchantedSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class DreampodDruid extends CardImpl { this.toughness = new MageInt(2); // At the beginning of each upkeep, if Dreampod Druid is enchanted, create a 1/1 green Saproling creature token. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken(), 1), TargetController.ANY, false, false), new EnchantedSourceCondition(), "At the beginning of each upkeep, if Dreampod Druid is enchanted, create a 1/1 green Saproling creature token.")); diff --git a/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java b/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java index 3ba0e22b0d..ac0012c0df 100644 --- a/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java +++ b/Mage.Sets/src/mage/cards/d/DreamspoilerWitches.java @@ -1,7 +1,6 @@ package mage.cards.d; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; @@ -12,10 +11,12 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java b/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java index 1084c128b8..c1f81adb81 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java +++ b/Mage.Sets/src/mage/cards/d/DuergarHedgeMage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,12 +43,12 @@ public final class DuergarHedgeMage extends CardImpl { this.toughness = new MageInt(2); // When Duergar Hedge-Mage enters the battlefield, if you control two or more Mountains, you may destroy target artifact. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability); // When Duergar Hedge-Mage enters the battlefield, if you control two or more Plains, you may destroy target enchantment. - Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); + Ability ability2 = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); ability2.addTarget(new TargetEnchantmentPermanent()); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java b/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java index 58c95ad22e..5d5504b7e1 100644 --- a/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java +++ b/Mage.Sets/src/mage/cards/d/DuneriderOutlaw.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.DealtDamageToAnOpponent; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; @@ -39,7 +39,7 @@ public final class DuneriderOutlaw extends CardImpl { this.addAbility(ProtectionAbility.from(ObjectColor.GREEN)); // At the beginning of each end step, if Dunerider Outlaw dealt damage to an opponent this turn, put a +1/+1 counter on it. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of each end step", true, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); - this.addAbility(new ConditionalTriggeredAbility(triggered, new DealtDamageToAnOpponent(), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new DealtDamageToAnOpponent(), ruleText)); } public DuneriderOutlaw(final DuneriderOutlaw card) { diff --git a/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java b/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java index 071348a81b..c790d01d34 100644 --- a/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java +++ b/Mage.Sets/src/mage/cards/d/DuskwatchRecruiter.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -49,7 +49,7 @@ public final class DuskwatchRecruiter extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public DuskwatchRecruiter(final DuskwatchRecruiter card) { diff --git a/Mage.Sets/src/mage/cards/d/DwynensElite.java b/Mage.Sets/src/mage/cards/d/DwynensElite.java index a04728d187..394a7071b5 100644 --- a/Mage.Sets/src/mage/cards/d/DwynensElite.java +++ b/Mage.Sets/src/mage/cards/d/DwynensElite.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,7 +40,7 @@ public final class DwynensElite extends CardImpl { // When Dwynen's Elite enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken())); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token.")); diff --git a/Mage.Sets/src/mage/cards/e/EarwigSquad.java b/Mage.Sets/src/mage/cards/e/EarwigSquad.java index 43182df461..41c6b6c225 100644 --- a/Mage.Sets/src/mage/cards/e/EarwigSquad.java +++ b/Mage.Sets/src/mage/cards/e/EarwigSquad.java @@ -7,7 +7,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ProwlCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.ProwlAbility; import mage.cards.Card; @@ -42,7 +42,7 @@ public final class EarwigSquad extends CardImpl { // When Earwig Squad enters the battlefield, if its prowl cost was paid, search target opponent's library for three cards and exile them. Then that player shuffles their library. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new EarwigSquadEffect(), false); ability.addTarget(new TargetOpponent()); - this.addAbility(new ConditionalTriggeredAbility(ability, ProwlCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, ProwlCondition.instance, "When {this} enters the battlefield, if its prowl cost was paid, search target opponent's library for three cards and exile them. Then that player shuffles their library.")); } diff --git a/Mage.Sets/src/mage/cards/e/EdgarMarkov.java b/Mage.Sets/src/mage/cards/e/EdgarMarkov.java index a5310fd5d9..19f8f9ce3a 100644 --- a/Mage.Sets/src/mage/cards/e/EdgarMarkov.java +++ b/Mage.Sets/src/mage/cards/e/EdgarMarkov.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldOrCommandZoneCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -49,7 +49,7 @@ public final class EdgarMarkov extends CardImpl { this.toughness = new MageInt(4); // Eminence - Whenever you cast another Vampire spell, if Edgar Markov is in the command zone or on the battlefield, create a 1/1 black Vampire creature token. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new SpellCastControllerTriggeredAbility(Zone.ALL, new CreateTokenEffect(new EdgarMarkovToken()), filter2, false, false), SourceOnBattlefieldOrCommandZoneCondition.instance, "Eminence — Whenever you cast another Vampire spell, if {this} is in the command zone or on the battlefield, create a 1/1 black Vampire creature token."); diff --git a/Mage.Sets/src/mage/cards/e/Electryte.java b/Mage.Sets/src/mage/cards/e/Electryte.java index 1b0b530520..6fa756cb17 100644 --- a/Mage.Sets/src/mage/cards/e/Electryte.java +++ b/Mage.Sets/src/mage/cards/e/Electryte.java @@ -25,7 +25,7 @@ public final class Electryte extends CardImpl { public Electryte(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); - this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.BEAST, SubType.TRILOBITE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java b/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java index 20be9866b3..7871e1a48c 100644 --- a/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java +++ b/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class EmissaryOfTheSleepless extends CardImpl { // When Emissary of the Sleepless enters the battlefield, if a creature died this turn, create a 1/1 white Spirit creature token with flying. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken())); - this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.instance, "When {this} enters the battlefield, if a creature died this turn, create a 1/1 white Spirit creature token with flying.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MorbidCondition.instance, "When {this} enters the battlefield, if a creature died this turn, create a 1/1 white Spirit creature token with flying.")); } public EmissaryOfTheSleepless(final EmissaryOfTheSleepless card) { diff --git a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java index 9fe3a744dd..01c303b520 100644 --- a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java +++ b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -36,12 +36,14 @@ public final class EpharaGodOfThePolis extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to white and blue is less than seven, Ephara isn't a creature. Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U), 7); effect.setText("As long as your devotion to white and blue is less than seven, Ephara isn't a creature"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + // At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false), HadAnotherCreatureEnterTheBattlefieldCondition.instance, "At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."), diff --git a/Mage.Sets/src/mage/cards/e/EpicStruggle.java b/Mage.Sets/src/mage/cards/e/EpicStruggle.java index 31b01940d4..70eb7db01e 100644 --- a/Mage.Sets/src/mage/cards/e/EpicStruggle.java +++ b/Mage.Sets/src/mage/cards/e/EpicStruggle.java @@ -4,7 +4,7 @@ package mage.cards.e; import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class EpicStruggle extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{G}"); // At the beginning of your upkeep, if you control twenty or more creatures, you win the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 19), "At the beginning of your upkeep, if you control twenty or more creatures, you win the game.")); diff --git a/Mage.Sets/src/mage/cards/e/ErgRaiders.java b/Mage.Sets/src/mage/cards/e/ErgRaiders.java index 8154fc3024..fbf0ea92e3 100644 --- a/Mage.Sets/src/mage/cards/e/ErgRaiders.java +++ b/Mage.Sets/src/mage/cards/e/ErgRaiders.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -34,7 +34,7 @@ public final class ErgRaiders extends CardImpl { this.toughness = new MageInt(3); // At the beginning of your end step, if Erg Raiders didn't attack this turn, Erg Raiders deals 2 damage to you unless it came under your control this turn. - TriggeredAbility ability = new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility(new DamageControllerEffect(2), TargetController.YOU, false), + TriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility(new DamageControllerEffect(2), TargetController.YOU, false), new ErgRaidersCondition(), "At the beginning of your end step, if {this} didn't attack this turn, {this} deals 2 damage to you unless it came under your control this turn."); ability.addWatcher(new AttackedThisTurnWatcher()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/e/EvilTwin.java b/Mage.Sets/src/mage/cards/e/EvilTwin.java index 339fcdbd07..51a77803e5 100644 --- a/Mage.Sets/src/mage/cards/e/EvilTwin.java +++ b/Mage.Sets/src/mage/cards/e/EvilTwin.java @@ -39,9 +39,9 @@ public final class EvilTwin extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // You may have Evil Twin enter the battlefield as a copy of any creature on the battlefield except it gains "{U}{B}, {T}: Destroy target creature with the same name as this creature." + // You may have Evil Twin enter the battlefield as a copy of any creature on the battlefield, except it has "{U}{B}, {T}: Destroy target creature with the same name as this creature." Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new EvilTwinApplyToPermanent()); - effect.setText("as a copy of any creature on the battlefield except it gains \"{U}{B}, {T}: Destroy target creature with the same name as this creature.\""); + effect.setText("as a copy of any creature on the battlefield, except it has \"{U}{B}, {T}: Destroy target creature with the same name as this creature.\""); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/e/ExcavationElephant.java b/Mage.Sets/src/mage/cards/e/ExcavationElephant.java index c38416ecf2..189d10c406 100644 --- a/Mage.Sets/src/mage/cards/e/ExcavationElephant.java +++ b/Mage.Sets/src/mage/cards/e/ExcavationElephant.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.constants.SubType; @@ -35,7 +35,7 @@ public final class ExcavationElephant extends CardImpl { // When Excavation Elephant enters the battlefield, if it was kicked, return target artifact card from your graveyard to your hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, " + "return target artifact card from your graveyard to your hand." diff --git a/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java b/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java index a59e0c6180..67b8a557cc 100644 --- a/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java +++ b/Mage.Sets/src/mage/cards/e/ExileIntoDarkness.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; @@ -40,7 +40,7 @@ public final class ExileIntoDarkness extends CardImpl { // At the beginning of your upkeep, if you have more cards in hand than each opponent, you may return Exile into Darkness from your graveyard to your hand. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true), diff --git a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java index f3c1c2f580..1322d056ff 100644 --- a/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java +++ b/Mage.Sets/src/mage/cards/e/ExtricatorOfSin.java @@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.TransformSourceEffect; @@ -51,7 +51,7 @@ public final class ExtricatorOfSin extends CardImpl { // Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, transform Extricator of Sin. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, false), DeliriumCondition.instance, "Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java b/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java index 991f00d20a..ac2641cda7 100644 --- a/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java +++ b/Mage.Sets/src/mage/cards/e/EyesOfTheWisent.java @@ -1,7 +1,6 @@ package mage.cards.e; -import java.util.UUID; import mage.ObjectColor; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.MyTurnCondition; @@ -15,6 +14,8 @@ import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.permanent.token.EyesOfTheWisentElementalToken; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java index 836e8f3211..bedb618045 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java +++ b/Mage.Sets/src/mage/cards/f/FaerieMiscreant.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -45,7 +45,7 @@ public final class FaerieMiscreant extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false), new PermanentsOnTheBattlefieldCondition(filter), "When Faerie Miscreant enters the battlefield, if you control another creature named Faerie Miscreant, draw a card"); diff --git a/Mage.Sets/src/mage/cards/f/FaerieTauntings.java b/Mage.Sets/src/mage/cards/f/FaerieTauntings.java index 79140b0b23..2d27389b7e 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieTauntings.java +++ b/Mage.Sets/src/mage/cards/f/FaerieTauntings.java @@ -1,7 +1,6 @@ package mage.cards.f; -import java.util.UUID; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.OnOpponentsTurnCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -11,6 +10,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** * * @author Styxo diff --git a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java index 6335cba663..8a4959443b 100644 --- a/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java +++ b/Mage.Sets/src/mage/cards/f/FairgroundsTrumpeter.java @@ -8,7 +8,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -34,7 +34,7 @@ public final class FairgroundsTrumpeter extends CardImpl { this.toughness = new MageInt(2); // At the beginning of each end step, if a +1/+1 counter was put on a permanent under your control this turn, put a +1/+1 counter on Fairgrounds Trumpeter. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.ANY, false), FairgroundsTrumpeterCondition.instance, "At the beginning of each end step, if a +1/+1 counter was put on a permanent under your control this turn, put a +1/+1 counter on {this}."), diff --git a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java index 00ad372609..95c31d5eeb 100644 --- a/Mage.Sets/src/mage/cards/f/FaithfulSquire.java +++ b/Mage.Sets/src/mage/cards/f/FaithfulSquire.java @@ -37,7 +37,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -74,7 +74,7 @@ public final class FaithfulSquire extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); // At the beginning of the end step, if there are two or more ki counters on Faithful Squire, you may flip it - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new KaisoMemoryOfLoyaltyToken()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java b/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java index 16a9193bab..416a8c1c61 100644 --- a/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java +++ b/Mage.Sets/src/mage/cards/f/FanaticOfXenagos.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; @@ -39,7 +39,7 @@ public final class FanaticOfXenagos extends CardImpl { // When Fanatic of Xenagos enters the battlefield, if its tribute wasn't paid, it gets +1/+1 and gains haste until end of turn. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn)); ability.addEffect( new GainAbilitySourceEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn))); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, it gets +1/+1 and gains haste until end of turn.")); } diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java index 2e223ba171..d4f6bf4026 100644 --- a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.keyword.MenaceAbility; @@ -47,7 +47,7 @@ public final class FathomFleetCaptain extends CardImpl { this.addAbility(new MenaceAbility()); // Whenever Fathom Fleet Captain attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new PirateToken()), new GenericManaCost(2)), false), new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks, if you control another nontoken Pirate, you may pay {2}. If you do, create a 2/2 black Pirate creature token with menace")); diff --git a/Mage.Sets/src/mage/cards/f/FeastOnTheFallen.java b/Mage.Sets/src/mage/cards/f/FeastOnTheFallen.java index fce074f39f..22d1800804 100644 --- a/Mage.Sets/src/mage/cards/f/FeastOnTheFallen.java +++ b/Mage.Sets/src/mage/cards/f/FeastOnTheFallen.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,7 +28,7 @@ public final class FeastOnTheFallen extends CardImpl { // At the beginning of each upkeep, if an opponent lost life last turn, put a +1/+1 counter on target creature you control. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.ANY, false), diff --git a/Mage.Sets/src/mage/cards/f/FelidarSovereign.java b/Mage.Sets/src/mage/cards/f/FelidarSovereign.java index fd4494c1fe..6ba372102f 100644 --- a/Mage.Sets/src/mage/cards/f/FelidarSovereign.java +++ b/Mage.Sets/src/mage/cards/f/FelidarSovereign.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.VigilanceAbility; @@ -36,7 +36,7 @@ public final class FelidarSovereign extends CardImpl { this.addAbility(LifelinkAbility.getInstance()); // At the beginning of your upkeep, if you have 40 or more life, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new FortyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 40 or more life, you win the game.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new FortyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 40 or more life, you win the game.")); } diff --git a/Mage.Sets/src/mage/cards/f/FiremaneAngel.java b/Mage.Sets/src/mage/cards/f/FiremaneAngel.java index 10b9debc7e..7bb07a7f2b 100644 --- a/Mage.Sets/src/mage/cards/f/FiremaneAngel.java +++ b/Mage.Sets/src/mage/cards/f/FiremaneAngel.java @@ -9,7 +9,7 @@ import mage.abilities.condition.Condition; import mage.abilities.condition.common.IsStepCondition; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalActivatedAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; import mage.abilities.keyword.FirstStrikeAbility; @@ -41,7 +41,7 @@ public final class FiremaneAngel extends CardImpl { // Firststrike this.addAbility(FirstStrikeAbility.getInstance()); // At the beginning of your upkeep, if Firemane Angel is in your graveyard or on the battlefield, you may gain 1 life. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.ALL, new GainLifeEffect(1), TargetController.YOU, true), SourceOnBattlefieldOrGraveyardCondition.instance, "At the beginning of your upkeep, if {this} is in your graveyard or on the battlefield, you may gain 1 life"); diff --git a/Mage.Sets/src/mage/cards/f/FirstResponse.java b/Mage.Sets/src/mage/cards/f/FirstResponse.java index 05c8646d35..bce1070dd7 100644 --- a/Mage.Sets/src/mage/cards/f/FirstResponse.java +++ b/Mage.Sets/src/mage/cards/f/FirstResponse.java @@ -4,7 +4,7 @@ package mage.cards.f; import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.LiveLostLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -22,7 +22,7 @@ public final class FirstResponse extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); // At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new SoldierToken()), TargetController.ANY, false), LiveLostLastTurnCondition.instance, "At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token.")); diff --git a/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java b/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java index 2fac24a57a..e3a7203845 100644 --- a/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java +++ b/Mage.Sets/src/mage/cards/f/FlameWreathedPhoenix.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -41,7 +41,7 @@ public final class FlameWreathedPhoenix extends CardImpl { TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield)); Effect effect = new GainAbilitySourceEffect(new DiesTriggeredAbility(new ReturnToHandSourceEffect())); ability.addEffect(effect); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, it gains haste and \"When this creature dies, return it to its owner's hand.\"")); } diff --git a/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java b/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java index 177799f745..05ebb2bfe6 100644 --- a/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java +++ b/Mage.Sets/src/mage/cards/f/FlameheartWerewolf.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -41,7 +41,7 @@ public final class FlameheartWerewolf extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Flameheart Werewolf. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public FlameheartWerewolf(final FlameheartWerewolf card) { diff --git a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java index 3f54c7c364..5f806e6506 100644 --- a/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java +++ b/Mage.Sets/src/mage/cards/f/FlamewakePhoenix.java @@ -7,7 +7,7 @@ import mage.abilities.common.AttacksEachCombatStaticAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.FerociousCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; import mage.abilities.keyword.FlyingAbility; @@ -39,7 +39,7 @@ public final class FlamewakePhoenix extends CardImpl { this.addAbility(new AttacksEachCombatStaticAbility()); // Ferocious — At the beginning of combat on your turn, if you control a creature with power 4 or greater, you may pay {R}. If you do, return Flamewake Phoenix from your graveyard to the battlefield. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility( Zone.GRAVEYARD, new DoIfCostPaid(new ReturnToBattlefieldUnderOwnerControlSourceEffect(), new ManaCostsImpl("{R}")), diff --git a/Mage.Sets/src/mage/cards/f/FoundryHornet.java b/Mage.Sets/src/mage/cards/f/FoundryHornet.java index ec1acfbe3e..dc9eb22f34 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryHornet.java +++ b/Mage.Sets/src/mage/cards/f/FoundryHornet.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -49,7 +49,7 @@ public final class FoundryHornet extends CardImpl { // When Foundry Hornet enters the battlefield, if you control a creature with a +1/+1 counter on it, creatures your opponents control get -1/-1 until end of turn. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filterOpponent, false), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); } public FoundryHornet(final FoundryHornet card) { diff --git a/Mage.Sets/src/mage/cards/f/FrontierSiege.java b/Mage.Sets/src/mage/cards/f/FrontierSiege.java index b3a478cbca..6674c0568f 100644 --- a/Mage.Sets/src/mage/cards/f/FrontierSiege.java +++ b/Mage.Sets/src/mage/cards/f/FrontierSiege.java @@ -1,7 +1,6 @@ package mage.cards.f; -import java.util.UUID; import mage.Mana; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; @@ -10,8 +9,8 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.condition.common.ModeChoiceSourceCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.mana.AddManaToManaPoolSourceControllerEffect; import mage.abilities.effects.common.ChooseModeEffect; +import mage.abilities.effects.mana.AddManaToManaPoolSourceControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,6 +23,8 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/f/FurnaceDragon.java b/Mage.Sets/src/mage/cards/f/FurnaceDragon.java index 06b3ffee26..22303f5a72 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceDragon.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceDragon.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ExileAllEffect; import mage.abilities.keyword.AffinityForArtifactsAbility; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +42,7 @@ public final class FurnaceDragon extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Furnace Dragon enters the battlefield, if you cast it from your hand, exile all artifacts. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ExileAllEffect(filter), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, exile all artifacts."), diff --git a/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java b/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java index 2bcaece617..37c6769aa9 100644 --- a/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java +++ b/Mage.Sets/src/mage/cards/g/GatekeeperOfMalakir.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -44,7 +44,7 @@ public final class GatekeeperOfMalakir extends CardImpl { // When Gatekeeper of Malakir enters the battlefield, if it was kicked, target player sacrifices a creature. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SacrificeEffect(filter, 1, "target player")); - Ability conditionalAbility = new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, target player sacrifices a creature."); + Ability conditionalAbility = new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, target player sacrifices a creature."); conditionalAbility.addTarget(new TargetPlayer()); this.addAbility(conditionalAbility); } diff --git a/Mage.Sets/src/mage/cards/g/GatstafArsonists.java b/Mage.Sets/src/mage/cards/g/GatstafArsonists.java index 3e851a3faa..0f028bc29c 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafArsonists.java +++ b/Mage.Sets/src/mage/cards/g/GatstafArsonists.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class GatstafArsonists extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Gatstaf Arsonists. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public GatstafArsonists(final GatstafArsonists card) { diff --git a/Mage.Sets/src/mage/cards/g/GatstafHowler.java b/Mage.Sets/src/mage/cards/g/GatstafHowler.java index 57137ce67a..cbe3566139 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafHowler.java +++ b/Mage.Sets/src/mage/cards/g/GatstafHowler.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.IntimidateAbility; import mage.abilities.keyword.TransformAbility; @@ -37,7 +37,7 @@ public final class GatstafHowler extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Howler. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public GatstafHowler(final GatstafHowler card) { diff --git a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java index 9d881aab16..6c7473553d 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafRavagers.java +++ b/Mage.Sets/src/mage/cards/g/GatstafRavagers.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.TransformAbility; @@ -37,7 +37,7 @@ public final class GatstafRavagers extends CardImpl { this.addAbility(new MenaceAbility()); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Ravagers. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public GatstafRavagers(final GatstafRavagers card) { diff --git a/Mage.Sets/src/mage/cards/g/GatstafShepherd.java b/Mage.Sets/src/mage/cards/g/GatstafShepherd.java index b37569a194..53cc66b992 100644 --- a/Mage.Sets/src/mage/cards/g/GatstafShepherd.java +++ b/Mage.Sets/src/mage/cards/g/GatstafShepherd.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class GatstafShepherd extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Gatstaf Shepherd. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public GatstafShepherd(final GatstafShepherd card) { diff --git a/Mage.Sets/src/mage/cards/g/GeierReachBandit.java b/Mage.Sets/src/mage/cards/g/GeierReachBandit.java index 4c3cc0ab09..d1d7d42b1a 100644 --- a/Mage.Sets/src/mage/cards/g/GeierReachBandit.java +++ b/Mage.Sets/src/mage/cards/g/GeierReachBandit.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TransformAbility; @@ -40,7 +40,7 @@ public final class GeierReachBandit extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Geier Reach Bandit. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public GeierReachBandit(final GeierReachBandit card) { diff --git a/Mage.Sets/src/mage/cards/g/GenesisChamber.java b/Mage.Sets/src/mage/cards/g/GenesisChamber.java index 5dfc6c2358..709aa2b523 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisChamber.java +++ b/Mage.Sets/src/mage/cards/g/GenesisChamber.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class GenesisChamber extends CardImpl { // Whenever a nontoken creature enters the battlefield, if Genesis Chamber is untapped, that creature's controller creates a 1/1 colorless Myr artifact creature token. TriggeredAbility ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GenesisChamberEffect(), filter, false, SetTargetPointer.PERMANENT, ""); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SourceUntappedCondition.instance, "Whenever a nontoken creature enters the battlefield, " + "if {this} is untapped, " diff --git a/Mage.Sets/src/mage/cards/g/GhirapurOrrery.java b/Mage.Sets/src/mage/cards/g/GhirapurOrrery.java index b7deec0537..c3cb70df3a 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurOrrery.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurOrrery.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.IntCompareCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.continuous.PlayAdditionalLandsAllEffect; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class GhirapurOrrery extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayAdditionalLandsAllEffect())); // At the beginning of each player's upkeep, if that player has no cards in hand, that player draws three cards. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(3), TargetController.ANY, false, true), new GhirapurOrreryCondition(), "At the beginning of each player's upkeep, if that player has no cards in hand, that player draws three cards.")); diff --git a/Mage.Sets/src/mage/cards/g/GhituChronicler.java b/Mage.Sets/src/mage/cards/g/GhituChronicler.java index 0b76adf944..a879a8ac58 100644 --- a/Mage.Sets/src/mage/cards/g/GhituChronicler.java +++ b/Mage.Sets/src/mage/cards/g/GhituChronicler.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.constants.SubType; @@ -36,7 +36,7 @@ public final class GhituChronicler extends CardImpl { // When Ghitu Chronicler enters the battlefield, if it was kicked, return target instant or sorcery card from your graveyard to your hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); ability.addTarget(new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"))); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, " + "return target instant or sorcery card from your graveyard to your hand." diff --git a/Mage.Sets/src/mage/cards/g/GhituJourneymage.java b/Mage.Sets/src/mage/cards/g/GhituJourneymage.java index 0c10657261..2c7c677c62 100644 --- a/Mage.Sets/src/mage/cards/g/GhituJourneymage.java +++ b/Mage.Sets/src/mage/cards/g/GhituJourneymage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamagePlayersEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -40,7 +40,7 @@ public final class GhituJourneymage extends CardImpl { // When Ghitu Journeymage enters the battlefield, if you control another Wizard, Ghitu Journeymage deals 2 damage to each opponent. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(2, TargetController.OPPONENT)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Wizard, {this} deals 2 damage to each opponent." diff --git a/Mage.Sets/src/mage/cards/g/GibberingFiend.java b/Mage.Sets/src/mage/cards/g/GibberingFiend.java index 3f03518749..024fd71faa 100644 --- a/Mage.Sets/src/mage/cards/g/GibberingFiend.java +++ b/Mage.Sets/src/mage/cards/g/GibberingFiend.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class GibberingFiend extends CardImpl { // Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // Gibbering Fiend deals 1 damage to that player. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.OPPONENT, false, true), DeliriumCondition.instance, "Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/g/GiftofGrowth.java b/Mage.Sets/src/mage/cards/g/GiftOfGrowth.java similarity index 84% rename from Mage.Sets/src/mage/cards/g/GiftofGrowth.java rename to Mage.Sets/src/mage/cards/g/GiftOfGrowth.java index 0dedf15bd0..2e599b3236 100644 --- a/Mage.Sets/src/mage/cards/g/GiftofGrowth.java +++ b/Mage.Sets/src/mage/cards/g/GiftOfGrowth.java @@ -4,7 +4,6 @@ package mage.cards.g; import mage.abilities.condition.LockedInCondition; import mage.abilities.condition.common.KickedCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.KickerAbility; @@ -20,9 +19,9 @@ import java.util.UUID; * * @author rscoates */ -public final class GiftofGrowth extends CardImpl { +public final class GiftOfGrowth extends CardImpl { - public GiftofGrowth(UUID ownerId, CardSetInfo setInfo) { + public GiftOfGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Kicker {2} @@ -36,12 +35,12 @@ public final class GiftofGrowth extends CardImpl { "It gets +2/+2 until end of turn. If this spell was kicked, that creature gets +4/+4 until end of turn instead.")); } - public GiftofGrowth(final GiftofGrowth card) { + public GiftOfGrowth(final GiftOfGrowth card) { super(card); } @Override - public GiftofGrowth copy() { - return new GiftofGrowth(this); + public GiftOfGrowth copy() { + return new GiftOfGrowth(this); } } diff --git a/Mage.Sets/src/mage/cards/g/Gigantiform.java b/Mage.Sets/src/mage/cards/g/Gigantiform.java index 879a0513ac..35c5f5742d 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantiform.java +++ b/Mage.Sets/src/mage/cards/g/Gigantiform.java @@ -7,7 +7,7 @@ import mage.abilities.StaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; @@ -49,7 +49,7 @@ public final class Gigantiform extends CardImpl { // Enchanted creature has base power and toughness 8/8 and has trample. this.addAbility(new GigantiformAbility()); // When Gigantiform enters the battlefield, if it was kicked, you may search your library for a card named Gigantiform, put it onto the battlefield, then shuffle your library. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GigantiformEffect(), true), KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, you may search your library for a card named Gigantiform, put it onto the battlefield, then shuffle your library.")); diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java index 92e79d7f10..2b0eab220b 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java +++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java @@ -37,9 +37,9 @@ public final class Gigantoplasm extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // You may have Gigantoplasm enter the battlefield as a copy of any creature on the battlefield except it gains "{X}: This creature has base power and toughness X/X." + // You may have Gigantoplasm enter the battlefield as a copy of any creature on the battlefield, except it has "{X}: This creature has base power and toughness X/X." Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new GigantoplasmApplyToPermanent()); - effect.setText("a copy of any creature on the battlefield except it gains \"{X}: This creature has base power and toughness X/X.\""); + effect.setText("a copy of any creature on the battlefield, except it has \"{X}: This creature has base power and toughness X/X.\""); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/g/GildedCerodon.java b/Mage.Sets/src/mage/cards/g/GildedCerodon.java index 396d5681b2..c2abfda696 100644 --- a/Mage.Sets/src/mage/cards/g/GildedCerodon.java +++ b/Mage.Sets/src/mage/cards/g/GildedCerodon.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,7 +37,7 @@ public final class GildedCerodon extends CardImpl { this.toughness = new MageInt(4); // Whenever Gilded Cerodon attacks, if you control a Desert or there is a Desert card in your graveyard, target creature can't block this turn. - Ability ability = new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false), new GildedCerodonCondition(), rule); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn), false), new GildedCerodonCondition(), rule); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java b/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java index ee08affcbf..20d3a59a60 100644 --- a/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java +++ b/Mage.Sets/src/mage/cards/g/GiselaTheBrokenBlade.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.MeldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.MeldEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +43,7 @@ public final class GiselaTheBrokenBlade extends CardImpl { this.addAbility(LifelinkAbility.getInstance()); // At the beginning of your end step, if you both own and control Gisela, the Broken Blade and a creature named Bruna, the Fading Light, exile them, then meld them into Brisela, Voice of Nightmares. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility( new MeldEffect("Bruna, the Fading Light", new BriselaVoiceOfNightmares(ownerId, diff --git a/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java b/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java index 1da7b04ccc..e91b8115b6 100644 --- a/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java +++ b/Mage.Sets/src/mage/cards/g/GlenElendraPranksters.java @@ -1,7 +1,6 @@ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; @@ -15,6 +14,8 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** * * @author Markedagain diff --git a/Mage.Sets/src/mage/cards/g/Glimmervoid.java b/Mage.Sets/src/mage/cards/g/Glimmervoid.java index a15f52778e..494bd30195 100644 --- a/Mage.Sets/src/mage/cards/g/Glimmervoid.java +++ b/Mage.Sets/src/mage/cards/g/Glimmervoid.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; @@ -26,7 +26,7 @@ public final class Glimmervoid extends CardImpl { // At the beginning of the end step, if you control no artifacts, sacrifice Glimmervoid. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.FEWER_THAN, 1), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.FEWER_THAN, 1), "At the beginning of the end step, if you control no artifacts, sacrifice {this}.")); // {tap}: Add one mana of any color. this.addAbility(new AnyColorManaAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java b/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java index 8bffdf7a7e..1bf09ba7a5 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBushwhacker.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.HasteAbility; @@ -41,7 +41,7 @@ public final class GoblinBushwhacker extends CardImpl { Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES )); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, KickedCondition.instance, "When {this} enters the battlefield, " diff --git a/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java b/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java index c844724d52..5a55da8c4e 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRuinblaster.java @@ -6,7 +6,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.KickerAbility; @@ -40,7 +40,7 @@ public final class GoblinRuinblaster extends CardImpl { // When Goblin Ruinblaster enters the battlefield, if it was kicked, destroy target nonbasic land. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetNonBasicLandPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target nonbasic land.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target nonbasic land.")); } public GoblinRuinblaster(final GoblinRuinblaster card) { diff --git a/Mage.Sets/src/mage/cards/g/GrafRats.java b/Mage.Sets/src/mage/cards/g/GrafRats.java index 477eed7ee2..339fa36f5b 100644 --- a/Mage.Sets/src/mage/cards/g/GrafRats.java +++ b/Mage.Sets/src/mage/cards/g/GrafRats.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.MeldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.MeldEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,8 +28,7 @@ public final class GrafRats extends CardImpl { this.toughness = new MageInt(1); // At the beginning of combat on your turn, if you both own and control Graf Rats and a creature named Midnight Scavengers, exile them, then meld them into Chittering Host. - - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(new MeldEffect("Midnight Scavengers", new ChitteringHost(ownerId, new CardSetInfo("Chittering Host", "EMN", "96", Rarity.COMMON))), TargetController.YOU, false), new MeldCondition("Midnight Scavengers"), "At the beginning of combat on your turn, if you both own and control {this} and a creature named Midnight Scavengers, exile them, then meld them into Chittering Host.")); diff --git a/Mage.Sets/src/mage/cards/g/GraveScrabbler.java b/Mage.Sets/src/mage/cards/g/GraveScrabbler.java index 2174464a06..a51594e9a7 100644 --- a/Mage.Sets/src/mage/cards/g/GraveScrabbler.java +++ b/Mage.Sets/src/mage/cards/g/GraveScrabbler.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.MadnessAbility; import mage.cards.Card; @@ -32,7 +32,7 @@ public final class GraveScrabbler extends CardImpl { //you may return target creature card from a graveyard to its owner's hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard"))); - this.addAbility(new ConditionalTriggeredAbility(ability, MadnessAbility.GetCondition(), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MadnessAbility.GetCondition(), "When {this} enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand.")); } diff --git a/Mage.Sets/src/mage/cards/g/GreenerPastures.java b/Mage.Sets/src/mage/cards/g/GreenerPastures.java index b90d25158f..c3c80e67f2 100644 --- a/Mage.Sets/src/mage/cards/g/GreenerPastures.java +++ b/Mage.Sets/src/mage/cards/g/GreenerPastures.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class GreenerPastures extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); // At the beginning of each player's upkeep, if that player controls more lands than each other player, the player creates a 1/1 green Saproling creature token. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( Zone.BATTLEFIELD, new CreateTokenTargetEffect(new SaprolingToken()), diff --git a/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java b/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java index eeeb8362ec..d5093a40a9 100644 --- a/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java +++ b/Mage.Sets/src/mage/cards/g/GrizzledOutcasts.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class GrizzledOutcasts extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Grizzled Outcasts. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public GrizzledOutcasts(final GrizzledOutcasts card) { diff --git a/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java b/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java index c6252bf309..b749f1410e 100644 --- a/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java +++ b/Mage.Sets/src/mage/cards/g/GrowingRitesOfItlimoc.java @@ -6,7 +6,7 @@ import java.util.UUID; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -49,7 +49,7 @@ public final class GrowingRitesOfItlimoc extends CardImpl { // At the beginning of your end step, if you control four or more creatures, transform Growing Rites of Itlimoc. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_A_CREATURE, ComparisonType.MORE_THAN, 3), "At the beginning of your end step, if you control four or more creatures, transform {this}")); diff --git a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java index 7feb832ab0..7a1c568f8e 100644 --- a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java +++ b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; @@ -47,11 +47,11 @@ public final class GwyllionHedgeMage extends CardImpl { this.toughness = new MageInt(2); // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Plains, you may create a 1/1 white Kithkin Soldier creature token. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken()), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken()), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); this.addAbility(ability); // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature. - Ability ability2 = new ConditionalTriggeredAbility( + Ability ability2 = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); diff --git a/Mage.Sets/src/mage/cards/h/HagHedgeMage.java b/Mage.Sets/src/mage/cards/h/HagHedgeMage.java index b7260cbc97..ccbc85ed30 100644 --- a/Mage.Sets/src/mage/cards/h/HagHedgeMage.java +++ b/Mage.Sets/src/mage/cards/h/HagHedgeMage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; @@ -46,12 +46,12 @@ public final class HagHedgeMage extends CardImpl { this.toughness = new MageInt(2); // When Hag Hedge-Mage enters the battlefield, if you control two or more Swamps, you may have target player discard a card. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule); ability.addTarget(new TargetPlayer()); this.addAbility(ability); // When Hag Hedge-Mage enters the battlefield, if you control two or more Forests, you may put target card from your graveyard on top of your library. - Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); + Ability ability2 = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); ability2.addTarget(new TargetCardInYourGraveyard()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java b/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java index 7d4ab40a90..26b44fac7b 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java +++ b/Mage.Sets/src/mage/cards/h/HanweirMilitiaCaptain.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class HanweirMilitiaCaptain extends CardImpl { // At the beginning of your upkeep, if you control four or more creatures, transform Hanweir Militia Captain. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 3), "At the beginning of your upkeep, if you control four or more creatures, transform {this}")); diff --git a/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java b/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java index 47f24ca989..463a9b8409 100644 --- a/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java +++ b/Mage.Sets/src/mage/cards/h/HanweirWatchkeep.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class HanweirWatchkeep extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Hanweir Watchkeep. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public HanweirWatchkeep(final HanweirWatchkeep card) { diff --git a/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java b/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java index 981019c6b1..74c6fdb110 100644 --- a/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java +++ b/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; @@ -44,7 +44,7 @@ public final class HaphazardBombardment extends CardImpl { FilterPermanent filter = new FilterPermanent("if two or more permanents you don't control have an aim counter on them"); filter.add(new ControllerPredicate(TargetController.NOT_YOU)); filter.add(new CounterPredicate(CounterType.AIM)); - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfYourEndStepTriggeredAbility(new HaphazardBombardmentEndOfTurnEffect(), false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfYourEndStepTriggeredAbility(new HaphazardBombardmentEndOfTurnEffect(), false), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1, false), "At the beginning of your end step, if two or more permanents you don't control have an aim counter on them, destroy one of those permanents at random")); } diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java index aab2013c72..ecf355dea2 100644 --- a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java +++ b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java @@ -1,27 +1,24 @@ - package mage.cards.h; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.SendOptionUsedEventEffect; import mage.abilities.keyword.EmbalmAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Outcome; -import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; @@ -41,13 +38,11 @@ public final class HeartPiercerManticore extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(3); - // When Heart-Piercer Manticore enters the battlefield, you may sacrifice another creature. - Ability firstAbility = new EntersBattlefieldTriggeredAbility(new HeartPiercerManticoreSacrificeEffect(), true); - this.addAbility(firstAbility); - // When you do, Heart-Piercer Manticore deals damage equal to that creature's power to any target. - Ability secondAbility = new HeartPiercerManticoreSacrificeTriggeredAbility(firstAbility.getOriginalId()); - secondAbility.addTarget(new TargetAnyTarget()); - this.addAbility(secondAbility); + // When Heart-Piercer Manticore enters the battlefield, you may sacrifice another creature. When you do, Heart-Piercer Manticore deals damage equal to that creature's power to any target. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new HeartPiercerManticoreSacrificeEffect(), true + )); + // Embalm {5}{R} this.addAbility(new EmbalmAbility(new ManaCostsImpl("{5}{R}"), this)); @@ -67,7 +62,8 @@ class HeartPiercerManticoreSacrificeEffect extends OneShotEffect { public HeartPiercerManticoreSacrificeEffect() { super(Outcome.Damage); - this.staticText = "you may sacrifice another creature"; + this.staticText = "sacrifice another creature. When you do, " + + "{this} deals damage equal to that creature's power to any target"; } public HeartPiercerManticoreSacrificeEffect(final HeartPiercerManticoreSacrificeEffect effect) { @@ -87,8 +83,11 @@ class HeartPiercerManticoreSacrificeEffect extends OneShotEffect { if (controller.choose(outcome, target, source.getSourceId(), game)) { Permanent toSacrifice = game.getPermanent(target.getFirstTarget()); if (toSacrifice != null) { - toSacrifice.sacrifice(source.getSourceId(), game); - return new SendOptionUsedEventEffect(toSacrifice.getPower().getValue()).apply(game, source); + DelayedTriggeredAbility trigger = new HeartPiercerManticoreReflexiveTriggeredAbility(toSacrifice.getPower().getValue()); + if (toSacrifice.sacrifice(source.getSourceId(), game)) { + game.addDelayedTriggeredAbility(trigger, source); + return new SendOptionUsedEventEffect().apply(game, source); + } } } return true; @@ -97,44 +96,36 @@ class HeartPiercerManticoreSacrificeEffect extends OneShotEffect { } } -class HeartPiercerManticoreSacrificeTriggeredAbility extends TriggeredAbilityImpl { +class HeartPiercerManticoreReflexiveTriggeredAbility extends DelayedTriggeredAbility { - private final UUID relatedTriggerdAbilityOriginalId; - - public HeartPiercerManticoreSacrificeTriggeredAbility(UUID relatedTriggerdAbilityOriginalId) { - super(Zone.BATTLEFIELD, new InfoEffect("{this} deals damage equal to that creature's power to any target")); - this.relatedTriggerdAbilityOriginalId = relatedTriggerdAbilityOriginalId; + public HeartPiercerManticoreReflexiveTriggeredAbility(int damage) { + super(new DamageTargetEffect(damage), Duration.OneUse, true); + this.addTarget(new TargetAnyTarget()); } - public HeartPiercerManticoreSacrificeTriggeredAbility(final HeartPiercerManticoreSacrificeTriggeredAbility ability) { + public HeartPiercerManticoreReflexiveTriggeredAbility(final HeartPiercerManticoreReflexiveTriggeredAbility ability) { super(ability); - this.relatedTriggerdAbilityOriginalId = ability.relatedTriggerdAbilityOriginalId; } @Override - public HeartPiercerManticoreSacrificeTriggeredAbility copy() { - return new HeartPiercerManticoreSacrificeTriggeredAbility(this); + public HeartPiercerManticoreReflexiveTriggeredAbility copy() { + return new HeartPiercerManticoreReflexiveTriggeredAbility(this); } @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.OPTION_USED; + return event.getType() == GameEvent.EventType.OPTION_USED; } @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getPlayerId().equals(this.getControllerId()) - && event.getTargetId().equals(relatedTriggerdAbilityOriginalId) - && event.getSourceId().equals(getSourceId())) { - getEffects().clear(); - getEffects().add(new DamageTargetEffect(event.getAmount())); - return true; - } - return false; + return event.getPlayerId().equals(this.getControllerId()) + && event.getSourceId().equals(this.getSourceId()); } @Override public String getRule() { - return "When you do, {this} deals damage equal to that creature's power to any target."; + return "When you sacrifice a creature to {this}'s ability, " + + "{this} deals damage equal to that creature's power to any target"; } } diff --git a/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java b/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java index 10672d441b..ac6ff037ae 100644 --- a/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java +++ b/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; @@ -38,7 +38,7 @@ public final class HeartstabberMosquito extends CardImpl { // When Heartstabber Mosquito enters the battlefield, if it was kicked, destroy target creature. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target creature.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target creature.")); } public HeartstabberMosquito(final HeartstabberMosquito card) { diff --git a/Mage.Sets/src/mage/cards/h/HeatShimmer.java b/Mage.Sets/src/mage/cards/h/HeatShimmer.java index 2f86cafcd4..e0e8cb79ca 100644 --- a/Mage.Sets/src/mage/cards/h/HeatShimmer.java +++ b/Mage.Sets/src/mage/cards/h/HeatShimmer.java @@ -27,7 +27,7 @@ public final class HeatShimmer extends CardImpl { public HeatShimmer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); - // Create a token that's a copy of target creature. That token has haste and "At the beginning of the end step, exile this permanent." + //Create a token that's a copy of target creature, except it has haste and "At the beginning of the end step, exile this permanent." this.getSpellAbility().addEffect(new HeatShimmerEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } @@ -46,7 +46,7 @@ class HeatShimmerEffect extends OneShotEffect { public HeatShimmerEffect() { super(Outcome.Copy); - this.staticText = "Create a token that's a copy of target creature. That token has haste and \"At the beginning of the end step, exile this permanent.\""; + this.staticText = "Create a token that's a copy of target creature, except it has haste and \"At the beginning of the end step, exile this permanent.\""; } public HeatShimmerEffect(final HeatShimmerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java index 9e6bdb8537..83b21abffc 100644 --- a/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.FerociousCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class HeirOfTheWilds extends CardImpl { // Deathtouch this.addAbility(DeathtouchAbility.getInstance()); // Ferocious - Whenever Heir of the Wilds attacks, if you control a creature with power 4 or greater, Heir of the Wilds gets +1/+1 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new BoostSourceEffect(1,1,Duration.EndOfTurn), false), FerociousCondition.instance, "Ferocious — Whenever {this} attacks, if you control a creature with power 4 or greater, {this} gets +1/+1 until end of turn." diff --git a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java index a2075898c3..dc62fe1377 100644 --- a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java +++ b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java @@ -6,7 +6,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -38,7 +38,7 @@ public final class HelixPinnacle extends CardImpl { new ManaCostsImpl("{X}"))); // At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false), new SourceHasCounterCondition(CounterType.TOWER, 100, Integer.MAX_VALUE), rule)); diff --git a/Mage.Sets/src/mage/cards/h/HellfireMongrel.java b/Mage.Sets/src/mage/cards/h/HellfireMongrel.java index e2c4d45a9d..14f5824c2b 100644 --- a/Mage.Sets/src/mage/cards/h/HellfireMongrel.java +++ b/Mage.Sets/src/mage/cards/h/HellfireMongrel.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -32,7 +32,7 @@ public final class HellfireMongrel extends CardImpl { this.toughness = new MageInt(2); // At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, Hellfire Mongrel deals 2 damage to him or her. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), TargetController.OPPONENT, false, true), new CardsInActivePlayersHandCondition(), "At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, {this} deals 2 damage to him or her." diff --git a/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java b/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java index 51402c13f7..d39feaeecf 100644 --- a/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java +++ b/Mage.Sets/src/mage/cards/h/HellkiteTyrant.java @@ -9,7 +9,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -56,7 +56,7 @@ public final class HellkiteTyrant extends CardImpl { // At the beginning of your upkeep, if you control twenty or more artifacts, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new PermanentsOnTheBattlefieldCondition(new FilterArtifactPermanent(), ComparisonType.MORE_THAN, 19), "At the beginning of your upkeep, if you control twenty or more artifacts, you win the game.")); diff --git a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java index b1dce2f6f5..d59c7c8894 100644 --- a/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/h/HermitOfTheNatterknolls.java @@ -8,6 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; @@ -46,7 +47,7 @@ public final class HermitOfTheNatterknolls extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Hermit of the Natterknolls. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public HermitOfTheNatterknolls(final HermitOfTheNatterknolls card) { diff --git a/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java b/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java index d97d2fedcb..9db9048c74 100644 --- a/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java +++ b/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java @@ -9,6 +9,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.filter.StaticFilters; import mage.game.permanent.token.SoldierToken; /** @@ -30,7 +31,8 @@ public final class HeroicReinforcements extends CardImpl { this.getSpellAbility().addEffect( new GainAbilityControlledEffect( HasteAbility.getInstance(), - Duration.EndOfTurn + Duration.EndOfTurn, + StaticFilters.FILTER_CONTROLLED_CREATURE ).setText("and gain haste") ); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index 492565d8c9..63b9ac7d8f 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenAncients.java +++ b/Mage.Sets/src/mage/cards/h/HiddenAncients.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class HiddenAncients extends CardImpl { // When an opponent casts an enchantment spell, if Hidden Ancients is an enchantment, Hidden Ancients becomes a 5/5 Treefolk creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenAncientsTreefolkToken(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an enchantment spell, if {this} is an enchantment, {this} becomes a 5/5 Treefolk creature.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java index 3f247e3b50..d65cb33853 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGibbons.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGibbons.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -16,7 +16,6 @@ import mage.filter.FilterSpell; import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -39,7 +38,7 @@ public final class HiddenGibbons extends CardImpl { // When an opponent casts an instant spell, if Hidden Gibbons is an enchantment, Hidden Gibbons becomes a 4/4 Ape creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGibbonsApe(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an instant spell, if {this} is an enchantment, {this} becomes a 4/4 Ape creature.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java index b573f2d32b..c9f7febb40 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java +++ b/Mage.Sets/src/mage/cards/h/HiddenGuerrillas.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -16,7 +16,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterArtifactSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -33,7 +32,7 @@ public final class HiddenGuerrillas extends CardImpl { // When an opponent casts an artifact spell, if Hidden Guerrillas is an enchantment, Hidden Guerrillas becomes a 5/3 Soldier creature with trample. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenGuerrillasSoldier(), "", Duration.WhileOnBattlefield, true, false), new FilterArtifactSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts an artifact spell, if {this} is an enchantment, {this} becomes a 5/3 Soldier creature with trample.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java b/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java index 200e555d2a..479d5ddc12 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java +++ b/Mage.Sets/src/mage/cards/h/HiddenHerbalists.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.Mana; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.mana.BasicManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class HiddenHerbalists extends CardImpl { // Revolt &mdash When Hidden Herbalists enters the battlefield, if a permanent you controlled left the battlefield this turn, add {G}{G}; this.addAbility( - new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new BasicManaEffect(Mana.GreenMana(2)), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, add {G}{G}."), diff --git a/Mage.Sets/src/mage/cards/h/HiddenHerd.java b/Mage.Sets/src/mage/cards/h/HiddenHerd.java index 32cf8031e2..1917dc6117 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenHerd.java +++ b/Mage.Sets/src/mage/cards/h/HiddenHerd.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,7 +19,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; /** * @@ -31,7 +30,7 @@ public final class HiddenHerd extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); // When an opponent plays a nonbasic land, if Hidden Herd is an enchantment, Hidden Herd becomes a 3/3 Beast creature. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new HiddenHerdAbility(), new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent plays a nonbasic land, if {this} is an enchantment, {this} becomes a 3/3 Beast creature." diff --git a/Mage.Sets/src/mage/cards/h/HiddenSpider.java b/Mage.Sets/src/mage/cards/h/HiddenSpider.java index 4da45f9534..549cf2fdf2 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenSpider.java +++ b/Mage.Sets/src/mage/cards/h/HiddenSpider.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ReachAbility; @@ -18,7 +18,6 @@ import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -41,7 +40,7 @@ public final class HiddenSpider extends CardImpl { // When an opponent casts a creature spell with flying, if Hidden Spider is an enchantment, Hidden Spider becomes a 3/5 Spider creature with reach. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new HiddenSpiderToken(), "", Duration.WhileOnBattlefield, true, false), filter, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell with flying, if {this} is an enchantment, {this} becomes a 3/5 Spider creature with reach.")); } diff --git a/Mage.Sets/src/mage/cards/h/HiddenStockpile.java b/Mage.Sets/src/mage/cards/h/HiddenStockpile.java index 68daf02699..9094f3d095 100644 --- a/Mage.Sets/src/mage/cards/h/HiddenStockpile.java +++ b/Mage.Sets/src/mage/cards/h/HiddenStockpile.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.RevoltCondition; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class HiddenStockpile extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}{B}"); // Revolt — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, create a 1/1 colorless Servo artifact creature token. - Ability ability = new ConditionalTriggeredAbility(new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new ServoToken()), false), RevoltCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfYourEndStepTriggeredAbility(new CreateTokenEffect(new ServoToken()), false), RevoltCondition.instance, "Revolt — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, create a 1/1 colorless Servo artifact creature token"); ability.setAbilityWord(AbilityWord.REVOLT); ability.addWatcher(new RevoltWatcher()); diff --git a/Mage.Sets/src/mage/cards/h/HinterlandHermit.java b/Mage.Sets/src/mage/cards/h/HinterlandHermit.java index 69832fe723..256dc16650 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandHermit.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandHermit.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class HinterlandHermit extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Hinterland Hermit. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public HinterlandHermit(final HinterlandHermit card) { diff --git a/Mage.Sets/src/mage/cards/h/HinterlandLogger.java b/Mage.Sets/src/mage/cards/h/HinterlandLogger.java index fe8f5c1730..6634e00414 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandLogger.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandLogger.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class HinterlandLogger extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Hinterland Logger. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public HinterlandLogger(final HinterlandLogger card) { diff --git a/Mage.Sets/src/mage/cards/h/HinterlandScourge.java b/Mage.Sets/src/mage/cards/h/HinterlandScourge.java index 910866a282..8e51404854 100644 --- a/Mage.Sets/src/mage/cards/h/HinterlandScourge.java +++ b/Mage.Sets/src/mage/cards/h/HinterlandScourge.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -41,7 +41,7 @@ public final class HinterlandScourge extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Hinterland Scourge. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public HinterlandScourge(final HinterlandScourge card) { diff --git a/Mage.Sets/src/mage/cards/h/HiredMuscle.java b/Mage.Sets/src/mage/cards/h/HiredMuscle.java index c8b871f78b..b5eeb8a4ea 100644 --- a/Mage.Sets/src/mage/cards/h/HiredMuscle.java +++ b/Mage.Sets/src/mage/cards/h/HiredMuscle.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FlipSourceEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -25,7 +25,6 @@ import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.events.GameEvent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; /** @@ -48,7 +47,7 @@ public final class HiredMuscle extends CardImpl { this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); // At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new Scarmaker()), true), new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE), "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.")); diff --git a/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java b/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java index bf5678c6bd..887bd3203e 100644 --- a/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java +++ b/Mage.Sets/src/mage/cards/h/HollowbornBarghest.java @@ -9,7 +9,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,7 +43,7 @@ public final class HollowbornBarghest extends CardImpl { // At the beginning of your upkeep, if you have no cards in hand, each opponent loses 2 life. Condition condition = new CardsInHandCondition(ComparisonType.EQUAL_TO, 0); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new HollowbornBarghestEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, rule)); // At the beginning of each opponent's upkeep, if that player has no cards in hand, he or she loses 2 life. this.addAbility(new HollowbornBarghestTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java b/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java index ed249b386f..339ef6426a 100644 --- a/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java +++ b/Mage.Sets/src/mage/cards/h/HollowhengeScavenger.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class HollowhengeScavenger extends CardImpl { // Morbid - When Hollowhenge Scavenger enters the battlefield, if a creature died this turn, you gain 5 life. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(5)); - this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.instance, staticText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MorbidCondition.instance, staticText)); } public HollowhengeScavenger(final HollowhengeScavenger card) { diff --git a/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java b/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java index 702430ee20..7bb5d62343 100644 --- a/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java +++ b/Mage.Sets/src/mage/cards/h/HowlpackAlpha.java @@ -10,6 +10,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; @@ -59,7 +60,7 @@ public final class HowlpackAlpha extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Howlpack Alpha. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public HowlpackAlpha(final HowlpackAlpha card) { diff --git a/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java b/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java index 1573b2b8ab..d5f9f2a1a3 100644 --- a/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java +++ b/Mage.Sets/src/mage/cards/h/HowlpackOfEstwald.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class HowlpackOfEstwald extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Howlpack of Estwald. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public HowlpackOfEstwald(final HowlpackOfEstwald card) { diff --git a/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java b/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java index 879cb39d55..9da3929dfe 100644 --- a/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java +++ b/Mage.Sets/src/mage/cards/h/HuntmasterOfTheFells.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.TransformSourceEffect; @@ -44,7 +44,7 @@ public final class HuntmasterOfTheFells extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Huntmaster of the Fells. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public HuntmasterOfTheFells(final HuntmasterOfTheFells card) { diff --git a/Mage.Sets/src/mage/cards/h/Hypnox.java b/Mage.Sets/src/mage/cards/h/Hypnox.java index 44290f8206..41e0be205e 100644 --- a/Mage.Sets/src/mage/cards/h/Hypnox.java +++ b/Mage.Sets/src/mage/cards/h/Hypnox.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.Card; @@ -43,7 +43,7 @@ public final class Hypnox extends CardImpl { // When Hypnox enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new HypnoxExileEffect()); ability.addTarget(new TargetOpponent()); - this.addAbility(new ConditionalTriggeredAbility(ability, CastFromHandSourceCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand."), new CastFromHandWatcher()); // When Hypnox leaves the battlefield, return the exiled cards to their owner's hand. diff --git a/Mage.Sets/src/mage/cards/i/ImaginaryPet.java b/Mage.Sets/src/mage/cards/i/ImaginaryPet.java index 16c2920e3f..96cf4fa0e1 100644 --- a/Mage.Sets/src/mage/cards/i/ImaginaryPet.java +++ b/Mage.Sets/src/mage/cards/i/ImaginaryPet.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class ImaginaryPet extends CardImpl { // At the beginning of your upkeep, if you have a card in hand, return Imaginary Pet to its owner's hand. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new CardsInHandCondition(ComparisonType.MORE_THAN, 0), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new CardsInHandCondition(ComparisonType.MORE_THAN, 0), "At the beginning of your upkeep, if you have a card in hand, return {this} to its owner's hand.")); } diff --git a/Mage.Sets/src/mage/cards/i/ImpendingDisaster.java b/Mage.Sets/src/mage/cards/i/ImpendingDisaster.java index 2757a7aa3c..ca3610f961 100644 --- a/Mage.Sets/src/mage/cards/i/ImpendingDisaster.java +++ b/Mage.Sets/src/mage/cards/i/ImpendingDisaster.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class ImpendingDisaster extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false); ability.addEffect(new DestroyAllEffect(new FilterLandPermanent())); ImpendingDisasterCondition contition = new ImpendingDisasterCondition(); - this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if there are seven or more lands on the battlefield, sacrifice {this} and destroy all lands")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if there are seven or more lands on the battlefield, sacrifice {this} and destroy all lands")); } diff --git a/Mage.Sets/src/mage/cards/i/ImperialMask.java b/Mage.Sets/src/mage/cards/i/ImperialMask.java index 95f549ebd0..11b2f5b0a1 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialMask.java +++ b/Mage.Sets/src/mage/cards/i/ImperialMask.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; import mage.abilities.keyword.HexproofAbility; @@ -34,7 +34,7 @@ public final class ImperialMask extends CardImpl { // When Imperial Mask enters the battlefield, if it's not a token, each of your teammates puts a token that's a copy of Imperial Mask onto the battlefield. // No implementation of teammates currently, so no effect needed - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new InfoEffect("each of your teammates puts a token that's a copy of {this} onto the battlefield"), false), new SourceMatchesFilterCondition(filter), "When {this} enters the battlefield, if it's not a token, " diff --git a/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java b/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java index ca5aa37e24..418cb142f6 100644 --- a/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java +++ b/Mage.Sets/src/mage/cards/i/InallaArchmageRitualist.java @@ -11,7 +11,7 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil import mage.abilities.condition.common.SourceOnBattlefieldOrCommandZoneCondition; import mage.abilities.costs.common.TapTargetCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ExileTargetEffect; @@ -65,7 +65,7 @@ public final class InallaArchmageRitualist extends CardImpl { this.toughness = new MageInt(5); // Eminence - Whenever another nontoken Wizard enters the battlefield under your control, if Inalla, Archmage Ritualist is in the command zone or on the battlefield, you may pay {1}. If you do, create a token that's a copy of that Wizard. The token gains haste. Exile it at the beginning of the next end step. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldControlledTriggeredAbility(Zone.ALL, new DoIfCostPaid( new InallaArchmageRitualistEffect(), new ManaCostsImpl("{1}"), "Pay {1} to create a token copy?"), filter, false, SetTargetPointer.PERMANENT, ""), diff --git a/Mage.Sets/src/mage/cards/i/InameAsOne.java b/Mage.Sets/src/mage/cards/i/InameAsOne.java index 595ae5bf80..25b0162cc3 100644 --- a/Mage.Sets/src/mage/cards/i/InameAsOne.java +++ b/Mage.Sets/src/mage/cards/i/InameAsOne.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSourceEffect; @@ -50,7 +50,7 @@ public final class InameAsOne extends CardImpl { this.toughness = new MageInt(8); // When Iname as One enters the battlefield, if you cast it from your hand, you may search your library for a Spirit permanent card, put it onto the battlefield, then shuffle your library. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, filter)), true), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, you may search your library for a Spirit permanent card, put it onto the battlefield, then shuffle your library."), diff --git a/Mage.Sets/src/mage/cards/i/IncreasingAmbition.java b/Mage.Sets/src/mage/cards/i/IncreasingAmbition.java index 39dacafdb6..fc62cc74c3 100644 --- a/Mage.Sets/src/mage/cards/i/IncreasingAmbition.java +++ b/Mage.Sets/src/mage/cards/i/IncreasingAmbition.java @@ -30,7 +30,7 @@ public final class IncreasingAmbition extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); - // Search your library for a card and put that card into your hand. If Increasing Ambition was cast from a graveyard, instead search your library for two cards and put those cards into your hand. Then shuffle your library. + // Search your library for a card and put that card into your hand. If this spell was cast from a graveyard, instead search your library for two cards and put those cards into your hand. Then shuffle your library. this.getSpellAbility().addEffect(new IncreasingAmbitionEffect()); // Flashback {7}{B} @@ -51,7 +51,7 @@ class IncreasingAmbitionEffect extends SearchEffect { public IncreasingAmbitionEffect() { super(new TargetCardInLibrary(), Outcome.DrawCard); - staticText = "Search your library for a card and put that card into your hand. If {this} was cast from a graveyard, instead search your library for two cards and put those cards into your hand. Then shuffle your library"; + staticText = "Search your library for a card and put that card into your hand. If this spell was cast from a graveyard, instead search your library for two cards and put those cards into your hand. Then shuffle your library"; } public IncreasingAmbitionEffect(final IncreasingAmbitionEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IncreasingConfusion.java b/Mage.Sets/src/mage/cards/i/IncreasingConfusion.java index d3016def50..909f4ec7c0 100644 --- a/Mage.Sets/src/mage/cards/i/IncreasingConfusion.java +++ b/Mage.Sets/src/mage/cards/i/IncreasingConfusion.java @@ -24,7 +24,7 @@ public final class IncreasingConfusion extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{U}"); - // Target player puts the top X cards of their library into their graveyard. If Increasing Confusion was cast from a graveyard, that player puts twice that many cards into their graveyard instead. + // Target player puts the top X cards of their library into their graveyard. If this spell was cast from a graveyard, that player puts twice that many cards into their graveyard instead. this.getSpellAbility().addEffect(new IncreasingConfusionEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); @@ -46,7 +46,7 @@ class IncreasingConfusionEffect extends OneShotEffect { public IncreasingConfusionEffect() { super(Outcome.Detriment); - staticText = "Target player puts the top X cards of their library into their graveyard. If {this} was cast from a graveyard, that player puts twice that many cards into their graveyard instead"; + staticText = "Target player puts the top X cards of their library into their graveyard. If this spell was cast from a graveyard, that player puts twice that many cards into their graveyard instead"; } public IncreasingConfusionEffect(final IncreasingConfusionEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IncreasingDevotion.java b/Mage.Sets/src/mage/cards/i/IncreasingDevotion.java index 757ab3cbd3..2c21166797 100644 --- a/Mage.Sets/src/mage/cards/i/IncreasingDevotion.java +++ b/Mage.Sets/src/mage/cards/i/IncreasingDevotion.java @@ -25,7 +25,7 @@ public final class IncreasingDevotion extends CardImpl { public IncreasingDevotion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); - // Create five 1/1 white Human creature tokens. If Increasing Devotion was cast from a graveyard, create ten of those tokens instead. + // Create five 1/1 white Human creature tokens. If this spell was cast from a graveyard, create ten of those tokens instead. this.getSpellAbility().addEffect(new IncreasingDevotionEffect()); // Flashback {7}{W}{W} @@ -48,7 +48,7 @@ class IncreasingDevotionEffect extends OneShotEffect { public IncreasingDevotionEffect() { super(Outcome.PutCreatureInPlay); - staticText = "Create five 1/1 white Human creature tokens. If {this} was cast from a graveyard, create ten of those tokens instead"; + staticText = "Create five 1/1 white Human creature tokens. If this spell was cast from a graveyard, create ten of those tokens instead"; } public IncreasingDevotionEffect(final IncreasingDevotionEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IncreasingSavagery.java b/Mage.Sets/src/mage/cards/i/IncreasingSavagery.java index 898083bedc..82cf03b321 100644 --- a/Mage.Sets/src/mage/cards/i/IncreasingSavagery.java +++ b/Mage.Sets/src/mage/cards/i/IncreasingSavagery.java @@ -25,7 +25,7 @@ public final class IncreasingSavagery extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}"); - // Put five +1/+1 counters on target creature. If Increasing Savagery was cast from a graveyard, put ten +1/+1 counters on that creature instead. + // Put five +1/+1 counters on target creature. If this spell was cast from a graveyard, put ten +1/+1 counters on that creature instead. this.getSpellAbility().addEffect(new IncreasingSavageryEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); @@ -47,7 +47,7 @@ class IncreasingSavageryEffect extends OneShotEffect { public IncreasingSavageryEffect() { super(Outcome.BoostCreature); - staticText = "Put five +1/+1 counters on target creature. If Increasing Savagery was cast from a graveyard, put ten +1/+1 counters on that creature instead"; + staticText = "Put five +1/+1 counters on target creature. If this spell was cast from a graveyard, put ten +1/+1 counters on that creature instead"; } public IncreasingSavageryEffect(final IncreasingSavageryEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IncreasingVengeance.java b/Mage.Sets/src/mage/cards/i/IncreasingVengeance.java index 33d22626e0..11e1d70dbb 100644 --- a/Mage.Sets/src/mage/cards/i/IncreasingVengeance.java +++ b/Mage.Sets/src/mage/cards/i/IncreasingVengeance.java @@ -38,7 +38,7 @@ public final class IncreasingVengeance extends CardImpl { public IncreasingVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}"); - // Copy target instant or sorcery spell you control. If Increasing Vengeance was cast from a graveyard, copy that spell twice instead. You may choose new targets for the copies. + // Copy target instant or sorcery spell you control. If this spell was cast from a graveyard, copy that spell twice instead. You may choose new targets for the copies. this.getSpellAbility().addEffect(new IncreasingVengeanceEffect()); Target target = new TargetSpell(filter); this.getSpellAbility().addTarget(target); @@ -61,7 +61,7 @@ class IncreasingVengeanceEffect extends OneShotEffect { public IncreasingVengeanceEffect() { super(Outcome.BoostCreature); - staticText = "Copy target instant or sorcery spell you control. If Increasing Vengeance was cast from a graveyard, copy that spell twice instead. You may choose new targets for the copies"; + staticText = "Copy target instant or sorcery spell you control. If this spell was cast from a graveyard, copy that spell twice instead. You may choose new targets for the copies"; } public IncreasingVengeanceEffect(final IncreasingVengeanceEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/InexorableBlob.java b/Mage.Sets/src/mage/cards/i/InexorableBlob.java index 1eeaa64850..2d2a1d64ef 100644 --- a/Mage.Sets/src/mage/cards/i/InexorableBlob.java +++ b/Mage.Sets/src/mage/cards/i/InexorableBlob.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,9 +25,9 @@ public final class InexorableBlob extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Delirium — Whenever Inexorable Blob attacks and there are at least four card types among cards in your graveyard, - // create a 3/3 green Ooze creature token tapped and attacking. - this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new InexorableBlobOozeToken(), 1, true, true), false), + // Delirium — Whenever Inexorable Blob attacks, if there are four or more card types among cards + // in your graveyard, create a 3/3 green Ooze creature token that’s tapped and attacking. + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new InexorableBlobOozeToken(), 1, true, true), false), DeliriumCondition.instance, "Delirium — Whenever {this} attacks and there are at least four card types among cards in your graveyard, " + "create a 3/3 green Ooze creature token tapped and attacking.")); diff --git a/Mage.Sets/src/mage/cards/i/InfernoHellion.java b/Mage.Sets/src/mage/cards/i/InfernoHellion.java index d253009030..ed2b3254f7 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoHellion.java +++ b/Mage.Sets/src/mage/cards/i/InfernoHellion.java @@ -6,7 +6,7 @@ import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect; import mage.constants.SubType; import mage.abilities.keyword.TrampleAbility; @@ -35,7 +35,7 @@ public final class InfernoHellion extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // At the beginning of each end step, if Inferno Hellion attacked or blocked this turn, its owner shuffles it into their library. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility( new ShuffleIntoLibrarySourceEffect(), TargetController.ANY, false diff --git a/Mage.Sets/src/mage/cards/i/InstigatorGang.java b/Mage.Sets/src/mage/cards/i/InstigatorGang.java index e8ed7864c4..acd165ce41 100644 --- a/Mage.Sets/src/mage/cards/i/InstigatorGang.java +++ b/Mage.Sets/src/mage/cards/i/InstigatorGang.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.keyword.TransformAbility; @@ -44,7 +44,7 @@ public final class InstigatorGang extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Instigator Gang. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public InstigatorGang(final InstigatorGang card) { diff --git a/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java b/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java index 152169b6da..60232b0c50 100644 --- a/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java +++ b/Mage.Sets/src/mage/cards/i/IronFistOfTheEmpire.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class IronFistOfTheEmpire extends CardImpl { // Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 2 life and create a 2/2 red Soldier creature token with first strike name Royal Guard. TriggeredAbility triggeredAbility = new BeginningOfEndStepTriggeredAbility(new GainLifeEffect(2), TargetController.ANY, false); triggeredAbility.addEffect(new CreateTokenEffect(new RoyalGuardToken())); - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( triggeredAbility, HateCondition.instance, "Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 1 life and create a 2/2 red Soldier creature token with first strike named Royal Guard."); diff --git a/Mage.Sets/src/mage/cards/i/Ironfang.java b/Mage.Sets/src/mage/cards/i/Ironfang.java index 1b5bc3b5c3..3f286f4a34 100644 --- a/Mage.Sets/src/mage/cards/i/Ironfang.java +++ b/Mage.Sets/src/mage/cards/i/Ironfang.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TransformAbility; @@ -37,7 +37,7 @@ public final class Ironfang extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ironfang. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public Ironfang(final Ironfang card) { diff --git a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java index 4a9b01705a..c130b759ab 100644 --- a/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java +++ b/Mage.Sets/src/mage/cards/i/IshkanahGrafwidow.java @@ -8,7 +8,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; @@ -48,7 +48,7 @@ public final class IshkanahGrafwidow extends CardImpl { // Delirium &mdash When Ishkanah, Grafwidow enters the battlefield, if there are four or more card types among cards in your graveyard, // create three 1/2 green Spider creature tokens with reach. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SpiderToken(), 3), false), DeliriumCondition.instance, "Delirium — When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/i/IvoryCraneNetsuke.java b/Mage.Sets/src/mage/cards/i/IvoryCraneNetsuke.java index 36b0c37501..aad52a0c1f 100644 --- a/Mage.Sets/src/mage/cards/i/IvoryCraneNetsuke.java +++ b/Mage.Sets/src/mage/cards/i/IvoryCraneNetsuke.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -26,7 +26,7 @@ public final class IvoryCraneNetsuke extends CardImpl { // At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), TargetController.YOU, false); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 6); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have seven or more cards in hand, you gain 4 life.")); } diff --git a/Mage.Sets/src/mage/cards/i/IvoryGargoyle.java b/Mage.Sets/src/mage/cards/i/IvoryGargoyle.java new file mode 100644 index 0000000000..0cd6c5e37d --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IvoryGargoyle.java @@ -0,0 +1,54 @@ +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.common.SkipNextDrawStepControllerEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author noahg + */ +public final class IvoryGargoyle extends CardImpl { + + public IvoryGargoyle(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.GARGOYLE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Ivory Gargoyle dies, return it to the battlefield under its owner's control at the beginning of the next end step and you skip your next draw step. + Ability ability = new DiesTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnSourceFromGraveyardToBattlefieldEffect()))); + ability.addEffect(new SkipNextDrawStepControllerEffect()); + this.addAbility(ability); + + // {4}{W}: Exile Ivory Gargoyle. + this.addAbility(new SimpleActivatedAbility(new ExileSourceEffect(), new ManaCostsImpl("{4}{W}"))); + } + + public IvoryGargoyle(final IvoryGargoyle card) { + super(card); + } + + @Override + public IvoryGargoyle copy() { + return new IvoryGargoyle(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JaggedPoppet.java b/Mage.Sets/src/mage/cards/j/JaggedPoppet.java index 28bc808cdb..00203c6848 100644 --- a/Mage.Sets/src/mage/cards/j/JaggedPoppet.java +++ b/Mage.Sets/src/mage/cards/j/JaggedPoppet.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealtDamageToSourceTriggeredAbility; import mage.abilities.condition.common.HellbentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,7 +37,7 @@ public final class JaggedPoppet extends CardImpl { this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new JaggedPoppetDealtDamageEffect(), false, false, true)); // Hellbent - Whenever Jagged Poppet deals combat damage to a player, if you have no cards in hand, that player discards cards equal to the damage. - Ability hellbentAbility = new ConditionalTriggeredAbility( + Ability hellbentAbility = new ConditionalInterveningIfTriggeredAbility( new DealsCombatDamageToAPlayerTriggeredAbility(new JaggedPoppetDealsDamageEffect(), false, true), HellbentCondition.instance, "Hellbent — Whenever {this} deals combat damage to a player, if you have no cards in hand, that player discards cards equal to the damage."); diff --git a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java index 182b5a8577..d0c8ab237b 100644 --- a/Mage.Sets/src/mage/cards/j/JeeringInstigator.java +++ b/Mage.Sets/src/mage/cards/j/JeeringInstigator.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -46,7 +46,7 @@ public final class JeeringInstigator extends CardImpl { this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{2}{R}"))); // When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap it. That creature gains haste until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new TurnedFaceUpSourceTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn),false, false), MyTurnCondition.instance, "When {this} is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn."); diff --git a/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java b/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java index 4de6ec003a..b9f4e55732 100644 --- a/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java +++ b/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java @@ -4,7 +4,7 @@ package mage.cards.j; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.KickerAbility; import mage.abilities.keyword.MenaceAbility; @@ -35,7 +35,7 @@ public final class JosuVessLichKnight extends CardImpl { //When Josu Vess, Lich Knight enters the battlefield, if it was kicked, create eight 2/2 black Zombie Knight creature tokens with menace. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieKnightToken(), 8)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, create eight 2/2 black Zombie Knight creature tokens with menace.")); } diff --git a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java index e0ecedad84..fcc5372b8c 100644 --- a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java +++ b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.Effect; @@ -56,7 +56,7 @@ public final class KangeeAerieKeeper extends CardImpl { // When Kangee, Aerie Keeper enters the battlefield, if it was kicked, put X feather counters on it. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance(), new KangeeAerieKeeperGetKickerXValue(), true)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, put X feather counters on it.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, put X feather counters on it.")); // Other Bird creatures get +1/+1 for each feather counter on Kangee, Aerie Keeper. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER), new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter, true, "Other Bird creatures get +1/+1 for each feather counter on {this}."))); diff --git a/Mage.Sets/src/mage/cards/k/KarplusanHound.java b/Mage.Sets/src/mage/cards/k/KarplusanHound.java index f7edee0196..3a47691566 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanHound.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanHound.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class KarplusanHound extends CardImpl { FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent("a Chandra planeswalker"); filter.add(new SubtypePredicate(SubType.CHANDRA)); // Whenever Karplusan Hound attacks, if you control a Chandra planeswalker, this creature deals 2 damage to any target. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new DamageTargetEffect(2), false), new PermanentsOnTheBattlefieldCondition(filter), "if you control a Chandra planeswalker, " diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java b/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java index c691e2716a..6ef30fb6b0 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfKeys.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MonarchIsSourceControllerCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.abilities.effects.common.combat.CantBeBlockedAllEffect; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class KeeperOfKeys extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect(), false)); // At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CantBeBlockedAllEffect(new FilterControlledCreaturePermanent("creatures you control"), Duration.EndOfTurn), TargetController.YOU, false), MonarchIsSourceControllerCondition.instance, "At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn.")); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfTheBeasts.java b/Mage.Sets/src/mage/cards/k/KeeperOfTheBeasts.java new file mode 100644 index 0000000000..cc4ccc8fcd --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KeeperOfTheBeasts.java @@ -0,0 +1,111 @@ +package mage.cards.k; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterOpponent; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.token.BeastToken2; +import mage.game.permanent.token.BeastToken4; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetOpponent; + +/** + * + * @author noahg + */ +public final class KeeperOfTheBeasts extends CardImpl { + + public KeeperOfTheBeasts(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {G}, {tap}: Choose target opponent who controlled more creatures than you did as you activated this ability. Put a 2/2 green Beast creature token onto the battlefield. + Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new BeastToken4()).setText("Choose target opponent who controlled more creatures than you did as you activated this ability. Put a 2/2 green Beast creature token onto the battlefield."), + new ManaCostsImpl("{G}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new KeeperOfTheBeastsTarget()); + this.addAbility(ability); + } + + public KeeperOfTheBeasts(final KeeperOfTheBeasts card) { + super(card); + } + + @Override + public KeeperOfTheBeasts copy() { + return new KeeperOfTheBeasts(this); + } +} + +class KeeperOfTheBeastsTarget extends TargetPlayer { + + public KeeperOfTheBeastsTarget() { + super(1, 1, false, new FilterOpponent("opponent that controls more creatures than you")); + } + + public KeeperOfTheBeastsTarget(final KeeperOfTheBeastsTarget target) { + super(target); + } + + @Override + public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + Set availablePossibleTargets = super.possibleTargets(sourceId, sourceControllerId, game); + Set possibleTargets = new HashSet<>(); + int creaturesController = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, sourceControllerId, game); + + for (UUID targetId : availablePossibleTargets) { + if (game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, targetId, game) > creaturesController) { + possibleTargets.add(targetId); + } + } + return possibleTargets; + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + int count = 0; + MageObject targetSource = game.getObject(sourceId); + Player controller = game.getPlayer(sourceControllerId); + if (controller != null) { + for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { + Player player = game.getPlayer(playerId); + if (player != null + && game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, sourceControllerId, game) + < game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game) + && !player.hasLeft() + && filter.match(player, sourceId, sourceControllerId, game) + && player.canBeTargetedBy(targetSource, sourceControllerId, game)) { + count++; + if (count >= this.minNumberOfTargets) { + return true; + } + } + } + } + return false; + } + + @Override + public KeeperOfTheBeastsTarget copy() { + return new KeeperOfTheBeastsTarget(this); + } +} + diff --git a/Mage.Sets/src/mage/cards/k/KeldonBerserker.java b/Mage.Sets/src/mage/cards/k/KeldonBerserker.java index 734dfa41a4..f2cf9c195c 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonBerserker.java +++ b/Mage.Sets/src/mage/cards/k/KeldonBerserker.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -39,7 +39,7 @@ public final class KeldonBerserker extends CardImpl { this.toughness = new MageInt(3); // Whenever Keldon Berserker attacks, if you control no untapped lands, it gets +3/+0 until end of turn. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn), false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "Whenever {this} attacks, if you control no untapped lands, it gets +3/+0 until end of turn." diff --git a/Mage.Sets/src/mage/cards/k/KeldonOverseer.java b/Mage.Sets/src/mage/cards/k/KeldonOverseer.java index 9999e6d4a3..191dcdc371 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonOverseer.java +++ b/Mage.Sets/src/mage/cards/k/KeldonOverseer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -44,7 +44,7 @@ public final class KeldonOverseer extends CardImpl { ability.addEffect(new UntapTargetEffect()); ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.")); } diff --git a/Mage.Sets/src/mage/cards/k/KessigForgemaster.java b/Mage.Sets/src/mage/cards/k/KessigForgemaster.java index 34f60d6ceb..106b0024a5 100644 --- a/Mage.Sets/src/mage/cards/k/KessigForgemaster.java +++ b/Mage.Sets/src/mage/cards/k/KessigForgemaster.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -43,7 +43,7 @@ public final class KessigForgemaster extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Kessig Forgemaster. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/k/Kezzerdrix.java b/Mage.Sets/src/mage/cards/k/Kezzerdrix.java index a933250036..a27b8dd727 100644 --- a/Mage.Sets/src/mage/cards/k/Kezzerdrix.java +++ b/Mage.Sets/src/mage/cards/k/Kezzerdrix.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CreatureCountCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageControllerEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class Kezzerdrix extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // At the beginning of your upkeep, if your opponents control no creatures, Kezzerdrix deals 4 damage to you. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageControllerEffect(4), TargetController.YOU, false), new CreatureCountCondition(0, TargetController.OPPONENT), "At the beginning of your upkeep, if your opponents control no creatures, {this} deals 4 damage to you.")); diff --git a/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java index bc30f9246a..c5b03a0f07 100644 --- a/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java +++ b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java @@ -49,7 +49,7 @@ public final class KikiJikiMirrorBreaker extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - // {tap}: Create a token that's a copy of target nonlegendary creature you control . That token has haste. Sacrifice it at the beginning of the next end step. + // {T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new KikiJikiMirrorBreakerEffect(), new TapSourceCost()); ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false)); this.addAbility(ability); @@ -70,7 +70,7 @@ class KikiJikiMirrorBreakerEffect extends OneShotEffect { public KikiJikiMirrorBreakerEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step"; + this.staticText = "Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step"; } public KikiJikiMirrorBreakerEffect(final KikiJikiMirrorBreakerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KitsuneMystic.java b/Mage.Sets/src/mage/cards/k/KitsuneMystic.java index 04856fb1d7..0685884b6d 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneMystic.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneMystic.java @@ -8,7 +8,7 @@ import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.EnchantedSourceCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.FlipSourceEffect; import mage.cards.CardImpl; @@ -21,7 +21,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -42,7 +41,7 @@ public final class KitsuneMystic extends CardImpl { this.flipCardName = "Autumn-Tail, Kitsune Sage"; // At the beginning of the end step, if Kitsune Mystic is enchanted by two or more Auras, flip it. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new AutumnTailKitsuneSage())), new EnchantedSourceCondition(2), "At the beginning of the end step, if {this} is enchanted by two or more Auras, flip it.")); } diff --git a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java index d778835c8c..f352b99623 100644 --- a/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java +++ b/Mage.Sets/src/mage/cards/k/KiyomaroFirstToStand.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.effects.Effect; @@ -54,7 +54,7 @@ public final class KiyomaroFirstToStand extends CardImpl { this.addAbility(ability); // Whenever Kiyomaro deals damage, if you have seven or more cards in hand, you gain 7 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new KiyomaroFirstToStandDealsDamageTriggeredAbility(), new CardsInHandCondition(ComparisonType.MORE_THAN, 6), "Whenever {this} deals damage, if you have seven or more cards in hand, you gain 7 life" diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java b/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java index 8069a3b5e5..9aaa09e8c4 100644 --- a/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java +++ b/Mage.Sets/src/mage/cards/k/KjeldoranHomeGuard.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; import mage.abilities.condition.common.AttackedOrBlockedThisCombatSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.constants.SubType; @@ -32,7 +32,7 @@ public final class KjeldoranHomeGuard extends CardImpl { this.toughness = new MageInt(6); // At end of combat, if Kjeldoran Home Guard attacked or blocked this combat, put a -0/-1 counter on Kjeldoran Home Guard and put a 0/1 white Deserter creature token onto the battlefield. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EndOfCombatTriggeredAbility(new AddCountersSourceEffect(new BoostCounter(0, -1)), false), AttackedOrBlockedThisCombatSourceCondition.instance, "At end of combat, if {this} attacked or blocked this combat, put a -0/-1 counter on {this} and create a 0/1 white Deserter creature token."); diff --git a/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java b/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java index f2cefef40b..23438bfc9e 100644 --- a/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java +++ b/Mage.Sets/src/mage/cards/k/KnightOfTheWhiteOrchid.java @@ -6,7 +6,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.OpponentControlsMoreCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class KnightOfTheWhiteOrchid extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // When Knight of the White Orchid enters the battlefield, if an opponent controls more lands than you, you may search your library for a Plains card, put it onto the battlefield, then shuffle your library. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, new FilterBySubtypeCard(SubType.PLAINS)), false), true), new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS), "When {this} enters the battlefield, if an opponent controls more lands than you, you may search your library for a Plains card, put it onto the battlefield, then shuffle your library")); diff --git a/Mage.Sets/src/mage/cards/k/Kookus.java b/Mage.Sets/src/mage/cards/k/Kookus.java index 7facaf44c8..dadaa25fd9 100644 --- a/Mage.Sets/src/mage/cards/k/Kookus.java +++ b/Mage.Sets/src/mage/cards/k/Kookus.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageControllerEffect; import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; @@ -50,7 +50,7 @@ public final class Kookus extends CardImpl { // At the beginning of your upkeep, if you don't control a creature named Keeper of Kookus, Kookus deals 3 damage to you and attacks this turn if able. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(3), TargetController.YOU, false); ability.addEffect(new AttacksIfAbleSourceEffect(Duration.EndOfTurn)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your upkeep, " diff --git a/Mage.Sets/src/mage/cards/k/KorAeronaut.java b/Mage.Sets/src/mage/cards/k/KorAeronaut.java index 6eb4d18b61..b104e6d0e4 100644 --- a/Mage.Sets/src/mage/cards/k/KorAeronaut.java +++ b/Mage.Sets/src/mage/cards/k/KorAeronaut.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; @@ -29,15 +29,17 @@ public final class KorAeronaut extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - + + //Kicker {1}{W} (You may pay an additional {1}{W} as you cast this spell.) this.addAbility(new KickerAbility("{1}{W}")); - + //Flying this.addAbility(FlyingAbility.getInstance()); + //When Kor Aeronaut enters the battlefield, if it was kicked, target creature gains flying until end of turn. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), false); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, target creature gains flying until end of turn.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, target creature gains flying until end of turn.")); } public KorAeronaut(final KorAeronaut card) { diff --git a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java index 599ea6fd11..001dfde784 100644 --- a/Mage.Sets/src/mage/cards/k/KorSanctifiers.java +++ b/Mage.Sets/src/mage/cards/k/KorSanctifiers.java @@ -4,7 +4,7 @@ package mage.cards.k; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class KorSanctifiers extends CardImpl { // When Kor Sanctifiers enters the battlefield, if it was kicked, destroy target artifact or enchantment. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact or enchantment.")); } public KorSanctifiers (final KorSanctifiers card) { diff --git a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java index 44795b19bb..693c957fee 100644 --- a/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java +++ b/Mage.Sets/src/mage/cards/k/KozilekTheGreatDistortion.java @@ -10,7 +10,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.CounterTargetEffect; @@ -48,7 +48,7 @@ public final class KozilekTheGreatDistortion extends CardImpl { this.toughness = new MageInt(12); // When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new CastSourceTriggeredAbility(new KozilekDrawEffect(), false), new CardsInHandCondition(ComparisonType.FEWER_THAN, 7), "When you cast {this}, if you have fewer than seven cards in hand, draw cards equal to the difference.")); diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java b/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java index 6164caecd6..9da97bde55 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeHowler.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; import mage.abilities.keyword.TransformAbility; @@ -49,7 +49,7 @@ public final class KrallenhordeHowler extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public KrallenhordeHowler(final KrallenhordeHowler card) { diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java b/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java index ae106b0661..72afe531b1 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeKiller.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class KrallenhordeKiller extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Killer. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public KrallenhordeKiller(final KrallenhordeKiller card) { diff --git a/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java b/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java index b499988e5e..7ba04f05f4 100644 --- a/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java +++ b/Mage.Sets/src/mage/cards/k/KrallenhordeWantons.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class KrallenhordeWantons extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Wantons. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public KrallenhordeWantons(final KrallenhordeWantons card) { diff --git a/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java b/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java index 418e49adf9..562c626400 100644 --- a/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java +++ b/Mage.Sets/src/mage/cards/k/KrondTheDawnClad.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.EnchantedSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; @@ -36,7 +36,7 @@ public final class KrondTheDawnClad extends CardImpl { this.addAbility(VigilanceAbility.getInstance()); // Whenever Krond the Dawn-Clad attacks, if it's enchanted, exile target permanent. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new ExileTargetEffect(), false), new EnchantedSourceCondition(), "Whenever {this} attacks, if it's enchanted, exile target permanent."); diff --git a/Mage.Sets/src/mage/cards/k/KrosanDruid.java b/Mage.Sets/src/mage/cards/k/KrosanDruid.java index 03136866af..13d414e9c5 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanDruid.java +++ b/Mage.Sets/src/mage/cards/k/KrosanDruid.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.KickerAbility; import mage.constants.SubType; @@ -31,7 +31,7 @@ public final class KrosanDruid extends CardImpl { this.addAbility(new KickerAbility("{4}{G}")); // When Krosan Druid enters the battlefield, if it was kicked, you gain 10 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(10)), KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, you gain 10 life" diff --git a/Mage.Sets/src/mage/cards/k/KruinOutlaw.java b/Mage.Sets/src/mage/cards/k/KruinOutlaw.java index 7864aea44f..53b0f8b4b6 100644 --- a/Mage.Sets/src/mage/cards/k/KruinOutlaw.java +++ b/Mage.Sets/src/mage/cards/k/KruinOutlaw.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TransformAbility; @@ -39,7 +39,7 @@ public final class KruinOutlaw extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Kruin Outlaw. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public KruinOutlaw(final KruinOutlaw card) { diff --git a/Mage.Sets/src/mage/cards/k/KyrenLegate.java b/Mage.Sets/src/mage/cards/k/KyrenLegate.java index b77984d161..1c03329a93 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenLegate.java +++ b/Mage.Sets/src/mage/cards/k/KyrenLegate.java @@ -39,7 +39,7 @@ public final class KyrenLegate extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - // If an opponent controls a Plains and you control a Mountain, you may cast Kyren Legate without paying its mana cost. + // If an opponent controls a Plains and you control a Mountain, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Plains and you control a Mountain", new OpponentControlsPermanentCondition(filterPlains), new PermanentsOnTheBattlefieldCondition(filterMountain)); diff --git a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java index 655fa05c44..e08d2bb278 100644 --- a/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java +++ b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java @@ -10,7 +10,7 @@ import mage.abilities.common.EndOfCombatTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.IndestructibleAbility; @@ -47,7 +47,7 @@ public final class KytheonHeroOfAkros extends CardImpl { // At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, // then return him to the battlefield transformed under his owner's control. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility(new EndOfCombatTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.MALE), false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EndOfCombatTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.MALE), false), new KytheonHeroOfAkrosCondition(), "At end of combat, if {this} and at least two other creatures attacked this combat, exile {this}, " + "then return him to the battlefield transformed under his owner's control."), new AttackedOrBlockedThisCombatWatcher()); diff --git a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java index 7a8ba666fd..3176c94b64 100644 --- a/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java +++ b/Mage.Sets/src/mage/cards/l/LagonnaBandElder.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class LagonnaBandElder extends CardImpl { this.toughness = new MageInt(2); // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life"); diff --git a/Mage.Sets/src/mage/cards/l/LambholtButcher.java b/Mage.Sets/src/mage/cards/l/LambholtButcher.java index 663c906d0a..e24de21479 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtButcher.java +++ b/Mage.Sets/src/mage/cards/l/LambholtButcher.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class LambholtButcher extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lambholt Butcher. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public LambholtButcher(final LambholtButcher card) { diff --git a/Mage.Sets/src/mage/cards/l/LambholtElder.java b/Mage.Sets/src/mage/cards/l/LambholtElder.java index 01c6c21ec7..81f15b01a4 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtElder.java +++ b/Mage.Sets/src/mage/cards/l/LambholtElder.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class LambholtElder extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Elder. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public LambholtElder(final LambholtElder card) { diff --git a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java index 31941267ad..b811c781ff 100644 --- a/Mage.Sets/src/mage/cards/l/LambholtPacifist.java +++ b/Mage.Sets/src/mage/cards/l/LambholtPacifist.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -48,7 +48,7 @@ public final class LambholtPacifist extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public LambholtPacifist(final LambholtPacifist card) { diff --git a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java index 49bf924422..20fcc00fcb 100644 --- a/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java +++ b/Mage.Sets/src/mage/cards/l/LamplighterOfSelhoff.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,7 +39,7 @@ public final class LamplighterOfSelhoff extends CardImpl { // When Lamplighter of Selhoff enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1,1,true)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control another Zombie, you may a draw card. If you do, discard a card.")); diff --git a/Mage.Sets/src/mage/cards/l/LandTax.java b/Mage.Sets/src/mage/cards/l/LandTax.java index a193b62dff..d25dd64433 100644 --- a/Mage.Sets/src/mage/cards/l/LandTax.java +++ b/Mage.Sets/src/mage/cards/l/LandTax.java @@ -3,7 +3,7 @@ package mage.cards.l; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.OpponentControlsMoreCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,7 +24,7 @@ public final class LandTax extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); // At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_BASIC_LAND), true), TargetController.YOU, true), new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS), "At the beginning of your upkeep, if an opponent controls more lands than you, you may search your library for up to three basic land cards, reveal them, and put them into your hand. If you do, shuffle your library" diff --git a/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java b/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java index 4c27a104f5..ca664a65f4 100644 --- a/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java +++ b/Mage.Sets/src/mage/cards/l/LatchkeyFaerie.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ProwlCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProwlAbility; @@ -36,7 +36,7 @@ public final class LatchkeyFaerie extends CardImpl { // When Latchkey Faerie enters the battlefield, if its prowl cost was paid, draw a card. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false); - this.addAbility(new ConditionalTriggeredAbility(ability, ProwlCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, ProwlCondition.instance, "When {this} enters the battlefield, if its prowl cost was paid, draw a card.")); } diff --git a/Mage.Sets/src/mage/cards/l/LavabornMuse.java b/Mage.Sets/src/mage/cards/l/LavabornMuse.java index 72dd1f4747..79d6e154bd 100644 --- a/Mage.Sets/src/mage/cards/l/LavabornMuse.java +++ b/Mage.Sets/src/mage/cards/l/LavabornMuse.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class LavabornMuse extends CardImpl { this.toughness = new MageInt(3); // At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, Lavaborn Muse deals 3 damage to him or her. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.OPPONENT, false, true), new CardsInActivePlayersHandCondition(), "At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, {this} deals 3 damage to him or her.")); diff --git a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java index 4e4abf2611..fcb2eca5f2 100644 --- a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java +++ b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java @@ -38,7 +38,7 @@ public final class LazavDimirMastermind extends CardImpl { // Hexproof this.addAbility(HexproofAbility.getInstance()); - // Whenever a creature card is put into an opponent's graveyard from anywhere, you may have Lazav, Dimir Mastermind become a copy of that card except its name is still Lazav, Dimir Mastermind, it's legendary in addition to its other types, and it gains hexproof and this ability. + // Whenever a creature card is put into an opponent's graveyard from anywhere, you may have Lazav, Dimir Mastermind become a copy of that card except its name is Lazav, Dimir Mastermind, it's legendary in addition to its other types, and it has hexproof and this ability. this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility( new LazavDimirMastermindEffect(), true, new FilterCreatureCard("a creature card"), @@ -59,7 +59,7 @@ class LazavDimirMastermindEffect extends OneShotEffect { LazavDimirMastermindEffect() { super(Outcome.Copy); - staticText = "you may have {this} become a copy of that card except its name is still {this}, it's legendary in addition to its other types, and it gains hexproof and this ability"; + staticText = "you may have {this} become a copy of that card except its name is Lazav, Dimir Mastermind, it's legendary in addition to its other types, and it has hexproof and this ability"; } LazavDimirMastermindEffect(final LazavDimirMastermindEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LeoninVanguard.java b/Mage.Sets/src/mage/cards/l/LeoninVanguard.java index 3d465d6ef1..fe1bd4452b 100644 --- a/Mage.Sets/src/mage/cards/l/LeoninVanguard.java +++ b/Mage.Sets/src/mage/cards/l/LeoninVanguard.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.constants.SubType; @@ -32,7 +32,7 @@ public final class LeoninVanguard extends CardImpl { this.toughness = new MageInt(1); // At the beginning of combat on your turn, if you control three or more creatures, Leonin Vanguard gets +1/+1 until end of turn and you gain 1 life. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility( new BoostSourceEffect(1, 1, Duration.EndOfTurn), TargetController.YOU, false diff --git a/Mage.Sets/src/mage/cards/l/Leviathan.java b/Mage.Sets/src/mage/cards/l/Leviathan.java index c6bb0adc1f..e963de31dc 100644 --- a/Mage.Sets/src/mage/cards/l/Leviathan.java +++ b/Mage.Sets/src/mage/cards/l/Leviathan.java @@ -29,7 +29,7 @@ import mage.game.events.GameEvent; import mage.target.common.TargetControlledPermanent; -//import mage.abilities.decorator.ConditionalTriggeredAbility; +//import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; /** * diff --git a/Mage.Sets/src/mage/cards/l/Lifeline.java b/Mage.Sets/src/mage/cards/l/Lifeline.java index 4f3d1a1747..e78a26f708 100644 --- a/Mage.Sets/src/mage/cards/l/Lifeline.java +++ b/Mage.Sets/src/mage/cards/l/Lifeline.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; @@ -30,7 +30,7 @@ public final class Lifeline extends CardImpl { // Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new DiesCreatureTriggeredAbility( Zone.BATTLEFIELD, new LifelineEffect(), false, StaticFilters.FILTER_PERMANENT_CREATURE, true), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_PERMANENT_CREATURE, ComparisonType.MORE_THAN, 0, false), "Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step."); diff --git a/Mage.Sets/src/mage/cards/l/LilianasContract.java b/Mage.Sets/src/mage/cards/l/LilianasContract.java index a568b0a855..68ca809240 100644 --- a/Mage.Sets/src/mage/cards/l/LilianasContract.java +++ b/Mage.Sets/src/mage/cards/l/LilianasContract.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.WinGameSourceControllerEffect; @@ -40,7 +40,7 @@ public final class LilianasContract extends CardImpl { this.addAbility(ability); // At the beginning of your upkeep, if you control four or more Demons with different names, you win the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( new WinGameSourceControllerEffect(), TargetController.YOU, false diff --git a/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java b/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java index c28203c2c1..2079804bdc 100644 --- a/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java +++ b/Mage.Sets/src/mage/cards/l/LinvalaThePreserver.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.OpponentControlsMoreCondition; import mage.abilities.condition.common.OpponentHasMoreLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.FlyingAbility; @@ -35,12 +35,12 @@ public final class LinvalaThePreserver extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Linvala, the Preserver enters the battlefield, if an opponent has more life than you, you gain 5 life. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(5), false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(5), false), OpponentHasMoreLifeCondition.instance, "When {this} enters the battlefield, if an opponent has more life than you, you gain 5 life.")); // When Linvala enters the battlefield, if an opponent controls more creatures than you, create a 3/3 white Angel creature token with flying. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new LinvalaAngelToken()), false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new LinvalaAngelToken()), false), new OpponentControlsMoreCondition(new FilterCreaturePermanent()), "When {this} enters the battlefield, if an opponent controls more creatures than you, create a 3/3 white Angel creature token with flying.")); } diff --git a/Mage.Sets/src/mage/cards/l/LivingArtifact.java b/Mage.Sets/src/mage/cards/l/LivingArtifact.java index 9dda0d19d6..df0a4ce70a 100644 --- a/Mage.Sets/src/mage/cards/l/LivingArtifact.java +++ b/Mage.Sets/src/mage/cards/l/LivingArtifact.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DoIfCostPaid; @@ -47,7 +47,8 @@ public final class LivingArtifact extends CardImpl { // Whenever you're dealt damage, put that many vitality counters on Living Artifact. this.addAbility(new LivingArtifactTriggeredAbility()); // At the beginning of your upkeep, you may remove a vitality counter from Living Artifact. If you do, you gain 1 life. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DoIfCostPaid(new GainLifeEffect(1), + //TODO make this a custom ability- it's really not intervening if because you should be able to add counters in response to this trigger + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DoIfCostPaid(new GainLifeEffect(1), new RemoveCountersSourceCost(CounterType.VITALITY.createInstance(1))), TargetController.YOU, false), new SourceHasCounterCondition(CounterType.VITALITY, 1), "At the beginning of your upkeep, you may remove a vitality counter from {this}. If you do, you gain 1 life")); } diff --git a/Mage.Sets/src/mage/cards/l/LoneRider.java b/Mage.Sets/src/mage/cards/l/LoneRider.java index be4b2ad674..dd364058d1 100644 --- a/Mage.Sets/src/mage/cards/l/LoneRider.java +++ b/Mage.Sets/src/mage/cards/l/LoneRider.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.YouGainedLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.LifelinkAbility; @@ -47,7 +47,7 @@ public final class LoneRider extends CardImpl { // At the beginning of the end step, if you gained 3 or more life this turn, transform Lone Rider. this.addAbility(new TransformAbility()); TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new TransformSourceEffect(true)); - this.addAbility(new ConditionalTriggeredAbility(triggered, new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2), ruleText), new PlayerGainedLifeWatcher()); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2), ruleText), new PlayerGainedLifeWatcher()); } public LoneRider(final LoneRider card) { diff --git a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java index 8832be2b6a..53b08ece1d 100644 --- a/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java +++ b/Mage.Sets/src/mage/cards/l/LoneWolfOfTheNatterknolls.java @@ -8,6 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; @@ -39,12 +40,12 @@ public final class LoneWolfOfTheNatterknolls extends CardImpl { this.addAbility(new ConditionalTriggeredAbility( new SpellCastOpponentTriggeredAbility(new DrawCardSourceControllerEffect(2), new FilterSpell("a spell"), true), MyTurnCondition.instance, - "Whenever an opponent casts a spell during your turn, draw two card." + "Whenever an opponent casts a spell during your turn, draw two cards." )); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public LoneWolfOfTheNatterknolls(final LoneWolfOfTheNatterknolls card) { diff --git a/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java b/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java index 1dcfaf01d6..d6884df7a7 100644 --- a/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java +++ b/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java @@ -29,7 +29,7 @@ public final class LudevicsTestSubject extends CardImpl { public LudevicsTestSubject(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); - this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.LIZARD, SubType.EGG); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/l/LumengridDrake.java b/Mage.Sets/src/mage/cards/l/LumengridDrake.java index 6b32df10c5..6cf66783fb 100644 --- a/Mage.Sets/src/mage/cards/l/LumengridDrake.java +++ b/Mage.Sets/src/mage/cards/l/LumengridDrake.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MetalcraftCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class LumengridDrake extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Metalcraft — When Lumengrid Drake enters the battlefield, if you control three or more artifacts, return target creature to its owner's hand. - TriggeredAbility conditional = new ConditionalTriggeredAbility( + TriggeredAbility conditional = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), MetalcraftCondition.instance, ruleText); conditional.addTarget(new TargetCreaturePermanent()); this.addAbility(conditional); diff --git a/Mage.Sets/src/mage/cards/l/LuminarchAscension.java b/Mage.Sets/src/mage/cards/l/LuminarchAscension.java index ebc9d328da..b2710993d1 100644 --- a/Mage.Sets/src/mage/cards/l/LuminarchAscension.java +++ b/Mage.Sets/src/mage/cards/l/LuminarchAscension.java @@ -9,7 +9,7 @@ import mage.abilities.condition.Condition; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class LuminarchAscension extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); // At the beginning of each opponent's end step, if you didn't lose life this turn, you may put a quest counter on Luminarch Ascension. - this.addAbility(new ConditionalTriggeredAbility(new LuminarchAscensionTriggeredAbility(), YouLostNoLifeThisTurnCondition.instance, rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new LuminarchAscensionTriggeredAbility(), YouLostNoLifeThisTurnCondition.instance, rule)); // {1}{W}: Create a 4/4 white Angel creature token with flying. Activate this ability only if Luminarch Ascension has four or more quest counters on it. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), new ManaCostsImpl("{1}{W}")); diff --git a/Mage.Sets/src/mage/cards/m/MadDog.java b/Mage.Sets/src/mage/cards/m/MadDog.java index 7b1a3c5769..f9206d7ec0 100644 --- a/Mage.Sets/src/mage/cards/m/MadDog.java +++ b/Mage.Sets/src/mage/cards/m/MadDog.java @@ -9,7 +9,7 @@ import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class MadDog extends CardImpl { this.toughness = new MageInt(2); // At the beginning of your end step, if Mad Dog didn't attack or come under your control this turn, sacrifice it. - Ability ability = new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false), MadDogCondition.instance, "At the beginning of your end step, if {this} didn't attack or come under your control this turn, sacrifice it"); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false), MadDogCondition.instance, "At the beginning of your end step, if {this} didn't attack or come under your control this turn, sacrifice it"); ability.addWatcher(new AttackedThisTurnWatcher()); ability.addWatcher(new PermanentsEnteredBattlefieldWatcher()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/MaliciousAffliction.java b/Mage.Sets/src/mage/cards/m/MaliciousAffliction.java index 67c5e5e20c..7df96dfdce 100644 --- a/Mage.Sets/src/mage/cards/m/MaliciousAffliction.java +++ b/Mage.Sets/src/mage/cards/m/MaliciousAffliction.java @@ -6,7 +6,7 @@ import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.condition.LockedInCondition; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; @@ -39,7 +39,7 @@ public final class MaliciousAffliction extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{B}"); // Morbid - When you cast Malicious Affliction, if a creature died this turn, you may copy Malicious Affliction and may choose a new target for the copy. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new CastSourceTriggeredAbility(new CopySourceSpellEffect(), true), new LockedInCondition(MorbidCondition.instance), "Morbid — When you cast {this}, if a creature died this turn, you may copy {this} and may choose a new target for the copy"); diff --git a/Mage.Sets/src/mage/cards/m/ManaBloom.java b/Mage.Sets/src/mage/cards/m/ManaBloom.java index 01c53a06ae..fcc059f515 100644 --- a/Mage.Sets/src/mage/cards/m/ManaBloom.java +++ b/Mage.Sets/src/mage/cards/m/ManaBloom.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.mana.AddManaOfAnyColorEffect; import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.ReturnToHandSourceEffect; @@ -40,7 +40,7 @@ public final class ManaBloom extends CardImpl { // At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0, 0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new SourceHasCounterCondition(CounterType.CHARGE, 0, 0), "At the beginning of your upkeep, if Mana Bloom has no charge counters on it, return it to its owner's hand.")); } diff --git a/Mage.Sets/src/mage/cards/m/ManaVault.java b/Mage.Sets/src/mage/cards/m/ManaVault.java index efaab07fd1..334841b2b5 100644 --- a/Mage.Sets/src/mage/cards/m/ManaVault.java +++ b/Mage.Sets/src/mage/cards/m/ManaVault.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceTappedCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageControllerEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; @@ -39,7 +39,7 @@ public final class ManaVault extends CardImpl { TargetController.YOU, false)); // At the beginning of your draw step, if Mana Vault is tapped, it deals 1 damage to you. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfDrawTriggeredAbility(Zone.BATTLEFIELD, new DamageControllerEffect(1), TargetController.YOU, false), SourceTappedCondition.instance, "At the beginning of your draw step, if {this} is tapped, it deals 1 damage to you.")); diff --git a/Mage.Sets/src/mage/cards/m/ManicScribe.java b/Mage.Sets/src/mage/cards/m/ManicScribe.java index ce55d1822d..d97181341d 100644 --- a/Mage.Sets/src/mage/cards/m/ManicScribe.java +++ b/Mage.Sets/src/mage/cards/m/ManicScribe.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveEachPlayerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class ManicScribe extends CardImpl { // Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // that player puts the top three cards of their library into their graveyard. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new PutTopCardOfLibraryIntoGraveTargetEffect(3), TargetController.OPPONENT, false, true), DeliriumCondition.instance, "Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java index 4daa43e29d..97f12cf25a 100644 --- a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java +++ b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class MaraudingLooter extends CardImpl { this.toughness = new MageInt(3); // Raid - At the beginning of your end step, if you attacked with a creature this turn, you may draw a card. If you do, discard a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true), TargetController.YOU, false), RaidCondition.instance, "Raid — At the beginning of your end step, " diff --git a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java index 72b98260c1..2be60fad5a 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java +++ b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class MarduHeartPiercer extends CardImpl { this.toughness = new MageInt(3); // Raid - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to any target. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to any target."); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/m/MarduHordechief.java b/Mage.Sets/src/mage/cards/m/MarduHordechief.java index 50c79dbdb9..7c01254d9f 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHordechief.java +++ b/Mage.Sets/src/mage/cards/m/MarduHordechief.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class MarduHordechief extends CardImpl { this.toughness = new MageInt(3); // Raid — When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, create a 1/1 white Warrior creature token - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorToken())), RaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorToken())), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, create a 1/1 white Warrior creature token."), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java b/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java index 395a90175e..bfbafab314 100644 --- a/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java +++ b/Mage.Sets/src/mage/cards/m/MarduSkullhunter.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -34,7 +34,7 @@ public final class MarduSkullhunter extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // Raid - When Mardu Skullhunter enters the battlefield, if you attacked with a creature this turn, target opponent discards a card. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, target opponent discards a card."); ability.addTarget(new TargetOpponent()); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java b/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java index d654cea80f..c573048114 100644 --- a/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java +++ b/Mage.Sets/src/mage/cards/m/MarduWarshrieker.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.Mana; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.mana.AddManaToManaPoolSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class MarduWarshrieker extends CardImpl { this.toughness = new MageInt(3); // Raid - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B}. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 1, 1, 0, 0, 0))), RaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(new Mana(1, 0, 0, 1, 1, 0, 0, 0))), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B}."), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java b/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java index ac98efd9fb..39c3a3503d 100644 --- a/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java +++ b/Mage.Sets/src/mage/cards/m/MarshalsAnthem.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.abilities.effects.common.continuous.BoostAllEffect; @@ -51,7 +51,8 @@ public final class MarshalsAnthem extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); // When Marshal's Anthem enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times Marshal's Anthem was kicked. - Ability ability = new ConditionalTriggeredAbility( + //TODO this should always trigger, even if it wasn't kicked + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), false), KickedCondition.instance, "When {this} enters the battlefield, return up to X target creature cards from your graveyard to the battlefield, where X is the number of times {this} was kicked."); diff --git a/Mage.Sets/src/mage/cards/m/MaskOfIntolerance.java b/Mage.Sets/src/mage/cards/m/MaskOfIntolerance.java index 47baa6141a..beeb2fc783 100644 --- a/Mage.Sets/src/mage/cards/m/MaskOfIntolerance.java +++ b/Mage.Sets/src/mage/cards/m/MaskOfIntolerance.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.IntCompareCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class MaskOfIntolerance extends CardImpl { // At the beginning of each player's upkeep, if there are four or more basic land types among lands that player controls, Mask of Intolerance deals 3 damage to him or her. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new MaskOfIntoleranceCondition(), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new MaskOfIntoleranceCondition(), "At the beginning of each player's upkeep, if there are four or more basic land types among lands that player controls, {this} deals 3 damage to him or her.")); } diff --git a/Mage.Sets/src/mage/cards/m/Massacre.java b/Mage.Sets/src/mage/cards/m/Massacre.java index 4d67f3550b..24af1a59d3 100644 --- a/Mage.Sets/src/mage/cards/m/Massacre.java +++ b/Mage.Sets/src/mage/cards/m/Massacre.java @@ -34,7 +34,7 @@ public final class Massacre extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); - // If an opponent controls a Plains and you control a Swamp, you may cast Massacre without paying its mana cost. + // If an opponent controls a Plains and you control a Swamp, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Plains and you control a Swamp", new OpponentControlsPermanentCondition(filterPlains), new PermanentsOnTheBattlefieldCondition(filterSwamp)); diff --git a/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java index 54ddce301a..45ab9cb632 100644 --- a/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java +++ b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.condition.common.CitysBlessingCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.FlyingAbility; @@ -46,7 +46,7 @@ public final class MausoleumHarpy extends CardImpl { this.addAbility(new AscendAbility()); // Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on Mausoleum Harpy. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, filter), CitysBlessingCondition.instance, "Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on {this}. ")); diff --git a/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java b/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java index 53b6eb0de2..4800d7c291 100644 --- a/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java +++ b/Mage.Sets/src/mage/cards/m/MayorOfAvabruck.java @@ -10,7 +10,7 @@ import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -55,7 +55,7 @@ public final class MayorOfAvabruck extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Mayor of Avabruck. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public MayorOfAvabruck(final MayorOfAvabruck card) { diff --git a/Mage.Sets/src/mage/cards/m/MercilessPredator.java b/Mage.Sets/src/mage/cards/m/MercilessPredator.java index 718162e0cf..e1a5597fe2 100644 --- a/Mage.Sets/src/mage/cards/m/MercilessPredator.java +++ b/Mage.Sets/src/mage/cards/m/MercilessPredator.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class MercilessPredator extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Merciless Predator. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public MercilessPredator(final MercilessPredator card) { diff --git a/Mage.Sets/src/mage/cards/m/MercurialPretender.java b/Mage.Sets/src/mage/cards/m/MercurialPretender.java index 12650ac73f..250feb98cb 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialPretender.java +++ b/Mage.Sets/src/mage/cards/m/MercurialPretender.java @@ -23,7 +23,7 @@ import mage.util.functions.AbilityApplier; */ public final class MercurialPretender extends CardImpl { - private static final String effectText = "as a copy of any creature you control except it gains \"{2}{U}{U}: Return this creature to its owner's hand.\""; + private static final String effectText = "as a copy of any creature you control, except it has \"{2}{U}{U}: Return this creature to its owner's hand.\""; public MercurialPretender(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); @@ -33,8 +33,8 @@ public final class MercurialPretender extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // You may have Mercurial Pretender enter the battlefield as a copy of any creature you control - // except it gains "{2}{U}{U}: Return this creature to its owner's hand." + // You may have Mercurial Pretender enter the battlefield as a copy of any creature you control, + // except it has "{2}{U}{U}: Return this creature to its owner's hand." Effect effect = new CopyPermanentEffect(new FilterControlledCreaturePermanent(), new AbilityApplier(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), new ManaCostsImpl("{2}{U}{U}")))); effect.setText(effectText); diff --git a/Mage.Sets/src/mage/cards/m/MightMakesRight.java b/Mage.Sets/src/mage/cards/m/MightMakesRight.java index 9b293c50e4..3054b42de9 100644 --- a/Mage.Sets/src/mage/cards/m/MightMakesRight.java +++ b/Mage.Sets/src/mage/cards/m/MightMakesRight.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -47,7 +47,7 @@ public final class MightMakesRight extends CardImpl { gainControlAbility.addEffect(new UntapTargetEffect()); gainControlAbility.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); gainControlAbility.addTarget(new TargetCreaturePermanent(filter)); - Ability conditionalAbility = new ConditionalTriggeredAbility(gainControlAbility, ControlsEachCreatureWithGreatestPowerCondition.instance, ruleText); + Ability conditionalAbility = new ConditionalInterveningIfTriggeredAbility(gainControlAbility, ControlsEachCreatureWithGreatestPowerCondition.instance, ruleText); this.addAbility(conditionalAbility); } diff --git a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java index d5816fef2a..1bcd1ff238 100644 --- a/Mage.Sets/src/mage/cards/m/MindwrackDemon.java +++ b/Mage.Sets/src/mage/cards/m/MindwrackDemon.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveControllerEffect; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +41,7 @@ public final class MindwrackDemon extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(4))); // At the beginning of your upkeep, if you don't have 4 or more card types in your graveyard, you lose 4 life. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false), new InvertCondition(DeliriumCondition.instance), "Delirium — At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard."); diff --git a/Mage.Sets/src/mage/cards/m/MinionReflector.java b/Mage.Sets/src/mage/cards/m/MinionReflector.java index e792a5f431..a422664308 100644 --- a/Mage.Sets/src/mage/cards/m/MinionReflector.java +++ b/Mage.Sets/src/mage/cards/m/MinionReflector.java @@ -48,8 +48,8 @@ public final class MinionReflector extends CardImpl { "entered the battlefield?"), filter, false, SetTargetPointer.PERMANENT, "Whenever a nontoken creature enters the battlefield under your control, " + - "you may pay 2. If you do, create a token that's a copy of that creature. " + - "That token has haste and \"At the beginning of the end step, sacrifice this " + + "you may pay 2. If you do, create a token that's a copy of that creature, " + + "except it has haste and \"At the beginning of the end step, sacrifice this " + "permanent.\""); this.addAbility(ability); } @@ -69,7 +69,7 @@ class MinionReflectorEffect extends OneShotEffect { public MinionReflectorEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "create a token that's a copy of that creature. That token has haste and \"At the beginning of the end step, sacrifice this permanent."; + this.staticText = "create a token that's a copy of that creature, except it has haste and \"At the beginning of the end step, sacrifice this permanent."; } public MinionReflectorEffect(final MinionReflectorEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java b/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java index bfa62f4de3..f2a91224b4 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java +++ b/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.keyword.TrampleAbility; @@ -49,7 +49,7 @@ public final class MirrorSigilSergeant extends CardImpl { Effect effect = new CreateTokenCopySourceEffect(); effect.setText("you may create a token that's a copy of {this}"); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); } diff --git a/Mage.Sets/src/mage/cards/m/MizziumTransreliquat.java b/Mage.Sets/src/mage/cards/m/MizziumTransreliquat.java index 149bef4fc2..298c2f4d8d 100644 --- a/Mage.Sets/src/mage/cards/m/MizziumTransreliquat.java +++ b/Mage.Sets/src/mage/cards/m/MizziumTransreliquat.java @@ -31,7 +31,7 @@ public final class MizziumTransreliquat extends CardImpl { ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability); - // {1}{U}{R}: Mizzium Transreliquat becomes a copy of target artifact and gains this ability. + // {1}{U}{R}: Mizzium Transreliquat becomes a copy of target artifact, except it has this ability. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MizziumTransreliquatCopyAndGainAbilityEffect(), new ManaCostsImpl("{1}{U}{R}")); ability.addTarget(new TargetArtifactPermanent()); this.addAbility(ability); @@ -79,7 +79,7 @@ class MizziumTransreliquatCopyAndGainAbilityEffect extends OneShotEffect { public MizziumTransreliquatCopyAndGainAbilityEffect() { super(Outcome.Benefit); - this.staticText = "{this} becomes a copy of target artifact and gains this ability"; + this.staticText = "{this} becomes a copy of target artifact, except it has this ability"; } public MizziumTransreliquatCopyAndGainAbilityEffect(final MizziumTransreliquatCopyAndGainAbilityEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MoggSalvage.java b/Mage.Sets/src/mage/cards/m/MoggSalvage.java index fed1f36fef..d45d5d2af7 100644 --- a/Mage.Sets/src/mage/cards/m/MoggSalvage.java +++ b/Mage.Sets/src/mage/cards/m/MoggSalvage.java @@ -33,7 +33,7 @@ public final class MoggSalvage extends CardImpl { public MoggSalvage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // If an opponent controls an Island and you control a Mountain, you may cast Mogg Salvage without paying its mana cost. + // If an opponent controls an Island and you control a Mountain, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls an Island and you control a Mountain", new OpponentControlsPermanentCondition(filterIsland), new PermanentsOnTheBattlefieldCondition(filterMountain)); diff --git a/Mage.Sets/src/mage/cards/m/MoldShambler.java b/Mage.Sets/src/mage/cards/m/MoldShambler.java index 10ff836932..5c8bd2a2b0 100644 --- a/Mage.Sets/src/mage/cards/m/MoldShambler.java +++ b/Mage.Sets/src/mage/cards/m/MoldShambler.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -45,7 +45,7 @@ public final class MoldShambler extends CardImpl { EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); Target target = new TargetPermanent(filter); ability.addTarget(target); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target noncreature permanent.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target noncreature permanent.")); } public MoldShambler(final MoldShambler card) { diff --git a/Mage.Sets/src/mage/cards/m/MoltenFirebird.java b/Mage.Sets/src/mage/cards/m/MoltenFirebird.java new file mode 100644 index 0000000000..81001ce6ab --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MoltenFirebird.java @@ -0,0 +1,52 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.*; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author noahg + */ +public final class MoltenFirebird extends CardImpl { + + public MoltenFirebird(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.PHOENIX); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Molten Firebird dies, return it to the battlefield under its owner’s control at the beginning of the next end step and you skip your next draw step. + Ability ability = new DiesTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnSourceFromGraveyardToBattlefieldEffect()))); + ability.addEffect(new SkipNextDrawStepControllerEffect()); + this.addAbility(ability); + + // {4}{R}: Exile Molten Firebird. + this.addAbility(new SimpleActivatedAbility(new ExileSourceEffect(), new ManaCostsImpl("{4}{R}"))); + } + + public MoltenFirebird(final MoltenFirebird card) { + super(card); + } + + @Override + public MoltenFirebird copy() { + return new MoltenFirebird(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MonasterySiege.java b/Mage.Sets/src/mage/cards/m/MonasterySiege.java index c2257a5c9d..162abdd40c 100644 --- a/Mage.Sets/src/mage/cards/m/MonasterySiege.java +++ b/Mage.Sets/src/mage/cards/m/MonasterySiege.java @@ -1,7 +1,6 @@ package mage.cards.m; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.SpellAbility; @@ -15,17 +14,14 @@ import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; import mage.util.CardUtil; +import java.util.UUID; + /** * * @author emerald000 diff --git a/Mage.Sets/src/mage/cards/m/MondronenShaman.java b/Mage.Sets/src/mage/cards/m/MondronenShaman.java index 1af6653b46..aadaae2d69 100644 --- a/Mage.Sets/src/mage/cards/m/MondronenShaman.java +++ b/Mage.Sets/src/mage/cards/m/MondronenShaman.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class MondronenShaman extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Mondronen Shaman. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java index 3d35815cff..8ec19df139 100644 --- a/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java +++ b/Mage.Sets/src/mage/cards/m/MoonriseIntruder.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class MoonriseIntruder extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Moonrise Intruder. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public MoonriseIntruder(final MoonriseIntruder card) { diff --git a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java index 442c6432aa..e2cf355533 100644 --- a/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java +++ b/Mage.Sets/src/mage/cards/m/MoonscarredWerewolf.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.VigilanceAbility; @@ -43,7 +43,7 @@ public final class MoonscarredWerewolf extends CardImpl { this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost())); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Moonscarred Werewolf. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java b/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java index d78243f0f1..fba035c3c1 100644 --- a/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java +++ b/Mage.Sets/src/mage/cards/m/MorkrutBanshee.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -32,7 +32,7 @@ public final class MorkrutBanshee extends CardImpl { // Morbid - When Morkut Banshee enters the battlefield, if a creature died this turn, target creature gets -4/-4 until end of turn. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-4, -4, Duration.EndOfTurn)); - TriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, MorbidCondition.instance, staticText); + TriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, MorbidCondition.instance, staticText); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MortalCombat.java b/Mage.Sets/src/mage/cards/m/MortalCombat.java index d055dffa60..4869fd235d 100644 --- a/Mage.Sets/src/mage/cards/m/MortalCombat.java +++ b/Mage.Sets/src/mage/cards/m/MortalCombat.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class MortalCombat extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); // At the beginning of your upkeep, if twenty or more creature cards are in your graveyard, you win the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), new TwentyGraveyardCreatureCondition(), "At the beginning of your upkeep, if twenty or more creature cards are in your graveyard, you win the game.")); diff --git a/Mage.Sets/src/mage/cards/m/Mournwillow.java b/Mage.Sets/src/mage/cards/m/Mournwillow.java index 0889969a69..5a1fe7ec50 100644 --- a/Mage.Sets/src/mage/cards/m/Mournwillow.java +++ b/Mage.Sets/src/mage/cards/m/Mournwillow.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.RestrictionEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class Mournwillow extends CardImpl { // Delirium — When Mournwillow enters the battlefield, if there are four or more card types among cards in your graveyard, // creatures with power 2 or less can't block this turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new MournwillowEffect(), false), DeliriumCondition.instance, "Delirium — When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/m/MuseVessel.java b/Mage.Sets/src/mage/cards/m/MuseVessel.java new file mode 100644 index 0000000000..8744823ebc --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MuseVessel.java @@ -0,0 +1,185 @@ +package mage.cards.m; + +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInExile; +import mage.target.common.TargetCardInHand; +import mage.util.CardUtil; + +/** + * + * @author noahg + */ +public final class MuseVessel extends CardImpl { + + public MuseVessel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + + // {3}, {tap}: Target player exiles a card from their hand. Activate this ability only any time you could cast a sorcery. + ActivateAsSorceryActivatedAbility tapAbility = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new MuseVesselExileEffect(), new TapSourceCost()); + tapAbility.addCost(new ManaCostsImpl("{3}")); + tapAbility.addTarget(new TargetPlayer()); + this.addAbility(tapAbility); + + // {1}: Choose a card exiled with Muse Vessel. You may play that card this turn. + SimpleActivatedAbility playAbility = new SimpleActivatedAbility(new MuseVesselMayPlayExiledEffect(), new ManaCostsImpl("{1}")); + playAbility.addTarget(new TargetCardInMuseVesselExile()); + this.addAbility(playAbility); + } + + public MuseVessel(final MuseVessel card) { + super(card); + } + + @Override + public MuseVessel copy() { + return new MuseVessel(this); + } +} + +class MuseVesselExileEffect extends OneShotEffect { + + public MuseVesselExileEffect() { + super(Outcome.Exile); + staticText = "target player exiles a card from their hand"; + } + + public MuseVesselExileEffect(final MuseVesselExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = source.getSourceObject(game); + if (sourceObject == null) { + return false; + } + if (player == null) { + return false; + } + TargetCardInHand target = new TargetCardInHand(); + if (target.canChoose(source.getSourceId(), player.getId(), game) + && target.chooseTarget(Outcome.Exile, player.getId(), source, game)) { + UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); + return player.moveCardsToExile(new CardsImpl(target.getTargets()).getCards(game), source, game, true, exileId, sourceObject.getIdName()); + } + return false; + } + + @Override + public MuseVesselExileEffect copy() { + return new MuseVesselExileEffect(this); + } + +} + +class MuseVesselMayPlayExiledEffect extends AsThoughEffectImpl { + + public MuseVesselMayPlayExiledEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); + this.staticText = "Choose a card exiled with {this}. You may play that card this turn"; + } + + public MuseVesselMayPlayExiledEffect(final MuseVesselMayPlayExiledEffect effect) { + super(effect); + } + + @Override + public MuseVesselMayPlayExiledEffect copy() { + return new MuseVesselMayPlayExiledEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return affectedControllerId.equals(source.getControllerId()) + && getTargetPointer().getTargets(game, source).contains(objectId); + } + +} + +class TargetCardInMuseVesselExile extends TargetCardInExile { + + public TargetCardInMuseVesselExile() { + super(1, 1, new FilterCard("card exiled with Muse Vessel"), null); + } + + public TargetCardInMuseVesselExile(final TargetCardInMuseVesselExile target) { + super(target); + } + + @Override + public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + Set possibleTargets = new HashSet<>(); + Card sourceCard = game.getCard(sourceId); + if (sourceCard != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, sourceId); + ExileZone exile = game.getExile().getExileZone(exileId); + if (exile != null && !exile.isEmpty()) { + possibleTargets.addAll(exile); + } + } + return possibleTargets; + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + Card sourceCard = game.getCard(sourceId); + if (sourceCard != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, sourceId); + ExileZone exile = game.getExile().getExileZone(exileId); + if (exile != null && !exile.isEmpty()) { + return true; + } + } + return false; + } + + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + Card card = game.getCard(id); + if (card != null && game.getState().getZone(card.getId()) == Zone.EXILED) { + ExileZone exile = null; + Card sourceCard = game.getCard(source.getSourceId()); + if (sourceCard != null) { + UUID exileId = CardUtil.getCardExileZoneId(game, source); + exile = game.getExile().getExileZone(exileId); + } + if (exile != null && exile.contains(id)) { + return filter.match(card, source.getControllerId(), game); + } + } + return false; + } + + @Override + public TargetCardInMuseVesselExile copy() { + return new TargetCardInMuseVesselExile(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/m/MyrServitor.java b/Mage.Sets/src/mage/cards/m/MyrServitor.java index 070ef59175..d63f1db425 100644 --- a/Mage.Sets/src/mage/cards/m/MyrServitor.java +++ b/Mage.Sets/src/mage/cards/m/MyrServitor.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -34,7 +34,7 @@ public final class MyrServitor extends CardImpl { this.toughness = new MageInt(1); // At the beginning of your upkeep, if Myr Servitor is on the battlefield, each player returns all cards named Myr Servitor from their graveyard to the battlefield. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new MyrServitorReturnEffect(), TargetController.YOU, false), SourceOnBattlefieldCondition.instance, "At the beginning of your upkeep, if {this} is on the battlefield, each player returns all cards named Myr Servitor from their graveyard to the battlefield" diff --git a/Mage.Sets/src/mage/cards/m/MysticBarrier.java b/Mage.Sets/src/mage/cards/m/MysticBarrier.java index fe315e4408..a3f34a5f7c 100644 --- a/Mage.Sets/src/mage/cards/m/MysticBarrier.java +++ b/Mage.Sets/src/mage/cards/m/MysticBarrier.java @@ -1,32 +1,24 @@ - package mage.cards.m; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.ChooseModeEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; import mage.players.PlayerList; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MysticBarrier extends CardImpl { @@ -38,7 +30,10 @@ public final class MysticBarrier extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}"); // When Mystic Barrier enters the battlefield or at the beginning of your upkeep, choose left or right. - this.addAbility(new MysticBarrierTriggeredAbility()); + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new ChooseModeEffect("Choose a direction to allow attacking in.", + ALLOW_ATTACKING_LEFT, ALLOW_ATTACKING_RIGHT), + new EntersBattlefieldTriggeredAbility(null, false), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false))); // Each player may attack only the opponent seated nearest him or her in the last chosen direction and planeswalkers controlled by that player. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MysticBarrierReplacementEffect())); @@ -54,77 +49,6 @@ public final class MysticBarrier extends CardImpl { } } -class MysticBarrierTriggeredAbility extends TriggeredAbilityImpl { - - public MysticBarrierTriggeredAbility() { - super(Zone.BATTLEFIELD, new MysticBarrierChooseEffect(), false); - } - - public MysticBarrierTriggeredAbility(final MysticBarrierTriggeredAbility ability) { - super(ability); - } - - @Override - public MysticBarrierTriggeredAbility copy() { - return new MysticBarrierTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.ENTERS_THE_BATTLEFIELD || event.getType() == EventType.UPKEEP_STEP_PRE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == EventType.ENTERS_THE_BATTLEFIELD) { - return event.getTargetId().equals(this.getSourceId()); - } else { - return event.getPlayerId().equals(this.getControllerId()); - } - } - - @Override - public String getRule() { - return "When {this} enters the battlefield or at the beginning of your upkeep, " + super.getRule(); - } -} - -class MysticBarrierChooseEffect extends OneShotEffect { - - static final String[] SET_VALUES = new String[]{MysticBarrier.ALLOW_ATTACKING_LEFT, MysticBarrier.ALLOW_ATTACKING_RIGHT}; - static final Set CHOICES = new HashSet<>(Arrays.asList(SET_VALUES)); - - public MysticBarrierChooseEffect() { - super(Outcome.Benefit); - this.staticText = "choose left or right"; - } - - public MysticBarrierChooseEffect(final MysticBarrierChooseEffect effect) { - super(effect); - } - - @Override - public MysticBarrierChooseEffect copy() { - return new MysticBarrierChooseEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Choice directionChoice = new ChoiceImpl(true); - directionChoice.setChoices(CHOICES); - directionChoice.setMessage("Direction each player may only attack to"); - directionChoice.isRequired(); - if (!controller.choose(outcome, directionChoice, game)) { - game.getState().setValue("attack_direction_" + source.getSourceId(), directionChoice.getChoice()); - return true; - } - } - return false; - } -} - class MysticBarrierReplacementEffect extends ReplacementEffectImpl { MysticBarrierReplacementEffect() { @@ -152,7 +76,7 @@ class MysticBarrierReplacementEffect extends ReplacementEffectImpl { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (game.getState().getPlayersInRange(controller.getId(), game).contains(event.getPlayerId())) { - String allowedDirection = (String) game.getState().getValue(new StringBuilder("attack_direction_").append(source.getSourceId()).toString()); + String allowedDirection = (String) game.getState().getValue(source.getSourceId() + "_modeChoice"); if (allowedDirection != null) { Player defender = game.getPlayer(event.getTargetId()); if (defender == null) { diff --git a/Mage.Sets/src/mage/cards/n/NantukoShaman.java b/Mage.Sets/src/mage/cards/n/NantukoShaman.java index 5937fe9fca..b17eaccb4b 100644 --- a/Mage.Sets/src/mage/cards/n/NantukoShaman.java +++ b/Mage.Sets/src/mage/cards/n/NantukoShaman.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; @@ -38,7 +38,7 @@ public final class NantukoShaman extends CardImpl { this.toughness = new MageInt(2); // When Nantuko Shaman enters the battlefield, if you control no tapped lands, draw a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0), "When {this} enters the battlefield, if you control no tapped lands, draw a card"); diff --git a/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java b/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java index c12ff398c7..d7ce59cf37 100644 --- a/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java +++ b/Mage.Sets/src/mage/cards/n/NavigatorsRuin.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -24,7 +24,7 @@ public final class NavigatorsRuin extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); // Raid - At the beginning of your end step, if you attacked with a creature this turm, target opponent puts the top four cards of their library into their graveyard. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), TargetController.YOU, false), RaidCondition.instance, "Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent puts the top four cards of their library into their graveyard."); diff --git a/Mage.Sets/src/mage/cards/n/NearDeathExperience.java b/Mage.Sets/src/mage/cards/n/NearDeathExperience.java index ffda771b80..d4563d5d29 100644 --- a/Mage.Sets/src/mage/cards/n/NearDeathExperience.java +++ b/Mage.Sets/src/mage/cards/n/NearDeathExperience.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -26,7 +26,7 @@ public final class NearDeathExperience extends CardImpl { // At the beginning of your upkeep, if you have exactly 1 life, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new OneLifeCondition(), "At the beginning of your upkeep, if you have exactly 1 life, you win the game.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new OneLifeCondition(), "At the beginning of your upkeep, if you have exactly 1 life, you win the game.")); } public NearDeathExperience(final NearDeathExperience card) { diff --git a/Mage.Sets/src/mage/cards/n/NeckBreaker.java b/Mage.Sets/src/mage/cards/n/NeckBreaker.java index eda3130e3d..e47c72f19c 100644 --- a/Mage.Sets/src/mage/cards/n/NeckBreaker.java +++ b/Mage.Sets/src/mage/cards/n/NeckBreaker.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -50,7 +50,7 @@ public final class NeckBreaker extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Neck Breaker. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public NeckBreaker(final NeckBreaker card) { diff --git a/Mage.Sets/src/mage/cards/n/NecraSanctuary.java b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java index f18f891f83..444249762d 100644 --- a/Mage.Sets/src/mage/cards/n/NecraSanctuary.java +++ b/Mage.Sets/src/mage/cards/n/NecraSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.n; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -21,7 +21,7 @@ public final class NecraSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); // At the beginning of your upkeep, if you control a green or white permanent, target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead. - Ability ability = new SanctuaryTriggeredAbility( + Ability ability = new SanctuaryInterveningIfTriggeredAbility( new LoseLifeTargetEffect(1), new LoseLifeTargetEffect(3), ObjectColor.GREEN, ObjectColor.WHITE, "At the beginning of your upkeep, if you control a green or white permanent, " + "target player loses 1 life. If you control a green permanent and a white permanent, that player loses 3 life instead." diff --git a/Mage.Sets/src/mage/cards/n/Necromancy.java b/Mage.Sets/src/mage/cards/n/Necromancy.java index c217d6d105..fe12c03723 100644 --- a/Mage.Sets/src/mage/cards/n/Necromancy.java +++ b/Mage.Sets/src/mage/cards/n/Necromancy.java @@ -9,7 +9,7 @@ import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SacrificeIfCastAtInstantTimeTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffect; @@ -45,7 +45,7 @@ public final class Necromancy extends CardImpl { // When Necromancy enters the battlefield, if it's on the battlefield, it becomes an Aura with "enchant creature put onto the battlefield with Necromancy." // Put target creature card from a graveyard onto the battlefield under your control and attach Necromancy to it. // When Necromancy leaves the battlefield, that creature's controller sacrifices it. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new NecromancyReAttachEffect(), false), SourceOnBattlefieldCondition.instance, "When {this} enters the battlefield, if it's on the battlefield, it becomes an Aura with \"enchant creature put onto the battlefield with {this}.\" Put target creature card from a graveyard onto the battlefield under your control and attach {this} to it."); diff --git a/Mage.Sets/src/mage/cards/n/NessianDemolok.java b/Mage.Sets/src/mage/cards/n/NessianDemolok.java index 2f093a48b9..2ecd67ab9a 100644 --- a/Mage.Sets/src/mage/cards/n/NessianDemolok.java +++ b/Mage.Sets/src/mage/cards/n/NessianDemolok.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class NessianDemolok extends CardImpl { // When Nessian Demolok enters the battlefield, if tribute wasn't paid, destroy target noncreature permanent. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetPermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, destroy target noncreature permanent.")); } diff --git a/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java b/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java index f4ee1ac856..3cb5b250f2 100644 --- a/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java +++ b/Mage.Sets/src/mage/cards/n/NessianWildsRavager.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FightTargetSourceEffect; import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; @@ -40,7 +40,7 @@ public final class NessianWildsRavager extends CardImpl { // When Nessian Wilds Ravager enters the battlefield, if tribute wasn't paid, you may have Nessian Wilds Ravager fight another target creature. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect(), true); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, you may have {this} fight another target creature.")); } diff --git a/Mage.Sets/src/mage/cards/n/NetherSpirit.java b/Mage.Sets/src/mage/cards/n/NetherSpirit.java index f6e60bc88a..392754dc55 100644 --- a/Mage.Sets/src/mage/cards/n/NetherSpirit.java +++ b/Mage.Sets/src/mage/cards/n/NetherSpirit.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class NetherSpirit extends CardImpl { // At the beginning of your upkeep, if Nether Spirit is the only creature card in your graveyard, you may return Nether Spirit to the battlefield. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), TargetController.YOU, true); - this.addAbility(new ConditionalTriggeredAbility(ability, new NetherSpiritCondition(), "At the beginning of your upkeep, if {this} is the only creature card in your graveyard, you may return {this} to the battlefield.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new NetherSpiritCondition(), "At the beginning of your upkeep, if {this} is the only creature card in your graveyard, you may return {this} to the battlefield.")); } public NetherSpirit(final NetherSpirit card) { diff --git a/Mage.Sets/src/mage/cards/n/Nightcreep.java b/Mage.Sets/src/mage/cards/n/Nightcreep.java new file mode 100644 index 0000000000..13e51cd7b0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/Nightcreep.java @@ -0,0 +1,100 @@ +package mage.cards.n; + +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTargets; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * + * @author noahg + */ +public final class Nightcreep extends CardImpl { + + public Nightcreep(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}"); + + + // Until end of turn, all creatures become black and all lands become Swamps. + this.getSpellAbility().addEffect(new NightcreepCreatureEffect()); + this.getSpellAbility().addEffect(new NightcreepLandEffect()); + } + + public Nightcreep(final Nightcreep card) { + super(card); + } + + @Override + public Nightcreep copy() { + return new Nightcreep(this); + } +} + +class NightcreepLandEffect extends BecomesBasicLandTargetEffect { + + public NightcreepLandEffect() { + super(Duration.EndOfTurn, SubType.SWAMP); + this.staticText = ""; + } + + public NightcreepLandEffect(NightcreepLandEffect effect) { + super(effect); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + List targets = new ArrayList<>(game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), source.getSourceId(), game)); + this.setTargetPointer(new FixedTargets(targets, game)); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + return super.apply(layer, sublayer, source, game); + } + + @Override + public NightcreepLandEffect copy() { + return new NightcreepLandEffect(this); + } +} + +class NightcreepCreatureEffect extends BecomesColorTargetEffect { + + public NightcreepCreatureEffect() { + super(ObjectColor.BLACK, Duration.EndOfTurn); + this.staticText = "Until end of turn, all creatures become black and all lands become Swamps"; + } + + public NightcreepCreatureEffect(NightcreepCreatureEffect effect) { + super(effect); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + List targets = new ArrayList<>(game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game)); + this.setTargetPointer(new FixedTargets(targets, game)); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + return super.apply(layer, sublayer, source, game); + } + + @Override + public NightcreepCreatureEffect copy() { + return new NightcreepCreatureEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/n/NightfallPredator.java b/Mage.Sets/src/mage/cards/n/NightfallPredator.java index a2d8dd9a1d..f93f9232ad 100644 --- a/Mage.Sets/src/mage/cards/n/NightfallPredator.java +++ b/Mage.Sets/src/mage/cards/n/NightfallPredator.java @@ -10,7 +10,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -50,7 +50,7 @@ public final class NightfallPredator extends CardImpl { this.addAbility(activatedAbility); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Nightfall Predator. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public NightfallPredator(final NightfallPredator card) { diff --git a/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java b/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java index d288bad401..e04904264a 100644 --- a/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/n/NightscapeBattlemage.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.KickerAbility; @@ -48,12 +48,12 @@ public final class NightscapeBattlemage extends CardImpl { // When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent(0, 2, filter, false)); - this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{U}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{2}{U}"), "When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands.")); // When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{R} kicker, destroy target land. ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetLandPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{R}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{2}{R}"), "When {this} enters the battlefield, if it was kicked with its {2}{R} kicker, destroy target land.")); } diff --git a/Mage.Sets/src/mage/cards/n/Nihilith.java b/Mage.Sets/src/mage/cards/n/Nihilith.java index 73cfcc2508..de40e72459 100644 --- a/Mage.Sets/src/mage/cards/n/Nihilith.java +++ b/Mage.Sets/src/mage/cards/n/Nihilith.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility; import mage.abilities.condition.common.SuspendedCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.SuspendAbility; @@ -39,7 +39,7 @@ public final class Nihilith extends CardImpl { this.addAbility(new SuspendAbility(7, new ManaCostsImpl("{1}{B}"), this, false)); // Whenever a card is put into an opponent's graveyard from anywhere, if Nihilith is suspended, you may remove a time counter from Nihilith. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new PutCardIntoGraveFromAnywhereAllTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), true, new FilterCard(), TargetController.OPPONENT, SetTargetPointer.NONE), SuspendedCondition.instance, diff --git a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java index 34c9c6718b..4b4fd3b1a4 100644 --- a/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java +++ b/Mage.Sets/src/mage/cards/n/NissaVastwoodSeer.java @@ -7,7 +7,7 @@ import mage.abilities.Gender; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.keyword.TransformAbility; @@ -51,7 +51,7 @@ public final class NissaVastwoodSeer extends CardImpl { // Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldControlledTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.FEMALE), new FilterLandPermanent()), new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.MORE_THAN, 6, true), "Whenever a land enters the battlefield under your control, if you control seven or more lands, exile {this}, then return her to the battlefield transformed under her owner's control.")); diff --git a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java index f9c1069495..c117f72761 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java +++ b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; @@ -47,12 +47,12 @@ public final class NoggleHedgeMage extends CardImpl { this.toughness = new MageInt(2); // When Noggle Hedge-Mage enters the battlefield, if you control two or more Islands, you may tap two target permanents. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule); ability.addTarget(new TargetPermanent(2, new FilterPermanent())); this.addAbility(ability); // When Noggle Hedge-Mage enters the battlefield, if you control two or more Mountains, you may have Noggle Hedge-Mage deal 2 damage to target player. - Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); + Ability ability2 = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); ability2.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/o/OathOfChandra.java b/Mage.Sets/src/mage/cards/o/OathOfChandra.java index b5ec01bbee..4610ca8f5c 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfChandra.java +++ b/Mage.Sets/src/mage/cards/o/OathOfChandra.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamagePlayersEffect; @@ -47,7 +47,7 @@ public final class OathOfChandra extends CardImpl { ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); // At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, Oath of Chandra deals 2 damage to each opponent. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), TargetController.ANY, false), OathOfChandraCondition.instance, "At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, {this} deals 2 damage to each opponent."), new OathOfChandraWatcher()); diff --git a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java index b9c83646ca..5e45a1e6be 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfLiliana.java +++ b/Mage.Sets/src/mage/cards/o/OathOfLiliana.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.SacrificeOpponentsEffect; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class OathOfLiliana extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false)); // At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, create a 2/2 black Zombie creature token. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new CreateTokenEffect(new ZombieToken()), TargetController.ANY, false), OathOfLilianaCondition.instance, "At the beginning of each end step, if a planeswalker entered the battlefield under your control this turn, " diff --git a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java index d758ecf828..c73958f38d 100644 --- a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java +++ b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java @@ -8,7 +8,7 @@ import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlAttachedEffect; @@ -41,7 +41,7 @@ public final class OathkeeperTakenosDaisho extends CardImpl { // Equipped creature gets +3/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3,1, Duration.WhileOnBattlefield))); // Whenever equipped creature dies, return that card to the battlefield under your control if it's a Samurai card. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(),"equipped creature", false), new OathkeeperEquippedMatchesFilterCondition(filter), "")); diff --git a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java index 673d0c3c63..2edac2bd3e 100644 --- a/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java +++ b/Mage.Sets/src/mage/cards/o/ObsessiveSkinner.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,7 +37,7 @@ public final class ObsessiveSkinner extends CardImpl { // Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // put a +1/+1 counter on target creature. - ability = new ConditionalTriggeredAbility( + ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), TargetController.OPPONENT, false), DeliriumCondition.instance, "Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/o/OgreSavant.java b/Mage.Sets/src/mage/cards/o/OgreSavant.java index 611d644509..3b7cafa2ac 100644 --- a/Mage.Sets/src/mage/cards/o/OgreSavant.java +++ b/Mage.Sets/src/mage/cards/o/OgreSavant.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,9 +29,10 @@ public final class OgreSavant extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(2); + //When Ogre Savant enters the battlefield, if {U} was spent to cast Ogre Savant, return target creature to its owner’s hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(),false); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.U), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.U), "if {U} was spent to cast {this}, return target creature to its owner's hand."), new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/o/OneOfThePack.java b/Mage.Sets/src/mage/cards/o/OneOfThePack.java index 6280e6c952..ff9464e038 100644 --- a/Mage.Sets/src/mage/cards/o/OneOfThePack.java +++ b/Mage.Sets/src/mage/cards/o/OneOfThePack.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class OneOfThePack extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform One of the Pack. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public OneOfThePack(final OneOfThePack card) { diff --git a/Mage.Sets/src/mage/cards/o/OpalArchangel.java b/Mage.Sets/src/mage/cards/o/OpalArchangel.java index bca276e928..d01b6c7950 100644 --- a/Mage.Sets/src/mage/cards/o/OpalArchangel.java +++ b/Mage.Sets/src/mage/cards/o/OpalArchangel.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; @@ -17,7 +17,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -34,7 +33,7 @@ public final class OpalArchangel extends CardImpl { // When an opponent casts a creature spell, if Opal Archangel is an enchantment, Opal Archangel becomes a 5/5 Angel creature with flying and vigilance. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalArchangelToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 5/5 Angel creature with flying and vigilance.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java index 71c09b1297..41e8f0a1f8 100644 --- a/Mage.Sets/src/mage/cards/o/OpalCaryatid.java +++ b/Mage.Sets/src/mage/cards/o/OpalCaryatid.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class OpalCaryatid extends CardImpl { // When an opponent casts a creature spell, if Opal Caryatid is an enchantment, Opal Caryatid becomes a 2/2 Soldier creature. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalCaryatidSoldierToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Soldier creature.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalChampion.java b/Mage.Sets/src/mage/cards/o/OpalChampion.java index cd38ed0e7c..ad80f47b58 100644 --- a/Mage.Sets/src/mage/cards/o/OpalChampion.java +++ b/Mage.Sets/src/mage/cards/o/OpalChampion.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; @@ -16,7 +16,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -33,7 +32,7 @@ public final class OpalChampion extends CardImpl { // When an opponent casts a creature spell, if Opal Champion is an enchantment, Opal Champion becomes a 3/3 Knight creature with first strike. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalChampionKnight(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/3 Knight creature with first strike.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java index eb7d2c4233..7af1f098b0 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGargoyle.java +++ b/Mage.Sets/src/mage/cards/o/OpalGargoyle.java @@ -5,7 +5,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -16,7 +16,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -33,7 +32,7 @@ public final class OpalGargoyle extends CardImpl { // When an opponent casts a creature spell, if Opal Gargoyle is an enchantment, Opal Gargoyle becomes a 2/2 Gargoyle creature with flying. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGargoyleToken(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 2/2 Gargoyle creature with flying.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalGuardian.java b/Mage.Sets/src/mage/cards/o/OpalGuardian.java index 258002501a..2ef3d5f02f 100644 --- a/Mage.Sets/src/mage/cards/o/OpalGuardian.java +++ b/Mage.Sets/src/mage/cards/o/OpalGuardian.java @@ -6,7 +6,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.ProtectionAbility; @@ -18,7 +18,6 @@ import mage.constants.Duration; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureSpell; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; import java.util.UUID; @@ -35,7 +34,7 @@ public final class OpalGuardian extends CardImpl { // When an opponent casts a creature spell, if Opal Guardian is an enchantment, Opal Guardian becomes a 3/4 Gargoyle creature with flying and protection from red. TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new OpalGuardianGargoyle(), "", Duration.WhileOnBattlefield, true, false), new FilterCreatureSpell(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), "When an opponent casts a creature spell, if {this} is an enchantment, {this} becomes a 3/4 Gargoyle creature with flying and protection from red.")); } diff --git a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java index f3c7b6d9fa..4a41c8e08d 100644 --- a/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java +++ b/Mage.Sets/src/mage/cards/o/OpalLakeGatekeepers.java @@ -6,7 +6,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class OpalLakeGatekeepers extends CardImpl { this.toughness = new MageInt(4); // When Opal Lake Gatekeepers enters the battlefield, if you control two or more Gates, you may draw a card. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), "When Opal Lake Gatekeepers enters the battlefield, if you control two or more Gates, you may draw a card.")); diff --git a/Mage.Sets/src/mage/cards/o/Ophiomancer.java b/Mage.Sets/src/mage/cards/o/Ophiomancer.java index 2984ff3dcd..3bcde4f46d 100644 --- a/Mage.Sets/src/mage/cards/o/Ophiomancer.java +++ b/Mage.Sets/src/mage/cards/o/Ophiomancer.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,7 +28,7 @@ public final class Ophiomancer extends CardImpl { this.toughness = new MageInt(2); // At the beginning of each upkeep, if you control no Snakes, create a 1/1 black Snake creature token with deathtouch. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new OphiomancerSnakeToken()), TargetController.ANY, false, false), new PermanentsOnTheBattlefieldCondition(new FilterCreaturePermanent(SubType.SNAKE, "no Snakes"), ComparisonType.EQUAL_TO, 0), "At the beginning of each upkeep, if you control no Snakes, create a 1/1 black Snake creature token with deathtouch.")); diff --git a/Mage.Sets/src/mage/cards/o/OracleOfBones.java b/Mage.Sets/src/mage/cards/o/OracleOfBones.java index 80208b1d8c..d54fec1de7 100644 --- a/Mage.Sets/src/mage/cards/o/OracleOfBones.java +++ b/Mage.Sets/src/mage/cards/o/OracleOfBones.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TributeAbility; @@ -45,7 +45,7 @@ public final class OracleOfBones extends CardImpl { this.addAbility(new TributeAbility(2)); // When Oracle of Bones enters the battlefield, if tribute wasn't paid, you may cast an instant or sorcery card from your hand without paying its mana cost. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new OracleOfBonesCastEffect(), false); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, you may cast an instant or sorcery card from your hand without paying its mana cost.")); } diff --git a/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java b/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java index f2b158cd94..833b811865 100644 --- a/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java +++ b/Mage.Sets/src/mage/cards/o/OranRiefRecluse.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; @@ -46,7 +46,7 @@ public final class OranRiefRecluse extends CardImpl { // When Oran-Rief Recluse enters the battlefield, if it was kicked, destroy target creature with flying. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target creature with flying.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target creature with flying.")); } public OranRiefRecluse(final OranRiefRecluse card) { diff --git a/Mage.Sets/src/mage/cards/o/OrcishMine.java b/Mage.Sets/src/mage/cards/o/OrcishMine.java new file mode 100644 index 0000000000..747e86604e --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OrcishMine.java @@ -0,0 +1,103 @@ +package mage.cards.o; + +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DamageAttachedControllerEffect; +import mage.abilities.effects.common.DestroyAttachedToEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.meta.OrTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetLandPermanent; + +import java.util.UUID; + +/** + * + * @author noahg + */ +public final class OrcishMine extends CardImpl { + + public OrcishMine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.DestroyPermanent)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Orcish Mine enters the battlefield with three ore counters on it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.ORE.createInstance(3)), "with three ore counters on it")); + + // At the beginning of your upkeep or whenever enchanted land becomes tapped, remove an ore counter from Orcish Mine. + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.ORE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new BecomesTappedAttachedTriggeredAbility(null, "enchanted land"))); + + // When the last ore counter is removed from Orcish Mine, destroy enchanted land and Orcish Mine deals 2 damage to that land's controller. + this.addAbility(new OrcishMineAbility()); + } + + public OrcishMine(final OrcishMine card) { + super(card); + } + + @Override + public OrcishMine copy() { + return new OrcishMine(this); + } +} + +class OrcishMineAbility extends TriggeredAbilityImpl { + + public OrcishMineAbility() { + super(Zone.BATTLEFIELD, new DestroyAttachedToEffect("enchanted land")); + this.addEffect(new DamageAttachedControllerEffect(2)); + } + + public OrcishMineAbility(final OrcishMineAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTER_REMOVED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getData().equals("ore") && event.getTargetId().equals(this.getSourceId())) { + Permanent p = game.getPermanent(this.getSourceId()); + if (p != null) { + return p.getCounters(game).getCount(CounterType.ORE) == 0; + } + } + return false; + } + + @Override + public OrcishMineAbility copy() { + return new OrcishMineAbility(this); + } + + @Override + public String getRule() { + return "When the last ore counter is removed from {this}, destroy enchanted land and {this} deals 2 damage to that land's controller."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/o/Ornitharch.java b/Mage.Sets/src/mage/cards/o/Ornitharch.java index edee0495a9..674177dab3 100644 --- a/Mage.Sets/src/mage/cards/o/Ornitharch.java +++ b/Mage.Sets/src/mage/cards/o/Ornitharch.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.TributeAbility; @@ -35,7 +35,7 @@ public final class Ornitharch extends CardImpl { this.addAbility(new TributeAbility(2)); // When Ornitharch enters the battlefield, if tribute wasn't paid, create two 1/1 white Bird creature tokens with flying. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BirdToken(), 2), false); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, create two 1/1 white Bird creature tokens with flying.")); } diff --git a/Mage.Sets/src/mage/cards/o/OsaiVultures.java b/Mage.Sets/src/mage/cards/o/OsaiVultures.java index 40c192a16c..77c550a5b9 100644 --- a/Mage.Sets/src/mage/cards/o/OsaiVultures.java +++ b/Mage.Sets/src/mage/cards/o/OsaiVultures.java @@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.MorbidCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.FlyingAbility; @@ -35,7 +35,7 @@ public final class OsaiVultures extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // At the beginning of each end step, if a creature died this turn, put a carrion counter on Osai Vultures. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new AddCountersSourceEffect(CounterType.CARRION.createInstance()), TargetController.ANY, false), MorbidCondition.instance, "At the beginning of each end step, if a creature died this turn, put a carrion counter on {this}.")); // Remove two carrion counters from Osai Vultures: Osai Vultures gets +1/+1 until end of turn. diff --git a/Mage.Sets/src/mage/cards/o/OversoldCemetery.java b/Mage.Sets/src/mage/cards/o/OversoldCemetery.java index ee4f321b18..5c4825f137 100644 --- a/Mage.Sets/src/mage/cards/o/OversoldCemetery.java +++ b/Mage.Sets/src/mage/cards/o/OversoldCemetery.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInControllerGraveCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class OversoldCemetery extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), TargetController.YOU, true); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); CardsInControllerGraveCondition condition = new CardsInControllerGraveCondition(4, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.")); } public OversoldCemetery(final OversoldCemetery card) { diff --git a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java index 4ed9f24c3d..b22a6b76e3 100644 --- a/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java +++ b/Mage.Sets/src/mage/cards/p/PadeemConsulOfInnovation.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.ControlsPermanentGreatestCMCCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.HexproofAbility; @@ -35,7 +35,7 @@ public final class PadeemConsulOfInnovation extends CardImpl { new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, new FilterArtifactPermanent(), false))); // At the beginning of your upkeep, if you control the artifact with the highest converted mana cost or tied for the highest converted mana cost, draw a card. - Ability ability = new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false), new ControlsPermanentGreatestCMCCondition(new FilterArtifactPermanent()), "At the beginning of your upkeep, if you control the artifact with the highest converted mana cost or tied for the highest converted mana cost, draw a card."); diff --git a/Mage.Sets/src/mage/cards/p/PalaceSiege.java b/Mage.Sets/src/mage/cards/p/PalaceSiege.java index 7e39368e17..97624a9c48 100644 --- a/Mage.Sets/src/mage/cards/p/PalaceSiege.java +++ b/Mage.Sets/src/mage/cards/p/PalaceSiege.java @@ -1,7 +1,6 @@ package mage.cards.p; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; @@ -19,6 +18,8 @@ import mage.constants.TargetController; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/p/PaladinOfAtonement.java b/Mage.Sets/src/mage/cards/p/PaladinOfAtonement.java index c6c0b36d28..3b21dd98e7 100644 --- a/Mage.Sets/src/mage/cards/p/PaladinOfAtonement.java +++ b/Mage.Sets/src/mage/cards/p/PaladinOfAtonement.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.common.LiveLostLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -32,7 +32,7 @@ public final class PaladinOfAtonement extends CardImpl { this.toughness = new MageInt(1); // At the beginning of each upkeep, if you lost life last turn, put a +1/+1 counter on Paladin of Atonement. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.ANY, false), LiveLostLastTurnCondition.instance, "At the beginning of each upkeep, if you lost life last turn, put a +1/+1 counter on {this}")); diff --git a/Mage.Sets/src/mage/cards/p/PardicDragon.java b/Mage.Sets/src/mage/cards/p/PardicDragon.java index 03002ad2fb..992255a6fa 100644 --- a/Mage.Sets/src/mage/cards/p/PardicDragon.java +++ b/Mage.Sets/src/mage/cards/p/PardicDragon.java @@ -9,7 +9,7 @@ import mage.abilities.common.SpellCastOpponentTriggeredAbility; import mage.abilities.condition.common.SuspendedCondition; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.FlyingAbility; @@ -43,7 +43,7 @@ public final class PardicDragon extends CardImpl { // Suspend 2-{R}{R} this.addAbility(new SuspendAbility(2, new ManaCostsImpl("{R}{R}"), this, true)); // Whenever an opponent casts a spell, if Pardic Dragon is suspended, that player may put a time counter on Pardic Dragon. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new SpellCastOpponentTriggeredAbility(Zone.EXILED, new PardicDragonEffect(), StaticFilters.FILTER_SPELL, false, SetTargetPointer.PLAYER), SuspendedCondition.instance, "Whenever an opponent casts a spell, if {this} is suspended, that player may put a time counter on {this}." diff --git a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java index b8a7048837..0aed2b41de 100644 --- a/Mage.Sets/src/mage/cards/p/PatriciansScorn.java +++ b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java @@ -31,7 +31,7 @@ public final class PatriciansScorn extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); - // If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost. + // If you've cast another white spell this turn, you may cast this spell without paying its mana cost. this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()), new PatriciansScornWatcher()); // Destroy all enchantments. this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_ENCHANTMENT_PERMANENT)); @@ -87,7 +87,7 @@ class PatriciansScornWatcher extends Watcher { @Override public void watch(GameEvent event, Game game) { - if (condition == true) { //no need to check - condition has already occured + if (condition) { //no need to check - condition has already occured return; } if (event.getType() == EventType.SPELL_CAST && controllerId.equals(event.getPlayerId())) { diff --git a/Mage.Sets/src/mage/cards/p/PaupersCage.java b/Mage.Sets/src/mage/cards/p/PaupersCage.java index d0c92d1665..961a57eecb 100644 --- a/Mage.Sets/src/mage/cards/p/PaupersCage.java +++ b/Mage.Sets/src/mage/cards/p/PaupersCage.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class PaupersCage extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), TargetController.OPPONENT, false, true); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 3); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, {this} deals 2 damage to him or her.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, "At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand, {this} deals 2 damage to him or her.")); } public PaupersCage(final PaupersCage card) { diff --git a/Mage.Sets/src/mage/cards/p/Pestilence.java b/Mage.Sets/src/mage/cards/p/Pestilence.java index e584a3e20e..1b9d417a3a 100644 --- a/Mage.Sets/src/mage/cards/p/Pestilence.java +++ b/Mage.Sets/src/mage/cards/p/Pestilence.java @@ -7,7 +7,7 @@ import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.CreatureCountCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -30,7 +30,7 @@ public final class Pestilence extends CardImpl { // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Pestilence. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); // {B}: Pestilence deals 1 damage to each creature and each player. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(1), new ManaCostsImpl("{B}"))); diff --git a/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java b/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java index 32ba55f44c..e1bc4cafc8 100644 --- a/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java +++ b/Mage.Sets/src/mage/cards/p/PhageTheUntouchable.java @@ -8,7 +8,7 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.LoseGameSourceControllerEffect; import mage.abilities.effects.common.LoseGameTargetPlayerEffect; @@ -35,7 +35,7 @@ public final class PhageTheUntouchable extends CardImpl { this.toughness = new MageInt(4); // When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false), new InvertCondition(CastFromHandSourceCondition.instance), "When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game" diff --git a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java index 383d66b238..003ff68f88 100644 --- a/Mage.Sets/src/mage/cards/p/PhantasmalImage.java +++ b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java @@ -26,7 +26,7 @@ import java.util.UUID; */ public final class PhantasmalImage extends CardImpl { - private static final String effectText = "a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains \"When this creature becomes the target of a spell or ability, sacrifice it.\""; + private static final String effectText = "a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it has \"When this creature becomes the target of a spell or ability, sacrifice it.\""; ApplyToPermanent phantasmalImageApplier = new ApplyToPermanent() { @Override @@ -62,7 +62,7 @@ public final class PhantasmalImage extends CardImpl { // You may have Phantasmal Image enter the battlefield as a copy of any creature // on the battlefield, except it's an Illusion in addition to its other types and - // it gains "When this creature becomes the target of a spell or ability, sacrifice it." + // it has "When this creature becomes the target of a spell or ability, sacrifice it." Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, phantasmalImageApplier); effect.setText(effectText); this.addAbility(new EntersBattlefieldAbility(effect, true)); diff --git a/Mage.Sets/src/mage/cards/p/PharagaxGiant.java b/Mage.Sets/src/mage/cards/p/PharagaxGiant.java index 08a362cff7..c90976a6ea 100644 --- a/Mage.Sets/src/mage/cards/p/PharagaxGiant.java +++ b/Mage.Sets/src/mage/cards/p/PharagaxGiant.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class PharagaxGiant extends CardImpl { this.addAbility(new TributeAbility(2)); // When Pharagax Giant enters the battlefield, if tribute wasn't paid, Pharagax Giant deals 5 damage to each opponent. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(5, TargetController.OPPONENT), false); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, {this} deals 5 damage to each opponent.")); } diff --git a/Mage.Sets/src/mage/cards/p/PitKeeper.java b/Mage.Sets/src/mage/cards/p/PitKeeper.java index d758888bc5..ce51141cf7 100644 --- a/Mage.Sets/src/mage/cards/p/PitKeeper.java +++ b/Mage.Sets/src/mage/cards/p/PitKeeper.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -35,7 +35,7 @@ public final class PitKeeper extends CardImpl { // When Pit Keeper enters the battlefield, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand. TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); triggeredAbility.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( triggeredAbility, new CreatureCardsInControllerGraveCondition(4), "When {this} enters the battlefield, if you have four or more creature cards in your graveyard, you may return target creature card from your graveyard to your hand.")); diff --git a/Mage.Sets/src/mage/cards/p/PlanarCollapse.java b/Mage.Sets/src/mage/cards/p/PlanarCollapse.java index fadfd1060a..f627cf2be7 100644 --- a/Mage.Sets/src/mage/cards/p/PlanarCollapse.java +++ b/Mage.Sets/src/mage/cards/p/PlanarCollapse.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -29,7 +29,7 @@ public final class PlanarCollapse extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false); ability.addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE, true)); PlanarCollapseCondition contition = new PlanarCollapseCondition(); - this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if there are four or more creatures on the battlefield, sacrifice {this} and destroy all creatures. They can't be regenerated")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if there are four or more creatures on the battlefield, sacrifice {this} and destroy all creatures. They can't be regenerated")); } diff --git a/Mage.Sets/src/mage/cards/p/PlatedPegasus.java b/Mage.Sets/src/mage/cards/p/PlatedPegasus.java new file mode 100644 index 0000000000..ab53c9aab3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PlatedPegasus.java @@ -0,0 +1,83 @@ +package mage.cards.p; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.PreventionEffectImpl; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamageEvent; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; + +/** + * + * @author noahg + */ +public final class PlatedPegasus extends CardImpl { + + public PlatedPegasus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.PEGASUS); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // If a spell would deal damage to a permanent or player, prevent 1 damage that spell would deal to that permanent or player. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlatedPegasusEffect())); + } + + public PlatedPegasus(final PlatedPegasus card) { + super(card); + } + + @Override + public PlatedPegasus copy() { + return new PlatedPegasus(this); + } +} + +class PlatedPegasusEffect extends PreventionEffectImpl { + + public PlatedPegasusEffect() { + super(Duration.WhileOnBattlefield, 1, false, false); + staticText = "If a spell would deal damage to a permanent or player, prevent 1 damage that spell would deal to that permanent or player."; + } + + public PlatedPegasusEffect(PlatedPegasusEffect effect) { + super(effect); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + StackObject stackObject = game.getStack().getStackObject(event.getSourceId()); + if (stackObject == null) { + stackObject = (StackObject) game.getLastKnownInformation(event.getSourceId(), Zone.STACK); + } + if (stackObject instanceof Spell) { + return super.applies(event, source, game); + } + return false; + } + + @Override + public PlatedPegasusEffect copy() { + return new PlatedPegasusEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/PortalMage.java b/Mage.Sets/src/mage/cards/p/PortalMage.java index 8a162d3d56..69e75544b1 100644 --- a/Mage.Sets/src/mage/cards/p/PortalMage.java +++ b/Mage.Sets/src/mage/cards/p/PortalMage.java @@ -1,9 +1,6 @@ package mage.cards.p; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -14,9 +11,9 @@ import mage.abilities.keyword.FlashAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.PhaseStep; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.filter.common.FilterAttackingCreature; import mage.game.Game; @@ -26,6 +23,10 @@ import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetDefender; +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + /** * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/p/Portcullis.java b/Mage.Sets/src/mage/cards/p/Portcullis.java index 82ec1cea8b..c238942678 100644 --- a/Mage.Sets/src/mage/cards/p/Portcullis.java +++ b/Mage.Sets/src/mage/cards/p/Portcullis.java @@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnFromExileForSourceEffect; @@ -36,9 +36,8 @@ public final class Portcullis extends CardImpl { // Whenever a creature enters the battlefield, if there are two or more other creatures on the battlefield, exile that creature. String rule = "Whenever a creature enters the battlefield, if there are two or more other creatures on the battlefield, exile that creature"; TriggeredAbility ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new PortcullisExileEffect(), filter, false, SetTargetPointer.PERMANENT, rule); - MoreThanXCreaturesOnBFCondition condition = new MoreThanXCreaturesOnBFCondition(2); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, condition, rule)); // Return that card to the battlefield under its owner's control when Portcullis leaves the battlefield. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); diff --git a/Mage.Sets/src/mage/cards/p/PouncingWurm.java b/Mage.Sets/src/mage/cards/p/PouncingWurm.java index 25b6d07f20..df36219167 100644 --- a/Mage.Sets/src/mage/cards/p/PouncingWurm.java +++ b/Mage.Sets/src/mage/cards/p/PouncingWurm.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.HasteAbility; @@ -34,7 +34,7 @@ public final class PouncingWurm extends CardImpl { // Kicker {2}{G} this.addAbility(new KickerAbility("{2}{G}")); // If Pouncing Wurm was kicked, it enters the battlefield with three +1/+1 counters on it and with haste. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3))), KickedCondition.instance,"If Pouncing Wurm was kicked, it enters the battlefield with three +1/+1 counters on it and with haste."); ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield)); diff --git a/Mage.Sets/src/mage/cards/p/PredatoryFocus.java b/Mage.Sets/src/mage/cards/p/PredatoryFocus.java new file mode 100644 index 0000000000..807f524959 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PredatoryFocus.java @@ -0,0 +1,81 @@ +package mage.cards.p; + +import java.util.UUID; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.AsThoughEffect; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author noahg + */ +public final class PredatoryFocus extends CardImpl { + + public PredatoryFocus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); + + + // You may have creatures you control assign their combat damage this turn as though they weren't blocked. + this.getSpellAbility().addEffect(new PredatoryFocusEffect()); + } + + public PredatoryFocus(final PredatoryFocus card) { + super(card); + } + + @Override + public PredatoryFocus copy() { + return new PredatoryFocus(this); + } +} + +class PredatoryFocusEffect extends AsThoughEffectImpl { + + private boolean choseUse; + + public PredatoryFocusEffect() { + super(AsThoughEffectType.DAMAGE_NOT_BLOCKED, Duration.EndOfTurn, Outcome.Damage); + this.staticText = "You may have creatures you control assign their combat damage this turn as though they weren't blocked."; + } + + public PredatoryFocusEffect(PredatoryFocusEffect effect) { + super(effect); + } + + @Override + public void init(Ability source, Game game) { + super.init(source, game); + Player controller = game.getPlayer(source.getControllerId()); + String sourceName = source.getSourceObject(game).getLogName(); + choseUse = controller.chooseUse(Outcome.Damage, "Have creatures you control deal combat damage this turn" + + " as though they weren't blocked?", source, game); + game.informPlayers(choseUse ? controller.getName()+" chose to use "+sourceName+"'s effect" : + controller.getName()+" chose not to use "+sourceName+"'s effect."); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + return choseUse && affectedControllerId.equals(source.getControllerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public PredatoryFocusEffect copy() { + return new PredatoryFocusEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/PrematureBurial.java b/Mage.Sets/src/mage/cards/p/PrematureBurial.java new file mode 100644 index 0000000000..9f35bb5888 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PrematureBurial.java @@ -0,0 +1,143 @@ +package mage.cards.p; + +import mage.MageObject; +import mage.MageObjectReference; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.WatcherScope; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.Watcher; + +import java.util.*; + +/** + * + * @author noahg + */ +public final class PrematureBurial extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature that entered the battlefield since your last turn ended"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public PrematureBurial(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + + // Destroy target nonblack creature that entered the battlefield since your last turn ended. + this.getSpellAbility().addEffect(new DestroyTargetEffect().setText("Destroy target nonblack creature that entered the battlefield since your last turn ended.")); + this.getSpellAbility().addTarget(new ETBSinceYourLastTurnTarget(filter)); + this.getSpellAbility().addWatcher(new ETBSinceYourLastTurnWatcher()); + } + + public PrematureBurial(final PrematureBurial card) { + super(card); + } + + @Override + public PrematureBurial copy() { + return new PrematureBurial(this); + } +} + +class ETBSinceYourLastTurnTarget extends TargetCreaturePermanent { + + public ETBSinceYourLastTurnTarget(FilterCreaturePermanent filter) { + super(filter); + this.targetName = "nonblack creature that entered the battlefield since your last turn ended"; + } + + public ETBSinceYourLastTurnTarget(ETBSinceYourLastTurnTarget target){ + super(target); + } + + @Override + public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) { + System.out.println("canTarget called"); + ETBSinceYourLastTurnWatcher watcher = (ETBSinceYourLastTurnWatcher) game.getState().getWatchers().get(ETBSinceYourLastTurnWatcher.class.getSimpleName()); + if (watcher != null){ + if (watcher.enteredSinceLastTurn(controllerId, new MageObjectReference(id, game))){ + System.out.println(game.getPermanent(id).getIdName()+" entered since the last turn."); + return super.canTarget(controllerId, id, source, game); + } + } + return false; + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + MageObject targetSource = game.getObject(sourceId); + ETBSinceYourLastTurnWatcher watcher = (ETBSinceYourLastTurnWatcher) game.getState().getWatchers().get(ETBSinceYourLastTurnWatcher.class.getSimpleName()); + for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) { + if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) { + if(watcher.enteredSinceLastTurn(sourceControllerId, new MageObjectReference(permanent.getId(), game))) { + return true; + } + } + } + return false; + } + + @Override + public ETBSinceYourLastTurnTarget copy() { + return new ETBSinceYourLastTurnTarget(this); + } +} + +class ETBSinceYourLastTurnWatcher extends Watcher { + + private final Map> playerToETBMap; + + public ETBSinceYourLastTurnWatcher() { + super(ETBSinceYourLastTurnWatcher.class.getSimpleName(), WatcherScope.GAME); + this.playerToETBMap = new HashMap<>(); + } + + public ETBSinceYourLastTurnWatcher(ETBSinceYourLastTurnWatcher watcher) { + super(watcher); + this.playerToETBMap = new HashMap<>(); + for (UUID player : watcher.playerToETBMap.keySet()){ + this.playerToETBMap.put(player, new HashSet<>(watcher.playerToETBMap.get(player))); + } + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.END_TURN_STEP_POST){ + System.out.println("End of turn for "+game.getPlayer(event.getPlayerId()).getName()); + playerToETBMap.put(event.getPlayerId(), new HashSet<>()); + } else if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD){ + Permanent etbPermanent = game.getPermanent(event.getTargetId()); + if (etbPermanent != null){ + System.out.println("nonnull permanent entered: "+etbPermanent.getIdName()); + for (UUID player : game.getPlayerList()){ + if (!playerToETBMap.containsKey(player)){ + playerToETBMap.put(player, new HashSet<>()); + } + playerToETBMap.get(player).add(new MageObjectReference(etbPermanent.getBasicMageObject(game), game)); + } + } + } + } + + public boolean enteredSinceLastTurn(UUID player, MageObjectReference mor){ + return playerToETBMap.get(player).contains(mor); + } + + @Override + public ETBSinceYourLastTurnWatcher copy() { + return new ETBSinceYourLastTurnWatcher(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java index b3a181e230..156ae583dc 100644 --- a/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java +++ b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.SourceMatchesFilterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.CreateTokenCopySourceEffect; import mage.abilities.effects.common.CopyPermanentEffect; @@ -40,19 +40,19 @@ public final class ProgenitorMimic extends CardImpl { this.toughness = new MageInt(0); // You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield - // except it gains "At the beginning of your upkeep, if this creature isn't a token, + // except it has "At the beginning of your upkeep, if this creature isn't a token, // create a token that's a copy of this creature." Effect effect = new CreateTokenCopySourceEffect(); effect.setText("create a token that's a copy of this creature"); AbilityApplier applier = new AbilityApplier( - new ConditionalTriggeredAbility( + new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false), new SourceMatchesFilterCondition(filter), "At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature.") ); effect = new CopyPermanentEffect(applier); - effect.setText("as a copy of any creature on the battlefield except it gains \"At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature.\""); + effect.setText("as a copy of any creature on the battlefield except it has \"At the beginning of your upkeep, if this creature isn't a token, create a token that's a copy of this creature.\""); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java index 933ef29e44..a6c373ffd1 100644 --- a/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java +++ b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java @@ -27,7 +27,7 @@ public final class ProwlingPangolin extends CardImpl { public ProwlingPangolin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); - this.subtype.add(SubType.BEAST); + this.subtype.add(SubType.BEAST, SubType.PANGOLIN); this.power = new MageInt(6); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/p/Pyrohemia.java b/Mage.Sets/src/mage/cards/p/Pyrohemia.java index 0cb68a49ba..e030531225 100644 --- a/Mage.Sets/src/mage/cards/p/Pyrohemia.java +++ b/Mage.Sets/src/mage/cards/p/Pyrohemia.java @@ -7,7 +7,7 @@ import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.CreatureCountCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -30,7 +30,7 @@ public final class Pyrohemia extends CardImpl { // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Pyrohemia. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); // {R}: Pyrohemia deals 1 damage to each creature and each player. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageEverythingEffect(1), new ManaCostsImpl("{R}"))); diff --git a/Mage.Sets/src/mage/cards/q/QueenMarchesa.java b/Mage.Sets/src/mage/cards/q/QueenMarchesa.java index 7c02c754d5..6b38efbc83 100644 --- a/Mage.Sets/src/mage/cards/q/QueenMarchesa.java +++ b/Mage.Sets/src/mage/cards/q/QueenMarchesa.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.DeathtouchAbility; @@ -44,7 +44,7 @@ public final class QueenMarchesa extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect(), false)); // At the beginning of your upkeep, if an opponent is the monarch, create a 1/1 black Assassin creature token with deathtouch and haste. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new QueenMarchesaAssassinToken()), TargetController.YOU, false), OpponentIsMonarchCondition.instance, "At the beginning of your upkeep, if an opponent is the monarch, create a 1/1 black Assassin creature token with deathtouch and haste.")); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java index c5e28fa050..e925ecda97 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java @@ -28,7 +28,7 @@ public final class QuicksilverGargantuan extends CardImpl { this.toughness = new MageInt(7); Ability ability = new EntersBattlefieldAbility(new CopyPermanentEffect(new QuicksilverGargantuanApplyToPermanent()), - "You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's still 7/7"); + "You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's 7/7"); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RaidersWake.java b/Mage.Sets/src/mage/cards/r/RaidersWake.java index d183ddeb64..3fafbd93f9 100644 --- a/Mage.Sets/src/mage/cards/r/RaidersWake.java +++ b/Mage.Sets/src/mage/cards/r/RaidersWake.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.DiscardsACardOpponentTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; @@ -30,7 +30,7 @@ public final class RaidersWake extends CardImpl { this.addAbility(new DiscardsACardOpponentTriggeredAbility(new LoseLifeTargetEffect(2), false, SetTargetPointer.PLAYER)); // Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new DiscardTargetEffect(1), TargetController.YOU, false), RaidCondition.instance, "Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card."); ability.addTarget(new TargetOpponent()); diff --git a/Mage.Sets/src/mage/cards/r/RakaSanctuary.java b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java index 45a2ff888f..279ef34dae 100644 --- a/Mage.Sets/src/mage/cards/r/RakaSanctuary.java +++ b/Mage.Sets/src/mage/cards/r/RakaSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.r; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.common.SanctuaryTriggeredAbility; +import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -21,7 +21,7 @@ public final class RakaSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead. - Ability ability = new SanctuaryTriggeredAbility( + Ability ability = new SanctuaryInterveningIfTriggeredAbility( new DamageTargetEffect(1), new DamageTargetEffect(3), ObjectColor.WHITE, ObjectColor.BLUE, "At the beginning of your upkeep, if you control a white or blue permanent, Raka Sanctuary deals 1 damage to target creature. " + "If you control a white permanent and a blue permanent, Raka Sanctuary deals 3 damage to that creature instead." diff --git a/Mage.Sets/src/mage/cards/r/RakdosAugermage.java b/Mage.Sets/src/mage/cards/r/RakdosAugermage.java new file mode 100644 index 0000000000..422d4c3291 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RakdosAugermage.java @@ -0,0 +1,94 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.RevealHandSourceControllerEffect; +import mage.abilities.effects.common.RevealHandTargetEffect; +import mage.abilities.effects.common.discard.DiscardCardYouChooseTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.*; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * + * @author noahg + */ +public final class RakdosAugermage extends CardImpl { + + public RakdosAugermage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // {tap}: Reveal your hand and discard a card of target opponent’s choice. Then that player reveals their hand and discards a card of your choice. Activate this ability only any time you could cast a sorcery. + ActivateAsSorceryActivatedAbility ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new RakdosAugermageEffect(), new TapSourceCost()); + ability.addEffect(new DiscardCardYouChooseTargetEffect()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public RakdosAugermage(final RakdosAugermage card) { + super(card); + } + + @Override + public RakdosAugermage copy() { + return new RakdosAugermage(this); + } +} + +class RakdosAugermageEffect extends OneShotEffect { + + public RakdosAugermageEffect() { + super(Outcome.Discard); + staticText = "reveal your hand and discard a card of target opponent’s choice"; + } + + public RakdosAugermageEffect(final RakdosAugermageEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + Player controller = game.getPlayer(source.getControllerId()); + Card sourceCard = game.getCard(source.getSourceId()); + if (player != null && controller != null) { + Cards revealedCards = new CardsImpl(); + revealedCards.addAll(controller.getHand()); + player.revealCards((sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ") (" : "Discard (")+controller.getName()+")", revealedCards, game); + TargetCard target = new TargetCard(Zone.HAND, new FilterCard()); + if (player.choose(Outcome.Benefit, revealedCards, target, game)) { + Card card = revealedCards.get(target.getFirstTarget(), game); + if (card != null) { + return player.discard(card, source, game); + } + } + } + return false; + } + + @Override + public RakdosAugermageEffect copy() { + return new RakdosAugermageEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java b/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java new file mode 100644 index 0000000000..5af3ca5d8d --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RakdosRiteknife.java @@ -0,0 +1,103 @@ +package mage.cards.r; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.abilities.effects.common.SacrificeOpponentsEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.constants.*; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetControlledCreaturePermanent; + +import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; + +/** + * + * @author noahg + */ +public final class RakdosRiteknife extends CardImpl { + + public RakdosRiteknife(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+0 for each blood counter on Rakdos Riteknife and has "{T}, Sacrifice a creature: Put a blood counter on Rakdos Riteknife." + SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new CountersSourceCount(CounterType.BLOOD), new StaticValue(0)).setText("Equipped creature gets +1/+0 for each blood counter on {this}")); + SimpleActivatedAbility grantedAbility = new SimpleActivatedAbility(new RakdosRiteKnifeEffect(this.getId()), new TapSourceCost()); + grantedAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); + staticAbility.addEffect(new GainAbilityAttachedEffect(grantedAbility, AttachmentType.EQUIPMENT).setText("and has \"{T}, Sacrifice a creature: Put a blood counter on {this}.\"")); + this.addAbility(staticAbility); + + // {B}{R}, Sacrifice Rakdos Riteknife: Target player sacrifices a permanent for each blood counter on Rakdos Riteknife. + SimpleActivatedAbility activatedAbility = new SimpleActivatedAbility( + new SacrificeEffect(StaticFilters.FILTER_PERMANENT, new CountersSourceCount(CounterType.BLOOD), "Target player") + .setText("target player sacrifices a permanent for each blood counter on {this}"), new ManaCostsImpl("{R}{B}")); + activatedAbility.addCost(new SacrificeSourceCost()); + activatedAbility.addTarget(new TargetPlayer()); + this.addAbility(activatedAbility); + + // Equip {2} + this.addAbility(new EquipAbility(2)); + } + + public RakdosRiteknife(final RakdosRiteknife card) { + super(card); + } + + @Override + public RakdosRiteknife copy() { + return new RakdosRiteknife(this); + } +} + +class RakdosRiteKnifeEffect extends OneShotEffect { + + private UUID effectGivingEquipmentId; + + public RakdosRiteKnifeEffect(UUID effectGivingEquipmentId) { + super(Outcome.Benefit); + this.effectGivingEquipmentId = effectGivingEquipmentId; + staticText = "Put a blood counter on Rakdos Riteknife"; + } + + public RakdosRiteKnifeEffect(final RakdosRiteKnifeEffect effect) { + super(effect); + this.effectGivingEquipmentId = effect.effectGivingEquipmentId; + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent equipment = game.getPermanent(this.effectGivingEquipmentId); + if (equipment != null) { + equipment.addCounters(CounterType.BLOOD.createInstance(), source, game); + } + return true; + } + + @Override + public RakdosRiteKnifeEffect copy() { + return new RakdosRiteKnifeEffect(this); + } + + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java b/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java index 5b055cafe6..8820712bdb 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java +++ b/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class RampagingWerewolf extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Rampaging Werewolf. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java index c22f6e0af6..36a1b7cc43 100644 --- a/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java +++ b/Mage.Sets/src/mage/cards/r/RasputinDreamweaver.java @@ -13,7 +13,7 @@ import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.PreventDamageToSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.SimpleManaAbility; @@ -54,7 +54,7 @@ public final class RasputinDreamweaver extends CardImpl { // At the beginning of your upkeep, if Rasputin started the turn untapped, put a dream counter on it. this.addAbility( - new ConditionalTriggeredAbility( + new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.DREAM.createInstance()), TargetController.YOU, false), RasputinDreamweaverStartedUntappedCondition.instance, "At the beginning of your upkeep, if {this} started the turn untapped, put a dream counter on it."), diff --git a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java index 23fafd8cc5..c64031eef9 100644 --- a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java +++ b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java @@ -11,7 +11,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TrampleAbility; @@ -59,7 +59,7 @@ public final class RavagerOfTheFells extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ravager of the Fells. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE diff --git a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java index c822ffb01d..0e83f3b7fc 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java +++ b/Mage.Sets/src/mage/cards/r/RecklessBushwhacker.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.SurgedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.HasteAbility; @@ -47,7 +47,7 @@ public final class RecklessBushwhacker extends CardImpl { // When Reckless Bushwhacker enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn, true), false); ability.addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, FILTER, true)); - this.addAbility(new ConditionalTriggeredAbility(ability, SurgedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SurgedCondition.instance, "When {this} enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn.")); } diff --git a/Mage.Sets/src/mage/cards/r/RecklessWaif.java b/Mage.Sets/src/mage/cards/r/RecklessWaif.java index e471eebc41..04e5cca06c 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessWaif.java +++ b/Mage.Sets/src/mage/cards/r/RecklessWaif.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class RecklessWaif extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Reckless Waif. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public RecklessWaif(final RecklessWaif card) { diff --git a/Mage.Sets/src/mage/cards/r/ReclusiveWight.java b/Mage.Sets/src/mage/cards/r/ReclusiveWight.java index 82bf120cbe..01995437b1 100644 --- a/Mage.Sets/src/mage/cards/r/ReclusiveWight.java +++ b/Mage.Sets/src/mage/cards/r/ReclusiveWight.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -39,7 +39,7 @@ public final class ReclusiveWight extends CardImpl { this.toughness = new MageInt(4); // At the beginning of your upkeep, if you control another nonland permanent, sacrifice Reclusive Wight. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filter), "At the beginning of your upkeep, if you control another nonland permanent, sacrifice {this}." diff --git a/Mage.Sets/src/mage/cards/r/RefreshingRain.java b/Mage.Sets/src/mage/cards/r/RefreshingRain.java index 57fb9afe34..038c187b5a 100644 --- a/Mage.Sets/src/mage/cards/r/RefreshingRain.java +++ b/Mage.Sets/src/mage/cards/r/RefreshingRain.java @@ -33,7 +33,7 @@ public final class RefreshingRain extends CardImpl { public RefreshingRain(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}"); - // If an opponent controls a Swamp and you control a Forest, you may cast Refreshing Rain without paying its mana cost. + // If an opponent controls a Swamp and you control a Forest, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Swamp and you control a Forest", new OpponentControlsPermanentCondition(filterSwamp), new PermanentsOnTheBattlefieldCondition(filterForest)); diff --git a/Mage.Sets/src/mage/cards/r/RegalBloodlord.java b/Mage.Sets/src/mage/cards/r/RegalBloodlord.java index 8ef086d11f..5f12d0ffc6 100644 --- a/Mage.Sets/src/mage/cards/r/RegalBloodlord.java +++ b/Mage.Sets/src/mage/cards/r/RegalBloodlord.java @@ -4,7 +4,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.YouGainedLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.constants.SubType; import mage.abilities.keyword.FlyingAbility; @@ -34,7 +34,7 @@ public final class RegalBloodlord extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of each end step, if you gained life this turn, create a 1/1 black Bat creature token with flying. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility( new CreateTokenEffect(new BatToken()), TargetController.ANY, false diff --git a/Mage.Sets/src/mage/cards/r/RegnaTheRedeemer.java b/Mage.Sets/src/mage/cards/r/RegnaTheRedeemer.java index 591bd73cbe..12dd708519 100644 --- a/Mage.Sets/src/mage/cards/r/RegnaTheRedeemer.java +++ b/Mage.Sets/src/mage/cards/r/RegnaTheRedeemer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.IntCompareCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.constants.SubType; import mage.constants.SuperType; @@ -43,7 +43,7 @@ public final class RegnaTheRedeemer extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of each end step, if your team gained life this turn, create two 1/1 white Warrior creature tokens. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility( new CreateTokenEffect(new WarriorToken(), 2), TargetController.ANY, diff --git a/Mage.Sets/src/mage/cards/r/ReiverDemon.java b/Mage.Sets/src/mage/cards/r/ReiverDemon.java index 3f10b6aeed..fa048d0f34 100644 --- a/Mage.Sets/src/mage/cards/r/ReiverDemon.java +++ b/Mage.Sets/src/mage/cards/r/ReiverDemon.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class ReiverDemon extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Reiver Demon enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can't be regenerated. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter, true), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can't be regenerated."), diff --git a/Mage.Sets/src/mage/cards/r/RekindledFlame.java b/Mage.Sets/src/mage/cards/r/RekindledFlame.java index 4a0c0d8bf7..b294ef6821 100644 --- a/Mage.Sets/src/mage/cards/r/RekindledFlame.java +++ b/Mage.Sets/src/mage/cards/r/RekindledFlame.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class RekindledFlame extends CardImpl { this.getSpellAbility().addTarget(new TargetAnyTarget()); // At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true ), diff --git a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java index da05e35ea0..6c412dfcdb 100644 --- a/Mage.Sets/src/mage/cards/r/RenegadeRallier.java +++ b/Mage.Sets/src/mage/cards/r/RenegadeRallier.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -41,7 +41,7 @@ public final class RenegadeRallier extends CardImpl { // Revolt — When Renegade Rallier enters the battlefield, if a permanent you controlled left the battlefield this turn, // return target permanent card with converted mana cost 2 or less from your graveyard to your battlefield. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new ReturnFromGraveyardToBattlefieldTargetEffect(), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, return target permanent card with converted mana cost 2 or less from your graveyard to your battlefield."); diff --git a/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java index 5ea0c1d82e..eb2ca73672 100644 --- a/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java +++ b/Mage.Sets/src/mage/cards/r/ResplendentGriffin.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.CitysBlessingCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.AscendAbility; import mage.abilities.keyword.FlyingAbility; @@ -35,7 +35,7 @@ public final class ResplendentGriffin extends CardImpl { this.addAbility(new AscendAbility()); // Whenever Resplendent Griffin attacks, if you have the city's blessing, put a +1/+1 counter on it. - this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false), CitysBlessingCondition.instance, "Whenever {this} attacks, if you have the city's blessing, put a +1/+1 counter on it.")); } diff --git a/Mage.Sets/src/mage/cards/r/RevelInRiches.java b/Mage.Sets/src/mage/cards/r/RevelInRiches.java index 136ad97e5c..bdd47cd8c0 100644 --- a/Mage.Sets/src/mage/cards/r/RevelInRiches.java +++ b/Mage.Sets/src/mage/cards/r/RevelInRiches.java @@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; @@ -42,7 +42,7 @@ public final class RevelInRiches extends CardImpl { this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new TreasureToken("XLN")), false, filter)); // At the beginning of your upkeep, if you control ten or more Treasures, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 9), "At the beginning of your upkeep, if you control ten or more Treasures, you win the game.")); diff --git a/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java b/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java index c62f3cf1f9..50b1fd07e8 100644 --- a/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java +++ b/Mage.Sets/src/mage/cards/r/RevenantPatriarch.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.CantBlockAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SkipNextCombatEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -32,7 +32,7 @@ public final class RevenantPatriarch extends CardImpl { // When Revenant Patriarch enters the battlefield, if {W} was spent to cast it, target player skips their next combat phase. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SkipNextCombatEffect(), false); ability.addTarget(new TargetPlayer()); - this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.W), "if {W} was spent to cast it, target player skips their next combat phase."), new ManaSpentToCastWatcher()); // Revenant Patriarch can't block. this.addAbility(new CantBlockAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RhoxMeditant.java b/Mage.Sets/src/mage/cards/r/RhoxMeditant.java index 06b3b703ec..b089d90e15 100644 --- a/Mage.Sets/src/mage/cards/r/RhoxMeditant.java +++ b/Mage.Sets/src/mage/cards/r/RhoxMeditant.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,7 +40,7 @@ public final class RhoxMeditant extends CardImpl { // When Rhox Meditant enters the battlefield, if you control a green permanent, draw a card. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); } diff --git a/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java b/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java index 192863a23e..b22c0262b8 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java +++ b/Mage.Sets/src/mage/cards/r/RingOfEvosIsle.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; @@ -46,7 +46,7 @@ public final class RingOfEvosIsle extends CardImpl { // At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's blue. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddPlusOneCountersAttachedEffect(1), TargetController.YOU, false); - ConditionalTriggeredAbility ability2 = new ConditionalTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's blue."); + ConditionalInterveningIfTriggeredAbility ability2 = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's blue."); this.addAbility(ability2); // Equip {1} diff --git a/Mage.Sets/src/mage/cards/r/RingOfKalonia.java b/Mage.Sets/src/mage/cards/r/RingOfKalonia.java index 01ed42e9a0..e63365df30 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfKalonia.java +++ b/Mage.Sets/src/mage/cards/r/RingOfKalonia.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; @@ -40,7 +40,7 @@ public final class RingOfKalonia extends CardImpl { // At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's green. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddPlusOneCountersAttachedEffect(1), TargetController.YOU, false); - ConditionalTriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's green"); + ConditionalInterveningIfTriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's green"); this.addAbility(ability); // Equip {1} diff --git a/Mage.Sets/src/mage/cards/r/RingOfThune.java b/Mage.Sets/src/mage/cards/r/RingOfThune.java index f18f48f056..3b988e6c7e 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfThune.java +++ b/Mage.Sets/src/mage/cards/r/RingOfThune.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; @@ -40,7 +40,7 @@ public final class RingOfThune extends CardImpl { // At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's white. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddPlusOneCountersAttachedEffect(1), TargetController.YOU, false); - ConditionalTriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's white."); + ConditionalInterveningIfTriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's white."); this.addAbility(ability); // Equip {1} diff --git a/Mage.Sets/src/mage/cards/r/RingOfValkas.java b/Mage.Sets/src/mage/cards/r/RingOfValkas.java index 7ac3d446fa..c783b1ca99 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfValkas.java +++ b/Mage.Sets/src/mage/cards/r/RingOfValkas.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; @@ -40,7 +40,7 @@ public final class RingOfValkas extends CardImpl { // At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's red. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddPlusOneCountersAttachedEffect(1), TargetController.YOU, false); - ConditionalTriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's red"); + ConditionalInterveningIfTriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's red"); this.addAbility(ability); // Equip {1} diff --git a/Mage.Sets/src/mage/cards/r/RingOfXathrid.java b/Mage.Sets/src/mage/cards/r/RingOfXathrid.java index 907388c4f7..9f9dc5a277 100644 --- a/Mage.Sets/src/mage/cards/r/RingOfXathrid.java +++ b/Mage.Sets/src/mage/cards/r/RingOfXathrid.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.RegenerateAttachedEffect; import mage.abilities.effects.common.counter.AddPlusOneCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; @@ -39,7 +39,7 @@ public final class RingOfXathrid extends CardImpl { // At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's black. TriggeredAbility triggeredAbility = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddPlusOneCountersAttachedEffect(1), TargetController.YOU, false); - ConditionalTriggeredAbility ability = new ConditionalTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's black"); + ConditionalInterveningIfTriggeredAbility ability = new ConditionalInterveningIfTriggeredAbility(triggeredAbility, new AttachedToMatchesFilterCondition(filter), "At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's black"); this.addAbility(ability); // Equip {1} diff --git a/Mage.Sets/src/mage/cards/r/RocEgg.java b/Mage.Sets/src/mage/cards/r/RocEgg.java index b8c949457b..126df90a82 100644 --- a/Mage.Sets/src/mage/cards/r/RocEgg.java +++ b/Mage.Sets/src/mage/cards/r/RocEgg.java @@ -22,7 +22,7 @@ public final class RocEgg extends CardImpl { public RocEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); - this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.BIRD, SubType.EGG); this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RuinRaider.java b/Mage.Sets/src/mage/cards/r/RuinRaider.java index 0fa94bb55a..60ccfd7269 100644 --- a/Mage.Sets/src/mage/cards/r/RuinRaider.java +++ b/Mage.Sets/src/mage/cards/r/RuinRaider.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class RuinRaider extends CardImpl { this.toughness = new MageInt(2); // Raid — At the beginning of your end step, if you attacked with a creature this turn, reveal the top card of your library and put that card into your hand. You lose life equal to the card's converted mana cost. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new RuinRaiderEffect(), TargetController.YOU, false), RaidCondition.instance, "Raid — At the beginning of your end step, if you attacked with a creature this turn, " diff --git a/Mage.Sets/src/mage/cards/r/RukhEgg.java b/Mage.Sets/src/mage/cards/r/RukhEgg.java index 7d6c19cfb6..6cb6036d6e 100644 --- a/Mage.Sets/src/mage/cards/r/RukhEgg.java +++ b/Mage.Sets/src/mage/cards/r/RukhEgg.java @@ -23,7 +23,8 @@ public final class RukhEgg extends CardImpl { public RukhEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); - this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.BIRD, SubType.EGG); + this.power = new MageInt(0); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java index 82e5c65779..f80c8015a4 100644 --- a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java +++ b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class RushingTideZubera extends CardImpl { this.toughness = new MageInt(3); // When Rushing-Tide Zubera dies, if 4 or more damage was dealt to it this turn, draw three cards. - Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(3)), new RushingTideZuberaCondition(), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(3)), new RushingTideZuberaCondition(), "When {this} dies, if 4 or more damage was dealt to it this turn, draw three cards."); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RushwoodLegate.java b/Mage.Sets/src/mage/cards/r/RushwoodLegate.java index fa6cac12a7..6267bdf3d5 100644 --- a/Mage.Sets/src/mage/cards/r/RushwoodLegate.java +++ b/Mage.Sets/src/mage/cards/r/RushwoodLegate.java @@ -35,7 +35,7 @@ public final class RushwoodLegate extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // If an opponent controls an Island and you control a Forest, you may cast Rushwood Legate without paying its mana cost. + // If an opponent controls an Island and you control a Forest, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls an Island and you control a Forest", new OpponentControlsPermanentCondition(filterIsland), new PermanentsOnTheBattlefieldCondition(filterForest)); diff --git a/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java b/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java index 0b6dc15602..a11e4e7b26 100644 --- a/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java +++ b/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.FormidableCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TrampleAbility; @@ -32,7 +32,7 @@ public final class SabertoothOutrider extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Formidable — Whenever Sabertooth Outrider attacks, if creatures you control have total power 8 or greater, Sabertooth Outrider gains first strike until end of turn. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), false), FormidableCondition.instance, "Formidable — Whenever {this} attacks, if creatures you control have total power 8 or greater, {this} gains first strike until end of turn." diff --git a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java index 898fafa372..e2d5f375dd 100644 --- a/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java +++ b/Mage.Sets/src/mage/cards/s/SageOfAncientLore.java @@ -10,7 +10,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -55,7 +55,7 @@ public final class SageOfAncientLore extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Sage of Ancient Lore. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public SageOfAncientLore(final SageOfAncientLore card) { diff --git a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java index 936ca9e669..8fed936baa 100644 --- a/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java +++ b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java @@ -37,9 +37,9 @@ public final class SakashimaTheImpostor extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(1); - // You may have Sakashima the Impostor enter the battlefield as a copy of any creature on the battlefield, except its name is still Sakashima the Impostor, it's legendary in addition to its other types, and it gains "{2}{U}{U}: Return Sakashima the Impostor to its owner's hand at the beginning of the next end step." + // You may have Sakashima the Impostor enter the battlefield as a copy of any creature on the battlefield, except its name is Sakashima the Impostor, it's legendary in addition to its other types, and it has "{2}{U}{U}: Return Sakashima the Impostor to its owner's hand at the beginning of the next end step." Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new SakashimaTheImpostorApplier()); - effect.setText("as a copy of any creature on the battlefield, except its name is still Sakashima the Impostor, it's legendary in addition to its other types, and it gains \"{2}{U}{U}: Return {this} to its owner's hand at the beginning of the next end step.\""); + effect.setText("as a copy of any creature on the battlefield, except its name is Sakashima the Impostor, it's legendary in addition to its other types, and it has \"{2}{U}{U}: Return {this} to its owner's hand at the beginning of the next end step.\""); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/s/SandStrangler.java b/Mage.Sets/src/mage/cards/s/SandStrangler.java index 345e8df4a5..94f5abff92 100644 --- a/Mage.Sets/src/mage/cards/s/SandStrangler.java +++ b/Mage.Sets/src/mage/cards/s/SandStrangler.java @@ -8,7 +8,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.OrCondition; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -41,7 +41,7 @@ public final class SandStrangler extends CardImpl { this.toughness = new MageInt(3); // When Sand Strangler enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, you may have Sand Strangler deal 3 damage to target creature. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), true), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), diff --git a/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java b/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java index a61a55454a..c0d57d7e59 100644 --- a/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java +++ b/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java @@ -32,15 +32,14 @@ public final class SaprazzanLegate extends CardImpl { public SaprazzanLegate(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); - this.subtype.add(SubType.MERFOLK); - this.subtype.add(SubType.SOLDIER); + this.subtype.add(SubType.MERFOLK, SubType.SOLDIER); this.power = new MageInt(1); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - // If an opponent controls a Mountain and you control an Island, you may cast Saprazzan Legate without paying its mana cost. + // If an opponent controls a Mountain and you control an Island, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Mountain and you control an Island", new OpponentControlsPermanentCondition(filterMountain), new PermanentsOnTheBattlefieldCondition(filterIsland)); diff --git a/Mage.Sets/src/mage/cards/s/Sarcomancy.java b/Mage.Sets/src/mage/cards/s/Sarcomancy.java index 0a90843240..92003a9241 100644 --- a/Mage.Sets/src/mage/cards/s/Sarcomancy.java +++ b/Mage.Sets/src/mage/cards/s/Sarcomancy.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DamageControllerEffect; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class Sarcomancy extends CardImpl { // When Sarcomancy enters the battlefield, create a 2/2 black Zombie creature token. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken(), 1), false)); // At the beginning of your upkeep, if there are no Zombies on the battlefield, Sarcomancy deals 1 damage to you. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageControllerEffect(1), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(new FilterPermanent(SubType.ZOMBIE, "Zombies"), ComparisonType.EQUAL_TO, 0, false), "At the beginning of your upkeep, if there are no Zombies on the battlefield, {this} deals 1 damage to you.")); diff --git a/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java b/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java index 548fd4b9e7..565bbd7c7e 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java @@ -45,9 +45,14 @@ public final class SarkhanDragonsoul extends CardImpl { .setText("and each creature your opponents control") ); + this.addAbility(ability); + + // −3: Sarkhan, Dragonsoul deals 4 damage to target player or planeswalker. - ability = new LoyaltyAbility(new DamageTargetEffect(4), -3); - ability.addTarget(new TargetPlayerOrPlaneswalker()); + Ability ability2 = new LoyaltyAbility(new DamageTargetEffect(4), -3); + ability2.addTarget(new TargetPlayerOrPlaneswalker()); + + this.addAbility(ability2); // −9: Search your library for any number of Dragon creature cards, put them onto the battlefield, then shuffle your library. this.addAbility(new LoyaltyAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, Integer.MAX_VALUE, filter)), -9)); diff --git a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java index acfe61d497..0d7f4450b6 100644 --- a/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java @@ -6,7 +6,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class SaruliGatekeepers extends CardImpl { this.toughness = new MageInt(4); // When Saruli Gatekeepers enters the battlefield, if you control two or more Gates, gain 7 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(7)), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), "When {this} enters the battlefield, if you control two or more Gates, gain 7 life.")); diff --git a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java index 736671801e..a0c259a67b 100644 --- a/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java +++ b/Mage.Sets/src/mage/cards/s/ScabClanBerserker.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.condition.common.RenownedSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.HasteAbility; @@ -40,7 +40,7 @@ public final class ScabClanBerserker extends CardImpl { this.addAbility(new RenownAbility(1)); // Whenever an opponent casts a noncreature spell, if Scab-Clan Berserker is renowned, Scab-Clan Berserker deals 2 damage to that player. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new ScabClanBerserkerTriggeredAbility(), RenownedSourceCondition.instance, "Whenever an opponent casts a noncreature spell, if Scab-Clan Berserker is renowned, Scab-Clan Berserker deals 2 damage to that player")); diff --git a/Mage.Sets/src/mage/cards/s/ScaldingTongs.java b/Mage.Sets/src/mage/cards/s/ScaldingTongs.java index e1ccd9d088..b009f6aa4b 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingTongs.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingTongs.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +27,7 @@ public final class ScaldingTongs extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.YOU, false); ability.addTarget(new TargetOpponentOrPlaneswalker()); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 4); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, condition, "At the beginning of your upkeep, if you have three or fewer cards in hand, " + "{this} deals 1 damage to target opponent or planeswalker." diff --git a/Mage.Sets/src/mage/cards/s/ScholarOfStars.java b/Mage.Sets/src/mage/cards/s/ScholarOfStars.java index 3c436550e7..459b6d7825 100644 --- a/Mage.Sets/src/mage/cards/s/ScholarOfStars.java +++ b/Mage.Sets/src/mage/cards/s/ScholarOfStars.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class ScholarOfStars extends CardImpl { this.toughness = new MageInt(2); // When Scholar of Stars enters the battlefield, if you control an artifact, draw a card. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT), "When {this} enters the battlefield, if you control an artifact, draw a card." diff --git a/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java b/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java index 3001ef6568..35d37c2cee 100644 --- a/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java +++ b/Mage.Sets/src/mage/cards/s/ScionOfVituGhazi.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.PopulateEffect; import mage.cards.CardImpl; @@ -29,9 +29,10 @@ public final class ScionOfVituGhazi extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); + //When Scion of Vitu-Ghazi enters the battlefield, if you cast it from your hand, create a 1/1 white Bird creature token with flying, then populate. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BirdToken()), false); ability.addEffect(new PopulateEffect("then")); - this.addAbility(new ConditionalTriggeredAbility(ability, CastFromHandSourceCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, create a 1/1 white Bird creature token with flying, then populate."), new CastFromHandWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/ScornedVillager.java b/Mage.Sets/src/mage/cards/s/ScornedVillager.java index 74ffb0a4a3..87ba993c59 100644 --- a/Mage.Sets/src/mage/cards/s/ScornedVillager.java +++ b/Mage.Sets/src/mage/cards/s/ScornedVillager.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.abilities.mana.GreenManaAbility; @@ -39,7 +39,7 @@ public final class ScornedVillager extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Scorned Villager. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java b/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java index ee2e29ab12..ab0fe7c32f 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfTheThrone.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.AttacksFirstTimeTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.AdditionalCombatPhaseEffect; import mage.abilities.effects.common.UntapAllControllerEffect; import mage.abilities.keyword.DethroneAbility; @@ -45,7 +45,7 @@ public final class ScourgeOfTheThrone extends CardImpl { ), false ); ability.addEffect(new AdditionalCombatPhaseEffect()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, ScourgeOfTheThroneCondition.instance, "Whenever {this} attacks for the first time each turn, " diff --git a/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java b/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java index 5f8e08f58c..544612e3fd 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingSilcaw.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.MetalcraftCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -31,7 +31,8 @@ public final class ScreechingSilcaw extends CardImpl { this.addAbility(FlyingAbility.getInstance()); - TriggeredAbility conditional = new ConditionalTriggeredAbility( + //"Metalcraft - Whenever Screeching Silcaw deals combat damage to a player, if you control three or more artifacts, that player puts the top four cards of their library into their graveyard. + TriggeredAbility conditional = new ConditionalInterveningIfTriggeredAbility( new DealsCombatDamageToAPlayerTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false, true), MetalcraftCondition.instance, text); this.addAbility(conditional); diff --git a/Mage.Sets/src/mage/cards/s/SecondChance.java b/Mage.Sets/src/mage/cards/s/SecondChance.java index dd82b15e41..8fdc60199d 100644 --- a/Mage.Sets/src/mage/cards/s/SecondChance.java +++ b/Mage.Sets/src/mage/cards/s/SecondChance.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.XorLessLifeCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.turn.AddExtraTurnControllerEffect; import mage.cards.CardImpl; @@ -27,7 +27,7 @@ public final class SecondChance extends CardImpl { // At the beginning of your upkeep, if you have 5 or less life, sacrifice Second Chance and take an extra turn after this one. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, false); ability.addEffect(new AddExtraTurnControllerEffect()); - this.addAbility(new ConditionalTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, sacrifice {this} and take an extra turn after this one")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, sacrifice {this} and take an extra turn after this one")); } diff --git a/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java b/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java index cf9d71ff69..5ea609409f 100644 --- a/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java +++ b/Mage.Sets/src/mage/cards/s/SedraxisAlchemist.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -42,7 +42,7 @@ public final class SedraxisAlchemist extends CardImpl { // When Sedraxis Alchemist enters the battlefield, if you control a blue permanent, return target nonland permanent to its owner's hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); ability.addTarget(new TargetNonlandPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), rule)); } diff --git a/Mage.Sets/src/mage/cards/s/SeeRed.java b/Mage.Sets/src/mage/cards/s/SeeRed.java index 2f67b7eeb9..c74b3dd096 100644 --- a/Mage.Sets/src/mage/cards/s/SeeRed.java +++ b/Mage.Sets/src/mage/cards/s/SeeRed.java @@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.ControllerAttackedThisTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -54,7 +54,7 @@ public final class SeeRed extends CardImpl { this.addAbility(ability); // At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice See Red. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU), new InvertCondition(ControllerAttackedThisTurnCondition.instance), "At the beginning of your end step, if you didn't attack with a creature this turn, sacrifice {this}."), new AttackedThisTurnWatcher()); diff --git a/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java b/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java index 3855bb3394..5cec078a86 100644 --- a/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java +++ b/Mage.Sets/src/mage/cards/s/SelkieHedgeMage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; @@ -49,11 +49,11 @@ public final class SelkieHedgeMage extends CardImpl { this.toughness = new MageInt(2); // When Selkie Hedge-Mage enters the battlefield, if you control two or more Forests, you may gain 3 life. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); this.addAbility(ability); // When Selkie Hedge-Mage enters the battlefield, if you control two or more Islands, you may return target tapped creature to its owner's hand. - Ability ability2 = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); + Ability ability2 = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true), new PermanentsOnTheBattlefieldCondition(filter2, ComparisonType.MORE_THAN, 1), rule2); ability2.addTarget(new TargetPermanent(filter3)); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java b/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java index dec16b639b..3df0a4f7f8 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java +++ b/Mage.Sets/src/mage/cards/s/ShadowbornDemon.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.keyword.FlyingAbility; @@ -55,7 +55,7 @@ public final class ShadowbornDemon extends CardImpl { this.addAbility(ability); // At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, ""), TargetController.YOU, false), new InvertCondition(new CreatureCardsInControllerGraveCondition(6)), "At the beginning of your upkeep, if there are fewer than six creature cards in your graveyard, sacrifice a creature")); diff --git a/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java new file mode 100644 index 0000000000..3e33b199b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java @@ -0,0 +1,133 @@ +package mage.cards.s; + +import java.util.*; + +import mage.MageObjectReference; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.effects.common.counter.RemoveCountersAttachedEffect; +import mage.constants.*; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.effects.common.AttachEffect; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.watchers.Watcher; + +/** + * + * @author noahg + */ +public final class ShapeOfTheWiitigo extends CardImpl { + + public ShapeOfTheWiitigo(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When Shape of the Wiitigo enters the battlefield, put six +1/+1 counters on enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(6), "enchanted creature"))); + + // At the beginning of your upkeep, put a +1/+1 counter on enchanted creature if it attacked or blocked since your last upkeep. Otherwise, remove a +1/+1 counter from it. + Ability triggeredAbility = new BeginningOfUpkeepTriggeredAbility( + new ConditionalOneShotEffect(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(1), "enchanted creature"), + new RemoveCountersAttachedEffect(CounterType.P1P1.createInstance(1), "it"), + new AttachedAttackedOrBlockedSinceYourLastUpkeepCondition(), + "put a +1/+1 counter on enchanted creature if it attacked or blocked since your last " + + "upkeep. Otherwise, remove a +1/+1 counter from it"), TargetController.YOU, false); + triggeredAbility.addWatcher(new AttackedOrBlockedSinceYourLastUpkeepWatcher()); + this.addAbility(triggeredAbility); + } + + public ShapeOfTheWiitigo(final ShapeOfTheWiitigo card) { + super(card); + } + + @Override + public ShapeOfTheWiitigo copy() { + return new ShapeOfTheWiitigo(this); + } +} + +class AttachedAttackedOrBlockedSinceYourLastUpkeepCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + AttackedOrBlockedSinceYourLastUpkeepWatcher watcher = (AttackedOrBlockedSinceYourLastUpkeepWatcher) game.getState().getWatchers().get(AttackedOrBlockedSinceYourLastUpkeepWatcher.class.getSimpleName()); + if (permanent != null && permanent.getAttachedTo() != null && watcher != null) { + Permanent attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + if (attachedTo == null) { + attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); + } + if (attachedTo != null) { + return watcher.attackedSinceLastUpkeep(new MageObjectReference(attachedTo.getId(), attachedTo.getZoneChangeCounter(game), game), source.getControllerId()); + } + } + return false; + } + + @Override + public String toString() { + return "it attacked or blocked since your last upkeep"; + } +} + +class AttackedOrBlockedSinceYourLastUpkeepWatcher extends Watcher{ + + //Map of each player to the creatures that attacked or blocked since their last upkeep + private final Map> attackedOrBlockedCreatures = new HashMap<>(); + + public AttackedOrBlockedSinceYourLastUpkeepWatcher() { + super(AttackedOrBlockedSinceYourLastUpkeepWatcher.class.getSimpleName(), WatcherScope.GAME); + } + + public AttackedOrBlockedSinceYourLastUpkeepWatcher(AttackedOrBlockedSinceYourLastUpkeepWatcher watcher) { + super(watcher); + for (Map.Entry> entry : watcher.attackedOrBlockedCreatures.entrySet()) { + Set allAttackersCopy = new HashSet<>(entry.getValue()); + attackedOrBlockedCreatures.put(entry.getKey(), allAttackersCopy); + } + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.UPKEEP_STEP_POST){ + //Clear + attackedOrBlockedCreatures.put(event.getPlayerId(), new HashSet<>()); + } else if (event.getType() == GameEvent.EventType.ATTACKER_DECLARED || event.getType() == GameEvent.EventType.BLOCKER_DECLARED) { + MageObjectReference mor = new MageObjectReference(event.getSourceId(), game); + for (UUID player : game.getPlayerList()){ + if (!attackedOrBlockedCreatures.containsKey(player)) { + attackedOrBlockedCreatures.put(player, new HashSet<>()); + } + attackedOrBlockedCreatures.get(player).add(mor); + } + } + } + + public boolean attackedSinceLastUpkeep(MageObjectReference mor, UUID upkeepPlayer){ + return attackedOrBlockedCreatures.get(upkeepPlayer).contains(mor); + } + + @Override + public AttackedOrBlockedSinceYourLastUpkeepWatcher copy() { + return new AttackedOrBlockedSinceYourLastUpkeepWatcher(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java index 17765b3776..03ae7cef4b 100644 --- a/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java +++ b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -29,7 +29,7 @@ public final class ShipwreckLooter extends CardImpl { this.toughness = new MageInt(1); // Raid - When Shipwreck Looter enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, you may draw a card. If you do, discard a card."); diff --git a/Mage.Sets/src/mage/cards/s/ShivanEmissary.java b/Mage.Sets/src/mage/cards/s/ShivanEmissary.java index 1015ea205b..ca39be1312 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanEmissary.java +++ b/Mage.Sets/src/mage/cards/s/ShivanEmissary.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -44,7 +44,7 @@ public final class ShivanEmissary extends CardImpl { // When Shivan Emissary enters the battlefield, if it was kicked, destroy target nonblack creature. It can't be regenerated. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true)); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target nonblack creature. It can't be regenerated.")); } diff --git a/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java b/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java index 1c82c15245..3ff22606e0 100644 --- a/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java +++ b/Mage.Sets/src/mage/cards/s/ShorelineSalvager.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class ShorelineSalvager extends CardImpl { this.toughness = new MageInt(3); // Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card. - this.addAbility(new ConditionalTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true), new PermanentsOnTheBattlefieldCondition(filter), rule)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true), new PermanentsOnTheBattlefieldCondition(filter), rule)); } public ShorelineSalvager(final ShorelineSalvager card) { diff --git a/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java b/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java index f1e30ff4e4..4cc23ef06a 100644 --- a/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java +++ b/Mage.Sets/src/mage/cards/s/ShriekingGrotesque.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class ShriekingGrotesque extends CardImpl { // When Shrieking Grotesque enters the battlefield, if {B} was spent to cast it, target player discards a card. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1), false); ability.addTarget(new TargetPlayer()); - this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.B), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.B), "if {B} was spent to cast {this}, target player discards a card."), new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java b/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java index ed1f7861a6..7c3527181c 100644 --- a/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java +++ b/Mage.Sets/src/mage/cards/s/ShrikeHarpy.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.TributeAbility; @@ -37,7 +37,7 @@ public final class ShrikeHarpy extends CardImpl { // When Shrike Harpy enters the battlefield, if tribute wasn't paid, target opponent sacrifices a creature. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new SacrificeEffect(new FilterCreaturePermanent("a creature"), 1, "target opponent"), false); ability.addTarget(new TargetOpponent()); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, target opponent sacrifices a creature.")); } diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfBoundlessGrowth.java b/Mage.Sets/src/mage/cards/s/ShrineOfBoundlessGrowth.java index 21a00c8646..1ab6e27212 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfBoundlessGrowth.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfBoundlessGrowth.java @@ -13,10 +13,12 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.mana.DynamicManaAbility; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; +import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -37,8 +39,9 @@ public final class ShrineOfBoundlessGrowth extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); // At the beginning of your upkeep or whenever you cast a green spell, put a charge counter on Shrine of Boundless Growth. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false)); - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new SpellCastControllerTriggeredAbility(null, filter, false))); // {T}, Sacrifice Shrine of Boundless Growth: Add {C} for each charge counter on Shrine of Boundless Growth. Ability ability = new DynamicManaAbility(Mana.ColorlessMana(1), new CountersSourceCount(CounterType.CHARGE), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java b/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java index 53e4b55e3e..c69fa38694 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java @@ -14,6 +14,7 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -37,8 +38,13 @@ public final class ShrineOfBurningRage extends CardImpl { public ShrineOfBurningRage (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false)); - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); + + //At the beginning of your upkeep or whenever you cast a red spell, put a charge counter on Shrine of Burning Rage. + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new SpellCastControllerTriggeredAbility(null, filter, false))); + + //{3}, {T}, Sacrifice Shrine of Burning Rage: It deals damage equal to the number of charge counters on it to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfLimitlessPower.java b/Mage.Sets/src/mage/cards/s/ShrineOfLimitlessPower.java index c16b7b9a53..2158542603 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfLimitlessPower.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfLimitlessPower.java @@ -13,6 +13,7 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -38,9 +39,12 @@ public final class ShrineOfLimitlessPower extends CardImpl { public ShrineOfLimitlessPower(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false)); - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); + //At the beginning of your upkeep or whenever you cast a black spell, put a charge counter on Shrine of Limitless Power. + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new SpellCastControllerTriggeredAbility(null, filter, false))); + //{4}, {T}, Sacrifice Shrine of Limitless Power: Target player discards a card for each charge counter on Shrine of Limitless Power. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DiscardTargetEffect(new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(4)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfLoyalLegions.java b/Mage.Sets/src/mage/cards/s/ShrineOfLoyalLegions.java index 77c8747654..496428e76f 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfLoyalLegions.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfLoyalLegions.java @@ -13,6 +13,7 @@ import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -38,9 +39,12 @@ public final class ShrineOfLoyalLegions extends CardImpl { public ShrineOfLoyalLegions(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false)); - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); + //At the beginning of your upkeep or whenever you cast a white spell, put a charge counter on Shrine of Loyal Legions. + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new SpellCastControllerTriggeredAbility(null, filter, false))); + //{3}, {T}, Sacrifice Shrine of Loyal Legions: Create a 1/1 colorless Myr artifact creature token for each charge counter on Shrine of Loyal Legions. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new MyrToken("NPH"), new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(3)); diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfPiercingVision.java b/Mage.Sets/src/mage/cards/s/ShrineOfPiercingVision.java index 142899a0de..1288738d32 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfPiercingVision.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfPiercingVision.java @@ -11,6 +11,7 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -45,8 +46,10 @@ public final class ShrineOfPiercingVision extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // At the beginning of your upkeep or whenever you cast a blue spell, put a charge counter on Shrine of Piercing Vision. - this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), TargetController.YOU, false)); - this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), filter, false)); + this.addAbility(new OrTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), + new BeginningOfUpkeepTriggeredAbility(null, TargetController.YOU, false), + new SpellCastControllerTriggeredAbility(null, filter, false))); + // {tap}, Sacrifice Shrine of Piercing Vision: Look at the top X cards of your library, where X is the number of charge counters on Shrine of Piercing Vision. // Put one of those cards into your hand and the rest on the bottom of your library in any order. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShrineOfPiercingVisionEffect(), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/SickleDancer.java b/Mage.Sets/src/mage/cards/s/SickleDancer.java index 3275d6c93e..ec80b693b9 100644 --- a/Mage.Sets/src/mage/cards/s/SickleDancer.java +++ b/Mage.Sets/src/mage/cards/s/SickleDancer.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class SickleDancer extends CardImpl { this.toughness = new MageInt(2); // Whenever Sickle Dancer attacks, if your team controls another Warrior, Sickle Dancer gets +1/+1 until end of turn. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false), new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks, if your team controls another Warrior, {this} gets +1/+1 until end of turn." diff --git a/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java b/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java index 2eaaafa573..96675daffa 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java +++ b/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java @@ -3,19 +3,21 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.DamageAsThoughNotBlockedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.SourceAttackingCondition; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.HexproofAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; /** * @@ -34,15 +36,9 @@ public final class SiegeBehemoth extends CardImpl { // Hexproof this.addAbility(HexproofAbility.getInstance()); + // As long as Siege Behemoth is attacking, for each creature you control, you may have that creature assign its combat damage as though it weren't blocked. - // TODO: DamageAsThoughNotBlockedAbility should be done by rule modifying effect instead of adding ability (if controlled creature looses all abilities it should'nt loose this effect) - this.addAbility(new SimpleStaticAbility( - Zone.BATTLEFIELD, - new ConditionalContinuousEffect( - new GainAbilityControlledEffect(DamageAsThoughNotBlockedAbility.getInstance(), Duration.WhileOnBattlefield, filter), - SourceAttackingCondition.instance, - "As long as {this} is attacking, for each creature you control, you may have that creature assign its combat damage as though it weren't blocked" - ))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SiegeBehemothEffect())); } public SiegeBehemoth(final SiegeBehemoth card) { @@ -54,3 +50,39 @@ public final class SiegeBehemoth extends CardImpl { return new SiegeBehemoth(this); } } + +class SiegeBehemothEffect extends AsThoughEffectImpl { + + public SiegeBehemothEffect() { + super(AsThoughEffectType.DAMAGE_NOT_BLOCKED, Duration.WhileOnBattlefield, Outcome.Damage); + this.staticText = "As long as {this} is attacking, for each creature you control, you may have that creature assign its combat damage as though it weren't blocked"; + } + + public SiegeBehemothEffect(SiegeBehemothEffect effect) { + super(effect); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game); + if (sourcePermanent != null && sourcePermanent.isAttacking()){ + Player controller = game.getPlayer(source.getControllerId()); + Permanent otherCreature = game.getPermanent(sourceId); + if (controller != null && otherCreature != null && otherCreature.isControlledBy(controller.getId())){ + return controller.chooseUse(Outcome.Damage, "Do you wish to assign damage for " + + otherCreature.getLogName() + " as though it weren't blocked?", source, game); + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public SiegeBehemothEffect copy() { + return new SiegeBehemothEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SilkweaverElite.java b/Mage.Sets/src/mage/cards/s/SilkweaverElite.java index 880d19a826..916511fc09 100644 --- a/Mage.Sets/src/mage/cards/s/SilkweaverElite.java +++ b/Mage.Sets/src/mage/cards/s/SilkweaverElite.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.ReachAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class SilkweaverElite extends CardImpl { this.addAbility(ReachAbility.getInstance()); // Revolt — When Silkweaver Elite enters the battlefield, if a permanent you controlled left the battlefield this turn, draw a card. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new DrawCardSourceControllerEffect(1), false), RevoltCondition.instance, "Revolt — When {this} enters the battlefield, if a permanent you controlled left" + " the battlefield this turn, draw a card."); diff --git a/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java b/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java index f45ff2d406..ec7a60aae0 100644 --- a/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java +++ b/Mage.Sets/src/mage/cards/s/SilverpeltWerewolf.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -39,7 +39,7 @@ public final class SilverpeltWerewolf extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Silverpelt Werewolf. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public SilverpeltWerewolf(final SilverpeltWerewolf card) { diff --git a/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java b/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java index 6b3710f789..d2f8485fec 100644 --- a/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java +++ b/Mage.Sets/src/mage/cards/s/SirenOfTheFangedCoast.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.TributeAbility; @@ -37,7 +37,7 @@ public final class SirenOfTheFangedCoast extends CardImpl { // When Siren of the Fanged Coast enters the battlefield, if tribute wasn't paid, gain control of target creature. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfGame, true), false); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, gain control of target creature.")); } diff --git a/Mage.Sets/src/mage/cards/s/SithAssassin.java b/Mage.Sets/src/mage/cards/s/SithAssassin.java index d348657ec7..322dc5e1d9 100644 --- a/Mage.Sets/src/mage/cards/s/SithAssassin.java +++ b/Mage.Sets/src/mage/cards/s/SithAssassin.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,7 +39,7 @@ public final class SithAssassin extends CardImpl { this.toughness = new MageInt(2); // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, you may destroy target nonblack creature. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), true), HateCondition.instance, "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, you may destroy target nonblack creature."); diff --git a/Mage.Sets/src/mage/cards/s/SithInquisitor.java b/Mage.Sets/src/mage/cards/s/SithInquisitor.java index 978fac9b6b..36da957437 100644 --- a/Mage.Sets/src/mage/cards/s/SithInquisitor.java +++ b/Mage.Sets/src/mage/cards/s/SithInquisitor.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class SithInquisitor extends CardImpl { this.toughness = new MageInt(1); // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, target player discard a card at random. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1, true)), HateCondition.instance, "Hate — When {this} enters the battlefield, if an opponent lost life from a source other then combat damage this turn, target player discard a card at random."); diff --git a/Mage.Sets/src/mage/cards/s/SithMagic.java b/Mage.Sets/src/mage/cards/s/SithMagic.java index 1913a8220c..a45c756976 100644 --- a/Mage.Sets/src/mage/cards/s/SithMagic.java +++ b/Mage.Sets/src/mage/cards/s/SithMagic.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.ReplacementEffectImpl; @@ -46,7 +46,7 @@ public final class SithMagic extends CardImpl { // Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield. TriggeredAbility triggeredAbility = new BeginningOfCombatTriggeredAbility(new SithMagicEffect(), TargetController.ANY, true); triggeredAbility.addEffect(new SithMagicReplacementEffect()); - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( triggeredAbility, HateCondition.instance, "Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield."); diff --git a/Mage.Sets/src/mage/cards/s/SithManipulator.java b/Mage.Sets/src/mage/cards/s/SithManipulator.java index 3baf0f1b9b..e115e43cdd 100644 --- a/Mage.Sets/src/mage/cards/s/SithManipulator.java +++ b/Mage.Sets/src/mage/cards/s/SithManipulator.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToLibraryPermanentEffect; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class SithManipulator extends CardImpl { this.toughness = new MageInt(2); // When Sith Manipulator enters the battlefield, return target creature to its owner's hand. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), new InvertCondition(HateCondition.instance), "When Sith Manipulator enters the battlefield, return target creature to its owner's hand"); @@ -39,7 +39,7 @@ public final class SithManipulator extends CardImpl { this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); // Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead. - ability = new ConditionalTriggeredAbility( + ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToLibraryPermanentEffect(true)), HateCondition.instance, "Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead"); diff --git a/Mage.Sets/src/mage/cards/s/SithMarauder.java b/Mage.Sets/src/mage/cards/s/SithMarauder.java index db64255463..9ccbb83b4e 100644 --- a/Mage.Sets/src/mage/cards/s/SithMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SithMarauder.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class SithMarauder extends CardImpl { this.toughness = new MageInt(4); // Hate — When Sith Marauder enters the battlefield, if an opponent lost life from a source other than combat damage this turn, Sith Marauder deals 3 damage to any target. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)), HateCondition.instance, "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to any target"); diff --git a/Mage.Sets/src/mage/cards/s/SithMindseer.java b/Mage.Sets/src/mage/cards/s/SithMindseer.java index 0bc20aed3c..74a76a635f 100644 --- a/Mage.Sets/src/mage/cards/s/SithMindseer.java +++ b/Mage.Sets/src/mage/cards/s/SithMindseer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class SithMindseer extends CardImpl { this.toughness = new MageInt(3); // Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.WhileOnBattlefield)), HateCondition.instance, "Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield."); diff --git a/Mage.Sets/src/mage/cards/s/SithSorcerer.java b/Mage.Sets/src/mage/cards/s/SithSorcerer.java index 939bf2013a..6aeea2a8ba 100644 --- a/Mage.Sets/src/mage/cards/s/SithSorcerer.java +++ b/Mage.Sets/src/mage/cards/s/SithSorcerer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.HateCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class SithSorcerer extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2))); // Hate — When Sith Assassin enters the battlefield, if opponent lost life from source other than combat damage this turn, draw a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), HateCondition.instance, "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, draw a card."); diff --git a/Mage.Sets/src/mage/cards/s/SivvisRuse.java b/Mage.Sets/src/mage/cards/s/SivvisRuse.java index 96368787a7..0ebc135c69 100644 --- a/Mage.Sets/src/mage/cards/s/SivvisRuse.java +++ b/Mage.Sets/src/mage/cards/s/SivvisRuse.java @@ -34,7 +34,7 @@ public final class SivvisRuse extends CardImpl { public SivvisRuse(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{W}"); - // If an opponent controls a Mountain and you control a Plains, you may cast Sivvi's Ruse without paying its mana cost. + // If an opponent controls a Mountain and you control a Plains, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Mountain and you control a Plains", new OpponentControlsPermanentCondition(filterMountain), new PermanentsOnTheBattlefieldCondition(filterPlains)); diff --git a/Mage.Sets/src/mage/cards/s/SkylineDespot.java b/Mage.Sets/src/mage/cards/s/SkylineDespot.java index 3dcb09c97b..6746688b0a 100644 --- a/Mage.Sets/src/mage/cards/s/SkylineDespot.java +++ b/Mage.Sets/src/mage/cards/s/SkylineDespot.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MonarchIsSourceControllerCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.BecomesMonarchSourceEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; @@ -37,7 +37,7 @@ public final class SkylineDespot extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect(), false)); // At the beginning of your upkeep, if you're the monarch, put a 5/5 red Dragon creature token with flying onto the battlefield. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DragonToken2()), TargetController.YOU, false), MonarchIsSourceControllerCondition.instance, "At the beginning of your upkeep, if you're the monarch, put a 5/5 red Dragon creature token with flying onto the battlefield.")); diff --git a/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java b/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java index 53ef0de512..b68d8d3a68 100644 --- a/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java +++ b/Mage.Sets/src/mage/cards/s/SlaughterhouseBouncer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.common.HellbentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class SlaughterhouseBouncer extends CardImpl { this.toughness = new MageInt(3); // Hellbent - When Slaughterhouse Bouncer dies, if you have no cards in hand, target creature gets -3/-3 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new DiesTriggeredAbility(new BoostTargetEffect(-3, -3, Duration.EndOfTurn)), HellbentCondition.instance, "When {this} dies, if you have no cards in hand, target creature gets -3/-3 until end of turn." diff --git a/Mage.Sets/src/mage/cards/s/SlinnVodaTheRisingDeep.java b/Mage.Sets/src/mage/cards/s/SlinnVodaTheRisingDeep.java index d3c8095860..7a2cbd6948 100644 --- a/Mage.Sets/src/mage/cards/s/SlinnVodaTheRisingDeep.java +++ b/Mage.Sets/src/mage/cards/s/SlinnVodaTheRisingDeep.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -48,7 +48,7 @@ public final class SlinnVodaTheRisingDeep extends CardImpl { this.addAbility(new KickerAbility("{1}{U}")); // When Slinn Voda, the Rising Deep enters the battlefield, if it was kicked, return all creatures to their owners' hands except for Merfolk, Krakens, Leviathans, Octopuses, and Serpents. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)), KickedCondition.instance, "when {this} enters the battlefield, if it was kicked, " diff --git a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java index fea07807db..e607e3faf6 100644 --- a/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SmeltWardGatekeepers.java @@ -7,7 +7,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -46,7 +46,7 @@ public final class SmeltWardGatekeepers extends CardImpl { this.toughness = new MageInt(4); // When Smelt-Ward Gatekeepers enters the battlefield, if you control two or more Gates, gain control of target creature an opponent controls until end of turn. Untap that creature. That creature gains haste until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn)), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), "When {this} enters the battlefield, if you control two or more Gates, gain control of target creature an opponent controls until end of turn. Untap that creature. That creature gains haste until end of turn."); diff --git a/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java b/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java index 611eee6e94..be18600eaf 100644 --- a/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java +++ b/Mage.Sets/src/mage/cards/s/SnakeOfTheGoldenGrove.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.TributeAbility; import mage.cards.CardImpl; @@ -31,7 +31,7 @@ public final class SnakeOfTheGoldenGrove extends CardImpl { this.addAbility(new TributeAbility(3)); // When Snake of the Golden Grove enters the battlefield, if tribute wasn't paid, you gain 4 life. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4), false); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, you gain 4 life.")); } diff --git a/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java b/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java index 50d3947047..dbe3caa7a9 100644 --- a/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java +++ b/Mage.Sets/src/mage/cards/s/SokenzanRenegade.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainControlTargetEffect; @@ -42,7 +42,7 @@ public final class SokenzanRenegade extends CardImpl { // Bushido 1 this.addAbility(new BushidoAbility(1)); // At the beginning of your upkeep, if a player has more cards in hand than each other player, the player who has the most cards in hand gains control of Sokenzan Renegade. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SokenzanRenegadeEffect(), TargetController.YOU, false), OnePlayerHasTheMostCards.instance, "At the beginning of your upkeep, if a player has more cards in hand than each other player, the player who has the most cards in hand gains control of {this}" diff --git a/Mage.Sets/src/mage/cards/s/SolemnRecruit.java b/Mage.Sets/src/mage/cards/s/SolemnRecruit.java index 75a4d4f5b3..ba5ae0e00c 100644 --- a/Mage.Sets/src/mage/cards/s/SolemnRecruit.java +++ b/Mage.Sets/src/mage/cards/s/SolemnRecruit.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.DoubleStrikeAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class SolemnRecruit extends CardImpl { this.addAbility(DoubleStrikeAbility.getInstance()); // Revolt — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a +1/+1 counter on Solemn Recruit. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfYourEndStepTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false diff --git a/Mage.Sets/src/mage/cards/s/SolitaryHunter.java b/Mage.Sets/src/mage/cards/s/SolitaryHunter.java index fd0868745e..917b5e1e71 100644 --- a/Mage.Sets/src/mage/cards/s/SolitaryHunter.java +++ b/Mage.Sets/src/mage/cards/s/SolitaryHunter.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class SolitaryHunter extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Solitary Hunter. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public SolitaryHunter(final SolitaryHunter card) { diff --git a/Mage.Sets/src/mage/cards/s/SoulSwallower.java b/Mage.Sets/src/mage/cards/s/SoulSwallower.java index 676d646661..db981fbebb 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSwallower.java +++ b/Mage.Sets/src/mage/cards/s/SoulSwallower.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -32,7 +32,7 @@ public final class SoulSwallower extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, put three +1/+1 counters on Soul Swallower. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), TargetController.YOU, false), DeliriumCondition.instance, "Delirium — At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/s/SpiritMirror.java b/Mage.Sets/src/mage/cards/s/SpiritMirror.java index 9c1317a170..136789f012 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritMirror.java +++ b/Mage.Sets/src/mage/cards/s/SpiritMirror.java @@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class SpiritMirror extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new ReflectionToken()), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(filterToken, ComparisonType.EQUAL_TO, 0, false), "At the beginning of your upkeep, if there are no Reflection tokens on the battlefield, create a 2/2 white Reflection creature token.")); diff --git a/Mage.Sets/src/mage/cards/s/SpiritualSanctuary.java b/Mage.Sets/src/mage/cards/s/SpiritualSanctuary.java index 99061732fa..f588f7091c 100644 --- a/Mage.Sets/src/mage/cards/s/SpiritualSanctuary.java +++ b/Mage.Sets/src/mage/cards/s/SpiritualSanctuary.java @@ -4,7 +4,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -32,7 +32,7 @@ public final class SpiritualSanctuary extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // At the beginning of each player's upkeep, if that player controls a Plains, he or she gains 1 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility( new GainLifeTargetEffect(1).setText("they gain 1 life"), TargetController.ANY, false diff --git a/Mage.Sets/src/mage/cards/s/SplinterTwin.java b/Mage.Sets/src/mage/cards/s/SplinterTwin.java index 4ced5c998c..cd942fa669 100644 --- a/Mage.Sets/src/mage/cards/s/SplinterTwin.java +++ b/Mage.Sets/src/mage/cards/s/SplinterTwin.java @@ -43,7 +43,7 @@ public final class SplinterTwin extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{tap}: Create a token that's a copy of this creature. That token has haste. Exile it at the beginning of the next end step." + // Enchanted creature has "{tap}: Create a token that's a copy of this creature, except it has haste. Exile it at the beginning of the next end step." SimpleActivatedAbility gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SplinterTwinEffect(), new TapSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); } @@ -62,7 +62,7 @@ class SplinterTwinEffect extends OneShotEffect { public SplinterTwinEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Create a token that's a copy of this creature. That token has haste. Exile it at the beginning of the next end step"; + this.staticText = "Create a token that's a copy of this creature, except it has haste. Exile it at the beginning of the next end step"; } public SplinterTwinEffect(final SplinterTwinEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/StalkingVampire.java b/Mage.Sets/src/mage/cards/s/StalkingVampire.java index 7c6fbd13ec..3c0c39ef04 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingVampire.java +++ b/Mage.Sets/src/mage/cards/s/StalkingVampire.java @@ -1,7 +1,6 @@ package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.decorator.ConditionalTriggeredAbility; @@ -10,6 +9,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** * @author nantuko */ diff --git a/Mage.Sets/src/mage/cards/s/StalkingYeti.java b/Mage.Sets/src/mage/cards/s/StalkingYeti.java index 5d336566cf..8f9b22eb30 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingYeti.java +++ b/Mage.Sets/src/mage/cards/s/StalkingYeti.java @@ -8,7 +8,7 @@ import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.SourceOnBattlefieldCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.constants.SubType; @@ -37,7 +37,7 @@ public final class StalkingYeti extends CardImpl { this.toughness = new MageInt(3); // When Stalking Yeti enters the battlefield, if it's on the battlefield, it deals damage equal to its power to target creature an opponent controls and that creature deals damage equal to its power to Stalking Yeti. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new StalkingYetiEffect()), SourceOnBattlefieldCondition.instance, "When {this} enters the battlefield, if it's on the battlefield, " diff --git a/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java b/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java index 9d373df45a..a56b8a1700 100644 --- a/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java +++ b/Mage.Sets/src/mage/cards/s/StampedingElkHerd.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.FormidableCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -28,7 +28,7 @@ public final class StampedingElkHerd extends CardImpl { this.toughness = new MageInt(5); // Formidable — Whenever Stampeding Elk Herd attacks, if creatures you control have total power 8 or greater, creatures you control gain trample until end of turn. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()), false), FormidableCondition.instance, "Formidable — Whenever {this} attacks, if creatures you control have total power 8 or greater, creatures you control gain trample until end of turn." diff --git a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java index 49fd6e28d0..6cc807ea45 100644 --- a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java +++ b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class SteamcoreWeird extends CardImpl { // When Steamcore Weird enters the battlefield, if {R} was spent to cast Steamcore Weird, it deals 2 damage to any target. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability.addTarget(new TargetAnyTarget()); - this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R), "if {R} was spent to cast {this}, it deals 2 damage to any target."), new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java b/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java index 1bfd99ad2f..cee0f71bf4 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetArsonist.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class StormFleetArsonist extends CardImpl { this.toughness = new MageInt(4); // Raid - When Storm Fleet Arsonist enters the battlefield, if you attacked with a creature this turn, target opponent sacrifices a permanent. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new SacrificeEffect(new FilterPermanent(), 1, "Target opponent")), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, target opponent sacrifices a permanent."); diff --git a/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java index d59a4bfbe5..ee36874684 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class StormFleetPyromancer extends CardImpl { this.toughness = new MageInt(2); // Raid - When Storm Fleet Pyromancer enters the battlefield, if you attacked with a creature this turn, Storm Fleet Pyromancer deals 2 damage to any target. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to any target."); diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSpy.java b/Mage.Sets/src/mage/cards/s/StormFleetSpy.java index d6cd125a51..c3b029d426 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetSpy.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetSpy.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class StormFleetSpy extends CardImpl { this.toughness = new MageInt(2); // Raid — When Storm Fleet Spy enters the battlefield, if you attacked with a creature this turn, draw a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, draw a card."); diff --git a/Mage.Sets/src/mage/cards/s/StormTheVault.java b/Mage.Sets/src/mage/cards/s/StormTheVault.java index 0edc06c35f..41e3e48324 100644 --- a/Mage.Sets/src/mage/cards/s/StormTheVault.java +++ b/Mage.Sets/src/mage/cards/s/StormTheVault.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.ControlledCreaturesDealCombatDamagePlayerTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class StormTheVault extends CardImpl { // At the beginning of your end step, if you control five or more artifacts, transform Storm the Vault. this.addAbility(new TransformAbility()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, ComparisonType.MORE_THAN, 4), "At the beginning of your end step, if you control five or more artifacts, transform {this}")); diff --git a/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java b/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java index 45e6b24d3f..39f9323034 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeBattlemage.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.keyword.KickerAbility; @@ -45,7 +45,7 @@ public final class StormscapeBattlemage extends CardImpl { this.addAbility(kickerAbility); // When Stormscape Battlemage enters the battlefield, if it was kicked with its {W} kicker, you gain 3 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3),false), new KickedCostCondition("{W}"), "When Stormscape Battlemage enters the battlefield, if it was kicked with its {W} kicker, you gain 3 life.")); @@ -53,7 +53,7 @@ public final class StormscapeBattlemage extends CardImpl { // When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true),false); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new KickedCostCondition("{2}{B}"), "When Stormscape Battlemage enters the battlefield, if it was kicked with its {2}{B} kicker, destroy target nonblack creature. That creature can't be regenerated.")); } diff --git a/Mage.Sets/src/mage/cards/s/StreetSavvy.java b/Mage.Sets/src/mage/cards/s/StreetSavvy.java new file mode 100644 index 0000000000..f7d89d9b12 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StreetSavvy.java @@ -0,0 +1,80 @@ +package mage.cards.s; + +import java.util.UUID; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.effects.common.AttachEffect; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; + +/** + * + * @author noahg + */ +public final class StreetSavvy extends CardImpl { + + public StreetSavvy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +0/+2 and can block creatures with landwalk abilities as though they didn't have those abilities. + SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0 ,2) + .setText("Enchanted creature gets +0/+2 and can block creatures with landwalk abilities as though they didn't have those abilities.")); + staticAbility.addEffect(new StreetSavvyEffect()); + this.addAbility(staticAbility); + } + + public StreetSavvy(final StreetSavvy card) { + super(card); + } + + @Override + public StreetSavvy copy() { + return new StreetSavvy(this); + } +} + +class StreetSavvyEffect extends AsThoughEffectImpl { + + public StreetSavvyEffect() { + super(AsThoughEffectType.BLOCK_LANDWALK, Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = ""; + } + + public StreetSavvyEffect(final StreetSavvyEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public StreetSavvyEffect copy() { + return new StreetSavvyEffect(this); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game); + return sourcePermanent != null && sourceId.equals(sourcePermanent.getAttachedTo()); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/s/Submerge.java b/Mage.Sets/src/mage/cards/s/Submerge.java index c8bf389e0c..aeacf5422e 100644 --- a/Mage.Sets/src/mage/cards/s/Submerge.java +++ b/Mage.Sets/src/mage/cards/s/Submerge.java @@ -34,7 +34,7 @@ public final class Submerge extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{U}"); - // If an opponent controls a Forest and you control an Island, you may cast Submerge without paying its mana cost. + // If an opponent controls a Forest and you control an Island, you may cast this spell without paying its mana cost. Condition condition = new CompoundCondition("If an opponent controls a Forest and you control an Island", new OpponentControlsPermanentCondition(filterForest), new PermanentsOnTheBattlefieldCondition(filterIsland)); diff --git a/Mage.Sets/src/mage/cards/s/SummonersEgg.java b/Mage.Sets/src/mage/cards/s/SummonersEgg.java index 89d2ae46d0..055eb81237 100644 --- a/Mage.Sets/src/mage/cards/s/SummonersEgg.java +++ b/Mage.Sets/src/mage/cards/s/SummonersEgg.java @@ -29,7 +29,7 @@ public final class SummonersEgg extends CardImpl { public SummonersEgg(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add(SubType.CONSTRUCT); + this.subtype.add(SubType.EGG); this.power = new MageInt(0); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/s/SunDroplet.java b/Mage.Sets/src/mage/cards/s/SunDroplet.java index 3e8be1a94a..6ff432b37d 100644 --- a/Mage.Sets/src/mage/cards/s/SunDroplet.java +++ b/Mage.Sets/src/mage/cards/s/SunDroplet.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.RemoveCountersSourceCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; @@ -36,8 +36,9 @@ public final class SunDroplet extends CardImpl { // Whenever you're dealt damage, put that many charge counters on Sun Droplet. this.addAbility(new SunDropletTriggeredAbility()); // At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life. + //TODO this shouldn't be conditional because you can respond to the trigger by adding counters. Effect effect = new DoIfCostPaid(new GainLifeEffect(1), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(1))); - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false), new SourceHasCounterCondition(CounterType.CHARGE, 1), "At the beginning of each upkeep, you may remove a charge counter from Sun Droplet. If you do, you gain 1 life")); } diff --git a/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java b/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java index 137753dc7a..8c296177d3 100644 --- a/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/s/SunscapeBattlemage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.keyword.FlyingAbility; @@ -45,11 +45,11 @@ public final class SunscapeBattlemage extends CardImpl { // When {this} enters the battlefield, if it was kicked with its {1}{G} kicker, destroy target creature with flying. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{1}{G}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{1}{G}"), "When {this} enters the battlefield, if it was kicked with its {1}{G} kicker, destroy target creature with flying.")); // When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, draw two cards. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility( new DrawCardSourceControllerEffect(2)), new KickedCostCondition("{2}{U}"), "When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, draw two cards.")); } diff --git a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java index b336d90130..2817418444 100644 --- a/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java +++ b/Mage.Sets/src/mage/cards/s/SunspireGatekeepers.java @@ -5,7 +5,7 @@ package mage.cards.s; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,7 +40,7 @@ public final class SunspireGatekeepers extends CardImpl { this.toughness = new MageInt(4); // When Sunspire Gatekeepers enter the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KnightToken())), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), "When {this} enters the battlefield, if you control two or more Gates, create a 2/2 white Knight creature token with vigilance.")); diff --git a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java index ae52f0a59b..cb76066914 100644 --- a/Mage.Sets/src/mage/cards/s/SupplyCaravan.java +++ b/Mage.Sets/src/mage/cards/s/SupplyCaravan.java @@ -4,7 +4,7 @@ package mage.cards.s; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -36,7 +36,7 @@ public final class SupplyCaravan extends CardImpl { this.toughness = new MageInt(5); // When Supply Caravan enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorVigilantToken())), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WarriorVigilantToken())), new PermanentsOnTheBattlefieldCondition(filter), "When {this} enters the battlefield, if you control a tapped creature, create a 1/1 white Warrior creature token with vigilance.")); } diff --git a/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java b/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java index 60022980f3..dfed6f8d65 100644 --- a/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java +++ b/Mage.Sets/src/mage/cards/s/SurrakTheHuntCaller.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.common.FormidableCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class SurrakTheHuntCaller extends CardImpl { this.toughness = new MageInt(4); // Formidable — At the beginning of combat on your turn, if creatures you control have total power 8 or greater, target creature you control gains haste until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), TargetController.YOU, false), FormidableCondition.instance, "Formidable — At the beginning of combat on your turn, if creatures you control have total power 8 or greater, target creature you control gains haste until end of turn."); diff --git a/Mage.Sets/src/mage/cards/s/SwiftSilence.java b/Mage.Sets/src/mage/cards/s/SwiftSilence.java new file mode 100644 index 0000000000..d0619b05d6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwiftSilence.java @@ -0,0 +1,79 @@ +package mage.cards.s; + +import java.util.LinkedList; +import java.util.List; +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.game.stack.StackObject; +import mage.players.Player; + +/** + * + * @author noahg + */ +public final class SwiftSilence extends CardImpl { + + public SwiftSilence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{U}{U}"); + + + // Counter all other spells. Draw a card for each spell countered this way. + this.getSpellAbility().addEffect(new SwiftSilenceEffect()); + } + + public SwiftSilence(final SwiftSilence card) { + super(card); + } + + @Override + public SwiftSilence copy() { + return new SwiftSilence(this); + } +} + +class SwiftSilenceEffect extends OneShotEffect { + + public SwiftSilenceEffect() { + super(Outcome.Detriment); + staticText = "Counter all other spells. Draw a card for each spell countered this way."; + } + + public SwiftSilenceEffect(final SwiftSilenceEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + List spellsToCounter = new LinkedList<>(); + for (StackObject stackObject : game.getStack()) { + if (stackObject instanceof Spell && !stackObject.getId().equals(source.getSourceObject(game).getId())) { + spellsToCounter.add((Spell) stackObject); + } + } + int toDraw = 0; + for (Spell spell : spellsToCounter) { + if (game.getStack().counter(spell.getId(), source.getSourceId(), game)){ + toDraw++; + } + } + Player controller = game.getPlayer(source.getControllerId()); + if (toDraw > 0 && controller != null){ + controller.drawCards(toDraw, game); + } + return true; + } + + @Override + public SwiftSilenceEffect copy() { + return new SwiftSilenceEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java b/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java index 472381ca9d..2ea1bd128e 100644 --- a/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java +++ b/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.AttackedThisTurnSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CantBeCounteredControlledEffect; @@ -60,7 +60,7 @@ public final class TaigamOjutaiMaster extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeCounteredControlledEffect(filter, new FilterStackObject(), Duration.WhileOnBattlefield))); // Whenever you cast an instant or sorcery spell from your hand, if Taigam, Ojutai Master attacked this turn, that spell gains rebound. - Ability ability = new ConditionalTriggeredAbility(new TaigamOjutaiMasterTriggeredAbility(), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new TaigamOjutaiMasterTriggeredAbility(), AttackedThisTurnSourceCondition.instance, effectText); this.addAbility(ability, new AttackedThisTurnWatcher()); diff --git a/Mage.Sets/src/mage/cards/t/TempestOwl.java b/Mage.Sets/src/mage/cards/t/TempestOwl.java index edfd053a6a..9f907999b4 100644 --- a/Mage.Sets/src/mage/cards/t/TempestOwl.java +++ b/Mage.Sets/src/mage/cards/t/TempestOwl.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; @@ -38,7 +38,7 @@ public final class TempestOwl extends CardImpl { // When Tempest Owl enters the battlefield, if it was kicked, tap up to three target permanents. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false); ability.addTarget(new TargetPermanent(0, 3, new FilterPermanent(), false)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, tap up to three target permanents.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, tap up to three target permanents.")); } public TempestOwl(final TempestOwl card) { diff --git a/Mage.Sets/src/mage/cards/t/TemptWithImmortality.java b/Mage.Sets/src/mage/cards/t/TemptWithImmortality.java index e570ca2a7c..ad8c586bca 100644 --- a/Mage.Sets/src/mage/cards/t/TemptWithImmortality.java +++ b/Mage.Sets/src/mage/cards/t/TemptWithImmortality.java @@ -28,7 +28,7 @@ public final class TemptWithImmortality extends CardImpl { public TemptWithImmortality(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); - // Tempting offer - Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from their graveyard to the battlefield. For each player who does, return a creature card from your graveyard to the battlefield. + // Tempting offer - Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from their graveyard to the battlefield. For each opponent who does, return a creature card from your graveyard to the battlefield. this.getSpellAbility().addEffect(new TemptWithImmortalityEffect()); } @@ -46,7 +46,7 @@ class TemptWithImmortalityEffect extends OneShotEffect { public TemptWithImmortalityEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Tempting offer — Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from their graveyard to the battlefield. For each player who does, return a creature card from your graveyard to the battlefield"; + this.staticText = "Tempting offer — Return a creature card from your graveyard to the battlefield. Each opponent may return a creature card from their graveyard to the battlefield. For each opponent who does, return a creature card from your graveyard to the battlefield"; } diff --git a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java index 1235583957..be648e61b6 100644 --- a/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java +++ b/Mage.Sets/src/mage/cards/t/TemptWithVengeance.java @@ -23,7 +23,7 @@ public final class TemptWithVengeance extends CardImpl { public TemptWithVengeance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); - // Tempting offer - create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each player who does, create X 1/1 red Elemental creature tokens with haste. + // Tempting offer - create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each opponent who does, create X 1/1 red Elemental creature tokens with haste. this.getSpellAbility().addEffect(new TemptWithVengeanceEffect()); } @@ -41,7 +41,7 @@ class TemptWithVengeanceEffect extends OneShotEffect { public TemptWithVengeanceEffect() { super(Outcome.PutLandInPlay); - this.staticText = "Tempting offer — create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each player who does, create X 1/1 red Elemental creature tokens with haste"; + this.staticText = "Tempting offer — create X 1/1 red Elemental creature tokens with haste. Each opponent may create X 1/1 red Elemental creature tokens with haste. For each opponent who does, create X 1/1 red Elemental creature tokens with haste"; } public TemptWithVengeanceEffect(final TemptWithVengeanceEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TerritorialAllosaurus.java b/Mage.Sets/src/mage/cards/t/TerritorialAllosaurus.java index e503c10e77..b13f74ec87 100644 --- a/Mage.Sets/src/mage/cards/t/TerritorialAllosaurus.java +++ b/Mage.Sets/src/mage/cards/t/TerritorialAllosaurus.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FightTargetSourceEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class TerritorialAllosaurus extends CardImpl { // When Territorial Allosaurus enters the battlefield, if it was kicked, it fights another target creature. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect()); - Ability conditionalAbility = new ConditionalTriggeredAbility(ability, KickedCondition.instance, + Ability conditionalAbility = new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, it fights another target creature."); FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new AnotherPredicate()); diff --git a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java index be174fcc6a..0b2b8cbe9d 100644 --- a/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java +++ b/Mage.Sets/src/mage/cards/t/TerrorOfKruinPass.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; @@ -55,7 +55,7 @@ public final class TerrorOfKruinPass extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Terror of Kruin Pass. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public TerrorOfKruinPass(final TerrorOfKruinPass card) { diff --git a/Mage.Sets/src/mage/cards/t/TestOfEndurance.java b/Mage.Sets/src/mage/cards/t/TestOfEndurance.java index 0c2782dcac..c26c75408e 100644 --- a/Mage.Sets/src/mage/cards/t/TestOfEndurance.java +++ b/Mage.Sets/src/mage/cards/t/TestOfEndurance.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.WinGameSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class TestOfEndurance extends CardImpl { // At the beginning of your upkeep, if you have 50 or more life, you win the game. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, new FiftyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 50 or more life, you win the game.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new FiftyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 50 or more life, you win the game.")); } public TestOfEndurance(final TestOfEndurance card) { diff --git a/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java b/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java index 2a1a11f8f2..b87140dc64 100644 --- a/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java +++ b/Mage.Sets/src/mage/cards/t/ThaumaticCompass.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.keyword.TransformAbility; @@ -45,7 +45,7 @@ public final class ThaumaticCompass extends CardImpl { // At the beginning of your end step, if you control seven or more lands, transform Thaumatic Compass. this.addAbility(new TransformAbility()); TriggeredAbility ability2 = new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability2, new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.MORE_THAN, 6, true), "At the beginning of your end step, if you control seven or more lands, transform {this}.")); diff --git a/Mage.Sets/src/mage/cards/t/ThespiansStage.java b/Mage.Sets/src/mage/cards/t/ThespiansStage.java index 58bd72d881..5b9ca21040 100644 --- a/Mage.Sets/src/mage/cards/t/ThespiansStage.java +++ b/Mage.Sets/src/mage/cards/t/ThespiansStage.java @@ -30,7 +30,7 @@ public final class ThespiansStage extends CardImpl { // {T}: Add 1. this.addAbility(new ColorlessManaAbility()); - // 2, {T}: Thespian's Stage becomes a copy of target land and gains this ability. + // 2, {T}: Thespian's Stage becomes a copy of target land, except it has this ability. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ThespiansStageCopyEffect(), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetLandPermanent()); @@ -52,7 +52,7 @@ class ThespiansStageCopyEffect extends OneShotEffect { public ThespiansStageCopyEffect() { super(Outcome.Benefit); - this.staticText = "{this} becomes a copy of target land and gains this ability"; + this.staticText = "{this} becomes a copy of target land, except it has this ability"; } public ThespiansStageCopyEffect(final ThespiansStageCopyEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java b/Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java new file mode 100644 index 0000000000..912a17476f --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java @@ -0,0 +1,76 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.*; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author noahg + */ +public final class ThickSkinnedGoblin extends CardImpl { + + public ThickSkinnedGoblin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.SHAMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // You may pay {0} rather than pay the echo cost for permanents you control. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ThickSkinnedGoblinCostModificationEffect())); + + // {R}: Thick-Skinned Goblin gains protection from red until end of turn. + this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(ProtectionAbility.from(ObjectColor.RED), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public ThickSkinnedGoblin(final ThickSkinnedGoblin card) { + super(card); + } + + @Override + public ThickSkinnedGoblin copy() { + return new ThickSkinnedGoblin(this); + } +} + +class ThickSkinnedGoblinCostModificationEffect extends AsThoughEffectImpl { + + public ThickSkinnedGoblinCostModificationEffect(){ + super(AsThoughEffectType.PAY_0_ECHO, Duration.WhileOnBattlefield, Outcome.Benefit); + this.staticText = "You may pay {0} rather than pay the echo cost for permanents you control."; + } + + public ThickSkinnedGoblinCostModificationEffect(ThickSkinnedGoblinCostModificationEffect effect) { + super(effect); + } + + @Override + public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { + Permanent sourcePermanent = game.getPermanent(sourceId); + return sourcePermanent != null && sourcePermanent.isControlledBy(source.getControllerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ThickSkinnedGoblinCostModificationEffect copy() { + return new ThickSkinnedGoblinCostModificationEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/ThicketElemental.java b/Mage.Sets/src/mage/cards/t/ThicketElemental.java index 2fc0bca680..e5ee92f1ee 100644 --- a/Mage.Sets/src/mage/cards/t/ThicketElemental.java +++ b/Mage.Sets/src/mage/cards/t/ThicketElemental.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -33,7 +33,7 @@ public final class ThicketElemental extends CardImpl { // When Thicket Elemental enters the battlefield, if it was kicked, you may reveal cards from the top of your library until you reveal a creature card. If you do, put that card onto the battlefield and shuffle all other cards revealed this way into your library. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new RevealCardsFromLibraryUntilEffect(new FilterCreatureCard(), Zone.BATTLEFIELD, Zone.LIBRARY, true)); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, you may reveal cards from the top of your library until you reveal a creature card. If you do, put that card onto the battlefield and shuffle all other cards revealed this way into your library.")); } diff --git a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java index 613b3f38f8..e5da2e1873 100644 --- a/Mage.Sets/src/mage/cards/t/ThirstingAxe.java +++ b/Mage.Sets/src/mage/cards/t/ThirstingAxe.java @@ -14,7 +14,7 @@ import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.AttachedCondition; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeEquippedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; @@ -48,7 +48,7 @@ public final class ThirstingAxe extends CardImpl { new InvertCondition(new EquippedDealtCombatDamageToCreatureCondition())); String triggeredAbilityText = "At the beginning of your end step, if equipped creature " + "didn't deal combat damage to a creature this turn, sacrifice it."; - ConditionalTriggeredAbility sacrificeTriggeredAbility = new ConditionalTriggeredAbility(ability, condition, triggeredAbilityText); + ConditionalInterveningIfTriggeredAbility sacrificeTriggeredAbility = new ConditionalInterveningIfTriggeredAbility(ability, condition, triggeredAbilityText); this.addAbility(sacrificeTriggeredAbility, new CombatDamageToCreatureWatcher()); // Equip {2} diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java index b359d9605a..97cc50c576 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; @@ -38,13 +38,13 @@ public final class ThornscapeBattlemage extends CardImpl { // When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to any target. TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); ability1.addTarget(new TargetAnyTarget()); - this.addAbility(new ConditionalTriggeredAbility(ability1, new KickedCostCondition("{R}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability1, new KickedCostCondition("{R}"), "When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to any target.")); // When {this} enters the battlefield, if it was kicked with its {W} kicker, destroy target artifact. TriggeredAbility ability2 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); ability2.addTarget(new TargetArtifactPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability2, new KickedCostCondition("{W}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new KickedCostCondition("{W}"), "When {this} enters the battlefield, if it was kicked with its {W} kicker, destroy target artifact.")); } diff --git a/Mage.Sets/src/mage/cards/t/ThranQuarry.java b/Mage.Sets/src/mage/cards/t/ThranQuarry.java index cf83652e09..b9a933395e 100644 --- a/Mage.Sets/src/mage/cards/t/ThranQuarry.java +++ b/Mage.Sets/src/mage/cards/t/ThranQuarry.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.CreatureCountCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; @@ -25,7 +25,7 @@ public final class ThranQuarry extends CardImpl { // At the beginning of the end step, if you control no creatures, sacrifice Thran Quarry. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.YOU), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.YOU), "At the beginning of the end step, if you control no creatures, sacrifice {this}.")); // {tap}: Add one mana of any color. diff --git a/Mage.Sets/src/mage/cards/t/ThroneofGeth.java b/Mage.Sets/src/mage/cards/t/ThroneOfGeth.java similarity index 80% rename from Mage.Sets/src/mage/cards/t/ThroneofGeth.java rename to Mage.Sets/src/mage/cards/t/ThroneOfGeth.java index 1707d08918..329851cf1b 100644 --- a/Mage.Sets/src/mage/cards/t/ThroneofGeth.java +++ b/Mage.Sets/src/mage/cards/t/ThroneOfGeth.java @@ -20,27 +20,31 @@ import mage.target.common.TargetControlledPermanent; * * @author Loki */ -public final class ThroneofGeth extends CardImpl { +public final class ThroneOfGeth extends CardImpl { + private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact"); static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); } - public ThroneofGeth (UUID ownerId, CardSetInfo setInfo) { + public ThroneOfGeth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + + // {T}, Sacrifice an artifact: Proliferate. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ProliferateEffect(), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } - public ThroneofGeth (final ThroneofGeth card) { + public ThroneOfGeth(final ThroneOfGeth card) { super(card); } @Override - public ThroneofGeth copy() { - return new ThroneofGeth(this); + public ThroneOfGeth copy() { + return new ThroneOfGeth(this); } } diff --git a/Mage.Sets/src/mage/cards/t/Thumbscrews.java b/Mage.Sets/src/mage/cards/t/Thumbscrews.java index 21d1d60b76..0c69be1eb0 100644 --- a/Mage.Sets/src/mage/cards/t/Thumbscrews.java +++ b/Mage.Sets/src/mage/cards/t/Thumbscrews.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CardsInHandCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +29,7 @@ public final class Thumbscrews extends CardImpl { new DamageTargetEffect(1), TargetController.YOU, false); ability.addTarget(new TargetOpponentOrPlaneswalker()); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 4); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, condition, "At the beginning of your upkeep, if you have five or more cards in hand, " + "{this} deals 1 damage to target opponent or planeswalker." diff --git a/Mage.Sets/src/mage/cards/t/ThunderBrute.java b/Mage.Sets/src/mage/cards/t/ThunderBrute.java index e0ae92e287..d37b3f752d 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderBrute.java +++ b/Mage.Sets/src/mage/cards/t/ThunderBrute.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.TributeNotPaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; @@ -36,7 +36,7 @@ public final class ThunderBrute extends CardImpl { this.addAbility(new TributeAbility(3)); // When Thunder Brute enters the battlefield, if tribute wasn't paid, it gains haste until end of turn. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), false); - this.addAbility(new ConditionalTriggeredAbility(ability, TributeNotPaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance, "When {this} enters the battlefield, if its tribute wasn't paid, it gains haste until end of turn.")); } diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java index ab097e840f..6eb9bd5352 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeBattlemage.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCostCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.abilities.keyword.KickerAbility; @@ -38,13 +38,13 @@ public final class ThunderscapeBattlemage extends CardImpl { // When {this} enters the battlefield, if it was kicked with its {1}{B} kicker, target player discards two cards. TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(2)); ability1.addTarget(new TargetPlayer()); - this.addAbility(new ConditionalTriggeredAbility(ability1, new KickedCostCondition("{1}{B}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability1, new KickedCostCondition("{1}{B}"), "When {this} enters the battlefield, if it was kicked with its {1}{B} kicker, target player discards two cards.")); // When {this} enters the battlefield, if it was kicked with its {G} kicker, destroy target enchantment. TriggeredAbility ability2 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); ability2.addTarget(new TargetEnchantmentPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability2, new KickedCostCondition("{G}"), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new KickedCostCondition("{G}"), "When {this} enters the battlefield, if it was kicked with its {G} kicker, destroy target enchantment.")); } diff --git a/Mage.Sets/src/mage/cards/t/TilonallisKnight.java b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java index 37f9521058..367079b3c5 100644 --- a/Mage.Sets/src/mage/cards/t/TilonallisKnight.java +++ b/Mage.Sets/src/mage/cards/t/TilonallisKnight.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class TilonallisKnight extends CardImpl { this.toughness = new MageInt(2); // Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false), new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks, if you control a Dinosaur, {this} gets +1/+1 until end of turn." diff --git a/Mage.Sets/src/mage/cards/t/TimberShredder.java b/Mage.Sets/src/mage/cards/t/TimberShredder.java index cc51136e37..b90ac0f1af 100644 --- a/Mage.Sets/src/mage/cards/t/TimberShredder.java +++ b/Mage.Sets/src/mage/cards/t/TimberShredder.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class TimberShredder extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public TimberShredder(final TimberShredder card) { diff --git a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java index 5f20d2bfae..bdf734ed07 100644 --- a/Mage.Sets/src/mage/cards/t/TimelyHordemate.java +++ b/Mage.Sets/src/mage/cards/t/TimelyHordemate.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,7 +39,7 @@ public final class TimelyHordemate extends CardImpl { this.toughness = new MageInt(2); // Raid — When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.instance, + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield."); ability.addTarget(new TargetCardInYourGraveyard(filter)); this.addAbility(ability, new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java b/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java index cf20bfb6d8..81e2a7a145 100644 --- a/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java +++ b/Mage.Sets/src/mage/cards/t/TinStreetHooligan.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.ManaWasSpentCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class TinStreetHooligan extends CardImpl { this.toughness = new MageInt(1); // When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()), new ManaWasSpentCondition(ColoredManaSymbol.G), "When {this} enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact."); diff --git a/Mage.Sets/src/mage/cards/t/TolarianEmissary.java b/Mage.Sets/src/mage/cards/t/TolarianEmissary.java index 7dcbab2def..09bbde4386 100644 --- a/Mage.Sets/src/mage/cards/t/TolarianEmissary.java +++ b/Mage.Sets/src/mage/cards/t/TolarianEmissary.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.KickerAbility; @@ -37,7 +37,7 @@ public final class TolarianEmissary extends CardImpl { // When Tolarian Emissary enters the battlefield, if it was kicked, destroy target enchantment. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); ability.addTarget(new TargetEnchantmentPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target enchantment.")); } diff --git a/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java b/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java index fb6c84046d..3f6c7634b6 100644 --- a/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java +++ b/Mage.Sets/src/mage/cards/t/ToolcraftExemplar.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.condition.LockedInCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -40,7 +40,7 @@ public final class ToolcraftExemplar extends CardImpl { Effect effect = new ConditionalContinuousEffect( new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new LockedInCondition(new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.MORE_THAN, 2)), null); - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(new BoostSourceEffect(2, 1, Duration.EndOfTurn), TargetController.YOU, false), new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()), "At the beginning of combat on your turn, if you control an artifact, {this} gets +2/+1 until end of turn." diff --git a/Mage.Sets/src/mage/cards/t/ToothCollector.java b/Mage.Sets/src/mage/cards/t/ToothCollector.java index 528abf642e..ff87e8bff2 100644 --- a/Mage.Sets/src/mage/cards/t/ToothCollector.java +++ b/Mage.Sets/src/mage/cards/t/ToothCollector.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -51,7 +51,7 @@ public final class ToothCollector extends CardImpl { // {Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // target creature that player controls gets -1/-1 until end of turn. - ability = new ConditionalTriggeredAbility( + ability = new ConditionalInterveningIfTriggeredAbility( new ToothCollectorAbility(), DeliriumCondition.instance, "Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/t/Topplegeist.java b/Mage.Sets/src/mage/cards/t/Topplegeist.java index d077bcc239..daf722048d 100644 --- a/Mage.Sets/src/mage/cards/t/Topplegeist.java +++ b/Mage.Sets/src/mage/cards/t/Topplegeist.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.DeliriumCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; @@ -53,7 +53,7 @@ public final class Topplegeist extends CardImpl { // Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, // tap target creature that player controls. - ability = new ConditionalTriggeredAbility( + ability = new ConditionalInterveningIfTriggeredAbility( new TopplegeistAbility(), DeliriumCondition.instance, "Delirium — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " diff --git a/Mage.Sets/src/mage/cards/t/TorchSlinger.java b/Mage.Sets/src/mage/cards/t/TorchSlinger.java index 30e14a429b..1b0ed80609 100644 --- a/Mage.Sets/src/mage/cards/t/TorchSlinger.java +++ b/Mage.Sets/src/mage/cards/t/TorchSlinger.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class TorchSlinger extends CardImpl { // When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, it deals 2 damage to target creature.")); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, it deals 2 damage to target creature.")); } public TorchSlinger(final TorchSlinger card) { diff --git a/Mage.Sets/src/mage/cards/t/TormentedPariah.java b/Mage.Sets/src/mage/cards/t/TormentedPariah.java index 40ec42bdb1..2dbaaaac84 100644 --- a/Mage.Sets/src/mage/cards/t/TormentedPariah.java +++ b/Mage.Sets/src/mage/cards/t/TormentedPariah.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -36,7 +36,7 @@ public final class TormentedPariah extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Tormented Pariah. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public TormentedPariah(final TormentedPariah card) { diff --git a/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java b/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java index 012565abd0..863c0c2b99 100644 --- a/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java +++ b/Mage.Sets/src/mage/cards/t/TovolarsMagehunter.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -44,7 +44,7 @@ public final class TovolarsMagehunter extends CardImpl { this.addAbility(new TovolarsMagehunterTriggeredAbility()); // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Tovolar's Magehunter. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/t/TriumphOfCruelty.java b/Mage.Sets/src/mage/cards/t/TriumphOfCruelty.java index f33df57ab9..b16a9e88bf 100644 --- a/Mage.Sets/src/mage/cards/t/TriumphOfCruelty.java +++ b/Mage.Sets/src/mage/cards/t/TriumphOfCruelty.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.ControlsCreatureGreatestPowerCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class TriumphOfCruelty extends CardImpl { TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DiscardTargetEffect(1), TargetController.YOU, false); Target target = new TargetOpponent(); ability.addTarget(target); - this.addAbility(new ConditionalTriggeredAbility(ability, ControlsCreatureGreatestPowerCondition.instance, ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, ControlsCreatureGreatestPowerCondition.instance, ruleText)); } public TriumphOfCruelty(final TriumphOfCruelty card) { diff --git a/Mage.Sets/src/mage/cards/t/TriumphOfFerocity.java b/Mage.Sets/src/mage/cards/t/TriumphOfFerocity.java index 282df24208..720b1afb66 100644 --- a/Mage.Sets/src/mage/cards/t/TriumphOfFerocity.java +++ b/Mage.Sets/src/mage/cards/t/TriumphOfFerocity.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.ControlsCreatureGreatestPowerCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class TriumphOfFerocity extends CardImpl { // At the beginning of your upkeep, draw a card if you control the creature with the greatest power or tied for the greatest power. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability, ControlsCreatureGreatestPowerCondition.instance, ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, ControlsCreatureGreatestPowerCondition.instance, ruleText)); } public TriumphOfFerocity(final TriumphOfFerocity card) { diff --git a/Mage.Sets/src/mage/cards/t/TwilightProphet.java b/Mage.Sets/src/mage/cards/t/TwilightProphet.java index a2a0943ce0..cced90fe5d 100644 --- a/Mage.Sets/src/mage/cards/t/TwilightProphet.java +++ b/Mage.Sets/src/mage/cards/t/TwilightProphet.java @@ -7,7 +7,7 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.CitysBlessingCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.abilities.keyword.AscendAbility; @@ -46,7 +46,7 @@ public final class TwilightProphet extends CardImpl { // At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand. // Each opponent loses X life and you gain X life, where X is that card's converted mana cost. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility( new TwilightProphetEffect(), TargetController.YOU, false), CitysBlessingCondition.instance, "At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand." + "Each opponent loses X life and you gain X life, where X is that card's converted mana cost.")); diff --git a/Mage.Sets/src/mage/cards/t/Twinflame.java b/Mage.Sets/src/mage/cards/t/Twinflame.java index ecc4f8dade..c1f6f7cd67 100644 --- a/Mage.Sets/src/mage/cards/t/Twinflame.java +++ b/Mage.Sets/src/mage/cards/t/Twinflame.java @@ -35,7 +35,7 @@ public final class Twinflame extends CardImpl { // Strive - Twinflame costs 2R more to cast for each target beyond the first. this.addAbility(new StriveAbility("{2}{R}")); - // Choose any number of target creatures you control. For each of them, create a token that's a copy of that creature. Those tokens have haste. Exile them at the beginning of the next end step. + // Choose any number of target creatures you control. For each of them, create a token that's a copy of that creature, except it has haste. Exile them at the beginning of the next end step. this.getSpellAbility().addEffect(new TwinflameCopyEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, new FilterControlledCreaturePermanent(), false)); @@ -55,7 +55,7 @@ class TwinflameCopyEffect extends OneShotEffect { public TwinflameCopyEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Choose any number of target creatures you control. For each of them, create a token that's a copy of that creature. Those tokens have haste. Exile them at the beginning of the next end step"; + this.staticText = "Choose any number of target creatures you control. For each of them, create a token that's a copy of that creature, except it has haste. Exile them at the beginning of the next end step"; } public TwinflameCopyEffect(final TwinflameCopyEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java index 203d14f642..9297159824 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java +++ b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.SurgedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.SurgeAbility; @@ -36,7 +36,7 @@ public final class TyrantOfValakut extends CardImpl { // When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to any target. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), false); ability.addTarget(new TargetAnyTarget()); - this.addAbility(new ConditionalTriggeredAbility(ability, SurgedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SurgedCondition.instance, "When {this} enters the battlefield, if its surge cost was paid, it deals 3 damage to any target.")); } diff --git a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java index 52c54ca811..7dcfd6782f 100644 --- a/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java +++ b/Mage.Sets/src/mage/cards/u/UbulSarGatekeepers.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -41,7 +41,7 @@ public final class UbulSarGatekeepers extends CardImpl { this.toughness = new MageInt(4); // Whenever Ubul Sar Gatekeepers enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-2, -2, Duration.EndOfTurn)), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), "Whenever {this} enters the battlefield, if you control two or more Gates, target creature an opponent controls gets -2/-2 until end of turn."); diff --git a/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java b/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java index 1d3aeef514..88ef64e31b 100644 --- a/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java +++ b/Mage.Sets/src/mage/cards/u/UlrichOfTheKrallenhorde.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.TransformAbility; @@ -43,7 +43,7 @@ public final class UlrichOfTheKrallenhorde extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Ulrich of the Krallenhorde. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public UlrichOfTheKrallenhorde(final UlrichOfTheKrallenhorde card) { diff --git a/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java b/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java index 3e7f37aef0..f106d6b44c 100644 --- a/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java +++ b/Mage.Sets/src/mage/cards/u/UlrichUncontestedAlpha.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.FightTargetSourceEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -48,7 +48,7 @@ public final class UlrichUncontestedAlpha extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ulrich, Uncontested Alpha. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public UlrichUncontestedAlpha(final UlrichUncontestedAlpha card) { diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java b/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java index f1e15e4d82..d7c335f2f9 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldBear.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,7 +30,7 @@ public final class UlvenwaldBear extends CardImpl { this.toughness = new MageInt(2); // Morbid - When Ulvenwald Bear enters the battlefield, if a creature died this turn, put two +1/+1 counters on target creature. - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2), Outcome.BoostCreature)), + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2), Outcome.BoostCreature)), MorbidCondition.instance, "When {this} enters the battlefield, if a creature died this turn, put two +1/+1 counters on target creature."); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java b/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java index 383c9309ba..dd60706754 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldMystics.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class UlvenwaldMystics extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Ulvenwald Mystics. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public UlvenwaldMystics(final UlvenwaldMystics card) { diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java b/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java index c6a9cc5f79..df5e6bf52e 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldPrimordials.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -41,7 +41,7 @@ public final class UlvenwaldPrimordials extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Ulvenwald Primordials. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public UlvenwaldPrimordials(final UlvenwaldPrimordials card) { diff --git a/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java b/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java index 3db22ac336..2fadc33bd9 100644 --- a/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java +++ b/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java @@ -1,4 +1,3 @@ - package mage.cards.u; import java.util.UUID; @@ -61,7 +60,7 @@ class UnexpectedlyAbsentEffect extends OneShotEffect { if (controller != null) { Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (permanent != null) { - controller.putCardOnTopXOfLibrary(permanent, game, source, source.getManaCostsToPay().getX()); + controller.putCardOnTopXOfLibrary(permanent, game, source, source.getManaCostsToPay().getX() + 1); return true; } } diff --git a/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java b/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java index 28b2044fe9..ad47395144 100644 --- a/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java +++ b/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.OrCondition; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; import mage.abilities.effects.common.TapEnchantedEffect; @@ -52,7 +52,7 @@ public final class UnquenchableThirst extends CardImpl { this.addAbility(ability); // When Unquenchable Thirst enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature. - Ability ability2 = new ConditionalTriggeredAbility( + Ability ability2 = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), diff --git a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java index 9372d88744..99bf874862 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java +++ b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java @@ -40,7 +40,7 @@ public final class UnstableShapeshifter extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); - // Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature and gains this ability. + // Whenever another creature enters the battlefield, Unstable Shapeshifter becomes a copy of that creature, except it has this ability. this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UnstableShapeshifterEffect(), filterAnotherCreature, false, SetTargetPointer.PERMANENT, "")); } @@ -58,7 +58,7 @@ class UnstableShapeshifterEffect extends OneShotEffect { public UnstableShapeshifterEffect() { super(Outcome.Copy); - this.staticText = "{this} becomes a copy of that creature and gains this ability"; + this.staticText = "{this} becomes a copy of that creature, except it has this ability"; } public UnstableShapeshifterEffect(final UnstableShapeshifterEffect effect) { diff --git a/Mage.Sets/src/mage/cards/u/UrborgEmissary.java b/Mage.Sets/src/mage/cards/u/UrborgEmissary.java index 8673b2edef..20873c5150 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgEmissary.java +++ b/Mage.Sets/src/mage/cards/u/UrborgEmissary.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class UrborgEmissary extends CardImpl { // When Urborg Emissary enters the battlefield, if it was kicked, return target permanent to its owner's hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()); ability.addTarget(new TargetPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, return target permanent to its owner's hand.")); } diff --git a/Mage.Sets/src/mage/cards/u/UrborgStalker.java b/Mage.Sets/src/mage/cards/u/UrborgStalker.java index bd1df9da67..45c7088447 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgStalker.java +++ b/Mage.Sets/src/mage/cards/u/UrborgStalker.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -41,7 +41,7 @@ public final class UrborgStalker extends CardImpl { this.toughness = new MageInt(4); // At the beginning of each player's upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(1), TargetController.ANY, false), new PermanentsOnTheBattlefieldCondition(filter), "At the beginning of each player's upkeep, " diff --git a/Mage.Sets/src/mage/cards/v/VengefulRebel.java b/Mage.Sets/src/mage/cards/v/VengefulRebel.java index d3116ace19..49f44e1623 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulRebel.java +++ b/Mage.Sets/src/mage/cards/v/VengefulRebel.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RevoltCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -33,7 +33,7 @@ public final class VengefulRebel extends CardImpl { // Revolt — When Vengeful Rebel enters the battlefield, if a permanent you controlled left the battlefield this turn, // target creature an opponent controls gets -3/-3 until end of turn. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-3, -3, Duration.EndOfTurn), false), RevoltCondition.instance, "When {this} enters the battlefield, if a permanent you controlled left the battlefield this turn, " diff --git a/Mage.Sets/src/mage/cards/v/VentifactBottle.java b/Mage.Sets/src/mage/cards/v/VentifactBottle.java index 4b43ff6b8b..92e69ef651 100644 --- a/Mage.Sets/src/mage/cards/v/VentifactBottle.java +++ b/Mage.Sets/src/mage/cards/v/VentifactBottle.java @@ -10,7 +10,7 @@ import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -42,7 +42,7 @@ public final class VentifactBottle extends CardImpl { this.addAbility(ability); // At the beginning of your precombat main phase, if Ventifact Bottle has a charge counter on it, tap it and remove all charge counters from it. Add {C} for each charge counter removed this way. TriggeredAbility ability2 = new BeginningOfPreCombatMainTriggeredAbility(new VentifactBottleEffect(), TargetController.YOU, false); - this.addAbility(new ConditionalTriggeredAbility(ability2, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new SourceHasCounterCondition(CounterType.CHARGE, 1, Integer.MAX_VALUE), "At the beginning of your precombat main phase, " + "if {this} has a charge counter on it, tap it and remove all charge counters from it. " diff --git a/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java b/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java index 5f810d301e..33099a79cd 100644 --- a/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java +++ b/Mage.Sets/src/mage/cards/v/VerdelothTheAncient.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; @@ -53,7 +53,7 @@ public final class VerdelothTheAncient extends CardImpl { // When Verdeloth the Ancient enters the battlefield, if it was kicked, create X 1/1 green Saproling creature tokens. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SaprolingToken(), new GetKickerXValue()), false); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, create X 1/1 green Saproling creature tokens.")); } diff --git a/Mage.Sets/src/mage/cards/v/VerduranEmissary.java b/Mage.Sets/src/mage/cards/v/VerduranEmissary.java index 0579f6049a..2ced42e40a 100644 --- a/Mage.Sets/src/mage/cards/v/VerduranEmissary.java +++ b/Mage.Sets/src/mage/cards/v/VerduranEmissary.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; @@ -34,7 +34,7 @@ public final class VerduranEmissary extends CardImpl { // When {this} enters the battlefield, if it was kicked, destroy target artifact. It can't be regenerated. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(true)); ability.addTarget(new TargetArtifactPermanent()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, destroy target artifact. It can't be regenerated.")); } diff --git a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java index e52d2b2506..540626721f 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java @@ -30,7 +30,7 @@ import mage.util.functions.ApplyToPermanent; */ public final class VesuvanDoppelganger extends CardImpl { - private static final String rule = "You may have {this} enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it gains \"At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability.\""; + private static final String rule = "You may have {this} enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it has \"At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color and it has this ability.\""; public VesuvanDoppelganger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); @@ -38,7 +38,7 @@ public final class VesuvanDoppelganger extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // You may have Vesuvan Doppelganger enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it gains "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability." + // You may have Vesuvan Doppelganger enter the battlefield as a copy of any creature on the battlefield except it doesn't copy that creature's color and it has "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color and it has this ability." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new VesuvanDoppelgangerCopyEffect(), rule, true)); this.addAbility(ability); @@ -56,7 +56,7 @@ public final class VesuvanDoppelganger extends CardImpl { class VesuvanDoppelgangerCopyEffect extends OneShotEffect { - private static final String rule2 = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color. If you do, this creature gains this ability."; + private static final String rule2 = "At the beginning of your upkeep, you may have this creature become a copy of target creature except it doesn't copy that creature's color and it has this ability."; public VesuvanDoppelgangerCopyEffect() { super(Outcome.Copy); diff --git a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java index 3e3124ca82..404b0334c3 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java @@ -58,7 +58,7 @@ public final class VesuvanShapeshifter extends CardImpl { ability.setWorksFaceDown(false); this.addAbility(ability); - // and gains "At the beginning of your upkeep, you may turn this creature face down". + // and has "At the beginning of your upkeep, you may turn this creature face down". effect = new VesuvanShapeshifterFaceDownEffect(); ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); this.addAbility(ability); @@ -102,7 +102,7 @@ class VesuvanShapeshifterEffect extends OneShotEffect { public VesuvanShapeshifterEffect() { super(Outcome.Copy); - staticText = "have {this} become a copy of a creature and gain this ability"; + staticText = "have {this} become a copy of a creature, except it has this ability"; } public VesuvanShapeshifterEffect(final VesuvanShapeshifterEffect effect) { diff --git a/Mage.Sets/src/mage/cards/v/VigeanIntuition.java b/Mage.Sets/src/mage/cards/v/VigeanIntuition.java new file mode 100644 index 0000000000..29f91842a7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VigeanIntuition.java @@ -0,0 +1,124 @@ +package mage.cards.v; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.*; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.token.SaprolingToken; +import mage.players.Library; +import mage.players.Player; + +/** + * + * @author noahg + */ +public final class VigeanIntuition extends CardImpl { + + public VigeanIntuition(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{G}{U}"); + + + // Choose a card type, then reveal the top four cards of your library. Put all cards of the chosen type revealed this way into your hand and the rest into your graveyard. + this.getSpellAbility().addEffect(new VigeanIntuitionEffect()); + } + + public VigeanIntuition(final VigeanIntuition card) { + super(card); + } + + @Override + public VigeanIntuition copy() { + return new VigeanIntuition(this); + } +} + +class VigeanIntuitionEffect extends OneShotEffect { + + private static final Set choice = new LinkedHashSet<>(); + + static { + choice.add(CardType.ARTIFACT.toString()); + choice.add(CardType.CREATURE.toString()); + choice.add(CardType.ENCHANTMENT.toString()); + choice.add(CardType.INSTANT.toString()); + choice.add(CardType.LAND.toString()); + choice.add(CardType.PLANESWALKER.toString()); + choice.add(CardType.SORCERY.toString()); + choice.add(CardType.TRIBAL.toString()); + } + + public VigeanIntuitionEffect() { + super(Outcome.Benefit); + staticText = "Choose a card type, then reveal the top four cards of your library. Put all cards of the chosen type revealed this way into your hand and the rest into your graveyard"; + } + + public VigeanIntuitionEffect(final VigeanIntuitionEffect effect) { + super(effect); + } + + @Override + public VigeanIntuitionEffect copy() { + return new VigeanIntuitionEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + MageObject sourceObject = game.getObject(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); + Library library = player.getLibrary(); + if (player != null && sourceObject != null && library != null) { + Choice choiceImpl = new ChoiceImpl(); + choiceImpl.setChoices(choice); + if (player.choose(Outcome.Neutral, choiceImpl, game)) { + CardType type = null; + String choosenType = choiceImpl.getChoice(); + + if (choosenType.equals(CardType.ARTIFACT.toString())) { + type = CardType.ARTIFACT; + } else if (choosenType.equals(CardType.LAND.toString())) { + type = CardType.LAND; + } else if (choosenType.equals(CardType.CREATURE.toString())) { + type = CardType.CREATURE; + } else if (choosenType.equals(CardType.ENCHANTMENT.toString())) { + type = CardType.ENCHANTMENT; + } else if (choosenType.equals(CardType.INSTANT.toString())) { + type = CardType.INSTANT; + } else if (choosenType.equals(CardType.SORCERY.toString())) { + type = CardType.SORCERY; + } else if (choosenType.equals(CardType.PLANESWALKER.toString())) { + type = CardType.PLANESWALKER; + } else if (choosenType.equals(CardType.TRIBAL.toString())) { + type = CardType.TRIBAL; + } + + if (type != null) { + Set top = library.getTopCards(game, 4); + player.revealCards(source, new CardsImpl(top), game); + Cards putInHand = new CardsImpl(); + Cards putInGraveyard = new CardsImpl(); + for (Card card : top) { + if (card != null && card.getCardType().contains(type)) { + putInHand.add(card); + } else { + putInGraveyard.add(card); + } + } + player.moveCards(putInHand, Zone.HAND, source, game); + player.moveCards(putInGraveyard, Zone.GRAVEYARD, source, game); + return true; + } + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java index 912ff5ee59..97834e2151 100644 --- a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java +++ b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -41,7 +41,7 @@ public final class VildinPackAlpha extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Vildin-Pack Alpha. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/v/VillageIronsmith.java b/Mage.Sets/src/mage/cards/v/VillageIronsmith.java index d8cf6d2971..2ab6e27cde 100644 --- a/Mage.Sets/src/mage/cards/v/VillageIronsmith.java +++ b/Mage.Sets/src/mage/cards/v/VillageIronsmith.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TransformAbility; @@ -38,7 +38,7 @@ public final class VillageIronsmith extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Village Ironsmith. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public VillageIronsmith(final VillageIronsmith card) { diff --git a/Mage.Sets/src/mage/cards/v/VillageMessenger.java b/Mage.Sets/src/mage/cards/v/VillageMessenger.java index 5a4626e616..ef0a93f894 100644 --- a/Mage.Sets/src/mage/cards/v/VillageMessenger.java +++ b/Mage.Sets/src/mage/cards/v/VillageMessenger.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TransformAbility; @@ -39,7 +39,7 @@ public final class VillageMessenger extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Village Messenger. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public VillageMessenger(final VillageMessenger card) { diff --git a/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java b/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java index 1f33d977ee..a320c5a6f3 100644 --- a/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java +++ b/Mage.Sets/src/mage/cards/v/VillagersOfEstwald.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; @@ -35,7 +35,7 @@ public final class VillagersOfEstwald extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Villagers of Estwald. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public VillagersOfEstwald(final VillagersOfEstwald card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtussManeuver.java b/Mage.Sets/src/mage/cards/v/VirtussManeuver.java index 0d02a30405..70880e200f 100644 --- a/Mage.Sets/src/mage/cards/v/VirtussManeuver.java +++ b/Mage.Sets/src/mage/cards/v/VirtussManeuver.java @@ -16,6 +16,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.StaticFilters; +import mage.filter.common.FilterCreatureCard; import mage.filter.predicate.other.OwnerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -76,7 +77,7 @@ class VirtussManeuverEffect extends OneShotEffect { if (player == null) { continue; } - FilterCard filter = new FilterCard("card in your graveyard"); + FilterCard filter = new FilterCreatureCard("creature card in your graveyard"); filter.add(new OwnerIdPredicate(player.getId())); TargetCardInGraveyard target = new TargetCardInGraveyard(filter); getBackMap.put(player.getId(), null); diff --git a/Mage.Sets/src/mage/cards/v/VivienReid.java b/Mage.Sets/src/mage/cards/v/VivienReid.java index 2e3468420a..219a8c5a3c 100644 --- a/Mage.Sets/src/mage/cards/v/VivienReid.java +++ b/Mage.Sets/src/mage/cards/v/VivienReid.java @@ -14,6 +14,7 @@ import mage.constants.SuperType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; @@ -56,8 +57,11 @@ public final class VivienReid extends CardImpl { // +1: Look at the top four cards of your library. You may reveal a creature or land card from among them and put it into your hand. Put the rest on the bottom of your library in any order. this.addAbility(new LoyaltyAbility( new LookLibraryAndPickControllerEffect( - new StaticValue(4), false, new StaticValue(1), filter, false - ), 1 + new StaticValue(4), false, new StaticValue(1), filter, + Zone.LIBRARY, false, true, false, Zone.HAND, true, false, false) + .setBackInRandomOrder(true) + .setText("Look at the top four cards of your library. You may reveal a creature or land card from among them" + + " and put it into your hand. Put the rest on the bottom of your library in a random order."), 1 )); // -3: Destroy target artifact, enchantment, or creature with flying. diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java index 309f312024..08b9cd0334 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java @@ -1,21 +1,22 @@ package mage.cards.v; -import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; +import mage.filter.FilterSpell; import mage.game.permanent.token.VoiceOfResurgenceToken; -import mage.game.stack.Spell; + +import java.util.UUID; /** * @@ -31,7 +32,14 @@ public final class VoiceOfResurgence extends CardImpl { this.toughness = new MageInt(2); // Whenever an opponent casts a spell during your turn or when Voice of Resurgence dies, create a green and white Elemental creature token with "This creature's power and toughness are each equal to the number of creatures you control." - this.addAbility(new VoiceOfResurgenceTriggeredAbility()); + OrTriggeredAbility ability = new OrTriggeredAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new VoiceOfResurgenceToken()), + new ConditionalTriggeredAbility( + new SpellCastOpponentTriggeredAbility(null, new FilterSpell("a spell"), false), + MyTurnCondition.instance, + "Whenever an opponent casts a spell during your turn, "), + new DiesTriggeredAbility(null, false)); + ability.setLeavesTheBattlefieldTrigger(true); + this.addAbility(ability); } @@ -43,50 +51,6 @@ public final class VoiceOfResurgence extends CardImpl { public VoiceOfResurgence copy() { return new VoiceOfResurgence(this); } + } -class VoiceOfResurgenceTriggeredAbility extends TriggeredAbilityImpl { - - public VoiceOfResurgenceTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new VoiceOfResurgenceToken()), false); - setLeavesTheBattlefieldTrigger(true); - } - - public VoiceOfResurgenceTriggeredAbility(final VoiceOfResurgenceTriggeredAbility ability) { - super(ability); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == EventType.SPELL_CAST || event.getType() == EventType.ZONE_CHANGE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - // Opponent casts spell during your turn - if (event.getType() == GameEvent.EventType.SPELL_CAST) { - Spell spell = game.getStack().getSpell(event.getTargetId()); - if (spell != null - && game.getOpponents(super.getControllerId()).contains(spell.getControllerId()) - && game.isActivePlayer(super.getControllerId())) { - return true; - } - } - // Voice of Resurgence Dies - if (event.getType() == GameEvent.EventType.ZONE_CHANGE && getSourceId().equals(event.getTargetId())) { - ZoneChangeEvent zce = (ZoneChangeEvent) event; - return zce.getFromZone() == Zone.BATTLEFIELD && zce.getToZone() == Zone.GRAVEYARD; - } - return false; - } - - @Override - public String getRule() { - return "Whenever an opponent casts a spell during your turn or when {this} dies, create a green and white Elemental creature token with \"This creature's power and toughness are each equal to the number of creatures you control."; - } - - @Override - public VoiceOfResurgenceTriggeredAbility copy() { - return new VoiceOfResurgenceTriggeredAbility(this); - } -} diff --git a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java index 381911a0f8..3db5967e0f 100644 --- a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java +++ b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.FlyingAbility; @@ -41,7 +41,8 @@ public final class VoyagerDrake extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Voyager Drake enters the battlefield, up to X target creatures gain flying until end of turn, where X is the number of times Voyager Drake was kicked. - Ability ability = new ConditionalTriggeredAbility( + //TODO this should trigger even if it wasn't kicked at all + Ability ability = new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), false), KickedCondition.instance, "When {this} enters the battlefield, up to X target creatures gain flying until end of turn, where X is the number of times {this} was kicked."); diff --git a/Mage.Sets/src/mage/cards/v/VraskasConquistador.java b/Mage.Sets/src/mage/cards/v/VraskasConquistador.java index 8d9b98d775..f57955f6c7 100644 --- a/Mage.Sets/src/mage/cards/v/VraskasConquistador.java +++ b/Mage.Sets/src/mage/cards/v/VraskasConquistador.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.AttacksOrBlocksTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; @@ -43,7 +43,7 @@ public final class VraskasConquistador extends CardImpl { TriggeredAbility ability = new AttacksOrBlocksTriggeredAbility(new LoseLifeTargetEffect(2), false); ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addTarget(new TargetOpponent()); - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( ability, new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} attacks or blocks, if you control a Vraska planeswalker, target opponent loses 2 life and you gain 2 life.")); } diff --git a/Mage.Sets/src/mage/cards/w/Wakedancer.java b/Mage.Sets/src/mage/cards/w/Wakedancer.java index 0ed65c61ed..095f2420b0 100644 --- a/Mage.Sets/src/mage/cards/w/Wakedancer.java +++ b/Mage.Sets/src/mage/cards/w/Wakedancer.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -33,7 +33,7 @@ public final class Wakedancer extends CardImpl { // Morbid - When Wakedancer enters the battlefield, if a creature died this turn, create a 2/2 black Zombie creature token. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieToken())); - this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.instance, staticText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MorbidCondition.instance, staticText)); } public Wakedancer(final Wakedancer card) { diff --git a/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java b/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java index f16edf13a3..118d4e572b 100644 --- a/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java +++ b/Mage.Sets/src/mage/cards/w/WakeningSunsAvatar.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.CastFromHandSourceCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,7 +37,7 @@ public final class WakeningSunsAvatar extends CardImpl { this.toughness = new MageInt(7); // When Wakening Sun's Avatar enters the battlefield, if you cast it from you hand, destroy all non-Dinosaur creatures. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter), false), CastFromHandSourceCondition.instance, "When {this} enters the battlefield, if you cast it from your hand, destroy all non-Dinosaur creatures."), diff --git a/Mage.Sets/src/mage/cards/w/WanderingChampion.java b/Mage.Sets/src/mage/cards/w/WanderingChampion.java index 3c2ae20f24..373afc8dad 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingChampion.java +++ b/Mage.Sets/src/mage/cards/w/WanderingChampion.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.costs.common.DiscardCardCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; @@ -40,7 +40,7 @@ public final class WanderingChampion extends CardImpl { // Whenever Wandering Champion deals combat damage to a player, if you control a blue or red permanent, you may discard a card. If you do, draw a card. TriggeredAbility ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new DiscardCardCost()), true); - this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), "Whenever {this} deals combat damage to a player, if you control a blue or red permanent, you may discard a card. If you do, draw a card.")); } diff --git a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java index f2371355bd..9db272b67c 100644 --- a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java +++ b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect; import mage.abilities.keyword.FlyingAbility; @@ -42,7 +42,7 @@ public final class WaterspoutElemental extends CardImpl { // When Waterspout Elemental enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)); ability.addEffect(new SkipNextTurnSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn.")); } diff --git a/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java b/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java index 88beda16b9..f11ba3ef58 100644 --- a/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java +++ b/Mage.Sets/src/mage/cards/w/WeatherseedTotem.java @@ -8,7 +8,7 @@ import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.Condition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; import mage.abilities.keyword.TrampleAbility; @@ -22,7 +22,6 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; /** * @@ -40,7 +39,7 @@ public final class WeatherseedTotem extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new WeatherseedTotemToken(), "", Duration.EndOfTurn), new ManaCostsImpl<>("{2}{G}{G}{G}"))); // When Weatherseed Totem is put into a graveyard from the battlefield, if it was a creature, return this card to its owner's hand. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect()), new WeatherseedTotemCondition(), "When {this} is put into a graveyard from the battlefield, " diff --git a/Mage.Sets/src/mage/cards/w/WellOfDiscovery.java b/Mage.Sets/src/mage/cards/w/WellOfDiscovery.java index d5e0716bf4..ee3002f48b 100644 --- a/Mage.Sets/src/mage/cards/w/WellOfDiscovery.java +++ b/Mage.Sets/src/mage/cards/w/WellOfDiscovery.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class WellOfDiscovery extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); // At the beginning of your end step, if you control no untapped lands, draw a card. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new DrawCardSourceControllerEffect(1), TargetController.YOU, false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your end step, if you control no untapped lands, draw a card.")); diff --git a/Mage.Sets/src/mage/cards/w/WellOfLife.java b/Mage.Sets/src/mage/cards/w/WellOfLife.java index 6110c01657..775e1a02fd 100644 --- a/Mage.Sets/src/mage/cards/w/WellOfLife.java +++ b/Mage.Sets/src/mage/cards/w/WellOfLife.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -31,7 +31,7 @@ public final class WellOfLife extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // At the beginning of your end step, if you control no untapped lands, you gain 2 life. - this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new GainLifeEffect(2), TargetController.YOU, false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your end step, if you control no untapped lands, you gain 2 life.")); } diff --git a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java index dbb43f738b..b7df1697b4 100644 --- a/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java +++ b/Mage.Sets/src/mage/cards/w/WerewolfOfAncientHunger.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TransformedCondition; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.CardsInAllHandsCount; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; @@ -53,7 +53,7 @@ public final class WerewolfOfAncientHunger extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf of Ancient Hunger. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public WerewolfOfAncientHunger(final WerewolfOfAncientHunger card) { diff --git a/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java b/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java index e72eb481dc..51eef0567f 100644 --- a/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java +++ b/Mage.Sets/src/mage/cards/w/WerewolfRansacker.java @@ -8,7 +8,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -49,7 +49,7 @@ public final class WerewolfRansacker extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } public WerewolfRansacker(final WerewolfRansacker card) { diff --git a/Mage.Sets/src/mage/cards/w/WhirlingDervish.java b/Mage.Sets/src/mage/cards/w/WhirlingDervish.java index 2e5a230f1f..e7ff09c4f7 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlingDervish.java +++ b/Mage.Sets/src/mage/cards/w/WhirlingDervish.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.DealtDamageToAnOpponent; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; @@ -38,7 +38,7 @@ public final class WhirlingDervish extends CardImpl { this.addAbility(ProtectionAbility.from(ObjectColor.BLACK)); // At the beginning of each end step, if Whirling Dervish dealt damage to an opponent this turn, put a +1/+1 counter on it. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of each end step", true, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); - this.addAbility(new ConditionalTriggeredAbility(triggered, new DealtDamageToAnOpponent(), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new DealtDamageToAnOpponent(), ruleText)); } public WhirlingDervish(final WhirlingDervish card) { diff --git a/Mage.Sets/src/mage/cards/w/WildPair.java b/Mage.Sets/src/mage/cards/w/WildPair.java index 6e51f77ef9..ee5d269b22 100644 --- a/Mage.Sets/src/mage/cards/w/WildPair.java +++ b/Mage.Sets/src/mage/cards/w/WildPair.java @@ -6,7 +6,7 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -39,7 +39,7 @@ public final class WildPair extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}{G}"); // Whenever a creature enters the battlefield, if you cast it from your hand, you may search your library for a creature card with the same total power and toughness and put it onto the battlefield. If you do, shuffle your library. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new WildPairEffect(), filter, true, SetTargetPointer.PERMANENT, ""), new CastFromHandTargetCondition(), "Whenever a creature enters the battlefield, if you cast it from your hand, you may search your library for a creature card with the same total power and toughness and put it onto the battlefield. If you do, shuffle your library." diff --git a/Mage.Sets/src/mage/cards/w/WildbloodPack.java b/Mage.Sets/src/mage/cards/w/WildbloodPack.java index 578ce917ae..2871ec9026 100644 --- a/Mage.Sets/src/mage/cards/w/WildbloodPack.java +++ b/Mage.Sets/src/mage/cards/w/WildbloodPack.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.keyword.TrampleAbility; @@ -41,7 +41,7 @@ public final class WildbloodPack extends CardImpl { // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Wildblood Pack. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); } diff --git a/Mage.Sets/src/mage/cards/w/WingmateRoc.java b/Mage.Sets/src/mage/cards/w/WingmateRoc.java index 54f5ceccba..04d872751d 100644 --- a/Mage.Sets/src/mage/cards/w/WingmateRoc.java +++ b/Mage.Sets/src/mage/cards/w/WingmateRoc.java @@ -6,7 +6,7 @@ import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.RaidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.AttackingCreatureCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; @@ -36,7 +36,7 @@ public final class WingmateRoc extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Raid - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying. - this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.instance, + this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.instance, "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying."), new PlayerAttackedWatcher()); diff --git a/Mage.Sets/src/mage/cards/w/WitheringWisps.java b/Mage.Sets/src/mage/cards/w/WitheringWisps.java index 544ed387c5..2e275880e6 100644 --- a/Mage.Sets/src/mage/cards/w/WitheringWisps.java +++ b/Mage.Sets/src/mage/cards/w/WitheringWisps.java @@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.common.CreatureCountCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageEverythingEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class WitheringWisps extends CardImpl { // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Withering Wisps. TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()); - this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText)); // {B}: Withering Wisps deals 1 damage to each creature and each player. Activate this ability no more times each turn than the number of snow Swamps you control. this.addAbility(new WitheringWispsActivatedAbility()); diff --git a/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java b/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java index 5299462f48..b9880a923a 100644 --- a/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java +++ b/Mage.Sets/src/mage/cards/w/WolfbittenCaptive.java @@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.TransformAbility; @@ -40,7 +40,7 @@ public final class WolfbittenCaptive extends CardImpl { // At the beginning of each upkeep, if no spells were cast last turn, transform Wolfbitten Captive. this.addAbility(new TransformAbility()); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); - this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE)); } public WolfbittenCaptive(final WolfbittenCaptive card) { diff --git a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java index f50cc4a4e3..00b5fc45ef 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.common.MorbidCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; @@ -40,7 +40,7 @@ public final class WoodlandSleuth extends CardImpl { // Morbid - When Woodland Sleuth enters the battlefield, if a creature died this turn, return a creature card at random from your graveyard to your hand. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new WoodlandSleuthEffect()); - this.addAbility(new ConditionalTriggeredAbility(ability, MorbidCondition.instance, staticText)); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MorbidCondition.instance, staticText)); } public WoodlandSleuth(final WoodlandSleuth card) { diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java new file mode 100644 index 0000000000..d03d033266 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -0,0 +1,251 @@ + +package mage.cards.w; + +import java.util.UUID; +import mage.MageObject; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.AsThoughEffect; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.AsThoughEffectType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.ManaPool; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public final class WordOfCommand extends CardImpl { + + public WordOfCommand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{B}"); + + // Look at target opponent's hand and choose a card from it. You control that player until Word of Command finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving. + this.getSpellAbility().addEffect(new WordOfCommandEffect()); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public WordOfCommand(final WordOfCommand card) { + super(card); + } + + @Override + public WordOfCommand copy() { + return new WordOfCommand(this); + } +} + +class WordOfCommandEffect extends OneShotEffect { + + public WordOfCommandEffect() { + super(Outcome.GainControl); + this.staticText = "Look at target opponent's hand and choose a card from it. You control that player until Word of Command finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving"; + } + + public WordOfCommandEffect(final WordOfCommandEffect effect) { + super(effect); + } + + @Override + public WordOfCommandEffect copy() { + return new WordOfCommandEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player sourceController = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + MageObject sourceObject = game.getObject(source.getSourceId()); + Card card = null; + if (sourceController != null && targetPlayer != null && sourceObject != null) { + Player controller = null; + Spell wordOfCommand = game.getSpell(source.getSourceId()); + if (wordOfCommand != null) { + if (wordOfCommand.getCommandedBy() != null) { + controller = game.getPlayer(wordOfCommand.getCommandedBy()); + } else { + controller = game.getPlayer(sourceController.getTurnControlledBy()); + } + } + if (controller == null) { + controller = sourceController; // reset the controller to avoid NPE + } + + // Look at target opponent's hand and choose a card from it + TargetCard targetCard = new TargetCard(Zone.HAND, new FilterCard()); + if (controller.choose(Outcome.Discard, targetPlayer.getHand(), targetCard, game)) { + card = game.getCard(targetCard.getFirstTarget()); + } + + // You control that player until Word of Command finishes resolving + controller.controlPlayersTurn(game, targetPlayer.getId()); + while (controller != null && controller.canRespond()) { + if (controller.chooseUse(Outcome.Benefit, "Resolve " + sourceObject.getLogName() + " now" + (card != null ? " and play " + card.getLogName() : "") + '?', source, game)) { + // this is used to give the controller a little space to utilize his player controlling effect (look at face down creatures, hand, etc.) + break; + } + } + + // The player plays that card if able + if (card != null) { + // While doing so, the player can activate mana abilities only if they're from lands that player controls + RestrictionEffect effect = new WordOfCommandCantActivateEffect(); + effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); + game.addEffect(effect, source); + + // and only if mana they produce is spent to activate other mana abilities of lands he or she controls and/or play that card + ManaPool manaPool = targetPlayer.getManaPool(); + manaPool.setForcedToPay(true); + manaPool.storeMana(); + int bookmark = game.bookmarkState(); + + boolean canPlay = checkPlayability(card, targetPlayer, game, source); + while (canPlay + && targetPlayer.canRespond() + && !targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { + SpellAbility spellAbility = card.getSpellAbility(); + if (spellAbility != null) { + spellAbility.getManaCostsToPay().clear(); + spellAbility.getManaCostsToPay().addAll(spellAbility.getManaCosts()); + ((ManaCostsImpl) spellAbility.getManaCostsToPay()).forceManaRollback(game, manaPool); // force rollback if card was deemed playable + canPlay = checkPlayability(card, targetPlayer, game, source); + } else { + break; + } + } + if (!canPlay) { + game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName() + " (card can't be played)"); + } + + manaPool.setForcedToPay(false); // duplicate in case of a new mana pool existing - probably not necessary, but just in case + manaPool = targetPlayer.getManaPool(); // a rollback creates a new mana pool for the player, so it's necessary to find it again + manaPool.setForcedToPay(false); + game.removeBookmark(bookmark); + targetPlayer.resetStoredBookmark(game); + for (RestrictionEffect eff : game.getContinuousEffects().getRestrictionEffects()) { + if (eff instanceof WordOfCommandCantActivateEffect) { + eff.discard(); + break; + } + } + game.getContinuousEffects().removeInactiveEffects(game); + Spell spell = game.getSpell(card.getId()); + if (spell != null) { + spell.setCommandedBy(controller.getId()); // If the chosen card is cast as a spell, you control the player while that spell is resolving + } + } + + wordOfCommand = game.getSpell(source.getSourceId()); + if (wordOfCommand != null) { + wordOfCommand.setCommandedBy(controller.getId()); // You control the player until Word of Command finishes resolving + } else { + targetPlayer.setGameUnderYourControl(true, false); + if (!targetPlayer.getTurnControlledBy().equals(controller.getId())) { + controller.getPlayersUnderYourControl().remove(targetPlayer.getId()); + } + } + return true; + } + return false; + } + + private boolean checkPlayability(Card card, Player targetPlayer, Game game, Ability source) { + // check for card playability + boolean canPlay = false; + if (card.isLand()) { // we can't use getPlayableInHand(game) in here because it disallows playing lands outside the main step + if (targetPlayer.canPlayLand() + && game.getActivePlayerId().equals(targetPlayer.getId())) { + canPlay = true; + for (Ability ability : card.getAbilities(game)) { + if (!game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(GameEvent.EventType.PLAY_LAND, ability.getSourceId(), ability.getSourceId(), targetPlayer.getId()), ability, game, true)) { + canPlay &= true; + } + } + } + } else { // Word of Command allows the chosen card to be played "as if it had flash" so we need to invoke such effect to bypass the check + AsThoughEffectImpl effect2 = new WordOfCommandTestFlashEffect(); + game.addEffect(effect2, source); + if (targetPlayer.getPlayableInHand(game).contains(card.getId())) { + canPlay = true; + } + for (AsThoughEffect eff : game.getContinuousEffects().getApplicableAsThoughEffects(AsThoughEffectType.CAST_AS_INSTANT, game)) { + if (eff instanceof WordOfCommandTestFlashEffect) { + eff.discard(); + break; + } + } + } + return canPlay; + } +} + +class WordOfCommandCantActivateEffect extends RestrictionEffect { + + public WordOfCommandCantActivateEffect() { + super(Duration.EndOfTurn); + } + + public WordOfCommandCantActivateEffect(final WordOfCommandCantActivateEffect effect) { + super(effect); + } + + @Override + public WordOfCommandCantActivateEffect copy() { + return new WordOfCommandCantActivateEffect(this); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + return !permanent.isLand() && permanent.getControllerId().equals(this.targetPointer.getFirst(game, source)); + } + + @Override + public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game) { + return false; + } +} + +class WordOfCommandTestFlashEffect extends AsThoughEffectImpl { + + public WordOfCommandTestFlashEffect() { + super(AsThoughEffectType.CAST_AS_INSTANT, Duration.EndOfTurn, Outcome.Benefit); + } + + public WordOfCommandTestFlashEffect(final WordOfCommandTestFlashEffect effect) { + super(effect); + } + + @Override + public WordOfCommandTestFlashEffect copy() { + return new WordOfCommandTestFlashEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(UUID affectedSpellId, Ability source, UUID affectedControllerId, Game game) { + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WreathofGeists.java b/Mage.Sets/src/mage/cards/w/WreathOfGeists.java similarity index 86% rename from Mage.Sets/src/mage/cards/w/WreathofGeists.java rename to Mage.Sets/src/mage/cards/w/WreathOfGeists.java index 7a9da11ab0..8991b23d96 100644 --- a/Mage.Sets/src/mage/cards/w/WreathofGeists.java +++ b/Mage.Sets/src/mage/cards/w/WreathOfGeists.java @@ -23,9 +23,9 @@ import mage.target.common.TargetCreaturePermanent; * * @author nantuko */ -public final class WreathofGeists extends CardImpl { +public final class WreathOfGeists extends CardImpl { - public WreathofGeists(UUID ownerId, CardSetInfo setInfo) { + public WreathOfGeists(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); this.subtype.add(SubType.AURA); @@ -43,12 +43,12 @@ public final class WreathofGeists extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(value, value))); } - public WreathofGeists(final WreathofGeists card) { + public WreathOfGeists(final WreathOfGeists card) { super(card); } @Override - public WreathofGeists copy() { - return new WreathofGeists(this); + public WreathOfGeists copy() { + return new WreathOfGeists(this); } } diff --git a/Mage.Sets/src/mage/cards/w/WretchedCamel.java b/Mage.Sets/src/mage/cards/w/WretchedCamel.java index 1b309f28f9..f4218eff05 100644 --- a/Mage.Sets/src/mage/cards/w/WretchedCamel.java +++ b/Mage.Sets/src/mage/cards/w/WretchedCamel.java @@ -8,7 +8,7 @@ import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.OrCondition; import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -42,7 +42,7 @@ public final class WretchedCamel extends CardImpl { this.toughness = new MageInt(1); // When Wretched Camel dies, if you control a Desert or there is a Desert card in your graveyard, target player discards a card. - Ability ability = new ConditionalTriggeredAbility( + Ability ability = new ConditionalInterveningIfTriggeredAbility( new DiesTriggeredAbility(new DiscardTargetEffect(1)), new OrCondition( new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), diff --git a/Mage.Sets/src/mage/cards/w/WritOfPassage.java b/Mage.Sets/src/mage/cards/w/WritOfPassage.java index a36d8348ea..040f218574 100644 --- a/Mage.Sets/src/mage/cards/w/WritOfPassage.java +++ b/Mage.Sets/src/mage/cards/w/WritOfPassage.java @@ -2,16 +2,15 @@ package mage.cards.w; import java.util.UUID; + +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.target.common.TargetCreaturePermanent; import mage.abilities.Ability; import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.condition.common.AttachedToMatchesFilterCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.combat.CantBeBlockedAttachedEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.constants.Outcome; import mage.target.TargetPermanent; @@ -51,7 +50,7 @@ public final class WritOfPassage extends CardImpl { // Whenever enchanted creature attacks, if its power is 2 or less, it's unblockable this turn. FilterPermanent filter = new FilterPermanent("if enchanted creature's power is 2 or less"); filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 3)); - ability = new ConditionalTriggeredAbility(new AttacksAttachedTriggeredAbility( + ability = new ConditionalInterveningIfTriggeredAbility(new AttacksAttachedTriggeredAbility( new WritOfPassageAttachedEffect(AttachmentType.AURA), AttachmentType.AURA, false), new AttachedToMatchesFilterCondition(filter), "Whenever enchanted creature attacks, if its power is 2 or less, it can't be blocked this turn."); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java b/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java index c0e0f672c1..700a1e7d46 100644 --- a/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java +++ b/Mage.Sets/src/mage/cards/z/ZacamaPrimalCalamity.java @@ -8,7 +8,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.CastFromEverywhereSourceCondition; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.GainLifeEffect; @@ -51,7 +51,7 @@ public final class ZacamaPrimalCalamity extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // When Zacama, Primal Calamity enters the battlefield, if you cast it, untap all lands you control. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new UntapAllLandsControllerEffect(), false), CastFromEverywhereSourceCondition.instance, "When {this} enters the battlefield, if you cast it, untap all lands you control.")); diff --git a/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java b/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java index d7804a5a6f..f560e66f98 100644 --- a/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java +++ b/Mage.Sets/src/mage/cards/z/ZealotsEnDal.java @@ -7,7 +7,7 @@ import mage.ObjectColor; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.GainLifeEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -41,7 +41,7 @@ public final class ZealotsEnDal extends CardImpl { this.toughness = new MageInt(4); // At the beginning of your upkeep, if all nonland permanents you control are white, you gain 1 life. - this.addAbility(new ConditionalTriggeredAbility( + this.addAbility(new ConditionalInterveningIfTriggeredAbility( new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(1), TargetController.YOU, false), new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)), "At the beginning of your upkeep, if all nonland permanents you control are white, you gain 1 life." diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index a2638ba711..1553e50b59 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -89,6 +89,7 @@ public final class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Inheritance", 4, Rarity.UNCOMMON, mage.cards.i.Inheritance.class)); cards.add(new SetCardInfo("Insidious Bookworms", "51a", Rarity.COMMON, mage.cards.i.InsidiousBookworms.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Insidious Bookworms", "51b", Rarity.COMMON, mage.cards.i.InsidiousBookworms.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Ivory Gargoyle", 5, Rarity.RARE, mage.cards.i.IvoryGargoyle.class)); cards.add(new SetCardInfo("Juniper Order Advocate", 6, Rarity.UNCOMMON, mage.cards.j.JuniperOrderAdvocate.class)); cards.add(new SetCardInfo("Kaysa", 96, Rarity.RARE, mage.cards.k.Kaysa.class)); cards.add(new SetCardInfo("Keeper of Tresserhorn", 52, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class)); diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 6fbb6b7f9d..21790372da 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -35,6 +35,7 @@ public final class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Arctic Nishoba", 102, Rarity.UNCOMMON, mage.cards.a.ArcticNishoba.class)); cards.add(new SetCardInfo("Arcum Dagsson", 27, Rarity.RARE, mage.cards.a.ArcumDagsson.class)); cards.add(new SetCardInfo("Aurochs Herd", 103, Rarity.COMMON, mage.cards.a.AurochsHerd.class)); + cards.add(new SetCardInfo("Balduvian Fallen", 51, Rarity.UNCOMMON, mage.cards.b.BalduvianFallen.class)); cards.add(new SetCardInfo("Balduvian Frostwaker", 28, Rarity.UNCOMMON, mage.cards.b.BalduvianFrostwaker.class)); cards.add(new SetCardInfo("Balduvian Rage", 76, Rarity.UNCOMMON, mage.cards.b.BalduvianRage.class)); cards.add(new SetCardInfo("Balduvian Warlord", 77, Rarity.UNCOMMON, mage.cards.b.BalduvianWarlord.class)); @@ -52,6 +53,7 @@ public final class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Commandeer", 29, Rarity.RARE, mage.cards.c.Commandeer.class)); cards.add(new SetCardInfo("Controvert", 30, Rarity.UNCOMMON, mage.cards.c.Controvert.class)); cards.add(new SetCardInfo("Counterbalance", 31, Rarity.UNCOMMON, mage.cards.c.Counterbalance.class)); + cards.add(new SetCardInfo("Cover of Winter", 3, Rarity.RARE, mage.cards.c.CoverOfWinter.class)); cards.add(new SetCardInfo("Cryoclasm", 79, Rarity.UNCOMMON, mage.cards.c.Cryoclasm.class)); cards.add(new SetCardInfo("Darien, King of Kjeldor", 4, Rarity.RARE, mage.cards.d.DarienKingOfKjeldor.class)); cards.add(new SetCardInfo("Dark Depths", 145, Rarity.RARE, mage.cards.d.DarkDepths.class)); @@ -141,6 +143,7 @@ public final class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Rune Snag", 46, Rarity.COMMON, mage.cards.r.RuneSnag.class)); cards.add(new SetCardInfo("Scrying Sheets", 149, Rarity.RARE, mage.cards.s.ScryingSheets.class)); cards.add(new SetCardInfo("Sek'Kuar, Deathkeeper", 131, Rarity.RARE, mage.cards.s.SekKuarDeathkeeper.class)); + cards.add(new SetCardInfo("Shape of the Wiitigo", 120, Rarity.RARE, mage.cards.s.ShapeOfTheWiitigo.class)); cards.add(new SetCardInfo("Sheltering Ancient", 121, Rarity.UNCOMMON, mage.cards.s.ShelteringAncient.class)); cards.add(new SetCardInfo("Simian Brawler", 122, Rarity.COMMON, mage.cards.s.SimianBrawler.class)); cards.add(new SetCardInfo("Skred", 97, Rarity.COMMON, mage.cards.s.Skred.class)); diff --git a/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java b/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java index 8237051647..eff5498d46 100644 --- a/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java +++ b/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java @@ -1,338 +1,337 @@ - -package mage.sets; - -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author rystan - */ -public class CommanderAnthologyVolumeII extends ExpansionSet { - - private static final CommanderAnthologyVolumeII instance = new CommanderAnthologyVolumeII(); - - public static CommanderAnthologyVolumeII getInstance() { - return instance; - } - - private CommanderAnthologyVolumeII() { - super("Commander Anthology Volume II", "CM2", ExpansionSet.buildDate(2018, 6, 8), SetType.SUPPLEMENTAL); - this.blockName = "Commander Anthology Volume II"; - this.hasBasicLands = false; - - cards.add(new SetCardInfo("Abzan Falconer", 15, Rarity.UNCOMMON, mage.cards.a.AbzanFalconer.class)); - cards.add(new SetCardInfo("Acidic Slime", 132, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); - cards.add(new SetCardInfo("Ancient Amphitheater", 232, Rarity.RARE, mage.cards.a.AncientAmphitheater.class)); - cards.add(new SetCardInfo("Ancient Excavation", 150, Rarity.UNCOMMON, mage.cards.a.AncientExcavation.class)); - cards.add(new SetCardInfo("Angel of Serenity", 16, Rarity.MYTHIC, mage.cards.a.AngelOfSerenity.class)); - cards.add(new SetCardInfo("Anya, Merciless Angel", 8, Rarity.MYTHIC, mage.cards.a.AnyaMercilessAngel.class)); - cards.add(new SetCardInfo("Arbiter of Knollridge", 17, Rarity.RARE, mage.cards.a.ArbiterOfKnollridge.class)); - cards.add(new SetCardInfo("Arcane Lighthouse", 233, Rarity.UNCOMMON, mage.cards.a.ArcaneLighthouse.class)); - cards.add(new SetCardInfo("Arcane Sanctum", 234, Rarity.UNCOMMON, mage.cards.a.ArcaneSanctum.class)); - cards.add(new SetCardInfo("Artisan of Kozilek", 14, Rarity.UNCOMMON, mage.cards.a.ArtisanOfKozilek.class)); - cards.add(new SetCardInfo("Ash Barrens", 235, Rarity.COMMON, mage.cards.a.AshBarrens.class)); - cards.add(new SetCardInfo("Astral Cornucopia", 172, Rarity.RARE, mage.cards.a.AstralCornucopia.class)); - cards.add(new SetCardInfo("Atraxa, Praetors' Voice", 10, Rarity.MYTHIC, mage.cards.a.AtraxaPraetorsVoice.class)); - cards.add(new SetCardInfo("Avatar of Woe", 57, Rarity.RARE, mage.cards.a.AvatarOfWoe.class)); - cards.add(new SetCardInfo("Azorius Chancery", 236, Rarity.UNCOMMON, mage.cards.a.AzoriusChancery.class)); - cards.add(new SetCardInfo("Bane of the Living", 58, Rarity.RARE, mage.cards.b.BaneOfTheLiving.class)); - cards.add(new SetCardInfo("Banishing Light", 18, Rarity.UNCOMMON, mage.cards.b.BanishingLight.class)); - cards.add(new SetCardInfo("Barren Moor", 237, Rarity.COMMON, mage.cards.b.BarrenMoor.class)); - cards.add(new SetCardInfo("Basalt Monolith", 173, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); - cards.add(new SetCardInfo("Beetleback Chief", 83, Rarity.UNCOMMON, mage.cards.b.BeetlebackChief.class)); - cards.add(new SetCardInfo("Bitter Feud", 84, Rarity.RARE, mage.cards.b.BitterFeud.class)); - cards.add(new SetCardInfo("Blade of Selves", 174, Rarity.RARE, mage.cards.b.BladeOfSelves.class)); - cards.add(new SetCardInfo("Blasphemous Act", 85, Rarity.RARE, mage.cards.b.BlasphemousAct.class)); - cards.add(new SetCardInfo("Blasted Landscape", 238, Rarity.UNCOMMON, mage.cards.b.BlastedLandscape.class)); - cards.add(new SetCardInfo("Bogardan Hellkite", 86, Rarity.MYTHIC, mage.cards.b.BogardanHellkite.class)); - cards.add(new SetCardInfo("Borderland Behemoth", 87, Rarity.RARE, mage.cards.b.BorderlandBehemoth.class)); - cards.add(new SetCardInfo("Boros Cluestone", 175, Rarity.COMMON, mage.cards.b.BorosCluestone.class)); - cards.add(new SetCardInfo("Boros Garrison", 239, Rarity.UNCOMMON, mage.cards.b.BorosGarrison.class)); - cards.add(new SetCardInfo("Boros Guildgate", 240, Rarity.COMMON, mage.cards.b.BorosGuildgate.class)); - cards.add(new SetCardInfo("Boros Signet", 176, Rarity.COMMON, mage.cards.b.BorosSignet.class)); - cards.add(new SetCardInfo("Bosh, Iron Golem", 5, Rarity.RARE, mage.cards.b.BoshIronGolem.class)); - cards.add(new SetCardInfo("Bottle Gnomes", 177, Rarity.UNCOMMON, mage.cards.b.BottleGnomes.class)); - cards.add(new SetCardInfo("Brave the Sands", 19, Rarity.UNCOMMON, mage.cards.b.BraveTheSands.class)); - cards.add(new SetCardInfo("Brawn", 133, Rarity.UNCOMMON, mage.cards.b.Brawn.class)); - cards.add(new SetCardInfo("Breath of Darigaaz", 88, Rarity.UNCOMMON, mage.cards.b.BreathOfDarigaaz.class)); - cards.add(new SetCardInfo("Bred for the Hunt", 151, Rarity.UNCOMMON, mage.cards.b.BredForTheHunt.class)); - cards.add(new SetCardInfo("Buried Alive", 59, Rarity.UNCOMMON, mage.cards.b.BuriedAlive.class)); - cards.add(new SetCardInfo("Buried Ruin", 241, Rarity.UNCOMMON, mage.cards.b.BuriedRuin.class)); - cards.add(new SetCardInfo("Butcher of Malakir", 60, Rarity.RARE, mage.cards.b.ButcherOfMalakir.class)); - cards.add(new SetCardInfo("Caged Sun", 178, Rarity.RARE, mage.cards.c.CagedSun.class)); - cards.add(new SetCardInfo("Cathars' Crusade", 20, Rarity.RARE, mage.cards.c.CatharsCrusade.class)); - cards.add(new SetCardInfo("Cathodion", 179, Rarity.UNCOMMON, mage.cards.c.Cathodion.class)); - cards.add(new SetCardInfo("Cauldron of Souls", 180, Rarity.RARE, mage.cards.c.CauldronOfSouls.class)); - cards.add(new SetCardInfo("Champion of Lambholt", 134, Rarity.RARE, mage.cards.c.ChampionOfLambholt.class)); - cards.add(new SetCardInfo("Chaos Warp", 89, Rarity.RARE, mage.cards.c.ChaosWarp.class)); - cards.add(new SetCardInfo("Citadel Siege", 21, Rarity.RARE, mage.cards.c.CitadelSiege.class)); - cards.add(new SetCardInfo("Coldsteel Heart", 181, Rarity.UNCOMMON, mage.cards.c.ColdsteelHeart.class)); - cards.add(new SetCardInfo("Command Tower", 242, Rarity.COMMON, mage.cards.c.CommandTower.class)); - cards.add(new SetCardInfo("Commander's Sphere", 182, Rarity.COMMON, mage.cards.c.CommandersSphere.class)); - cards.add(new SetCardInfo("Corpsejack Menace", 152, Rarity.RARE, mage.cards.c.CorpsejackMenace.class)); - cards.add(new SetCardInfo("Crib Swap", 22, Rarity.UNCOMMON, mage.cards.c.CribSwap.class)); - cards.add(new SetCardInfo("Crystalline Crawler", 183, Rarity.RARE, mage.cards.c.CrystallineCrawler.class)); - cards.add(new SetCardInfo("Cultivate", 135, Rarity.COMMON, mage.cards.c.Cultivate.class)); - cards.add(new SetCardInfo("Curse of the Nightly Hunt", 90, Rarity.UNCOMMON, mage.cards.c.CurseOfTheNightlyHunt.class)); - cards.add(new SetCardInfo("Custodi Soulbinders", 23, Rarity.RARE, mage.cards.c.CustodiSoulbinders.class)); - cards.add(new SetCardInfo("Damia, Sage of Stone", 2, Rarity.MYTHIC, mage.cards.d.DamiaSageOfStone.class)); - cards.add(new SetCardInfo("Daretti, Scrap Savant", 4, Rarity.MYTHIC, mage.cards.d.DarettiScrapSavant.class)); - cards.add(new SetCardInfo("Dark Hatchling", 61, Rarity.RARE, mage.cards.d.DarkHatchling.class)); - cards.add(new SetCardInfo("Darksteel Citadel", 243, Rarity.UNCOMMON, mage.cards.d.DarksteelCitadel.class)); - cards.add(new SetCardInfo("Darksteel Ingot", 184, Rarity.UNCOMMON, mage.cards.d.DarksteelIngot.class)); - cards.add(new SetCardInfo("Darkwater Catacombs", 244, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class)); - cards.add(new SetCardInfo("Dawnbreak Reclaimer", 24, Rarity.RARE, mage.cards.d.DawnbreakReclaimer.class)); - cards.add(new SetCardInfo("Dawnglare Invoker", 25, Rarity.COMMON, mage.cards.d.DawnglareInvoker.class)); - cards.add(new SetCardInfo("Deepglow Skate", 39, Rarity.RARE, mage.cards.d.DeepglowSkate.class)); - cards.add(new SetCardInfo("Desecrator Hag", 153, Rarity.COMMON, mage.cards.d.DesecratorHag.class)); - cards.add(new SetCardInfo("Desolation Giant", 91, Rarity.RARE, mage.cards.d.DesolationGiant.class)); - cards.add(new SetCardInfo("Dimir Aqueduct", 245, Rarity.UNCOMMON, mage.cards.d.DimirAqueduct.class)); - cards.add(new SetCardInfo("Dimir Signet", 185, Rarity.COMMON, mage.cards.d.DimirSignet.class)); - cards.add(new SetCardInfo("Disaster Radius", 92, Rarity.RARE, mage.cards.d.DisasterRadius.class)); - cards.add(new SetCardInfo("Disdainful Stroke", 40, Rarity.COMMON, mage.cards.d.DisdainfulStroke.class)); - cards.add(new SetCardInfo("Dormant Volcano", 246, Rarity.UNCOMMON, mage.cards.d.DormantVolcano.class)); - cards.add(new SetCardInfo("Dreadship Reef", 247, Rarity.UNCOMMON, mage.cards.d.DreadshipReef.class)); - cards.add(new SetCardInfo("Dream Pillager", 93, Rarity.RARE, mage.cards.d.DreamPillager.class)); - cards.add(new SetCardInfo("Dreamborn Muse", 41, Rarity.RARE, mage.cards.d.DreambornMuse.class)); - cards.add(new SetCardInfo("Dreamstone Hedron", 186, Rarity.UNCOMMON, mage.cards.d.DreamstoneHedron.class)); - cards.add(new SetCardInfo("Drifting Meadow", 248, Rarity.COMMON, mage.cards.d.DriftingMeadow.class)); - cards.add(new SetCardInfo("Dualcaster Mage", 94, Rarity.RARE, mage.cards.d.DualcasterMage.class)); - cards.add(new SetCardInfo("Duelist's Heritage", 26, Rarity.RARE, mage.cards.d.DuelistsHeritage.class)); - cards.add(new SetCardInfo("Duneblast", 154, Rarity.RARE, mage.cards.d.Duneblast.class)); - cards.add(new SetCardInfo("Earthquake", 95, Rarity.RARE, mage.cards.e.Earthquake.class)); - cards.add(new SetCardInfo("Elite Scaleguard", 27, Rarity.UNCOMMON, mage.cards.e.EliteScaleguard.class)); - cards.add(new SetCardInfo("Enduring Scalelord", 155, Rarity.UNCOMMON, mage.cards.e.EnduringScalelord.class)); - cards.add(new SetCardInfo("Epochrasite", 187, Rarity.RARE, mage.cards.e.Epochrasite.class)); - cards.add(new SetCardInfo("Eternal Witness", 136, Rarity.UNCOMMON, mage.cards.e.EternalWitness.class)); - cards.add(new SetCardInfo("Everflowing Chalice", 188, Rarity.UNCOMMON, mage.cards.e.EverflowingChalice.class)); - cards.add(new SetCardInfo("Evolving Wilds", 249, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); - cards.add(new SetCardInfo("Exotic Orchard", 250, Rarity.RARE, mage.cards.e.ExoticOrchard.class)); - cards.add(new SetCardInfo("Extractor Demon", 62, Rarity.RARE, mage.cards.e.ExtractorDemon.class)); - cards.add(new SetCardInfo("Fact or Fiction", 42, Rarity.UNCOMMON, mage.cards.f.FactOrFiction.class)); - cards.add(new SetCardInfo("Faith's Fetters", 28, Rarity.COMMON, mage.cards.f.FaithsFetters.class)); - cards.add(new SetCardInfo("Faithless Looting", 96, Rarity.COMMON, mage.cards.f.FaithlessLooting.class)); - cards.add(new SetCardInfo("Fall of the Hammer", 97, Rarity.COMMON, mage.cards.f.FallOfTheHammer.class)); - cards.add(new SetCardInfo("Fathom Mage", 156, Rarity.RARE, mage.cards.f.FathomMage.class)); - cards.add(new SetCardInfo("Feldon of the Third Path", 6, Rarity.MYTHIC, mage.cards.f.FeldonOfTheThirdPath.class)); - cards.add(new SetCardInfo("Fellwar Stone", 189, Rarity.UNCOMMON, mage.cards.f.FellwarStone.class)); - cards.add(new SetCardInfo("Festercreep", 63, Rarity.COMMON, mage.cards.f.Festercreep.class)); - cards.add(new SetCardInfo("Fiery Confluence", 98, Rarity.RARE, mage.cards.f.FieryConfluence.class)); - cards.add(new SetCardInfo("Fire Diamond", 190, Rarity.UNCOMMON, mage.cards.f.FireDiamond.class)); - cards.add(new SetCardInfo("Flamekin Village", 251, Rarity.RARE, mage.cards.f.FlamekinVillage.class)); - cards.add(new SetCardInfo("Flametongue Kavu", 99, Rarity.UNCOMMON, mage.cards.f.FlametongueKavu.class)); - cards.add(new SetCardInfo("Fleshbag Marauder", 64, Rarity.UNCOMMON, mage.cards.f.FleshbagMarauder.class)); - cards.add(new SetCardInfo("Forest", 306, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 307, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 308, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 309, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 310, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 311, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 312, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forgotten Ancient", 137, Rarity.RARE, mage.cards.f.ForgottenAncient.class)); - cards.add(new SetCardInfo("Forgotten Cave", 252, Rarity.COMMON, mage.cards.f.ForgottenCave.class)); - cards.add(new SetCardInfo("Fumiko the Lowblood", 100, Rarity.RARE, mage.cards.f.FumikoTheLowblood.class)); - cards.add(new SetCardInfo("Ghave, Guru of Spores", 157, Rarity.MYTHIC, mage.cards.g.GhaveGuruOfSpores.class)); - cards.add(new SetCardInfo("Ghost Quarter", 253, Rarity.UNCOMMON, mage.cards.g.GhostQuarter.class)); - cards.add(new SetCardInfo("Gisela, Blade of Goldnight", 9, Rarity.MYTHIC, mage.cards.g.GiselaBladeOfGoldnight.class)); - cards.add(new SetCardInfo("Goblin Welder", 101, Rarity.RARE, mage.cards.g.GoblinWelder.class)); - cards.add(new SetCardInfo("Golgari Rot Farm", 254, Rarity.UNCOMMON, mage.cards.g.GolgariRotFarm.class)); - cards.add(new SetCardInfo("Golgari Signet", 191, Rarity.COMMON, mage.cards.g.GolgariSignet.class)); - cards.add(new SetCardInfo("Golgari Signet", 192, Rarity.COMMON, mage.cards.g.GolgariSignet.class)); - cards.add(new SetCardInfo("Grave Pact", 65, Rarity.RARE, mage.cards.g.GravePact.class)); - cards.add(new SetCardInfo("Gravedigger", 66, Rarity.COMMON, mage.cards.g.Gravedigger.class)); - cards.add(new SetCardInfo("Great Furnace", 255, Rarity.COMMON, mage.cards.g.GreatFurnace.class)); - cards.add(new SetCardInfo("Grip of Phyresis", 43, Rarity.UNCOMMON, mage.cards.g.GripOfPhyresis.class)); - cards.add(new SetCardInfo("Hamletback Goliath", 102, Rarity.RARE, mage.cards.h.HamletbackGoliath.class)); - cards.add(new SetCardInfo("Hammerfist Giant", 103, Rarity.RARE, mage.cards.h.HammerfistGiant.class)); - cards.add(new SetCardInfo("Hardened Scales", 138, Rarity.RARE, mage.cards.h.HardenedScales.class)); - cards.add(new SetCardInfo("Herald of the Host", 29, Rarity.UNCOMMON, mage.cards.h.HeraldOfTheHost.class)); - cards.add(new SetCardInfo("Hoard-Smelter Dragon", 104, Rarity.RARE, mage.cards.h.HoardSmelterDragon.class)); - cards.add(new SetCardInfo("Hostility", 105, Rarity.RARE, mage.cards.h.Hostility.class)); - cards.add(new SetCardInfo("Hunted Dragon", 106, Rarity.RARE, mage.cards.h.HuntedDragon.class)); - cards.add(new SetCardInfo("Ichor Wellspring", 193, Rarity.COMMON, mage.cards.i.IchorWellspring.class)); - cards.add(new SetCardInfo("Ikra Shidiqi, the Usurper", 11, Rarity.MYTHIC, mage.cards.i.IkraShidiqiTheUsurper.class)); - cards.add(new SetCardInfo("Impact Resonance", 107, Rarity.RARE, mage.cards.i.ImpactResonance.class)); - cards.add(new SetCardInfo("Incite Rebellion", 108, Rarity.RARE, mage.cards.i.InciteRebellion.class)); - cards.add(new SetCardInfo("Inferno Titan", 109, Rarity.MYTHIC, mage.cards.i.InfernoTitan.class)); - cards.add(new SetCardInfo("Ingot Chewer", 110, Rarity.COMMON, mage.cards.i.IngotChewer.class)); - cards.add(new SetCardInfo("Inspiring Call", 139, Rarity.UNCOMMON, mage.cards.i.InspiringCall.class)); - cards.add(new SetCardInfo("Ishai, Ojutai Dragonspeaker", 12, Rarity.MYTHIC, mage.cards.i.IshaiOjutaiDragonspeaker.class)); - cards.add(new SetCardInfo("Island", 286, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 287, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 289, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 290, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 291, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 292, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Jalum Tome", 194, Rarity.RARE, mage.cards.j.JalumTome.class)); - cards.add(new SetCardInfo("Jareth, Leonine Titan", 30, Rarity.COMMON, mage.cards.j.JarethLeonineTitan.class)); - cards.add(new SetCardInfo("Juniper Order Ranger", 158, Rarity.UNCOMMON, mage.cards.j.JuniperOrderRanger.class)); - cards.add(new SetCardInfo("Junk Diver", 195, Rarity.RARE, mage.cards.j.JunkDiver.class)); - cards.add(new SetCardInfo("Jwar Isle Refuge", 256, Rarity.UNCOMMON, mage.cards.j.JwarIsleRefuge.class)); - cards.add(new SetCardInfo("Kalemne, Disciple of Iroas", 7, Rarity.MYTHIC, mage.cards.k.KalemneDiscipleOfIroas.class)); - cards.add(new SetCardInfo("Kalemne's Captain", 31, Rarity.RARE, mage.cards.k.KalemnesCaptain.class)); - cards.add(new SetCardInfo("Kalonian Hydra", 140, Rarity.MYTHIC, mage.cards.k.KalonianHydra.class)); - cards.add(new SetCardInfo("Languish", 67, Rarity.RARE, mage.cards.l.Languish.class)); - cards.add(new SetCardInfo("Lhurgoyf", 141, Rarity.RARE, mage.cards.l.Lhurgoyf.class)); - cards.add(new SetCardInfo("Lightning Greaves", 196, Rarity.UNCOMMON, mage.cards.l.LightningGreaves.class)); - cards.add(new SetCardInfo("Liquimetal Coating", 197, Rarity.UNCOMMON, mage.cards.l.LiquimetalCoating.class)); - cards.add(new SetCardInfo("Living Death", 68, Rarity.RARE, mage.cards.l.LivingDeath.class)); - cards.add(new SetCardInfo("Lonely Sandbar", 257, Rarity.COMMON, mage.cards.l.LonelySandbar.class)); - cards.add(new SetCardInfo("Loreseeker's Stone", 198, Rarity.UNCOMMON, mage.cards.l.LoreseekersStone.class)); - cards.add(new SetCardInfo("Loxodon Warhammer", 199, Rarity.UNCOMMON, mage.cards.l.LoxodonWarhammer.class)); - cards.add(new SetCardInfo("Magma Giant", 111, Rarity.RARE, mage.cards.m.MagmaGiant.class)); - cards.add(new SetCardInfo("Magmaquake", 112, Rarity.RARE, mage.cards.m.Magmaquake.class)); - cards.add(new SetCardInfo("Magus of the Wheel", 113, Rarity.RARE, mage.cards.m.MagusOfTheWheel.class)); - cards.add(new SetCardInfo("Manifold Insights", 44, Rarity.RARE, mage.cards.m.ManifoldInsights.class)); - cards.add(new SetCardInfo("Master Biomancer", 159, Rarity.MYTHIC, mage.cards.m.MasterBiomancer.class)); - cards.add(new SetCardInfo("Memory Erosion", 45, Rarity.RARE, mage.cards.m.MemoryErosion.class)); - cards.add(new SetCardInfo("Merciless Eviction", 160, Rarity.RARE, mage.cards.m.MercilessEviction.class)); - cards.add(new SetCardInfo("Meteor Blast", 114, Rarity.UNCOMMON, mage.cards.m.MeteorBlast.class)); - cards.add(new SetCardInfo("Migratory Route", 161, Rarity.UNCOMMON, mage.cards.m.MigratoryRoute.class)); - cards.add(new SetCardInfo("Mind Stone", 200, Rarity.UNCOMMON, mage.cards.m.MindStone.class)); - cards.add(new SetCardInfo("Minds Aglow", 46, Rarity.RARE, mage.cards.m.MindsAglow.class)); - cards.add(new SetCardInfo("Mirrorweave", 162, Rarity.RARE, mage.cards.m.Mirrorweave.class)); - cards.add(new SetCardInfo("Mortify", 163, Rarity.UNCOMMON, mage.cards.m.Mortify.class)); - cards.add(new SetCardInfo("Mortivore", 69, Rarity.RARE, mage.cards.m.Mortivore.class)); - cards.add(new SetCardInfo("Mountain", 300, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 301, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 302, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 303, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 304, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 305, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mulldrifter", 47, Rarity.UNCOMMON, mage.cards.m.Mulldrifter.class)); - cards.add(new SetCardInfo("Murmuring Bosk", 258, Rarity.RARE, mage.cards.m.MurmuringBosk.class)); - cards.add(new SetCardInfo("Mycosynth Wellspring", 201, Rarity.COMMON, mage.cards.m.MycosynthWellspring.class)); - cards.add(new SetCardInfo("Myr Battlesphere", 202, Rarity.RARE, mage.cards.m.MyrBattlesphere.class)); - cards.add(new SetCardInfo("Myr Retriever", 203, Rarity.UNCOMMON, mage.cards.m.MyrRetriever.class)); - cards.add(new SetCardInfo("Myr Sire", 204, Rarity.COMMON, mage.cards.m.MyrSire.class)); - cards.add(new SetCardInfo("Necroplasm", 70, Rarity.RARE, mage.cards.n.Necroplasm.class)); - cards.add(new SetCardInfo("Nezumi Graverobber", 71, Rarity.UNCOMMON, mage.cards.n.NezumiGraverobber.class)); - cards.add(new SetCardInfo("Oblivion Stone", 205, Rarity.RARE, mage.cards.o.OblivionStone.class)); - cards.add(new SetCardInfo("Opal Palace", 259, Rarity.COMMON, mage.cards.o.OpalPalace.class)); - cards.add(new SetCardInfo("Opulent Palace", 260, Rarity.UNCOMMON, mage.cards.o.OpulentPalace.class)); - cards.add(new SetCardInfo("Oreskos Explorer", 32, Rarity.UNCOMMON, mage.cards.o.OreskosExplorer.class)); - cards.add(new SetCardInfo("Orim's Thunder", 33, Rarity.COMMON, mage.cards.o.OrimsThunder.class)); - cards.add(new SetCardInfo("Orzhov Advokist", 34, Rarity.UNCOMMON, mage.cards.o.OrzhovAdvokist.class)); - cards.add(new SetCardInfo("Orzhov Signet", 206, Rarity.COMMON, mage.cards.o.OrzhovSignet.class)); - cards.add(new SetCardInfo("Palladium Myr", 207, Rarity.UNCOMMON, mage.cards.p.PalladiumMyr.class)); - cards.add(new SetCardInfo("Panic Spellbomb", 208, Rarity.COMMON, mage.cards.p.PanicSpellbomb.class)); - cards.add(new SetCardInfo("Patron of the Nezumi", 72, Rarity.RARE, mage.cards.p.PatronOfTheNezumi.class)); - cards.add(new SetCardInfo("Pentavus", 209, Rarity.RARE, mage.cards.p.Pentavus.class)); - cards.add(new SetCardInfo("Phyrexia's Core", 261, Rarity.UNCOMMON, mage.cards.p.PhyrexiasCore.class)); - cards.add(new SetCardInfo("Pilgrim's Eye", 210, Rarity.COMMON, mage.cards.p.PilgrimsEye.class)); - cards.add(new SetCardInfo("Plains", 279, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 280, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 281, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 282, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 283, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 284, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 285, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Pristine Talisman", 211, Rarity.COMMON, mage.cards.p.PristineTalisman.class)); - cards.add(new SetCardInfo("Putrefy", 164, Rarity.UNCOMMON, mage.cards.p.Putrefy.class)); - cards.add(new SetCardInfo("Relic Crush", 142, Rarity.COMMON, mage.cards.r.RelicCrush.class)); - cards.add(new SetCardInfo("Reliquary Tower", 262, Rarity.UNCOMMON, mage.cards.r.ReliquaryTower.class)); - cards.add(new SetCardInfo("Reveillark", 35, Rarity.RARE, mage.cards.r.Reveillark.class)); - cards.add(new SetCardInfo("Reyhan, Last of the Abzan", 13, Rarity.RARE, mage.cards.r.ReyhanLastOfTheAbzan.class)); - cards.add(new SetCardInfo("Riddlekeeper", 48, Rarity.RARE, mage.cards.r.Riddlekeeper.class)); - cards.add(new SetCardInfo("Rise from the Grave", 73, Rarity.UNCOMMON, mage.cards.r.RiseFromTheGrave.class)); - cards.add(new SetCardInfo("Rite of the Raging Storm", 115, Rarity.UNCOMMON, mage.cards.r.RiteOfTheRagingStorm.class)); - cards.add(new SetCardInfo("Ruby Medallion", 212, Rarity.RARE, mage.cards.r.RubyMedallion.class)); - cards.add(new SetCardInfo("Rupture Spire", 263, Rarity.COMMON, mage.cards.r.RuptureSpire.class)); - cards.add(new SetCardInfo("Sandsteppe Citadel", 264, Rarity.UNCOMMON, mage.cards.s.SandsteppeCitadel.class)); - cards.add(new SetCardInfo("Sandstone Oracle", 213, Rarity.UNCOMMON, mage.cards.s.SandstoneOracle.class)); - cards.add(new SetCardInfo("Scavenging Ooze", 143, Rarity.RARE, mage.cards.s.ScavengingOoze.class)); - cards.add(new SetCardInfo("Scrap Mastery", 116, Rarity.RARE, mage.cards.s.ScrapMastery.class)); - cards.add(new SetCardInfo("Scythe Specter", 74, Rarity.RARE, mage.cards.s.ScytheSpecter.class)); - cards.add(new SetCardInfo("Seaside Citadel", 265, Rarity.UNCOMMON, mage.cards.s.SeasideCitadel.class)); - cards.add(new SetCardInfo("Secluded Steppe", 266, Rarity.COMMON, mage.cards.s.SecludedSteppe.class)); - cards.add(new SetCardInfo("Seer's Sundial", 214, Rarity.RARE, mage.cards.s.SeersSundial.class)); - cards.add(new SetCardInfo("Sewer Nemesis", 75, Rarity.RARE, mage.cards.s.SewerNemesis.class)); - cards.add(new SetCardInfo("Shared Trauma", 76, Rarity.RARE, mage.cards.s.SharedTrauma.class)); - cards.add(new SetCardInfo("Sign in Blood", 77, Rarity.COMMON, mage.cards.s.SignInBlood.class)); - cards.add(new SetCardInfo("Simic Growth Chamber", 267, Rarity.UNCOMMON, mage.cards.s.SimicGrowthChamber.class)); - cards.add(new SetCardInfo("Simic Signet", 215, Rarity.COMMON, mage.cards.s.SimicSignet.class)); - cards.add(new SetCardInfo("Simic Signet", 216, Rarity.COMMON, mage.cards.s.SimicSignet.class)); - cards.add(new SetCardInfo("Skullbriar, the Walking Grave", 165, Rarity.RARE, mage.cards.s.SkullbriarTheWalkingGrave.class)); - cards.add(new SetCardInfo("Slipstream Eel", 49, Rarity.COMMON, mage.cards.s.SlipstreamEel.class)); - cards.add(new SetCardInfo("Smoldering Crater", 268, Rarity.COMMON, mage.cards.s.SmolderingCrater.class)); - cards.add(new SetCardInfo("Sol Ring", 217, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); - cards.add(new SetCardInfo("Solemn Simulacrum", 218, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); - cards.add(new SetCardInfo("Solemn Simulacrum", 219, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); - cards.add(new SetCardInfo("Solidarity of Heroes", 144, Rarity.UNCOMMON, mage.cards.s.SolidarityOfHeroes.class)); - cards.add(new SetCardInfo("Spell Crumple", 50, Rarity.UNCOMMON, mage.cards.s.SpellCrumple.class)); - cards.add(new SetCardInfo("Spine of Ish Sah", 220, Rarity.RARE, mage.cards.s.SpineOfIshSah.class)); - cards.add(new SetCardInfo("Spitebellows", 117, Rarity.UNCOMMON, mage.cards.s.Spitebellows.class)); - cards.add(new SetCardInfo("Spitting Image", 166, Rarity.RARE, mage.cards.s.SpittingImage.class)); - cards.add(new SetCardInfo("Staff of Nin", 221, Rarity.RARE, mage.cards.s.StaffOfNin.class)); - cards.add(new SetCardInfo("Starstorm", 118, Rarity.RARE, mage.cards.s.Starstorm.class)); - cards.add(new SetCardInfo("Steel Hellkite", 222, Rarity.RARE, mage.cards.s.SteelHellkite.class)); - cards.add(new SetCardInfo("Stinkdrinker Daredevil", 119, Rarity.COMMON, mage.cards.s.StinkdrinkerDaredevil.class)); - cards.add(new SetCardInfo("Stitch Together", 78, Rarity.UNCOMMON, mage.cards.s.StitchTogether.class)); - cards.add(new SetCardInfo("Stoneshock Giant", 120, Rarity.UNCOMMON, mage.cards.s.StoneshockGiant.class)); - cards.add(new SetCardInfo("Sublime Exhalation", 36, Rarity.RARE, mage.cards.s.SublimeExhalation.class)); - cards.add(new SetCardInfo("Sun Titan", 37, Rarity.MYTHIC, mage.cards.s.SunTitan.class)); - cards.add(new SetCardInfo("Sungrass Prairie", 269, Rarity.RARE, mage.cards.s.SungrassPrairie.class)); - cards.add(new SetCardInfo("Sunrise Sovereign", 121, Rarity.RARE, mage.cards.s.SunriseSovereign.class)); - cards.add(new SetCardInfo("Svogthos, the Restless Tomb", 270, Rarity.UNCOMMON, mage.cards.s.SvogthosTheRestlessTomb.class)); - cards.add(new SetCardInfo("Swamp", 293, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 294, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 295, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 296, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 297, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 298, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 299, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swiftfoot Boots", 223, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class)); - cards.add(new SetCardInfo("Sylvan Reclamation", 167, Rarity.UNCOMMON, mage.cards.s.SylvanReclamation.class)); - cards.add(new SetCardInfo("Syphon Flesh", 79, Rarity.UNCOMMON, mage.cards.s.SyphonFlesh.class)); - cards.add(new SetCardInfo("Syphon Mind", 80, Rarity.COMMON, mage.cards.s.SyphonMind.class)); - cards.add(new SetCardInfo("Szadek, Lord of Secrets", 168, Rarity.RARE, mage.cards.s.SzadekLordOfSecrets.class)); - cards.add(new SetCardInfo("Taurean Mauler", 122, Rarity.RARE, mage.cards.t.TaureanMauler.class)); - cards.add(new SetCardInfo("Temple of the False God", 271, Rarity.UNCOMMON, mage.cards.t.TempleOfTheFalseGod.class)); - cards.add(new SetCardInfo("Temple of the False God", 272, Rarity.UNCOMMON, mage.cards.t.TempleOfTheFalseGod.class)); - cards.add(new SetCardInfo("Terramorphic Expanse", 273, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class)); - cards.add(new SetCardInfo("Tezzeret's Gambit", 51, Rarity.UNCOMMON, mage.cards.t.TezzeretsGambit.class)); - cards.add(new SetCardInfo("The Mimeoplasm", 1, Rarity.MYTHIC, mage.cards.t.TheMimeoplasm.class)); - cards.add(new SetCardInfo("Thought Vessel", 224, Rarity.COMMON, mage.cards.t.ThoughtVessel.class)); - cards.add(new SetCardInfo("Thrummingbird", 52, Rarity.UNCOMMON, mage.cards.t.Thrummingbird.class)); - cards.add(new SetCardInfo("Thundercloud Shaman", 123, Rarity.UNCOMMON, mage.cards.t.ThundercloudShaman.class)); - cards.add(new SetCardInfo("Trading Post", 225, Rarity.RARE, mage.cards.t.TradingPost.class)); - cards.add(new SetCardInfo("Tranquil Thicket", 274, Rarity.COMMON, mage.cards.t.TranquilThicket.class)); - cards.add(new SetCardInfo("Treasure Cruise", 53, Rarity.COMMON, mage.cards.t.TreasureCruise.class)); - cards.add(new SetCardInfo("Tribute to the Wild", 145, Rarity.UNCOMMON, mage.cards.t.TributeToTheWild.class)); - cards.add(new SetCardInfo("Triskelavus", 226, Rarity.RARE, mage.cards.t.Triskelavus.class)); - cards.add(new SetCardInfo("Troll Ascetic", 146, Rarity.RARE, mage.cards.t.TrollAscetic.class)); - cards.add(new SetCardInfo("Tuktuk the Explorer", 124, Rarity.RARE, mage.cards.t.TuktukTheExplorer.class)); - cards.add(new SetCardInfo("Tuskguard Captain", 147, Rarity.UNCOMMON, mage.cards.t.TuskguardCaptain.class)); - cards.add(new SetCardInfo("Tyrant's Familiar", 125, Rarity.RARE, mage.cards.t.TyrantsFamiliar.class)); - cards.add(new SetCardInfo("Underground River", 275, Rarity.RARE, mage.cards.u.UndergroundRiver.class)); - cards.add(new SetCardInfo("Unnerve", 81, Rarity.COMMON, mage.cards.u.Unnerve.class)); - cards.add(new SetCardInfo("Unstable Obelisk", 227, Rarity.UNCOMMON, mage.cards.u.UnstableObelisk.class)); - cards.add(new SetCardInfo("Urza's Incubator", 228, Rarity.RARE, mage.cards.u.UrzasIncubator.class)); - cards.add(new SetCardInfo("Victory's Herald", 38, Rarity.RARE, mage.cards.v.VictorysHerald.class)); - cards.add(new SetCardInfo("Vivid Crag", 276, Rarity.UNCOMMON, mage.cards.v.VividCrag.class)); - cards.add(new SetCardInfo("Vivid Meadow", 277, Rarity.UNCOMMON, mage.cards.v.VividMeadow.class)); - cards.add(new SetCardInfo("Volcanic Offering", 126, Rarity.RARE, mage.cards.v.VolcanicOffering.class)); - cards.add(new SetCardInfo("Vorel of the Hull Clade", 169, Rarity.RARE, mage.cards.v.VorelOfTheHullClade.class)); - cards.add(new SetCardInfo("Vorosh, the Hunter", 3, Rarity.RARE, mage.cards.v.VoroshTheHunter.class)); - cards.add(new SetCardInfo("Vow of Flight", 54, Rarity.UNCOMMON, mage.cards.v.VowOfFlight.class)); - cards.add(new SetCardInfo("Vow of Malice", 82, Rarity.UNCOMMON, mage.cards.v.VowOfMalice.class)); - cards.add(new SetCardInfo("Vow of Wildness", 148, Rarity.UNCOMMON, mage.cards.v.VowOfWildness.class)); - cards.add(new SetCardInfo("Vulturous Zombie", 170, Rarity.RARE, mage.cards.v.VulturousZombie.class)); - cards.add(new SetCardInfo("Warchief Giant", 127, Rarity.UNCOMMON, mage.cards.w.WarchiefGiant.class)); - cards.add(new SetCardInfo("Warmonger Hellkite", 128, Rarity.RARE, mage.cards.w.WarmongerHellkite.class)); - cards.add(new SetCardInfo("Warstorm Surge", 129, Rarity.RARE, mage.cards.w.WarstormSurge.class)); - cards.add(new SetCardInfo("Wayfarer's Bauble", 229, Rarity.COMMON, mage.cards.w.WayfarersBauble.class)); - cards.add(new SetCardInfo("Whipflare", 130, Rarity.UNCOMMON, mage.cards.w.Whipflare.class)); - cards.add(new SetCardInfo("Wind-Scarred Crag", 278, Rarity.COMMON, mage.cards.w.WindScarredCrag.class)); - cards.add(new SetCardInfo("Windfall", 55, Rarity.UNCOMMON, mage.cards.w.Windfall.class)); - cards.add(new SetCardInfo("Wonder", 56, Rarity.UNCOMMON, mage.cards.w.Wonder.class)); - cards.add(new SetCardInfo("Word of Seizing", 131, Rarity.RARE, mage.cards.w.WordOfSeizing.class)); - cards.add(new SetCardInfo("Worn Powerstone", 230, Rarity.UNCOMMON, mage.cards.w.WornPowerstone.class)); - cards.add(new SetCardInfo("Wrexial, the Risen Deep", 171, Rarity.MYTHIC, mage.cards.w.WrexialTheRisenDeep.class)); - cards.add(new SetCardInfo("Wurmcoil Engine", 231, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class)); - cards.add(new SetCardInfo("Yavimaya Elder", 149, Rarity.COMMON, mage.cards.y.YavimayaElder.class)); - } -} +package mage.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author rystan + */ +public class CommanderAnthologyVolumeII extends ExpansionSet { + + private static final CommanderAnthologyVolumeII instance = new CommanderAnthologyVolumeII(); + + public static CommanderAnthologyVolumeII getInstance() { + return instance; + } + + private CommanderAnthologyVolumeII() { + super("Commander Anthology 2018", "CM2", ExpansionSet.buildDate(2018, 6, 8), SetType.SUPPLEMENTAL); + this.blockName = "Commander Anthology 2018"; + this.hasBasicLands = false; + + cards.add(new SetCardInfo("Abzan Falconer", 15, Rarity.UNCOMMON, mage.cards.a.AbzanFalconer.class)); + cards.add(new SetCardInfo("Acidic Slime", 132, Rarity.UNCOMMON, mage.cards.a.AcidicSlime.class)); + cards.add(new SetCardInfo("Ancient Amphitheater", 232, Rarity.RARE, mage.cards.a.AncientAmphitheater.class)); + cards.add(new SetCardInfo("Ancient Excavation", 150, Rarity.UNCOMMON, mage.cards.a.AncientExcavation.class)); + cards.add(new SetCardInfo("Angel of Serenity", 16, Rarity.MYTHIC, mage.cards.a.AngelOfSerenity.class)); + cards.add(new SetCardInfo("Anya, Merciless Angel", 8, Rarity.MYTHIC, mage.cards.a.AnyaMercilessAngel.class)); + cards.add(new SetCardInfo("Arbiter of Knollridge", 17, Rarity.RARE, mage.cards.a.ArbiterOfKnollridge.class)); + cards.add(new SetCardInfo("Arcane Lighthouse", 233, Rarity.UNCOMMON, mage.cards.a.ArcaneLighthouse.class)); + cards.add(new SetCardInfo("Arcane Sanctum", 234, Rarity.UNCOMMON, mage.cards.a.ArcaneSanctum.class)); + cards.add(new SetCardInfo("Artisan of Kozilek", 14, Rarity.UNCOMMON, mage.cards.a.ArtisanOfKozilek.class)); + cards.add(new SetCardInfo("Ash Barrens", 235, Rarity.COMMON, mage.cards.a.AshBarrens.class)); + cards.add(new SetCardInfo("Astral Cornucopia", 172, Rarity.RARE, mage.cards.a.AstralCornucopia.class)); + cards.add(new SetCardInfo("Atraxa, Praetors' Voice", 10, Rarity.MYTHIC, mage.cards.a.AtraxaPraetorsVoice.class)); + cards.add(new SetCardInfo("Avatar of Woe", 57, Rarity.RARE, mage.cards.a.AvatarOfWoe.class)); + cards.add(new SetCardInfo("Azorius Chancery", 236, Rarity.UNCOMMON, mage.cards.a.AzoriusChancery.class)); + cards.add(new SetCardInfo("Bane of the Living", 58, Rarity.RARE, mage.cards.b.BaneOfTheLiving.class)); + cards.add(new SetCardInfo("Banishing Light", 18, Rarity.UNCOMMON, mage.cards.b.BanishingLight.class)); + cards.add(new SetCardInfo("Barren Moor", 237, Rarity.COMMON, mage.cards.b.BarrenMoor.class)); + cards.add(new SetCardInfo("Basalt Monolith", 173, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class)); + cards.add(new SetCardInfo("Beetleback Chief", 83, Rarity.UNCOMMON, mage.cards.b.BeetlebackChief.class)); + cards.add(new SetCardInfo("Bitter Feud", 84, Rarity.RARE, mage.cards.b.BitterFeud.class)); + cards.add(new SetCardInfo("Blade of Selves", 174, Rarity.RARE, mage.cards.b.BladeOfSelves.class)); + cards.add(new SetCardInfo("Blasphemous Act", 85, Rarity.RARE, mage.cards.b.BlasphemousAct.class)); + cards.add(new SetCardInfo("Blasted Landscape", 238, Rarity.UNCOMMON, mage.cards.b.BlastedLandscape.class)); + cards.add(new SetCardInfo("Bogardan Hellkite", 86, Rarity.MYTHIC, mage.cards.b.BogardanHellkite.class)); + cards.add(new SetCardInfo("Borderland Behemoth", 87, Rarity.RARE, mage.cards.b.BorderlandBehemoth.class)); + cards.add(new SetCardInfo("Boros Cluestone", 175, Rarity.COMMON, mage.cards.b.BorosCluestone.class)); + cards.add(new SetCardInfo("Boros Garrison", 239, Rarity.UNCOMMON, mage.cards.b.BorosGarrison.class)); + cards.add(new SetCardInfo("Boros Guildgate", 240, Rarity.COMMON, mage.cards.b.BorosGuildgate.class)); + cards.add(new SetCardInfo("Boros Signet", 176, Rarity.COMMON, mage.cards.b.BorosSignet.class)); + cards.add(new SetCardInfo("Bosh, Iron Golem", 5, Rarity.RARE, mage.cards.b.BoshIronGolem.class)); + cards.add(new SetCardInfo("Bottle Gnomes", 177, Rarity.UNCOMMON, mage.cards.b.BottleGnomes.class)); + cards.add(new SetCardInfo("Brave the Sands", 19, Rarity.UNCOMMON, mage.cards.b.BraveTheSands.class)); + cards.add(new SetCardInfo("Brawn", 133, Rarity.UNCOMMON, mage.cards.b.Brawn.class)); + cards.add(new SetCardInfo("Breath of Darigaaz", 88, Rarity.UNCOMMON, mage.cards.b.BreathOfDarigaaz.class)); + cards.add(new SetCardInfo("Bred for the Hunt", 151, Rarity.UNCOMMON, mage.cards.b.BredForTheHunt.class)); + cards.add(new SetCardInfo("Buried Alive", 59, Rarity.UNCOMMON, mage.cards.b.BuriedAlive.class)); + cards.add(new SetCardInfo("Buried Ruin", 241, Rarity.UNCOMMON, mage.cards.b.BuriedRuin.class)); + cards.add(new SetCardInfo("Butcher of Malakir", 60, Rarity.RARE, mage.cards.b.ButcherOfMalakir.class)); + cards.add(new SetCardInfo("Caged Sun", 178, Rarity.RARE, mage.cards.c.CagedSun.class)); + cards.add(new SetCardInfo("Cathars' Crusade", 20, Rarity.RARE, mage.cards.c.CatharsCrusade.class)); + cards.add(new SetCardInfo("Cathodion", 179, Rarity.UNCOMMON, mage.cards.c.Cathodion.class)); + cards.add(new SetCardInfo("Cauldron of Souls", 180, Rarity.RARE, mage.cards.c.CauldronOfSouls.class)); + cards.add(new SetCardInfo("Champion of Lambholt", 134, Rarity.RARE, mage.cards.c.ChampionOfLambholt.class)); + cards.add(new SetCardInfo("Chaos Warp", 89, Rarity.RARE, mage.cards.c.ChaosWarp.class)); + cards.add(new SetCardInfo("Citadel Siege", 21, Rarity.RARE, mage.cards.c.CitadelSiege.class)); + cards.add(new SetCardInfo("Coldsteel Heart", 181, Rarity.UNCOMMON, mage.cards.c.ColdsteelHeart.class)); + cards.add(new SetCardInfo("Command Tower", 242, Rarity.COMMON, mage.cards.c.CommandTower.class)); + cards.add(new SetCardInfo("Commander's Sphere", 182, Rarity.COMMON, mage.cards.c.CommandersSphere.class)); + cards.add(new SetCardInfo("Corpsejack Menace", 152, Rarity.RARE, mage.cards.c.CorpsejackMenace.class)); + cards.add(new SetCardInfo("Crib Swap", 22, Rarity.UNCOMMON, mage.cards.c.CribSwap.class)); + cards.add(new SetCardInfo("Crystalline Crawler", 183, Rarity.RARE, mage.cards.c.CrystallineCrawler.class)); + cards.add(new SetCardInfo("Cultivate", 135, Rarity.COMMON, mage.cards.c.Cultivate.class)); + cards.add(new SetCardInfo("Curse of the Nightly Hunt", 90, Rarity.UNCOMMON, mage.cards.c.CurseOfTheNightlyHunt.class)); + cards.add(new SetCardInfo("Custodi Soulbinders", 23, Rarity.RARE, mage.cards.c.CustodiSoulbinders.class)); + cards.add(new SetCardInfo("Damia, Sage of Stone", 2, Rarity.MYTHIC, mage.cards.d.DamiaSageOfStone.class)); + cards.add(new SetCardInfo("Daretti, Scrap Savant", 4, Rarity.MYTHIC, mage.cards.d.DarettiScrapSavant.class)); + cards.add(new SetCardInfo("Dark Hatchling", 61, Rarity.RARE, mage.cards.d.DarkHatchling.class)); + cards.add(new SetCardInfo("Darksteel Citadel", 243, Rarity.UNCOMMON, mage.cards.d.DarksteelCitadel.class)); + cards.add(new SetCardInfo("Darksteel Ingot", 184, Rarity.UNCOMMON, mage.cards.d.DarksteelIngot.class)); + cards.add(new SetCardInfo("Darkwater Catacombs", 244, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class)); + cards.add(new SetCardInfo("Dawnbreak Reclaimer", 24, Rarity.RARE, mage.cards.d.DawnbreakReclaimer.class)); + cards.add(new SetCardInfo("Dawnglare Invoker", 25, Rarity.COMMON, mage.cards.d.DawnglareInvoker.class)); + cards.add(new SetCardInfo("Deepglow Skate", 39, Rarity.RARE, mage.cards.d.DeepglowSkate.class)); + cards.add(new SetCardInfo("Desecrator Hag", 153, Rarity.COMMON, mage.cards.d.DesecratorHag.class)); + cards.add(new SetCardInfo("Desolation Giant", 91, Rarity.RARE, mage.cards.d.DesolationGiant.class)); + cards.add(new SetCardInfo("Dimir Aqueduct", 245, Rarity.UNCOMMON, mage.cards.d.DimirAqueduct.class)); + cards.add(new SetCardInfo("Dimir Signet", 185, Rarity.COMMON, mage.cards.d.DimirSignet.class)); + cards.add(new SetCardInfo("Disaster Radius", 92, Rarity.RARE, mage.cards.d.DisasterRadius.class)); + cards.add(new SetCardInfo("Disdainful Stroke", 40, Rarity.COMMON, mage.cards.d.DisdainfulStroke.class)); + cards.add(new SetCardInfo("Dormant Volcano", 246, Rarity.UNCOMMON, mage.cards.d.DormantVolcano.class)); + cards.add(new SetCardInfo("Dreadship Reef", 247, Rarity.UNCOMMON, mage.cards.d.DreadshipReef.class)); + cards.add(new SetCardInfo("Dream Pillager", 93, Rarity.RARE, mage.cards.d.DreamPillager.class)); + cards.add(new SetCardInfo("Dreamborn Muse", 41, Rarity.RARE, mage.cards.d.DreambornMuse.class)); + cards.add(new SetCardInfo("Dreamstone Hedron", 186, Rarity.UNCOMMON, mage.cards.d.DreamstoneHedron.class)); + cards.add(new SetCardInfo("Drifting Meadow", 248, Rarity.COMMON, mage.cards.d.DriftingMeadow.class)); + cards.add(new SetCardInfo("Dualcaster Mage", 94, Rarity.RARE, mage.cards.d.DualcasterMage.class)); + cards.add(new SetCardInfo("Duelist's Heritage", 26, Rarity.RARE, mage.cards.d.DuelistsHeritage.class)); + cards.add(new SetCardInfo("Duneblast", 154, Rarity.RARE, mage.cards.d.Duneblast.class)); + cards.add(new SetCardInfo("Earthquake", 95, Rarity.RARE, mage.cards.e.Earthquake.class)); + cards.add(new SetCardInfo("Elite Scaleguard", 27, Rarity.UNCOMMON, mage.cards.e.EliteScaleguard.class)); + cards.add(new SetCardInfo("Enduring Scalelord", 155, Rarity.UNCOMMON, mage.cards.e.EnduringScalelord.class)); + cards.add(new SetCardInfo("Epochrasite", 187, Rarity.RARE, mage.cards.e.Epochrasite.class)); + cards.add(new SetCardInfo("Eternal Witness", 136, Rarity.UNCOMMON, mage.cards.e.EternalWitness.class)); + cards.add(new SetCardInfo("Everflowing Chalice", 188, Rarity.UNCOMMON, mage.cards.e.EverflowingChalice.class)); + cards.add(new SetCardInfo("Evolving Wilds", 249, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); + cards.add(new SetCardInfo("Exotic Orchard", 250, Rarity.RARE, mage.cards.e.ExoticOrchard.class)); + cards.add(new SetCardInfo("Extractor Demon", 62, Rarity.RARE, mage.cards.e.ExtractorDemon.class)); + cards.add(new SetCardInfo("Fact or Fiction", 42, Rarity.UNCOMMON, mage.cards.f.FactOrFiction.class)); + cards.add(new SetCardInfo("Faith's Fetters", 28, Rarity.COMMON, mage.cards.f.FaithsFetters.class)); + cards.add(new SetCardInfo("Faithless Looting", 96, Rarity.COMMON, mage.cards.f.FaithlessLooting.class)); + cards.add(new SetCardInfo("Fall of the Hammer", 97, Rarity.COMMON, mage.cards.f.FallOfTheHammer.class)); + cards.add(new SetCardInfo("Fathom Mage", 156, Rarity.RARE, mage.cards.f.FathomMage.class)); + cards.add(new SetCardInfo("Feldon of the Third Path", 6, Rarity.MYTHIC, mage.cards.f.FeldonOfTheThirdPath.class)); + cards.add(new SetCardInfo("Fellwar Stone", 189, Rarity.UNCOMMON, mage.cards.f.FellwarStone.class)); + cards.add(new SetCardInfo("Festercreep", 63, Rarity.COMMON, mage.cards.f.Festercreep.class)); + cards.add(new SetCardInfo("Fiery Confluence", 98, Rarity.RARE, mage.cards.f.FieryConfluence.class)); + cards.add(new SetCardInfo("Fire Diamond", 190, Rarity.UNCOMMON, mage.cards.f.FireDiamond.class)); + cards.add(new SetCardInfo("Flamekin Village", 251, Rarity.RARE, mage.cards.f.FlamekinVillage.class)); + cards.add(new SetCardInfo("Flametongue Kavu", 99, Rarity.UNCOMMON, mage.cards.f.FlametongueKavu.class)); + cards.add(new SetCardInfo("Fleshbag Marauder", 64, Rarity.UNCOMMON, mage.cards.f.FleshbagMarauder.class)); + cards.add(new SetCardInfo("Forest", 306, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 307, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 308, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 309, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 310, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 311, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 312, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forgotten Ancient", 137, Rarity.RARE, mage.cards.f.ForgottenAncient.class)); + cards.add(new SetCardInfo("Forgotten Cave", 252, Rarity.COMMON, mage.cards.f.ForgottenCave.class)); + cards.add(new SetCardInfo("Fumiko the Lowblood", 100, Rarity.RARE, mage.cards.f.FumikoTheLowblood.class)); + cards.add(new SetCardInfo("Ghave, Guru of Spores", 157, Rarity.MYTHIC, mage.cards.g.GhaveGuruOfSpores.class)); + cards.add(new SetCardInfo("Ghost Quarter", 253, Rarity.UNCOMMON, mage.cards.g.GhostQuarter.class)); + cards.add(new SetCardInfo("Gisela, Blade of Goldnight", 9, Rarity.MYTHIC, mage.cards.g.GiselaBladeOfGoldnight.class)); + cards.add(new SetCardInfo("Goblin Welder", 101, Rarity.RARE, mage.cards.g.GoblinWelder.class)); + cards.add(new SetCardInfo("Golgari Rot Farm", 254, Rarity.UNCOMMON, mage.cards.g.GolgariRotFarm.class)); + cards.add(new SetCardInfo("Golgari Signet", 191, Rarity.COMMON, mage.cards.g.GolgariSignet.class)); + cards.add(new SetCardInfo("Golgari Signet", 192, Rarity.COMMON, mage.cards.g.GolgariSignet.class)); + cards.add(new SetCardInfo("Grave Pact", 65, Rarity.RARE, mage.cards.g.GravePact.class)); + cards.add(new SetCardInfo("Gravedigger", 66, Rarity.COMMON, mage.cards.g.Gravedigger.class)); + cards.add(new SetCardInfo("Great Furnace", 255, Rarity.COMMON, mage.cards.g.GreatFurnace.class)); + cards.add(new SetCardInfo("Grip of Phyresis", 43, Rarity.UNCOMMON, mage.cards.g.GripOfPhyresis.class)); + cards.add(new SetCardInfo("Hamletback Goliath", 102, Rarity.RARE, mage.cards.h.HamletbackGoliath.class)); + cards.add(new SetCardInfo("Hammerfist Giant", 103, Rarity.RARE, mage.cards.h.HammerfistGiant.class)); + cards.add(new SetCardInfo("Hardened Scales", 138, Rarity.RARE, mage.cards.h.HardenedScales.class)); + cards.add(new SetCardInfo("Herald of the Host", 29, Rarity.UNCOMMON, mage.cards.h.HeraldOfTheHost.class)); + cards.add(new SetCardInfo("Hoard-Smelter Dragon", 104, Rarity.RARE, mage.cards.h.HoardSmelterDragon.class)); + cards.add(new SetCardInfo("Hostility", 105, Rarity.RARE, mage.cards.h.Hostility.class)); + cards.add(new SetCardInfo("Hunted Dragon", 106, Rarity.RARE, mage.cards.h.HuntedDragon.class)); + cards.add(new SetCardInfo("Ichor Wellspring", 193, Rarity.COMMON, mage.cards.i.IchorWellspring.class)); + cards.add(new SetCardInfo("Ikra Shidiqi, the Usurper", 11, Rarity.MYTHIC, mage.cards.i.IkraShidiqiTheUsurper.class)); + cards.add(new SetCardInfo("Impact Resonance", 107, Rarity.RARE, mage.cards.i.ImpactResonance.class)); + cards.add(new SetCardInfo("Incite Rebellion", 108, Rarity.RARE, mage.cards.i.InciteRebellion.class)); + cards.add(new SetCardInfo("Inferno Titan", 109, Rarity.MYTHIC, mage.cards.i.InfernoTitan.class)); + cards.add(new SetCardInfo("Ingot Chewer", 110, Rarity.COMMON, mage.cards.i.IngotChewer.class)); + cards.add(new SetCardInfo("Inspiring Call", 139, Rarity.UNCOMMON, mage.cards.i.InspiringCall.class)); + cards.add(new SetCardInfo("Ishai, Ojutai Dragonspeaker", 12, Rarity.MYTHIC, mage.cards.i.IshaiOjutaiDragonspeaker.class)); + cards.add(new SetCardInfo("Island", 286, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 287, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 289, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 290, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 291, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 292, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Jalum Tome", 194, Rarity.RARE, mage.cards.j.JalumTome.class)); + cards.add(new SetCardInfo("Jareth, Leonine Titan", 30, Rarity.COMMON, mage.cards.j.JarethLeonineTitan.class)); + cards.add(new SetCardInfo("Juniper Order Ranger", 158, Rarity.UNCOMMON, mage.cards.j.JuniperOrderRanger.class)); + cards.add(new SetCardInfo("Junk Diver", 195, Rarity.RARE, mage.cards.j.JunkDiver.class)); + cards.add(new SetCardInfo("Jwar Isle Refuge", 256, Rarity.UNCOMMON, mage.cards.j.JwarIsleRefuge.class)); + cards.add(new SetCardInfo("Kalemne, Disciple of Iroas", 7, Rarity.MYTHIC, mage.cards.k.KalemneDiscipleOfIroas.class)); + cards.add(new SetCardInfo("Kalemne's Captain", 31, Rarity.RARE, mage.cards.k.KalemnesCaptain.class)); + cards.add(new SetCardInfo("Kalonian Hydra", 140, Rarity.MYTHIC, mage.cards.k.KalonianHydra.class)); + cards.add(new SetCardInfo("Languish", 67, Rarity.RARE, mage.cards.l.Languish.class)); + cards.add(new SetCardInfo("Lhurgoyf", 141, Rarity.RARE, mage.cards.l.Lhurgoyf.class)); + cards.add(new SetCardInfo("Lightning Greaves", 196, Rarity.UNCOMMON, mage.cards.l.LightningGreaves.class)); + cards.add(new SetCardInfo("Liquimetal Coating", 197, Rarity.UNCOMMON, mage.cards.l.LiquimetalCoating.class)); + cards.add(new SetCardInfo("Living Death", 68, Rarity.RARE, mage.cards.l.LivingDeath.class)); + cards.add(new SetCardInfo("Lonely Sandbar", 257, Rarity.COMMON, mage.cards.l.LonelySandbar.class)); + cards.add(new SetCardInfo("Loreseeker's Stone", 198, Rarity.UNCOMMON, mage.cards.l.LoreseekersStone.class)); + cards.add(new SetCardInfo("Loxodon Warhammer", 199, Rarity.UNCOMMON, mage.cards.l.LoxodonWarhammer.class)); + cards.add(new SetCardInfo("Magma Giant", 111, Rarity.RARE, mage.cards.m.MagmaGiant.class)); + cards.add(new SetCardInfo("Magmaquake", 112, Rarity.RARE, mage.cards.m.Magmaquake.class)); + cards.add(new SetCardInfo("Magus of the Wheel", 113, Rarity.RARE, mage.cards.m.MagusOfTheWheel.class)); + cards.add(new SetCardInfo("Manifold Insights", 44, Rarity.RARE, mage.cards.m.ManifoldInsights.class)); + cards.add(new SetCardInfo("Master Biomancer", 159, Rarity.MYTHIC, mage.cards.m.MasterBiomancer.class)); + cards.add(new SetCardInfo("Memory Erosion", 45, Rarity.RARE, mage.cards.m.MemoryErosion.class)); + cards.add(new SetCardInfo("Merciless Eviction", 160, Rarity.RARE, mage.cards.m.MercilessEviction.class)); + cards.add(new SetCardInfo("Meteor Blast", 114, Rarity.UNCOMMON, mage.cards.m.MeteorBlast.class)); + cards.add(new SetCardInfo("Migratory Route", 161, Rarity.UNCOMMON, mage.cards.m.MigratoryRoute.class)); + cards.add(new SetCardInfo("Mind Stone", 200, Rarity.UNCOMMON, mage.cards.m.MindStone.class)); + cards.add(new SetCardInfo("Minds Aglow", 46, Rarity.RARE, mage.cards.m.MindsAglow.class)); + cards.add(new SetCardInfo("Mirrorweave", 162, Rarity.RARE, mage.cards.m.Mirrorweave.class)); + cards.add(new SetCardInfo("Mortify", 163, Rarity.UNCOMMON, mage.cards.m.Mortify.class)); + cards.add(new SetCardInfo("Mortivore", 69, Rarity.RARE, mage.cards.m.Mortivore.class)); + cards.add(new SetCardInfo("Mountain", 300, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 301, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 302, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 303, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 304, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 305, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mulldrifter", 47, Rarity.UNCOMMON, mage.cards.m.Mulldrifter.class)); + cards.add(new SetCardInfo("Murmuring Bosk", 258, Rarity.RARE, mage.cards.m.MurmuringBosk.class)); + cards.add(new SetCardInfo("Mycosynth Wellspring", 201, Rarity.COMMON, mage.cards.m.MycosynthWellspring.class)); + cards.add(new SetCardInfo("Myr Battlesphere", 202, Rarity.RARE, mage.cards.m.MyrBattlesphere.class)); + cards.add(new SetCardInfo("Myr Retriever", 203, Rarity.UNCOMMON, mage.cards.m.MyrRetriever.class)); + cards.add(new SetCardInfo("Myr Sire", 204, Rarity.COMMON, mage.cards.m.MyrSire.class)); + cards.add(new SetCardInfo("Necroplasm", 70, Rarity.RARE, mage.cards.n.Necroplasm.class)); + cards.add(new SetCardInfo("Nezumi Graverobber", 71, Rarity.UNCOMMON, mage.cards.n.NezumiGraverobber.class)); + cards.add(new SetCardInfo("Oblivion Stone", 205, Rarity.RARE, mage.cards.o.OblivionStone.class)); + cards.add(new SetCardInfo("Opal Palace", 259, Rarity.COMMON, mage.cards.o.OpalPalace.class)); + cards.add(new SetCardInfo("Opulent Palace", 260, Rarity.UNCOMMON, mage.cards.o.OpulentPalace.class)); + cards.add(new SetCardInfo("Oreskos Explorer", 32, Rarity.UNCOMMON, mage.cards.o.OreskosExplorer.class)); + cards.add(new SetCardInfo("Orim's Thunder", 33, Rarity.COMMON, mage.cards.o.OrimsThunder.class)); + cards.add(new SetCardInfo("Orzhov Advokist", 34, Rarity.UNCOMMON, mage.cards.o.OrzhovAdvokist.class)); + cards.add(new SetCardInfo("Orzhov Signet", 206, Rarity.COMMON, mage.cards.o.OrzhovSignet.class)); + cards.add(new SetCardInfo("Palladium Myr", 207, Rarity.UNCOMMON, mage.cards.p.PalladiumMyr.class)); + cards.add(new SetCardInfo("Panic Spellbomb", 208, Rarity.COMMON, mage.cards.p.PanicSpellbomb.class)); + cards.add(new SetCardInfo("Patron of the Nezumi", 72, Rarity.RARE, mage.cards.p.PatronOfTheNezumi.class)); + cards.add(new SetCardInfo("Pentavus", 209, Rarity.RARE, mage.cards.p.Pentavus.class)); + cards.add(new SetCardInfo("Phyrexia's Core", 261, Rarity.UNCOMMON, mage.cards.p.PhyrexiasCore.class)); + cards.add(new SetCardInfo("Pilgrim's Eye", 210, Rarity.COMMON, mage.cards.p.PilgrimsEye.class)); + cards.add(new SetCardInfo("Plains", 279, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 280, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 281, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 282, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 283, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 284, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 285, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Pristine Talisman", 211, Rarity.COMMON, mage.cards.p.PristineTalisman.class)); + cards.add(new SetCardInfo("Putrefy", 164, Rarity.UNCOMMON, mage.cards.p.Putrefy.class)); + cards.add(new SetCardInfo("Relic Crush", 142, Rarity.COMMON, mage.cards.r.RelicCrush.class)); + cards.add(new SetCardInfo("Reliquary Tower", 262, Rarity.UNCOMMON, mage.cards.r.ReliquaryTower.class)); + cards.add(new SetCardInfo("Reveillark", 35, Rarity.RARE, mage.cards.r.Reveillark.class)); + cards.add(new SetCardInfo("Reyhan, Last of the Abzan", 13, Rarity.RARE, mage.cards.r.ReyhanLastOfTheAbzan.class)); + cards.add(new SetCardInfo("Riddlekeeper", 48, Rarity.RARE, mage.cards.r.Riddlekeeper.class)); + cards.add(new SetCardInfo("Rise from the Grave", 73, Rarity.UNCOMMON, mage.cards.r.RiseFromTheGrave.class)); + cards.add(new SetCardInfo("Rite of the Raging Storm", 115, Rarity.UNCOMMON, mage.cards.r.RiteOfTheRagingStorm.class)); + cards.add(new SetCardInfo("Ruby Medallion", 212, Rarity.RARE, mage.cards.r.RubyMedallion.class)); + cards.add(new SetCardInfo("Rupture Spire", 263, Rarity.COMMON, mage.cards.r.RuptureSpire.class)); + cards.add(new SetCardInfo("Sandsteppe Citadel", 264, Rarity.UNCOMMON, mage.cards.s.SandsteppeCitadel.class)); + cards.add(new SetCardInfo("Sandstone Oracle", 213, Rarity.UNCOMMON, mage.cards.s.SandstoneOracle.class)); + cards.add(new SetCardInfo("Scavenging Ooze", 143, Rarity.RARE, mage.cards.s.ScavengingOoze.class)); + cards.add(new SetCardInfo("Scrap Mastery", 116, Rarity.RARE, mage.cards.s.ScrapMastery.class)); + cards.add(new SetCardInfo("Scythe Specter", 74, Rarity.RARE, mage.cards.s.ScytheSpecter.class)); + cards.add(new SetCardInfo("Seaside Citadel", 265, Rarity.UNCOMMON, mage.cards.s.SeasideCitadel.class)); + cards.add(new SetCardInfo("Secluded Steppe", 266, Rarity.COMMON, mage.cards.s.SecludedSteppe.class)); + cards.add(new SetCardInfo("Seer's Sundial", 214, Rarity.RARE, mage.cards.s.SeersSundial.class)); + cards.add(new SetCardInfo("Sewer Nemesis", 75, Rarity.RARE, mage.cards.s.SewerNemesis.class)); + cards.add(new SetCardInfo("Shared Trauma", 76, Rarity.RARE, mage.cards.s.SharedTrauma.class)); + cards.add(new SetCardInfo("Sign in Blood", 77, Rarity.COMMON, mage.cards.s.SignInBlood.class)); + cards.add(new SetCardInfo("Simic Growth Chamber", 267, Rarity.UNCOMMON, mage.cards.s.SimicGrowthChamber.class)); + cards.add(new SetCardInfo("Simic Signet", 215, Rarity.COMMON, mage.cards.s.SimicSignet.class)); + cards.add(new SetCardInfo("Simic Signet", 216, Rarity.COMMON, mage.cards.s.SimicSignet.class)); + cards.add(new SetCardInfo("Skullbriar, the Walking Grave", 165, Rarity.RARE, mage.cards.s.SkullbriarTheWalkingGrave.class)); + cards.add(new SetCardInfo("Slipstream Eel", 49, Rarity.COMMON, mage.cards.s.SlipstreamEel.class)); + cards.add(new SetCardInfo("Smoldering Crater", 268, Rarity.COMMON, mage.cards.s.SmolderingCrater.class)); + cards.add(new SetCardInfo("Sol Ring", 217, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); + cards.add(new SetCardInfo("Solemn Simulacrum", 218, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); + cards.add(new SetCardInfo("Solemn Simulacrum", 219, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); + cards.add(new SetCardInfo("Solidarity of Heroes", 144, Rarity.UNCOMMON, mage.cards.s.SolidarityOfHeroes.class)); + cards.add(new SetCardInfo("Spell Crumple", 50, Rarity.UNCOMMON, mage.cards.s.SpellCrumple.class)); + cards.add(new SetCardInfo("Spine of Ish Sah", 220, Rarity.RARE, mage.cards.s.SpineOfIshSah.class)); + cards.add(new SetCardInfo("Spitebellows", 117, Rarity.UNCOMMON, mage.cards.s.Spitebellows.class)); + cards.add(new SetCardInfo("Spitting Image", 166, Rarity.RARE, mage.cards.s.SpittingImage.class)); + cards.add(new SetCardInfo("Staff of Nin", 221, Rarity.RARE, mage.cards.s.StaffOfNin.class)); + cards.add(new SetCardInfo("Starstorm", 118, Rarity.RARE, mage.cards.s.Starstorm.class)); + cards.add(new SetCardInfo("Steel Hellkite", 222, Rarity.RARE, mage.cards.s.SteelHellkite.class)); + cards.add(new SetCardInfo("Stinkdrinker Daredevil", 119, Rarity.COMMON, mage.cards.s.StinkdrinkerDaredevil.class)); + cards.add(new SetCardInfo("Stitch Together", 78, Rarity.UNCOMMON, mage.cards.s.StitchTogether.class)); + cards.add(new SetCardInfo("Stoneshock Giant", 120, Rarity.UNCOMMON, mage.cards.s.StoneshockGiant.class)); + cards.add(new SetCardInfo("Sublime Exhalation", 36, Rarity.RARE, mage.cards.s.SublimeExhalation.class)); + cards.add(new SetCardInfo("Sun Titan", 37, Rarity.MYTHIC, mage.cards.s.SunTitan.class)); + cards.add(new SetCardInfo("Sungrass Prairie", 269, Rarity.RARE, mage.cards.s.SungrassPrairie.class)); + cards.add(new SetCardInfo("Sunrise Sovereign", 121, Rarity.RARE, mage.cards.s.SunriseSovereign.class)); + cards.add(new SetCardInfo("Svogthos, the Restless Tomb", 270, Rarity.UNCOMMON, mage.cards.s.SvogthosTheRestlessTomb.class)); + cards.add(new SetCardInfo("Swamp", 293, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 294, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 295, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 296, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 297, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 298, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 299, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swiftfoot Boots", 223, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class)); + cards.add(new SetCardInfo("Sylvan Reclamation", 167, Rarity.UNCOMMON, mage.cards.s.SylvanReclamation.class)); + cards.add(new SetCardInfo("Syphon Flesh", 79, Rarity.UNCOMMON, mage.cards.s.SyphonFlesh.class)); + cards.add(new SetCardInfo("Syphon Mind", 80, Rarity.COMMON, mage.cards.s.SyphonMind.class)); + cards.add(new SetCardInfo("Szadek, Lord of Secrets", 168, Rarity.RARE, mage.cards.s.SzadekLordOfSecrets.class)); + cards.add(new SetCardInfo("Taurean Mauler", 122, Rarity.RARE, mage.cards.t.TaureanMauler.class)); + cards.add(new SetCardInfo("Temple of the False God", 271, Rarity.UNCOMMON, mage.cards.t.TempleOfTheFalseGod.class)); + cards.add(new SetCardInfo("Temple of the False God", 272, Rarity.UNCOMMON, mage.cards.t.TempleOfTheFalseGod.class)); + cards.add(new SetCardInfo("Terramorphic Expanse", 273, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class)); + cards.add(new SetCardInfo("Tezzeret's Gambit", 51, Rarity.UNCOMMON, mage.cards.t.TezzeretsGambit.class)); + cards.add(new SetCardInfo("The Mimeoplasm", 1, Rarity.MYTHIC, mage.cards.t.TheMimeoplasm.class)); + cards.add(new SetCardInfo("Thought Vessel", 224, Rarity.COMMON, mage.cards.t.ThoughtVessel.class)); + cards.add(new SetCardInfo("Thrummingbird", 52, Rarity.UNCOMMON, mage.cards.t.Thrummingbird.class)); + cards.add(new SetCardInfo("Thundercloud Shaman", 123, Rarity.UNCOMMON, mage.cards.t.ThundercloudShaman.class)); + cards.add(new SetCardInfo("Trading Post", 225, Rarity.RARE, mage.cards.t.TradingPost.class)); + cards.add(new SetCardInfo("Tranquil Thicket", 274, Rarity.COMMON, mage.cards.t.TranquilThicket.class)); + cards.add(new SetCardInfo("Treasure Cruise", 53, Rarity.COMMON, mage.cards.t.TreasureCruise.class)); + cards.add(new SetCardInfo("Tribute to the Wild", 145, Rarity.UNCOMMON, mage.cards.t.TributeToTheWild.class)); + cards.add(new SetCardInfo("Triskelavus", 226, Rarity.RARE, mage.cards.t.Triskelavus.class)); + cards.add(new SetCardInfo("Troll Ascetic", 146, Rarity.RARE, mage.cards.t.TrollAscetic.class)); + cards.add(new SetCardInfo("Tuktuk the Explorer", 124, Rarity.RARE, mage.cards.t.TuktukTheExplorer.class)); + cards.add(new SetCardInfo("Tuskguard Captain", 147, Rarity.UNCOMMON, mage.cards.t.TuskguardCaptain.class)); + cards.add(new SetCardInfo("Tyrant's Familiar", 125, Rarity.RARE, mage.cards.t.TyrantsFamiliar.class)); + cards.add(new SetCardInfo("Underground River", 275, Rarity.RARE, mage.cards.u.UndergroundRiver.class)); + cards.add(new SetCardInfo("Unnerve", 81, Rarity.COMMON, mage.cards.u.Unnerve.class)); + cards.add(new SetCardInfo("Unstable Obelisk", 227, Rarity.UNCOMMON, mage.cards.u.UnstableObelisk.class)); + cards.add(new SetCardInfo("Urza's Incubator", 228, Rarity.RARE, mage.cards.u.UrzasIncubator.class)); + cards.add(new SetCardInfo("Victory's Herald", 38, Rarity.RARE, mage.cards.v.VictorysHerald.class)); + cards.add(new SetCardInfo("Vivid Crag", 276, Rarity.UNCOMMON, mage.cards.v.VividCrag.class)); + cards.add(new SetCardInfo("Vivid Meadow", 277, Rarity.UNCOMMON, mage.cards.v.VividMeadow.class)); + cards.add(new SetCardInfo("Volcanic Offering", 126, Rarity.RARE, mage.cards.v.VolcanicOffering.class)); + cards.add(new SetCardInfo("Vorel of the Hull Clade", 169, Rarity.RARE, mage.cards.v.VorelOfTheHullClade.class)); + cards.add(new SetCardInfo("Vorosh, the Hunter", 3, Rarity.RARE, mage.cards.v.VoroshTheHunter.class)); + cards.add(new SetCardInfo("Vow of Flight", 54, Rarity.UNCOMMON, mage.cards.v.VowOfFlight.class)); + cards.add(new SetCardInfo("Vow of Malice", 82, Rarity.UNCOMMON, mage.cards.v.VowOfMalice.class)); + cards.add(new SetCardInfo("Vow of Wildness", 148, Rarity.UNCOMMON, mage.cards.v.VowOfWildness.class)); + cards.add(new SetCardInfo("Vulturous Zombie", 170, Rarity.RARE, mage.cards.v.VulturousZombie.class)); + cards.add(new SetCardInfo("Warchief Giant", 127, Rarity.UNCOMMON, mage.cards.w.WarchiefGiant.class)); + cards.add(new SetCardInfo("Warmonger Hellkite", 128, Rarity.RARE, mage.cards.w.WarmongerHellkite.class)); + cards.add(new SetCardInfo("Warstorm Surge", 129, Rarity.RARE, mage.cards.w.WarstormSurge.class)); + cards.add(new SetCardInfo("Wayfarer's Bauble", 229, Rarity.COMMON, mage.cards.w.WayfarersBauble.class)); + cards.add(new SetCardInfo("Whipflare", 130, Rarity.UNCOMMON, mage.cards.w.Whipflare.class)); + cards.add(new SetCardInfo("Wind-Scarred Crag", 278, Rarity.COMMON, mage.cards.w.WindScarredCrag.class)); + cards.add(new SetCardInfo("Windfall", 55, Rarity.UNCOMMON, mage.cards.w.Windfall.class)); + cards.add(new SetCardInfo("Wonder", 56, Rarity.UNCOMMON, mage.cards.w.Wonder.class)); + cards.add(new SetCardInfo("Word of Seizing", 131, Rarity.RARE, mage.cards.w.WordOfSeizing.class)); + cards.add(new SetCardInfo("Worn Powerstone", 230, Rarity.UNCOMMON, mage.cards.w.WornPowerstone.class)); + cards.add(new SetCardInfo("Wrexial, the Risen Deep", 171, Rarity.MYTHIC, mage.cards.w.WrexialTheRisenDeep.class)); + cards.add(new SetCardInfo("Wurmcoil Engine", 231, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class)); + cards.add(new SetCardInfo("Yavimaya Elder", 149, Rarity.COMMON, mage.cards.y.YavimayaElder.class)); + } +} diff --git a/Mage.Sets/src/mage/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7a258b0b16..3aabb0d2ce 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -108,7 +108,9 @@ public final class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Minister of Impediments", 144, Rarity.COMMON, mage.cards.m.MinisterOfImpediments.class)); cards.add(new SetCardInfo("Mistral Charger", 13, Rarity.UNCOMMON, mage.cards.m.MistralCharger.class)); cards.add(new SetCardInfo("Momir Vig, Simic Visionary", 118, Rarity.RARE, mage.cards.m.MomirVigSimicVisionary.class)); + cards.add(new SetCardInfo("Muse Vessel", 163, Rarity.RARE, mage.cards.m.MuseVessel.class)); cards.add(new SetCardInfo("Nettling Curse", 48, Rarity.COMMON, mage.cards.n.NettlingCurse.class)); + cards.add(new SetCardInfo("Nightcreep", 49, Rarity.UNCOMMON, mage.cards.n.Nightcreep.class)); cards.add(new SetCardInfo("Nihilistic Glee", 50, Rarity.RARE, mage.cards.n.NihilisticGlee.class)); cards.add(new SetCardInfo("Novijen, Heart of Progress", 175, Rarity.UNCOMMON, mage.cards.n.NovijenHeartOfProgress.class)); cards.add(new SetCardInfo("Novijen Sages", 27, Rarity.RARE, mage.cards.n.NovijenSages.class)); @@ -135,10 +137,12 @@ public final class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Pure // Simple", 154, Rarity.UNCOMMON, mage.cards.p.PureSimple.class)); cards.add(new SetCardInfo("Ragamuffyn", 51, Rarity.UNCOMMON, mage.cards.r.Ragamuffyn.class)); cards.add(new SetCardInfo("Rain of Gore", 126, Rarity.RARE, mage.cards.r.RainOfGore.class)); + cards.add(new SetCardInfo("Rakdos Augermage", 127, Rarity.RARE, mage.cards.r.RakdosAugermage.class)); cards.add(new SetCardInfo("Rakdos Carnarium", 178, Rarity.COMMON, mage.cards.r.RakdosCarnarium.class)); cards.add(new SetCardInfo("Rakdos Guildmage", 145, Rarity.UNCOMMON, mage.cards.r.RakdosGuildmage.class)); cards.add(new SetCardInfo("Rakdos Ickspitter", 128, Rarity.COMMON, mage.cards.r.RakdosIckspitter.class)); cards.add(new SetCardInfo("Rakdos Pit Dragon", 69, Rarity.RARE, mage.cards.r.RakdosPitDragon.class)); + cards.add(new SetCardInfo("Rakdos Riteknife", 164, Rarity.RARE, mage.cards.r.RakdosRiteknife.class)); cards.add(new SetCardInfo("Rakdos Signet", 165, Rarity.COMMON, mage.cards.r.RakdosSignet.class)); cards.add(new SetCardInfo("Rakdos the Defiler", 129, Rarity.RARE, mage.cards.r.RakdosTheDefiler.class)); cards.add(new SetCardInfo("Ratcatcher", 52, Rarity.RARE, mage.cards.r.Ratcatcher.class)); @@ -173,7 +177,9 @@ public final class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Stoic Ephemera", 19, Rarity.UNCOMMON, mage.cards.s.StoicEphemera.class)); cards.add(new SetCardInfo("Stomp and Howl", 96, Rarity.UNCOMMON, mage.cards.s.StompAndHowl.class)); cards.add(new SetCardInfo("Stormscale Anarch", 74, Rarity.RARE, mage.cards.s.StormscaleAnarch.class)); + cards.add(new SetCardInfo("Street Savvy", 97, Rarity.COMMON, mage.cards.s.StreetSavvy.class)); cards.add(new SetCardInfo("Supply // Demand", 157, Rarity.UNCOMMON, mage.cards.s.SupplyDemand.class)); + cards.add(new SetCardInfo("Swift Silence", 132, Rarity.RARE, mage.cards.s.SwiftSilence.class)); cards.add(new SetCardInfo("Taste for Mayhem", 75, Rarity.COMMON, mage.cards.t.TasteForMayhem.class)); cards.add(new SetCardInfo("Thrive", 98, Rarity.COMMON, mage.cards.t.Thrive.class)); cards.add(new SetCardInfo("Tidespout Tyrant", 34, Rarity.RARE, mage.cards.t.TidespoutTyrant.class)); @@ -189,6 +195,7 @@ public final class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Vesper Ghoul", 57, Rarity.COMMON, mage.cards.v.VesperGhoul.class)); cards.add(new SetCardInfo("Vigean Graftmage", 35, Rarity.UNCOMMON, mage.cards.v.VigeanGraftmage.class)); cards.add(new SetCardInfo("Vigean Hydropon", 135, Rarity.COMMON, mage.cards.v.VigeanHydropon.class)); + cards.add(new SetCardInfo("Vigean Intuition", 136, Rarity.UNCOMMON, mage.cards.v.VigeanIntuition.class)); cards.add(new SetCardInfo("Vision Skeins", 36, Rarity.COMMON, mage.cards.v.VisionSkeins.class)); cards.add(new SetCardInfo("Voidslime", 137, Rarity.RARE, mage.cards.v.Voidslime.class)); cards.add(new SetCardInfo("Wakestone Gargoyle", 21, Rarity.RARE, mage.cards.w.WakestoneGargoyle.class)); diff --git a/Mage.Sets/src/mage/sets/Dominaria.java b/Mage.Sets/src/mage/sets/Dominaria.java index 4fd36ededd..6e48f762fe 100644 --- a/Mage.Sets/src/mage/sets/Dominaria.java +++ b/Mage.Sets/src/mage/sets/Dominaria.java @@ -117,7 +117,7 @@ public final class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Ghitu Journeymage", 126, Rarity.COMMON, mage.cards.g.GhituJourneymage.class)); cards.add(new SetCardInfo("Ghitu Lavarunner", 127, Rarity.COMMON, mage.cards.g.GhituLavarunner.class)); cards.add(new SetCardInfo("Gideon's Reproach", 19, Rarity.COMMON, mage.cards.g.GideonsReproach.class)); - cards.add(new SetCardInfo("Gift of Growth", 163, Rarity.COMMON, mage.cards.g.GiftofGrowth.class)); + cards.add(new SetCardInfo("Gift of Growth", 163, Rarity.COMMON, mage.cards.g.GiftOfGrowth.class)); cards.add(new SetCardInfo("Gilded Lotus", 215, Rarity.RARE, mage.cards.g.GildedLotus.class)); cards.add(new SetCardInfo("Goblin Barrage", 128, Rarity.UNCOMMON, mage.cards.g.GoblinBarrage.class)); cards.add(new SetCardInfo("Goblin Chainwhirler", 129, Rarity.RARE, mage.cards.g.GoblinChainwhirler.class)); diff --git a/Mage.Sets/src/mage/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index 0322801819..c80118de2c 100644 --- a/Mage.Sets/src/mage/sets/Exodus.java +++ b/Mage.Sets/src/mage/sets/Exodus.java @@ -68,8 +68,9 @@ public final class Exodus extends ExpansionSet { cards.add(new SetCardInfo("Hatred", 64, Rarity.RARE, mage.cards.h.Hatred.class)); cards.add(new SetCardInfo("High Ground", 7, Rarity.UNCOMMON, mage.cards.h.HighGround.class)); cards.add(new SetCardInfo("Jackalope Herd", 111, Rarity.COMMON, mage.cards.j.JackalopeHerd.class)); + cards.add(new SetCardInfo("Keeper of the Beasts", 112, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheBeasts.class)); cards.add(new SetCardInfo("Keeper of the Dead", 65, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheDead.class)); - cards.add(new SetCardInfo("Keeper of the Light", 8, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheLight.class)); + cards.add(new SetCardInfo("Keeper of the Light", 8, Rarity.UNCOMMON, mage.cards.k.KeeperOfTheLight.class)); cards.add(new SetCardInfo("Killer Whale", 37, Rarity.UNCOMMON, mage.cards.k.KillerWhale.class)); cards.add(new SetCardInfo("Kor Chant", 9, Rarity.COMMON, mage.cards.k.KorChant.class)); cards.add(new SetCardInfo("Mage il-Vec", 86, Rarity.COMMON, mage.cards.m.MageIlVec.class)); diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index d4609ac951..d2a8b86844 100644 --- a/Mage.Sets/src/mage/sets/FourthEdition.java +++ b/Mage.Sets/src/mage/sets/FourthEdition.java @@ -27,378 +27,379 @@ public final class FourthEdition extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; + cards.add(new SetCardInfo("Abomination", 117, Rarity.UNCOMMON, mage.cards.a.Abomination.class)); - cards.add(new SetCardInfo("Animate Dead", 118, Rarity.UNCOMMON, mage.cards.a.AnimateDead.class)); - cards.add(new SetCardInfo("Ashes to Ashes", 119, Rarity.UNCOMMON, mage.cards.a.AshesToAshes.class)); - cards.add(new SetCardInfo("Bad Moon", 120, Rarity.RARE, mage.cards.b.BadMoon.class)); - cards.add(new SetCardInfo("Black Knight", 121, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); - cards.add(new SetCardInfo("Blight", 122, Rarity.UNCOMMON, mage.cards.b.Blight.class)); - cards.add(new SetCardInfo("Bog Imp", 123, Rarity.COMMON, mage.cards.b.BogImp.class)); - cards.add(new SetCardInfo("Bog Wraith", 124, Rarity.UNCOMMON, mage.cards.b.BogWraith.class)); - cards.add(new SetCardInfo("Carrion Ants", 125, Rarity.UNCOMMON, mage.cards.c.CarrionAnts.class)); - cards.add(new SetCardInfo("Cosmic Horror", 126, Rarity.RARE, mage.cards.c.CosmicHorror.class)); - cards.add(new SetCardInfo("Cursed Land", 127, Rarity.UNCOMMON, mage.cards.c.CursedLand.class)); - cards.add(new SetCardInfo("Cyclopean Mummy", 128, Rarity.COMMON, mage.cards.c.CyclopeanMummy.class)); - cards.add(new SetCardInfo("Dark Ritual", 129, Rarity.COMMON, mage.cards.d.DarkRitual.class)); - cards.add(new SetCardInfo("Deathgrip", 130, Rarity.UNCOMMON, mage.cards.d.Deathgrip.class)); - cards.add(new SetCardInfo("Deathlace", 131, Rarity.RARE, mage.cards.d.Deathlace.class)); - cards.add(new SetCardInfo("Drain Life", 132, Rarity.COMMON, mage.cards.d.DrainLife.class)); - cards.add(new SetCardInfo("Drudge Skeletons", 133, Rarity.COMMON, mage.cards.d.DrudgeSkeletons.class)); - cards.add(new SetCardInfo("El-Hajjaj", 134, Rarity.RARE, mage.cards.e.ElHajjaj.class)); - cards.add(new SetCardInfo("Erg Raiders", 135, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); - cards.add(new SetCardInfo("Evil Presence", 136, Rarity.UNCOMMON, mage.cards.e.EvilPresence.class)); - cards.add(new SetCardInfo("Fear", 137, Rarity.COMMON, mage.cards.f.Fear.class)); - cards.add(new SetCardInfo("Frozen Shade", 138, Rarity.COMMON, mage.cards.f.FrozenShade.class)); - cards.add(new SetCardInfo("Gloom", 139, Rarity.UNCOMMON, mage.cards.g.Gloom.class)); - cards.add(new SetCardInfo("Greed", 140, Rarity.RARE, mage.cards.g.Greed.class)); - cards.add(new SetCardInfo("Howl from Beyond", 141, Rarity.COMMON, mage.cards.h.HowlFromBeyond.class)); - cards.add(new SetCardInfo("Hypnotic Specter", 142, Rarity.UNCOMMON, mage.cards.h.HypnoticSpecter.class)); - cards.add(new SetCardInfo("Junún Efreet", 143, Rarity.UNCOMMON, mage.cards.j.JununEfreet.class)); - cards.add(new SetCardInfo("Lord of the Pit", 144, Rarity.RARE, mage.cards.l.LordOfThePit.class)); - cards.add(new SetCardInfo("Lost Soul", 145, Rarity.COMMON, mage.cards.l.LostSoul.class)); - cards.add(new SetCardInfo("Marsh Gas", 146, Rarity.COMMON, mage.cards.m.MarshGas.class)); - cards.add(new SetCardInfo("Mind Twist", 147, Rarity.RARE, mage.cards.m.MindTwist.class)); - cards.add(new SetCardInfo("Murk Dwellers", 148, Rarity.COMMON, mage.cards.m.MurkDwellers.class)); - cards.add(new SetCardInfo("Nether Shadow", 149, Rarity.RARE, mage.cards.n.NetherShadow.class)); - cards.add(new SetCardInfo("Nightmare", 150, Rarity.RARE, mage.cards.n.Nightmare.class)); - cards.add(new SetCardInfo("Paralyze", 151, Rarity.COMMON, mage.cards.p.Paralyze.class)); - cards.add(new SetCardInfo("Pestilence", 152, Rarity.COMMON, mage.cards.p.Pestilence.class)); - cards.add(new SetCardInfo("Pit Scorpion", 153, Rarity.COMMON, mage.cards.p.PitScorpion.class)); - cards.add(new SetCardInfo("Plague Rats", 154, Rarity.COMMON, mage.cards.p.PlagueRats.class)); - cards.add(new SetCardInfo("Rag Man", 155, Rarity.RARE, mage.cards.r.RagMan.class)); - cards.add(new SetCardInfo("Raise Dead", 156, Rarity.COMMON, mage.cards.r.RaiseDead.class)); - cards.add(new SetCardInfo("Royal Assassin", 157, Rarity.RARE, mage.cards.r.RoyalAssassin.class)); - cards.add(new SetCardInfo("Scathe Zombies", 158, Rarity.COMMON, mage.cards.s.ScatheZombies.class)); - cards.add(new SetCardInfo("Scavenging Ghoul", 159, Rarity.UNCOMMON, mage.cards.s.ScavengingGhoul.class)); - cards.add(new SetCardInfo("Sengir Vampire", 160, Rarity.UNCOMMON, mage.cards.s.SengirVampire.class)); - cards.add(new SetCardInfo("Simulacrum", 161, Rarity.UNCOMMON, mage.cards.s.Simulacrum.class)); - cards.add(new SetCardInfo("Sorceress Queen", 162, Rarity.RARE, mage.cards.s.SorceressQueen.class)); - cards.add(new SetCardInfo("Spirit Shackle", 163, Rarity.UNCOMMON, mage.cards.s.SpiritShackle.class)); - cards.add(new SetCardInfo("Terror", 164, Rarity.COMMON, mage.cards.t.Terror.class)); - cards.add(new SetCardInfo("Uncle Istvan", 165, Rarity.UNCOMMON, mage.cards.u.UncleIstvan.class)); - cards.add(new SetCardInfo("Unholy Strength", 166, Rarity.COMMON, mage.cards.u.UnholyStrength.class)); - cards.add(new SetCardInfo("Vampire Bats", 167, Rarity.COMMON, mage.cards.v.VampireBats.class)); - cards.add(new SetCardInfo("Wall of Bone", 168, Rarity.UNCOMMON, mage.cards.w.WallOfBone.class)); - cards.add(new SetCardInfo("Warp Artifact", 169, Rarity.RARE, mage.cards.w.WarpArtifact.class)); - cards.add(new SetCardInfo("Weakness", 170, Rarity.COMMON, mage.cards.w.Weakness.class)); - cards.add(new SetCardInfo("Will-o'-the-Wisp", 171, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); - cards.add(new SetCardInfo("Word of Binding", 172, Rarity.COMMON, mage.cards.w.WordOfBinding.class)); - cards.add(new SetCardInfo("Xenic Poltergeist", 173, Rarity.RARE, mage.cards.x.XenicPoltergeist.class)); - cards.add(new SetCardInfo("Zombie Master", 174, Rarity.RARE, mage.cards.z.ZombieMaster.class)); cards.add(new SetCardInfo("Air Elemental", 59, Rarity.UNCOMMON, mage.cards.a.AirElemental.class)); - cards.add(new SetCardInfo("Animate Artifact", 60, Rarity.UNCOMMON, mage.cards.a.AnimateArtifact.class)); - cards.add(new SetCardInfo("Apprentice Wizard", 61, Rarity.COMMON, mage.cards.a.ApprenticeWizard.class)); - cards.add(new SetCardInfo("Backfire", 62, Rarity.UNCOMMON, mage.cards.b.Backfire.class)); - cards.add(new SetCardInfo("Blue Elemental Blast", 63, Rarity.COMMON, mage.cards.b.BlueElementalBlast.class)); - cards.add(new SetCardInfo("Control Magic", 64, Rarity.UNCOMMON, mage.cards.c.ControlMagic.class)); - cards.add(new SetCardInfo("Counterspell", 65, Rarity.UNCOMMON, mage.cards.c.Counterspell.class)); - cards.add(new SetCardInfo("Creature Bond", 66, Rarity.COMMON, mage.cards.c.CreatureBond.class)); - cards.add(new SetCardInfo("Drain Power", 67, Rarity.RARE, mage.cards.d.DrainPower.class)); - cards.add(new SetCardInfo("Energy Flux", 68, Rarity.UNCOMMON, mage.cards.e.EnergyFlux.class)); - cards.add(new SetCardInfo("Energy Tap", 69, Rarity.COMMON, mage.cards.e.EnergyTap.class)); - cards.add(new SetCardInfo("Erosion", 70, Rarity.COMMON, mage.cards.e.Erosion.class)); - cards.add(new SetCardInfo("Feedback", 71, Rarity.UNCOMMON, mage.cards.f.Feedback.class)); - cards.add(new SetCardInfo("Flight", 72, Rarity.COMMON, mage.cards.f.Flight.class)); - cards.add(new SetCardInfo("Flood", 73, Rarity.COMMON, mage.cards.f.Flood.class)); - cards.add(new SetCardInfo("Gaseous Form", 74, Rarity.COMMON, mage.cards.g.GaseousForm.class)); - cards.add(new SetCardInfo("Ghost Ship", 75, Rarity.UNCOMMON, mage.cards.g.GhostShip.class)); - cards.add(new SetCardInfo("Giant Tortoise", 76, Rarity.COMMON, mage.cards.g.GiantTortoise.class)); - cards.add(new SetCardInfo("Hurkyl's Recall", 77, Rarity.RARE, mage.cards.h.HurkylsRecall.class)); - cards.add(new SetCardInfo("Island Fish Jasconius", 78, Rarity.RARE, mage.cards.i.IslandFishJasconius.class)); - cards.add(new SetCardInfo("Jump", 79, Rarity.COMMON, mage.cards.j.Jump.class)); - cards.add(new SetCardInfo("Leviathan", 80, Rarity.RARE, mage.cards.l.Leviathan.class)); - cards.add(new SetCardInfo("Lifetap", 81, Rarity.UNCOMMON, mage.cards.l.Lifetap.class)); - cards.add(new SetCardInfo("Lord of Atlantis", 82, Rarity.RARE, mage.cards.l.LordOfAtlantis.class)); - cards.add(new SetCardInfo("Mahamoti Djinn", 84, Rarity.RARE, mage.cards.m.MahamotiDjinn.class)); - cards.add(new SetCardInfo("Mana Short", 85, Rarity.RARE, mage.cards.m.ManaShort.class)); - cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 86, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); - cards.add(new SetCardInfo("Mind Bomb", 87, Rarity.UNCOMMON, mage.cards.m.MindBomb.class)); - cards.add(new SetCardInfo("Phantasmal Forces", 88, Rarity.UNCOMMON, mage.cards.p.PhantasmalForces.class)); - cards.add(new SetCardInfo("Phantasmal Terrain", 89, Rarity.COMMON, mage.cards.p.PhantasmalTerrain.class)); - cards.add(new SetCardInfo("Phantom Monster", 90, Rarity.UNCOMMON, mage.cards.p.PhantomMonster.class)); - cards.add(new SetCardInfo("Pirate Ship", 91, Rarity.RARE, mage.cards.p.PirateShip.class)); - cards.add(new SetCardInfo("Power Leak", 92, Rarity.COMMON, mage.cards.p.PowerLeak.class)); - cards.add(new SetCardInfo("Power Sink", 93, Rarity.COMMON, mage.cards.p.PowerSink.class)); - cards.add(new SetCardInfo("Prodigal Sorcerer", 94, Rarity.COMMON, mage.cards.p.ProdigalSorcerer.class)); - cards.add(new SetCardInfo("Psionic Entity", 95, Rarity.RARE, mage.cards.p.PsionicEntity.class)); - cards.add(new SetCardInfo("Psychic Venom", 96, Rarity.COMMON, mage.cards.p.PsychicVenom.class)); - cards.add(new SetCardInfo("Relic Bind", 97, Rarity.RARE, mage.cards.r.RelicBind.class)); - cards.add(new SetCardInfo("Sea Serpent", 98, Rarity.COMMON, mage.cards.s.SeaSerpent.class)); - cards.add(new SetCardInfo("Segovian Leviathan", 99, Rarity.UNCOMMON, mage.cards.s.SegovianLeviathan.class)); - cards.add(new SetCardInfo("Sindbad", 100, Rarity.UNCOMMON, mage.cards.s.Sindbad.class)); - cards.add(new SetCardInfo("Siren's Call", 101, Rarity.UNCOMMON, mage.cards.s.SirensCall.class)); - cards.add(new SetCardInfo("Spell Blast", 103, Rarity.COMMON, mage.cards.s.SpellBlast.class)); - cards.add(new SetCardInfo("Stasis", 104, Rarity.RARE, mage.cards.s.Stasis.class)); - cards.add(new SetCardInfo("Steal Artifact", 105, Rarity.UNCOMMON, mage.cards.s.StealArtifact.class)); - cards.add(new SetCardInfo("Sunken City", 106, Rarity.COMMON, mage.cards.s.SunkenCity.class)); - cards.add(new SetCardInfo("Thoughtlace", 107, Rarity.RARE, mage.cards.t.Thoughtlace.class)); - cards.add(new SetCardInfo("Time Elemental", 108, Rarity.RARE, mage.cards.t.TimeElemental.class)); - cards.add(new SetCardInfo("Twiddle", 109, Rarity.COMMON, mage.cards.t.Twiddle.class)); - cards.add(new SetCardInfo("Unstable Mutation", 110, Rarity.COMMON, mage.cards.u.UnstableMutation.class)); - cards.add(new SetCardInfo("Unsummon", 111, Rarity.COMMON, mage.cards.u.Unsummon.class)); - cards.add(new SetCardInfo("Volcanic Eruption", 112, Rarity.RARE, mage.cards.v.VolcanicEruption.class)); - cards.add(new SetCardInfo("Wall of Air", 113, Rarity.UNCOMMON, mage.cards.w.WallOfAir.class)); - cards.add(new SetCardInfo("Wall of Water", 114, Rarity.UNCOMMON, mage.cards.w.WallOfWater.class)); - cards.add(new SetCardInfo("Water Elemental", 115, Rarity.UNCOMMON, mage.cards.w.WaterElemental.class)); - cards.add(new SetCardInfo("Zephyr Falcon", 116, Rarity.COMMON, mage.cards.z.ZephyrFalcon.class)); - cards.add(new SetCardInfo("Aspect of Wolf", 233, Rarity.RARE, mage.cards.a.AspectOfWolf.class)); - cards.add(new SetCardInfo("Birds of Paradise", 234, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); - cards.add(new SetCardInfo("Carnivorous Plant", 235, Rarity.COMMON, mage.cards.c.CarnivorousPlant.class)); - cards.add(new SetCardInfo("Channel", 236, Rarity.UNCOMMON, mage.cards.c.Channel.class)); - cards.add(new SetCardInfo("Cockatrice", 237, Rarity.RARE, mage.cards.c.Cockatrice.class)); - cards.add(new SetCardInfo("Craw Wurm", 238, Rarity.COMMON, mage.cards.c.CrawWurm.class)); - cards.add(new SetCardInfo("Crumble", 239, Rarity.UNCOMMON, mage.cards.c.Crumble.class)); - cards.add(new SetCardInfo("Desert Twister", 240, Rarity.UNCOMMON, mage.cards.d.DesertTwister.class)); - cards.add(new SetCardInfo("Durkwood Boars", 241, Rarity.COMMON, mage.cards.d.DurkwoodBoars.class)); - cards.add(new SetCardInfo("Elven Riders", 242, Rarity.UNCOMMON, mage.cards.e.ElvenRiders.class)); - cards.add(new SetCardInfo("Elvish Archers", 243, Rarity.RARE, mage.cards.e.ElvishArchers.class)); - cards.add(new SetCardInfo("Fog", 244, Rarity.COMMON, mage.cards.f.Fog.class)); - cards.add(new SetCardInfo("Force of Nature", 245, Rarity.RARE, mage.cards.f.ForceOfNature.class)); - cards.add(new SetCardInfo("Fungusaur", 246, Rarity.RARE, mage.cards.f.Fungusaur.class)); - cards.add(new SetCardInfo("Gaea's Liege", 247, Rarity.RARE, mage.cards.g.GaeasLiege.class)); - cards.add(new SetCardInfo("Giant Growth", 248, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); - cards.add(new SetCardInfo("Giant Spider", 249, Rarity.COMMON, mage.cards.g.GiantSpider.class)); - cards.add(new SetCardInfo("Grizzly Bears", 250, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); - cards.add(new SetCardInfo("Hurricane", 251, Rarity.UNCOMMON, mage.cards.h.Hurricane.class)); - cards.add(new SetCardInfo("Instill Energy", 252, Rarity.UNCOMMON, mage.cards.i.InstillEnergy.class)); - cards.add(new SetCardInfo("Ironroot Treefolk", 253, Rarity.COMMON, mage.cards.i.IronrootTreefolk.class)); - cards.add(new SetCardInfo("Killer Bees", 254, Rarity.UNCOMMON, mage.cards.k.KillerBees.class)); - cards.add(new SetCardInfo("Land Leeches", 255, Rarity.COMMON, mage.cards.l.LandLeeches.class)); - cards.add(new SetCardInfo("Ley Druid", 256, Rarity.UNCOMMON, mage.cards.l.LeyDruid.class)); - cards.add(new SetCardInfo("Lifeforce", 257, Rarity.UNCOMMON, mage.cards.l.Lifeforce.class)); - cards.add(new SetCardInfo("Lifelace", 258, Rarity.RARE, mage.cards.l.Lifelace.class)); - cards.add(new SetCardInfo("Living Artifact", 259, Rarity.RARE, mage.cards.l.LivingArtifact.class)); - cards.add(new SetCardInfo("Living Lands", 260, Rarity.RARE, mage.cards.l.LivingLands.class)); - cards.add(new SetCardInfo("Llanowar Elves", 261, Rarity.COMMON, mage.cards.l.LlanowarElves.class)); - cards.add(new SetCardInfo("Lure", 262, Rarity.UNCOMMON, mage.cards.l.Lure.class)); - cards.add(new SetCardInfo("Marsh Viper", 263, Rarity.COMMON, mage.cards.m.MarshViper.class)); - cards.add(new SetCardInfo("Nafs Asp", 264, Rarity.COMMON, NafsAsp.class)); - cards.add(new SetCardInfo("Pradesh Gypsies", 265, Rarity.COMMON, mage.cards.p.PradeshGypsies.class)); - cards.add(new SetCardInfo("Radjan Spirit", 266, Rarity.UNCOMMON, mage.cards.r.RadjanSpirit.class)); - cards.add(new SetCardInfo("Regeneration", 268, Rarity.COMMON, mage.cards.r.Regeneration.class)); - cards.add(new SetCardInfo("Sandstorm", 269, Rarity.COMMON, mage.cards.s.Sandstorm.class)); - cards.add(new SetCardInfo("Scryb Sprites", 270, Rarity.COMMON, mage.cards.s.ScrybSprites.class)); - cards.add(new SetCardInfo("Shanodin Dryads", 271, Rarity.COMMON, mage.cards.s.ShanodinDryads.class)); - cards.add(new SetCardInfo("Stream of Life", 272, Rarity.COMMON, mage.cards.s.StreamOfLife.class)); - cards.add(new SetCardInfo("Sylvan Library", 273, Rarity.RARE, mage.cards.s.SylvanLibrary.class)); - cards.add(new SetCardInfo("Thicket Basilisk", 274, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); - cards.add(new SetCardInfo("Timber Wolves", 275, Rarity.RARE, mage.cards.t.TimberWolves.class)); - cards.add(new SetCardInfo("Titania's Song", 276, Rarity.RARE, mage.cards.t.TitaniasSong.class)); - cards.add(new SetCardInfo("Tranquility", 277, Rarity.COMMON, mage.cards.t.Tranquility.class)); - cards.add(new SetCardInfo("Tsunami", 278, Rarity.UNCOMMON, mage.cards.t.Tsunami.class)); - cards.add(new SetCardInfo("Untamed Wilds", 279, Rarity.UNCOMMON, mage.cards.u.UntamedWilds.class)); - cards.add(new SetCardInfo("Venom", 280, Rarity.COMMON, mage.cards.v.Venom.class)); - cards.add(new SetCardInfo("Verduran Enchantress", 281, Rarity.RARE, mage.cards.v.VerduranEnchantress.class)); - cards.add(new SetCardInfo("Wall of Brambles", 282, Rarity.UNCOMMON, mage.cards.w.WallOfBrambles.class)); - cards.add(new SetCardInfo("Wall of Ice", 283, Rarity.UNCOMMON, mage.cards.w.WallOfIce.class)); - cards.add(new SetCardInfo("Wall of Wood", 284, Rarity.COMMON, mage.cards.w.WallOfWood.class)); - cards.add(new SetCardInfo("Wanderlust", 285, Rarity.UNCOMMON, mage.cards.w.Wanderlust.class)); - cards.add(new SetCardInfo("War Mammoth", 286, Rarity.COMMON, mage.cards.w.WarMammoth.class)); - cards.add(new SetCardInfo("Web", 287, Rarity.RARE, mage.cards.w.Web.class)); - cards.add(new SetCardInfo("Whirling Dervish", 288, Rarity.UNCOMMON, mage.cards.w.WhirlingDervish.class)); - cards.add(new SetCardInfo("Wild Growth", 289, Rarity.COMMON, mage.cards.w.WildGrowth.class)); - cards.add(new SetCardInfo("Winter Blast", 290, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); - cards.add(new SetCardInfo("Forest", 376, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 377, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Forest", 378, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 367, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 368, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Island", 369, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mishra's Factory", 361, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class)); - cards.add(new SetCardInfo("Mountain", 373, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 374, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Mountain", 375, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Oasis", 362, Rarity.UNCOMMON, mage.cards.o.Oasis.class)); - cards.add(new SetCardInfo("Plains", 364, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 365, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Plains", 366, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Strip Mine", 363, Rarity.UNCOMMON, mage.cards.s.StripMine.class)); - cards.add(new SetCardInfo("Swamp", 370, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 371, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Swamp", 372, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); - cards.add(new SetCardInfo("Ali Baba", 175, Rarity.UNCOMMON, mage.cards.a.AliBaba.class)); - cards.add(new SetCardInfo("Ball Lightning", 176, Rarity.RARE, mage.cards.b.BallLightning.class)); - cards.add(new SetCardInfo("Bird Maiden", 177, Rarity.COMMON, mage.cards.b.BirdMaiden.class)); - cards.add(new SetCardInfo("Blood Lust", 178, Rarity.COMMON, mage.cards.b.BloodLust.class)); - cards.add(new SetCardInfo("Brothers of Fire", 179, Rarity.COMMON, mage.cards.b.BrothersOfFire.class)); - cards.add(new SetCardInfo("Burrowing", 180, Rarity.UNCOMMON, mage.cards.b.Burrowing.class)); - cards.add(new SetCardInfo("Cave People", 181, Rarity.UNCOMMON, mage.cards.c.CavePeople.class)); - cards.add(new SetCardInfo("Chaoslace", 182, Rarity.RARE, mage.cards.c.Chaoslace.class)); - cards.add(new SetCardInfo("Crimson Manticore", 183, Rarity.RARE, mage.cards.c.CrimsonManticore.class)); - cards.add(new SetCardInfo("Detonate", 184, Rarity.UNCOMMON, mage.cards.d.Detonate.class)); - cards.add(new SetCardInfo("Disintegrate", 185, Rarity.COMMON, mage.cards.d.Disintegrate.class)); - cards.add(new SetCardInfo("Dragon Whelp", 186, Rarity.UNCOMMON, mage.cards.d.DragonWhelp.class)); - cards.add(new SetCardInfo("Dwarven Warriors", 187, Rarity.COMMON, mage.cards.d.DwarvenWarriors.class)); - cards.add(new SetCardInfo("Earth Elemental", 188, Rarity.UNCOMMON, mage.cards.e.EarthElemental.class)); - cards.add(new SetCardInfo("Earthquake", 189, Rarity.RARE, mage.cards.e.Earthquake.class)); - cards.add(new SetCardInfo("Eternal Warrior", 190, Rarity.COMMON, mage.cards.e.EternalWarrior.class)); - cards.add(new SetCardInfo("Fire Elemental", 191, Rarity.UNCOMMON, mage.cards.f.FireElemental.class)); - cards.add(new SetCardInfo("Fireball", 192, Rarity.COMMON, mage.cards.f.Fireball.class)); - cards.add(new SetCardInfo("Firebreathing", 193, Rarity.COMMON, mage.cards.f.Firebreathing.class)); - cards.add(new SetCardInfo("Fissure", 194, Rarity.COMMON, mage.cards.f.Fissure.class)); - cards.add(new SetCardInfo("Flashfires", 195, Rarity.UNCOMMON, mage.cards.f.Flashfires.class)); - cards.add(new SetCardInfo("Giant Strength", 196, Rarity.COMMON, mage.cards.g.GiantStrength.class)); - cards.add(new SetCardInfo("Goblin Balloon Brigade", 197, Rarity.UNCOMMON, mage.cards.g.GoblinBalloonBrigade.class)); - cards.add(new SetCardInfo("Goblin King", 198, Rarity.RARE, mage.cards.g.GoblinKing.class)); - cards.add(new SetCardInfo("Goblin Rock Sled", 199, Rarity.COMMON, mage.cards.g.GoblinRockSled.class)); - cards.add(new SetCardInfo("Gray Ogre", 200, Rarity.COMMON, mage.cards.g.GrayOgre.class)); - cards.add(new SetCardInfo("Hill Giant", 201, Rarity.COMMON, mage.cards.h.HillGiant.class)); - cards.add(new SetCardInfo("Hurloon Minotaur", 202, Rarity.COMMON, mage.cards.h.HurloonMinotaur.class)); - cards.add(new SetCardInfo("Hurr Jackal", 203, Rarity.RARE, mage.cards.h.HurrJackal.class)); - cards.add(new SetCardInfo("Immolation", 204, Rarity.COMMON, mage.cards.i.Immolation.class)); - cards.add(new SetCardInfo("Inferno", 205, Rarity.RARE, mage.cards.i.Inferno.class)); - cards.add(new SetCardInfo("Ironclaw Orcs", 206, Rarity.COMMON, mage.cards.i.IronclawOrcs.class)); - cards.add(new SetCardInfo("Keldon Warlord", 207, Rarity.UNCOMMON, mage.cards.k.KeldonWarlord.class)); - cards.add(new SetCardInfo("Lightning Bolt", 208, Rarity.COMMON, mage.cards.l.LightningBolt.class)); - cards.add(new SetCardInfo("Magnetic Mountain", 209, Rarity.RARE, mage.cards.m.MagneticMountain.class)); - cards.add(new SetCardInfo("Mana Clash", 210, Rarity.RARE, mage.cards.m.ManaClash.class)); - cards.add(new SetCardInfo("Mana Flare", 211, Rarity.RARE, mage.cards.m.ManaFlare.class)); - cards.add(new SetCardInfo("Manabarbs", 212, Rarity.RARE, mage.cards.m.Manabarbs.class)); - cards.add(new SetCardInfo("Mons's Goblin Raiders", 213, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); - cards.add(new SetCardInfo("Orcish Artillery", 214, Rarity.UNCOMMON, mage.cards.o.OrcishArtillery.class)); - cards.add(new SetCardInfo("Orcish Oriflamme", 215, Rarity.UNCOMMON, mage.cards.o.OrcishOriflamme.class)); - cards.add(new SetCardInfo("Power Surge", 216, Rarity.RARE, mage.cards.p.PowerSurge.class)); - cards.add(new SetCardInfo("Pyrotechnics", 217, Rarity.UNCOMMON, mage.cards.p.Pyrotechnics.class)); - cards.add(new SetCardInfo("Red Elemental Blast", 218, Rarity.COMMON, mage.cards.r.RedElementalBlast.class)); - cards.add(new SetCardInfo("Shatter", 219, Rarity.COMMON, mage.cards.s.Shatter.class)); - cards.add(new SetCardInfo("Shivan Dragon", 220, Rarity.RARE, mage.cards.s.ShivanDragon.class)); - cards.add(new SetCardInfo("Sisters of the Flame", 221, Rarity.COMMON, mage.cards.s.SistersOfTheFlame.class)); - cards.add(new SetCardInfo("Smoke", 222, Rarity.RARE, mage.cards.s.Smoke.class)); - cards.add(new SetCardInfo("Stone Giant", 223, Rarity.UNCOMMON, mage.cards.s.StoneGiant.class)); - cards.add(new SetCardInfo("Stone Rain", 224, Rarity.COMMON, mage.cards.s.StoneRain.class)); - cards.add(new SetCardInfo("The Brute", 226, Rarity.COMMON, mage.cards.t.TheBrute.class)); - cards.add(new SetCardInfo("Tunnel", 227, Rarity.UNCOMMON, mage.cards.t.Tunnel.class)); - cards.add(new SetCardInfo("Uthden Troll", 228, Rarity.UNCOMMON, mage.cards.u.UthdenTroll.class)); - cards.add(new SetCardInfo("Wall of Dust", 229, Rarity.UNCOMMON, mage.cards.w.WallOfDust.class)); - cards.add(new SetCardInfo("Wall of Fire", 230, Rarity.UNCOMMON, mage.cards.w.WallOfFire.class)); - cards.add(new SetCardInfo("Wall of Stone", 231, Rarity.UNCOMMON, mage.cards.w.WallOfStone.class)); - cards.add(new SetCardInfo("Winds of Change", 232, Rarity.RARE, mage.cards.w.WindsOfChange.class)); cards.add(new SetCardInfo("Alabaster Potion", 1, Rarity.COMMON, mage.cards.a.AlabasterPotion.class)); + cards.add(new SetCardInfo("Aladdin's Lamp", 291, Rarity.RARE, mage.cards.a.AladdinsLamp.class)); + cards.add(new SetCardInfo("Aladdin's Ring", 292, Rarity.RARE, mage.cards.a.AladdinsRing.class)); + cards.add(new SetCardInfo("Ali Baba", 175, Rarity.UNCOMMON, mage.cards.a.AliBaba.class)); cards.add(new SetCardInfo("Amrou Kithkin", 2, Rarity.COMMON, mage.cards.a.AmrouKithkin.class)); + cards.add(new SetCardInfo("Amulet of Kroog", 293, Rarity.COMMON, mage.cards.a.AmuletOfKroog.class)); cards.add(new SetCardInfo("Angry Mob", 3, Rarity.UNCOMMON, mage.cards.a.AngryMob.class)); + cards.add(new SetCardInfo("Animate Artifact", 60, Rarity.UNCOMMON, mage.cards.a.AnimateArtifact.class)); + cards.add(new SetCardInfo("Animate Dead", 118, Rarity.UNCOMMON, mage.cards.a.AnimateDead.class)); cards.add(new SetCardInfo("Animate Wall", 4, Rarity.RARE, mage.cards.a.AnimateWall.class)); + cards.add(new SetCardInfo("Ankh of Mishra", 294, Rarity.RARE, mage.cards.a.AnkhOfMishra.class)); + cards.add(new SetCardInfo("Apprentice Wizard", 61, Rarity.COMMON, mage.cards.a.ApprenticeWizard.class)); + cards.add(new SetCardInfo("Armageddon Clock", 295, Rarity.RARE, mage.cards.a.ArmageddonClock.class)); cards.add(new SetCardInfo("Armageddon", 5, Rarity.RARE, mage.cards.a.Armageddon.class)); + cards.add(new SetCardInfo("Ashes to Ashes", 119, Rarity.UNCOMMON, mage.cards.a.AshesToAshes.class)); + cards.add(new SetCardInfo("Ashnod's Battle Gear", 296, Rarity.UNCOMMON, mage.cards.a.AshnodsBattleGear.class)); + cards.add(new SetCardInfo("Aspect of Wolf", 233, Rarity.RARE, mage.cards.a.AspectOfWolf.class)); + cards.add(new SetCardInfo("Backfire", 62, Rarity.UNCOMMON, mage.cards.b.Backfire.class)); + cards.add(new SetCardInfo("Bad Moon", 120, Rarity.RARE, mage.cards.b.BadMoon.class)); cards.add(new SetCardInfo("Balance", 6, Rarity.RARE, mage.cards.b.Balance.class)); + cards.add(new SetCardInfo("Ball Lightning", 176, Rarity.RARE, mage.cards.b.BallLightning.class)); + cards.add(new SetCardInfo("Battering Ram", 297, Rarity.COMMON, mage.cards.b.BatteringRam.class)); cards.add(new SetCardInfo("Benalish Hero", 7, Rarity.COMMON, mage.cards.b.BenalishHero.class)); + cards.add(new SetCardInfo("Bird Maiden", 177, Rarity.COMMON, mage.cards.b.BirdMaiden.class)); + cards.add(new SetCardInfo("Birds of Paradise", 234, Rarity.RARE, mage.cards.b.BirdsOfParadise.class)); + cards.add(new SetCardInfo("Black Knight", 121, Rarity.UNCOMMON, mage.cards.b.BlackKnight.class)); + cards.add(new SetCardInfo("Black Mana Battery", 298, Rarity.RARE, mage.cards.b.BlackManaBattery.class)); + cards.add(new SetCardInfo("Black Vise", 299, Rarity.UNCOMMON, mage.cards.b.BlackVise.class)); cards.add(new SetCardInfo("Black Ward", 8, Rarity.UNCOMMON, mage.cards.b.BlackWard.class)); cards.add(new SetCardInfo("Blessing", 9, Rarity.RARE, mage.cards.b.Blessing.class)); + cards.add(new SetCardInfo("Blight", 122, Rarity.UNCOMMON, mage.cards.b.Blight.class)); + cards.add(new SetCardInfo("Blood Lust", 178, Rarity.COMMON, mage.cards.b.BloodLust.class)); + cards.add(new SetCardInfo("Blue Elemental Blast", 63, Rarity.COMMON, mage.cards.b.BlueElementalBlast.class)); + cards.add(new SetCardInfo("Blue Mana Battery", 300, Rarity.RARE, mage.cards.b.BlueManaBattery.class)); cards.add(new SetCardInfo("Blue Ward", 10, Rarity.UNCOMMON, mage.cards.b.BlueWard.class)); + cards.add(new SetCardInfo("Bog Imp", 123, Rarity.COMMON, mage.cards.b.BogImp.class)); + cards.add(new SetCardInfo("Bog Wraith", 124, Rarity.UNCOMMON, mage.cards.b.BogWraith.class)); + cards.add(new SetCardInfo("Bottle of Suleiman", 301, Rarity.RARE, mage.cards.b.BottleOfSuleiman.class)); cards.add(new SetCardInfo("Brainwash", 11, Rarity.COMMON, mage.cards.b.Brainwash.class)); + cards.add(new SetCardInfo("Brass Man", 302, Rarity.UNCOMMON, mage.cards.b.BrassMan.class)); + cards.add(new SetCardInfo("Brothers of Fire", 179, Rarity.COMMON, mage.cards.b.BrothersOfFire.class)); + cards.add(new SetCardInfo("Burrowing", 180, Rarity.UNCOMMON, mage.cards.b.Burrowing.class)); + cards.add(new SetCardInfo("Carnivorous Plant", 235, Rarity.COMMON, mage.cards.c.CarnivorousPlant.class)); + cards.add(new SetCardInfo("Carrion Ants", 125, Rarity.UNCOMMON, mage.cards.c.CarrionAnts.class)); cards.add(new SetCardInfo("Castle", 12, Rarity.UNCOMMON, mage.cards.c.Castle.class)); + cards.add(new SetCardInfo("Cave People", 181, Rarity.UNCOMMON, mage.cards.c.CavePeople.class)); + cards.add(new SetCardInfo("Celestial Prism", 304, Rarity.UNCOMMON, mage.cards.c.CelestialPrism.class)); + cards.add(new SetCardInfo("Channel", 236, Rarity.UNCOMMON, mage.cards.c.Channel.class)); + cards.add(new SetCardInfo("Chaoslace", 182, Rarity.RARE, mage.cards.c.Chaoslace.class)); cards.add(new SetCardInfo("Circle of Protection: Artifacts", 13, Rarity.COMMON, mage.cards.c.CircleOfProtectionArtifacts.class)); cards.add(new SetCardInfo("Circle of Protection: Black", 14, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlack.class)); cards.add(new SetCardInfo("Circle of Protection: Blue", 15, Rarity.COMMON, mage.cards.c.CircleOfProtectionBlue.class)); cards.add(new SetCardInfo("Circle of Protection: Green", 16, Rarity.COMMON, mage.cards.c.CircleOfProtectionGreen.class)); cards.add(new SetCardInfo("Circle of Protection: Red", 17, Rarity.COMMON, mage.cards.c.CircleOfProtectionRed.class)); cards.add(new SetCardInfo("Circle of Protection: White", 18, Rarity.COMMON, mage.cards.c.CircleOfProtectionWhite.class)); - cards.add(new SetCardInfo("Conversion", 19, Rarity.UNCOMMON, mage.cards.c.Conversion.class)); - cards.add(new SetCardInfo("Crusade", 20, Rarity.RARE, mage.cards.c.Crusade.class)); - cards.add(new SetCardInfo("Death Ward", 21, Rarity.COMMON, mage.cards.d.DeathWard.class)); - cards.add(new SetCardInfo("Disenchant", 22, Rarity.COMMON, mage.cards.d.Disenchant.class)); - cards.add(new SetCardInfo("Divine Transformation", 23, Rarity.UNCOMMON, mage.cards.d.DivineTransformation.class)); - cards.add(new SetCardInfo("Elder Land Wurm", 24, Rarity.RARE, mage.cards.e.ElderLandWurm.class)); - cards.add(new SetCardInfo("Eye for an Eye", 25, Rarity.RARE, mage.cards.e.EyeForAnEye.class)); - cards.add(new SetCardInfo("Fortified Area", 26, Rarity.COMMON, mage.cards.f.FortifiedArea.class)); - cards.add(new SetCardInfo("Green Ward", 27, Rarity.UNCOMMON, mage.cards.g.GreenWard.class)); - cards.add(new SetCardInfo("Healing Salve", 28, Rarity.COMMON, mage.cards.h.HealingSalve.class)); - cards.add(new SetCardInfo("Holy Armor", 29, Rarity.COMMON, mage.cards.h.HolyArmor.class)); - cards.add(new SetCardInfo("Holy Strength", 30, Rarity.COMMON, mage.cards.h.HolyStrength.class)); - cards.add(new SetCardInfo("Island Sanctuary", 31, Rarity.RARE, mage.cards.i.IslandSanctuary.class)); - cards.add(new SetCardInfo("Karma", 32, Rarity.UNCOMMON, mage.cards.k.Karma.class)); - cards.add(new SetCardInfo("Kismet", 33, Rarity.UNCOMMON, mage.cards.k.Kismet.class)); - cards.add(new SetCardInfo("Land Tax", 34, Rarity.RARE, mage.cards.l.LandTax.class)); - cards.add(new SetCardInfo("Mesa Pegasus", 35, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); - cards.add(new SetCardInfo("Morale", 36, Rarity.COMMON, mage.cards.m.Morale.class)); - cards.add(new SetCardInfo("Northern Paladin", 37, Rarity.RARE, mage.cards.n.NorthernPaladin.class)); - cards.add(new SetCardInfo("Osai Vultures", 38, Rarity.UNCOMMON, mage.cards.o.OsaiVultures.class)); - cards.add(new SetCardInfo("Pearled Unicorn", 39, Rarity.COMMON, mage.cards.p.PearledUnicorn.class)); - cards.add(new SetCardInfo("Personal Incarnation", 40, Rarity.RARE, mage.cards.p.PersonalIncarnation.class)); - cards.add(new SetCardInfo("Piety", 41, Rarity.COMMON, Piety.class)); - cards.add(new SetCardInfo("Pikemen", 42, Rarity.COMMON, mage.cards.p.Pikemen.class)); - cards.add(new SetCardInfo("Purelace", 43, Rarity.RARE, mage.cards.p.Purelace.class)); - cards.add(new SetCardInfo("Red Ward", 44, Rarity.UNCOMMON, mage.cards.r.RedWard.class)); - cards.add(new SetCardInfo("Reverse Damage", 45, Rarity.RARE, mage.cards.r.ReverseDamage.class)); - cards.add(new SetCardInfo("Righteousness", 46, Rarity.RARE, mage.cards.r.Righteousness.class)); - cards.add(new SetCardInfo("Samite Healer", 47, Rarity.COMMON, mage.cards.s.SamiteHealer.class)); - cards.add(new SetCardInfo("Savannah Lions", 48, Rarity.RARE, mage.cards.s.SavannahLions.class)); - cards.add(new SetCardInfo("Seeker", 49, Rarity.COMMON, mage.cards.s.Seeker.class)); - cards.add(new SetCardInfo("Serra Angel", 50, Rarity.UNCOMMON, mage.cards.s.SerraAngel.class)); - cards.add(new SetCardInfo("Spirit Link", 51, Rarity.UNCOMMON, mage.cards.s.SpiritLink.class)); - cards.add(new SetCardInfo("Swords to Plowshares", 52, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class)); - cards.add(new SetCardInfo("Tundra Wolves", 53, Rarity.COMMON, mage.cards.t.TundraWolves.class)); - cards.add(new SetCardInfo("Visions", 54, Rarity.UNCOMMON, mage.cards.v.Visions.class)); - cards.add(new SetCardInfo("Wall of Swords", 55, Rarity.UNCOMMON, mage.cards.w.WallOfSwords.class)); - cards.add(new SetCardInfo("White Knight", 56, Rarity.UNCOMMON, mage.cards.w.WhiteKnight.class)); - cards.add(new SetCardInfo("White Ward", 57, Rarity.UNCOMMON, mage.cards.w.WhiteWard.class)); - cards.add(new SetCardInfo("Wrath of God", 58, Rarity.RARE, mage.cards.w.WrathOfGod.class)); - cards.add(new SetCardInfo("Aladdin's Lamp", 291, Rarity.RARE, mage.cards.a.AladdinsLamp.class)); - cards.add(new SetCardInfo("Aladdin's Ring", 292, Rarity.RARE, mage.cards.a.AladdinsRing.class)); - cards.add(new SetCardInfo("Amulet of Kroog", 293, Rarity.COMMON, mage.cards.a.AmuletOfKroog.class)); - cards.add(new SetCardInfo("Ankh of Mishra", 294, Rarity.RARE, mage.cards.a.AnkhOfMishra.class)); - cards.add(new SetCardInfo("Armageddon Clock", 295, Rarity.RARE, mage.cards.a.ArmageddonClock.class)); - cards.add(new SetCardInfo("Ashnod's Battle Gear", 296, Rarity.UNCOMMON, mage.cards.a.AshnodsBattleGear.class)); - cards.add(new SetCardInfo("Battering Ram", 297, Rarity.COMMON, mage.cards.b.BatteringRam.class)); - cards.add(new SetCardInfo("Black Mana Battery", 298, Rarity.RARE, mage.cards.b.BlackManaBattery.class)); - cards.add(new SetCardInfo("Black Vise", 299, Rarity.UNCOMMON, mage.cards.b.BlackVise.class)); - cards.add(new SetCardInfo("Blue Mana Battery", 300, Rarity.RARE, mage.cards.b.BlueManaBattery.class)); - cards.add(new SetCardInfo("Bottle of Suleiman", 301, Rarity.RARE, mage.cards.b.BottleOfSuleiman.class)); - cards.add(new SetCardInfo("Brass Man", 302, Rarity.UNCOMMON, mage.cards.b.BrassMan.class)); - cards.add(new SetCardInfo("Celestial Prism", 304, Rarity.UNCOMMON, mage.cards.c.CelestialPrism.class)); cards.add(new SetCardInfo("Clay Statue", 305, Rarity.COMMON, mage.cards.c.ClayStatue.class)); cards.add(new SetCardInfo("Clockwork Avian", 306, Rarity.RARE, mage.cards.c.ClockworkAvian.class)); cards.add(new SetCardInfo("Clockwork Beast", 307, Rarity.RARE, mage.cards.c.ClockworkBeast.class)); + cards.add(new SetCardInfo("Cockatrice", 237, Rarity.RARE, mage.cards.c.Cockatrice.class)); cards.add(new SetCardInfo("Colossus of Sardia", 308, Rarity.RARE, mage.cards.c.ColossusOfSardia.class)); cards.add(new SetCardInfo("Conservator", 309, Rarity.UNCOMMON, mage.cards.c.Conservator.class)); + cards.add(new SetCardInfo("Control Magic", 64, Rarity.UNCOMMON, mage.cards.c.ControlMagic.class)); + cards.add(new SetCardInfo("Conversion", 19, Rarity.UNCOMMON, mage.cards.c.Conversion.class)); cards.add(new SetCardInfo("Coral Helm", 310, Rarity.RARE, mage.cards.c.CoralHelm.class)); + cards.add(new SetCardInfo("Cosmic Horror", 126, Rarity.RARE, mage.cards.c.CosmicHorror.class)); + cards.add(new SetCardInfo("Counterspell", 65, Rarity.UNCOMMON, mage.cards.c.Counterspell.class)); + cards.add(new SetCardInfo("Craw Wurm", 238, Rarity.COMMON, mage.cards.c.CrawWurm.class)); + cards.add(new SetCardInfo("Creature Bond", 66, Rarity.COMMON, mage.cards.c.CreatureBond.class)); + cards.add(new SetCardInfo("Crimson Manticore", 183, Rarity.RARE, mage.cards.c.CrimsonManticore.class)); + cards.add(new SetCardInfo("Crumble", 239, Rarity.UNCOMMON, mage.cards.c.Crumble.class)); + cards.add(new SetCardInfo("Crusade", 20, Rarity.RARE, mage.cards.c.Crusade.class)); cards.add(new SetCardInfo("Crystal Rod", 311, Rarity.UNCOMMON, mage.cards.c.CrystalRod.class)); + cards.add(new SetCardInfo("Cursed Land", 127, Rarity.UNCOMMON, mage.cards.c.CursedLand.class)); cards.add(new SetCardInfo("Cursed Rack", 312, Rarity.UNCOMMON, mage.cards.c.CursedRack.class)); + cards.add(new SetCardInfo("Cyclopean Mummy", 128, Rarity.COMMON, mage.cards.c.CyclopeanMummy.class)); cards.add(new SetCardInfo("Dancing Scimitar", 313, Rarity.RARE, mage.cards.d.DancingScimitar.class)); + cards.add(new SetCardInfo("Dark Ritual", 129, Rarity.COMMON, mage.cards.d.DarkRitual.class)); + cards.add(new SetCardInfo("Death Ward", 21, Rarity.COMMON, mage.cards.d.DeathWard.class)); + cards.add(new SetCardInfo("Deathgrip", 130, Rarity.UNCOMMON, mage.cards.d.Deathgrip.class)); + cards.add(new SetCardInfo("Deathlace", 131, Rarity.RARE, mage.cards.d.Deathlace.class)); + cards.add(new SetCardInfo("Desert Twister", 240, Rarity.UNCOMMON, mage.cards.d.DesertTwister.class)); + cards.add(new SetCardInfo("Detonate", 184, Rarity.UNCOMMON, mage.cards.d.Detonate.class)); cards.add(new SetCardInfo("Diabolic Machine", 314, Rarity.UNCOMMON, mage.cards.d.DiabolicMachine.class)); cards.add(new SetCardInfo("Dingus Egg", 315, Rarity.RARE, mage.cards.d.DingusEgg.class)); + cards.add(new SetCardInfo("Disenchant", 22, Rarity.COMMON, mage.cards.d.Disenchant.class)); + cards.add(new SetCardInfo("Disintegrate", 185, Rarity.COMMON, mage.cards.d.Disintegrate.class)); cards.add(new SetCardInfo("Disrupting Scepter", 316, Rarity.RARE, mage.cards.d.DisruptingScepter.class)); + cards.add(new SetCardInfo("Divine Transformation", 23, Rarity.UNCOMMON, mage.cards.d.DivineTransformation.class)); cards.add(new SetCardInfo("Dragon Engine", 317, Rarity.RARE, mage.cards.d.DragonEngine.class)); + cards.add(new SetCardInfo("Dragon Whelp", 186, Rarity.UNCOMMON, mage.cards.d.DragonWhelp.class)); + cards.add(new SetCardInfo("Drain Life", 132, Rarity.COMMON, mage.cards.d.DrainLife.class)); + cards.add(new SetCardInfo("Drain Power", 67, Rarity.RARE, mage.cards.d.DrainPower.class)); + cards.add(new SetCardInfo("Drudge Skeletons", 133, Rarity.COMMON, mage.cards.d.DrudgeSkeletons.class)); + cards.add(new SetCardInfo("Durkwood Boars", 241, Rarity.COMMON, mage.cards.d.DurkwoodBoars.class)); + cards.add(new SetCardInfo("Dwarven Warriors", 187, Rarity.COMMON, mage.cards.d.DwarvenWarriors.class)); + cards.add(new SetCardInfo("Earth Elemental", 188, Rarity.UNCOMMON, mage.cards.e.EarthElemental.class)); + cards.add(new SetCardInfo("Earthquake", 189, Rarity.RARE, mage.cards.e.Earthquake.class)); cards.add(new SetCardInfo("Ebony Horse", 318, Rarity.RARE, mage.cards.e.EbonyHorse.class)); + cards.add(new SetCardInfo("El-Hajjaj", 134, Rarity.RARE, mage.cards.e.ElHajjaj.class)); + cards.add(new SetCardInfo("Elder Land Wurm", 24, Rarity.RARE, mage.cards.e.ElderLandWurm.class)); + cards.add(new SetCardInfo("Elven Riders", 242, Rarity.UNCOMMON, mage.cards.e.ElvenRiders.class)); + cards.add(new SetCardInfo("Elvish Archers", 243, Rarity.RARE, mage.cards.e.ElvishArchers.class)); + cards.add(new SetCardInfo("Energy Flux", 68, Rarity.UNCOMMON, mage.cards.e.EnergyFlux.class)); + cards.add(new SetCardInfo("Energy Tap", 69, Rarity.COMMON, mage.cards.e.EnergyTap.class)); + cards.add(new SetCardInfo("Erg Raiders", 135, Rarity.COMMON, mage.cards.e.ErgRaiders.class)); + cards.add(new SetCardInfo("Erosion", 70, Rarity.COMMON, mage.cards.e.Erosion.class)); + cards.add(new SetCardInfo("Eternal Warrior", 190, Rarity.COMMON, mage.cards.e.EternalWarrior.class)); + cards.add(new SetCardInfo("Evil Presence", 136, Rarity.UNCOMMON, mage.cards.e.EvilPresence.class)); + cards.add(new SetCardInfo("Eye for an Eye", 25, Rarity.RARE, mage.cards.e.EyeForAnEye.class)); + cards.add(new SetCardInfo("Fear", 137, Rarity.COMMON, mage.cards.f.Fear.class)); + cards.add(new SetCardInfo("Feedback", 71, Rarity.UNCOMMON, mage.cards.f.Feedback.class)); cards.add(new SetCardInfo("Fellwar Stone", 319, Rarity.UNCOMMON, mage.cards.f.FellwarStone.class)); + cards.add(new SetCardInfo("Fire Elemental", 191, Rarity.UNCOMMON, mage.cards.f.FireElemental.class)); + cards.add(new SetCardInfo("Fireball", 192, Rarity.COMMON, mage.cards.f.Fireball.class)); + cards.add(new SetCardInfo("Firebreathing", 193, Rarity.COMMON, mage.cards.f.Firebreathing.class)); + cards.add(new SetCardInfo("Fissure", 194, Rarity.COMMON, mage.cards.f.Fissure.class)); + cards.add(new SetCardInfo("Flashfires", 195, Rarity.UNCOMMON, mage.cards.f.Flashfires.class)); + cards.add(new SetCardInfo("Flight", 72, Rarity.COMMON, mage.cards.f.Flight.class)); + cards.add(new SetCardInfo("Flood", 73, Rarity.COMMON, mage.cards.f.Flood.class)); cards.add(new SetCardInfo("Flying Carpet", 320, Rarity.RARE, mage.cards.f.FlyingCarpet.class)); + cards.add(new SetCardInfo("Fog", 244, Rarity.COMMON, mage.cards.f.Fog.class)); + cards.add(new SetCardInfo("Force of Nature", 245, Rarity.RARE, mage.cards.f.ForceOfNature.class)); + cards.add(new SetCardInfo("Forest", 376, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 377, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 378, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Fortified Area", 26, Rarity.COMMON, mage.cards.f.FortifiedArea.class)); + cards.add(new SetCardInfo("Frozen Shade", 138, Rarity.COMMON, mage.cards.f.FrozenShade.class)); + cards.add(new SetCardInfo("Fungusaur", 246, Rarity.RARE, mage.cards.f.Fungusaur.class)); + cards.add(new SetCardInfo("Gaea's Liege", 247, Rarity.RARE, mage.cards.g.GaeasLiege.class)); + cards.add(new SetCardInfo("Gaseous Form", 74, Rarity.COMMON, mage.cards.g.GaseousForm.class)); + cards.add(new SetCardInfo("Ghost Ship", 75, Rarity.UNCOMMON, mage.cards.g.GhostShip.class)); + cards.add(new SetCardInfo("Giant Growth", 248, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); + cards.add(new SetCardInfo("Giant Spider", 249, Rarity.COMMON, mage.cards.g.GiantSpider.class)); + cards.add(new SetCardInfo("Giant Strength", 196, Rarity.COMMON, mage.cards.g.GiantStrength.class)); + cards.add(new SetCardInfo("Giant Tortoise", 76, Rarity.COMMON, mage.cards.g.GiantTortoise.class)); cards.add(new SetCardInfo("Glasses of Urza", 321, Rarity.UNCOMMON, mage.cards.g.GlassesOfUrza.class)); + cards.add(new SetCardInfo("Gloom", 139, Rarity.UNCOMMON, mage.cards.g.Gloom.class)); + cards.add(new SetCardInfo("Goblin Balloon Brigade", 197, Rarity.UNCOMMON, mage.cards.g.GoblinBalloonBrigade.class)); + cards.add(new SetCardInfo("Goblin King", 198, Rarity.RARE, mage.cards.g.GoblinKing.class)); + cards.add(new SetCardInfo("Goblin Rock Sled", 199, Rarity.COMMON, mage.cards.g.GoblinRockSled.class)); cards.add(new SetCardInfo("Grapeshot Catapult", 322, Rarity.COMMON, mage.cards.g.GrapeshotCatapult.class)); + cards.add(new SetCardInfo("Gray Ogre", 200, Rarity.COMMON, mage.cards.g.GrayOgre.class)); + cards.add(new SetCardInfo("Greed", 140, Rarity.RARE, mage.cards.g.Greed.class)); cards.add(new SetCardInfo("Green Mana Battery", 323, Rarity.RARE, mage.cards.g.GreenManaBattery.class)); + cards.add(new SetCardInfo("Green Ward", 27, Rarity.UNCOMMON, mage.cards.g.GreenWard.class)); + cards.add(new SetCardInfo("Grizzly Bears", 250, Rarity.COMMON, mage.cards.g.GrizzlyBears.class)); + cards.add(new SetCardInfo("Healing Salve", 28, Rarity.COMMON, mage.cards.h.HealingSalve.class)); cards.add(new SetCardInfo("Helm of Chatzuk", 324, Rarity.RARE, mage.cards.h.HelmOfChatzuk.class)); + cards.add(new SetCardInfo("Hill Giant", 201, Rarity.COMMON, mage.cards.h.HillGiant.class)); + cards.add(new SetCardInfo("Holy Armor", 29, Rarity.COMMON, mage.cards.h.HolyArmor.class)); + cards.add(new SetCardInfo("Holy Strength", 30, Rarity.COMMON, mage.cards.h.HolyStrength.class)); + cards.add(new SetCardInfo("Howl from Beyond", 141, Rarity.COMMON, mage.cards.h.HowlFromBeyond.class)); cards.add(new SetCardInfo("Howling Mine", 325, Rarity.RARE, mage.cards.h.HowlingMine.class)); + cards.add(new SetCardInfo("Hurkyl's Recall", 77, Rarity.RARE, mage.cards.h.HurkylsRecall.class)); + cards.add(new SetCardInfo("Hurloon Minotaur", 202, Rarity.COMMON, mage.cards.h.HurloonMinotaur.class)); + cards.add(new SetCardInfo("Hurr Jackal", 203, Rarity.RARE, mage.cards.h.HurrJackal.class)); + cards.add(new SetCardInfo("Hurricane", 251, Rarity.UNCOMMON, mage.cards.h.Hurricane.class)); + cards.add(new SetCardInfo("Hypnotic Specter", 142, Rarity.UNCOMMON, mage.cards.h.HypnoticSpecter.class)); + cards.add(new SetCardInfo("Immolation", 204, Rarity.COMMON, mage.cards.i.Immolation.class)); + cards.add(new SetCardInfo("Inferno", 205, Rarity.RARE, mage.cards.i.Inferno.class)); + cards.add(new SetCardInfo("Instill Energy", 252, Rarity.UNCOMMON, mage.cards.i.InstillEnergy.class)); cards.add(new SetCardInfo("Iron Star", 326, Rarity.UNCOMMON, mage.cards.i.IronStar.class)); + cards.add(new SetCardInfo("Ironclaw Orcs", 206, Rarity.COMMON, mage.cards.i.IronclawOrcs.class)); + cards.add(new SetCardInfo("Ironroot Treefolk", 253, Rarity.COMMON, mage.cards.i.IronrootTreefolk.class)); + cards.add(new SetCardInfo("Island Fish Jasconius", 78, Rarity.RARE, mage.cards.i.IslandFishJasconius.class)); + cards.add(new SetCardInfo("Island Sanctuary", 31, Rarity.RARE, mage.cards.i.IslandSanctuary.class)); + cards.add(new SetCardInfo("Island", 367, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 368, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 369, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ivory Cup", 327, Rarity.UNCOMMON, mage.cards.i.IvoryCup.class)); cards.add(new SetCardInfo("Ivory Tower", 328, Rarity.RARE, mage.cards.i.IvoryTower.class)); cards.add(new SetCardInfo("Jade Monolith", 329, Rarity.RARE, mage.cards.j.JadeMonolith.class)); cards.add(new SetCardInfo("Jandor's Saddlebags", 330, Rarity.RARE, mage.cards.j.JandorsSaddlebags.class)); cards.add(new SetCardInfo("Jayemdae Tome", 331, Rarity.RARE, mage.cards.j.JayemdaeTome.class)); + cards.add(new SetCardInfo("Jump", 79, Rarity.COMMON, mage.cards.j.Jump.class)); + cards.add(new SetCardInfo("Jun?n Efreet", 143, Rarity.UNCOMMON, mage.cards.j.JununEfreet.class)); + cards.add(new SetCardInfo("Karma", 32, Rarity.UNCOMMON, mage.cards.k.Karma.class)); + cards.add(new SetCardInfo("Keldon Warlord", 207, Rarity.UNCOMMON, mage.cards.k.KeldonWarlord.class)); + cards.add(new SetCardInfo("Killer Bees", 254, Rarity.UNCOMMON, mage.cards.k.KillerBees.class)); + cards.add(new SetCardInfo("Kismet", 33, Rarity.UNCOMMON, mage.cards.k.Kismet.class)); cards.add(new SetCardInfo("Kormus Bell", 332, Rarity.RARE, mage.cards.k.KormusBell.class)); + cards.add(new SetCardInfo("Land Leeches", 255, Rarity.COMMON, mage.cards.l.LandLeeches.class)); + cards.add(new SetCardInfo("Land Tax", 34, Rarity.RARE, mage.cards.l.LandTax.class)); + cards.add(new SetCardInfo("Leviathan", 80, Rarity.RARE, mage.cards.l.Leviathan.class)); + cards.add(new SetCardInfo("Ley Druid", 256, Rarity.UNCOMMON, mage.cards.l.LeyDruid.class)); cards.add(new SetCardInfo("Library of Leng", 333, Rarity.UNCOMMON, mage.cards.l.LibraryOfLeng.class)); + cards.add(new SetCardInfo("Lifeforce", 257, Rarity.UNCOMMON, mage.cards.l.Lifeforce.class)); + cards.add(new SetCardInfo("Lifelace", 258, Rarity.RARE, mage.cards.l.Lifelace.class)); + cards.add(new SetCardInfo("Lifetap", 81, Rarity.UNCOMMON, mage.cards.l.Lifetap.class)); + cards.add(new SetCardInfo("Lightning Bolt", 208, Rarity.COMMON, mage.cards.l.LightningBolt.class)); + cards.add(new SetCardInfo("Living Artifact", 259, Rarity.RARE, mage.cards.l.LivingArtifact.class)); + cards.add(new SetCardInfo("Living Lands", 260, Rarity.RARE, mage.cards.l.LivingLands.class)); + cards.add(new SetCardInfo("Llanowar Elves", 261, Rarity.COMMON, mage.cards.l.LlanowarElves.class)); + cards.add(new SetCardInfo("Lord of Atlantis", 82, Rarity.RARE, mage.cards.l.LordOfAtlantis.class)); + cards.add(new SetCardInfo("Lord of the Pit", 144, Rarity.RARE, mage.cards.l.LordOfThePit.class)); + cards.add(new SetCardInfo("Lost Soul", 145, Rarity.COMMON, mage.cards.l.LostSoul.class)); + cards.add(new SetCardInfo("Lure", 262, Rarity.UNCOMMON, mage.cards.l.Lure.class)); + cards.add(new SetCardInfo("Magnetic Mountain", 209, Rarity.RARE, mage.cards.m.MagneticMountain.class)); + cards.add(new SetCardInfo("Mahamoti Djinn", 84, Rarity.RARE, mage.cards.m.MahamotiDjinn.class)); + cards.add(new SetCardInfo("Mana Clash", 210, Rarity.RARE, mage.cards.m.ManaClash.class)); + cards.add(new SetCardInfo("Mana Flare", 211, Rarity.RARE, mage.cards.m.ManaFlare.class)); + cards.add(new SetCardInfo("Mana Short", 85, Rarity.RARE, mage.cards.m.ManaShort.class)); cards.add(new SetCardInfo("Mana Vault", 334, Rarity.RARE, mage.cards.m.ManaVault.class)); + cards.add(new SetCardInfo("Manabarbs", 212, Rarity.RARE, mage.cards.m.Manabarbs.class)); + cards.add(new SetCardInfo("Marsh Gas", 146, Rarity.COMMON, mage.cards.m.MarshGas.class)); + cards.add(new SetCardInfo("Marsh Viper", 263, Rarity.COMMON, mage.cards.m.MarshViper.class)); cards.add(new SetCardInfo("Meekstone", 335, Rarity.RARE, mage.cards.m.Meekstone.class)); + cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 86, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); + cards.add(new SetCardInfo("Mesa Pegasus", 35, Rarity.COMMON, mage.cards.m.MesaPegasus.class)); cards.add(new SetCardInfo("Millstone", 336, Rarity.RARE, mage.cards.m.Millstone.class)); + cards.add(new SetCardInfo("Mind Bomb", 87, Rarity.UNCOMMON, mage.cards.m.MindBomb.class)); + cards.add(new SetCardInfo("Mind Twist", 147, Rarity.RARE, mage.cards.m.MindTwist.class)); + cards.add(new SetCardInfo("Mishra's Factory", 361, Rarity.UNCOMMON, mage.cards.m.MishrasFactory.class)); cards.add(new SetCardInfo("Mishra's War Machine", 337, Rarity.RARE, mage.cards.m.MishrasWarMachine.class)); + cards.add(new SetCardInfo("Mons's Goblin Raiders", 213, Rarity.COMMON, mage.cards.m.MonssGoblinRaiders.class)); + cards.add(new SetCardInfo("Morale", 36, Rarity.COMMON, mage.cards.m.Morale.class)); + cards.add(new SetCardInfo("Mountain", 373, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 374, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 375, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Murk Dwellers", 148, Rarity.COMMON, mage.cards.m.MurkDwellers.class)); + cards.add(new SetCardInfo("Nafs Asp", 264, Rarity.COMMON, NafsAsp.class)); + cards.add(new SetCardInfo("Nether Shadow", 149, Rarity.RARE, mage.cards.n.NetherShadow.class)); cards.add(new SetCardInfo("Nevinyrral's Disk", 338, Rarity.RARE, mage.cards.n.NevinyrralsDisk.class)); + cards.add(new SetCardInfo("Nightmare", 150, Rarity.RARE, mage.cards.n.Nightmare.class)); + cards.add(new SetCardInfo("Northern Paladin", 37, Rarity.RARE, mage.cards.n.NorthernPaladin.class)); + cards.add(new SetCardInfo("Oasis", 362, Rarity.UNCOMMON, mage.cards.o.Oasis.class)); cards.add(new SetCardInfo("Obsianus Golem", 339, Rarity.UNCOMMON, mage.cards.o.ObsianusGolem.class)); cards.add(new SetCardInfo("Onulet", 340, Rarity.RARE, mage.cards.o.Onulet.class)); + cards.add(new SetCardInfo("Orcish Artillery", 214, Rarity.UNCOMMON, mage.cards.o.OrcishArtillery.class)); + cards.add(new SetCardInfo("Orcish Oriflamme", 215, Rarity.UNCOMMON, mage.cards.o.OrcishOriflamme.class)); cards.add(new SetCardInfo("Ornithopter", 341, Rarity.UNCOMMON, mage.cards.o.Ornithopter.class)); + cards.add(new SetCardInfo("Osai Vultures", 38, Rarity.UNCOMMON, mage.cards.o.OsaiVultures.class)); + cards.add(new SetCardInfo("Paralyze", 151, Rarity.COMMON, mage.cards.p.Paralyze.class)); + cards.add(new SetCardInfo("Pearled Unicorn", 39, Rarity.COMMON, mage.cards.p.PearledUnicorn.class)); + cards.add(new SetCardInfo("Personal Incarnation", 40, Rarity.RARE, mage.cards.p.PersonalIncarnation.class)); + cards.add(new SetCardInfo("Pestilence", 152, Rarity.COMMON, mage.cards.p.Pestilence.class)); + cards.add(new SetCardInfo("Phantasmal Forces", 88, Rarity.UNCOMMON, mage.cards.p.PhantasmalForces.class)); + cards.add(new SetCardInfo("Phantasmal Terrain", 89, Rarity.COMMON, mage.cards.p.PhantasmalTerrain.class)); + cards.add(new SetCardInfo("Phantom Monster", 90, Rarity.UNCOMMON, mage.cards.p.PhantomMonster.class)); + cards.add(new SetCardInfo("Piety", 41, Rarity.COMMON, Piety.class)); + cards.add(new SetCardInfo("Pikemen", 42, Rarity.COMMON, mage.cards.p.Pikemen.class)); + cards.add(new SetCardInfo("Pirate Ship", 91, Rarity.RARE, mage.cards.p.PirateShip.class)); + cards.add(new SetCardInfo("Pit Scorpion", 153, Rarity.COMMON, mage.cards.p.PitScorpion.class)); + cards.add(new SetCardInfo("Plague Rats", 154, Rarity.COMMON, mage.cards.p.PlagueRats.class)); + cards.add(new SetCardInfo("Plains", 364, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 365, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 366, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Power Leak", 92, Rarity.COMMON, mage.cards.p.PowerLeak.class)); + cards.add(new SetCardInfo("Power Sink", 93, Rarity.COMMON, mage.cards.p.PowerSink.class)); + cards.add(new SetCardInfo("Power Surge", 216, Rarity.RARE, mage.cards.p.PowerSurge.class)); + cards.add(new SetCardInfo("Pradesh Gypsies", 265, Rarity.COMMON, mage.cards.p.PradeshGypsies.class)); cards.add(new SetCardInfo("Primal Clay", 342, Rarity.RARE, mage.cards.p.PrimalClay.class)); + cards.add(new SetCardInfo("Prodigal Sorcerer", 94, Rarity.COMMON, mage.cards.p.ProdigalSorcerer.class)); + cards.add(new SetCardInfo("Psionic Entity", 95, Rarity.RARE, mage.cards.p.PsionicEntity.class)); + cards.add(new SetCardInfo("Psychic Venom", 96, Rarity.COMMON, mage.cards.p.PsychicVenom.class)); + cards.add(new SetCardInfo("Purelace", 43, Rarity.RARE, mage.cards.p.Purelace.class)); + cards.add(new SetCardInfo("Pyrotechnics", 217, Rarity.UNCOMMON, mage.cards.p.Pyrotechnics.class)); + cards.add(new SetCardInfo("Radjan Spirit", 266, Rarity.UNCOMMON, mage.cards.r.RadjanSpirit.class)); + cards.add(new SetCardInfo("Rag Man", 155, Rarity.RARE, mage.cards.r.RagMan.class)); + cards.add(new SetCardInfo("Raise Dead", 156, Rarity.COMMON, mage.cards.r.RaiseDead.class)); + cards.add(new SetCardInfo("Red Elemental Blast", 218, Rarity.COMMON, mage.cards.r.RedElementalBlast.class)); cards.add(new SetCardInfo("Red Mana Battery", 343, Rarity.RARE, mage.cards.r.RedManaBattery.class)); + cards.add(new SetCardInfo("Red Ward", 44, Rarity.UNCOMMON, mage.cards.r.RedWard.class)); + cards.add(new SetCardInfo("Regeneration", 268, Rarity.COMMON, mage.cards.r.Regeneration.class)); + cards.add(new SetCardInfo("Relic Bind", 97, Rarity.RARE, mage.cards.r.RelicBind.class)); + cards.add(new SetCardInfo("Reverse Damage", 45, Rarity.RARE, mage.cards.r.ReverseDamage.class)); + cards.add(new SetCardInfo("Righteousness", 46, Rarity.RARE, mage.cards.r.Righteousness.class)); cards.add(new SetCardInfo("Rod of Ruin", 344, Rarity.UNCOMMON, mage.cards.r.RodOfRuin.class)); + cards.add(new SetCardInfo("Royal Assassin", 157, Rarity.RARE, mage.cards.r.RoyalAssassin.class)); + cards.add(new SetCardInfo("Samite Healer", 47, Rarity.COMMON, mage.cards.s.SamiteHealer.class)); + cards.add(new SetCardInfo("Sandstorm", 269, Rarity.COMMON, mage.cards.s.Sandstorm.class)); + cards.add(new SetCardInfo("Savannah Lions", 48, Rarity.RARE, mage.cards.s.SavannahLions.class)); + cards.add(new SetCardInfo("Scathe Zombies", 158, Rarity.COMMON, mage.cards.s.ScatheZombies.class)); + cards.add(new SetCardInfo("Scavenging Ghoul", 159, Rarity.UNCOMMON, mage.cards.s.ScavengingGhoul.class)); + cards.add(new SetCardInfo("Scryb Sprites", 270, Rarity.COMMON, mage.cards.s.ScrybSprites.class)); + cards.add(new SetCardInfo("Sea Serpent", 98, Rarity.COMMON, mage.cards.s.SeaSerpent.class)); + cards.add(new SetCardInfo("Seeker", 49, Rarity.COMMON, mage.cards.s.Seeker.class)); + cards.add(new SetCardInfo("Segovian Leviathan", 99, Rarity.UNCOMMON, mage.cards.s.SegovianLeviathan.class)); + cards.add(new SetCardInfo("Sengir Vampire", 160, Rarity.UNCOMMON, mage.cards.s.SengirVampire.class)); + cards.add(new SetCardInfo("Serra Angel", 50, Rarity.UNCOMMON, mage.cards.s.SerraAngel.class)); + cards.add(new SetCardInfo("Shanodin Dryads", 271, Rarity.COMMON, mage.cards.s.ShanodinDryads.class)); cards.add(new SetCardInfo("Shapeshifter", 345, Rarity.UNCOMMON, mage.cards.s.Shapeshifter.class)); + cards.add(new SetCardInfo("Shatter", 219, Rarity.COMMON, mage.cards.s.Shatter.class)); + cards.add(new SetCardInfo("Shivan Dragon", 220, Rarity.RARE, mage.cards.s.ShivanDragon.class)); + cards.add(new SetCardInfo("Simulacrum", 161, Rarity.UNCOMMON, mage.cards.s.Simulacrum.class)); + cards.add(new SetCardInfo("Sindbad", 100, Rarity.UNCOMMON, mage.cards.s.Sindbad.class)); + cards.add(new SetCardInfo("Siren's Call", 101, Rarity.UNCOMMON, mage.cards.s.SirensCall.class)); + cards.add(new SetCardInfo("Sisters of the Flame", 221, Rarity.COMMON, mage.cards.s.SistersOfTheFlame.class)); + cards.add(new SetCardInfo("Smoke", 222, Rarity.RARE, mage.cards.s.Smoke.class)); + cards.add(new SetCardInfo("Sorceress Queen", 162, Rarity.RARE, mage.cards.s.SorceressQueen.class)); cards.add(new SetCardInfo("Soul Net", 346, Rarity.UNCOMMON, mage.cards.s.SoulNet.class)); + cards.add(new SetCardInfo("Spell Blast", 103, Rarity.COMMON, mage.cards.s.SpellBlast.class)); + cards.add(new SetCardInfo("Spirit Link", 51, Rarity.UNCOMMON, mage.cards.s.SpiritLink.class)); + cards.add(new SetCardInfo("Spirit Shackle", 163, Rarity.UNCOMMON, mage.cards.s.SpiritShackle.class)); + cards.add(new SetCardInfo("Stasis", 104, Rarity.RARE, mage.cards.s.Stasis.class)); + cards.add(new SetCardInfo("Steal Artifact", 105, Rarity.UNCOMMON, mage.cards.s.StealArtifact.class)); + cards.add(new SetCardInfo("Stone Giant", 223, Rarity.UNCOMMON, mage.cards.s.StoneGiant.class)); + cards.add(new SetCardInfo("Stone Rain", 224, Rarity.COMMON, mage.cards.s.StoneRain.class)); + cards.add(new SetCardInfo("Stream of Life", 272, Rarity.COMMON, mage.cards.s.StreamOfLife.class)); + cards.add(new SetCardInfo("Strip Mine", 363, Rarity.UNCOMMON, mage.cards.s.StripMine.class)); cards.add(new SetCardInfo("Sunglasses of Urza", 347, Rarity.RARE, mage.cards.s.SunglassesOfUrza.class)); + cards.add(new SetCardInfo("Sunken City", 106, Rarity.COMMON, mage.cards.s.SunkenCity.class)); + cards.add(new SetCardInfo("Swamp", 370, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 371, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 372, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swords to Plowshares", 52, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class)); + cards.add(new SetCardInfo("Sylvan Library", 273, Rarity.RARE, mage.cards.s.SylvanLibrary.class)); cards.add(new SetCardInfo("Tawnos's Wand", 348, Rarity.UNCOMMON, mage.cards.t.TawnossWand.class)); cards.add(new SetCardInfo("Tawnos's Weaponry", 349, Rarity.UNCOMMON, mage.cards.t.TawnossWeaponry.class)); + cards.add(new SetCardInfo("Terror", 164, Rarity.COMMON, mage.cards.t.Terror.class)); cards.add(new SetCardInfo("Tetravus", 350, Rarity.RARE, mage.cards.t.Tetravus.class)); + cards.add(new SetCardInfo("The Brute", 226, Rarity.COMMON, mage.cards.t.TheBrute.class)); cards.add(new SetCardInfo("The Hive", 351, Rarity.RARE, mage.cards.t.TheHive.class)); cards.add(new SetCardInfo("The Rack", 352, Rarity.UNCOMMON, mage.cards.t.TheRack.class)); + cards.add(new SetCardInfo("Thicket Basilisk", 274, Rarity.UNCOMMON, mage.cards.t.ThicketBasilisk.class)); + cards.add(new SetCardInfo("Thoughtlace", 107, Rarity.RARE, mage.cards.t.Thoughtlace.class)); cards.add(new SetCardInfo("Throne of Bone", 353, Rarity.UNCOMMON, mage.cards.t.ThroneOfBone.class)); + cards.add(new SetCardInfo("Timber Wolves", 275, Rarity.RARE, mage.cards.t.TimberWolves.class)); + cards.add(new SetCardInfo("Time Elemental", 108, Rarity.RARE, mage.cards.t.TimeElemental.class)); + cards.add(new SetCardInfo("Titania's Song", 276, Rarity.RARE, mage.cards.t.TitaniasSong.class)); + cards.add(new SetCardInfo("Tranquility", 277, Rarity.COMMON, mage.cards.t.Tranquility.class)); cards.add(new SetCardInfo("Triskelion", 354, Rarity.RARE, mage.cards.t.Triskelion.class)); + cards.add(new SetCardInfo("Tsunami", 278, Rarity.UNCOMMON, mage.cards.t.Tsunami.class)); + cards.add(new SetCardInfo("Tundra Wolves", 53, Rarity.COMMON, mage.cards.t.TundraWolves.class)); + cards.add(new SetCardInfo("Tunnel", 227, Rarity.UNCOMMON, mage.cards.t.Tunnel.class)); + cards.add(new SetCardInfo("Twiddle", 109, Rarity.COMMON, mage.cards.t.Twiddle.class)); + cards.add(new SetCardInfo("Uncle Istvan", 165, Rarity.UNCOMMON, mage.cards.u.UncleIstvan.class)); + cards.add(new SetCardInfo("Unholy Strength", 166, Rarity.COMMON, mage.cards.u.UnholyStrength.class)); + cards.add(new SetCardInfo("Unstable Mutation", 110, Rarity.COMMON, mage.cards.u.UnstableMutation.class)); + cards.add(new SetCardInfo("Unsummon", 111, Rarity.COMMON, mage.cards.u.Unsummon.class)); + cards.add(new SetCardInfo("Untamed Wilds", 279, Rarity.UNCOMMON, mage.cards.u.UntamedWilds.class)); cards.add(new SetCardInfo("Urza's Avenger", 355, Rarity.RARE, mage.cards.u.UrzasAvenger.class)); + cards.add(new SetCardInfo("Uthden Troll", 228, Rarity.UNCOMMON, mage.cards.u.UthdenTroll.class)); + cards.add(new SetCardInfo("Vampire Bats", 167, Rarity.COMMON, mage.cards.v.VampireBats.class)); + cards.add(new SetCardInfo("Venom", 280, Rarity.COMMON, mage.cards.v.Venom.class)); + cards.add(new SetCardInfo("Verduran Enchantress", 281, Rarity.RARE, mage.cards.v.VerduranEnchantress.class)); + cards.add(new SetCardInfo("Visions", 54, Rarity.UNCOMMON, mage.cards.v.Visions.class)); + cards.add(new SetCardInfo("Volcanic Eruption", 112, Rarity.RARE, mage.cards.v.VolcanicEruption.class)); + cards.add(new SetCardInfo("Wall of Air", 113, Rarity.UNCOMMON, mage.cards.w.WallOfAir.class)); + cards.add(new SetCardInfo("Wall of Bone", 168, Rarity.UNCOMMON, mage.cards.w.WallOfBone.class)); + cards.add(new SetCardInfo("Wall of Brambles", 282, Rarity.UNCOMMON, mage.cards.w.WallOfBrambles.class)); + cards.add(new SetCardInfo("Wall of Dust", 229, Rarity.UNCOMMON, mage.cards.w.WallOfDust.class)); + cards.add(new SetCardInfo("Wall of Fire", 230, Rarity.UNCOMMON, mage.cards.w.WallOfFire.class)); + cards.add(new SetCardInfo("Wall of Ice", 283, Rarity.UNCOMMON, mage.cards.w.WallOfIce.class)); cards.add(new SetCardInfo("Wall of Spears", 356, Rarity.COMMON, mage.cards.w.WallOfSpears.class)); + cards.add(new SetCardInfo("Wall of Stone", 231, Rarity.UNCOMMON, mage.cards.w.WallOfStone.class)); + cards.add(new SetCardInfo("Wall of Swords", 55, Rarity.UNCOMMON, mage.cards.w.WallOfSwords.class)); + cards.add(new SetCardInfo("Wall of Water", 114, Rarity.UNCOMMON, mage.cards.w.WallOfWater.class)); + cards.add(new SetCardInfo("Wall of Wood", 284, Rarity.COMMON, mage.cards.w.WallOfWood.class)); + cards.add(new SetCardInfo("Wanderlust", 285, Rarity.UNCOMMON, mage.cards.w.Wanderlust.class)); + cards.add(new SetCardInfo("War Mammoth", 286, Rarity.COMMON, mage.cards.w.WarMammoth.class)); + cards.add(new SetCardInfo("Warp Artifact", 169, Rarity.RARE, mage.cards.w.WarpArtifact.class)); + cards.add(new SetCardInfo("Water Elemental", 115, Rarity.UNCOMMON, mage.cards.w.WaterElemental.class)); + cards.add(new SetCardInfo("Weakness", 170, Rarity.COMMON, mage.cards.w.Weakness.class)); + cards.add(new SetCardInfo("Web", 287, Rarity.RARE, mage.cards.w.Web.class)); + cards.add(new SetCardInfo("Whirling Dervish", 288, Rarity.UNCOMMON, mage.cards.w.WhirlingDervish.class)); + cards.add(new SetCardInfo("White Knight", 56, Rarity.UNCOMMON, mage.cards.w.WhiteKnight.class)); cards.add(new SetCardInfo("White Mana Battery", 357, Rarity.RARE, mage.cards.w.WhiteManaBattery.class)); + cards.add(new SetCardInfo("White Ward", 57, Rarity.UNCOMMON, mage.cards.w.WhiteWard.class)); + cards.add(new SetCardInfo("Wild Growth", 289, Rarity.COMMON, mage.cards.w.WildGrowth.class)); + cards.add(new SetCardInfo("Will-o'-the-Wisp", 171, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); + cards.add(new SetCardInfo("Winds of Change", 232, Rarity.RARE, mage.cards.w.WindsOfChange.class)); + cards.add(new SetCardInfo("Winter Blast", 290, Rarity.UNCOMMON, mage.cards.w.WinterBlast.class)); cards.add(new SetCardInfo("Winter Orb", 358, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 359, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); + cards.add(new SetCardInfo("Word of Binding", 172, Rarity.COMMON, mage.cards.w.WordOfBinding.class)); + cards.add(new SetCardInfo("Wrath of God", 58, Rarity.RARE, mage.cards.w.WrathOfGod.class)); + cards.add(new SetCardInfo("Xenic Poltergeist", 173, Rarity.RARE, mage.cards.x.XenicPoltergeist.class)); cards.add(new SetCardInfo("Yotian Soldier", 360, Rarity.COMMON, mage.cards.y.YotianSoldier.class)); + cards.add(new SetCardInfo("Zephyr Falcon", 116, Rarity.COMMON, mage.cards.z.ZephyrFalcon.class)); + cards.add(new SetCardInfo("Zombie Master", 174, Rarity.RARE, mage.cards.z.ZombieMaster.class)); } } diff --git a/Mage.Sets/src/mage/sets/Guildpact.java b/Mage.Sets/src/mage/sets/Guildpact.java index 16e3125609..1e3a161131 100644 --- a/Mage.Sets/src/mage/sets/Guildpact.java +++ b/Mage.Sets/src/mage/sets/Guildpact.java @@ -29,6 +29,7 @@ public final class Guildpact extends ExpansionSet { this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Absolver Thrull", 1, Rarity.COMMON, mage.cards.a.AbsolverThrull.class)); cards.add(new SetCardInfo("Abyssal Nocturnus", 43, Rarity.RARE, mage.cards.a.AbyssalNocturnus.class)); + cards.add(new SetCardInfo("Aetherplasm", 22, Rarity.UNCOMMON, mage.cards.a.Aetherplasm.class)); cards.add(new SetCardInfo("Agent of Masks", 100, Rarity.UNCOMMON, mage.cards.a.AgentOfMasks.class)); cards.add(new SetCardInfo("Angel of Despair", 101, Rarity.RARE, mage.cards.a.AngelOfDespair.class)); cards.add(new SetCardInfo("Battering Wurm", 79, Rarity.UNCOMMON, mage.cards.b.BatteringWurm.class)); @@ -130,6 +131,7 @@ public final class Guildpact extends ExpansionSet { cards.add(new SetCardInfo("Pillory of the Sleepless", 125, Rarity.COMMON, mage.cards.p.PilloryOfTheSleepless.class)); cards.add(new SetCardInfo("Plagued Rusalka", 56, Rarity.UNCOMMON, mage.cards.p.PlaguedRusalka.class)); cards.add(new SetCardInfo("Poisonbelly Ogre", 57, Rarity.COMMON, mage.cards.p.PoisonbellyOgre.class)); + cards.add(new SetCardInfo("Predatory Focus", 92, Rarity.UNCOMMON, mage.cards.p.PredatoryFocus.class)); cards.add(new SetCardInfo("Primeval Light", 93, Rarity.UNCOMMON, mage.cards.p.PrimevalLight.class)); cards.add(new SetCardInfo("Pyromatics", 72, Rarity.COMMON, mage.cards.p.Pyromatics.class)); cards.add(new SetCardInfo("Quicken", 31, Rarity.RARE, mage.cards.q.Quicken.class)); diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 71dadfd229..52e35f6772 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -134,6 +134,7 @@ public final class Homelands extends ExpansionSet { cards.add(new SetCardInfo("Mesa Falcon", "10b", Rarity.COMMON, MesaFalcon.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mystic Decree", 34, Rarity.RARE, mage.cards.m.MysticDecree.class)); cards.add(new SetCardInfo("Narwhal", 35, Rarity.RARE, mage.cards.n.Narwhal.class)); + cards.add(new SetCardInfo("Orcish Mine", 78, Rarity.UNCOMMON, mage.cards.o.OrcishMine.class)); cards.add(new SetCardInfo("Primal Order", 92, Rarity.RARE, mage.cards.p.PrimalOrder.class)); cards.add(new SetCardInfo("Prophecy", 11, Rarity.COMMON, mage.cards.p.Prophecy.class)); cards.add(new SetCardInfo("Rashka the Slayer", 12, Rarity.RARE, mage.cards.r.RashkaTheSlayer.class)); diff --git a/Mage.Sets/src/mage/sets/Innistrad.java b/Mage.Sets/src/mage/sets/Innistrad.java index 62ea025a4e..b32374439f 100644 --- a/Mage.Sets/src/mage/sets/Innistrad.java +++ b/Mage.Sets/src/mage/sets/Innistrad.java @@ -309,7 +309,7 @@ public final class Innistrad extends ExpansionSet { cards.add(new SetCardInfo("Wooden Stake", 237, Rarity.COMMON, mage.cards.w.WoodenStake.class)); cards.add(new SetCardInfo("Woodland Cemetery", 249, Rarity.RARE, mage.cards.w.WoodlandCemetery.class)); cards.add(new SetCardInfo("Woodland Sleuth", 210, Rarity.COMMON, mage.cards.w.WoodlandSleuth.class)); - cards.add(new SetCardInfo("Wreath of Geists", 211, Rarity.UNCOMMON, mage.cards.w.WreathofGeists.class)); + cards.add(new SetCardInfo("Wreath of Geists", 211, Rarity.UNCOMMON, mage.cards.w.WreathOfGeists.class)); } } diff --git a/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java b/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java index 16384462e2..3175d24d20 100644 --- a/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java +++ b/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java @@ -309,6 +309,7 @@ public final class LimitedEditionAlpha extends ExpansionSet { cards.add(new SetCardInfo("Will-o'-the-Wisp", 135, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); cards.add(new SetCardInfo("Winter Orb", 275, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 276, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); + cards.add(new SetCardInfo("Word of Command", 136, Rarity.RARE, mage.cards.w.WordOfCommand.class)); cards.add(new SetCardInfo("Wrath of God", 45, Rarity.RARE, mage.cards.w.WrathOfGod.class)); cards.add(new SetCardInfo("Zombie Master", 137, Rarity.RARE, mage.cards.z.ZombieMaster.class)); } diff --git a/Mage.Sets/src/mage/sets/LimitedEditionBeta.java b/Mage.Sets/src/mage/sets/LimitedEditionBeta.java index 4046a23497..a67c9d45ee 100644 --- a/Mage.Sets/src/mage/sets/LimitedEditionBeta.java +++ b/Mage.Sets/src/mage/sets/LimitedEditionBeta.java @@ -316,6 +316,7 @@ public final class LimitedEditionBeta extends ExpansionSet { cards.add(new SetCardInfo("Will-o'-the-Wisp", 136, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); cards.add(new SetCardInfo("Winter Orb", 276, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 277, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); + cards.add(new SetCardInfo("Word of Command", 137, Rarity.RARE, mage.cards.w.WordOfCommand.class)); cards.add(new SetCardInfo("Wrath of God", 46, Rarity.RARE, mage.cards.w.WrathOfGod.class)); cards.add(new SetCardInfo("Zombie Master", 138, Rarity.RARE, mage.cards.z.ZombieMaster.class)); } diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index bee97c5b58..c3f9f8ffbf 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -141,6 +141,7 @@ public final class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Infernal Darkness", 97, Rarity.RARE, mage.cards.i.InfernalDarkness.class)); cards.add(new SetCardInfo("Inheritance", 18, Rarity.UNCOMMON, mage.cards.i.Inheritance.class)); cards.add(new SetCardInfo("Ironclaw Orcs", 132, Rarity.COMMON, mage.cards.i.IronclawOrcs.class)); + cards.add(new SetCardInfo("Ivory Gargoyle", 19, Rarity.RARE, mage.cards.i.IvoryGargoyle.class)); cards.add(new SetCardInfo("Jester's Mask", 211, Rarity.RARE, mage.cards.j.JestersMask.class)); cards.add(new SetCardInfo("Jeweled Amulet", 212, Rarity.UNCOMMON, mage.cards.j.JeweledAmulet.class)); cards.add(new SetCardInfo("Johtull Wurm", 168, Rarity.UNCOMMON, mage.cards.j.JohtullWurm.class)); diff --git a/Mage.Sets/src/mage/sets/MastersEditionIV.java b/Mage.Sets/src/mage/sets/MastersEditionIV.java index 4ba79ba3ed..3a2f6c7ee1 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIV.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIV.java @@ -298,6 +298,7 @@ public final class MastersEditionIV extends ExpansionSet { cards.add(new SetCardInfo("Wild Griffin", 35, Rarity.COMMON, mage.cards.w.WildGriffin.class)); cards.add(new SetCardInfo("Wild Ox", 174, Rarity.UNCOMMON, mage.cards.w.WildOx.class)); cards.add(new SetCardInfo("Wood Elemental", 175, Rarity.RARE, mage.cards.w.WoodElemental.class)); + cards.add(new SetCardInfo("Word of Command", 103, Rarity.RARE, mage.cards.w.WordOfCommand.class)); cards.add(new SetCardInfo("Xenic Poltergeist", 104, Rarity.UNCOMMON, mage.cards.x.XenicPoltergeist.class)); cards.add(new SetCardInfo("Yotian Soldier", 240, Rarity.COMMON, mage.cards.y.YotianSoldier.class)); cards.add(new SetCardInfo("Zombie Master", 105, Rarity.UNCOMMON, mage.cards.z.ZombieMaster.class)); diff --git a/Mage.Sets/src/mage/sets/MirrodinBesieged.java b/Mage.Sets/src/mage/sets/MirrodinBesieged.java index cd5df52caf..31c5cc90a6 100644 --- a/Mage.Sets/src/mage/sets/MirrodinBesieged.java +++ b/Mage.Sets/src/mage/sets/MirrodinBesieged.java @@ -38,7 +38,7 @@ public final class MirrodinBesieged extends ExpansionSet { cards.add(new SetCardInfo("Blue Sun's Zenith", 20, Rarity.RARE, mage.cards.b.BlueSunsZenith.class)); cards.add(new SetCardInfo("Bonehoard", 100, Rarity.RARE, mage.cards.b.Bonehoard.class)); cards.add(new SetCardInfo("Brass Squire", 101, Rarity.UNCOMMON, mage.cards.b.BrassSquire.class)); - cards.add(new SetCardInfo("Burn the Impure", 59, Rarity.COMMON, mage.cards.b.BurntheImpure.class)); + cards.add(new SetCardInfo("Burn the Impure", 59, Rarity.COMMON, mage.cards.b.BurnTheImpure.class)); cards.add(new SetCardInfo("Caustic Hound", 40, Rarity.COMMON, mage.cards.c.CausticHound.class)); cards.add(new SetCardInfo("Choking Fumes", 4, Rarity.UNCOMMON, mage.cards.c.ChokingFumes.class)); cards.add(new SetCardInfo("Concussive Bolt", 60, Rarity.COMMON, mage.cards.c.ConcussiveBolt.class)); diff --git a/Mage.Sets/src/mage/sets/NinthEdition.java b/Mage.Sets/src/mage/sets/NinthEdition.java index eac43b9eba..2996fb9c07 100644 --- a/Mage.Sets/src/mage/sets/NinthEdition.java +++ b/Mage.Sets/src/mage/sets/NinthEdition.java @@ -57,6 +57,7 @@ public final class NinthEdition extends ExpansionSet { cards.add(new SetCardInfo("Bog Imp", 116, Rarity.COMMON, mage.cards.b.BogImp.class)); cards.add(new SetCardInfo("Bog Wraith", 117, Rarity.UNCOMMON, mage.cards.b.BogWraith.class)); cards.add(new SetCardInfo("Boiling Seas", 178, Rarity.UNCOMMON, mage.cards.b.BoilingSeas.class)); + cards.add(new SetCardInfo("Booby Trap", 289, Rarity.RARE, mage.cards.b.BoobyTrap.class)); cards.add(new SetCardInfo("Boomerang", 66, Rarity.COMMON, mage.cards.b.Boomerang.class)); cards.add(new SetCardInfo("Bottle Gnomes", 290, Rarity.UNCOMMON, mage.cards.b.BottleGnomes.class)); cards.add(new SetCardInfo("Brushland", 319, Rarity.RARE, mage.cards.b.Brushland.class)); diff --git a/Mage.Sets/src/mage/sets/PlanarChaos.java b/Mage.Sets/src/mage/sets/PlanarChaos.java index dc3ca252a1..6856533d5c 100644 --- a/Mage.Sets/src/mage/sets/PlanarChaos.java +++ b/Mage.Sets/src/mage/sets/PlanarChaos.java @@ -61,6 +61,7 @@ public final class PlanarChaos extends ExpansionSet { cards.add(new SetCardInfo("Deadly Grub", 69, Rarity.COMMON, mage.cards.d.DeadlyGrub.class)); cards.add(new SetCardInfo("Deadwood Treefolk", 126, Rarity.UNCOMMON, mage.cards.d.DeadwoodTreefolk.class)); cards.add(new SetCardInfo("Detritivore", 96, Rarity.RARE, mage.cards.d.Detritivore.class)); + cards.add(new SetCardInfo("Dichotomancy", 38, Rarity.RARE, mage.cards.d.Dichotomancy.class)); cards.add(new SetCardInfo("Dismal Failure", 39, Rarity.UNCOMMON, mage.cards.d.DismalFailure.class)); cards.add(new SetCardInfo("Dormant Sliver", 156, Rarity.UNCOMMON, mage.cards.d.DormantSliver.class)); cards.add(new SetCardInfo("Dreamscape Artist", 40, Rarity.COMMON, mage.cards.d.DreamscapeArtist.class)); @@ -114,6 +115,7 @@ public final class PlanarChaos extends ExpansionSet { cards.add(new SetCardInfo("Midnight Charm", 74, Rarity.COMMON, mage.cards.m.MidnightCharm.class)); cards.add(new SetCardInfo("Mire Boa", 135, Rarity.COMMON, mage.cards.m.MireBoa.class)); cards.add(new SetCardInfo("Mirri the Cursed", 75, Rarity.RARE, mage.cards.m.MirriTheCursed.class)); + cards.add(new SetCardInfo("Molten Firebird", 117, Rarity.RARE, mage.cards.m.MoltenFirebird.class)); cards.add(new SetCardInfo("Muck Drubb", 76, Rarity.UNCOMMON, mage.cards.m.MuckDrubb.class)); cards.add(new SetCardInfo("Mycologist", 27, Rarity.UNCOMMON, mage.cards.m.Mycologist.class)); cards.add(new SetCardInfo("Necrotic Sliver", 159, Rarity.UNCOMMON, mage.cards.n.NecroticSliver.class)); diff --git a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java index 93cf471f04..0742778d39 100644 --- a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java +++ b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java @@ -244,7 +244,7 @@ public final class ScarsOfMirrodin extends ExpansionSet { cards.add(new SetCardInfo("Tel-Jilad Defiance", 129, Rarity.COMMON, mage.cards.t.TelJiladDefiance.class)); cards.add(new SetCardInfo("Tel-Jilad Fallen", 130, Rarity.COMMON, mage.cards.t.TelJiladFallen.class)); cards.add(new SetCardInfo("Tempered Steel", 24, Rarity.RARE, mage.cards.t.TemperedSteel.class)); - cards.add(new SetCardInfo("Throne of Geth", 211, Rarity.UNCOMMON, mage.cards.t.ThroneofGeth.class)); + cards.add(new SetCardInfo("Throne of Geth", 211, Rarity.UNCOMMON, mage.cards.t.ThroneOfGeth.class)); cards.add(new SetCardInfo("Thrummingbird", 47, Rarity.UNCOMMON, mage.cards.t.Thrummingbird.class)); cards.add(new SetCardInfo("Tower of Calamities", 212, Rarity.RARE, mage.cards.t.TowerOfCalamities.class)); cards.add(new SetCardInfo("Trigon of Corruption", 213, Rarity.UNCOMMON, mage.cards.t.TrigonOfCorruption.class)); diff --git a/Mage.Sets/src/mage/sets/Tempest.java b/Mage.Sets/src/mage/sets/Tempest.java index bcb715359d..a5fce2ce5a 100644 --- a/Mage.Sets/src/mage/sets/Tempest.java +++ b/Mage.Sets/src/mage/sets/Tempest.java @@ -43,6 +43,7 @@ public final class Tempest extends ExpansionSet { cards.add(new SetCardInfo("Blood Frenzy", 164, Rarity.COMMON, mage.cards.b.BloodFrenzy.class)); cards.add(new SetCardInfo("Blood Pet", 109, Rarity.COMMON, mage.cards.b.BloodPet.class)); cards.add(new SetCardInfo("Boil", 165, Rarity.UNCOMMON, mage.cards.b.Boil.class)); + cards.add(new SetCardInfo("Booby Trap", 277, Rarity.RARE, mage.cards.b.BoobyTrap.class)); cards.add(new SetCardInfo("Bottle Gnomes", 278, Rarity.UNCOMMON, mage.cards.b.BottleGnomes.class)); cards.add(new SetCardInfo("Bounty Hunter", 110, Rarity.RARE, mage.cards.b.BountyHunter.class)); cards.add(new SetCardInfo("Broken Fall", 216, Rarity.COMMON, mage.cards.b.BrokenFall.class)); diff --git a/Mage.Sets/src/mage/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index be584c20ac..a730e26950 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -26,6 +26,7 @@ public final class TimeSpiral extends ExpansionSet { this.numBoosterRare = 1; this.ratioBoosterMythic = 0; cards.add(new SetCardInfo("Academy Ruins", 269, Rarity.RARE, mage.cards.a.AcademyRuins.class)); + cards.add(new SetCardInfo("Aether Web", 189, Rarity.COMMON, mage.cards.a.AetherWeb.class)); cards.add(new SetCardInfo("Aetherflame Wall", 142, Rarity.COMMON, mage.cards.a.AetherflameWall.class)); cards.add(new SetCardInfo("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class)); cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class)); @@ -69,6 +70,7 @@ public final class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Corpulent Corpse", 98, Rarity.COMMON, mage.cards.c.CorpulentCorpse.class)); cards.add(new SetCardInfo("Crookclaw Transmuter", 55, Rarity.COMMON, mage.cards.c.CrookclawTransmuter.class)); cards.add(new SetCardInfo("Curse of the Cabal", 99, Rarity.RARE, mage.cards.c.CurseOfTheCabal.class)); + cards.add(new SetCardInfo("Cyclopean Giant", 100, Rarity.COMMON, mage.cards.c.CyclopeanGiant.class)); cards.add(new SetCardInfo("Dark Withering", 101, Rarity.COMMON, mage.cards.d.DarkWithering.class)); cards.add(new SetCardInfo("D'Avenant Healer", 11, Rarity.COMMON, mage.cards.d.DAvenantHealer.class)); cards.add(new SetCardInfo("Deathspore Thallid", 102, Rarity.COMMON, mage.cards.d.DeathsporeThallid.class)); @@ -212,7 +214,9 @@ public final class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Plains", 283, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 284, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 285, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plated Pegasus", 34, Rarity.UNCOMMON, mage.cards.p.PlatedPegasus.class)); cards.add(new SetCardInfo("Plunder", 174, Rarity.COMMON, mage.cards.p.Plunder.class)); + cards.add(new SetCardInfo("Premature Burial", 125, Rarity.UNCOMMON, mage.cards.p.PrematureBurial.class)); cards.add(new SetCardInfo("Primal Forcemage", 212, Rarity.UNCOMMON, mage.cards.p.PrimalForcemage.class)); cards.add(new SetCardInfo("Prismatic Lens", 262, Rarity.COMMON, mage.cards.p.PrismaticLens.class)); cards.add(new SetCardInfo("Psionic Sliver", 72, Rarity.RARE, mage.cards.p.PsionicSliver.class)); @@ -284,6 +288,7 @@ public final class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Thallid Shell-Dweller", 226, Rarity.COMMON, mage.cards.t.ThallidShellDweller.class)); cards.add(new SetCardInfo("Thelonite Hermit", 228, Rarity.RARE, mage.cards.t.TheloniteHermit.class)); cards.add(new SetCardInfo("Thelon of Havenwood", 227, Rarity.RARE, mage.cards.t.ThelonOfHavenwood.class)); + cards.add(new SetCardInfo("Thick-Skinned Goblin", 182, Rarity.UNCOMMON, mage.cards.t.ThickSkinnedGoblin.class)); cards.add(new SetCardInfo("Think Twice", 86, Rarity.COMMON, mage.cards.t.ThinkTwice.class)); cards.add(new SetCardInfo("Thrill of the Hunt", 229, Rarity.COMMON, mage.cards.t.ThrillOfTheHunt.class)); cards.add(new SetCardInfo("Thunder Totem", 265, Rarity.UNCOMMON, mage.cards.t.ThunderTotem.class)); diff --git a/Mage.Sets/src/mage/sets/UnlimitedEdition.java b/Mage.Sets/src/mage/sets/UnlimitedEdition.java index c2dc591ecf..a08da1a590 100644 --- a/Mage.Sets/src/mage/sets/UnlimitedEdition.java +++ b/Mage.Sets/src/mage/sets/UnlimitedEdition.java @@ -316,6 +316,7 @@ public final class UnlimitedEdition extends ExpansionSet { cards.add(new SetCardInfo("Will-o'-the-Wisp", 136, Rarity.RARE, mage.cards.w.WillOTheWisp.class)); cards.add(new SetCardInfo("Winter Orb", 276, Rarity.RARE, mage.cards.w.WinterOrb.class)); cards.add(new SetCardInfo("Wooden Sphere", 277, Rarity.UNCOMMON, mage.cards.w.WoodenSphere.class)); + cards.add(new SetCardInfo("Word of Command", 137, Rarity.RARE, mage.cards.w.WordOfCommand.class)); cards.add(new SetCardInfo("Wrath of God", 46, Rarity.RARE, mage.cards.w.WrathOfGod.class)); cards.add(new SetCardInfo("Zombie Master", 138, Rarity.RARE, mage.cards.z.ZombieMaster.class)); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java index 7668806acf..fbaf5f07ad 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java @@ -36,9 +36,41 @@ public class PutToLibraryTest extends CardTestPlayerBase { ArrayList cardArray = new ArrayList<>(playerB.getLibrary().getCards(currentGame)); Assert.assertTrue("Library has no cards but should have", cardArray.size() > 1); Card secondCard = cardArray.get(1); - Assert.assertTrue("Second card from top should be Dread Wanderer, bnut it isn't", + Assert.assertTrue("Second card from top should be Dread Wanderer, but it isn't", secondCard != null && secondCard.getName().equals("Dread Wanderer")); } + // Unexpectedly Absent doesn't work properly, no matter how much you pay for X the card is always returned on top of the library. + @Test + public void testUnexpectedlyAbsent() { + // Flying + // At the beginning of combat on your turn, you may pay {G}{U}. When you do, put a +1/+1 counter on another target creature you control, and that creature gains flying until end of turn. + addCard(Zone.BATTLEFIELD, playerA, "Skyrider Patrol", 1); + + // Put target nonland permanent into its owner's library just beneath the top X cards of that library. + addCard(Zone.HAND, playerB, "Unexpectedly Absent"); // Instant {X}{W}{W} + addCard(Zone.BATTLEFIELD, playerB, "Plains", 5); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Unexpectedly Absent", "Skyrider Patrol"); + setChoice(playerB, "X=3"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerB, "Unexpectedly Absent", 1); + assertPermanentCount(playerA, "Skyrider Patrol", 0); + assertLibraryCount(playerA, "Skyrider Patrol", 1); + + ArrayList cardArray = new ArrayList<>(playerA.getLibrary().getCards(currentGame)); + Assert.assertTrue("Library has no cards but should have", cardArray.size() > 3); + Card fourthCard = cardArray.get(3);// get the 4th element + Assert.assertTrue("Fourth card from top should be Skyrider Patrol, but it isn't", + fourthCard != null && fourthCard.getName().equals("Skyrider Patrol")); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + } + } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java index d82ee22b67..6a9fac0206 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/KikiJikiMirrorBreakerTest.java @@ -23,7 +23,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Kiki-Jiki, Mirror Breaker", 1); addCard(Zone.BATTLEFIELD, playerA, "Voice of Resurgence", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step."); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -39,7 +39,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Kiki-Jiki, Mirror Breaker", 1); addCard(Zone.BATTLEFIELD, playerA, "Voice of Resurgence", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step."); setStopAt(1, PhaseStep.END_TURN); execute(); @@ -60,7 +60,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { // Flamebreak deals 3 damage to each creature without flying and each player. Creatures dealt damage this way can't be regenerated this turn. addCard(Zone.HAND, playerB, "Flamebreak"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step."); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step."); castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Flamebreak"); setStopAt(2, PhaseStep.END_TURN); @@ -95,7 +95,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { castSpell(2, PhaseStep.UPKEEP, playerA, "Blustersquall", "Humble Defector"); // Tap nontoken Defector so only the Token can be used later - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step."); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step."); activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Draw two cards. Target opponent gains control"); @@ -137,7 +137,7 @@ public class KikiJikiMirrorBreakerTest extends CardTestPlayerBase { castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Body Double"); setChoice(playerB, "Silvercoat Lion"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Create a token that's a copy of target nonlegendary creature you control. That token has haste. Sacrifice it at the beginning of the next end step."); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step."); attack(2, playerB, "Silvercoat Lion"); setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/combat/FirstStrikeTest.java b/Mage.Tests/src/test/java/org/mage/test/combat/FirstStrikeTest.java new file mode 100644 index 0000000000..d14691f3d5 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/combat/FirstStrikeTest.java @@ -0,0 +1,40 @@ +package org.mage.test.combat; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class FirstStrikeTest extends CardTestPlayerBase { + + + @Test + public void firstStrikeAttacker(){ + addCard(Zone.BATTLEFIELD, playerA, "Silver Knight", 1); + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1); + + attack(1, playerA, "Silver Knight"); + block(1, playerB, "Grizzly Bears", "Silver Knight"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerB, "Grizzly Bears", 1); + assertGraveyardCount(playerA, "Silver Knight", 0); + } + + @Test + public void firstStrikeBlocker(){ + addCard(Zone.BATTLEFIELD, playerB, "Silver Knight", 1); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1); + + attack(1, playerA, "Grizzly Bears"); + block(1, playerB, "Silver Knight", "Grizzly Bears"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerA, "Grizzly Bears", 1); + assertGraveyardCount(playerB, "Silver Knight", 0); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index 35199654d9..eed329f958 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -4,7 +4,6 @@ import java.io.Serializable; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; - import mage.MageObject; import mage.MageObjectReference; import mage.ObjectColor; @@ -127,7 +126,7 @@ public class TestPlayer implements Player { /** * @param maxCallsWithoutAction max number of priority passes a player may - * have for this test (default = 100) + * have for this test (default = 100) */ public void setMaxCallsWithoutAction(int maxCallsWithoutAction) { this.maxCallsWithoutAction = maxCallsWithoutAction; @@ -686,7 +685,6 @@ public class TestPlayer implements Player { } } - private void assertManaPoolInner(PlayerAction action, Player player, ManaType manaType, Integer amount) { Integer current = player.getManaPool().get(manaType); Assert.assertEquals(action.getActionName() + " - mana pool must contain [" + amount.toString() + " " + manaType.toString() + "], but found [" + current.toString() + "]", amount, current); @@ -696,7 +694,6 @@ public class TestPlayer implements Player { Assert.assertNotEquals(action.getActionName() + " - must setup color", "", colors); // Can't use ObjectColor -- it's doesn't contain colorless -- need to use custom parse - for (int i = 0; i < colors.length(); i++) { switch (colors.charAt(i)) { case 'W': @@ -774,7 +771,7 @@ public class TestPlayer implements Player { // Loop through players and validate can attack/block this turn UUID defenderId = null; //List - for (Iterator it = actions.iterator(); it.hasNext(); ) { + for (Iterator it = actions.iterator(); it.hasNext();) { PlayerAction action = it.next(); if (action.getTurnNum() == game.getTurnNum() && action.getAction().startsWith("attack:")) { String command = action.getAction(); @@ -826,6 +823,11 @@ public class TestPlayer implements Player { } } + @Override + public List getTurnControllers() { + return computerPlayer.getTurnControllers(); + } + @Override public void selectBlockers(Game game, UUID defendingPlayerId) { @@ -1488,6 +1490,11 @@ public class TestPlayer implements Player { computerPlayer.setGameUnderYourControl(value); } + @Override + public void setGameUnderYourControl(boolean value, boolean fullRestore) { + computerPlayer.setGameUnderYourControl(value, fullRestore); + } + @Override public void endOfTurn(Game game) { computerPlayer.endOfTurn(game); @@ -2197,6 +2204,11 @@ public class TestPlayer implements Player { return computerPlayer.canPlayCardsFromGraveyard(); } + @Override + public void setPayManaMode(boolean payManaMode) { + computerPlayer.setPayManaMode(payManaMode); + } + @Override public void setPlayCardsFromGraveyard(boolean playCardsFromGraveyard) { computerPlayer.setPlayCardsFromGraveyard(playCardsFromGraveyard); @@ -2442,7 +2454,7 @@ public class TestPlayer implements Player { @Override public boolean choose(Outcome outcome, Target target, - UUID sourceId, Game game + UUID sourceId, Game game ) { // needed to call here the TestPlayer because it's overwitten return choose(outcome, target, sourceId, game, null); @@ -2450,7 +2462,7 @@ public class TestPlayer implements Player { @Override public boolean choose(Outcome outcome, Cards cards, - TargetCard target, Game game + TargetCard target, Game game ) { if (!choices.isEmpty()) { for (String choose2 : choices) { @@ -2482,7 +2494,7 @@ public class TestPlayer implements Player { @Override public boolean chooseTargetAmount(Outcome outcome, TargetAmount target, - Ability source, Game game + Ability source, Game game ) { return computerPlayer.chooseTargetAmount(outcome, target, source, game); } @@ -2495,15 +2507,15 @@ public class TestPlayer implements Player { @Override public boolean choosePile(Outcome outcome, String message, - List pile1, List pile2, - Game game + List pile1, List pile2, + Game game ) { return computerPlayer.choosePile(outcome, message, pile1, pile2, game); } @Override public boolean playMana(Ability ability, ManaCost unpaid, - String promptText, Game game + String promptText, Game game ) { groupsForTargetHandling = null; return computerPlayer.playMana(ability, unpaid, promptText, game); @@ -2517,15 +2529,15 @@ public class TestPlayer implements Player { @Override public UUID chooseBlockerOrder(List blockers, CombatGroup combatGroup, - List blockerOrder, Game game + List blockerOrder, Game game ) { return computerPlayer.chooseBlockerOrder(blockers, combatGroup, blockerOrder, game); } @Override public void assignDamage(int damage, List targets, - String singleTargetName, UUID sourceId, - Game game + String singleTargetName, UUID sourceId, + Game game ) { computerPlayer.assignDamage(damage, targets, singleTargetName, sourceId, game); } @@ -2544,14 +2556,14 @@ public class TestPlayer implements Player { @Override public void pickCard(List cards, Deck deck, - Draft draft + Draft draft ) { computerPlayer.pickCard(cards, deck, draft); } @Override public boolean scry(int value, Ability source, - Game game + Game game ) { // Don't scry at the start of the game. if (game.getTurnNum() == 1 && game.getStep() == null) { @@ -2562,37 +2574,37 @@ public class TestPlayer implements Player { @Override public boolean moveCards(Card card, Zone toZone, - Ability source, Game game + Ability source, Game game ) { return computerPlayer.moveCards(card, toZone, source, game); } @Override public boolean moveCards(Card card, Zone toZone, - Ability source, Game game, - boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects + Ability source, Game game, + boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects ) { return computerPlayer.moveCards(card, toZone, source, game, tapped, faceDown, byOwner, appliedEffects); } @Override public boolean moveCards(Cards cards, Zone toZone, - Ability source, Game game + Ability source, Game game ) { return computerPlayer.moveCards(cards, toZone, source, game); } @Override public boolean moveCards(Set cards, Zone toZone, - Ability source, Game game + Ability source, Game game ) { return computerPlayer.moveCards(cards, toZone, source, game); } @Override public boolean moveCards(Set cards, Zone toZone, - Ability source, Game game, - boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects + Ability source, Game game, + boolean tapped, boolean faceDown, boolean byOwner, List appliedEffects ) { return computerPlayer.moveCards(cards, toZone, source, game, tapped, faceDown, byOwner, appliedEffects); } diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index 43a16020dc..bc84033378 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -1307,6 +1307,21 @@ public class PlayerStub implements Player { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } + @Override + public List getTurnControllers() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void setGameUnderYourControl(boolean value, boolean fullRestore) { + + } + + @Override + public void setPayManaMode(boolean payManaMode) { + + } + @Override public boolean equals(Object o) { if (this == o) { @@ -1325,4 +1340,11 @@ public class PlayerStub implements Player { return this.getId().equals(obj.getId()); } + @Override + public int hashCode() { + int hash = 5; + hash = 41 * hash + Objects.hashCode(this.id); + return hash; + } + } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 30612176f0..27d780138f 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -72,7 +72,13 @@ public class VerifyCardDataTest { // subtype skipListCreate("SUBTYPE"); - skipListAddName("SUBTYPE", "Dragon Egg"); // uncomment when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Dragon Egg"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Rukh Egg"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Roc Egg"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Summoner's Egg"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Ludevic's Test Subject"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Prowling Pangolin"); // remove when MTGJSON is updated with M19 + skipListAddName("SUBTYPE", "Electryte"); // remove when MTGJSON is updated with M19 // number skipListCreate("NUMBER"); diff --git a/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SanctuaryInterveningIfTriggeredAbility.java similarity index 86% rename from Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java rename to Mage/src/main/java/mage/abilities/common/SanctuaryInterveningIfTriggeredAbility.java index efb2bffd4d..9e07b93522 100644 --- a/Mage/src/main/java/mage/abilities/common/SanctuaryTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/SanctuaryInterveningIfTriggeredAbility.java @@ -8,7 +8,7 @@ import mage.abilities.condition.Condition; import mage.abilities.condition.InvertCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.decorator.ConditionalOneShotEffect; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.constants.TargetController; import mage.filter.FilterPermanent; @@ -19,7 +19,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; * * @author TheElk801 */ -public class SanctuaryTriggeredAbility extends ConditionalTriggeredAbility { +public class SanctuaryInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility { private static Condition makeOrCondition(ObjectColor color1, ObjectColor color2) { FilterPermanent filter = new FilterPermanent(); @@ -48,7 +48,7 @@ public class SanctuaryTriggeredAbility extends ConditionalTriggeredAbility { return ability; } - public SanctuaryTriggeredAbility(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2, String text) { + public SanctuaryInterveningIfTriggeredAbility(OneShotEffect effect1, OneShotEffect effect2, ObjectColor color1, ObjectColor color2, String text) { super(makeTrigger(effect1, effect2, color1, color2), makeOrCondition(color1, color2), text); } } diff --git a/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java index 97a8839384..fef3c1e04c 100644 --- a/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java +++ b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java @@ -230,7 +230,7 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter if (condition == null || alternateCosts.size() == 1) { sb.append(" rather than pay this spell's mana cost"); } else if (alternateCosts.isEmpty()) { - sb.append("cast {this} without paying its mana cost"); + sb.append("cast this spell without paying its mana cost"); } sb.append('.'); if (numberCosts == 1 && remarkText != null) { diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java index 1c51f62408..082f09c47d 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java @@ -207,7 +207,9 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { return true; } Player player = game.getPlayer(controllerId); - assignPayment(game, ability, player.getManaPool(), costToPay); + if (!player.getManaPool().isForcedToPay()) { + assignPayment(game, ability, player.getManaPool(), costToPay); + } game.getState().getSpecialActions().removeManaActions(); while (!isPaid()) { ManaCost unpaid = this.getUnpaid(); diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index e7fc43af0b..dbf25f6df4 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -117,7 +117,9 @@ public class ManaCostsImpl extends ArrayList implements M } Player player = game.getPlayer(controllerId); - assignPayment(game, ability, player.getManaPool(), this); + if (!player.getManaPool().isForcedToPay()) { + assignPayment(game, ability, player.getManaPool(), this); + } game.getState().getSpecialActions().removeManaActions(); while (!isPaid()) { ManaCost unpaid = this.getUnpaid(); @@ -235,10 +237,15 @@ public class ManaCostsImpl extends ArrayList implements M @Override public void assignPayment(Game game, Ability ability, ManaPool pool, Cost costToPay) { - if (!pool.isAutoPayment() && pool.getUnlockedManaType() == null) { + boolean wasUnlockedManaType = (pool.getUnlockedManaType() != null); + if (!pool.isAutoPayment() && !wasUnlockedManaType) { // if auto payment is inactive and no mana type was clicked manually - do nothing return; } + ManaCosts referenceCosts = null; + if (pool.isForcedToPay()) { + referenceCosts = this.copy(); + } // attempt to pay colorless costs (not generic) mana costs first for (ManaCost cost : this) { if (!cost.isPaid() && cost instanceof ColorlessManaCost) { @@ -318,6 +325,31 @@ public class ManaCostsImpl extends ArrayList implements M } // stop using mana of the clicked mana type pool.lockManaType(); + if (!wasUnlockedManaType) { + handleForcedToPayOnlyForCurrentPayment(game, pool, referenceCosts); + } + } + + private void handleForcedToPayOnlyForCurrentPayment(Game game, ManaPool pool, ManaCosts referenceCosts) { + // for Word of Command + if (pool.isForcedToPay()) { + if (referenceCosts != null && this.getText().equals(referenceCosts.getText())) { + UUID playerId = pool.getPlayerId(); + Player player = game.getPlayer(playerId); + if (player != null) { + game.undo(playerId); + this.clearPaid(); + this.setX(referenceCosts.getX()); + player.getManaPool().restoreMana(pool.getPoolBookmark()); + game.bookmarkState(); + } + } + } + } + + public void forceManaRollback(Game game, ManaPool pool) { + // for Word of Command + handleForcedToPayOnlyForCurrentPayment(game, pool, this); } @Override diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalInterveningIfTriggeredAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalInterveningIfTriggeredAbility.java new file mode 100644 index 0000000000..44a96ae386 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalInterveningIfTriggeredAbility.java @@ -0,0 +1,104 @@ +package mage.abilities.decorator; + +import mage.abilities.Modes; +import mage.abilities.TriggeredAbility; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.condition.Condition; +import mage.abilities.effects.Effect; +import mage.abilities.effects.Effects; +import mage.constants.EffectType; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * Adds condition to {@link mage.abilities.effects.ContinuousEffect}. Acts as + * decorator. + * + * @author nantuko + */ +public class ConditionalInterveningIfTriggeredAbility extends TriggeredAbilityImpl { + + protected TriggeredAbility ability; + protected Condition condition; + protected String abilityText; + + /** + * Triggered ability with a condition. Set the optionality for the trigger + * ability itself. + * + * @param ability + * @param condition + * @param text explicit rule text for the ability, if null or empty, the + * rule text generated by the triggered ability itself is used. + */ + public ConditionalInterveningIfTriggeredAbility(TriggeredAbility ability, Condition condition, String text) { + super(ability.getZone(), null); + this.ability = ability; + this.modes = ability.getModes(); + this.condition = condition; + this.abilityText = text; + } + + public ConditionalInterveningIfTriggeredAbility(final ConditionalInterveningIfTriggeredAbility triggered) { + super(triggered); + this.ability = triggered.ability.copy(); + this.condition = triggered.condition; + this.abilityText = triggered.abilityText; + } + + @Override + public boolean checkInterveningIfClause(Game game) { + return condition.apply(game, this); + } + + @Override + public ConditionalInterveningIfTriggeredAbility copy() { + return new ConditionalInterveningIfTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return ability.checkEventType(event, game); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ability.setSourceId(this.getSourceId()); + ability.setControllerId(this.getControllerId()); + return ability.checkTrigger(event, game); + } + + @Override + public String getRule() { + if (abilityText == null || abilityText.isEmpty()) { + return ability.getRule(); + } + return abilityText; + } + + @Override + public Effects getEffects() { + return ability.getEffects(); + } + + @Override + public void addEffect(Effect effect) { + ability.addEffect(effect); + } + + @Override + public Modes getModes() { + return ability.getModes(); + } + + @Override + public Effects getEffects(Game game, EffectType effectType) { + return ability.getEffects(game, effectType); + } + + @Override + public boolean isOptional() { + return ability.isOptional(); + } + +} diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java index 0410a5b3a6..b77c66df9d 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java @@ -14,7 +14,7 @@ import mage.game.events.GameEvent; * Adds condition to {@link mage.abilities.effects.ContinuousEffect}. Acts as * decorator. * - * @author nantuko + * @author noahg */ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl { @@ -46,11 +46,6 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl { this.abilityText = triggered.abilityText; } - @Override - public boolean checkInterveningIfClause(Game game) { - return condition.apply(game, this); - } - @Override public ConditionalTriggeredAbility copy() { return new ConditionalTriggeredAbility(this); @@ -65,7 +60,7 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { ability.setSourceId(this.getSourceId()); ability.setControllerId(this.getControllerId()); - return ability.checkTrigger(event, game); + return ability.checkTrigger(event, game) && condition.apply(game, this); } @Override diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index 374c7e3db3..0fd1aee39b 100644 --- a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java @@ -543,7 +543,7 @@ public class ContinuousEffects implements Serializable { * @param game * @return */ - private List getApplicableAsThoughEffects(AsThoughEffectType type, Game game) { + public List getApplicableAsThoughEffects(AsThoughEffectType type, Game game) { List asThoughEffectsList = new ArrayList<>(); if (asThoughEffectsMap.containsKey(type)) { for (AsThoughEffect effect : asThoughEffectsMap.get(type)) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java index 8bb428ddb1..40936884ef 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java @@ -33,7 +33,7 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { private final UUID playerId; private final CardType additionalCardType; - private boolean gainsHaste; + private boolean hasHaste; private final int number; private List addedTokenPermanents; private SubType additionalSubType; @@ -62,12 +62,12 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { this(playerId, null, false); } - public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste) { - this(playerId, additionalCardType, gainsHaste, 1); + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean hasHaste) { + this(playerId, additionalCardType, hasHaste, 1); } - public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number) { - this(playerId, additionalCardType, gainsHaste, number, false, false); + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean hasHaste, int number) { + this(playerId, additionalCardType, hasHaste, number, false, false); } /** @@ -75,24 +75,24 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { * @param playerId null the token is controlled/owned by the controller of * the source ability * @param additionalCardType the token gains this card type in addition - * @param gainsHaste the token gains haste + * @param hasHaste the token gains haste * @param number number of tokens to put into play * @param tapped * @param attacking */ - public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking) { - this(playerId, additionalCardType, gainsHaste, number, tapped, attacking, null); + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean hasHaste, int number, boolean tapped, boolean attacking) { + this(playerId, additionalCardType, hasHaste, number, tapped, attacking, null); } - public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer) { - this(playerId, additionalCardType, gainsHaste, number, tapped, attacking, attackedPlayer, Integer.MIN_VALUE, Integer.MIN_VALUE, false); + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean hasHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer) { + this(playerId, additionalCardType, hasHaste, number, tapped, attacking, attackedPlayer, Integer.MIN_VALUE, Integer.MIN_VALUE, false); } - public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean gainsHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer, int power, int toughness, boolean gainsFlying) { + public CreateTokenCopyTargetEffect(UUID playerId, CardType additionalCardType, boolean hasHaste, int number, boolean tapped, boolean attacking, UUID attackedPlayer, int power, int toughness, boolean gainsFlying) { super(Outcome.PutCreatureInPlay); this.playerId = playerId; this.additionalCardType = additionalCardType; - this.gainsHaste = gainsHaste; + this.hasHaste = hasHaste; this.addedTokenPermanents = new ArrayList<>(); this.number = number; this.tapped = tapped; @@ -107,7 +107,7 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { super(effect); this.playerId = effect.playerId; this.additionalCardType = effect.additionalCardType; - this.gainsHaste = effect.gainsHaste; + this.hasHaste = effect.hasHaste; this.addedTokenPermanents = new ArrayList<>(effect.addedTokenPermanents); this.number = effect.number; this.additionalSubType = effect.additionalSubType; @@ -187,7 +187,7 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { if (additionalCardType != null && !token.getCardType().contains(additionalCardType)) { token.addCardType(additionalCardType); } - if (gainsHaste) { + if (hasHaste) { token.addAbility(HasteAbility.getInstance()); } if (gainsFlying) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java b/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java index e0882ae446..a68dc8e27f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DoIfCostPaid.java @@ -141,6 +141,7 @@ public class DoIfCostPaid extends OneShotEffect { String costText = cost.getText(); if (costText != null && !costText.toLowerCase(Locale.ENGLISH).startsWith("put") + && !costText.toLowerCase(Locale.ENGLISH).startsWith("return") && !costText.toLowerCase(Locale.ENGLISH).startsWith("exile") && !costText.toLowerCase(Locale.ENGLISH).startsWith("discard") && !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice") diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index d27e8f4320..285dd2b9fa 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -61,6 +61,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff private boolean putOnTopSelected; private boolean anyOrder; + //TODO: These constructors are a mess public LookLibraryAndPickControllerEffect(DynamicValue numberOfCards, boolean mayShuffleAfter, DynamicValue numberToPick, FilterCard pickFilter, boolean putOnTop) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/RevealHandSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealHandSourceControllerEffect.java new file mode 100644 index 0000000000..c3e5e59e88 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/RevealHandSourceControllerEffect.java @@ -0,0 +1,42 @@ + +package mage.abilities.effects.common; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author noahg + */ +public class RevealHandSourceControllerEffect extends OneShotEffect { + + public RevealHandSourceControllerEffect() { + super(Outcome.Discard); + this.staticText = "reveal your hand"; + } + + public RevealHandSourceControllerEffect(final RevealHandSourceControllerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (player != null && sourceObject != null) { + player.revealCards(sourceObject.getIdName(), player.getHand(), game); + return true; + } + return false; + } + + @Override + public RevealHandSourceControllerEffect copy() { + return new RevealHandSourceControllerEffect(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/SkipNextDrawStepControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipNextDrawStepControllerEffect.java new file mode 100644 index 0000000000..f498b90eeb --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/SkipNextDrawStepControllerEffect.java @@ -0,0 +1,74 @@ +/* + * + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + * + */ +package mage.abilities.effects.common; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.game.Game; +import mage.game.turn.TurnMod; +import mage.players.Player; + +/** + * + * @author noahg + */ +public class SkipNextDrawStepControllerEffect extends OneShotEffect { + + public SkipNextDrawStepControllerEffect() { + this("you skip your next draw step"); + } + + public SkipNextDrawStepControllerEffect(String text) { + super(Outcome.Detriment); + this.staticText = text; + } + + public SkipNextDrawStepControllerEffect(SkipNextDrawStepControllerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + game.getState().getTurnMods().add(new TurnMod(player.getId(), PhaseStep.DRAW)); + return true; + } + return false; + } + + @Override + public SkipNextDrawStepControllerEffect copy() { + return new SkipNextDrawStepControllerEffect(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorAllEffect.java new file mode 100644 index 0000000000..f5cefeefbf --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorAllEffect.java @@ -0,0 +1,154 @@ +/* + * + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + * + */ +package mage.abilities.effects.common.continuous; + +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.choices.ChoiceColor; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author LevelX + */ +public class BecomesColorAllEffect extends ContinuousEffectImpl { + + private ObjectColor setColor; + protected boolean loseOther; + protected FilterPermanent filter; + + /** + * Set the color of a spell or permanent + * + * @param duration + */ + public BecomesColorAllEffect(Duration duration) { + this(null, duration); + } + + public BecomesColorAllEffect(ObjectColor setColor, Duration duration) { + this(setColor, duration, new FilterPermanent("All permanents"), true, null); + } + + public BecomesColorAllEffect(ObjectColor setColor, Duration duration, FilterPermanent filter, boolean loseOther, String text) { + super(duration, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Neutral); + this.setColor = setColor; + this.filter = filter; + this.loseOther = loseOther; + staticText = text; + } + + public BecomesColorAllEffect(final BecomesColorAllEffect effect) { + super(effect); + this.setColor = effect.setColor; + this.filter = effect.filter; + this.loseOther = effect.loseOther; + } + + @Override + public void init(Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return; + } + if (setColor == null) { + ChoiceColor choice = new ChoiceColor(); + if (!controller.choose(Outcome.PutManaInPool, choice, game)) { + discard(); + return; + } + setColor = choice.getColor(); + if (!game.isSimulation()) { + game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); + } + } + + super.init(source, game); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + if (setColor != null) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + if (permanent != null) { + switch (layer) { + case ColorChangingEffects_5: + if (loseOther) { + permanent.getColor(game).setColor(new ObjectColor()); + } + permanent.getColor(game).addColor(setColor); + break; + } + } else if (duration == Duration.Custom) { + discard(); + } + } + return true; + } + return false; + } + + @Override + public BecomesColorAllEffect copy() { + return new BecomesColorAllEffect(this); + } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + StringBuilder sb = new StringBuilder(); + sb.append(filter.getMessage()); + sb.append(" become "); + if (setColor == null) { + sb.append("the color of your choice"); + } else { + sb.append(setColor.getDescription()); + } + if (!duration.toString().equals("")) { + sb.append(' ').append(duration.toString()); + } + return sb.toString(); + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java new file mode 100644 index 0000000000..775ca85982 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java @@ -0,0 +1,91 @@ + +package mage.abilities.effects.common.counter; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.counters.Counter; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.util.CardUtil; + +import java.util.Locale; + +/** + * + * @author noahg + */ +public class RemoveCountersAttachedEffect extends OneShotEffect { + + private Counter counter; + private DynamicValue amount; + private String textEnchanted; + + public RemoveCountersAttachedEffect(Counter counter, String textEnchanted) { + this(counter, new StaticValue(0), textEnchanted); + } + + /** + * + * @param counter + * @param amount this amount will be added to the counter instances + * @param textEnchanted text used for the enchanted permanent in rule text + */ + public RemoveCountersAttachedEffect(Counter counter, DynamicValue amount, String textEnchanted) { + super(Outcome.UnboostCreature); + this.counter = counter.copy(); + this.amount = amount; + this.textEnchanted = textEnchanted; + setText(); + } + + public RemoveCountersAttachedEffect(final RemoveCountersAttachedEffect effect) { + super(effect); + if (effect.counter != null) { + this.counter = effect.counter.copy(); + } + this.amount = effect.amount; + this.textEnchanted = effect.textEnchanted; + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && permanent.getAttachedTo() != null) { + Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); + if (attachedTo != null && counter != null) { + Counter newCounter = counter.copy(); + newCounter.add(amount.calculate(game, source, this)); + attachedTo.removeCounters(newCounter, game); + } + return true; + } + return false; + } + + private void setText() { + StringBuilder sb = new StringBuilder(); + // put a +1/+1 counter on it + sb.append("remove "); + if (counter.getCount() > 1) { + sb.append(CardUtil.numberToText(counter.getCount())).append(' '); + sb.append(counter.getName().toLowerCase(Locale.ENGLISH)).append(" counters from "); + } else { + sb.append("a "); + sb.append(counter.getName().toLowerCase(Locale.ENGLISH)).append(" counter from "); + } + sb.append(textEnchanted); + if (!amount.getMessage().isEmpty()) { + sb.append(" for each ").append(amount.getMessage()); + } + staticText = sb.toString(); + } + + @Override + public RemoveCountersAttachedEffect copy() { + return new RemoveCountersAttachedEffect(this); + } + +} diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java new file mode 100644 index 0000000000..e2d20da03b --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java @@ -0,0 +1,94 @@ +package mage.abilities.effects.keyword; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.OneShotEffect; +import mage.constants.AsThoughEffectType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.Locale; + +public class EchoEffect extends OneShotEffect { + + protected Cost cost; + protected DynamicValue amount; + + public EchoEffect(Cost costs) { + super(Outcome.Sacrifice); + this.cost = costs; + this.amount = null; + } + + public EchoEffect(DynamicValue amount) { + super(Outcome.Sacrifice); + this.amount = amount; + this.cost = null; + } + + public EchoEffect(final EchoEffect effect) { + super(effect); + this.cost = effect.cost; + this.amount = effect.amount; + } + + @Override + public boolean apply(Game game, Ability source) { + if (cost == null) { + cost = new ManaCostsImpl(Integer.toString(amount.calculate(game, source, this))); + } + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null + && source.getSourceObjectIfItStillExists(game) != null) { + if (game.getContinuousEffects().asThough(source.getSourceId(), AsThoughEffectType.PAY_0_ECHO, source, source.getControllerId(), game) != null) { + Cost altCost = new ManaCostsImpl("{0}"); + if (controller.chooseUse(Outcome.Benefit, "Pay {0} instead of the echo cost?", source, game)) { + altCost.clearPaid(); + if (altCost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ECHO_PAID, source.getSourceId(), source.getSourceId(), source.getControllerId())); + return true; + } + } + } + if (controller.chooseUse(Outcome.Benefit, "Pay " + cost.getText() + '?', source, game)) { + cost.clearPaid(); + if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ECHO_PAID, source.getSourceId(), source.getSourceId(), source.getControllerId())); + return true; + } + } + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.sacrifice(source.getSourceId(), game); + } + return true; + } + return false; + } + + @Override + public EchoEffect copy() { + return new EchoEffect(this); + } + + @Override + public String getText(Mode mode) { + StringBuilder sb = new StringBuilder("sacrifice {this} unless you "); + String costText = cost.getText(); + if (costText.toLowerCase(Locale.ENGLISH).startsWith("discard")) { + sb.append(costText.substring(0, 1).toLowerCase(Locale.ENGLISH)); + sb.append(costText.substring(1)); + } else { + sb.append("pay ").append(costText); + } + + return sb.toString(); + + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index f7622a0981..546de34cf2 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java @@ -16,6 +16,7 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.events.ManaEvent; import mage.game.permanent.Permanent; import mage.players.Player; @@ -84,7 +85,7 @@ class CumulativeUpkeepEffect extends OneShotEffect { if (player.chooseUse(Outcome.Benefit, "Pay " + totalCost.getText() + '?', source, game)) { totalCost.clearPaid(); if (totalCost.payOrRollback(source, game, source.getSourceId(), source.getControllerId())) { - game.fireEvent(new GameEvent(EventType.PAID_CUMULATIVE_UPKEEP, permanent.getId(), permanent.getId(), player.getId(), ageCounter, false)); + game.fireEvent(new ManaEvent(EventType.PAID_CUMULATIVE_UPKEEP, permanent.getId(), permanent.getId(), player.getId(), totalCost.getUsedManaToPay())); return true; } } diff --git a/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java b/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java index 58a054e63e..afdda45c0d 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java @@ -1,23 +1,18 @@ package mage.abilities.keyword; -import java.util.Locale; -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.OneShotEffect; -import mage.constants.Outcome; +import mage.abilities.effects.keyword.EchoEffect; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.players.Player; + +import java.util.UUID; /** * @@ -82,7 +77,7 @@ public class EchoAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - // reset the echo paid state back, if creature enteres the battlefield + // reset the echo paid state back, if creature enters the battlefield if (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD && event.getTargetId().equals(this.getSourceId())) { @@ -128,70 +123,3 @@ public class EchoAbility extends TriggeredAbilityImpl { } } -class EchoEffect extends OneShotEffect { - - protected Cost cost; - protected DynamicValue amount; - - public EchoEffect(Cost costs) { - super(Outcome.Sacrifice); - this.cost = costs; - this.amount = null; - } - - public EchoEffect(DynamicValue amount) { - super(Outcome.Sacrifice); - this.amount = amount; - this.cost = null; - } - - public EchoEffect(final EchoEffect effect) { - super(effect); - this.cost = effect.cost; - this.amount = effect.amount; - } - - @Override - public boolean apply(Game game, Ability source) { - if (amount != null) { - cost = new ManaCostsImpl(Integer.toString(amount.calculate(game, source, this))); - } - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null - && source.getSourceObjectIfItStillExists(game) != null) { - if (controller.chooseUse(Outcome.Benefit, "Pay " + cost.getText() + '?', source, game)) { - cost.clearPaid(); - if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ECHO_PAID, source.getSourceId(), source.getSourceId(), source.getControllerId())); - return true; - } - } - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - permanent.sacrifice(source.getSourceId(), game); - } - return true; - } - return false; - } - - @Override - public EchoEffect copy() { - return new EchoEffect(this); - } - - @Override - public String getText(Mode mode) { - StringBuilder sb = new StringBuilder("sacrifice {this} unless you "); - String costText = cost.getText(); - if (costText.toLowerCase(Locale.ENGLISH).startsWith("discard")) { - sb.append(costText.substring(0, 1).toLowerCase(Locale.ENGLISH)); - sb.append(costText.substring(1)); - } else { - sb.append("pay ").append(costText); - } - - return sb.toString(); - - } -} diff --git a/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java b/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java index 2467d1246e..ab0f8004b1 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java @@ -16,7 +16,7 @@ import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.CostsImpl; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.cards.Card; import mage.constants.Outcome; @@ -42,7 +42,7 @@ public class EvokeAbility extends StaticAbility implements AlternativeSourceCost super(Zone.ALL, null); name = EVOKE_KEYWORD; this.addEvokeCost(manaString); - Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceEffect()), EvokedCondition.instance, "Sacrifice {this} when it enters the battlefield and was evoked."); + Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceEffect()), EvokedCondition.instance, "Sacrifice {this} when it enters the battlefield and was evoked."); ability.setRuleVisible(false); addSubAbility(ability); diff --git a/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java b/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java index 713b0d11fc..5a270a4d9e 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RepairAbility.java @@ -11,7 +11,7 @@ import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.condition.common.SourceHasCounterCondition; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.common.counter.AddCountersSourceEffect; @@ -36,7 +36,7 @@ public class RepairAbility extends DiesTriggeredAbility { public RepairAbility(int count) { super(new AddCountersSourceEffect(CounterType.REPAIR.createInstance(), new StaticValue(count), false, true)); - addSubAbility(new RepairBeginningOfUpkeepTriggeredAbility()); + addSubAbility(new RepairBeginningOfUpkeepInterveningIfTriggeredAbility()); addSubAbility(new RepairCastFromGraveyardTriggeredAbility()); ruleText = "Repair " + count + " (When this creature dies, put " + count @@ -127,9 +127,9 @@ class RepairCastFromGraveyardTriggeredAbility extends TriggeredAbilityImpl { } } -class RepairBeginningOfUpkeepTriggeredAbility extends ConditionalTriggeredAbility { +class RepairBeginningOfUpkeepInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility { - public RepairBeginningOfUpkeepTriggeredAbility() { + public RepairBeginningOfUpkeepInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new RemoveCounterSourceEffect(CounterType.REPAIR.createInstance()), TargetController.YOU, false), new SourceHasCounterCondition(CounterType.REPAIR), "At the beginning of your upkeep, remove a repair counter from {this}"); @@ -137,12 +137,12 @@ class RepairBeginningOfUpkeepTriggeredAbility extends ConditionalTriggeredAbilit } - public RepairBeginningOfUpkeepTriggeredAbility(final RepairBeginningOfUpkeepTriggeredAbility effect) { + public RepairBeginningOfUpkeepInterveningIfTriggeredAbility(final RepairBeginningOfUpkeepInterveningIfTriggeredAbility effect) { super(effect); } @Override - public RepairBeginningOfUpkeepTriggeredAbility copy() { - return new RepairBeginningOfUpkeepTriggeredAbility(this); + public RepairBeginningOfUpkeepInterveningIfTriggeredAbility copy() { + return new RepairBeginningOfUpkeepInterveningIfTriggeredAbility(this); } } diff --git a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java index 159e761634..7c4d3afdc4 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java @@ -14,7 +14,7 @@ import mage.abilities.condition.common.SuspendedCondition; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.VariableManaCost; -import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.OneShotEffect; @@ -154,7 +154,7 @@ public class SuspendAbility extends SpecialAction { if (card.getManaCost().isEmpty()) { setRuleAtTheTop(true); } - addSubAbility(new SuspendBeginningOfUpkeepTriggeredAbility()); + addSubAbility(new SuspendBeginningOfUpkeepInterveningIfTriggeredAbility()); addSubAbility(new SuspendPlayCardAbility()); } ruleText = sb.toString(); @@ -174,7 +174,7 @@ public class SuspendAbility extends SpecialAction { ability.setControllerId(card.getOwnerId()); game.getState().addOtherAbility(card, ability); - SuspendBeginningOfUpkeepTriggeredAbility ability1 = new SuspendBeginningOfUpkeepTriggeredAbility(); + SuspendBeginningOfUpkeepInterveningIfTriggeredAbility ability1 = new SuspendBeginningOfUpkeepInterveningIfTriggeredAbility(); ability1.setSourceId(card.getId()); ability1.setControllerId(card.getOwnerId()); game.getState().addOtherAbility(card, ability1); @@ -343,7 +343,7 @@ class SuspendPlayCardEffect extends OneShotEffect { } if (!abilitiesToRemove.isEmpty()) { for (Ability ability : card.getAbilities()) { - if (ability instanceof SuspendBeginningOfUpkeepTriggeredAbility || ability instanceof SuspendPlayCardAbility) { + if (ability instanceof SuspendBeginningOfUpkeepInterveningIfTriggeredAbility || ability instanceof SuspendPlayCardAbility) { abilitiesToRemove.add(ability); } } @@ -405,9 +405,9 @@ class GainHasteEffect extends ContinuousEffectImpl { } -class SuspendBeginningOfUpkeepTriggeredAbility extends ConditionalTriggeredAbility { +class SuspendBeginningOfUpkeepInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility { - public SuspendBeginningOfUpkeepTriggeredAbility() { + public SuspendBeginningOfUpkeepInterveningIfTriggeredAbility() { super(new BeginningOfUpkeepTriggeredAbility(Zone.EXILED, new RemoveCounterSourceEffect(CounterType.TIME.createInstance()), TargetController.YOU, false), SuspendedCondition.instance, "At the beginning of your upkeep, if this card ({this}) is suspended, remove a time counter from it."); @@ -415,12 +415,12 @@ class SuspendBeginningOfUpkeepTriggeredAbility extends ConditionalTriggeredAbili } - public SuspendBeginningOfUpkeepTriggeredAbility(final SuspendBeginningOfUpkeepTriggeredAbility effect) { + public SuspendBeginningOfUpkeepInterveningIfTriggeredAbility(final SuspendBeginningOfUpkeepInterveningIfTriggeredAbility effect) { super(effect); } @Override - public SuspendBeginningOfUpkeepTriggeredAbility copy() { - return new SuspendBeginningOfUpkeepTriggeredAbility(this); + public SuspendBeginningOfUpkeepInterveningIfTriggeredAbility copy() { + return new SuspendBeginningOfUpkeepInterveningIfTriggeredAbility(this); } } diff --git a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java new file mode 100644 index 0000000000..ebd11af1fb --- /dev/null +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -0,0 +1,136 @@ +package mage.abilities.meta; + +import mage.MageObject; +import mage.abilities.TriggeredAbility; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.watchers.Watcher; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * A triggered ability that combines several others and triggers whenever one or more of them would. The abilities + * passed in should have null as their effect, and should have their own targets set if necessary. All other information + * will be passed in from changes to this Ability. Note: this does NOT work with abilities that have intervening if clauses. + * @author noahg + */ +public class OrTriggeredAbility extends TriggeredAbilityImpl { + + private final String ruleTrigger; + private TriggeredAbility[] triggeredAbilities; + private List triggeringAbilities; + + public OrTriggeredAbility(Zone zone, Effect effect, TriggeredAbility... abilities) { + this(zone, effect, false, null, abilities); + } + + public OrTriggeredAbility(Zone zone, Effect effect, boolean optional, String ruleTrigger, TriggeredAbility... abilities) { + super(zone, effect, optional); + this.triggeredAbilities = abilities; + this.ruleTrigger = ruleTrigger; + this.triggeringAbilities = new ArrayList<>(); + for (TriggeredAbility ability : triggeredAbilities) { + //Remove useless data + ability.getEffects().clear(); + } + } + + public OrTriggeredAbility(OrTriggeredAbility ability) { + super(ability); + this.triggeredAbilities = new TriggeredAbility[ability.triggeredAbilities.length]; + for (int i = 0; i < this.triggeredAbilities.length; i++){ + this.triggeredAbilities[i] = ability.triggeredAbilities[i].copy(); + } + this.triggeringAbilities = new ArrayList<>(ability.triggeringAbilities); + this.ruleTrigger = ability.ruleTrigger; + } + + + @Override + public boolean checkEventType(GameEvent event, Game game) { + for (TriggeredAbility ability : triggeredAbilities) { + if (ability.checkEventType(event, game)){ + System.out.println("Correct event type (" + event.getType() + ")"); + return true; + } + } + return false; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + boolean toRet = false; + for (int i = 0; i < triggeredAbilities.length; i++) { + TriggeredAbility ability = triggeredAbilities[i]; + if (ability.checkEventType(event, game) && ability.checkTrigger(event, game)) { + System.out.println("Triggered from " + ability.getRule()); + triggeringAbilities.add(i); + toRet = true; + } + System.out.println("Checked " + ability.getRule()); + } + return toRet; + } + + @Override + public OrTriggeredAbility copy() { + return new OrTriggeredAbility(this); + } + + @Override + public String getRule() { + if (ruleTrigger != null && !ruleTrigger.isEmpty()) { + return ruleTrigger + super.getRule(); + } + StringBuilder sb = new StringBuilder(); + if (triggeredAbilities[0].getRule().length() > 0) { + sb.append(triggeredAbilities[0].getRule().substring(0, 1).toUpperCase()) + .append(triggeredAbilities[0].getRule().substring(1).toLowerCase()); + } + + for (int i = 1; i < (triggeredAbilities.length - 1); i++) { + sb.append(triggeredAbilities[i].getRule().toLowerCase()); + } + + sb.append(" or ").append(triggeredAbilities[triggeredAbilities.length - 1].getRule().toLowerCase()); + return sb.toString() + super.getRule(); + } + + + @Override + public void setControllerId(UUID controllerId) { + super.setControllerId(controllerId); + for (TriggeredAbility ability : triggeredAbilities) { + ability.setControllerId(controllerId); + } + } + + @Override + public void setSourceId(UUID sourceId) { + super.setSourceId(sourceId); + for (TriggeredAbility ability : triggeredAbilities) { + ability.setSourceId(sourceId); + } + } + + @Override + public void addWatcher(Watcher watcher) { + super.addWatcher(watcher); + for (TriggeredAbility ability : triggeredAbilities) { + ability.addWatcher(watcher); + } + } + + @Override + public void setSourceObject(MageObject sourceObject, Game game) { + super.setSourceObject(sourceObject, game); + for (TriggeredAbility ability : triggeredAbilities) { + ability.setSourceObject(sourceObject, game); + } + } +} diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index d9283e95d7..c682915fd5 100644 --- a/Mage/src/main/java/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -59,7 +59,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { protected UUID ownerId; protected String cardNumber; - public String expansionSetCode; + protected String expansionSetCode; protected String tokenSetCode; protected String tokenDescriptor; protected Rarity rarity; diff --git a/Mage/src/main/java/mage/constants/AsThoughEffectType.java b/Mage/src/main/java/mage/constants/AsThoughEffectType.java index 7afa2c6000..f2357a77e1 100644 --- a/Mage/src/main/java/mage/constants/AsThoughEffectType.java +++ b/Mage/src/main/java/mage/constants/AsThoughEffectType.java @@ -18,6 +18,7 @@ public enum AsThoughEffectType { BLOCK_SWAMPWALK, BLOCK_MOUNTAINWALK, BLOCK_FORESTWALK, + DAMAGE_NOT_BLOCKED, BE_BLOCKED, PLAY_FROM_NOT_OWN_HAND_ZONE, CAST_AS_INSTANT, @@ -25,7 +26,7 @@ public enum AsThoughEffectType { DAMAGE, SHROUD, HEXPROOF, - PAY, + PAY_0_ECHO, LOOK_AT_FACE_DOWN, SPEND_OTHER_MANA, SPEND_ONLY_MANA, diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index d671afc263..7b3dc6ae5f 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -80,6 +80,7 @@ public enum CounterType { MUSTER("muster"), NET("net"), OMEN("omen"), + ORE("ore"), P0P1(new BoostCounter(0, 1).name), P1P0(new BoostCounter(1, 0).name), P1P1(new BoostCounter(1, 1).name), diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java index b592d15f69..08a9cd27e9 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java @@ -28,13 +28,8 @@ public class AbilityPredicate implements Predicate { } else { abilities = input.getAbilities(); } - - for (Ability ability : abilities) { - if (abilityClass.equals(ability.getClass())) { - return true; - } - } - return false; + return abilities.stream().anyMatch(ability -> ability.getClass().equals(abilityClass)); + } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java index 08a8f2ba74..7759d5d3b2 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/VariableManaCostPredicate.java @@ -16,12 +16,8 @@ public class VariableManaCostPredicate implements Predicate { @Override public boolean apply(MageObject input, Game game) { - for (ManaCost manaCost : input.getManaCost()) { - if (manaCost instanceof VariableManaCost) { - return true; - } - } - return false; + return input.getManaCost().stream().anyMatch(manaCost -> manaCost instanceof VariableManaCost); + } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java b/Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java index 8cf872e132..15c2a46491 100644 --- a/Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/other/OwnerIdPredicate.java @@ -19,8 +19,8 @@ public class OwnerIdPredicate implements Predicate { } @Override - public boolean apply(Card input, Game game) { - return ownerId.equals(input.getOwnerId()); + public boolean apply(Card card, Game game) { + return card.isOwnedBy(ownerId); } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java b/Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java index 2c82ab3387..dcb75de105 100644 --- a/Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/other/PlayerCanGainLifePredicate.java @@ -18,11 +18,14 @@ public class PlayerCanGainLifePredicate implements ObjectSourcePlayerPredicate input, Game game) { Player player = input.getObject(); - return player.isCanGainLife(); + if(player != null) { + return player.isCanGainLife(); + } + return false; } @Override public String toString() { - return "Player can gain live"; + return "Player can gain life"; } } diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java index 1d6cda1466..71065e54e3 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/CounterAnyPredicate.java @@ -17,12 +17,8 @@ public class CounterAnyPredicate implements Predicate { @Override public boolean apply(Permanent input, Game game) { - for (Counter counter: input.getCounters(game).values()) { - if (counter.getCount()> 0) { - return true; - } - } - return false; + return input.getCounters(game).values().stream().anyMatch(counter -> counter.getCount() > 0); + } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java index f6b218c4eb..c548735dc5 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/EnchantedPredicate.java @@ -1,7 +1,10 @@ package mage.filter.predicate.permanent; +import java.util.Objects; import java.util.UUID; + +import mage.MageObject; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -14,13 +17,11 @@ public class EnchantedPredicate implements Predicate { @Override public boolean apply(Permanent input, Game game) { - for (UUID attachmentId : input.getAttachments()) { - Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.isEnchantment()) { - return true; - } - } - return false; + return input.getAttachments() + .stream() + .map(game::getPermanent) + .filter(Objects::nonNull) + .anyMatch(MageObject::isEnchantment); } @Override diff --git a/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java b/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java index 87ca0911f6..cb0b266d9e 100644 --- a/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/permanent/EquippedPredicate.java @@ -5,27 +5,26 @@ */ package mage.filter.predicate.permanent; -import java.util.UUID; import mage.constants.SubType; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.Objects; + /** - * * @author LevelX2 */ public class EquippedPredicate implements Predicate { @Override public boolean apply(Permanent input, Game game) { - for (UUID attachmentId : input.getAttachments()) { - Permanent attachment = game.getPermanent(attachmentId); - if (attachment != null && attachment.hasSubtype(SubType.EQUIPMENT, game)) { - return true; - } - } - return false; + return input.getAttachments() + .stream() + .map(game::getPermanent) + .filter(Objects::nonNull) + .anyMatch(attachment -> attachment.hasSubtype(SubType.EQUIPMENT, game)); + } @Override diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index e499bf960b..8ab4089a44 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -398,6 +398,8 @@ public interface Game extends MageItem, Serializable { void playPriority(UUID activePlayerId, boolean resuming); + void resetControlAfterSpellResolve(UUID topId); + boolean endTurn(Ability source); int doAction(MageAction action); diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 654ebf91af..af68a3a876 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1396,6 +1396,7 @@ public abstract class GameImpl implements Game, Serializable { try { top = state.getStack().peek(); top.resolve(this); + resetControlAfterSpellResolve(top.getId()); } finally { if (top != null) { state.getStack().remove(top, this); // seems partly redundant because move card from stack to grave is already done and the stack removed @@ -1409,6 +1410,37 @@ public abstract class GameImpl implements Game, Serializable { } } } + + @Override + public void resetControlAfterSpellResolve(UUID topId) { + // for Word of Command + Spell spell = getSpellOrLKIStack(topId); + if (spell != null) { + if (spell.getCommandedBy() != null) { + UUID commandedBy = spell.getCommandedBy(); + UUID spellControllerId = null; + if (commandedBy.equals(spell.getControllerId())) { + spellControllerId = spell.getSpellAbility().getFirstTarget(); // i.e. resolved spell is Word of Command + } else { + spellControllerId = spell.getControllerId(); // i.e. resolved spell is the target opponent's spell + } + if (commandedBy != null && spellControllerId != null) { + Player turnController = getPlayer(commandedBy); + if (turnController != null) { + Player targetPlayer = getPlayer(spellControllerId); + if (targetPlayer != null) { + targetPlayer.setGameUnderYourControl(true, false); + informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName()); + if (targetPlayer.getTurnControlledBy().equals(turnController.getId())) { + turnController.getPlayersUnderYourControl().remove(targetPlayer.getId()); + } + } + } + } + spell.setCommandedBy(null); + } + } + } /** * This checks if the stack gets filled iterated, without ever getting empty diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index b9620a42cb..5b56d49347 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -1,8 +1,6 @@ package mage.game.combat; -import java.io.Serializable; -import java.util.*; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.RequirementEffect; @@ -33,6 +31,9 @@ import mage.util.Copyable; import mage.util.trace.TraceUtil; import org.apache.log4j.Logger; +import java.io.Serializable; +import java.util.*; + /** * @author BetaSteward_at_googlemail.com */ @@ -47,7 +48,7 @@ public class Combat implements Serializable, Copyable { protected List groups = new ArrayList<>(); protected Map blockingGroups = new HashMap<>(); - // player and plainswalker ids + // player and planeswalker ids protected Set defenders = new HashSet<>(); // how many creatures attack defending player protected Map> numberCreaturesDefenderAttackedBy = new HashMap<>(); @@ -310,31 +311,28 @@ public class Combat implements Serializable, Copyable { for (UUID targetId : target.getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - if (permanent != null) { - for (UUID bandedId : attacker.getBandedCards()) { - permanent.addBandedCard(bandedId); - Permanent banded = game.getPermanent(bandedId); - if (banded != null) { - banded.addBandedCard(targetId); - } - } - permanent.addBandedCard(creatureId); - attacker.addBandedCard(targetId); - if (!permanent.getAbilities().containsKey(BandingAbility.getInstance().getId())) { - filter.add(new AbilityPredicate(BandingAbility.class)); + for (UUID bandedId : attacker.getBandedCards()) { + permanent.addBandedCard(bandedId); + Permanent banded = game.getPermanent(bandedId); + if (banded != null) { + banded.addBandedCard(targetId); } } + permanent.addBandedCard(creatureId); + attacker.addBandedCard(targetId); + if (!permanent.getAbilities().containsKey(BandingAbility.getInstance().getId())) { + filter.add(new AbilityPredicate(BandingAbility.class)); + } } + } } } if (isBanded) { StringBuilder sb = new StringBuilder(player.getLogName()).append(" formed a band with ").append((attacker.getBandedCards().size() + 1) + " creatures: "); sb.append(attacker.getLogName()); - int i = 0; for (UUID id : attacker.getBandedCards()) { - i++; sb.append(", "); Permanent permanent = game.getPermanent(id); if (permanent != null) { @@ -415,7 +413,6 @@ public class Combat implements Serializable, Copyable { } /** - * * @param player * @param game * @return true if the attack with that set of creatures and attacked @@ -486,7 +483,7 @@ public class Combat implements Serializable, Copyable { * Handle the blocker selection process * * @param blockController player that controlls how to block, if null the - * defender is the controller + * defender is the controller * @param game */ public void selectBlockers(Player blockController, Game game) { @@ -532,7 +529,6 @@ public class Combat implements Serializable, Copyable { /** * Add info about attacker blocked by blocker to the game log - * */ private void logBlockerInfo(Player defender, Game game) { boolean shownDefendingPlayer = game.getPlayers().size() < 3; // only two players no ned to sow the attacked player @@ -1191,9 +1187,7 @@ public class Combat implements Serializable, Copyable { } break; case MULTIPLE: - for (UUID opponentId : game.getOpponents(attackingPlayerId)) { - attackablePlayers.add(opponentId); - } + attackablePlayers.addAll(game.getOpponents(attackingPlayerId)); break; } } @@ -1281,10 +1275,10 @@ public class Combat implements Serializable, Copyable { if (defenderAttackedBy.size() >= defendingPlayer.getMaxAttackedBy()) { Player attackingPlayer = game.getPlayer(game.getControllerId(attackerId)); if (attackingPlayer != null && !game.isSimulation()) { - game.informPlayer(attackingPlayer, new StringBuilder("No more than ") - .append(CardUtil.numberToText(defendingPlayer.getMaxAttackedBy())) - .append(" creatures can attack ") - .append(defendingPlayer.getLogName()).toString()); + game.informPlayer(attackingPlayer, "No more than " + + CardUtil.numberToText(defendingPlayer.getMaxAttackedBy()) + + " creatures can attack " + + defendingPlayer.getLogName()); } return false; } @@ -1314,7 +1308,7 @@ public class Combat implements Serializable, Copyable { * @param playerId * @param game * @param solveBanding check whether also add creatures banded with - * attackerId + * attackerId */ public void addBlockingGroup(UUID blockerId, UUID attackerId, UUID playerId, Game game, boolean solveBanding) { Permanent blocker = game.getPermanent(blockerId); @@ -1325,9 +1319,7 @@ public class Combat implements Serializable, Copyable { // add all blocked attackers for (CombatGroup group : groups) { if (group.getBlockers().contains(blockerId)) { - for (UUID attacker : group.attackers) { - newGroup.attackers.add(attacker); - } + newGroup.attackers.addAll(group.attackers); } } blockingGroups.put(blockerId, newGroup); @@ -1423,12 +1415,8 @@ public class Combat implements Serializable, Copyable { } public boolean hasFirstOrDoubleStrike(Game game) { - for (CombatGroup group : groups) { - if (group.hasFirstOrDoubleStrike(game)) { - return true; - } - } - return false; + return groups.stream() + .anyMatch(group -> group.hasFirstOrDoubleStrike(game)); } public CombatGroup findGroup(UUID attackerId) { @@ -1449,7 +1437,7 @@ public class Combat implements Serializable, Copyable { return null; } -// public int totalUnblockedDamage(Game game) { + // public int totalUnblockedDamage(Game game) { // int total = 0; // for (CombatGroup group : groups) { // if (group.getBlockers().isEmpty()) { @@ -1482,7 +1470,6 @@ public class Combat implements Serializable, Copyable { } /** - * * @param attackerId * @return uuid of defending player or planeswalker */ diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index 235b2e774c..e357b6df97 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -3,6 +3,8 @@ package mage.game.combat; import java.io.Serializable; import java.util.*; +import java.util.stream.Stream; + import mage.abilities.common.ControllerAssignCombatDamageToBlockersAbility; import mage.abilities.common.ControllerDivideCombatDamageAbility; import mage.abilities.common.DamageAsThoughNotBlockedAbility; @@ -12,6 +14,7 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.TrampleAbility; +import mage.constants.AsThoughEffectType; import mage.constants.Outcome; import mage.filter.StaticFilters; import mage.game.Game; @@ -60,19 +63,11 @@ public class CombatGroup implements Serializable, Copyable { } public boolean hasFirstOrDoubleStrike(Game game) { - for (UUID permId : attackers) { - Permanent attacker = game.getPermanent(permId); - if (attacker != null && hasFirstOrDoubleStrike(attacker)) { - return true; - } - } - for (UUID permId : blockers) { - Permanent blocker = game.getPermanent(permId); - if (blocker != null && hasFirstOrDoubleStrike(blocker)) { - return true; - } - } - return false; + return Stream.concat(attackers.stream(), blockers.stream()) + .map(id -> game.getPermanent(id)) + .filter(Objects::nonNull) + .anyMatch(this::hasFirstOrDoubleStrike); + } public UUID getDefenderId() { @@ -124,11 +119,14 @@ public class CombatGroup implements Serializable, Copyable { return; } else { Player player = game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : attacker.getControllerId()); - if (attacker.getAbilities().containsKey(DamageAsThoughNotBlockedAbility.getInstance().getId())) { // for handling creatures like Thorn Elemental - if (player.chooseUse(Outcome.Damage, "Do you wish to assign damage for " + attacker.getLogName() + " as though it weren't blocked?", null, game)) { - blocked = false; - unblockedDamage(first, game); - } + if ((attacker.getAbilities().containsKey(DamageAsThoughNotBlockedAbility.getInstance().getId()) && + player.chooseUse(Outcome.Damage, "Do you wish to assign damage for " + + attacker.getLogName() + " as though it weren't blocked?", null, game)) || + game.getContinuousEffects().asThough(attacker.getId(), AsThoughEffectType.DAMAGE_NOT_BLOCKED + , null, attacker.getControllerId(), game) != null) { + // for handling creatures like Thorn Elemental + blocked = false; + unblockedDamage(first, game); } if (blockers.size() == 1) { singleBlockerDamage(player, first, game); diff --git a/Mage/src/main/java/mage/game/permanent/token/AvatarToken2.java b/Mage/src/main/java/mage/game/permanent/token/AvatarToken2.java index fa30088d28..b63e3e14c5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/AvatarToken2.java +++ b/Mage/src/main/java/mage/game/permanent/token/AvatarToken2.java @@ -6,8 +6,9 @@ import mage.constants.CardType; import mage.constants.SubType; public final class AvatarToken2 extends TokenImpl { + public AvatarToken2() { - super("Angel", "4/4 white Avatar creature token with flying"); + super("Avatar", "4/4 white Avatar creature token with flying"); cardType.add(CardType.CREATURE); color.setWhite(true); subtype.add(SubType.AVATAR); diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken4.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken4.java new file mode 100644 index 0000000000..d6b579b451 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken4.java @@ -0,0 +1,45 @@ + +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public final class BeastToken4 extends TokenImpl { + + public BeastToken4() { + this(null, 0); + } + + public BeastToken4(String setCode) { + this(setCode, 0); + } + + public BeastToken4(String setCode, int tokenType) { + super("Beast", "2/2 green Beast creature token"); + setOriginalExpansionSetCode(setCode != null ? setCode : "EXO"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.BEAST); + power = new MageInt(2); + toughness = new MageInt(2); + + } + + public BeastToken4(final BeastToken4 token) { + super(token); + } + + @Override + public BeastToken4 copy() { + return new BeastToken4(this); + } +} diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java index 3d137719f8..281a6485dd 100644 --- a/Mage/src/main/java/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -67,6 +67,7 @@ public class Spell extends StackObjImpl implements Card { private boolean faceDown; private boolean countered; private boolean resolving = false; + private UUID commandedBy = null; // for Word of Command private boolean doneActivatingManaAbilities; // if this is true, the player is no longer allowed to pay the spell costs with activating of mana abilies @@ -121,6 +122,7 @@ public class Spell extends StackObjImpl implements Card { this.faceDown = spell.faceDown; this.countered = spell.countered; this.resolving = spell.resolving; + this.commandedBy = spell.commandedBy; this.doneActivatingManaAbilities = spell.doneActivatingManaAbilities; this.targetChanged = spell.targetChanged; @@ -179,6 +181,12 @@ public class Spell extends StackObjImpl implements Card { return false; } this.resolving = true; + if (commandedBy != null && !commandedBy.equals(getControllerId())) { + Player turnController = game.getPlayer(commandedBy); + if (turnController != null) { + turnController.controlPlayersTurn(game, controller.getId()); + } + } if (this.isInstant() || this.isSorcery()) { int index = 0; result = false; @@ -1024,4 +1032,12 @@ public class Spell extends StackObjImpl implements Card { throw new UnsupportedOperationException("Not supported."); //To change body of generated methods, choose Tools | Templates. } + public void setCommandedBy(UUID playerId) { + this.commandedBy = playerId; + } + + public UUID getCommandedBy() { + return commandedBy; + } + } diff --git a/Mage/src/main/java/mage/game/stack/SpellStack.java b/Mage/src/main/java/mage/game/stack/SpellStack.java index 71ad426f8b..40b5c96388 100644 --- a/Mage/src/main/java/mage/game/stack/SpellStack.java +++ b/Mage/src/main/java/mage/game/stack/SpellStack.java @@ -37,10 +37,11 @@ public class SpellStack extends ArrayDeque { try { top = this.peek(); top.resolve(game); + game.resetControlAfterSpellResolve(top.getId()); } finally { if (top != null) { if (contains(top)) { - logger.warn("StackObject was still on the stack after resoving" + top.getName()); + logger.warn("StackObject was still on the stack after resolving" + top.getName()); this.remove(top, game); } } @@ -89,10 +90,10 @@ public class SpellStack extends ArrayDeque { game.informPlayers(counteredObjectName + " is countered by " + sourceObject.getLogName()); } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId())); + return true; } else if (!game.isSimulation()) { game.informPlayers(counteredObjectName + " could not be countered by " + sourceObject.getLogName()); } - return true; } return false; } diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index e66b118a8b..f95b01e136 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -35,6 +35,8 @@ public class ManaPool implements Serializable { private boolean autoPayment; // auto payment from mana pool: true - mode is active private boolean autoPaymentRestricted; // auto payment from mana pool: true - if auto Payment is on, it will only pay if one kind of mana is in the pool private ManaType unlockedManaType; // type of mana that was selected to pay manually + private boolean forcedToPay; // for Word of Command + private final List poolBookmark = new ArrayList<>(); // mana pool bookmark for rollback purposes private final Set doNotEmptyManaTypes = new HashSet<>(); @@ -43,6 +45,7 @@ public class ManaPool implements Serializable { autoPayment = true; autoPaymentRestricted = true; unlockedManaType = null; + forcedToPay = false; } public ManaPool(final ManaPool pool) { @@ -53,6 +56,10 @@ public class ManaPool implements Serializable { this.autoPayment = pool.autoPayment; this.autoPaymentRestricted = pool.autoPaymentRestricted; this.unlockedManaType = pool.unlockedManaType; + this.forcedToPay = pool.forcedToPay; + for (ManaPoolItem item : pool.poolBookmark) { + poolBookmark.add(item.copy()); + } this.doNotEmptyManaTypes.addAll(pool.doNotEmptyManaTypes); } @@ -87,12 +94,12 @@ public class ManaPool implements Serializable { * @return */ public boolean pay(ManaType manaType, Ability ability, Filter filter, Game game, Cost costToPay, Mana usedManaToPay) { - if (!autoPayment && manaType != unlockedManaType) { + if (!isAutoPayment() && manaType != unlockedManaType) { // if manual payment and the needed mana type was not unlocked, nothing will be paid return false; } ManaType possibleAsThoughtPoolManaType = null; - if (autoPayment && autoPaymentRestricted && !wasManaAddedBeyondStock() && manaType != unlockedManaType) { + if (isAutoPayment() && isAutoPaymentRestricted() && !wasManaAddedBeyondStock() && manaType != unlockedManaType) { // if automatic restricted payment and there is already mana in the pool // and the needed mana type was not unlocked, nothing will be paid if (unlockedManaType != null) { @@ -111,6 +118,7 @@ public class ManaPool implements Serializable { lockManaType(); // pay only one mana if mana payment is set to manually return true; } + for (ManaPoolItem mana : manaItems) { if (filter != null) { if (!filter.match(mana.getSourceObject(), game)) { @@ -120,7 +128,7 @@ public class ManaPool implements Serializable { } } } - if (possibleAsThoughtPoolManaType == null && manaType != unlockedManaType && autoPayment && autoPaymentRestricted && mana.count() == mana.getStock()) { + if (possibleAsThoughtPoolManaType == null && manaType != unlockedManaType && isAutoPayment() && isAutoPaymentRestricted() && mana.count() == mana.getStock()) { // no mana added beyond the stock so don't auto pay this continue; } @@ -436,19 +444,19 @@ public class ManaPool implements Serializable { } public boolean isAutoPayment() { - return autoPayment; + return autoPayment || forcedToPay; } public void setAutoPayment(boolean autoPayment) { this.autoPayment = autoPayment; } - public void setAutoPaymentRestricted(boolean autoPaymentRestricted) { - this.autoPaymentRestricted = autoPaymentRestricted; + public boolean isAutoPaymentRestricted() { + return autoPaymentRestricted || forcedToPay; } - public boolean isAutoPaymentRestricted() { - return autoPaymentRestricted; + public void setAutoPaymentRestricted(boolean autoPaymentRestricted) { + this.autoPaymentRestricted = autoPaymentRestricted; } public ManaType getUnlockedManaType() { @@ -490,4 +498,39 @@ public class ManaPool implements Serializable { return itemsCopy; } + public void setForcedToPay(boolean forcedToPay) { + this.forcedToPay = forcedToPay; + } + + public boolean isForcedToPay() { + return forcedToPay; + } + + public UUID getPlayerId() { + return playerId; + } + + public void storeMana() { + poolBookmark.clear(); + poolBookmark.addAll(getManaItems()); + } + + public List getPoolBookmark() { + List itemsCopy = new ArrayList<>(); + for (ManaPoolItem manaItem : poolBookmark) { + itemsCopy.add(manaItem.copy()); + } + return itemsCopy; + } + + public void restoreMana(List manaList) { + manaItems.clear(); + if (!manaList.isEmpty()) { + List itemsCopy = new ArrayList<>(); + for (ManaPoolItem manaItem : manaList) { + itemsCopy.add(manaItem.copy()); + } + manaItems.addAll(itemsCopy); + } + } } diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index 7745a768e0..415dfec7c1 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -278,6 +278,8 @@ public interface Player extends MageItem, Copyable { */ void setTurnControlledBy(UUID playerId); + List getTurnControllers(); + UUID getTurnControlledBy(); /** @@ -305,6 +307,8 @@ public interface Player extends MageItem, Copyable { */ void setGameUnderYourControl(boolean value); + void setGameUnderYourControl(boolean value, boolean fullRestore); + boolean isTestMode(); void setTestMode(boolean value); @@ -856,6 +860,8 @@ public interface Player extends MageItem, Copyable { Set getUsersAllowedToSeeHandCards(); + void setPayManaMode(boolean payManaMode); + boolean isInPayManaMode(); void setMatchPlayer(MatchPlayer matchPlayer); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 423ae4e208..e7d32f56b3 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -155,6 +155,7 @@ public abstract class PlayerImpl implements Player, Serializable { protected boolean isGameUnderControl = true; protected UUID turnController; + protected List turnControllers = new ArrayList<>(); protected Set playersUnderYourControl = new HashSet<>(); protected Set usersAllowedToSeeHandCards = new HashSet<>(); @@ -262,6 +263,8 @@ public abstract class PlayerImpl implements Player, Serializable { this.isGameUnderControl = player.isGameUnderControl; this.turnController = player.turnController; + this.turnControllers.clear(); + this.turnControllers.addAll(player.turnControllers); this.passed = player.passed; this.passedTurn = player.passedTurn; @@ -342,6 +345,8 @@ public abstract class PlayerImpl implements Player, Serializable { this.isGameUnderControl = player.isGameUnderControl(); this.turnController = player.getTurnControlledBy(); + this.turnControllers.clear(); + this.turnControllers.addAll(player.getTurnControllers()); this.reachedNextTurnAfterLeaving = player.hasReachedNextTurnAfterLeaving(); this.castSourceIdWithAlternateMana = player.getCastSourceIdWithAlternateMana(); this.castSourceIdManaCosts = player.getCastSourceIdManaCosts(); @@ -397,6 +402,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.turns = 0; this.isGameUnderControl = true; this.turnController = this.getId(); + this.turnControllers.clear(); this.playersUnderYourControl.clear(); this.passed = false; @@ -523,13 +529,13 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public void controlPlayersTurn(Game game, UUID playerId) { + Player player = game.getPlayer(playerId); + player.setTurnControlledBy(this.getId()); + game.informPlayers(getLogName() + " controls the turn of " + player.getLogName()); if (!playerId.equals(this.getId())) { this.playersUnderYourControl.add(playerId); - Player player = game.getPlayer(playerId); if (!player.hasLeft() && !player.hasLost()) { player.setGameUnderYourControl(false); - player.setTurnControlledBy(this.getId()); - game.informPlayers(getLogName() + " controls the turn of " + player.getLogName()); } DelayedTriggeredAbility ability = new AtTheEndOfTurnStepPostDelayedTriggeredAbility(new LoseControlOnOtherPlayersControllerEffect(this.getLogName(), player.getLogName())); ability.setSourceId(getId()); @@ -541,6 +547,12 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public void setTurnControlledBy(UUID playerId) { this.turnController = playerId; + this.turnControllers.add(playerId); + } + + @Override + public List getTurnControllers() { + return this.turnControllers; } @Override @@ -566,9 +578,27 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public void setGameUnderYourControl(boolean value) { + setGameUnderYourControl(value, true); + } + + @Override + public void setGameUnderYourControl(boolean value, boolean fullRestore) { this.isGameUnderControl = value; if (isGameUnderControl) { - this.turnController = getId(); + if (fullRestore) { + this.turnControllers.clear(); + this.turnController = getId(); + } else { + if (turnControllers.size() > 0) { + this.turnControllers.remove(turnControllers.size() - 1); + } + if (turnControllers.isEmpty()) { + this.turnController = getId(); + } else { + this.turnController = turnControllers.get(turnControllers.size() - 1); + isGameUnderControl = false; + } + } } } @@ -983,6 +1013,11 @@ public abstract class PlayerImpl implements Player, Serializable { return castSourceIdManaCosts; } + @Override + public void setPayManaMode(boolean payManaMode) { + this.payManaMode = payManaMode; + } + @Override public boolean isInPayManaMode() { return payManaMode; @@ -1853,7 +1888,7 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public int gainLife(int amount, Game game, UUID sourceId) { - if (!canGainLife || amount == 0) { + if (!canGainLife || amount <= 0) { return 0; } GameEvent event = new GameEvent(GameEvent.EventType.GAIN_LIFE, playerId, playerId, playerId, amount, false); diff --git a/Mage/src/main/java/mage/util/CardUtil.java b/Mage/src/main/java/mage/util/CardUtil.java index d2addea1b1..ac9a02f558 100644 --- a/Mage/src/main/java/mage/util/CardUtil.java +++ b/Mage/src/main/java/mage/util/CardUtil.java @@ -2,6 +2,8 @@ package mage.util; import java.util.UUID; +import java.util.stream.Stream; + import mage.MageObject; import mage.Mana; import mage.abilities.Ability; @@ -354,13 +356,8 @@ public final class CardUtil { } public static boolean checkNumeric(String s) { + return s.chars().allMatch(Character::isDigit); - for (int i = 0; i < s.length(); i++) { - if (!Character.isDigit(s.charAt(i))) { - return false; - } - } - return true; } /** @@ -442,9 +439,9 @@ public final class CardUtil { public static String getObjectZoneString(String text, MageObject mageObject, Game game) { int zoneChangeCounter = 0; if (mageObject instanceof Permanent) { - zoneChangeCounter = ((Permanent) mageObject).getZoneChangeCounter(game); + zoneChangeCounter = mageObject.getZoneChangeCounter(game); } else if (mageObject instanceof Card) { - zoneChangeCounter = ((Card) mageObject).getZoneChangeCounter(game); + zoneChangeCounter = mageObject.getZoneChangeCounter(game); } return getObjectZoneString(text, mageObject.getId(), game, zoneChangeCounter, false); } diff --git a/Mage/src/main/java/mage/watchers/common/AttackedLastTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/AttackedLastTurnWatcher.java index 78eb6c6718..b8ca0dd44a 100644 --- a/Mage/src/main/java/mage/watchers/common/AttackedLastTurnWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/AttackedLastTurnWatcher.java @@ -30,13 +30,11 @@ public class AttackedLastTurnWatcher extends Watcher { public AttackedLastTurnWatcher(final AttackedLastTurnWatcher watcher) { super(watcher); for (Entry> entry : watcher.attackedLastTurnCreatures.entrySet()) { - Set allAttackersCopy = new HashSet<>(); - allAttackersCopy.addAll(entry.getValue()); + Set allAttackersCopy = new HashSet<>(entry.getValue()); attackedLastTurnCreatures.put(entry.getKey(), allAttackersCopy); } for (Entry> entry : watcher.attackedThisTurnCreatures.entrySet()) { - Set allAttackersCopy = new HashSet<>(); - allAttackersCopy.addAll(entry.getValue()); + Set allAttackersCopy = new HashSet<>(entry.getValue()); attackedThisTurnCreatures.put(entry.getKey(), allAttackersCopy); } } diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 0534ba4950..0a3e671683 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -26,6 +26,7 @@ Commander 2015 Edition|Commander2015| Commander 2016 Edition|Commander2016| Commander 2017 Edition|Commander2017| Commander Anthology|CommanderAnthology| +Commander Anthology 2018|CommanderAnthology2018| Commander's Arsenal|CommandersArsenal| Conflux|Conflux| Conspiracy: Take the Crown|ConspiracyTakeTheCrown| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index e46cfcb636..7e4d1458e2 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -29584,7 +29584,7 @@ Wailing Ghoul|Eldritch Moon|112|C|{1}{B}|Creature - Zombie|1|3|When Wailing Ghou Weirded Vampire|Eldritch Moon|113|C|{3}{B}|Creature - Vampire Horror|3|3|Madness {2}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| Whispers of Emrakul|Eldritch Moon|114|U|{1}{B}|Sorcery|||Target opponent discards a card at random.$Delirium — If there are four or more card types among cards in your graveyard, that player discards two cards at random instead.| Abandon Reason|Eldritch Moon|115|U|{2}{R}|Instant|||Up to two target creatures each get +1/+0 and gain first strike until end of turn.$Madness {1}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| -Alchemist's GreetinG|Eldritch Moon|116|C|{4}{R}|Sorcery|||Alchemist's Greeting deals 4 damage to target creature.$Madness {1}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| +Alchemist's Greeting|Eldritch Moon|116|C|{4}{R}|Sorcery|||Alchemist's Greeting deals 4 damage to target creature.$Madness {1}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| Assembled Alphas|Eldritch Moon|117|R|{5}{R}|Creature - Wolf|5|5|Whenever Assembled Alphas blocks or becomes blocked by a creature, Assembled Alphas deals 3 damage to that creature and 3 damage to that creature's controller.| Bedlam Reveler|Eldritch Moon|118|R|{6}{R}{R}|Creature - Devil Horror|3|4|Bedlam Reveler costs {1} less to cast for each instant or sorcery card in your graveyard.$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$When Bedlam Reveler enters the battlefield, discard your hand, then draw three cards.| Blood Mist|Eldritch Moon|119|U|{3}{R}|Enchantment|||At the beginning of combat on your turn, target creature you control gains double strike until end of turn.| @@ -30466,7 +30466,7 @@ Skyship Plunderer|Aether Revolt|46|U|{1}{U}|Creature - Human Pirate|2|1|Flying$W Take into Custody|Aether Revolt|47|C|{U}|Instant|||Tap target creature. It doesn't untap during its controller's next untap step.| Trophy Mage|Aether Revolt|48|U|{2}{U}|Creature - Human Wizard|2|2|When Trophy Mage enters the battlefield, you may search your library for an artifact card with converted mana cost 3, reveal it, put it into your hand, then shuffle your library.| Whir of Invention|Aether Revolt|49|R|{X}{U}{U}{U}|Instant|||Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)$Search your library for an artifact card with converted mana cost X or less, put it onto the battlefield, then shuffle your library.| -Wind-King Raiders|Aether Revolt|50|U|{4}{U}{U}|Creature - Human Artificer|4|3|Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)$Flying| +Wind-Kin Raiders|Aether Revolt|50|U|{4}{U}{U}|Creature - Human Artificer|4|3|Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)$Flying| Aether Poisoner|Aether Revolt|51|C|{1}{B}|Creature - Human Artificer|1|1|Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)$When Aether Poisoner enters the battlefield, you get {E}{E} (two energy counters).$Whenever Aether Poisoner attacks, you may pay {E}{E}. If you do, create a 1/1 colorless Servo artifact creature token.| Alley Strangler|Aether Revolt|52|C|{2}{B}|Creature - Aetherborn Rogue|2|3|Menace| Battle at the Bridge|Aether Revolt|53|R|{X}{B}|Sorcery|||Improvise (Your artifacts can help cast this spell. Each artifact you tap after you're done activating mana abilities pays for {1}.)$Target creature gets -X/-X until end of turn. You gain X life.| @@ -32680,7 +32680,7 @@ Famished Paladin|Rivals of Ixalan|8|U|{1}{W}|Creature - Vampire Knight|3|3|Famis Forerunner of the Legion|Rivals of Ixalan|9|U|{2}{W}|Creature - Vampire Knight|2|2|When Forerunner of the Legion enters the battlefield, you may search your library for a Vampire card, reveal it, then shuffle your library and put that card on top of it.$Whenever another Vampire enters the battlefield under your control, target creature gets +1/+1 until end of turn.| Imperial Ceratops|Rivals of Ixalan|10|U|{4}{W}|Creature - Dinosaur|3|5|Enrage - Whenever Imperial Ceratops is dealt damage, you gain 2 life.| Legion Conquistador|Rivals of Ixalan|11|C|{2}{W}|Creature - Vampire Soldier|2|2|When Legion Conquistador enters the battlefield, you may search your library for any number of cards named Legion Conquistador, reveal them, put them into your hand, then shuffle your library.| -Luminous Bond|Rivals of Ixalan|12|C|{2}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature can't attack or block.| +Luminous Bonds|Rivals of Ixalan|12|C|{2}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature can't attack or block.| Majestic Heliopterus|Rivals of Ixalan|13|U|{3}{W}|Creature - Dinosaur|2|2|Flying$Whenever Majestic Heliopterus attacks, another target Dinosaur you control gains flying until end of turn.| Martyr of Dusk|Rivals of Ixalan|14|C|{1}{W}|Creature - Vampire Soldier|2|1|When Martyr of Dusk dies, create a 1/1 white Vampire creature token with lifelink.| Moment of Triumph|Rivals of Ixalan|15|C|{W}|Instant|||Target creature gets +2/+2 until end of turn. You gain 2 life.| @@ -32711,10 +32711,10 @@ Hornswoggle|Rivals of Ixalan|39|U|{2}{U}|Instant|||Counter target creature spell Induced Amnesia|Rivals of Ixalan|40|R|{2}{U}|Enchantment|||When Induced Amnesia enters the battlefield, target player exiles all the cards in his or her hand face down, then draws that many cards.$When Induced Amnesia is put into a graveyard from the battlefield, return the exiled cards to their owner's hand.| Kitesail Corsair|Rivals of Ixalan|41|C|{1}{U}|Creature - Human Pirate|2|1|Kitesail Corsair has flying as long as it's attacking.| Kumena's Awakening|Rivals of Ixalan|42|R|{2}{U}{U}|Enchantment|||Ascend (If you control ten or more permenants, you get the city's blessing for the rest of the game.)$At the beginning of your upkeep, each player draws a card. If you have the city's blessing, instead only you draw a card.| -Mist-Cloacked Herald|Rivals of Ixalan|43|C|{U}|Creature - Merfolk Warrior|1|1|Mist-Cloaked Herald can't be blocked.| +Mist-Cloaked Herald|Rivals of Ixalan|43|C|{U}|Creature - Merfolk Warrior|1|1|Mist-Cloaked Herald can't be blocked.| Negate|Rivals of Ixalan|44|C|{1}{U}|Instant|||Counter target noncreature spell.| Nezahal, Primal Tide|Rivals of Ixalan|45|M|{5}{U}{U}|Legendary Creature - Elder Dinosaur|7|7|Nezahal, Primal Tide can't be countered.$You have no maximum hand size.$Whenever an opponent casts a noncreature spell, draw a card.$Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step.| -Return to the Wind|Rivals of Ixalan|46|R|{2}{U}|Instant|||Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.| +Release to the Wind|Rivals of Ixalan|46|R|{2}{U}|Instant|||Exile target nonland permanent. For as long as that card remains exiled, its owner may cast it without paying its mana cost.| River Darter|Rivals of Ixalan|47|C|{2}{U}|Creature - Merfolk Warrior|2|3|River Darter can't be blocked by Dinosaurs.| Riverwise Augur|Rivals of Ixalan|48|U|{3}{U}|Creature - Merfolk Wizard|2|2|When Riverwise Augur enters the battlefield, draw three cards, then put two cards from your hand on top of your library in any order. | Sailor of Means|Rivals of Ixalan|49|C|{2}{U}|Creature - Human Pirate|1|4|When Sailor of Means enters the battlefield, create a colorless Treasure artifact token with "{t}, Sacrifice this artifact: Add one mana of any color." | @@ -32726,7 +32726,7 @@ Siren Reaver|Rivals of Ixalan|54|U|{3}{U}|Creature - Siren Pirate|3|2|Raid(If you control ten or more permanents, you get the city's blessing for the rest of the game.)$As long as you have the city's blessing Slippery Scoundrel has Hexproof and can't be blocked.| Soul of the Rapids|Rivals of Ixalan|56|C|{3}{U}{U}|Creature - Elemental|3|2|Flying$Hexproof (This creature can't be the target of spells or abilities your opponents control.)| Spire Winder|Rivals of Ixalan|57|C|{3}{U}|Creature - snake|2|3|Flying$Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Spire Winder gets +1/+1 as long as you have the city's blessing.| -Sworn Gaurdian|Rivals of Ixalan|58|C|{1}{U}|Creature - Merfolk Warrior|1|3|| +Sworn Guardian|Rivals of Ixalan|58|C|{1}{U}|Creature - Merfolk Warrior|1|3|| Timestream Navigator|Rivals of Ixalan|59|M|{1}{U}|Creature - Human Pirate Wizard|1|1|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)${2}{U}{U}, {T}, Put Timestream Navigator on the bottom of its owner's library: Take an extra turn after this one. Activate this ability only if you have the city's blessing.| Warkite Marauder|Rivals of Ixalan|60|R|{1}{U}|Creature - Human Pirate|2|1|Flying$Whenever Warkite Marauder attacks, target creature defending player controls loses all abilities and has base power and toughness 0/1 until end of turn.| Waterknot|Rivals of Ixalan|61|C|{1}{U}{U}|Enchantment - Aura|||Enchant Crerature$When Waterknot enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during it's controller's untap step.| @@ -32788,7 +32788,7 @@ Stampeding Horncrest|Rivals of Ixalan|116|C|{4}{R}|Creature - Dinosaur|4|4|Stamp Storm Fleet Swashbuckler|Rivals of Ixalan|117|U|{1}{R}|Creature - Human Pirate|2|2|Ascend (If you control 10 or more permanents, you gain the city's blessing for the rest of the game.)$Storm Fleet Swashbuckler has double strike as long as you have the city's blessing.| Sun-Collared Raptor|Rivals of Ixalan|118|C|{1}{R}|Creature - Dinosaur|1|2|Trample${2}{R}: Sun-Collared Raptor gets +3/+0 until end of turn.| Swaggering Corsair|Rivals of Ixalan|119|C|{2}{R}|Creature - Human Pirate|2|2|Raid — Swaggering Corsair enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.| -Tilonali's Crown|Rivals of Ixalan|120|C|{1}{R}|Enchantment - Aura|||Enchant creature$When Tilonali's Crown enters the battlefield, it deals 1 damage to enchanted creature.$Enchanted creature gets +3/+0 and has trample.| +Tilonalli's Crown|Rivals of Ixalan|120|C|{1}{R}|Enchantment - Aura|||Enchant creature$When Tilonali's Crown enters the battlefield, it deals 1 damage to enchanted creature.$Enchanted creature gets +3/+0 and has trample.| Tilonalli's Summoner|Rivals of Ixalan|121|R|{1}{R}|Creature - Human Shaman|1|1|Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)$Whenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing.| Aggressive Urge|Rivals of Ixalan|122|C|{1}{G}|Instant|||Target creature gets +1/+1 until end of turn.$Draw a card.| Cacophodon|Rivals of Ixalan|123|U|{3}{G}|Creature - Dinosaur|2|5|Enrage — Whenever Cacophodon is dealt damage, untap target permanent.| @@ -32810,7 +32810,7 @@ Knight of the Stampede|Rivals of Ixalan|138|C|{3}{G}|Creature - Human Knight|2|4 Naturalize|Rivals of Ixalan|139|C|{1}{G}|Instant|||Destroy target artifact or enchantment.| Orazca Frillback|Rivals of Ixalan|140|C|{2}{G}|Creature - Dinosaur|4|2|| Overgrown Armasaur|Rivals of Ixalan|141|C|{3}{G}{G}|Creature - Dinosaur|4|4|Enrage — Whenever Overgrown Armasaur is dealt damage, create a 1/1 green Saproling creature token.| -Path to Discovery|Rivals of Ixalan|142|R|{3}{G}|Enchantment|||Whenever a creature enters the battlefield under your control, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on the creature, then put the card back or put it into your graveyard.)| +Path of Discovery|Rivals of Ixalan|142|R|{3}{G}|Enchantment|||Whenever a creature enters the battlefield under your control, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on the creature, then put the card back or put it into your graveyard.)| Plummet|Rivals of Ixalan|143|C|{1}{G}|Instant|||Destroy target creature with flying.| Polyraptor|Rivals of Ixalan|144|M|{6}{G}{G}|Creature - Dinosaur|5|5|Enrage — Whenever Polyraptor is dealt damage, create a token that is a copy of Polyraptor.| Strength of the Pack|Rivals of Ixalan|145|U|{4}{G}{G}|Sorcery|||Put two +1/+1 counters on each creature you control.| diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 06444e0695..4ed1a4a131 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -36,6 +36,7 @@ Champions of Kamigawa|CHK| Chronicles|CHR| Clash Pack|CLASH| Commander Anthology|CMA| +Commander Anthology 2018|CM2| Commander's Arsenal|CM1| Conspiracy: Take the Crown|CN2| Conflux|CON| From 88c049f44a241473f540d0d9c88c2a665d35967f Mon Sep 17 00:00:00 2001 From: ninthworld Date: Mon, 16 Jul 2018 22:22:44 -0700 Subject: [PATCH 3/8] add Star Wars Expansion Set images --- .../card/dl/sources/GrabbagImageSource.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java index 2d39d4e9d3..982e8fef18 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java @@ -357,10 +357,80 @@ public enum GrabbagImageSource implements CardImageSource { singleLinks.put("SWS/Yoda, Jedi Master", "6arN1Hl.png"); singleLinks.put("SWS/Y-Wing", "aQQ5zwA.jpg"); singleLinks.put("SWS/Zam Wesell", "ToG0C1r.jpg"); + singleLinks.put("SWS/Astromech Droid", "v0TpHMh.jpg"); + singleLinks.put("SWS/Buried Ruin", "QkmIWYg.png"); + singleLinks.put("SWS/Flame Trooper", "RkY7KFJ.jpg"); + singleLinks.put("SWS/Force Statis", "FavLrcY.jpg"); + singleLinks.put("SWS/Salvage Trader", "qGwk7Bn.jpg"); + singleLinks.put("SWS/Outer Rim Gang", "kEjKQGy.png"); + singleLinks.put("SWS/Rathtar", "CYhHRqF.png"); + singleLinks.put("SWS/Riot Trooper", "PusvaQB.jpg"); + singleLinks.put("SWS/Sins of the Father", "32YHTPB.jpg"); + singleLinks.put("SWS/Upsilon-class Shuttle", "Le3F3oW.jpg"); + singleLinks.put("SWS/Finn", "TU2LI2q.jpg"); + singleLinks.put("SWS/General Hux", "UpWfcV6.png"); + singleLinks.put("SWS/Poe Dameron", "v8i21dn.png"); + singleLinks.put("SWS/Rey", "7n5ZZFA.png"); + singleLinks.put("SWS/Kylo Ren", "fFzDMTz.png"); + singleLinks.put("SWS/TIE Striker", "6b5GDUQ.jpg"); + singleLinks.put("SWS/Bludgeoning Pain", "ap5k3Wl.jpg"); + singleLinks.put("SWS/Force Protection", "GrOQLHO.jpg"); + singleLinks.put("SWS/Gerrera's Revolutionary", "FQFE1Jt.jpg"); + singleLinks.put("SWS/Thermal Detonator", "gTPLM83.jpg"); + singleLinks.put("SWS/Hammerhead Corvette", "IlhOAGv.jpg"); + singleLinks.put("SWS/U-Wing", "FmoRCmG.jpg"); + singleLinks.put("SWS/Bor Gullet", "jXafYHX.jpg"); + singleLinks.put("SWS/Imperial Hovertank", "6X1wL4d.jpg"); + singleLinks.put("SWS/Occupation", "h4mmkA5.jpg"); + singleLinks.put("SWS/Resistance", "lbNhA59.jpg"); + singleLinks.put("SWS/Jyn Erso and Cassian Andor", "o0SCGiJ.jpg"); + singleLinks.put("SWS/Chirrut Imwe", "wgtXfUF.jpg"); + singleLinks.put("SWS/Director Krennic", "52PGsH5.jpg"); + singleLinks.put("SWS/Vader's Command", "7Lql6UT.jpg"); + singleLinks.put("SWS/Delay Tactic", "ubmzD1m.jpg"); + singleLinks.put("SWS/Resistance Bomber", "Sudfkd7.jpg"); + singleLinks.put("SWS/Mouse Droid", "oO0p8QE.jpg"); + singleLinks.put("SWS/First Order Dreadnought", "80pO9Cc.jpg"); + singleLinks.put("SWS/TIE Silencer", "7yeYIjX.jpg"); + singleLinks.put("SWS/Canto Bight Enforcer", "VKPQVsn.jpg"); + singleLinks.put("SWS/Cantonica Casino", "7LiSvy6.jpg"); + singleLinks.put("SWS/Fathier", "0oKquQp.jpg"); + singleLinks.put("SWS/Code Slice", "7uNASji.jpg"); + singleLinks.put("SWS/Captain Phasma", "LWujx1B.jpg"); + singleLinks.put("SWS/Force Telepathy", "e90hswX.jpg"); + singleLinks.put("SWS/Praetorian Trooper", "pjS1wyS.jpg"); + singleLinks.put("SWS/Supreme Leader Snoke", "eewWiKE.jpg"); + singleLinks.put("SWS/Sai Tok", "FVn29tT.jpg"); + singleLinks.put("SWS/Porg Nest", "8DnNZKc.jpg"); + singleLinks.put("SWS/Inspire", "7lIXhtd.jpg"); + singleLinks.put("SWS/Force Projection", "5EfOwyn.jpg"); + singleLinks.put("SWS/Luke Skywalker, the Last Jedi", "WMmQcyD.jpg"); + singleLinks.put("SWS/Vulptex", "30WeCkw.jpg"); + singleLinks.put("SWS/Glorious Charge", "yJwvKzk.jpg"); + singleLinks.put("SWS/Plains-520b", "Fx59r9J.jpg"); + singleLinks.put("SWS/Island-520a", "jIPpWp5.jpg"); + singleLinks.put("SWS/Conscription", "An01yAe.jpg"); + singleLinks.put("SWS/Afterburn", "2ydqSvT.jpg"); + singleLinks.put("SWS/Corellian Gunship", "mZdDQWH.jpg"); + singleLinks.put("SWS/Despair", "TLTddMI.jpg"); + singleLinks.put("SWS/Dryden Vos", "6LbtUzN.jpg"); + singleLinks.put("SWS/Droid Uprising", "aWuoxho.jpg"); + singleLinks.put("SWS/Gamble", "Hwzr60O.jpg"); + singleLinks.put("SWS/Han Solo, Scrumrat", "Hqj39dG.jpg"); + singleLinks.put("SWS/Mud Trooper", "af8JaDy.jpg"); + singleLinks.put("SWS/Enfys Nest", "pstVfQg.jpg"); + singleLinks.put("SWS/Kalevan Star Yacht", "nHmSizp.jpg"); + singleLinks.put("SWS/Maelstrom Blockade", "sUYT0pc.jpg"); + singleLinks.put("SWS/Range Trooper", "kXGvTkE.jpg"); + singleLinks.put("SWS/Tobias Beckett", "hzm6ilE.jpg"); + singleLinks.put("SWS/Underground Forum", "FH2pRfU.jpg"); + singleLinks.put("SWS/Chewbacca, the Beast", "Zb5TitZ.jpg"); + // Emblems singleLinks.put("SWS/Emblem Obi-Wan Kenobi", "Qyc10aT.png"); singleLinks.put("SWS/Aurra Sing", "BLWbVJC.png"); singleLinks.put("SWS/Yoda", "zH0sYxg.png"); + singleLinks.put("SWS/Emblem Luke Skywalker", "kHELZDJ.jpg"); // Tokens singleLinks.put("SWS/Ewok", "N2MvJyr.png"); singleLinks.put("SWS/B-Wing", "oH62AUD.png"); @@ -372,6 +442,8 @@ public enum GrabbagImageSource implements CardImageSource { singleLinks.put("SWS/Royal Guard", "9tqE8vL.png"); singleLinks.put("SWS/Tusken Raider", "gPMiSmP.png"); singleLinks.put("SWS/Droid", "4PRrWFF.png"); + singleLinks.put("SWS/Trooper 2", "tcxvGOn.jpg"); + singleLinks.put("SWS/Porg", "HBjt1A3.jpg"); } @Override From d7c1b8b9c9768ddd59c908bc85dba2f4981a17ec Mon Sep 17 00:00:00 2001 From: ninthworld Date: Tue, 17 Jul 2018 13:01:19 -0700 Subject: [PATCH 4/8] fix card bugs for Star Wars set --- .../card/dl/sources/GrabbagImageSource.java | 3 +- .../plugins/card/utils/CardImageUtils.java | 1 + ...s.java => DarthTyranusCountOfSerenno.java} | 10 +++--- Mage.Sets/src/mage/cards/g/GeneralHux.java | 10 ++++-- .../src/mage/cards/h/HanSoloScrumrat.java | 31 ++++++------------- .../src/mage/cards/s/SupremeLeaderSnoke.java | 2 +- Mage.Sets/src/mage/sets/StarWars.java | 2 +- 7 files changed, 27 insertions(+), 32 deletions(-) rename Mage.Sets/src/mage/cards/d/{DarthTyranus.java => DarthTyranusCountOfSerenno.java} (93%) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java index 982e8fef18..8d3e12236c 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GrabbagImageSource.java @@ -360,7 +360,7 @@ public enum GrabbagImageSource implements CardImageSource { singleLinks.put("SWS/Astromech Droid", "v0TpHMh.jpg"); singleLinks.put("SWS/Buried Ruin", "QkmIWYg.png"); singleLinks.put("SWS/Flame Trooper", "RkY7KFJ.jpg"); - singleLinks.put("SWS/Force Statis", "FavLrcY.jpg"); + singleLinks.put("SWS/Force Stasis", "FavLrcY.jpg"); singleLinks.put("SWS/Salvage Trader", "qGwk7Bn.jpg"); singleLinks.put("SWS/Outer Rim Gang", "kEjKQGy.png"); singleLinks.put("SWS/Rathtar", "CYhHRqF.png"); @@ -431,6 +431,7 @@ public enum GrabbagImageSource implements CardImageSource { singleLinks.put("SWS/Aurra Sing", "BLWbVJC.png"); singleLinks.put("SWS/Yoda", "zH0sYxg.png"); singleLinks.put("SWS/Emblem Luke Skywalker", "kHELZDJ.jpg"); + // Tokens singleLinks.put("SWS/Ewok", "N2MvJyr.png"); singleLinks.put("SWS/B-Wing", "oH62AUD.png"); diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java index fb7c42aa09..138eeb8dc5 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java @@ -218,6 +218,7 @@ public final class CardImageUtils { if (cardName.isEmpty()) { cardName = prepareCardNameForFile(card.getName()); } + cardName = cardName.replaceAll("[\\\\/:*?\"<>|]", ""); String finalFileName = ""; if (card.getUsesVariousArt()) { diff --git a/Mage.Sets/src/mage/cards/d/DarthTyranus.java b/Mage.Sets/src/mage/cards/d/DarthTyranusCountOfSerenno.java similarity index 93% rename from Mage.Sets/src/mage/cards/d/DarthTyranus.java rename to Mage.Sets/src/mage/cards/d/DarthTyranusCountOfSerenno.java index fea86e5c63..124c90a7b0 100644 --- a/Mage.Sets/src/mage/cards/d/DarthTyranus.java +++ b/Mage.Sets/src/mage/cards/d/DarthTyranusCountOfSerenno.java @@ -31,9 +31,9 @@ import mage.target.common.TargetCreaturePermanent; * * @author Styxo */ -public final class DarthTyranus extends CardImpl { +public final class DarthTyranusCountOfSerenno extends CardImpl { - public DarthTyranus(UUID ownerId, CardSetInfo setInfo) { + public DarthTyranusCountOfSerenno(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{1}{W}{U}{B}"); this.subtype.add(SubType.DOOKU); @@ -55,13 +55,13 @@ public final class DarthTyranus extends CardImpl { this.addAbility(ability); } - public DarthTyranus(final DarthTyranus card) { + public DarthTyranusCountOfSerenno(final DarthTyranusCountOfSerenno card) { super(card); } @Override - public DarthTyranus copy() { - return new DarthTyranus(this); + public DarthTyranusCountOfSerenno copy() { + return new DarthTyranusCountOfSerenno(this); } } diff --git a/Mage.Sets/src/mage/cards/g/GeneralHux.java b/Mage.Sets/src/mage/cards/g/GeneralHux.java index ba726cf67a..653a5381f2 100644 --- a/Mage.Sets/src/mage/cards/g/GeneralHux.java +++ b/Mage.Sets/src/mage/cards/g/GeneralHux.java @@ -8,6 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.constants.*; import mage.cards.CardImpl; @@ -41,9 +42,12 @@ public final class GeneralHux extends CardImpl { this.toughness = new MageInt(3); // Whenever General Hux or another nontoken creature enters the battlefield under your control, until end of turn, target creature gains "{B}: This creature gets +1/+1 until end of turn." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}")); - Effect effect = new GainAbilityTargetEffect(ability, Duration.EndOfTurn); - effect.setText("until end of turn, target creature gains \"{B}: This creature gets +1/+1 until end of turn.\""); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostSourceEffect(1, 1, Duration.EndOfTurn) + .setText("This creature gets +1/+1 until end of turn"), + new ManaCostsImpl("{B}")); + Effect effect = new GainAbilitySourceEffect(ability, Duration.EndOfTurn); + effect.setText("until end of turn, target creature gains"); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, false)); } diff --git a/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java b/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java index eda1cb0950..9508f8e318 100644 --- a/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java +++ b/Mage.Sets/src/mage/cards/h/HanSoloScrumrat.java @@ -2,10 +2,7 @@ package mage.cards.h; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbilities; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.TriggeredAbility; +import mage.abilities.*; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.mana.ManaCostsImpl; @@ -68,10 +65,10 @@ public final class HanSoloScrumrat extends CardImpl { } } -class HanSoloScrumratTriggeredAbility extends DelayedTriggeredAbility { +class HanSoloScrumratTriggeredAbility extends TriggeredAbilityImpl { public HanSoloScrumratTriggeredAbility() { - super(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), Duration.EndOfTurn, false); + super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false); } public HanSoloScrumratTriggeredAbility(final HanSoloScrumratTriggeredAbility ability) { @@ -85,25 +82,17 @@ class HanSoloScrumratTriggeredAbility extends DelayedTriggeredAbility { @Override public boolean checkEventType(GameEvent event, Game game) { - switch(event.getType()) { - case DAMAGED_CREATURE: - case DAMAGED_PLAYER: - case DAMAGED_PLANESWALKER: - return true; - } - return false; + return event.getType() == GameEvent.EventType.DAMAGED_CREATURE + || event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER; } @Override public boolean checkTrigger(GameEvent event, Game game) { - Permanent target = game.getPermanent(this.getFirstTarget()); - if (target != null && event.getSourceId().equals(target.getId()) && MyTurnCondition.instance.apply(game, this)) { - for (Effect effect : this.getEffects()) { - effect.setValue("damage", event.getAmount()); - } - return true; - } - return false; + Permanent source = game.getPermanent(this.getSourceId()); + return source != null + && game.isActivePlayer(source.getControllerId()) + && event.getSourceId().equals(this.getSourceId()); } @Override diff --git a/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java b/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java index 2dae9ebe81..b434075e19 100644 --- a/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java +++ b/Mage.Sets/src/mage/cards/s/SupremeLeaderSnoke.java @@ -66,7 +66,7 @@ public final class SupremeLeaderSnoke extends CardImpl { ability3.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield).setText("It gains haste")); ability3.addEffect(new GainAbilityTargetEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect()), Duration.WhileOnBattlefield) .setText("Sacrifice that creature at the beginning of the next end step")); - ability3Id = ability2.getOriginalId(); + ability3Id = ability3.getOriginalId(); ability3.addTarget(new TargetCreaturePermanent()); this.addAbility(ability3); } diff --git a/Mage.Sets/src/mage/sets/StarWars.java b/Mage.Sets/src/mage/sets/StarWars.java index bab95291ae..64a7d9de17 100644 --- a/Mage.Sets/src/mage/sets/StarWars.java +++ b/Mage.Sets/src/mage/sets/StarWars.java @@ -87,7 +87,7 @@ public final class StarWars extends ExpansionSet { cards.add(new SetCardInfo("Dark Trooper", 231, Rarity.UNCOMMON, mage.cards.d.DarkTrooper.class)); cards.add(new SetCardInfo("Darth Maul", 178, Rarity.RARE, mage.cards.d.DarthMaul.class)); cards.add(new SetCardInfo("Darth Sidious, Sith Lord", 179, Rarity.MYTHIC, mage.cards.d.DarthSidiousSithLord.class)); - cards.add(new SetCardInfo("Darth Tyranus", 180, Rarity.MYTHIC, mage.cards.d.DarthTyranus.class)); + cards.add(new SetCardInfo("Darth Tyranus, Count of Serenno", 180, Rarity.MYTHIC, mage.cards.d.DarthTyranusCountOfSerenno.class)); cards.add(new SetCardInfo("Darth Vader", 140, Rarity.MYTHIC, mage.cards.d.DarthVader.class)); cards.add(new SetCardInfo("Death Trooper", 71, Rarity.UNCOMMON, mage.cards.d.DeathTrooper.class)); cards.add(new SetCardInfo("Delay Tactic", 504, Rarity.COMMON, mage.cards.d.DelayTactic.class)); From a451274db2cedf711869fc2afdbaa4000c019547 Mon Sep 17 00:00:00 2001 From: ninthworld Date: Wed, 18 Jul 2018 14:37:30 -0700 Subject: [PATCH 5/8] fix OuterRimSlaver targeting same creature twice --- Mage.Sets/src/mage/cards/o/OuterRimSlaver.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java b/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java index 6ecf75e4df..98ea2f4b72 100644 --- a/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java +++ b/Mage.Sets/src/mage/cards/o/OuterRimSlaver.java @@ -12,6 +12,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherTargetPredicate; import mage.target.common.TargetCreaturePermanent; /** @@ -30,8 +32,14 @@ public final class OuterRimSlaver extends CardImpl { // When Outer Rim Slaver enters the battlefield, you may put a bounty counter on target creature. If you do, another target creature fights that creature Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), true); ability.addEffect(new FightTargetsEffect("another target creature fights that creature")); - ability.addTarget(new TargetCreaturePermanent()); - ability.addTarget(new TargetCreaturePermanent()); + TargetCreaturePermanent target = new TargetCreaturePermanent(); + target.setTargetTag(1); + ability.addTarget(target); + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new AnotherTargetPredicate(2)); + TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter); + target2.setTargetTag(2); + ability.addTarget(target2); this.addAbility(ability); } From 7fc3d8763bfb977bebed4311e17178b707d08ad8 Mon Sep 17 00:00:00 2001 From: ninthworld Date: Fri, 20 Jul 2018 22:16:15 -0700 Subject: [PATCH 6/8] undo mage.sets pom change --- Mage.Sets/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Mage.Sets/pom.xml b/Mage.Sets/pom.xml index 25ff2d47ef..8beaf1af44 100644 --- a/Mage.Sets/pom.xml +++ b/Mage.Sets/pom.xml @@ -20,8 +20,7 @@ ${project.groupId} mage - 1.4.30 - jar + ${mage-version} log4j From 0484f4f4536017670bffd5df16fd683cc8447a35 Mon Sep 17 00:00:00 2001 From: Chris Swenson Date: Fri, 20 Jul 2018 23:54:47 -0700 Subject: [PATCH 7/8] undo CardImageUtils change --- .../main/java/org/mage/plugins/card/utils/CardImageUtils.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java index 138eeb8dc5..fb7c42aa09 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/CardImageUtils.java @@ -218,7 +218,6 @@ public final class CardImageUtils { if (cardName.isEmpty()) { cardName = prepareCardNameForFile(card.getName()); } - cardName = cardName.replaceAll("[\\\\/:*?\"<>|]", ""); String finalFileName = ""; if (card.getUsesVariousArt()) { From 5d7ef3827411696d38c8c00ead75ac11cc994b1d Mon Sep 17 00:00:00 2001 From: ninthworld Date: Mon, 23 Jul 2018 16:10:50 -0700 Subject: [PATCH 8/8] re-add Star Wars Utils/mtg-cards-data.txt after merge conflict with upstream --- Utils/mtg-cards-data.txt | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index cf70702e45..f284f50f14 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -33942,3 +33942,69 @@ Retrofitter Foundry|Commander 2018|57|R|{1}|Artifact|||{3}: Untap Retrofitter Fo Forge of Heroes|Commander 2018|58|C||Land|||{T}: Add {C}.${T}: Choose target commander that entered the battlefield this turn. Put a +1/+1 counter on it if it's a creature and a loyalty counter on it if it's a planeswalker.| Thopter Spy Network|Commander 2018|107|R|{2}{U}{U}|Enchantment|||At the beginning of your upkeep, if you control an artifact, create a 1/1 colorless Thopter artifact creature token with flying.$Whenever one or more artifact creatures you control deal combat damage to a player, draw a card.| Chaos Warp|Commander 2018|122|R|{2}{R}|Instant|||The owner of target permanent shuffles it into their library, then reveals the top card of their library. If it's a permanent card, they put it onto the battlefield.| +Bludgeoning Pain|Star Wars|300|C|{1}{B}|Instant|||Target creature gets -2/-2 until end of turn. Tap that creature.| +Bor Gullet|Star Wars|301|U|{3}{U}{B}|Creature - Horror Cephalid|4|4|When Bor Gullet enters the battlefield, target opponent reveals his or her hand. You choose a card from it. That player discards that card.| +Chirrut Imwe|Star Wars|302|R|{G}{W}{U}|Legendary Creature - Human Monk|3|3|Chirrut Imwe can block up to two additional creatures.${1}{W}: Prevent all combat damage that would be dealt to Chirrut Imwe until end of turn.| +Director Krennic|Star Wars|303|R|{3}{B}{B}|Legendary Creature - Human Advisor|3|4|When Director Krennic enters the battlefield, create two 1/1 black Trooper creature tokens.$When Director Krennic leaves the battlefield, destroy target basic land.| +Force Protection|Star Wars|304|C|{W}|Instant|||Target creature you control gains protection from color of your choice until end of turn. Scry 1.| +Gerrera's Revolutionary|Star Wars|305|C|{R}|Creature - Barabel Rebel|2|1|Gerrera's Revolutionary attacks each turn if able.| +Hammerhead Corvette|Star Wars|306|U|{3}{G}|Artifact Creature - Rebel Starship|3|3|Spaceflight$Whenever Hammerhead Corvette attacks, you may untap target Starship creature defending player controls and have that creature block Hammerhead Corvette this turn if able.| +Imperial Hovertank|Star Wars|307|U|{4}{W}{B}|Artifact Creature - Trooper Construct|4|4|Whenever a Trooper creature you control attacks, defending player loses 1 life and you gain 1 life.| +Jyn Erso and Cassian Andor|Star Wars|308|R|{2}{R}{W}|Legendary Creature - Human Rebel|4|4|At the beginning of combat on your turn, target creature gets +1/+0 and gains haste until end of turn.| +Occupation|Star Wars|309|U|{W}{B}|Enchantment|||Creatures your opponents control enter the battlefield tapped.${W}{B}: Target creature can't attack or block this turn, and its activated abilities can't be activated until end of turn.| +Resistance|Star Wars|310|U|{R}{W}|Enchantment|||Whenever a creature enters the battlefield under your control, Resistance deals 1 damage to each opponent.${R}{W}: Target creature gains haste until end of turn and must attack or block this turn if able.| +Thermal Detonator|Star Wars|311|C|{1}|Artifact|||{2}, Sacrifice Thermal Detonator: Thermal Detonator deals 2 damage to target creature without spaceflight or target player.| +TIE Striker|Star Wars|312|C|{1}{B}|Artifact Creature - Starship|2|1|Spaceflight| +U-Wing|Star Wars|313|U|{2}{U}|Artifact Creature - Rebel Starship|2|2|Spaceflight$As long as U-Wing is tapped, it gets +1/+0.$As long as U-Wing is untapped, it gets +0/+1.| +Vader's Command|Star Wars|314|R|{2}{B}{B}|Instant|||Choose two -$ Counter target spell unless its controller pays 5 life.$ Destroy target planeswalker.$ Destroy target nonartifact creature.$ Gain 5 life.| +Astromech Droid|Star Wars|400|C|{W}|Artifact Creature - Droid|0|1|{T}: Target starship creature you control gets +1/+1 and gains vigilance until end of turn.$Repair 4| +Buried Ruin|Star Wars|401|C||Land|||{T}: Add {1} to your mana pool.${2}, {T}, Sacrifice Buried Ruin: Return target artifact card from your graveyard to your hand.| +Finn|Star Wars|402|U|{3}{G}|Legendary Creature - Human Trooper Soldier|3|3|Whenever Finn or another nontoken creature you control enters the battlefield under your control, you gain 1 life for each nontoken creature you control.| +Flame Trooper|Star Wars|403|C|{2}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have menace.| +Force Stasis|Star Wars|404|C|{1}{U}|Instant|||Choose one -$ Tap target creature. It doesn't untap during its controller's next untap step.$ Return target instant or sorcery spell you don't control to its owner's hand.| +General Hux|Star Wars|405|U|{3}{B}|Legendary Creature - Human Advisor|3|3|Whenever General Hux or another nontoken creature enters the battlefield under your control, until end of turn, target creature gains "{B}: This creature gets +1/+1 until end of turn."| +Kylo Ren|Star Wars|406|M|{1}{U}{B}{R}|Legendary Creature - Human Sith|3|3|Haste, first strike$Kylo Ren attacks each turn if able.$Whenever Kylo Ren attacks, it gets +1/+0 for each creature in your graveyard and you may tap target creature defending player controls.| +Outer Rim Gang|Star Wars|407|C|{2}{B}{R}{G}|Creature - Human Rogue Hunter|4|4|When Outer Rim Gang enters the battlefield, each creature with a bounty counter on it gets -2/-2 until end of turn.| +Poe Dameron|Star Wars|408|U|{3}{W}|Legendary Creature - Human Soldier|3|3|Whenever Poe Dameron or another nontoken creature enters the battlefield under your control, starship creatures you control get +1/+1 until end of turn.| +Rathtar|Star Wars|409|C|{2}{R}{G}|Creature - Beast|4|4|{5}{G}{G}: Monstrosity 2.$When Rathtar becomes monstrous, any number of target creatures must block it this turn if able.| +Rey|Star Wars|410|R|{G}{W}{U}|Legendary Creature - Human Knight|3|3|Vigilance, first strike$Whenever Rey enters or leaves the battlefield, reveal the top card of target player's library. You gain life equal to that card's converted mana cost.| +Riot Trooper|Star Wars|411|C|{2}{W}|Creature - Human Trooper|2|2|Each trooper creature you control can block an additional creature each combat.| +Salvage Trader|Star Wars|412|C|{3}{U}|Creature - Crolute|2|3|{T}: Exchange control of target artifact you control and target artifact an opponent controls with the same converted mana cost.| +Sins of the Father|Star Wars|413|C|{1}{B}|Sorcery|||Exile target player's graveyard. That player loses 1 life for each instant or sorcery card exiled this way.| +Upsilon-class Shuttle|Star Wars|414|C|{5}|Artifact Creature - Starship|2|3|Spaceflight$Whenever Upsilon-class Shuttle attacks, target creature you control gains spaceflight until end of turn.| +Canto Bight Enforcer|Star Wars|500|U|{1}{B}|Creature - Human Hunter|2|2|When Canto Bight Enforcer enters the battlefield, you may put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, put a +1/+1 counter on Canto Bight Enforcer.| +Cantonica Casino|Star Wars|501|R|{2}|Artifact|||{T}: Roll two six-sided dice. If you roll doubles, gain 10 life. Otherwise, lose 1 life.| +Captain Phasma|Star Wars|502|R|{4}{W}|Legendary Creature - Human Trooper|4|4|Nontoken Trooper creatures you control have "When this creature enters the battlefield, creature 1/1/ white Trooper creature token."${W}{U}{B}{R}{G}: Search your library for a Trooper creature card, reveal it, put it into your hand, then shuffle your library.| +Code Slice|Star Wars|503|C|{R}|Sorcery|||Put a bounty counter on target creature.$Artifact creatures with bounty counters on them can't block this turn.| +Delay Tactic|Star Wars|504|C|{1}{U}|Instant|||Choose one -$ Creatures you control gain hexproof until end of turn.$ Creatures target opponent controls don't untap during his or her next untap step.| +Fathier|Star Wars|505|C|{2}{R}{R}|Creature - Beast|3|3|Haste${4}{R}{R}: Monstrosity 2.| +First Order Dreadnought|Star Wars|506|M|{4}{B}{B}|Artifact Creature - Starship|5|6|Spaceflight${2}{B}, {T}: Destroy target creature.| +Force Projection|Star Wars|507|R|{1}{U}{U}|Sorcery|||Create a token that is a copy of target creature except that it is an Illusion in addition to its other types and gains "When this creature becomes the target of a spell, sacrifice it."$Scry 2.| +Force Telepathy|Star Wars|508|C|{UB}|Instant|||Target player reveals his or her hand.$Scry 2| +Glorious Charge|Star Wars|509|C|{1}{W}|Instant|||Creatures you control get +1/+1 until end of turn.| +Inspire|Star Wars|510|C|{1}{U}|Instant|||Untap target creature.$Draw a card.| +Luke Skywalker, the Last Jedi|Star Wars|511|M|{2}{G}{W}|Legendary Planeswalker - Luke|||+1: Put two +1/+1 counters on up to one target creature.$-3: Put target noncreature permanent on top of its owner's library.$-6: You get an emblem with "Prevent all damage that would be dealt to you during combat." Exile Luke Skywalker, the Last Jedi.| +Mouse Droid|Star Wars|512|C|{1}{U}|Artifact Creature - Droid|0|1|When Mouse Droid dies, draw a card.$Repair 3| +Porg Nest|Star Wars|513|U|{2}{G}|Creature - Bird|0|2|Defender$At the beginning of your upkeep, create a 0/1 green Bird creature token named Porg with "{G}: Monstrosity 1."| +Praetorian Trooper|Star Wars|514|R|{3}{R}|Creature - Human Trooper|2|2|Trooper creatures you control have double strike.| +Resistance Bomber|Star Wars|515|U|{3}{R}|Artifact Creature - Rebel Starship|2|2|Spaceflight$Resistance Bomber enters the battlefield with a charge counter on it.$Remove a charge counter from Resistance Bomber: Resistance Bomber deals 5 damage to target creature. Activate this ability only if Resistance Bomber is attacking.| +Sai Tok|Star Wars|516|U|{B}{B}|Instant|||Destroy target creature or planeswalker if it has converted mana cost 4 or less.| +Supreme Leader Snoke|Star Wars|517|M|{U}{B}{R}|Legendary Planeswalker - Snoke|||+1: Put a loyalty counter on Supreme Leader Snoke for each life lost by all opponents from noncombat sources this turn.$-1: Draw a card and lose 1 life.$-X: Gain control of target creature with converted mana cost X. Untap that creature. It gains haste. Sacrifice that creature at the beginning of the next end step.| +TIE Silencer|Star Wars|518|R|{1}{B}{R}|Artifact Creature - Starship|2|2|Haste$Spaceflight$Whenever TIE Silencer attacks, it deals 1 damage to defending player and 1 damage to up to one target creature that player controls.| +Vulptex|Star Wars|519|C|{1}{W}|Creature - Fox|1|1|When Vulptex enters the battlefield, put a +1/+1 counter on target creature.| +Afterburn|Star Wars|600|C|{R}|Instant|||Choose One -$ Target creature gains haste and first strike until end of turn.$ Remove target creature from combat.| +Chewbacca, the Beast|Star Wars|601|R|{1}{G}{G}|Legendary Creature - Wookie Warrior|3|3|Partner with Han Solo, Scrumrat$Whenever Chewbacca, the Beast attacks, another target attacking creature you control gains indestructible until end of turn.| +Conscription|Star Wars|602|U|{2}{U}{U}|Sorcery|||Gain control of target creature with power 2 or less. It becomes a Trooper in addition to its other types.| +Corellian Gunship|Star Wars|603|C|{R}|Artifact Creature - Starship|1|1|Spaceflight$When Corellian Gunship enters the battlefield, it deals 1 damage to target player or planeswalker.| +Despair|Star Wars|604|U|{B}{B}|Instant|||Each opponent sacrifices a creature.| +Droid Uprising|Star Wars|605|U|{2}{W}{W}|Instant|||Tap all nonartifact creatures.$Create two colorless 1/1 Droid artifact creature tokens.| +Dryden Vos|Star Wars|606|R|{1}{B}{R}|Legendary Creature - Human Rogue|2|3|Menace$When Dryden Vos enters the battlefield, put a bounty counter on target creature.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, Dryden Vos deals 2 damage to any target.| +Enfys Nest|Star Wars|607|M|{G}{W}|Legendary Creature - Human Rebel|2|1|Vigilance$Whenever Enfys Nest enters the battlefield, you may exile target creature an opponent controls. If you do, that player gains life equal to that creature's power.| +Gamble|Star Wars|608|R|{R}|Sorcery|||Search you library for a card, put that card into your hand, discard a card at random, then shuffle your library.| +Han Solo, Scrumrat|Star Wars|609|R|{2}{W}|Legendary Creature - Human Rogue|2|2|Partner with Chewbacca, the Beast$R: Han Solo, Scrumrat gains first strike until end of turn.$Whenever Han Solo, Scrumrat deals damage during your turn, put a +1/+1 counter on another target creature you control.| +Kalevan Star Yacht|Star Wars|610|U|{3}{B}|Artifact Creature - Starship|2|3|Spaceflight$When Kalevan Star Yacht enters the battlefield, lose 1 life, draw a card, and put a bounty counter on up to one target creature.| +Maelstrom Blockade|Star Wars|611|C|{2}{WB}|Instant|||Exile target attacking creature.| +Mud Trooper|Star Wars|612|U|{B}|Creature - Human Trooper|1|1|Trooper creatures you control have "2: This creature gets +1/+1 until end of turn."| +Range Trooper|Star Wars|613|U|{3}{W}|Creature - Human Trooper|2|2|Trooper creatures you control have "When this creature enters that battlefield, you may exile target creature. Return that creature to the battlefield at the beginning of the next end step."| +Tobias Beckett|Star Wars|614|R|{3}{B}|Legendary Creature - Human Hunter|4|3|When Tobias Becket enters the battlefield, put a bounty counter on target creature an opponent controls.$Bounty - Whenever a creature an opponent controls with a bounty counter on it dies, exile the top card of that player's library. You may cast cards exiled this way and spend mana as though it were mana of any type to cast that spell.| +Underground Forum|Star Wars|615|U||Land|||T: Add {1}.${1}, {T}: Add {B}, {R}, or {G}.${2}, {T}: Put a bounty counter on target creature.|