From d7da3930b63c0c9624d8ea8feda67abc962088a5 Mon Sep 17 00:00:00 2001 From: L_J Date: Fri, 1 Jun 2018 21:13:20 +0200 Subject: [PATCH 01/77] Implemented Word of Command --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 228 ++++++++++++++++++ .../src/mage/sets/LimitedEditionAlpha.java | 1 + .../src/mage/sets/LimitedEditionBeta.java | 1 + Mage.Sets/src/mage/sets/MastersEditionIV.java | 1 + Mage.Sets/src/mage/sets/UnlimitedEdition.java | 1 + ...ControlOnOtherPlayersControllerEffect.java | 4 + Mage/src/main/java/mage/game/stack/Spell.java | 12 + 7 files changed, 248 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WordOfCommand.java 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 00000000000..53713f4c0e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -0,0 +1,228 @@ +/* + * 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.cards.w; + +import java.util.UUID; +import mage.MageObject; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.LoseControlOnOtherPlayersControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +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.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +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 controller = game.getPlayer(source.getControllerId()); + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + MageObject sourceObject = game.getObject(source.getSourceId()); + Card card = null; + if (controller != null && targetPlayer != null && sourceObject != null) { + + // 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) { + RestrictionEffect effect = new WordOfCommandCantActivateEffect(); + effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); + game.addEffect(effect, source); // While doing so, the player can activate mana abilities only if they're from lands that player controls + // TODO: and only if mana they produce is spent to activate other mana abilities of lands he or she controls and/or play that card (so you can't tap out the player's lands) + if ((card.isLand() && (!targetPlayer.canPlayLand() || !game.getActivePlayerId().equals(targetPlayer.getId()))) + || !targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { + game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName()); + // TODO: needs an automatic check for whether the card is castable (so it can't be cancelled if that's the case) + } + + for (RestrictionEffect eff : game.getContinuousEffects().getRestrictionEffects()) { + if (eff instanceof WordOfCommandCantActivateEffect) { + eff.discard(); + } + } + 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 + } + } + + if (sourceObject != null) { + Effect effect = new LoseControlOnOtherPlayersControllerEffect(controller.getLogName(), targetPlayer.getLogName()); + effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); + // You control the player until Word of Command finishes resolving + // TODO: using a DelayedTriggeredAbility to end the effect isn't the optimal solution, since effects like Time Stop can stop it from triggering even outside the stack + DelayedTriggeredAbility ability = new WordOfCommandDelayedTriggeredAbility(effect, source.getSourceId()); + ability.setSourceId(controller.getId()); + ability.setControllerId(controller.getId()); + game.addDelayedTriggeredAbility(ability); + if (card != null && !card.isLand()) { // this sets up a lose control effect for when the spell finishes resolving + ability = new WordOfCommandDelayedTriggeredAbility(effect, card.getId()); + ability.setSourceId(controller.getId()); + ability.setControllerId(controller.getId()); + game.addDelayedTriggeredAbility(ability); + } + } else { + controller.resetOtherTurnsControlled(); + targetPlayer.setGameUnderYourControl(true); + } + return true; + } + return false; + } +} + +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 WordOfCommandDelayedTriggeredAbility extends DelayedTriggeredAbility { + + private UUID cardId; + + WordOfCommandDelayedTriggeredAbility(Effect effect, UUID cardId) { + super(effect, Duration.EndOfStep); + this.cardId = cardId; + this.usesStack = false; + } + + WordOfCommandDelayedTriggeredAbility(final WordOfCommandDelayedTriggeredAbility ability) { + super(ability); + this.cardId = ability.cardId; + } + + @Override + public WordOfCommandDelayedTriggeredAbility copy() { + return new WordOfCommandDelayedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + if (zEvent.getFromZone() == Zone.STACK && event.getTargetId().equals(cardId)) { + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java b/Mage.Sets/src/mage/sets/LimitedEditionAlpha.java index 16384462e2a..3175d24d207 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 4046a234975..a67c9d45eeb 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/MastersEditionIV.java b/Mage.Sets/src/mage/sets/MastersEditionIV.java index aa84aa7e5d5..e6f5137a52f 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionIV.java +++ b/Mage.Sets/src/mage/sets/MastersEditionIV.java @@ -324,6 +324,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/UnlimitedEdition.java b/Mage.Sets/src/mage/sets/UnlimitedEdition.java index c2dc591ecf0..a08da1a590d 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/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java index ada377e8dab..6abfd75e4f2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java @@ -59,6 +59,10 @@ public class LoseControlOnOtherPlayersControllerEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); if (player != null) { player.resetOtherTurnsControlled(); + Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); + if (targetPlayer != null) { + targetPlayer.setGameUnderYourControl(true); + } return true; } return false; diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java index fc2659965e5..8ed826fa4b3 100644 --- a/Mage/src/main/java/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -93,6 +93,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 @@ -147,6 +148,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; @@ -205,6 +207,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; @@ -1050,4 +1058,8 @@ 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; + } + } From 7cc313bc43a1fb80b8eacba7face877484fb001e Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 3 Jun 2018 11:20:46 +0200 Subject: [PATCH 02/77] Implemented "force pay mana" for Word of Command --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 29 ++++++++++++++++--- .../abilities/costs/mana/ManaCostsImpl.java | 20 +++++++++++++ Mage/src/main/java/mage/players/ManaPool.java | 29 +++++++++++++++---- 3 files changed, 69 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index 53713f4c0e3..f9e0ec9a9ed 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -49,6 +49,7 @@ import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; 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; @@ -119,16 +120,36 @@ class WordOfCommandEffect extends OneShotEffect { // 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); // While doing so, the player can activate mana abilities only if they're from lands that player controls - // TODO: and only if mana they produce is spent to activate other mana abilities of lands he or she controls and/or play that card (so you can't tap out the player's lands) + 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(); + boolean autoPayment = manaPool.isAutoPayment(); + boolean autoPaymentRestricted = manaPool.isAutoPaymentRestricted(); + manaPool.setAutoPayment(true); + manaPool.setAutoPaymentRestricted(true); + manaPool.setForcedToPay(true); + int bookmark = game.bookmarkState(); + if ((card.isLand() && (!targetPlayer.canPlayLand() || !game.getActivePlayerId().equals(targetPlayer.getId()))) || !targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { - game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName()); // TODO: needs an automatic check for whether the card is castable (so it can't be cancelled if that's the case) + game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName()); } + manaPool.setForcedToPay(false); // duplicate in case of a a new mana pool existing - probably not necessary, but just in case + manaPool.setAutoPayment(autoPayment); + manaPool.setAutoPaymentRestricted(autoPaymentRestricted); + manaPool = targetPlayer.getManaPool(); // a rollback creates a new mana pool for the player, so it's necessary to find it again + manaPool.setForcedToPay(false); + manaPool.setAutoPayment(autoPayment); + manaPool.setAutoPaymentRestricted(autoPaymentRestricted); + game.removeBookmark(bookmark); + targetPlayer.resetStoredBookmark(game); + for (RestrictionEffect eff : game.getContinuousEffects().getRestrictionEffects()) { if (eff instanceof WordOfCommandCantActivateEffect) { eff.discard(); @@ -197,7 +218,7 @@ class WordOfCommandDelayedTriggeredAbility extends DelayedTriggeredAbility { private UUID cardId; WordOfCommandDelayedTriggeredAbility(Effect effect, UUID cardId) { - super(effect, Duration.EndOfStep); + super(effect, Duration.EndOfTurn); this.cardId = cardId; this.usesStack = false; } 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 f5e8f766ca8..f4148349bdd 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -265,6 +265,10 @@ public class ManaCostsImpl extends ArrayList implements M // 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) { @@ -344,6 +348,22 @@ public class ManaCostsImpl extends ArrayList implements M } // stop using mana of the clicked mana type pool.lockManaType(); + handleForcedToPayOnlyForCurrentPayment(game, pool, referenceCosts); + } + + private void handleForcedToPayOnlyForCurrentPayment(Game game, ManaPool pool, ManaCosts referenceCosts) { + // for Word of Command + if (pool.isForcedToPay()) { + if (referenceCosts != null && this.getPayment().equals(referenceCosts.getPayment())) { + UUID playerId = pool.getPlayerId(); + Player player = game.getPlayer(playerId); + if (player != null) { + game.undo(playerId); + this.clearPaid(); + game.bookmarkState(); + } + } + } } @Override diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index 2448b8a9220..686a64edcff 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -62,6 +62,7 @@ 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 Set doNotEmptyManaTypes = new HashSet<>(); @@ -70,6 +71,7 @@ public class ManaPool implements Serializable { autoPayment = true; autoPaymentRestricted = true; unlockedManaType = null; + forcedToPay = false; } public ManaPool(final ManaPool pool) { @@ -80,6 +82,7 @@ public class ManaPool implements Serializable { this.autoPayment = pool.autoPayment; this.autoPaymentRestricted = pool.autoPaymentRestricted; this.unlockedManaType = pool.unlockedManaType; + this.forcedToPay = pool.forcedToPay; this.doNotEmptyManaTypes.addAll(pool.doNotEmptyManaTypes); } @@ -138,6 +141,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)) { @@ -465,17 +469,21 @@ public class ManaPool implements Serializable { } public void setAutoPayment(boolean autoPayment) { - this.autoPayment = autoPayment; - } - - public void setAutoPaymentRestricted(boolean autoPaymentRestricted) { - this.autoPaymentRestricted = autoPaymentRestricted; + if (!forcedToPay) { + this.autoPayment = autoPayment; + } } public boolean isAutoPaymentRestricted() { return autoPaymentRestricted; } + public void setAutoPaymentRestricted(boolean autoPaymentRestricted) { + if (!forcedToPay) { + this.autoPaymentRestricted = autoPaymentRestricted; + } + } + public ManaType getUnlockedManaType() { return unlockedManaType; } @@ -515,4 +523,15 @@ 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; + } } From 6972aab50e641ec01c6ed66ff5658753bc72b961 Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 3 Jun 2018 20:25:30 +0200 Subject: [PATCH 03/77] Improved forcedToPay handling --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 37 +-------------- .../abilities/costs/mana/ManaCostImpl.java | 4 +- .../abilities/costs/mana/ManaCostsImpl.java | 4 +- Mage/src/main/java/mage/players/ManaPool.java | 45 +++---------------- 4 files changed, 14 insertions(+), 76 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index f9e0ec9a9ed..dc20f3c483f 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -1,30 +1,3 @@ -/* - * 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.cards.w; import java.util.UUID; @@ -127,10 +100,6 @@ class WordOfCommandEffect extends OneShotEffect { // 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(); - boolean autoPayment = manaPool.isAutoPayment(); - boolean autoPaymentRestricted = manaPool.isAutoPaymentRestricted(); - manaPool.setAutoPayment(true); - manaPool.setAutoPaymentRestricted(true); manaPool.setForcedToPay(true); int bookmark = game.bookmarkState(); @@ -140,13 +109,9 @@ class WordOfCommandEffect extends OneShotEffect { game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName()); } - manaPool.setForcedToPay(false); // duplicate in case of a a new mana pool existing - probably not necessary, but just in case - manaPool.setAutoPayment(autoPayment); - manaPool.setAutoPaymentRestricted(autoPaymentRestricted); + 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); - manaPool.setAutoPayment(autoPayment); - manaPool.setAutoPaymentRestricted(autoPaymentRestricted); game.removeBookmark(bookmark); targetPlayer.resetStoredBookmark(game); 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 906dc777a7c..0286595574a 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java @@ -233,7 +233,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 f4148349bdd..4591d948f3f 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -143,7 +143,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(); diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index 686a64edcff..f927460970d 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -1,30 +1,3 @@ -/* - * 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.players; import java.io.Serializable; @@ -117,12 +90,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) { @@ -151,7 +124,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; } @@ -465,23 +438,19 @@ public class ManaPool implements Serializable { } public boolean isAutoPayment() { - return autoPayment; + return autoPayment || forcedToPay; } public void setAutoPayment(boolean autoPayment) { - if (!forcedToPay) { - this.autoPayment = autoPayment; - } + this.autoPayment = autoPayment; } public boolean isAutoPaymentRestricted() { - return autoPaymentRestricted; + return autoPaymentRestricted || forcedToPay; } public void setAutoPaymentRestricted(boolean autoPaymentRestricted) { - if (!forcedToPay) { - this.autoPaymentRestricted = autoPaymentRestricted; - } + this.autoPaymentRestricted = autoPaymentRestricted; } public ManaType getUnlockedManaType() { From 492c5ab63e61eb7aebe28272d87badd695bc8fee Mon Sep 17 00:00:00 2001 From: L_J Date: Mon, 4 Jun 2018 01:32:17 +0200 Subject: [PATCH 04/77] Improved Word of Command turn control handling --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 55 ++----------------- ...ControlOnOtherPlayersControllerEffect.java | 4 -- Mage/src/main/java/mage/game/Game.java | 2 + Mage/src/main/java/mage/game/GameImpl.java | 33 ++++++++++- .../main/java/mage/game/stack/SpellStack.java | 8 ++- 5 files changed, 45 insertions(+), 57 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index dc20f3c483f..19da3214345 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -126,22 +126,10 @@ class WordOfCommandEffect extends OneShotEffect { spell.setCommandedBy(controller.getId()); // If the chosen card is cast as a spell, you control the player while that spell is resolving } } - - if (sourceObject != null) { - Effect effect = new LoseControlOnOtherPlayersControllerEffect(controller.getLogName(), targetPlayer.getLogName()); - effect.setTargetPointer(new FixedTarget(targetPlayer.getId())); - // You control the player until Word of Command finishes resolving - // TODO: using a DelayedTriggeredAbility to end the effect isn't the optimal solution, since effects like Time Stop can stop it from triggering even outside the stack - DelayedTriggeredAbility ability = new WordOfCommandDelayedTriggeredAbility(effect, source.getSourceId()); - ability.setSourceId(controller.getId()); - ability.setControllerId(controller.getId()); - game.addDelayedTriggeredAbility(ability); - if (card != null && !card.isLand()) { // this sets up a lose control effect for when the spell finishes resolving - ability = new WordOfCommandDelayedTriggeredAbility(effect, card.getId()); - ability.setSourceId(controller.getId()); - ability.setControllerId(controller.getId()); - game.addDelayedTriggeredAbility(ability); - } + + Spell wordOfCommand = game.getSpell(sourceObject.getId()); + if (wordOfCommand != null) { + wordOfCommand.setCommandedBy(controller.getId()); // You control the player until Word of Command finishes resolving } else { controller.resetOtherTurnsControlled(); targetPlayer.setGameUnderYourControl(true); @@ -177,38 +165,3 @@ class WordOfCommandCantActivateEffect extends RestrictionEffect { return false; } } - -class WordOfCommandDelayedTriggeredAbility extends DelayedTriggeredAbility { - - private UUID cardId; - - WordOfCommandDelayedTriggeredAbility(Effect effect, UUID cardId) { - super(effect, Duration.EndOfTurn); - this.cardId = cardId; - this.usesStack = false; - } - - WordOfCommandDelayedTriggeredAbility(final WordOfCommandDelayedTriggeredAbility ability) { - super(ability); - this.cardId = ability.cardId; - } - - @Override - public WordOfCommandDelayedTriggeredAbility copy() { - return new WordOfCommandDelayedTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.ZONE_CHANGE; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - ZoneChangeEvent zEvent = (ZoneChangeEvent) event; - if (zEvent.getFromZone() == Zone.STACK && event.getTargetId().equals(cardId)) { - return true; - } - return false; - } -} diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java index 3f3621caa86..01bb92c2ee4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseControlOnOtherPlayersControllerEffect.java @@ -33,10 +33,6 @@ public class LoseControlOnOtherPlayersControllerEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); if (player != null) { player.resetOtherTurnsControlled(); - Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); - if (targetPlayer != null) { - targetPlayer.setGameUnderYourControl(true); - } return true; } return false; diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index 5ae398beeab..21418c8a0cd 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -393,6 +393,8 @@ public interface Game extends MageItem, Serializable { boolean checkStateAndTriggered(); void playPriority(UUID activePlayerId, boolean resuming); + + void resetControlAfterSpellResolve(Spell spell); boolean endTurn(Ability source); diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 259d7e53358..350ff0047a6 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1395,7 +1395,13 @@ public abstract class GameImpl implements Game, Serializable { StackObject top = null; try { top = state.getStack().peek(); - top.resolve(this); + Spell topSpell = getSpell(top.getId()); + if (topSpell != null) { + top.resolve(this); + resetControlAfterSpellResolve(topSpell); + } else { + top.resolve(this); + } } 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 +1415,31 @@ public abstract class GameImpl implements Game, Serializable { } } } + + @Override + public void resetControlAfterSpellResolve(Spell spell) { + // for Word of Command + 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) { + informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName()); + turnController.resetOtherTurnsControlled(); + targetPlayer.setGameUnderYourControl(true); + } + } + } + } + } /** * This checks if the stack gets filled iterated, without ever getting empty diff --git a/Mage/src/main/java/mage/game/stack/SpellStack.java b/Mage/src/main/java/mage/game/stack/SpellStack.java index 71ad426f8bb..ecf91441b47 100644 --- a/Mage/src/main/java/mage/game/stack/SpellStack.java +++ b/Mage/src/main/java/mage/game/stack/SpellStack.java @@ -36,7 +36,13 @@ public class SpellStack extends ArrayDeque { StackObject top = null; try { top = this.peek(); - top.resolve(game); + Spell topSpell = getSpell(top.getId()); + if (topSpell != null) { + top.resolve(game); + game.resetControlAfterSpellResolve(topSpell); + } else { + top.resolve(game); + } } finally { if (top != null) { if (contains(top)) { From 9a5b574c0c51b513e11265cbaa67bfba0f567207 Mon Sep 17 00:00:00 2001 From: L_J Date: Sun, 3 Jun 2018 23:39:40 +0000 Subject: [PATCH 05/77] Added getCommandedBy method --- Mage/src/main/java/mage/game/stack/Spell.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage/src/main/java/mage/game/stack/Spell.java b/Mage/src/main/java/mage/game/stack/Spell.java index eb2544e2575..05f8b639662 100644 --- a/Mage/src/main/java/mage/game/stack/Spell.java +++ b/Mage/src/main/java/mage/game/stack/Spell.java @@ -1036,4 +1036,8 @@ public class Spell extends StackObjImpl implements Card { this.commandedBy = playerId; } + public UUID getCommandedBy() { + return commandedBy; + } + } From cb7c222eb94baf6b55110236216562c988bd5b61 Mon Sep 17 00:00:00 2001 From: L_J Date: Mon, 4 Jun 2018 14:30:37 +0200 Subject: [PATCH 06/77] Fixed various Word of Command bugs, implemented mana pool restore methods --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 8 +--- .../abilities/costs/mana/ManaCostsImpl.java | 8 +++- Mage/src/main/java/mage/game/Game.java | 2 +- Mage/src/main/java/mage/game/GameImpl.java | 46 +++++++++---------- .../main/java/mage/game/stack/SpellStack.java | 11 ++--- Mage/src/main/java/mage/players/ManaPool.java | 28 +++++++++++ 6 files changed, 62 insertions(+), 41 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index 19da3214345..54c3a66c79f 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -4,11 +4,8 @@ import java.util.UUID; import mage.MageObject; import mage.MageObjectReference; import mage.abilities.Ability; -import mage.abilities.DelayedTriggeredAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.RestrictionEffect; -import mage.abilities.effects.common.LoseControlOnOtherPlayersControllerEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -18,8 +15,6 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.ManaPool; @@ -101,6 +96,7 @@ class WordOfCommandEffect extends OneShotEffect { // 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(); if ((card.isLand() && (!targetPlayer.canPlayLand() || !game.getActivePlayerId().equals(targetPlayer.getId()))) @@ -127,7 +123,7 @@ class WordOfCommandEffect extends OneShotEffect { } } - Spell wordOfCommand = game.getSpell(sourceObject.getId()); + Spell wordOfCommand = game.getSpell(source.getSourceId()); if (wordOfCommand != null) { wordOfCommand.setCommandedBy(controller.getId()); // You control the player until Word of Command finishes resolving } else { 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 90a8b7e4ecd..73739a43484 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -237,7 +237,8 @@ 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; } @@ -324,7 +325,9 @@ public class ManaCostsImpl extends ArrayList implements M } // stop using mana of the clicked mana type pool.lockManaType(); - handleForcedToPayOnlyForCurrentPayment(game, pool, referenceCosts); + if (!wasUnlockedManaType) { + handleForcedToPayOnlyForCurrentPayment(game, pool, referenceCosts); + } } private void handleForcedToPayOnlyForCurrentPayment(Game game, ManaPool pool, ManaCosts referenceCosts) { @@ -336,6 +339,7 @@ public class ManaCostsImpl extends ArrayList implements M if (player != null) { game.undo(playerId); this.clearPaid(); + player.getManaPool().restoreMana(pool.getPoolBookmark()); game.bookmarkState(); } } diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index 21418c8a0cd..2f7af72d292 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -394,7 +394,7 @@ public interface Game extends MageItem, Serializable { void playPriority(UUID activePlayerId, boolean resuming); - void resetControlAfterSpellResolve(Spell spell); + void resetControlAfterSpellResolve(UUID topId); boolean endTurn(Ability source); diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 350ff0047a6..55c1872ab19 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1395,13 +1395,8 @@ public abstract class GameImpl implements Game, Serializable { StackObject top = null; try { top = state.getStack().peek(); - Spell topSpell = getSpell(top.getId()); - if (topSpell != null) { - top.resolve(this); - resetControlAfterSpellResolve(topSpell); - } else { - top.resolve(this); - } + 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 @@ -1417,24 +1412,27 @@ public abstract class GameImpl implements Game, Serializable { } @Override - public void resetControlAfterSpellResolve(Spell spell) { + public void resetControlAfterSpellResolve(UUID topId) { // for Word of Command - 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) { - informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName()); - turnController.resetOtherTurnsControlled(); - targetPlayer.setGameUnderYourControl(true); + 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) { + informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName()); + turnController.resetOtherTurnsControlled(); + targetPlayer.setGameUnderYourControl(true); + } } } } diff --git a/Mage/src/main/java/mage/game/stack/SpellStack.java b/Mage/src/main/java/mage/game/stack/SpellStack.java index ecf91441b47..060be88c1f0 100644 --- a/Mage/src/main/java/mage/game/stack/SpellStack.java +++ b/Mage/src/main/java/mage/game/stack/SpellStack.java @@ -36,17 +36,12 @@ public class SpellStack extends ArrayDeque { StackObject top = null; try { top = this.peek(); - Spell topSpell = getSpell(top.getId()); - if (topSpell != null) { - top.resolve(game); - game.resetControlAfterSpellResolve(topSpell); - } else { - top.resolve(game); - } + 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); } } diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index f927460970d..67dbe5fea9a 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -36,6 +36,7 @@ public class ManaPool implements Serializable { 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<>(); @@ -56,6 +57,9 @@ public class ManaPool implements Serializable { 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); } @@ -503,4 +507,28 @@ public class ManaPool implements Serializable { 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); + } + } } From d19ca838cace79945b3c06ad6027f6d92cf966f6 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 7 Jun 2018 05:37:22 +0200 Subject: [PATCH 07/77] Implemented castability check for Word of Command --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 74 ++++++++++++++++++- .../abilities/costs/mana/ManaCostsImpl.java | 5 ++ .../abilities/effects/ContinuousEffects.java | 2 +- 3 files changed, 76 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index 54c3a66c79f..dc744bda24b 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -4,17 +4,23 @@ 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; @@ -99,10 +105,43 @@ class WordOfCommandEffect extends OneShotEffect { manaPool.storeMana(); int bookmark = game.bookmarkState(); - if ((card.isLand() && (!targetPlayer.canPlayLand() || !game.getActivePlayerId().equals(targetPlayer.getId()))) - || !targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { - // TODO: needs an automatic check for whether the card is castable (so it can't be cancelled if that's the case) - game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName()); + // check for card playability (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) + 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 { + 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; + } + } + } + + if (canPlay) { + while (!targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { + SpellAbility spellAbility = card.getSpellAbility(); + if (spellAbility != null) { + ((ManaCostsImpl) spellAbility.getManaCosts()).forceManaRollback(game, manaPool); // force rollback if card was deemed playable + } else { + break; + } + } + } else { + game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName() + (canPlay ? "" : " (card can't be played)")); } manaPool.setForcedToPay(false); // duplicate in case of a new mana pool existing - probably not necessary, but just in case @@ -114,6 +153,7 @@ class WordOfCommandEffect extends OneShotEffect { for (RestrictionEffect eff : game.getContinuousEffects().getRestrictionEffects()) { if (eff instanceof WordOfCommandCantActivateEffect) { eff.discard(); + break; } } game.getContinuousEffects().removeInactiveEffects(game); @@ -161,3 +201,29 @@ class WordOfCommandCantActivateEffect extends RestrictionEffect { 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/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index 73739a43484..7aa19583676 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -346,6 +346,11 @@ public class ManaCostsImpl extends ArrayList implements M } } + public void forceManaRollback(Game game, ManaPool pool) { + // for Word of Command + handleForcedToPayOnlyForCurrentPayment(game, pool, this); + } + @Override public final void load(String mana) { this.clear(); diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index 7c170cc5f6a..54fe6c7c744 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)) { From 323894118b91b394a1e894448773b1a93299d29d Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 7 Jun 2018 16:49:10 +0200 Subject: [PATCH 08/77] Fixed X costs not being properly reset with Word of Command rollback --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 79 ++++++++++--------- .../abilities/costs/mana/ManaCostsImpl.java | 1 + 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index dc744bda24b..e2a349ffa76 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -105,43 +105,22 @@ class WordOfCommandEffect extends OneShotEffect { manaPool.storeMana(); int bookmark = game.bookmarkState(); - // check for card playability (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) - 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 { - 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; - } + 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) { - while (!targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { - SpellAbility spellAbility = card.getSpellAbility(); - if (spellAbility != null) { - ((ManaCostsImpl) spellAbility.getManaCosts()).forceManaRollback(game, manaPool); // force rollback if card was deemed playable - } else { - break; - } - } - } else { - game.informPlayers(targetPlayer.getLogName() + " didn't play " + card.getLogName() + (canPlay ? "" : " (card can't be played)")); + 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 @@ -149,7 +128,6 @@ class WordOfCommandEffect extends OneShotEffect { manaPool.setForcedToPay(false); game.removeBookmark(bookmark); targetPlayer.resetStoredBookmark(game); - for (RestrictionEffect eff : game.getContinuousEffects().getRestrictionEffects()) { if (eff instanceof WordOfCommandCantActivateEffect) { eff.discard(); @@ -174,6 +152,35 @@ class WordOfCommandEffect extends OneShotEffect { } 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 { 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 7aa19583676..303384dafc0 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -339,6 +339,7 @@ public class ManaCostsImpl extends ArrayList implements M if (player != null) { game.undo(playerId); this.clearPaid(); + this.setX(0); player.getManaPool().restoreMana(pool.getPoolBookmark()); game.bookmarkState(); } From 5fa69cb8a9fe94aa979177101dc324d0c8b43099 Mon Sep 17 00:00:00 2001 From: L_J Date: Thu, 7 Jun 2018 15:41:47 +0000 Subject: [PATCH 09/77] More X cost rollback related fixes --- .../main/java/mage/abilities/costs/mana/ManaCostsImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 303384dafc0..dbf25f6df43 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -333,13 +333,13 @@ public class ManaCostsImpl extends ArrayList implements M private void handleForcedToPayOnlyForCurrentPayment(Game game, ManaPool pool, ManaCosts referenceCosts) { // for Word of Command if (pool.isForcedToPay()) { - if (referenceCosts != null && this.getPayment().equals(referenceCosts.getPayment())) { + 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(0); + this.setX(referenceCosts.getX()); player.getManaPool().restoreMana(pool.getPoolBookmark()); game.bookmarkState(); } From 3e180267ed44f5d4929dd56b729740da1b40ef84 Mon Sep 17 00:00:00 2001 From: L_J Date: Fri, 8 Jun 2018 20:22:25 +0200 Subject: [PATCH 10/77] Word of Command & Mindslaver interaction fixes --- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 27 +++++++++--- Mage/src/main/java/mage/game/Game.java | 2 +- Mage/src/main/java/mage/game/GameImpl.java | 7 ++- Mage/src/main/java/mage/players/Player.java | 6 +++ .../main/java/mage/players/PlayerImpl.java | 43 +++++++++++++++++-- 5 files changed, 72 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index e2a349ffa76..d03d0332667 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -1,3 +1,4 @@ + package mage.cards.w; import java.util.UUID; @@ -71,11 +72,23 @@ class WordOfCommandEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); + Player sourceController = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(source.getFirstTarget()); MageObject sourceObject = game.getObject(source.getSourceId()); Card card = null; - if (controller != null && targetPlayer != null && sourceObject != 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()); @@ -140,13 +153,15 @@ class WordOfCommandEffect extends OneShotEffect { spell.setCommandedBy(controller.getId()); // If the chosen card is cast as a spell, you control the player while that spell is resolving } } - - Spell wordOfCommand = game.getSpell(source.getSourceId()); + + wordOfCommand = game.getSpell(source.getSourceId()); if (wordOfCommand != null) { wordOfCommand.setCommandedBy(controller.getId()); // You control the player until Word of Command finishes resolving } else { - controller.resetOtherTurnsControlled(); - targetPlayer.setGameUnderYourControl(true); + targetPlayer.setGameUnderYourControl(true, false); + if (!targetPlayer.getTurnControlledBy().equals(controller.getId())) { + controller.getPlayersUnderYourControl().remove(targetPlayer.getId()); + } } return true; } diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index 2f7af72d292..cdb2fae408d 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -393,7 +393,7 @@ public interface Game extends MageItem, Serializable { boolean checkStateAndTriggered(); void playPriority(UUID activePlayerId, boolean resuming); - + void resetControlAfterSpellResolve(UUID topId); boolean endTurn(Ability source); diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 55c1872ab19..5127ed4af37 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -1429,12 +1429,15 @@ public abstract class GameImpl implements Game, Serializable { if (turnController != null) { Player targetPlayer = getPlayer(spellControllerId); if (targetPlayer != null) { + targetPlayer.setGameUnderYourControl(true, false); informPlayers(turnController.getLogName() + " lost control over " + targetPlayer.getLogName()); - turnController.resetOtherTurnsControlled(); - targetPlayer.setGameUnderYourControl(true); + if (targetPlayer.getTurnControlledBy().equals(turnController.getId())) { + turnController.getPlayersUnderYourControl().remove(targetPlayer.getId()); + } } } } + spell.setCommandedBy(null); } } } diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index 6a51f097456..0bcb72fb3bb 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -279,6 +279,8 @@ public interface Player extends MageItem, Copyable { */ void setTurnControlledBy(UUID playerId); + List getTurnControllers(); + UUID getTurnControlledBy(); /** @@ -306,6 +308,8 @@ public interface Player extends MageItem, Copyable { */ void setGameUnderYourControl(boolean value); + void setGameUnderYourControl(boolean value, boolean fullRestore); + boolean isTestMode(); void setTestMode(boolean value); @@ -852,6 +856,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 a21a497df72..b5f0f40ddc4 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -156,6 +156,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<>(); @@ -263,6 +264,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; @@ -343,6 +346,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(); @@ -398,6 +403,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; @@ -520,13 +526,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()); @@ -538,6 +544,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 @@ -563,9 +575,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; + } + } } } @@ -980,6 +1010,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; From d03fd6eea39ae08759be22f84880974611720f7b Mon Sep 17 00:00:00 2001 From: L_J Date: Fri, 8 Jun 2018 18:41:06 +0000 Subject: [PATCH 11/77] Drain Power fix for Rhystic Cave (#4894) --- Mage.Sets/src/mage/cards/d/DrainPower.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/cards/d/DrainPower.java b/Mage.Sets/src/mage/cards/d/DrainPower.java index 6a21c6cbe1f..e97d7a89672 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 From 39ec630c4518b75cfc9edadde5b36e0acb54da7d Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 23 Jun 2018 19:42:19 -0400 Subject: [PATCH 12/77] Implement Orcish Mine --- Mage.Sets/src/mage/cards/o/OrcishMine.java | 102 ++++++++++++++++++ Mage.Sets/src/mage/sets/Homelands.java | 1 + .../main/java/mage/counters/CounterType.java | 1 + 3 files changed, 104 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OrcishMine.java 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 00000000000..1b8922c63f8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OrcishMine.java @@ -0,0 +1,102 @@ +package mage.cards.o; + +import java.util.UUID; + +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BecomesTappedAttachedTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.DamageAttachedControllerEffect; +import mage.abilities.effects.common.DestroyAttachedToEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +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.TargetLandPermanent; +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 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 BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ORE.createInstance()), TargetController.YOU, false)); + this.addAbility(new BecomesTappedAttachedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ORE.createInstance()), "enchanted land", false)); + + // 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/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 4502fe8dbd1..99ea988fc6c 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -130,6 +130,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("Rashka the Slayer", 12, Rarity.RARE, mage.cards.r.RashkaTheSlayer.class)); cards.add(new SetCardInfo("Reef Pirates", "36a", Rarity.COMMON, ReefPirates.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index d671afc263a..7b3dc6ae5fd 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), From 65d67d48fdbe7a059f06cd7373f78b9be9412aba Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 23 Jun 2018 23:57:04 -0400 Subject: [PATCH 13/77] Start implementing OrTriggeredAbility --- Mage.Sets/src/mage/cards/o/OrcishMine.java | 6 +- .../abilities/meta/OrTriggeredAbility.java | 83 +++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java diff --git a/Mage.Sets/src/mage/cards/o/OrcishMine.java b/Mage.Sets/src/mage/cards/o/OrcishMine.java index 1b8922c63f8..d6e9abdd40b 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishMine.java +++ b/Mage.Sets/src/mage/cards/o/OrcishMine.java @@ -11,6 +11,7 @@ import mage.abilities.effects.common.DestroyAttachedToEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.meta.OrTriggeredAbility; import mage.constants.*; import mage.counters.CounterType; import mage.game.Game; @@ -46,8 +47,9 @@ public final class OrcishMine extends CardImpl { 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 BeginningOfUpkeepTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ORE.createInstance()), TargetController.YOU, false)); - this.addAbility(new BecomesTappedAttachedTriggeredAbility(new RemoveCounterSourceEffect(CounterType.ORE.createInstance()), "enchanted land", false)); + 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()); 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 00000000000..e44e7c7bc30 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -0,0 +1,83 @@ +package mage.abilities.meta; + +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; + +public class OrTriggeredAbility extends TriggeredAbilityImpl { + + private TriggeredAbility[] triggeredAbilities; + + private final String ruleTrigger; + + 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; + for (TriggeredAbility ability : triggeredAbilities){ + //Remove useless data + ability.getEffects().clear(); + ability.setSourceId(this.getSourceId()); + ability.setControllerId(this.getControllerId()); + } + } + + public OrTriggeredAbility(OrTriggeredAbility ability) { + super(ability); + this.triggeredAbilities = ability.triggeredAbilities; + this.ruleTrigger = ability.ruleTrigger; + } + + + @Override + public boolean checkEventType(GameEvent event, Game game) { + boolean toRet = false; + for (TriggeredAbility ability : triggeredAbilities){ + toRet = toRet || ability.checkEventType(event, game); + } + if (toRet){ + System.out.println("Correct event type ("+event.getType()+")"); + } + return toRet; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + boolean toRet = false; + for (TriggeredAbility ability : triggeredAbilities){ + toRet = toRet || ability.checkTrigger(event, game); + } + 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(); + } +} From 6ee4d4a217f9252259f933e31547fb36d845eb24 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 24 Jun 2018 10:51:48 -0400 Subject: [PATCH 14/77] Override Ability setters --- Mage.Sets/src/mage/cards/o/OrcishMine.java | 17 +++-- .../abilities/meta/OrTriggeredAbility.java | 62 +++++++++++++++---- 2 files changed, 59 insertions(+), 20 deletions(-) diff --git a/Mage.Sets/src/mage/cards/o/OrcishMine.java b/Mage.Sets/src/mage/cards/o/OrcishMine.java index d6e9abdd40b..747e86604ea 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishMine.java +++ b/Mage.Sets/src/mage/cards/o/OrcishMine.java @@ -1,29 +1,28 @@ package mage.cards.o; -import java.util.UUID; - +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.SacrificeSourceEffect; 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.common.TargetLandPermanent; -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.target.common.TargetLandPermanent; + +import java.util.UUID; /** * diff --git a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java index e44e7c7bc30..d87b79c8286 100644 --- a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -1,17 +1,26 @@ 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.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. + * @author noahg + */ public class OrTriggeredAbility extends TriggeredAbilityImpl { - private TriggeredAbility[] triggeredAbilities; - private final String ruleTrigger; + private TriggeredAbility[] triggeredAbilities; public OrTriggeredAbility(Zone zone, Effect effect, TriggeredAbility... abilities) { this(zone, effect, false, null, abilities); @@ -21,11 +30,9 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { super(zone, effect, optional); this.triggeredAbilities = abilities; this.ruleTrigger = ruleTrigger; - for (TriggeredAbility ability : triggeredAbilities){ + for (TriggeredAbility ability : triggeredAbilities) { //Remove useless data ability.getEffects().clear(); - ability.setSourceId(this.getSourceId()); - ability.setControllerId(this.getControllerId()); } } @@ -39,11 +46,11 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { boolean toRet = false; - for (TriggeredAbility ability : triggeredAbilities){ + for (TriggeredAbility ability : triggeredAbilities) { toRet = toRet || ability.checkEventType(event, game); } - if (toRet){ - System.out.println("Correct event type ("+event.getType()+")"); + if (toRet) { + System.out.println("Correct event type (" + event.getType() + ")"); } return toRet; } @@ -51,7 +58,7 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { boolean toRet = false; - for (TriggeredAbility ability : triggeredAbilities){ + for (TriggeredAbility ability : triggeredAbilities) { toRet = toRet || ability.checkTrigger(event, game); } return toRet; @@ -73,11 +80,44 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { .append(triggeredAbilities[0].getRule().substring(1).toLowerCase()); } - for (int i = 1; i < (triggeredAbilities.length - 1); i++){ + 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(); + 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); + } } } From 6a2ad691d4ea16eb2f530b168b0f6ff698a0cac7 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 24 Jun 2018 13:51:02 -0400 Subject: [PATCH 15/77] Fix OrTriggeredAbility hang --- .../abilities/meta/OrTriggeredAbility.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java index d87b79c8286..1d14b10481f 100644 --- a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -45,23 +45,25 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - boolean toRet = false; for (TriggeredAbility ability : triggeredAbilities) { - toRet = toRet || ability.checkEventType(event, game); + if (ability.checkEventType(event, game)){ + System.out.println("Correct event type (" + event.getType() + ")"); + return true; + } } - if (toRet) { - System.out.println("Correct event type (" + event.getType() + ")"); - } - return toRet; + return false; } @Override public boolean checkTrigger(GameEvent event, Game game) { - boolean toRet = false; for (TriggeredAbility ability : triggeredAbilities) { - toRet = toRet || ability.checkTrigger(event, game); + if (ability.checkEventType(event, game) && ability.checkTrigger(event, game)){ + System.out.println("Triggered from "+ability.getRule()); + return true; + } + System.out.println("Checked "+ability.getRule()); } - return toRet; + return false; } @Override From 37e800a7dd7776cfff07895c21a5b5c48f74e60b Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 24 Jun 2018 16:55:15 -0400 Subject: [PATCH 16/77] Update Voice of Resurgence --- .../src/mage/cards/v/VoiceOfResurgence.java | 65 +++++-------------- .../ConditionalTriggeredAbility.java | 2 + .../abilities/meta/OrTriggeredAbility.java | 25 ++++++- 3 files changed, 43 insertions(+), 49 deletions(-) diff --git a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java index 059572e9e73..ab0e3974141 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java @@ -3,13 +3,21 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; 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.effects.common.DrawCardSourceControllerEffect; +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.filter.FilterSpell; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -31,7 +39,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 +58,4 @@ 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.getActivePlayerId().equals(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); - } -} +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java index 0410a5b3a61..8c4f60a0474 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalTriggeredAbility.java @@ -48,6 +48,8 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkInterveningIfClause(Game game) { + System.out.println("Source ID: "+this.getControllerId()); + System.out.println("Active player ID: "+game.getActivePlayerId()); return condition.apply(game, this); } diff --git a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java index 1d14b10481f..053dccf41a7 100644 --- a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -38,7 +38,10 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { public OrTriggeredAbility(OrTriggeredAbility ability) { super(ability); - this.triggeredAbilities = ability.triggeredAbilities; + this.triggeredAbilities = new TriggeredAbility[ability.triggeredAbilities.length]; + for (int i = 0; i < this.triggeredAbilities.length; i++){ + this.triggeredAbilities[i] = ability.triggeredAbilities[i].copy(); + } this.ruleTrigger = ability.ruleTrigger; } @@ -122,4 +125,24 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { ability.setSourceObject(sourceObject, game); } } + + @Override + public boolean checkInterveningIfClause(Game game) { + for (TriggeredAbility ability : triggeredAbilities) { + if (!ability.checkInterveningIfClause(game)){ + return false; + } + } + return true; + } + + @Override + public boolean checkIfClause(Game game) { + for (TriggeredAbility ability : triggeredAbilities) { + if (!ability.checkIfClause(game)){ + return false; + } + } + return true; + } } From 8949987b783e0905d5906f6b6ca802d0d111d159 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 24 Jun 2018 20:02:40 -0400 Subject: [PATCH 17/77] Add ConditionalTriggeredAbility for non-intervening0f --- .../src/mage/cards/a/AbzanBeastmaster.java | 4 +- .../src/mage/cards/a/AfflictedDeserter.java | 4 +- .../src/mage/cards/a/AidFromTheCowl.java | 4 +- .../src/mage/cards/a/AirdropAeronauts.java | 4 +- 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/ArahboRoarOfTheWorld.java | 4 +- .../src/mage/cards/a/ArguelsBloodFast.java | 4 +- 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 +- 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/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 +- .../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/CetaSanctuary.java | 4 +- .../src/mage/cards/c/ChakramRetriever.java | 3 +- .../src/mage/cards/c/ChanceEncounter.java | 4 +- 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 +- .../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/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/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 +- .../src/mage/cards/d/DimensionalBreach.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 +- .../src/mage/cards/d/DreadCacodemon.java | 4 +- .../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/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 +- .../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 +- Mage.Sets/src/mage/cards/g/Gigantiform.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/HeartstabberMosquito.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 +- .../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/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/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/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.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 +- .../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 +- .../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/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 +- .../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/MightMakesRight.java | 4 +- .../src/mage/cards/m/MindwrackDemon.java | 4 +- .../src/mage/cards/m/MirrorSigilSergeant.java | 4 +- Mage.Sets/src/mage/cards/m/MoldShambler.java | 4 +- .../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/MyrServitor.java | 4 +- 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 +- .../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/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 +- 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 +- 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/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/ProgenitorMimic.java | 4 +- Mage.Sets/src/mage/cards/p/Pyrohemia.java | 4 +- Mage.Sets/src/mage/cards/q/QueenMarchesa.java | 4 +- Mage.Sets/src/mage/cards/r/RaidersWake.java | 4 +- Mage.Sets/src/mage/cards/r/RakaSanctuary.java | 4 +- .../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/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/RuinRaider.java | 4 +- .../src/mage/cards/r/RushingTideZubera.java | 4 +- .../src/mage/cards/s/SabertoothOutrider.java | 4 +- .../src/mage/cards/s/SageOfAncientLore.java | 4 +- Mage.Sets/src/mage/cards/s/SandStrangler.java | 4 +- Mage.Sets/src/mage/cards/s/Sarcomancy.java | 4 +- .../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/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 +- .../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/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 +- .../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/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 +- .../src/mage/cards/t/TaigamOjutaiMaster.java | 4 +- Mage.Sets/src/mage/cards/t/TempestOwl.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/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 +- 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 +- .../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/UnquenchableThirst.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/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/VoiceOfResurgence.java | 11 +- 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/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 +- ...nctuaryInterveningIfTriggeredAbility.java} | 6 +- ...ditionalInterveningIfTriggeredAbility.java | 104 ++++++++++++++++++ .../ConditionalTriggeredAbility.java | 11 +- .../mage/abilities/keyword/EvokeAbility.java | 4 +- .../mage/abilities/keyword/RepairAbility.java | 14 +-- .../abilities/keyword/SuspendAbility.java | 18 +-- .../abilities/meta/OrTriggeredAbility.java | 42 +++---- 462 files changed, 1120 insertions(+), 1017 deletions(-) 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 diff --git a/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java b/Mage.Sets/src/mage/cards/a/AbzanBeastmaster.java index 21d42c45d8c..e0503095188 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/AfflictedDeserter.java b/Mage.Sets/src/mage/cards/a/AfflictedDeserter.java index 3b54846938b..3cbe3dbff4b 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 f0509b855cc..8f35a937e29 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 9cd725b673d..9e79fe61da5 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/AjanisComrade.java b/Mage.Sets/src/mage/cards/a/AjanisComrade.java index df0f010c293..bb26d2ac246 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 a19f94d94ce..dbc1187136b 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 b405eb89848..fddd9d69a5a 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 efae604ac2e..f77efb80a82 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 3580234a44d..6d366638838 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 9fd7226ac9c..166342229b6 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 b312075ab0b..2b3826169ca 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 90374b5bc91..c74a187ef30 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 623fa691225..97bf7f87a6b 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/ArahboRoarOfTheWorld.java b/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java index 1d7ce04018a..9eb4e17736c 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 c8ff49c1068..89be4d3219a 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/AsajjVentress.java b/Mage.Sets/src/mage/cards/a/AsajjVentress.java index d93d1aacdfc..3e2aa60f81b 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 c7b7031a53f..bf7ea122ece 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 6e851079e03..365bb5f82ec 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/BaneOfHanweir.java b/Mage.Sets/src/mage/cards/b/BaneOfHanweir.java index 97ca6129480..a21b4c8deed 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 5ea7683cac6..78113c6343c 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 50fb2ac402a..9a0808abc28 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 27742c3450c..10b298ca19a 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 b70c84ccdd6..db324f7b896 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 816f145ab22..fef59f0aaab 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 a72ec31ee52..605e3cf3b23 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 9c49ebe1ded..03c7f503100 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 77995b35a95..86e9224fc87 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 1ed1d11e8e0..82ee8fe7708 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/BrandedHowler.java b/Mage.Sets/src/mage/cards/b/BrandedHowler.java index f6774d1cc86..f51fc8c26a4 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 02dfd315248..3171564a794 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 1622d77d4e3..015fdf0395e 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 6e726cdf763..fe17742f0b6 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 c09d9a1225c..d665178aa52 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 508f309439d..ac0cfeaab98 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/BurningEyeZubera.java b/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java index 1aa46781da6..e916504a73b 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 511993aa510..1ecf21e9cc0 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 89acf06212f..cb5c59b1c31 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 15e9bc38b7a..c6346f70b1d 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 f639bab5c1f..5fa2e10f406 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 d0c38ae02e2..3c5915d34f2 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/CetaSanctuary.java b/Mage.Sets/src/mage/cards/c/CetaSanctuary.java index 920b60d38f3..8bd830649f9 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 70c5af3f67b..fd4704236da 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 9cae7a541b3..6bacd9ab59d 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/Chronozoa.java b/Mage.Sets/src/mage/cards/c/Chronozoa.java index fb63297fc19..81a6153913c 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 35620c0cedb..86093720e51 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 a2bada5d746..0f8813d79d5 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 cd2903327e0..7eabddb97fa 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 9efa2a076df..e02f4434b43 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 06743d0ae22..fe4557ef8dd 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 f56893ebccf..4480d844ced 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 cfe982d61cc..17ead83cd53 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 3d26ff69c75..abd4bd9d6f8 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 2d1c8d2bab7..3697c4ab9f0 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 57c34427a95..1653c18a411 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 cd762d6a158..6153f6735d0 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 333cf8dd3e3..513878588fd 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 1244c5d1281..72a01268b1f 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/CrestedSunmare.java b/Mage.Sets/src/mage/cards/c/CrestedSunmare.java index 9367d010c9c..bdfcd07bb72 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 394fed8a8da..2980d3aa903 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 5afd4f65c2b..911eeccd417 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 4904159e506..183beb3ef6c 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 d9fbded941e..8e2ab315d4e 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/d/DanceOfTheDead.java b/Mage.Sets/src/mage/cards/d/DanceOfTheDead.java index 380ce8d79aa..40b8b5a6f38 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 66d9cad9306..112af1122ad 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 3d23098e3d7..e1def85a885 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 43224cdd757..f4db672b491 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 a34a33fcc5e..9805ceecc73 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 d26396ac697..19f86a0c96e 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 e3f3b085b89..88ace23bc5e 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 cf49c078049..eeb855dd357 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 2330ad10d25..96cba582c90 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 fabc2fb55f8..2a7df4690c6 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 3bfc96c3664..ddf8afee2da 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 29217e9fc85..90113472edf 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 ed911402690..fea3d9c3bf5 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 dcfd3b4b74c..4aa59062ae6 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 5af9ee3b8d7..0d02f4049b5 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/DefenseOfTheHeart.java b/Mage.Sets/src/mage/cards/d/DefenseOfTheHeart.java index a668098a145..f703fa21696 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 87bcf90913c..7c9e60a17a9 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 b1ba4ead5e3..b3547c47d52 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 6232b4e97f7..eca577bfd75 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/DimensionalBreach.java b/Mage.Sets/src/mage/cards/d/DimensionalBreach.java index b66f823f33a..28131d4099e 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/Domestication.java b/Mage.Sets/src/mage/cards/d/Domestication.java index e0279047ed7..63f91fba200 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 d1c8a863f87..3a06feb1f12 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 16eb9055456..9ae855120e0 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/DreadCacodemon.java b/Mage.Sets/src/mage/cards/d/DreadCacodemon.java index 3a0f8eb6eba..9b8e1ad205d 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/DreamcallerSiren.java b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java index be11454a285..01d62c7422f 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 21023d9b297..c500aafa138 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 3ba0e22b0d2..ac0012c0df8 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 1084c128b8c..c1f81adb810 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 58c95ad22e3..5d5504b7e12 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 071348a81b7..c790d01d342 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 a04728d187b..394a7071b5c 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 43182df461f..41c6b6c225a 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 a5310fd5d94..19f8f9ce3a7 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/EmissaryOfTheSleepless.java b/Mage.Sets/src/mage/cards/e/EmissaryOfTheSleepless.java index 20be9866b36..7871e1a48c3 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 9fe3a744dda..01c303b520b 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 31b01940d44..70eb7db01e1 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 8154fc30247..fbf0ea92e35 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/ExcavationElephant.java b/Mage.Sets/src/mage/cards/e/ExcavationElephant.java index c38416ecf2b..189d10c4064 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 a59e0c6180d..67b8a557cc7 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 f3c1c2f580a..1322d056ffa 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 991f00d20a3..ac2641cda72 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 836e8f32117..bedb618045e 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 79140b0b23e..2d27389b7e0 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 6335cba663f..8a4959443ba 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 00ad372609d..95c31d5eebb 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 16a9193bab0..416a8c1c61b 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 2e223ba171a..d4f6bf40264 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 fce074f39fe..22d1800804d 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 fd4494c1fe4..6ba372102fa 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 10b9debc7e2..7bb07a7f2b2 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 05c8646d35f..bce1070dd7a 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 2fac24a57aa..e3a72038456 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 177799f745e..05ebb2bfe67 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 3f54c7c3645..5f806e65068 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 ec1acfbe3ed..dc9eb22f34f 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 b3a478cbca4..6674c0568f0 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 06b3ffee262..22303f5a720 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 2bcaece617e..37c6769aa90 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 3e851a3faa8..0f028bc29cb 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 57137ce67a6..cbe3566139b 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 9d881aab163..6c7473553d7 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 b37569a194d..53cc66b9922 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 4c3cc0ab09c..d1d7d42b1a9 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 5dfc6c23585..709aa2b5237 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 b7deec05374..c3cb70df3a2 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 0b76adf9448..a879a8ac588 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 0c106572618..2c7c677c62f 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 3f035187496..024fd71faa5 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/Gigantiform.java b/Mage.Sets/src/mage/cards/g/Gigantiform.java index 879a0513acc..35c5f5742da 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/GildedCerodon.java b/Mage.Sets/src/mage/cards/g/GildedCerodon.java index 396d5681b24..c2abfda6960 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 ee08affcbf3..20d3a59a600 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 1da7b04ccc1..e91b8115b69 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 a15f52778e7..494bd30195d 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 8bffdf7a7e2..1bf09ba7a5a 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 c844724d524..5a55da8c4ea 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 477eed7ee2d..339fa36f5b2 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 2174464a069..a51594e9a77 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 b90d25158ff..c3c80e67f22 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 eeeb8362ec0..d5093a40a92 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 c6252bf309a..b749f1410e0 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 7feb832ab03..7a1c568f8e0 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 b7260cbc97c..ccbc85ed309 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 7d4ab40a90a..26b44fac7b8 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 47f24ca9895..463a9b84094 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 981019c6b13..74c6fdb1107 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/HeartstabberMosquito.java b/Mage.Sets/src/mage/cards/h/HeartstabberMosquito.java index 10672d441bb..ac6ff037ae0 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/HeirOfTheWilds.java b/Mage.Sets/src/mage/cards/h/HeirOfTheWilds.java index 9e6bdb85379..83b21abffcb 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 a2075898c30..dc62fe13770 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 e2c4d45a9d9..14f5824c2b4 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 51402c13f7e..d39feaeecfc 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 b1dce2f6f53..d59c7c88943 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/HiddenAncients.java b/Mage.Sets/src/mage/cards/h/HiddenAncients.java index 492565d8c98..63b9ac7d8f1 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 3f247e3b50b..d65cb33853f 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 b573f2d32b6..c9f7febb40d 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 200e555d2a3..479d5ddc122 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 32cf8031e22..1917dc61179 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 4da45f95340..549cf2fdf27 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 68daf02699e..9094f3d0958 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 69832fe723b..256dc16650b 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 fe8f5c1730f..6634e00414a 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 910866a282c..8e51404854f 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 c8b871f78bf..b5eeb8a4ea1 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 bf5678c6bd8..887bd3203e9 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 ed249b386fb..339ef6426ad 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 702430ee20b..7bb5d623438 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 1573b2b8ab6..d5f9f2a1a33 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 879cb39d551..9da3929dfe7 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 44290f82062..41e0be205ec 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 16c2920e3fd..96cf4fa0e11 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 2757a7aa3c1..ca3610f9618 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 95f549ebd03..11b2f5b0a1e 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 ca5aa37e245..418cb142f60 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 595ae5bf80f..25b0162cc3e 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/InexorableBlob.java b/Mage.Sets/src/mage/cards/i/InexorableBlob.java index 1eeaa64850e..2d2a1d64eff 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 d253009030e..ed2b3254f70 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 e8ed7864c4f..acd165ce41e 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 152169b6da6..60232b0c503 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 1b5bc3b5c33..3f286f4a346 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 4a9b01705ad..c130b759ab2 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 36b0c37501a..aad52a0c1fa 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/j/JaggedPoppet.java b/Mage.Sets/src/mage/cards/j/JaggedPoppet.java index 28bc808cdbc..00203c6848b 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 182b5a8577a..d0c8ab237b8 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 4de6ec003a5..b9f4e55732a 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 e0ecedad84f..fcc5372b8c3 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 f7edee0196c..3a476915663 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 c691e2716a8..6ef30fb6b0b 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/KeldonBerserker.java b/Mage.Sets/src/mage/cards/k/KeldonBerserker.java index 734dfa41a4e..f2cf9c195ce 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 9999e6d4a32..191dcdc371d 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 34f60d6cebf..106b0024a52 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 a9332500362..a27b8dd727c 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/KitsuneMystic.java b/Mage.Sets/src/mage/cards/k/KitsuneMystic.java index 04856fb1d74..0685884b6d2 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 d778835c8c6..f352b996234 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 8069a3b5e50..9aaa09e8c4a 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 f2cefef40bb..23438bfc9ea 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 7facaf44c8a..dadaa25fd9b 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 6eb4d18b613..b104e6d0e4d 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 599ea6fd112..001dfde7840 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 44795b19bb7..693c957fee0 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 6164caecd6a..9da97bde55e 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 ae106b0661e..72afe531b15 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 b499988e5ea..7ba04f05f4a 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 418e49adf94..562c6264002 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 03136866af7..13d414e9c51 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 7864aea44fb..53b0f8b4b66 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/KytheonHeroOfAkros.java b/Mage.Sets/src/mage/cards/k/KytheonHeroOfAkros.java index 655fa05c442..e08d2bb278b 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 7a8ba666fdf..3176c94b64c 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 663c906d0ad..e24de214799 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 01c6c21ec7f..81f15b01a41 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 31941267add..b811c781ff1 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 49bf924422e..20fcc00fcbf 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 a193b62dffe..d25dd644331 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 4c27a104f56..ca664a65f48 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 72dd1f47471..79d6e154bdf 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/LeoninVanguard.java b/Mage.Sets/src/mage/cards/l/LeoninVanguard.java index 3d465d6ef16..fe1bd4452b9 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 c6bb0adc1f9..e963de31dc7 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 4f3d1a17472..e78a26f7086 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 e11a5d929f9..b98459a50ac 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 c28203c2c1d..2079804bdce 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 9dda0d19d61..df0a4ce70ad 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 be4b2ad6745..dd364058d1f 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 8832be2b6ae..53b08ece1dd 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/LumengridDrake.java b/Mage.Sets/src/mage/cards/l/LumengridDrake.java index 6b32df10c53..6cf66783fb1 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 ebc9d328dae..b2710993d13 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 7b1a3c5769d..f9206d7ec02 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 b7c5cccbfbc..2c177e369c8 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 01c53a06ae2..fcc059f515f 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 efaab07fd19..334841b2b5d 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 ce55d1822d6..d97181341d2 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 4daa43e29db..97f12cf25a0 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 72b98260c19..2be60fad5a5 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 50c79dbdb94..7c01254d9f4 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 395a90175e1..bfbafab3142 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 d654cea80fb..c5730481146 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 ac98efd9fb9..39c3a3503da 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 47baa6141a0..beeb2fc7838 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/MausoleumHarpy.java b/Mage.Sets/src/mage/cards/m/MausoleumHarpy.java index 54ddce301a5..45ab9cb6320 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 53b6eb0de2b..4800d7c2917 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 718162e0cf5..e1a5597fe29 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/MightMakesRight.java b/Mage.Sets/src/mage/cards/m/MightMakesRight.java index cc8c4333da3..43ffe00f406 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 d5816fef2ad..1bcd1ff2388 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/MirrorSigilSergeant.java b/Mage.Sets/src/mage/cards/m/MirrorSigilSergeant.java index bfa62f4de33..f2a91224b48 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/MoldShambler.java b/Mage.Sets/src/mage/cards/m/MoldShambler.java index 10ff8369321..5c8bd2a2b07 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/MonasterySiege.java b/Mage.Sets/src/mage/cards/m/MonasterySiege.java index 089a1583846..7b329972201 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 1af6653b463..aadaae2d692 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 3d35815cff8..8ec19df1393 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 442c6432aab..e2cf3555330 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 d78243f0f15..fba035c3c19 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 d055dffa601..4869fd235d9 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 0889969a697..5a1fe7ec50f 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/MyrServitor.java b/Mage.Sets/src/mage/cards/m/MyrServitor.java index 070ef591750..d63f1db4250 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/n/NantukoShaman.java b/Mage.Sets/src/mage/cards/n/NantukoShaman.java index 5937fe9fca6..b17eaccb4bd 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 c12ff398c74..d7ce59cf37d 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 ffda771b809..d4563d5d298 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 eda3130e3de..e47c72f19c0 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 f18f891f83c..444249762d4 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 c217d6d1056..fe12c03723a 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 2f093a48b95..2ecd67ab9a7 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 f4ee1ac8563..3cb5b250f23 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 f6e60bc88aa..392754dc55e 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/NightfallPredator.java b/Mage.Sets/src/mage/cards/n/NightfallPredator.java index a2d8dd9a1d8..f93f9232ad9 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 d288bad4016..e04904264a2 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 73cfcc2508a..de40e72459d 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 34c9c6718b2..4b4fd3b1a4c 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 f9c10694952..c117f727616 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 b5ec01bbeec..4610ca8f5c8 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 b9c83646ca2..5e45a1e6bef 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 d758ecf8281..c73958f38d0 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 673d0c3c631..2edac2bd3e6 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 611d644509e..3b7cafa2ac4 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 6280e6c952c..ff9464e0387 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 bca276e9289..d01b6c79500 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 71c09b12977..41e8f0a1f80 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 cd38ed0e7c7..ad80f47b587 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 eb7d2c42337..7af1f098b0d 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 258002501a4..2ef3d5f02f7 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 f3c7b6d9fa3..4a41c8e08d7 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 2984ff3dcd1..3bcde4f46d3 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 80208b1d8c6..d54fec1de78 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 f2b158cd949..833b811865a 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/Ornitharch.java b/Mage.Sets/src/mage/cards/o/Ornitharch.java index edee0495a92..674177dab3c 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 40c192a16ca..77c550a5b9d 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 ee4f321b182..5c4825f137a 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 4ed9f24c3d3..b22a6b76e31 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 7e39368e178..97624a9c482 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 c6c0b36d281..3b21dd98e74 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 03002ad2fb5..992255a6fa9 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/PaupersCage.java b/Mage.Sets/src/mage/cards/p/PaupersCage.java index d0c92d16659..961a57eecbd 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 e584a3e20eb..1b9d417a3a7 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 32ba55f44c1..e1bc4cafc83 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/PharagaxGiant.java b/Mage.Sets/src/mage/cards/p/PharagaxGiant.java index 08a362cff76..c90976a6ea3 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 d758888bc52..ce51141cf77 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 fadfd1060aa..f627cf2be7e 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/PortalMage.java b/Mage.Sets/src/mage/cards/p/PortalMage.java index 8a162d3d56b..69e75544b12 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 319e341c8cd..fecfdb308ce 100644 --- a/Mage.Sets/src/mage/cards/p/Portcullis.java +++ b/Mage.Sets/src/mage/cards/p/Portcullis.java @@ -7,7 +7,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; @@ -37,9 +37,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 25b6d07f201..df36219167f 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/ProgenitorMimic.java b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java index b3a181e230c..6b9c5a018a5 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; @@ -46,7 +46,7 @@ public final class ProgenitorMimic extends CardImpl { 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.") diff --git a/Mage.Sets/src/mage/cards/p/Pyrohemia.java b/Mage.Sets/src/mage/cards/p/Pyrohemia.java index 0cb68a49bad..e0305312256 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 7c02c754d5f..6b38efbc83f 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/r/RaidersWake.java b/Mage.Sets/src/mage/cards/r/RaidersWake.java index d183ddeb648..3fafbd93f9f 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 45a2ff888fd..279ef34daef 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/RampagingWerewolf.java b/Mage.Sets/src/mage/cards/r/RampagingWerewolf.java index 5b055cafe61..8820712bdb8 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 c22f6e0af6c..36a1b7cc433 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 3819a5c581e..2feb9951b62 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 c822ffb01d3..0e83f3b7fcd 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 e471eebc414..04e5cca06c5 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 82bf120cbe7..01995437b14 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/RegalBloodlord.java b/Mage.Sets/src/mage/cards/r/RegalBloodlord.java index 8ef086d11f9..5f12d0ffc6b 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 591bd73cbef..12dd708519e 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 3f10b6aeede..fa048d0f34e 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 4a0c0d8bf7b..b294ef6821a 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 da05e35ea03..6c412dfcdb4 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 5ea0c1d82eb..eb2ca73672b 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 136ad97e5c2..bdd47cd8c06 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 c62f3cf1f9f..50b1fd07e85 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 06b3b703ec5..b089d90e15b 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 192863a23e1..b22c0262b8d 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 01ed42e9a00..e63365df303 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 f18f48f0561..3b988e6c7e7 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 7ac3d446faf..c783b1ca999 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 907388c4f73..9f9dc5a2776 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/RuinRaider.java b/Mage.Sets/src/mage/cards/r/RuinRaider.java index 0fa94bb55a6..60ccfd72691 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/RushingTideZubera.java b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java index 82e5c657797..f80c8015a46 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/s/SabertoothOutrider.java b/Mage.Sets/src/mage/cards/s/SabertoothOutrider.java index 0b6dc15602f..a11e4e7b266 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 898fafa3726..e2d5f375dd0 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/SandStrangler.java b/Mage.Sets/src/mage/cards/s/SandStrangler.java index 345e8df4a5f..94f5abff920 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/Sarcomancy.java b/Mage.Sets/src/mage/cards/s/Sarcomancy.java index 0a90843240f..92003a9241b 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/SaruliGatekeepers.java b/Mage.Sets/src/mage/cards/s/SaruliGatekeepers.java index acfe61d4972..0d7f4450b61 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 736671801e9..a0c259a67b0 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 e1ccd9d088c..b009f6aa4b2 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 3c436550e7c..459b6d7825d 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 3001ef6568a..35d37c2cee9 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 74ffb0a4a3b..87ba993c597 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 ee2e29ab12d..ab0fe7c32f8 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 5f8e08f58c8..544612e3fd6 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 dd82b15e413..8fdc60199d7 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 cf9d71ff692..5ea609409f2 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 2f67b7eeb98..c74b3dd096f 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 3855bb3394c..5cec078a867 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 dec16b639ba..3df0a4f7f86 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/ShipwreckLooter.java b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java index 17765b37768..03ae7cef4b1 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 1015ea205b6..ca39be13120 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 1c82c152455..3ff22606e00 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 f1e30ff4e4f..4cc23ef06a9 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 ed1f7861a63..7c3527181ca 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 21a00c86465..1ab6e27212c 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 53e4b55e3ee..c69fa38694a 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 c16b7b9a53c..21585426038 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 77c8747654c..496428e76fb 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 142899a0de3..1288738d322 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 3275d6c93e8..ec80b693b90 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/SilkweaverElite.java b/Mage.Sets/src/mage/cards/s/SilkweaverElite.java index 880d19a8266..916511fc096 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 f45ff2d406e..ec7a60aae03 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 6b3710f7890..d2f8485fec2 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 d348657ec74..322dc5e1d97 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 978fac9b6b4..36da9574376 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 1913a8220c5..a45c7569763 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 3baf0f1b9bc..e115e43cddf 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 db64255463a..9ccbb83b4eb 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 0bc20aed3ca..74a76a635f2 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 939bf2013ac..6aeea2a8ba0 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/SkylineDespot.java b/Mage.Sets/src/mage/cards/s/SkylineDespot.java index 3dcb09c97b7..6746688b0a0 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 53ef0de512d..b68d8d3a68e 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 d3c8095860a..7a2cbd69482 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 fea07807db5..e607e3faf67 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 611eee6e94f..be18600eaf2 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 a11ba94adc0..6999bdcd146 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 75a4d4f5b30..ba5ae0e00c8 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 fd0868745ed..917b5e1e716 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 676d646661c..db981fbebb8 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 9c1317a1706..136789f012e 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 99061732faa..f588f7091cd 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/StalkingVampire.java b/Mage.Sets/src/mage/cards/s/StalkingVampire.java index 7c6fbd13ecd..3c0c39ef049 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 5d336566cf1..8f9b22eb30a 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 9d373df45aa..a56b8a1700f 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 49fd6e28d0d..6cc807ea45e 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 1bfd99ad2ff..cee0f71bf46 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 d59a4bfbe5c..ee368746844 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 d6cd125a510..c3b029d4266 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 0edc06c35f4..41e3e483241 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 45e6b24d3f1..39f93230343 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/SunDroplet.java b/Mage.Sets/src/mage/cards/s/SunDroplet.java index 3e8be1a94a8..6ff432b37d1 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 137753dc7af..8c296177d31 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 b336d901301..2817418444f 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 ae52f0a59ba..cb76066914c 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 60022980f38..dfed6f8d655 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/t/TaigamOjutaiMaster.java b/Mage.Sets/src/mage/cards/t/TaigamOjutaiMaster.java index 472381ca9d0..2ea1bd128ee 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 edfd053a6a6..9f907999b4e 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/TerritorialAllosaurus.java b/Mage.Sets/src/mage/cards/t/TerritorialAllosaurus.java index e503c10e77d..b13f74ec870 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 be174fcc6a2..0b2b8cbe9d4 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 0c2782dcacb..c26c75408e7 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 2a1a11f8f20..b87140dc64f 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/ThicketElemental.java b/Mage.Sets/src/mage/cards/t/ThicketElemental.java index 2fc0bca6802..e5ee92f1eed 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 613b3f38f89..e5da2e18739 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 b359d9605ac..97cc50c5769 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 cf83652e09a..b9a933395e4 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/Thumbscrews.java b/Mage.Sets/src/mage/cards/t/Thumbscrews.java index 21d1d60b765..0c69be1eb06 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 e0ae92e287c..d37b3f752db 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 ab097e840fc..6eb9bd53520 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 37f95210587..367079b3c5a 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 cc51136e375..b90ac0f1af4 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 5f20d2bfaef..bdf734ed072 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 cf20bfb6d8f..81e2a7a1453 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 7dcbab2def4..09bbde4386c 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 fb6c84046d1..3f6c7634b6f 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 528abf642e9..ff87e8bff20 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 d077bcc239d..daf722048d6 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 30e14a429b0..1b0ed80609f 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 40ec42bdb15..2dbaaaac84f 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 012565abd0c..863c0c2b992 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 f33df57ab9c..b16a9e88bf7 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 282df242082..720b1afb66f 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 a2a0943ce04..cced90fe5d1 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/TyrantOfValakut.java b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java index 203d14f642c..9297159824f 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 52c54ca8115..7dcfd6782f1 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 1d3aeef5143..88ef64e31b8 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 3e7f37aef0c..f106d6b44cf 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 f1e15e4d822..d7c335f2f99 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 383c9309ba3..dd607067544 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 c6a9cc5f790..df5e6bf52e1 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/UnquenchableThirst.java b/Mage.Sets/src/mage/cards/u/UnquenchableThirst.java index 28b2044fe92..ad473951440 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/UrborgEmissary.java b/Mage.Sets/src/mage/cards/u/UrborgEmissary.java index 8673b2edef9..20873c51501 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 bd1df9da677..45c70884470 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 d3116ace195..49f44e1623e 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 4b43ff6b8b6..92e69ef6516 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 5f810d301ef..33099a79cdc 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 0579f6049a4..2ced42e40a8 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/VildinPackAlpha.java b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java index 912ff5ee593..97834e21513 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 d8cf6d29711..2ab6e27cdec 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 5a4626e6162..ef0a93f8941 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 1f33d977ee7..a320c5a6f3b 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/VoiceOfResurgence.java b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java index ab0e3974141..deea39da29e 100644 --- a/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java +++ b/Mage.Sets/src/mage/cards/v/VoiceOfResurgence.java @@ -1,16 +1,12 @@ package mage.cards.v; -import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -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.effects.common.DrawCardSourceControllerEffect; import mage.abilities.meta.OrTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -18,12 +14,9 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; import mage.game.permanent.token.VoiceOfResurgenceToken; -import mage.game.stack.Spell; + +import java.util.UUID; /** * diff --git a/Mage.Sets/src/mage/cards/v/VoyagerDrake.java b/Mage.Sets/src/mage/cards/v/VoyagerDrake.java index 381911a0f8f..3db5967e0f1 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 8d9b98d775d..f57955f6c7d 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 0ed65c61edf..095f2420b0b 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 f16edf13a39..118d4e572b1 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 3c2ae20f245..373afc8dad5 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 f2371355bde..9db272b67cb 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 88beda16b95..f11ba3ef58a 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 d5e0716bf48..ee3002f48ba 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 6110c016574..775e1a02fd3 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 dbb43f738bf..b7df1697b46 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 e72eb481dce..51eef0567f0 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 2e5a230f1f8..e7ff09c4f70 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 6e51f77ef9b..ee5d269b22a 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 578ce917ae6..2871ec90263 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 54f5ceccbac..04d872751dd 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 544ed387c52..2e275880e65 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 5299462f48b..b9880a923ae 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 f50cc4a4e3f..00b5fc45ef7 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/WretchedCamel.java b/Mage.Sets/src/mage/cards/w/WretchedCamel.java index 1b309f28f9d..f4218eff052 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 b2f3a787253..e6dad8e19ae 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 c0e0f672c13..700a1e7d460 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 d7804a5a6f5..f560e66f98c 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/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 efb2bffd4d9..9e07b935227 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/decorator/ConditionalInterveningIfTriggeredAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalInterveningIfTriggeredAbility.java new file mode 100644 index 00000000000..44a96ae3867 --- /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 8c4f60a0474..b77c66df9db 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,13 +46,6 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl { this.abilityText = triggered.abilityText; } - @Override - public boolean checkInterveningIfClause(Game game) { - System.out.println("Source ID: "+this.getControllerId()); - System.out.println("Active player ID: "+game.getActivePlayerId()); - return condition.apply(game, this); - } - @Override public ConditionalTriggeredAbility copy() { return new ConditionalTriggeredAbility(this); @@ -67,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/keyword/EvokeAbility.java b/Mage/src/main/java/mage/abilities/keyword/EvokeAbility.java index 2467d1246e5..ab0f8004b1e 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 46e22d57fa8..6227e4c19fd 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 159e761634e..7c4d3afdc43 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 index 053dccf41a7..ebd11af1fb6 100644 --- a/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/meta/OrTriggeredAbility.java @@ -9,18 +9,21 @@ 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. + * 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); @@ -30,6 +33,7 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { super(zone, effect, optional); this.triggeredAbilities = abilities; this.ruleTrigger = ruleTrigger; + this.triggeringAbilities = new ArrayList<>(); for (TriggeredAbility ability : triggeredAbilities) { //Remove useless data ability.getEffects().clear(); @@ -42,6 +46,7 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { 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; } @@ -59,14 +64,17 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - for (TriggeredAbility ability : triggeredAbilities) { - if (ability.checkEventType(event, game) && ability.checkTrigger(event, game)){ - System.out.println("Triggered from "+ability.getRule()); - return true; + 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()); + System.out.println("Checked " + ability.getRule()); } - return false; + return toRet; } @Override @@ -125,24 +133,4 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl { ability.setSourceObject(sourceObject, game); } } - - @Override - public boolean checkInterveningIfClause(Game game) { - for (TriggeredAbility ability : triggeredAbilities) { - if (!ability.checkInterveningIfClause(game)){ - return false; - } - } - return true; - } - - @Override - public boolean checkIfClause(Game game) { - for (TriggeredAbility ability : triggeredAbilities) { - if (!ability.checkIfClause(game)){ - return false; - } - } - return true; - } } From 2b7c337736245b1acb50c0fdf855bc1e6cbcb80e Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 24 Jun 2018 20:46:53 -0400 Subject: [PATCH 18/77] Update Mystic Barrier --- Mage.Sets/src/mage/cards/m/MysticBarrier.java | 100 +++--------------- 1 file changed, 12 insertions(+), 88 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MysticBarrier.java b/Mage.Sets/src/mage/cards/m/MysticBarrier.java index fe315e44081..a3f34a5f7c2 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) { From e3d2ed908721e428cbcb715d9d4be0b99512ca36 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Mon, 25 Jun 2018 23:02:29 -0400 Subject: [PATCH 19/77] Update Boseiju to work the same way as Cavern of Souls --- .../mage/cards/b/BoseijuWhoSheltersAll.java | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java index 4f89ff76b22..f29b1dee7e2 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.getCard(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 From e2da104d6d2e808d73096a54da41c6f1626d1027 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Wed, 27 Jun 2018 22:02:53 -0400 Subject: [PATCH 20/77] Implement Keeper of the Beasts --- .../src/mage/cards/k/KeeperOfTheBeasts.java | 111 ++++++++++++++++++ Mage.Sets/src/mage/sets/Exodus.java | 3 +- .../game/permanent/token/BeastToken4.java | 45 +++++++ 3 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/k/KeeperOfTheBeasts.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/BeastToken4.java 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 00000000000..cc4ccc8fcdd --- /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/sets/Exodus.java b/Mage.Sets/src/mage/sets/Exodus.java index 03228018197..c80118de2c2 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/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 00000000000..d6b579b4514 --- /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); + } +} From 174588e34311b8d9d0c47873972d74a31dc6845e Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Fri, 29 Jun 2018 20:47:11 -0400 Subject: [PATCH 21/77] Implement Aetherplasm --- Mage.Sets/src/mage/cards/a/Aetherplasm.java | 98 +++++++++++++++++++ Mage.Sets/src/mage/sets/Guildpact.java | 1 + .../effects/common/DoIfCostPaid.java | 1 + 3 files changed, 100 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/Aetherplasm.java 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 00000000000..6864f3c98fd --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/Aetherplasm.java @@ -0,0 +1,98 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObjectReference; +import mage.abilities.Ability; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.Card; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +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()); + Permanent blockedCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + 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) { + 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; + } + } + } + } + } + return false; + } + + @Override + public AetherplasmEffect copy() { + return new AetherplasmEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Guildpact.java b/Mage.Sets/src/mage/sets/Guildpact.java index 5eadbe6723e..0d4e7a3ec7d 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)); 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 e0882ae4466..a68dc8e27f4 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") From ad0b4659bb774080422f4f52fca7fcc15e59cf18 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 30 Jun 2018 13:54:39 -0400 Subject: [PATCH 22/77] Implement Booby Trap --- Mage.Sets/src/mage/cards/b/BoobyTrap.java | 97 +++++++++++++++++++++++ Mage.Sets/src/mage/sets/NinthEdition.java | 1 + Mage.Sets/src/mage/sets/Tempest.java | 1 + 3 files changed, 99 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BoobyTrap.java 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 00000000000..b14cc765dcd --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BoobyTrap.java @@ -0,0 +1,97 @@ +package mage.cards.b; + +import java.util.UUID; + +import mage.abilities.TriggeredAbility; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.*; +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.Target; +import mage.target.TargetImpl; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @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), new SacrificeSourceCost()), 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(sourceId); + if (event.getPlayerId() == null || game.getState() == null || controller == null){ + return false; + } + if (event.getPlayerId().equals(game.getState().getValue(getSourceId()+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() + 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); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/NinthEdition.java b/Mage.Sets/src/mage/sets/NinthEdition.java index eac43b9eba0..2996fb9c077 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/Tempest.java b/Mage.Sets/src/mage/sets/Tempest.java index bcb715359dd..26f984eaf39 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", 267, 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)); From a7cbd54f6e079539e8ec53f7e65dbe0221233fb6 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 30 Jun 2018 16:13:15 -0400 Subject: [PATCH 23/77] Fix Booby Trap --- Mage.Sets/src/mage/cards/b/BoobyTrap.java | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BoobyTrap.java b/Mage.Sets/src/mage/cards/b/BoobyTrap.java index b14cc765dcd..ed7c8d844b3 100644 --- a/Mage.Sets/src/mage/cards/b/BoobyTrap.java +++ b/Mage.Sets/src/mage/cards/b/BoobyTrap.java @@ -1,15 +1,12 @@ package mage.cards.b; -import java.util.UUID; - -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.AsEntersBattlefieldAbility; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.common.SacrificeSourceCost; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.*; +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; @@ -20,20 +17,17 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.target.Target; -import mage.target.TargetImpl; -import mage.target.common.TargetOpponent; 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)); @@ -58,7 +52,7 @@ public final class BoobyTrap extends CardImpl { class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl { public BoobyTrapTriggeredAbility() { - super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(10), new SacrificeSourceCost()), false); + super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(10, true, "that player"), new SacrificeSourceCost(), "", false), false); } public BoobyTrapTriggeredAbility(BoobyTrapTriggeredAbility ability) { @@ -72,15 +66,15 @@ class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - Player controller = game.getPlayer(sourceId); - if (event.getPlayerId() == null || game.getState() == null || controller == null){ + Player controller = game.getPlayer(getControllerId()); + if (event.getPlayerId() == null || game.getState() == null || controller == null) { return false; } - if (event.getPlayerId().equals(game.getState().getValue(getSourceId()+ChooseOpponentEffect.VALUE_KEY))){ + if (event.getPlayerId().equals(game.getState().getValue(getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY))) { Card drawn = game.getCard(event.getTargetId()); - if (drawn != null){ + if (drawn != null) { controller.revealCards(this, new CardsImpl(drawn), game); - if(drawn.getName().equals(game.getState().getValue(getSourceId() + ChooseACardNameEffect.INFO_KEY))){ + 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; @@ -94,4 +88,10 @@ class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl { 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 From 5e221b9a3375f44d4fc253955fe453b4c3c0d030 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 09:52:52 -0400 Subject: [PATCH 24/77] Implement Muse Vessel --- Mage.Sets/src/mage/cards/m/MuseVessel.java | 184 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + 2 files changed, 185 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MuseVessel.java 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 00000000000..ff2b48c7f3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MuseVessel.java @@ -0,0 +1,184 @@ +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.getId())); + 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); + } + + 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(UUID cardId) { + super(1, 1, new FilterCard("card exiled with {this}"), 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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7fafc036eca..4b9ffecd337 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -105,6 +105,7 @@ 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("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)); From 1575d8282c8973dc1557fece9531f9b619e6362b Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 10:58:25 -0400 Subject: [PATCH 25/77] Implement Nightcreep --- Mage.Sets/src/mage/cards/n/Nightcreep.java | 96 +++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + .../continuous/BecomesColorAllEffect.java | 154 ++++++++++++++++++ 3 files changed, 251 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/n/Nightcreep.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorAllEffect.java 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 00000000000..39c62281fc2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/Nightcreep.java @@ -0,0 +1,96 @@ +package mage.cards.n; + +import java.util.UUID; + +import mage.MageObject; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.AddCardSubtypeAllEffect; +import mage.abilities.effects.common.continuous.BecomesColorAllEffect; +import mage.abilities.effects.common.continuous.BecomesSubtypeAllEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.choices.ChoiceColor; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.players.Player; + +/** + * + * @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 BecomesColorAllEffect(ObjectColor.BLACK, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, "Until end of turn, all creatures become black and")); + this.getSpellAbility().addEffect(new NightcreepEffect()); + } + + public Nightcreep(final Nightcreep card) { + super(card); + } + + @Override + public Nightcreep copy() { + return new Nightcreep(this); + } +} + +class NightcreepEffect extends ContinuousEffectImpl { + + public NightcreepEffect() { + super(Duration.EndOfTurn, Outcome.Benefit); + } + + public NightcreepEffect(NightcreepEffect effect) { + super(effect); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + for (Permanent land : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), game)) { + switch (layer) { + case TypeChangingEffects_4: + // 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects + // So the ability removing has to be done before Layer 6 + land.removeAllAbilities(source.getSourceId(), game); + land.getSubtype(game).removeAll(SubType.getLandTypes(false)); + land.getSubtype(game).add(SubType.SWAMP); + break; + case AbilityAddingRemovingEffects_6: + land.addAbility(new BlackManaAbility(), source.getSourceId(), game); + break; + } + } + return true; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.AbilityAddingRemovingEffects_6 || layer == Layer.TypeChangingEffects_4; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public NightcreepEffect copy() { + return new NightcreepEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7fafc036eca..1af84ceeb21 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -105,6 +105,7 @@ 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("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)); 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 00000000000..f5cefeefbf5 --- /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(); + } +} From 699643b7db69e59ef261560848fb44c7c48fe3fe Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 14:41:07 -0400 Subject: [PATCH 26/77] Add text --- Mage.Sets/src/mage/cards/m/MuseVessel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/m/MuseVessel.java b/Mage.Sets/src/mage/cards/m/MuseVessel.java index ff2b48c7f3e..8744823ebc6 100644 --- a/Mage.Sets/src/mage/cards/m/MuseVessel.java +++ b/Mage.Sets/src/mage/cards/m/MuseVessel.java @@ -44,7 +44,7 @@ public final class MuseVessel extends CardImpl { // {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.getId())); + playAbility.addTarget(new TargetCardInMuseVesselExile()); this.addAbility(playAbility); } @@ -99,6 +99,7 @@ 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) { @@ -125,8 +126,8 @@ class MuseVesselMayPlayExiledEffect extends AsThoughEffectImpl { class TargetCardInMuseVesselExile extends TargetCardInExile { - public TargetCardInMuseVesselExile(UUID cardId) { - super(1, 1, new FilterCard("card exiled with {this}"), null); + public TargetCardInMuseVesselExile() { + super(1, 1, new FilterCard("card exiled with Muse Vessel"), null); } public TargetCardInMuseVesselExile(final TargetCardInMuseVesselExile target) { From 2d051cd0d6a84c89ec71167c10aab98c28557774 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 15:23:21 -0400 Subject: [PATCH 27/77] Fix text --- Mage.Sets/src/mage/cards/n/Nightcreep.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/n/Nightcreep.java b/Mage.Sets/src/mage/cards/n/Nightcreep.java index 39c62281fc2..cce74b7f652 100644 --- a/Mage.Sets/src/mage/cards/n/Nightcreep.java +++ b/Mage.Sets/src/mage/cards/n/Nightcreep.java @@ -36,7 +36,7 @@ public final class Nightcreep extends CardImpl { // Until end of turn, all creatures become black and all lands become Swamps. - this.getSpellAbility().addEffect(new BecomesColorAllEffect(ObjectColor.BLACK, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, "Until end of turn, all creatures become black and")); + this.getSpellAbility().addEffect(new BecomesColorAllEffect(ObjectColor.BLACK, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, "Until end of turn, all creatures become black and all lands become Swamps")); this.getSpellAbility().addEffect(new NightcreepEffect()); } @@ -54,6 +54,7 @@ class NightcreepEffect extends ContinuousEffectImpl { public NightcreepEffect() { super(Duration.EndOfTurn, Outcome.Benefit); + this.staticText = ""; } public NightcreepEffect(NightcreepEffect effect) { From 147a3cf91dfeee723306cd9a0d496e236595c5c8 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 15:39:19 -0400 Subject: [PATCH 28/77] Implement Rakdos Augermage --- .../src/mage/cards/r/RakdosAugermage.java | 95 +++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + .../RevealHandSourceControllerEffect.java | 42 ++++++++ 3 files changed, 138 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RakdosAugermage.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/RevealHandSourceControllerEffect.java 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 00000000000..e747eeee714 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RakdosAugermage.java @@ -0,0 +1,95 @@ +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 RevealHandSourceControllerEffect(), new TapSourceCost()); + ability.addEffect(new RakdosAugermageEffect()); + ability.addEffect(new RevealHandTargetEffect()); + ability.addEffect(new DiscardCardYouChooseTargetEffect()); + ability.addTarget(new TargetOpponent()); + } + + 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 = "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", 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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7fafc036eca..c3a9e950a08 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -131,6 +131,7 @@ 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)); 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 00000000000..c3e5e59e888 --- /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); + } +} From 7b7686f7e0b2fd53bee4f492ac03f1a3d5b8008b Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 16:54:19 -0400 Subject: [PATCH 29/77] Don't reveal twice --- Mage.Sets/src/mage/cards/r/RakdosAugermage.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/r/RakdosAugermage.java b/Mage.Sets/src/mage/cards/r/RakdosAugermage.java index e747eeee714..422d4c32918 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosAugermage.java +++ b/Mage.Sets/src/mage/cards/r/RakdosAugermage.java @@ -40,11 +40,10 @@ public final class RakdosAugermage extends CardImpl { 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 RevealHandSourceControllerEffect(), new TapSourceCost()); - ability.addEffect(new RakdosAugermageEffect()); - ability.addEffect(new RevealHandTargetEffect()); + 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) { @@ -61,7 +60,7 @@ class RakdosAugermageEffect extends OneShotEffect { public RakdosAugermageEffect() { super(Outcome.Discard); - staticText = "discard a card of target opponent’s choice"; + staticText = "reveal your hand and discard a card of target opponent’s choice"; } public RakdosAugermageEffect(final RakdosAugermageEffect effect) { @@ -76,7 +75,7 @@ class RakdosAugermageEffect extends OneShotEffect { if (player != null && controller != null) { Cards revealedCards = new CardsImpl(); revealedCards.addAll(controller.getHand()); - player.revealCards(sourceCard != null ? sourceCard.getIdName() + " (" + sourceCard.getZoneChangeCounter(game) + ')' : "Discard", revealedCards, game); + 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); From f2e5152eb591160dd3859fc6be94c2f0e882bea4 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 17:53:42 -0400 Subject: [PATCH 30/77] Implement Rakdos Riteknife --- .../src/mage/cards/r/RakdosRiteknife.java | 103 ++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + 2 files changed, 104 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RakdosRiteknife.java 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 00000000000..5af3ca5d8db --- /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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7a258b0b161..9f3731ddf21 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -139,6 +139,7 @@ public final class Dissension extends ExpansionSet { 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)); From 239222b397ce2155cf893b0b62d9ae9e67f0449e Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 18:24:59 -0400 Subject: [PATCH 31/77] Implement Street Savvy --- Mage.Sets/src/mage/cards/s/StreetSavvy.java | 80 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + 2 files changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/StreetSavvy.java 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 00000000000..f7d89d9b120 --- /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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7a258b0b161..66d8b0ef0d4 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -173,6 +173,7 @@ 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("Taste for Mayhem", 75, Rarity.COMMON, mage.cards.t.TasteForMayhem.class)); cards.add(new SetCardInfo("Thrive", 98, Rarity.COMMON, mage.cards.t.Thrive.class)); From 3d79890e9a7c44442467daac28415dcab5dcadd1 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 19:03:47 -0400 Subject: [PATCH 32/77] Implement Swift Silence --- Mage.Sets/src/mage/cards/s/SwiftSilence.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + .../main/java/mage/game/stack/SpellStack.java | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/s/SwiftSilence.java 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 00000000000..d0619b05d60 --- /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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7a258b0b161..2eafa05075d 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -174,6 +174,7 @@ public final class Dissension extends ExpansionSet { 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("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)); diff --git a/Mage/src/main/java/mage/game/stack/SpellStack.java b/Mage/src/main/java/mage/game/stack/SpellStack.java index 71ad426f8bb..8b697ba5345 100644 --- a/Mage/src/main/java/mage/game/stack/SpellStack.java +++ b/Mage/src/main/java/mage/game/stack/SpellStack.java @@ -89,10 +89,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; } From 3685cb289931aa3656698517e117fae32f4d1f9d Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 19:31:28 -0400 Subject: [PATCH 33/77] Implement Vigean Intuition --- .../src/mage/cards/v/VigeanIntuition.java | 124 ++++++++++++++++++ Mage.Sets/src/mage/sets/Dissension.java | 1 + 2 files changed, 125 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VigeanIntuition.java 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 00000000000..29f91842a77 --- /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/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 7a258b0b161..f4f885d4fc2 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -189,6 +189,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)); From 8684eb2b3ce3db90c5a3d55f9df0c9e36e02d752 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 1 Jul 2018 22:05:43 -0400 Subject: [PATCH 34/77] Implement Cover of Winter --- Mage.Sets/src/mage/cards/c/CoverOfWinter.java | 102 ++++++++++++++++++ Mage.Sets/src/mage/sets/Coldsnap.java | 1 + 2 files changed, 103 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CoverOfWinter.java 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 00000000000..5497f041bb2 --- /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/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 6fbb6b7f9d4..a0f628dcc9e 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -52,6 +52,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)); From 4bfc132f29c0cab2c8e77a3182ae9c0b9adc1940 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Wed, 4 Jul 2018 10:25:49 -0400 Subject: [PATCH 35/77] Implement Balduvian Fallen --- .../src/mage/cards/b/BalduvianFallen.java | 89 +++++++++++++++++++ Mage.Sets/src/mage/sets/Coldsnap.java | 1 + .../keyword/CumulativeUpkeepAbility.java | 3 +- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/b/BalduvianFallen.java 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 00000000000..6191b9cf44a --- /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/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 6fbb6b7f9d4..4e2990f22aa 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)); diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index f7622a09815..546de34cf26 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; } } From 258384fae724718e9398d68ccdd778383236213b Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Wed, 4 Jul 2018 11:31:03 -0400 Subject: [PATCH 36/77] Implement Shape of the Wiitigo --- .../src/mage/cards/s/ShapeOfTheWiitigo.java | 133 ++++++++++++++++++ Mage.Sets/src/mage/sets/Coldsnap.java | 1 + .../counter/RemoveCountersAttachedEffect.java | 91 ++++++++++++ .../common/AttackedLastTurnWatcher.java | 6 +- 4 files changed, 227 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/counter/RemoveCountersAttachedEffect.java 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 00000000000..3e33b199b6b --- /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/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 6fbb6b7f9d4..e2e875c8944 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -141,6 +141,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/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 00000000000..775ca85982c --- /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/watchers/common/AttackedLastTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/AttackedLastTurnWatcher.java index 78eb6c67180..b8ca0dd44a4 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); } } From 836ae4ca276a1b61f477fc07b697564a30505ea5 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Thu, 5 Jul 2018 21:19:20 -0400 Subject: [PATCH 37/77] Implement Aether Web --- Mage.Sets/src/mage/cards/a/AetherWeb.java | 88 +++++++++++++++++++++++ Mage.Sets/src/mage/sets/TimeSpiral.java | 1 + 2 files changed, 89 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AetherWeb.java 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 00000000000..339ba6c037c --- /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/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index dd82083812d..9d1bc950745 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("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class)); cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class)); cards.add(new SetCardInfo("Ancestral Vision", 48, Rarity.RARE, mage.cards.a.AncestralVision.class)); From f73e957036d78c9d9513a8f227453e0baf1e93a2 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Thu, 5 Jul 2018 21:58:20 -0400 Subject: [PATCH 38/77] Implement Cyclopean Giant --- .../src/mage/cards/c/CyclopeanGiant.java | 44 +++++++++++++++++++ Mage.Sets/src/mage/sets/TimeSpiral.java | 1 + 2 files changed, 45 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CyclopeanGiant.java 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 00000000000..1c04cdb2a63 --- /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/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index dd82083812d..4b208d7ce5d 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -68,6 +68,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)); From cc0c8cb6aee3807b7398564b79cab45b2c8096d1 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Thu, 5 Jul 2018 22:21:47 -0400 Subject: [PATCH 39/77] Implement Plated Pegasus --- Mage.Sets/src/mage/cards/p/PlatedPegasus.java | 83 +++++++++++++++++++ Mage.Sets/src/mage/sets/TimeSpiral.java | 1 + 2 files changed, 84 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PlatedPegasus.java 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 00000000000..ab53c9aab37 --- /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/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index dd82083812d..bde4860769b 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -211,6 +211,7 @@ 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("Primal Forcemage", 212, Rarity.UNCOMMON, mage.cards.p.PrimalForcemage.class)); cards.add(new SetCardInfo("Prismatic Lens", 262, Rarity.COMMON, mage.cards.p.PrismaticLens.class)); From d43cdba805fb3c49290b22563e58c169e0ed337b Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Fri, 6 Jul 2018 19:14:55 -0400 Subject: [PATCH 40/77] Implement Premature Burial --- .../src/mage/cards/p/PrematureBurial.java | 143 ++++++++++++++++++ Mage.Sets/src/mage/sets/TimeSpiral.java | 1 + 2 files changed, 144 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PrematureBurial.java 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 00000000000..9f35bb58888 --- /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/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index dd82083812d..7a2d9fcc0cf 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -212,6 +212,7 @@ public final class TimeSpiral extends ExpansionSet { 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("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)); From 3b663e19b51d2c29dc554a944ad57f48c8397bd3 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Fri, 6 Jul 2018 19:25:51 -0400 Subject: [PATCH 41/77] Update creature types --- Mage.Sets/src/mage/cards/e/Electryte.java | 2 +- Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java | 2 +- Mage.Sets/src/mage/cards/p/ProwlingPangolin.java | 2 +- Mage.Sets/src/mage/cards/r/RocEgg.java | 2 +- Mage.Sets/src/mage/cards/r/RukhEgg.java | 3 ++- Mage.Sets/src/mage/cards/s/SummonersEgg.java | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/Electryte.java b/Mage.Sets/src/mage/cards/e/Electryte.java index 1b0b5305200..6fa756cb171 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/l/LudevicsTestSubject.java b/Mage.Sets/src/mage/cards/l/LudevicsTestSubject.java index 1dcfaf01d60..d6884df7a7d 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/p/ProwlingPangolin.java b/Mage.Sets/src/mage/cards/p/ProwlingPangolin.java index 933ef29e446..a6c373ffd12 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/r/RocEgg.java b/Mage.Sets/src/mage/cards/r/RocEgg.java index b8c949457b6..126df90a82a 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/RukhEgg.java b/Mage.Sets/src/mage/cards/r/RukhEgg.java index 7d6c19cfb6a..6cb6036d6ea 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/s/SummonersEgg.java b/Mage.Sets/src/mage/cards/s/SummonersEgg.java index 89d2ae46d02..055eb812370 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); From 90c5ec7019eaed61a803c3b3184bb4645db0f6d1 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Fri, 6 Jul 2018 19:33:23 -0400 Subject: [PATCH 42/77] Update copy effect 'still' --- Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java | 4 ++-- Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java | 2 +- Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java b/Mage.Sets/src/mage/cards/l/LazavDimirMastermind.java index 4e4abf26111..fcb2eca5f22 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/q/QuicksilverGargantuan.java b/Mage.Sets/src/mage/cards/q/QuicksilverGargantuan.java index c5e28fa0503..e925ecda970 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/s/SakashimaTheImpostor.java b/Mage.Sets/src/mage/cards/s/SakashimaTheImpostor.java index 936ca9e6695..8fed936baa9 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)); } From 0ab7345fa3476fb162c3ec51c29f715600aac802 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Fri, 6 Jul 2018 20:21:17 -0400 Subject: [PATCH 43/77] Update wording (nonfunctional) --- .../mage/cards/a/ApproachOfTheSecondSun.java | 2 +- .../src/mage/cards/a/ArtisanOfForms.java | 8 +++--- Mage.Sets/src/mage/cards/c/CemeteryPuca.java | 4 +-- .../src/mage/cards/c/ChoArrimLegate.java | 2 +- .../src/mage/cards/d/DacksDuplicate.java | 4 +-- .../src/mage/cards/d/DeepwoodLegate.java | 2 +- .../src/mage/cards/d/DimirDoppelganger.java | 4 +-- Mage.Sets/src/mage/cards/d/DreamPillager.java | 6 ++-- Mage.Sets/src/mage/cards/e/EvilTwin.java | 4 +-- Mage.Sets/src/mage/cards/g/Gigantoplasm.java | 4 +-- Mage.Sets/src/mage/cards/h/HeatShimmer.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 +-- .../mage/cards/k/KikiJikiMirrorBreaker.java | 4 +-- Mage.Sets/src/mage/cards/k/KyrenLegate.java | 2 +- Mage.Sets/src/mage/cards/m/Massacre.java | 2 +- .../src/mage/cards/m/MercurialPretender.java | 6 ++-- .../src/mage/cards/m/MinionReflector.java | 6 ++-- .../mage/cards/m/MizziumTransreliquat.java | 4 +-- Mage.Sets/src/mage/cards/m/MoggSalvage.java | 2 +- .../src/mage/cards/p/PatriciansScorn.java | 4 +-- .../src/mage/cards/p/PhantasmalImage.java | 4 +-- .../src/mage/cards/p/ProgenitorMimic.java | 4 +-- .../src/mage/cards/r/RefreshingRain.java | 2 +- .../src/mage/cards/r/RushwoodLegate.java | 2 +- .../src/mage/cards/s/SaprazzanLegate.java | 5 ++-- Mage.Sets/src/mage/cards/s/SivvisRuse.java | 2 +- Mage.Sets/src/mage/cards/s/SplinterTwin.java | 4 +-- Mage.Sets/src/mage/cards/s/Submerge.java | 2 +- .../mage/cards/t/TemptWithImmortality.java | 4 +-- .../src/mage/cards/t/TemptWithVengeance.java | 4 +-- .../src/mage/cards/t/ThespiansStage.java | 4 +-- Mage.Sets/src/mage/cards/t/Twinflame.java | 4 +-- .../mage/cards/u/UnstableShapeshifter.java | 4 +-- .../src/mage/cards/v/VesuvanDoppelganger.java | 6 ++-- .../src/mage/cards/v/VesuvanShapeshifter.java | 4 +-- .../costs/AlternativeCostSourceAbility.java | 2 +- .../common/CreateTokenCopyTargetEffect.java | 28 +++++++++---------- 41 files changed, 89 insertions(+), 90 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java b/Mage.Sets/src/mage/cards/a/ApproachOfTheSecondSun.java index 34e1ac83756..1877fee325f 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/ArtisanOfForms.java b/Mage.Sets/src/mage/cards/a/ArtisanOfForms.java index fb83369e994..ac415c84391 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/c/CemeteryPuca.java b/Mage.Sets/src/mage/cards/c/CemeteryPuca.java index 89b065aa716..37498a7238e 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/ChoArrimLegate.java b/Mage.Sets/src/mage/cards/c/ChoArrimLegate.java index 95ba4e02045..22c24cc6b9c 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/d/DacksDuplicate.java b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java index 3bed9903fb9..646597f79c2 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/DeepwoodLegate.java b/Mage.Sets/src/mage/cards/d/DeepwoodLegate.java index fc2be841219..d0dcb0ca4b7 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/DimirDoppelganger.java b/Mage.Sets/src/mage/cards/d/DimirDoppelganger.java index a70951a13da..388d4d7bfbf 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/DreamPillager.java b/Mage.Sets/src/mage/cards/d/DreamPillager.java index ad7ca79d2e7..e0eefc81fe7 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/e/EvilTwin.java b/Mage.Sets/src/mage/cards/e/EvilTwin.java index 339fcdbd071..51a77803e5e 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/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java index 92e79d7f10f..2b0eab220b3 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/h/HeatShimmer.java b/Mage.Sets/src/mage/cards/h/HeatShimmer.java index 2f86cafcd4e..e0e8cb79caa 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/i/IncreasingAmbition.java b/Mage.Sets/src/mage/cards/i/IncreasingAmbition.java index 39dacafdb6f..fc62cc74c37 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 d3016def504..909f4ec7c0c 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 757ab3cbd39..2c211667979 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 898083bedc8..82cf03b321e 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 33d22626e0d..11e1d70dbb4 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/k/KikiJikiMirrorBreaker.java b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java index bc30f9246ab..5b0bd8e3014 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. + // {tap}: 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/KyrenLegate.java b/Mage.Sets/src/mage/cards/k/KyrenLegate.java index b77984d1611..1c03329a932 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/m/Massacre.java b/Mage.Sets/src/mage/cards/m/Massacre.java index 4d67f3550b5..24af1a59d32 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/MercurialPretender.java b/Mage.Sets/src/mage/cards/m/MercurialPretender.java index 12650ac73f7..250feb98cbc 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/MinionReflector.java b/Mage.Sets/src/mage/cards/m/MinionReflector.java index e792a5f431b..a4226643089 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/MizziumTransreliquat.java b/Mage.Sets/src/mage/cards/m/MizziumTransreliquat.java index 149bef4fc2e..298c2f4d8d9 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 fed1f36fef6..d45d5d2af70 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/p/PatriciansScorn.java b/Mage.Sets/src/mage/cards/p/PatriciansScorn.java index b8a7048837d..0aed2b41deb 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/PhantasmalImage.java b/Mage.Sets/src/mage/cards/p/PhantasmalImage.java index 383d66b2380..003ff68f888 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/ProgenitorMimic.java b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java index b3a181e230c..fec1160c10d 100644 --- a/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java +++ b/Mage.Sets/src/mage/cards/p/ProgenitorMimic.java @@ -40,7 +40,7 @@ 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"); @@ -52,7 +52,7 @@ public final class ProgenitorMimic extends CardImpl { "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/r/RefreshingRain.java b/Mage.Sets/src/mage/cards/r/RefreshingRain.java index 57fb9afe340..038c187b5af 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/RushwoodLegate.java b/Mage.Sets/src/mage/cards/r/RushwoodLegate.java index fa6cac12a70..6267bdf3d58 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/SaprazzanLegate.java b/Mage.Sets/src/mage/cards/s/SaprazzanLegate.java index a61a55454a4..c0d57d7e59f 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/SivvisRuse.java b/Mage.Sets/src/mage/cards/s/SivvisRuse.java index 96368787a74..0ebc135c69e 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/SplinterTwin.java b/Mage.Sets/src/mage/cards/s/SplinterTwin.java index 4ced5c998c6..cd942fa6694 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/Submerge.java b/Mage.Sets/src/mage/cards/s/Submerge.java index c8bf389e0c3..aeacf5422e1 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/t/TemptWithImmortality.java b/Mage.Sets/src/mage/cards/t/TemptWithImmortality.java index e570ca2a7ca..ad8c586bcad 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 12355839571..be648e61b6b 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/ThespiansStage.java b/Mage.Sets/src/mage/cards/t/ThespiansStage.java index 58bd72d8813..5b9ca21040d 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/Twinflame.java b/Mage.Sets/src/mage/cards/t/Twinflame.java index ecc4f8dadec..c1f6f7cd670 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/u/UnstableShapeshifter.java b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java index 9372d887440..99bf8748627 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/v/VesuvanDoppelganger.java b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java index e52d2b2506b..540626721f1 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 3e3124ca825..404b0334c3a 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/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostSourceAbility.java index 97a88393844..fef3c1e04c0 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/effects/common/CreateTokenCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java index 8bb428ddb1c..40936884ef9 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) { From 8ee79655806d67870ec618acfe403fb783f01e45 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 7 Jul 2018 11:52:38 -0400 Subject: [PATCH 44/77] Fix tests --- Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java | 2 +- .../test/cards/copy/KikiJikiMirrorBreakerTest.java | 10 +++++----- .../src/test/java/mage/verify/VerifyCardDataTest.java | 8 +++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java b/Mage.Sets/src/mage/cards/k/KikiJikiMirrorBreaker.java index 5b0bd8e3014..c5b03a0f078 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, except it 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); 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 d82ee22b679..6a9fac02066 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.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 30612176f00..27d780138ff 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"); From bad82d62ba0b00dd3ff54d73b3e11cf25e668e84 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sun, 8 Jul 2018 21:55:17 -0400 Subject: [PATCH 45/77] Implement Thick-Skinned Goblin --- .../src/mage/cards/t/ThickSkinnedGoblin.java | 76 +++++++++++++++ Mage.Sets/src/mage/sets/TimeSpiral.java | 1 + .../abilities/effects/keyword/EchoEffect.java | 94 +++++++++++++++++++ .../mage/abilities/keyword/EchoAbility.java | 80 +--------------- .../mage/constants/AsThoughEffectType.java | 2 +- 5 files changed, 176 insertions(+), 77 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/t/ThickSkinnedGoblin.java create mode 100644 Mage/src/main/java/mage/abilities/effects/keyword/EchoEffect.java 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 00000000000..912a17476f8 --- /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/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index dd82083812d..de32744cf88 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -283,6 +283,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/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 00000000000..e2d20da03b4 --- /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/EchoAbility.java b/Mage/src/main/java/mage/abilities/keyword/EchoAbility.java index 58a054e63e8..afdda45c0de 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/constants/AsThoughEffectType.java b/Mage/src/main/java/mage/constants/AsThoughEffectType.java index 7afa2c60002..657d7bce703 100644 --- a/Mage/src/main/java/mage/constants/AsThoughEffectType.java +++ b/Mage/src/main/java/mage/constants/AsThoughEffectType.java @@ -25,7 +25,7 @@ public enum AsThoughEffectType { DAMAGE, SHROUD, HEXPROOF, - PAY, + PAY_0_ECHO, LOOK_AT_FACE_DOWN, SPEND_OTHER_MANA, SPEND_ONLY_MANA, From d1de6cf3e6db5e2b827861ee34d775be3b3a519a Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Mon, 9 Jul 2018 20:18:51 -0400 Subject: [PATCH 46/77] Fix Nightcreep applying to things that ETB after it --- Mage.Sets/src/mage/cards/n/Nightcreep.java | 89 +++++++++++----------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/Mage.Sets/src/mage/cards/n/Nightcreep.java b/Mage.Sets/src/mage/cards/n/Nightcreep.java index cce74b7f652..13e51cd7b0a 100644 --- a/Mage.Sets/src/mage/cards/n/Nightcreep.java +++ b/Mage.Sets/src/mage/cards/n/Nightcreep.java @@ -1,29 +1,20 @@ package mage.cards.n; -import java.util.UUID; - -import mage.MageObject; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.continuous.AddCardSubtypeAllEffect; -import mage.abilities.effects.common.continuous.BecomesColorAllEffect; -import mage.abilities.effects.common.continuous.BecomesSubtypeAllEffect; -import mage.abilities.effects.common.continuous.GainAbilityAllEffect; -import mage.abilities.mana.BlackManaAbility; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.abilities.effects.common.continuous.BecomesColorTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.choices.ChoiceColor; import mage.constants.*; import mage.filter.StaticFilters; -import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.stack.Spell; -import mage.players.Player; +import mage.target.targetpointer.FixedTargets; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; /** * @@ -36,8 +27,8 @@ public final class Nightcreep extends CardImpl { // Until end of turn, all creatures become black and all lands become Swamps. - this.getSpellAbility().addEffect(new BecomesColorAllEffect(ObjectColor.BLACK, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, true, "Until end of turn, all creatures become black and all lands become Swamps")); - this.getSpellAbility().addEffect(new NightcreepEffect()); + this.getSpellAbility().addEffect(new NightcreepCreatureEffect()); + this.getSpellAbility().addEffect(new NightcreepLandEffect()); } public Nightcreep(final Nightcreep card) { @@ -50,48 +41,60 @@ public final class Nightcreep extends CardImpl { } } -class NightcreepEffect extends ContinuousEffectImpl { +class NightcreepLandEffect extends BecomesBasicLandTargetEffect { - public NightcreepEffect() { - super(Duration.EndOfTurn, Outcome.Benefit); + public NightcreepLandEffect() { + super(Duration.EndOfTurn, SubType.SWAMP); this.staticText = ""; } - public NightcreepEffect(NightcreepEffect effect) { + 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) { - for (Permanent land : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_LAND, source.getControllerId(), game)) { - switch (layer) { - case TypeChangingEffects_4: - // 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects - // So the ability removing has to be done before Layer 6 - land.removeAllAbilities(source.getSourceId(), game); - land.getSubtype(game).removeAll(SubType.getLandTypes(false)); - land.getSubtype(game).add(SubType.SWAMP); - break; - case AbilityAddingRemovingEffects_6: - land.addAbility(new BlackManaAbility(), source.getSourceId(), game); - break; - } - } - return true; + return super.apply(layer, sublayer, source, game); } @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.AbilityAddingRemovingEffects_6 || layer == Layer.TypeChangingEffects_4; + 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 boolean apply(Game game, Ability source) { - return false; + 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 NightcreepEffect copy() { - return new NightcreepEffect(this); + 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 From 9108104fe50dfabbbbacb5b17f179398876ac8e9 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Mon, 9 Jul 2018 22:21:40 -0400 Subject: [PATCH 47/77] Implement Predatory Focus --- .../src/mage/cards/p/PredatoryFocus.java | 81 +++++++++++++++++++ Mage.Sets/src/mage/sets/Guildpact.java | 1 + .../mage/constants/AsThoughEffectType.java | 1 + .../java/mage/game/combat/CombatGroup.java | 14 ++-- 4 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/p/PredatoryFocus.java 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 00000000000..807f5249596 --- /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/sets/Guildpact.java b/Mage.Sets/src/mage/sets/Guildpact.java index 16e31256091..762ddb9e2be 100644 --- a/Mage.Sets/src/mage/sets/Guildpact.java +++ b/Mage.Sets/src/mage/sets/Guildpact.java @@ -130,6 +130,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/src/main/java/mage/constants/AsThoughEffectType.java b/Mage/src/main/java/mage/constants/AsThoughEffectType.java index 7afa2c60002..cf7a860cdff 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, diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index 235b2e774cb..31f316847ba 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -12,6 +12,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; @@ -124,11 +125,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); From e0932efa8b6d881f7dde8c0be3b4a48e43b4ccb8 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Mon, 9 Jul 2018 22:34:23 -0400 Subject: [PATCH 48/77] Fix TODO on Siege Behemoth --- Mage.Sets/src/mage/cards/s/SiegeBehemoth.java | 56 +++++++++++++++---- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java b/Mage.Sets/src/mage/cards/s/SiegeBehemoth.java index 2eaaafa5734..96675daffaf 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); + } +} From 7e9291ff34a3af22aa271ed4d48d5372de6edae0 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 22:34:16 -0400 Subject: [PATCH 49/77] Implement Dichotomancy --- Mage.Sets/src/mage/cards/d/Dichotomancy.java | 98 ++++++++++++++++++++ Mage.Sets/src/mage/sets/PlanarChaos.java | 1 + 2 files changed, 99 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/Dichotomancy.java 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 00000000000..c788c4dc8f3 --- /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/sets/PlanarChaos.java b/Mage.Sets/src/mage/sets/PlanarChaos.java index dc3ca252a1b..bb9ed548a04 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)); From c372d93f66d690303462cadd9faca0085f9e1110 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:00:27 -0400 Subject: [PATCH 50/77] Implement Molten Firebird and Ivory Gargoyle --- Mage.Sets/src/mage/cards/i/IvoryGargoyle.java | 54 ++++++++++++++ .../src/mage/cards/m/MoltenFirebird.java | 52 +++++++++++++ Mage.Sets/src/mage/sets/Alliances.java | 1 + Mage.Sets/src/mage/sets/MastersEditionII.java | 1 + Mage.Sets/src/mage/sets/PlanarChaos.java | 1 + .../SkipNextDrawStepControllerEffect.java | 74 +++++++++++++++++++ 6 files changed, 183 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/i/IvoryGargoyle.java create mode 100644 Mage.Sets/src/mage/cards/m/MoltenFirebird.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/SkipNextDrawStepControllerEffect.java 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 00000000000..0cd6c5e37d4 --- /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/m/MoltenFirebird.java b/Mage.Sets/src/mage/cards/m/MoltenFirebird.java new file mode 100644 index 00000000000..81001ce6abc --- /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/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index a2638ba711b..ea610a18976 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", 131, 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/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index bee97c5b587..c3f9f8ffbf1 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/PlanarChaos.java b/Mage.Sets/src/mage/sets/PlanarChaos.java index dc3ca252a1b..9e11c0792a3 100644 --- a/Mage.Sets/src/mage/sets/PlanarChaos.java +++ b/Mage.Sets/src/mage/sets/PlanarChaos.java @@ -114,6 +114,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/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 00000000000..f498b90eebb --- /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); + } +} From 1272d0d07664aa8f798be79aeb7f3c6f9cf3911d Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:14:35 -0400 Subject: [PATCH 51/77] Rename ThroneofGeth --- .../t/{ThroneofGeth.java => ThroneOfGeth.java} | 14 +++++++++----- Mage.Sets/src/mage/sets/ScarsOfMirrodin.java | 3 ++- 2 files changed, 11 insertions(+), 6 deletions(-) rename Mage.Sets/src/mage/cards/t/{ThroneofGeth.java => ThroneOfGeth.java} (80%) 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 1707d089180..329851cf1b1 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/sets/ScarsOfMirrodin.java b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java index 93cf471f043..ed5f1510b89 100644 --- a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java +++ b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java @@ -2,6 +2,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.cards.t.ThroneOfGeth; import mage.constants.Rarity; import mage.constants.SetType; @@ -244,7 +245,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, 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)); From 70c302b0e45addd9c51ef90e47fbafce0f0ed5be Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:16:44 -0400 Subject: [PATCH 52/77] Rename BurntheImpure --- ...{BurntheImpure.java => BurnTheImpure.java} | 23 ++++++++++--------- Mage.Sets/src/mage/sets/MirrodinBesieged.java | 3 ++- 2 files changed, 14 insertions(+), 12 deletions(-) rename Mage.Sets/src/mage/cards/b/{BurntheImpure.java => BurnTheImpure.java} (69%) 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 5d6e6bd3213..9c57bb8b0db 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/sets/MirrodinBesieged.java b/Mage.Sets/src/mage/sets/MirrodinBesieged.java index cd5df52cafb..c2a968a35e7 100644 --- a/Mage.Sets/src/mage/sets/MirrodinBesieged.java +++ b/Mage.Sets/src/mage/sets/MirrodinBesieged.java @@ -2,6 +2,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.cards.b.BurnTheImpure; import mage.constants.Rarity; import mage.constants.SetType; @@ -38,7 +39,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, 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)); From 40368bc569e24f9802728430359073f5ab3cab7a Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:18:48 -0400 Subject: [PATCH 53/77] Rename WreathofGeists --- .../w/{WreathofGeists.java => WreathOfGeists.java} | 10 +++++----- Mage.Sets/src/mage/sets/Innistrad.java | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) rename Mage.Sets/src/mage/cards/w/{WreathofGeists.java => WreathOfGeists.java} (86%) 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 7a9da11ab0a..8991b23d966 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/sets/Innistrad.java b/Mage.Sets/src/mage/sets/Innistrad.java index 62ea025a4ef..771e181695b 100644 --- a/Mage.Sets/src/mage/sets/Innistrad.java +++ b/Mage.Sets/src/mage/sets/Innistrad.java @@ -2,6 +2,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.cards.w.WreathOfGeists; import mage.constants.Rarity; import mage.constants.SetType; @@ -309,7 +310,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, WreathOfGeists.class)); } } From 7fdc6477ccf35b8dead5d4b2ba2c57b93607ca90 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:31:59 -0400 Subject: [PATCH 54/77] Fix typos in mtg-cards-data.txt --- Utils/mtg-cards-data.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 14b5fd976a1..8a284e2497a 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.| From 04014b30d616ba40658d33813a46c6271a5c4728 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Tue, 10 Jul 2018 23:32:46 -0400 Subject: [PATCH 55/77] Rename GiftofGrowth --- .../cards/g/{GiftofGrowth.java => GiftOfGrowth.java} | 11 +++++------ Mage.Sets/src/mage/sets/Dominaria.java | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) rename Mage.Sets/src/mage/cards/g/{GiftofGrowth.java => GiftOfGrowth.java} (84%) 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 0dedf15bd09..2e599b32362 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/sets/Dominaria.java b/Mage.Sets/src/mage/sets/Dominaria.java index 4fd36ededd6..ca1235b709b 100644 --- a/Mage.Sets/src/mage/sets/Dominaria.java +++ b/Mage.Sets/src/mage/sets/Dominaria.java @@ -2,6 +2,7 @@ package mage.sets; import mage.cards.ExpansionSet; +import mage.cards.g.GiftOfGrowth; import mage.constants.Rarity; import mage.constants.SetType; @@ -117,7 +118,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, 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)); From db4b47dd068aa75a88eb4ac99b890118f61b51f2 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Wed, 11 Jul 2018 17:43:20 -0400 Subject: [PATCH 56/77] Use paths instead of import --- Mage.Sets/src/mage/sets/Dominaria.java | 3 +-- Mage.Sets/src/mage/sets/Innistrad.java | 3 +-- Mage.Sets/src/mage/sets/MirrodinBesieged.java | 3 +-- Mage.Sets/src/mage/sets/ScarsOfMirrodin.java | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/Dominaria.java b/Mage.Sets/src/mage/sets/Dominaria.java index ca1235b709b..6e48f762fed 100644 --- a/Mage.Sets/src/mage/sets/Dominaria.java +++ b/Mage.Sets/src/mage/sets/Dominaria.java @@ -2,7 +2,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.cards.g.GiftOfGrowth; import mage.constants.Rarity; import mage.constants.SetType; @@ -118,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, 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/Innistrad.java b/Mage.Sets/src/mage/sets/Innistrad.java index 771e181695b..b32374439f6 100644 --- a/Mage.Sets/src/mage/sets/Innistrad.java +++ b/Mage.Sets/src/mage/sets/Innistrad.java @@ -2,7 +2,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.cards.w.WreathOfGeists; import mage.constants.Rarity; import mage.constants.SetType; @@ -310,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, 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/MirrodinBesieged.java b/Mage.Sets/src/mage/sets/MirrodinBesieged.java index c2a968a35e7..31c5cc90a67 100644 --- a/Mage.Sets/src/mage/sets/MirrodinBesieged.java +++ b/Mage.Sets/src/mage/sets/MirrodinBesieged.java @@ -2,7 +2,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.cards.b.BurnTheImpure; import mage.constants.Rarity; import mage.constants.SetType; @@ -39,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, 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/ScarsOfMirrodin.java b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java index ed5f1510b89..0742778d39d 100644 --- a/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java +++ b/Mage.Sets/src/mage/sets/ScarsOfMirrodin.java @@ -2,7 +2,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.cards.t.ThroneOfGeth; import mage.constants.Rarity; import mage.constants.SetType; @@ -245,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, 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)); From 1c540bbc7759b88890b16ba790b65ec3e6c3368b Mon Sep 17 00:00:00 2001 From: spjspj Date: Thu, 12 Jul 2018 23:21:00 +1000 Subject: [PATCH 57/77] Check if actually different replacement effects --- .../src/mage/player/human/HumanPlayer.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ab2848376dc..e247f181362 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()) { From ec1dc44327bb7edc2ebc4758cbb2c4147af3b6d1 Mon Sep 17 00:00:00 2001 From: spjspj Date: Fri, 13 Jul 2018 00:02:26 +1000 Subject: [PATCH 58/77] Hopefully fix the /fix command .. --- .../java/mage/server/game/GameController.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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 78ce2b7dc5b..a9593816c70 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) { From 0ad86ff530913cc16b2456eafefc2e5dda31ba9e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 13 Jul 2018 14:08:19 -0400 Subject: [PATCH 59/77] fixed Ajani's Last Stand token name (fixes #5147) --- Mage/src/main/java/mage/game/permanent/token/AvatarToken2.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 fa30088d285..b63e3e14c5b 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); From dc3b3148e48c6576bdcc9d6b0f90c1cd86eb1e74 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 14 Jul 2018 00:02:02 -0400 Subject: [PATCH 60/77] Fix card number --- Mage.Sets/src/mage/sets/Alliances.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index ea610a18976..1553e50b598 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -89,7 +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", 131, Rarity.RARE, mage.cards.i.IvoryGargoyle.class)); + 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)); From 7fa21ae9c236ae12214895c566327d4a1ba98552 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 14 Jul 2018 17:43:26 +0200 Subject: [PATCH 61/77] Added some missing player methods. --- Mage.Sets/src/mage/cards/a/Aetherplasm.java | 27 ++++----- .../java/org/mage/test/player/TestPlayer.java | 58 +++++++++++-------- .../java/org/mage/test/stub/PlayerStub.java | 22 +++++++ 3 files changed, 68 insertions(+), 39 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/Aetherplasm.java b/Mage.Sets/src/mage/cards/a/Aetherplasm.java index 6864f3c98fd..29862c661da 100644 --- a/Mage.Sets/src/mage/cards/a/Aetherplasm.java +++ b/Mage.Sets/src/mage/cards/a/Aetherplasm.java @@ -2,21 +2,17 @@ package mage.cards.a; import java.util.UUID; import mage.MageInt; -import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.BlocksTriggeredAbility; import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; -import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect; -import mage.abilities.effects.common.ReturnToHandSourceEffect; import mage.cards.Card; -import mage.constants.Outcome; -import mage.constants.SubType; 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; @@ -33,14 +29,13 @@ 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)); + this.addAbility(new BlocksTriggeredAbility(new DoIfCostPaid(new AetherplasmEffect(), new ReturnToHandFromBattlefieldSourceCost()), false, true)); } public Aetherplasm(final Aetherplasm card) { @@ -67,7 +62,6 @@ class AetherplasmEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); - Permanent blockedCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); if (player == null) { return false; } @@ -76,23 +70,24 @@ class AetherplasmEffect extends OneShotEffect { if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { - if(player.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, false, null) - && game.getCombat() != null && blockedCreature != 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) { + if (putIntoPlay != null && putIntoPlay.isCreature() && attacker != null) { game.getCombat().findGroup(blockedCreature.getId()).addBlocker(putIntoPlay.getId(), source.getControllerId(), game); - return true; + } } } } } - return false; + return true; } @Override public AetherplasmEffect copy() { return new AetherplasmEffect(this); } -} \ No newline at end of file +} 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 35199654d97..eed329f9580 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 43a16020dcf..bc84033378e 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; + } + } From 98793e45115fc5fb2462366355dbc8f5f6ec4704 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 14 Jul 2018 18:26:48 +0200 Subject: [PATCH 62/77] Added download from M19 CM2 from Wizard source. --- .../dl/sources/WizardCardsImageSource.java | 22 +- .../mage/sets/CommanderAnthologyVolumeII.java | 675 +++++++++--------- Utils/known-sets.txt | 1 + Utils/mtg-sets-data.txt | 1 + 4 files changed, 345 insertions(+), 354 deletions(-) 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 e4103359ba9..142a1866b4c 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.Sets/src/mage/sets/CommanderAnthologyVolumeII.java b/Mage.Sets/src/mage/sets/CommanderAnthologyVolumeII.java index 82370516472..eff5498d467 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/Utils/known-sets.txt b/Utils/known-sets.txt index 0534ba49503..0a3e6716835 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-sets-data.txt b/Utils/mtg-sets-data.txt index 06444e06953..4ed1a4a131b 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 c74390655719720e3c42860f990e2ef94a0986e2 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 14 Jul 2018 16:50:44 -0400 Subject: [PATCH 63/77] fixed instances of life gain being life loss with negative numbers (fixes #5149) --- Mage/src/main/java/mage/players/PlayerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index c7acd2f44a4..e7d32f56b3f 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1888,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); From 67d25f80b67efbe3a57cc24d4d183d0be332b3d0 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sat, 14 Jul 2018 23:51:05 +0200 Subject: [PATCH 64/77] fix Boseiju --- Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java index f29b1dee7e2..9e19d3430a9 100644 --- a/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java +++ b/Mage.Sets/src/mage/cards/b/BoseijuWhoSheltersAll.java @@ -81,7 +81,7 @@ class BoseijuWhoSheltersAllWatcher extends Watcher { public void watch(GameEvent event, Game game) { if (event.getType() == GameEvent.EventType.MANA_PAID) { if (event.getData() != null && event.getData().equals(originalId)) { - Card spell = game.getCard(event.getTargetId()); + Card spell = game.getSpell(event.getTargetId()); if (spell != null && (spell.isInstant() || spell.isSorcery())) { spells.add(event.getTargetId()); } From 31cb36c907466f43641676dd0a0458db4349cf96 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 14 Jul 2018 18:05:15 -0400 Subject: [PATCH 65/77] fixed card numbering --- Mage.Sets/src/mage/sets/Tempest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/Tempest.java b/Mage.Sets/src/mage/sets/Tempest.java index 26f984eaf39..a5fce2ce5a9 100644 --- a/Mage.Sets/src/mage/sets/Tempest.java +++ b/Mage.Sets/src/mage/sets/Tempest.java @@ -43,7 +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", 267, Rarity.RARE, mage.cards.b.BoobyTrap.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)); From 8d1b4ed92ffe148b24dec81a16672f9630ca5a59 Mon Sep 17 00:00:00 2001 From: Noah Gleason Date: Sat, 14 Jul 2018 23:45:33 -0400 Subject: [PATCH 66/77] Sort Fourth Edition alphabetically --- Mage.Sets/src/mage/sets/FourthEdition.java | 595 +++++++++++---------- 1 file changed, 298 insertions(+), 297 deletions(-) diff --git a/Mage.Sets/src/mage/sets/FourthEdition.java b/Mage.Sets/src/mage/sets/FourthEdition.java index d4609ac9519..d2a8b86844e 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)); } } From cf845a44855c32384acd218eaf826ca592dcb8a7 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sun, 15 Jul 2018 17:00:49 +0200 Subject: [PATCH 67/77] fix missing abilities for Sarkhan Dragonsoul --- Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java b/Mage.Sets/src/mage/cards/s/SarkhanDragonsoul.java index 548fd4b9e7f..565bbd7c7e2 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)); From cd0c0b3bddc827cb504608affc313ac8e474aa75 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sun, 15 Jul 2018 20:42:14 +0200 Subject: [PATCH 68/77] fix planeswalker check in EDH powerlevel comparator --- .../mage/client/util/CardViewEDHPowerLevelComparator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 f8175f95180..31239d1d953 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)); } } From 877a355a7d49b9bbc2236f93850cf07f519233e5 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sun, 15 Jul 2018 20:50:26 +0200 Subject: [PATCH 69/77] rewrite some code to streams --- .../org/mage/test/combat/FirstStrikeTest.java | 40 ++++++++++++ Mage/src/main/java/mage/cards/CardImpl.java | 2 +- .../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 +++-- .../main/java/mage/game/combat/Combat.java | 65 ++++++++----------- .../java/mage/game/combat/CombatGroup.java | 20 ++---- Mage/src/main/java/mage/util/CardUtil.java | 13 ++-- 12 files changed, 108 insertions(+), 100 deletions(-) create mode 100644 Mage.Tests/src/test/java/org/mage/test/combat/FirstStrikeTest.java 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 00000000000..d14691f3d55 --- /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/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index d9283e95d79..c682915fd5e 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/filter/predicate/mageobject/AbilityPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/AbilityPredicate.java index b592d15f69d..08a9cd27e97 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 08a8f2ba747..7759d5d3b26 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 8cf872e132c..15c2a46491c 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 2c82ab33876..dcb75de1053 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 1d6cda14660..71065e54e3a 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 f6b218c4eb5..c548735dc50 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 87ca0911f69..cb0b266d9e8 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/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index b9620a42cbb..5b56d49347c 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 31f316847ba..e357b6df977 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; @@ -61,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() { diff --git a/Mage/src/main/java/mage/util/CardUtil.java b/Mage/src/main/java/mage/util/CardUtil.java index d2addea1b12..ac9a02f558f 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); } From 91d099db5c450139e75e886588faa786dfd5505f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 15 Jul 2018 15:21:32 -0400 Subject: [PATCH 70/77] fixed Ajani, Wise Counselor abilities --- Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java b/Mage.Sets/src/mage/cards/a/AjaniWiseCounselor.java index a7927876ebb..13636ab6ca1 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) { From 711c34b34f61fc01438ed64a1203fec9991ff8d4 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 15 Jul 2018 15:26:29 -0400 Subject: [PATCH 71/77] fixed Heroic Reinforcements giving haste to noncreature permanents --- Mage.Sets/src/mage/cards/h/HeroicReinforcements.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java b/Mage.Sets/src/mage/cards/h/HeroicReinforcements.java index d97d2fedcbc..9db9048c74b 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") ); } From d8a3a408dfeebed0906a78d7e2c52891b8f30c10 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 16 Jul 2018 10:47:28 -0400 Subject: [PATCH 72/77] fixed Vivien Reid's first ability not putting cards back in a random order --- Mage.Sets/src/mage/cards/v/VivienReid.java | 8 ++++++-- .../common/LookLibraryAndPickControllerEffect.java | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/v/VivienReid.java b/Mage.Sets/src/mage/cards/v/VivienReid.java index 2e3468420a7..219a8c5a3cd 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/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index d27e8f43208..285dd2b9fa8 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) { From 36aad539f145fb2207f4ebe71c53f63d4e643c2b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 16 Jul 2018 10:49:04 -0400 Subject: [PATCH 73/77] fixed Virtus's Maneuver allowing players to get back noncreature cards --- Mage.Sets/src/mage/cards/v/VirtussManeuver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/v/VirtussManeuver.java b/Mage.Sets/src/mage/cards/v/VirtussManeuver.java index 0d02a30405f..70880e200f5 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); From 765ccf63a6e70addeb737649ee8f04c04fc40661 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 16 Jul 2018 10:52:57 -0400 Subject: [PATCH 74/77] fixed Dread Wanderer text to correctly describe when it can be activated --- Mage.Sets/src/mage/cards/d/DreadWanderer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DreadWanderer.java b/Mage.Sets/src/mage/cards/d/DreadWanderer.java index 9bc5b6c82ad..87b9d1b7682 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); } From 57a5ee8f4edbf564fc9d442514c8b88e587d7acb Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 16 Jul 2018 11:10:24 -0400 Subject: [PATCH 75/77] reworked Heart-Piercer Manticore's reflexive triggered ability --- .../mage/cards/h/HeartPiercerManticore.java | 61 ++++++++----------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java index aab2013c72f..ecf355dea2d 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"; } } From 014a46ae72549355e74612e85bfc52f471c319f7 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 16 Jul 2018 17:43:01 +0200 Subject: [PATCH 76/77] * Unexpectedly Absent - Fixed that the target permanent was put to the wrong position in library. --- .../src/mage/cards/u/UnexpectedlyAbsent.java | 3 +- .../oneshot/library/PutToLibraryTest.java | 34 ++++++++++++++++++- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java b/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java index 3db22ac3366..2fadc33bd9b 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.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 7668806acfd..fbaf5f07ad0 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); + + } + } From e1fc0607555dbf5966a75ec9306520bc41fd7f9d Mon Sep 17 00:00:00 2001 From: dilnu Date: Wed, 18 Jul 2018 21:07:23 -0400 Subject: [PATCH 77/77] Don't count players who have lost or left the game as having lost life. Fixes https://github.com/magefree/mage/issues/5153 --- Mage/src/main/java/mage/players/PlayerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index e7d32f56b3f..0c5c860d1a1 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1853,7 +1853,7 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public int loseLife(int amount, Game game, boolean atCombat) { - if (!canLoseLife) { + if (!canLoseLife || !this.isInGame()) { return 0; } GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, atCombat);