diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index c53b0f71a9..d6320f38b0 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -253,9 +253,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { } return target.isChosen(); } - if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) { + if (target.getOriginalTarget() instanceof TargetAnyTarget) { List<Permanent> targets; - TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) target); + TargetAnyTarget t = ((TargetAnyTarget) target); if (outcome.isGood()) { targets = threats(abilityControllerId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } else { @@ -496,9 +496,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { } return target.isChosen(); } - if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) { + if (target.getOriginalTarget() instanceof TargetAnyTarget) { List<Permanent> targets; - TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) target); + TargetAnyTarget t = ((TargetAnyTarget) target); if (outcome.isGood()) { targets = threats(abilityControllerId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } else { @@ -821,7 +821,8 @@ public class ComputerPlayer extends PlayerImpl implements Player { log.debug("chooseTarget: " + outcome.toString() + ':' + target.toString()); } UUID opponentId = game.getOpponents(playerId).iterator().next(); - if (target.getOriginalTarget() instanceof TargetCreatureOrPlayerAmount) { + if (target.getOriginalTarget() instanceof TargetCreatureOrPlayerAmount + || target.getOriginalTarget() instanceof TargetAnyTargetAmount) { if (outcome == Outcome.Damage && game.getPlayer(opponentId).getLife() <= target.getAmountRemaining()) { target.addTarget(opponentId, target.getAmountRemaining(), source, game); return true; diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java index c1bd72b201..5197c33536 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/utils/RateCard.java @@ -7,7 +7,7 @@ import mage.cards.Card; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; import org.apache.log4j.Logger; @@ -91,7 +91,7 @@ public final class RateCard { DamageTargetEffect damageEffect = (DamageTargetEffect) effect; if (damageEffect.getAmount() > 1) { for (Target target : ability.getTargets()) { - if (target instanceof TargetCreaturePermanent || target instanceof TargetCreatureOrPlayer) { + if (target instanceof TargetCreaturePermanent || target instanceof TargetAnyTarget) { log.debug("Found damage dealer: " + card.getName()); return 1; } 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 7f358f6c4e..de2363ce9c 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 @@ -69,7 +69,7 @@ import mage.target.TargetAmount; import mage.target.TargetCard; import mage.target.TargetPermanent; import mage.target.common.TargetAttackingCreature; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetDefender; import mage.util.GameLog; import mage.util.ManaUtil; @@ -1483,7 +1483,7 @@ public class HumanPlayer extends PlayerImpl { updateGameStatePriority("assignDamage", game); int remainingDamage = damage; while (remainingDamage > 0 && canRespond()) { - Target target = new TargetCreatureOrPlayer(); + Target target = new TargetAnyTarget(); target.setNotTarget(true); if (singleTargetName != null) { target.setTargetName(singleTargetName); diff --git a/Mage.Sets/src/mage/cards/a/AbunaAcolyte.java b/Mage.Sets/src/mage/cards/a/AbunaAcolyte.java index 6bd01b808c..e4aa41a9f6 100644 --- a/Mage.Sets/src/mage/cards/a/AbunaAcolyte.java +++ b/Mage.Sets/src/mage/cards/a/AbunaAcolyte.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -64,7 +64,7 @@ public class AbunaAcolyte extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability1.addTarget(new TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); ability2.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability1); diff --git a/Mage.Sets/src/mage/cards/a/AcidicSliver.java b/Mage.Sets/src/mage/cards/a/AcidicSliver.java index 4aca4b1230..be2b1cd08a 100644 --- a/Mage.Sets/src/mage/cards/a/AcidicSliver.java +++ b/Mage.Sets/src/mage/cards/a/AcidicSliver.java @@ -43,7 +43,7 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,14 +58,14 @@ public class AcidicSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // All Slivers have "{2}, Sacrifice this permanent: This permanent deals 2 damage to target creature or player." + // All Slivers have "{2}, Sacrifice this permanent: This permanent deals 2 damage to any target." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); ability.addCost(new GenericManaCost(2)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, - "All Slivers have \"{2}, Sacrifice this permanent: This permanent deals 2 damage to target creature or player.\""))); + "All Slivers have \"{2}, Sacrifice this permanent: This permanent deals 2 damage to any target.\""))); } public AcidicSliver(final AcidicSliver card) { diff --git a/Mage.Sets/src/mage/cards/a/AcolytesReward.java b/Mage.Sets/src/mage/cards/a/AcolytesReward.java index e56a4fbb33..74f96abad3 100644 --- a/Mage.Sets/src/mage/cards/a/AcolytesReward.java +++ b/Mage.Sets/src/mage/cards/a/AcolytesReward.java @@ -40,7 +40,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -53,10 +53,10 @@ public class AcolytesReward extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - // Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, Acolyte's Reward deals that much damage to target creature or player. + // Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, Acolyte's Reward deals that much damage to any target. this.getSpellAbility().addEffect(new AcolytesRewardEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public AcolytesReward(final AcolytesReward card) { @@ -75,7 +75,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl { public AcolytesRewardEffect() { super(Duration.EndOfTurn); - staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, {this} deals that much damage to target creature or player"; + staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, {this} deals that much damage to any target"; } public AcolytesRewardEffect(final AcolytesRewardEffect effect) { diff --git a/Mage.Sets/src/mage/cards/a/AcornCatapult.java b/Mage.Sets/src/mage/cards/a/AcornCatapult.java index 34e7cf959c..fb2d3d3efc 100644 --- a/Mage.Sets/src/mage/cards/a/AcornCatapult.java +++ b/Mage.Sets/src/mage/cards/a/AcornCatapult.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.SquirrelToken; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,11 +54,11 @@ public class AcornCatapult extends CardImpl { public AcornCatapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - // {1}, {tap}: Acorn Catapult deals 1 damage to target creature or player. That creature's controller or that player creates a 1/1 green Squirrel creature token. + // {1}, {tap}: Acorn Catapult deals 1 damage to any target. That creature's controller or that player creates a 1/1 green Squirrel creature token. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addEffect(new AcornCatapultEffect()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/Aeolipile.java b/Mage.Sets/src/mage/cards/a/Aeolipile.java index 65f30d2b69..d7b7c269d1 100644 --- a/Mage.Sets/src/mage/cards/a/Aeolipile.java +++ b/Mage.Sets/src/mage/cards/a/Aeolipile.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,11 +49,11 @@ public class Aeolipile extends CardImpl { public Aeolipile(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - // {1}, {tap}, Sacrifice Aeolipile: Aeolipile deals 2 damage to target creature or player. + // {1}, {tap}, Sacrifice Aeolipile: Aeolipile deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AetherCharge.java b/Mage.Sets/src/mage/cards/a/AetherCharge.java index a0a3bd9699..1fc12854f0 100644 --- a/Mage.Sets/src/mage/cards/a/AetherCharge.java +++ b/Mage.Sets/src/mage/cards/a/AetherCharge.java @@ -27,6 +27,7 @@ */ package mage.cards.a; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -43,10 +44,7 @@ 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.common.TargetOpponent; - -import java.util.UUID; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -61,11 +59,11 @@ public class AetherCharge extends CardImpl { } public AetherCharge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}"); // Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent. Ability ability = new AetherChargeTriggeredAbility(); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } @@ -108,7 +106,7 @@ class AetherChargeTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent."; + return "Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent or planeswalker."; } @Override @@ -121,7 +119,7 @@ class AetherChargeEffect extends OneShotEffect { public AetherChargeEffect() { super(Outcome.Damage); - staticText = "you may have it deal 4 damage to target opponent"; + staticText = "you may have it deal 4 damage to target opponent or planeswalker"; } public AetherChargeEffect(final AetherChargeEffect effect) { @@ -141,12 +139,7 @@ class AetherChargeEffect extends OneShotEffect { creature = (Permanent) game.getLastKnownInformation(creatureId, Zone.BATTLEFIELD); } if (creature != null) { - UUID target = source.getTargets().getFirstTarget(); - Player opponent = game.getPlayer(target); - if (opponent != null) { - opponent.damage(4, creature.getId(), game, false, true); - return true; - } + return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), 4, creature.getId(), game, false, true) > 0; } return false; } diff --git a/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java b/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java index e03dc9d83b..7fe71f66d9 100644 --- a/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java +++ b/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.game.Game; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.CastSpellLastTurnWatcher; /** @@ -56,9 +56,9 @@ public class AetherfluxReservoir extends CardImpl { // Whenever you cast a spell, you gain 1 life for each spell you've cast this turn. this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(new AetherfluxReservoirDynamicValue()), false)); - // Pay 50 life: Aetherflux Reservoir deals 50 damage to target creature or player. + // Pay 50 life: Aetherflux Reservoir deals 50 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(50), new PayLifeCost(50)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java b/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java index 847b0c9836..b1182a161d 100644 --- a/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java +++ b/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java @@ -41,8 +41,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -51,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent; public class AethertorchRenegade extends CardImpl { public AethertorchRenegade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); this.power = new MageInt(1); @@ -67,7 +67,7 @@ public class AethertorchRenegade extends CardImpl { this.addAbility(ability); // {t}, Pay {E}{E}{E}{E}{E}{E}{E}{E}: Aethertorch Renegade deals 6 damage to target player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(6), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.addCost(new PayEnergyCost(8)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AirdropCondor.java b/Mage.Sets/src/mage/cards/a/AirdropCondor.java index a547e75f0a..364baf2004 100644 --- a/Mage.Sets/src/mage/cards/a/AirdropCondor.java +++ b/Mage.Sets/src/mage/cards/a/AirdropCondor.java @@ -44,7 +44,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,10 +67,10 @@ public class AirdropCondor extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {1}{R}, Sacrifice a Goblin creature: Airdrop Condor deals damage equal to the sacrificed creature's power to target creature or player. + // {1}{R}, Sacrifice a Goblin creature: Airdrop Condor deals damage equal to the sacrificed creature's power to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SacrificeCostCreaturesPower()), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AjaniVengeant.java b/Mage.Sets/src/mage/cards/a/AjaniVengeant.java index 6a8f6e3fb3..4bf61182c4 100644 --- a/Mage.Sets/src/mage/cards/a/AjaniVengeant.java +++ b/Mage.Sets/src/mage/cards/a/AjaniVengeant.java @@ -44,7 +44,7 @@ import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; import mage.target.TargetPlayer; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -70,12 +70,12 @@ public class AjaniVengeant extends CardImpl { ability1.addTarget(new TargetPermanent()); this.addAbility(ability1); - // −2: Ajani Vengeant deals 3 damage to target creature or player and you gain 3 life. + // −2: Ajani Vengeant deals 3 damage to any target and you gain 3 life. Effects effects1 = new Effects(); effects1.add(new DamageTargetEffect(3)); effects1.add(new GainLifeEffect(3)); LoyaltyAbility ability2 = new LoyaltyAbility(effects1, -2); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); // −7: Destroy all lands target player controls. diff --git a/Mage.Sets/src/mage/cards/a/AkoumBoulderfoot.java b/Mage.Sets/src/mage/cards/a/AkoumBoulderfoot.java index 2cdac92070..d5306a5adc 100644 --- a/Mage.Sets/src/mage/cards/a/AkoumBoulderfoot.java +++ b/Mage.Sets/src/mage/cards/a/AkoumBoulderfoot.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,7 +54,7 @@ public class AkoumBoulderfoot extends CardImpl { this.toughness = new MageInt(5); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1), false); - Target target = new TargetCreatureOrPlayer(); + Target target = new TargetAnyTarget(); ability.addTarget(target); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AkoumHellkite.java b/Mage.Sets/src/mage/cards/a/AkoumHellkite.java index f81428b2c6..04ac8ad3a3 100644 --- a/Mage.Sets/src/mage/cards/a/AkoumHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AkoumHellkite.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; import java.util.UUID; @@ -55,7 +55,7 @@ import java.util.UUID; public class AkoumHellkite extends CardImpl { public AkoumHellkite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -63,10 +63,10 @@ public class AkoumHellkite extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // <i>Landfall</i>-Whenever a land enters the battlefield under you control, Akoum Hellkite deals 1 damage to target creature or player. + // <i>Landfall</i>-Whenever a land enters the battlefield under you control, Akoum Hellkite deals 1 damage to any target. // If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead. Ability ability = new AkoumHellkiteTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -82,8 +82,8 @@ public class AkoumHellkite extends CardImpl { class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { - private static final String text = "<i>Landfall</i> - Whenever a land enters the battlefield under your control, {this} deals 1 damage to target creature or player. " - + "If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead."; + private static final String text = "<i>Landfall</i> - Whenever a land enters the battlefield under your control, {this} deals 1 damage to any target. " + + "If that land is a Mountain, Akoum Hellkite deals 2 damage to that permanent or player instead."; public AkoumHellkiteTriggeredAbility() { super(Zone.BATTLEFIELD, new AkoumHellkiteDamageEffect()); @@ -110,12 +110,13 @@ class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { && permanent.isLand() && permanent.getControllerId().equals(getControllerId())) { Permanent sourcePermanent = game.getPermanent(getSourceId()); - if (sourcePermanent != null) + if (sourcePermanent != null) { for (Effect effect : getEffects()) { - if (effect instanceof AkoumHellkiteDamageEffect) { - effect.setTargetPointer(new FixedTarget(permanent, game)); + if (effect instanceof AkoumHellkiteDamageEffect) { + effect.setTargetPointer(new FixedTarget(permanent, game)); + } + return true; } - return true; } } return false; diff --git a/Mage.Sets/src/mage/cards/a/AlabasterPotion.java b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java index 0dbcf088b9..36fdbf72b3 100644 --- a/Mage.Sets/src/mage/cards/a/AlabasterPotion.java +++ b/Mage.Sets/src/mage/cards/a/AlabasterPotion.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.target.TargetPlayer; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,12 +48,12 @@ public class AlabasterPotion extends CardImpl { public AlabasterPotion(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}{W}"); - // Choose one - Target player gains X life; or prevent the next X damage that would be dealt to target creature or player this turn. + // Choose one - Target player gains X life; or prevent the next X damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new GainLifeTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addTarget(new TargetPlayer()); Mode mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue())); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/a/AlabasterWall.java b/Mage.Sets/src/mage/cards/a/AlabasterWall.java index 037074e100..d23ce849f6 100644 --- a/Mage.Sets/src/mage/cards/a/AlabasterWall.java +++ b/Mage.Sets/src/mage/cards/a/AlabasterWall.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class AlabasterWall extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AladdinsRing.java b/Mage.Sets/src/mage/cards/a/AladdinsRing.java index 7a2df529f0..f50c083cbf 100644 --- a/Mage.Sets/src/mage/cards/a/AladdinsRing.java +++ b/Mage.Sets/src/mage/cards/a/AladdinsRing.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class AladdinsRing extends CardImpl { public AladdinsRing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{8}"); - // {8}, {tap}: Aladdin's Ring deals 4 damage to target creature or player. + // {8}, {tap}: Aladdin's Ring deals 4 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{8}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AmuletOfKroog.java b/Mage.Sets/src/mage/cards/a/AmuletOfKroog.java index ced0fe62c8..fbe7b6b4d4 100644 --- a/Mage.Sets/src/mage/cards/a/AmuletOfKroog.java +++ b/Mage.Sets/src/mage/cards/a/AmuletOfKroog.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,10 +49,10 @@ public class AmuletOfKroog extends CardImpl { public AmuletOfKroog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - // {2}, {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {2}, {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AnabaShaman.java b/Mage.Sets/src/mage/cards/a/AnabaShaman.java index 51b217fe98..c7423ba1d4 100644 --- a/Mage.Sets/src/mage/cards/a/AnabaShaman.java +++ b/Mage.Sets/src/mage/cards/a/AnabaShaman.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class AnabaShaman extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {R}, {tap}: Anaba Shaman deals 1 damage to target creature or player. + // {R}, {tap}: Anaba Shaman deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AncientHydra.java b/Mage.Sets/src/mage/cards/a/AncientHydra.java index e1ab614e92..9268475e05 100644 --- a/Mage.Sets/src/mage/cards/a/AncientHydra.java +++ b/Mage.Sets/src/mage/cards/a/AncientHydra.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,10 +57,10 @@ public class AncientHydra extends CardImpl { // Fading 5 this.addAbility(new FadingAbility(5, this)); - // {1}, Remove a fade counter from Ancient Hydra: Ancient Hydra deals 1 damage to target creature or player. + // {1}, Remove a fade counter from Ancient Hydra: Ancient Hydra deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new RemoveCountersSourceCost(CounterType.FADE.createInstance(1))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java b/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java index e520c69228..ec72e86d24 100644 --- a/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java +++ b/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -62,7 +62,7 @@ public class AngelOfSalvation extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Angel of Salvation enters the battlefield, prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. Ability ability = new EntersBattlefieldTriggeredAbility(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5)); - ability.addTarget(new TargetCreatureOrPlayerAmount(5)); + ability.addTarget(new TargetAnyTargetAmount(5)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java b/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java index e685f25760..c916f56244 100644 --- a/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java +++ b/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java @@ -52,6 +52,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -69,9 +70,11 @@ public class AngrathMinotaurPirate extends CardImpl { // +2: Angrath, Minotaur Pirate deals 1 damage to target opponent and each creature that player controls. Effects effects1 = new Effects(); effects1.add(new DamageTargetEffect(1)); - effects1.add(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()).setText("and each creature that player controls")); + effects1.add(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()) + .setText("and each creature that player or that planeswalker’s controller controls") + ); LoyaltyAbility ability1 = new LoyaltyAbility(effects1, +2); - ability1.addTarget(new TargetOpponent()); + ability1.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability1); // -3: Return target Pirate card from your graveyard to the battlefield. diff --git a/Mage.Sets/src/mage/cards/a/AngrathsFury.java b/Mage.Sets/src/mage/cards/a/AngrathsFury.java index 3141cb58d4..bd3e97a74a 100644 --- a/Mage.Sets/src/mage/cards/a/AngrathsFury.java +++ b/Mage.Sets/src/mage/cards/a/AngrathsFury.java @@ -36,8 +36,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.targetpointer.SecondTargetPointer; /** @@ -61,8 +61,8 @@ public class AngrathsFury extends CardImpl { // Angrath's Fury deals 3 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(3).setTargetPointer(new SecondTargetPointer()) - .setText("{this} deals 3 damage to target player")); - this.getSpellAbility().addTarget(new TargetPlayer()); + .setText("{this} deals 3 damage to target player or planeswalker")); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); // You may search your library and/or graveyard for a card named Angrath, Minotaur Pirate, reveal it, and put it into your hand. If you search your library this way, shuffle it. this.getSpellAbility().addEffect(new SearchLibraryGraveyardPutInHandEffect(filter) diff --git a/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java b/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java index 44148bda0f..9af1d8e8f9 100644 --- a/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java +++ b/Mage.Sets/src/mage/cards/a/AnnihilatingFire.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -48,9 +48,9 @@ public class AnnihilatingFire extends CardImpl { public AnnihilatingFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); - // Annihilating Fire deals 3 damage to target creature or player. + // Annihilating Fire deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/a/AnthemOfRakdos.java b/Mage.Sets/src/mage/cards/a/AnthemOfRakdos.java index c3ec17a417..7162578353 100644 --- a/Mage.Sets/src/mage/cards/a/AnthemOfRakdos.java +++ b/Mage.Sets/src/mage/cards/a/AnthemOfRakdos.java @@ -81,7 +81,7 @@ class AnthemOfRakdosHellbentEffect extends ReplacementEffectImpl { public AnthemOfRakdosHellbentEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "<i>Hellbent</i> - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead."; + staticText = "<i>Hellbent</i> - As long as you have no cards in hand, if a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead."; } public AnthemOfRakdosHellbentEffect(final AnthemOfRakdosHellbentEffect effect) { @@ -96,7 +96,8 @@ class AnthemOfRakdosHellbentEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.DAMAGE_CREATURE - || event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + || event.getType() == GameEvent.EventType.DAMAGE_PLAYER + || event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER; } @Override diff --git a/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java b/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java index 349da3a7ba..60b87e04ef 100644 --- a/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java +++ b/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java @@ -47,7 +47,7 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,10 +65,10 @@ public class ApocalypseHydra extends CardImpl { // Apocalypse Hydra enters the battlefield with X +1/+1 counters on it. If X is 5 or more, it enters the battlefield with an additional X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new ApocalypseHydraEffect())); - // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to target creature or player. + // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java b/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java index 03ca49a8ba..fe71009991 100644 --- a/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java +++ b/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class ApprenticeSorcerer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Apprentice Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared. + // {tap}: Apprentice Sorcerer deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArcBlade.java b/Mage.Sets/src/mage/cards/a/ArcBlade.java index c79568aab8..b800c6330c 100644 --- a/Mage.Sets/src/mage/cards/a/ArcBlade.java +++ b/Mage.Sets/src/mage/cards/a/ArcBlade.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,7 +50,7 @@ public class ArcBlade extends CardImpl { public ArcBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); - // Arc Blade deals 2 damage to target creature or player. + // Arc Blade deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); // Exile Arc Blade this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); @@ -58,7 +58,7 @@ public class ArcBlade extends CardImpl { Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), false, true); effect.setText("with 3 time counters on it"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Suspend 3-{2}{R} this.addAbility(new SuspendAbility(3, new ManaCostsImpl<>("{2}{R}"), this)); diff --git a/Mage.Sets/src/mage/cards/a/ArcLightning.java b/Mage.Sets/src/mage/cards/a/ArcLightning.java index 6baa527099..57d8ab770f 100644 --- a/Mage.Sets/src/mage/cards/a/ArcLightning.java +++ b/Mage.Sets/src/mage/cards/a/ArcLightning.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -46,7 +46,7 @@ public class ArcLightning extends CardImpl { // Arc Lightning deals 3 damage divided as you choose among one, two, or three target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(3)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3)); } public ArcLightning(final ArcLightning card) { diff --git a/Mage.Sets/src/mage/cards/a/ArcMage.java b/Mage.Sets/src/mage/cards/a/ArcMage.java index 4475f5da9d..b143071752 100644 --- a/Mage.Sets/src/mage/cards/a/ArcMage.java +++ b/Mage.Sets/src/mage/cards/a/ArcMage.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -62,7 +62,7 @@ public class ArcMage extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetCreatureOrPlayerAmount(2)); + ability.addTarget(new TargetAnyTargetAmount(2)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArcSlogger.java b/Mage.Sets/src/mage/cards/a/ArcSlogger.java index cf8ec355b8..2525d35386 100644 --- a/Mage.Sets/src/mage/cards/a/ArcSlogger.java +++ b/Mage.Sets/src/mage/cards/a/ArcSlogger.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class ArcSlogger extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(5); - // {R}, Exile the top ten cards of your library: Arc-Slogger deals 2 damage to target creature or player. + // {R}, Exile the top ten cards of your library: Arc-Slogger deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new ExileFromTopOfLibraryCost(10)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArcTrail.java b/Mage.Sets/src/mage/cards/a/ArcTrail.java index 2052a6e33b..eaeec496df 100644 --- a/Mage.Sets/src/mage/cards/a/ArcTrail.java +++ b/Mage.Sets/src/mage/cards/a/ArcTrail.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.a; import java.io.ObjectStreamException; @@ -37,13 +36,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; import mage.filter.predicate.mageobject.AnotherTargetPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,27 +50,27 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class ArcTrail extends CardImpl { - public ArcTrail (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); + public ArcTrail(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); - // Arc Trail deals 2 damage to target creature or player and 1 damage to another target creature or player - FilterCreatureOrPlayer filter1 = new FilterCreatureOrPlayer("creature or player to deal 2 damage"); - TargetCreatureOrPlayer target1 = new TargetCreatureOrPlayer(1, 1, filter1); + // Arc Trail deals 2 damage to any target and 1 damage to another any target + FilterCreaturePlayerOrPlaneswalker filter1 = new FilterCreaturePlayerOrPlaneswalker("creature, player or planeswalker to deal 2 damage"); + TargetAnyTarget target1 = new TargetAnyTarget(1, 1, filter1); target1.setTargetTag(1); this.getSpellAbility().addTarget(target1); - - FilterCreatureOrPlayer filter2 = new FilterCreatureOrPlayer("another creature or player to deal 1 damage"); + + FilterCreaturePlayerOrPlaneswalker filter2 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 1 damage"); AnotherTargetPredicate predicate = new AnotherTargetPredicate(2); filter2.getCreatureFilter().add(predicate); filter2.getPlayerFilter().add(predicate); - TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(1, 1, filter2); + TargetAnyTarget target2 = new TargetAnyTarget(1, 1, filter2); target2.setTargetTag(2); this.getSpellAbility().addTarget(target2); - + this.getSpellAbility().addEffect(ArcTrailEffect.getInstance()); } - public ArcTrail (final ArcTrail card) { + public ArcTrail(final ArcTrail card) { super(card); } @@ -84,7 +83,7 @@ public class ArcTrail extends CardImpl { class ArcTrailEffect extends OneShotEffect { - private static final ArcTrailEffect instance = new ArcTrailEffect(); + private static final ArcTrailEffect instance = new ArcTrailEffect(); private Object readResolve() throws ObjectStreamException { return instance; @@ -94,9 +93,9 @@ class ArcTrailEffect extends OneShotEffect { return instance; } - private ArcTrailEffect ( ) { + private ArcTrailEffect() { super(Outcome.Damage); - staticText = "{source} deals 2 damage to target creature or player and 1 damage to another target creature or player"; + staticText = "{source} deals 2 damage to any target and 1 damage to another target"; } @Override @@ -106,19 +105,19 @@ class ArcTrailEffect extends OneShotEffect { boolean twoDamageDone = false; int damage = 2; - for ( Target target : source.getTargets() ) { + for (Target target : source.getTargets()) { Permanent permanent = game.getPermanent(target.getFirstTarget()); - if ( twoDamageDone ) { + if (twoDamageDone) { damage = 1; } if (permanent != null) { - applied |= (permanent.damage( damage, source.getSourceId(), game, false, true ) > 0); + applied |= (permanent.damage(damage, source.getSourceId(), game, false, true) > 0); } Player player = game.getPlayer(target.getFirstTarget()); if (player != null) { - applied |= (player.damage( damage, source.getSourceId(), game, false, true ) > 0); + applied |= (player.damage(damage, source.getSourceId(), game, false, true) > 0); } twoDamageDone = true; diff --git a/Mage.Sets/src/mage/cards/a/ArcaneTeachings.java b/Mage.Sets/src/mage/cards/a/ArcaneTeachings.java index 8f9ad1f06d..64cadbdf3a 100644 --- a/Mage.Sets/src/mage/cards/a/ArcaneTeachings.java +++ b/Mage.Sets/src/mage/cards/a/ArcaneTeachings.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -61,7 +61,7 @@ public class ArcaneTeachings extends CardImpl { this.addAbility(ability); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield))); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); } diff --git a/Mage.Sets/src/mage/cards/a/ArlinnEmbracedByTheMoon.java b/Mage.Sets/src/mage/cards/a/ArlinnEmbracedByTheMoon.java index 793ed6ffbd..b101d4c664 100644 --- a/Mage.Sets/src/mage/cards/a/ArlinnEmbracedByTheMoon.java +++ b/Mage.Sets/src/mage/cards/a/ArlinnEmbracedByTheMoon.java @@ -45,7 +45,7 @@ import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; import mage.game.command.emblems.ArlinnEmbracedByTheMoonEmblem; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -72,14 +72,14 @@ public class ArlinnEmbracedByTheMoon extends CardImpl { ability.addEffect(effect); this.addAbility(ability); - // -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player. Transform Arlinn, Embraced by the Moon. + // -1: Arlinn, Embraced by the Moon deals 3 damage to any target. Transform Arlinn, Embraced by the Moon. this.addAbility(new TransformAbility()); ability = new LoyaltyAbility(new DamageTargetEffect(3), -1); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new TransformSourceEffect(false)); this.addAbility(ability); - // -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to target creature or player.'" + // -6: You get an emblem with "Creatures you control have haste and '{T}: This creature deals damage equal to its power to any target.'" this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ArlinnEmbracedByTheMoonEmblem()), -6)); } diff --git a/Mage.Sets/src/mage/cards/a/ArrowStorm.java b/Mage.Sets/src/mage/cards/a/ArrowStorm.java index 741c85126a..efb4e5ae1d 100644 --- a/Mage.Sets/src/mage/cards/a/ArrowStorm.java +++ b/Mage.Sets/src/mage/cards/a/ArrowStorm.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -47,17 +47,17 @@ public class ArrowStorm extends CardImpl { public ArrowStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - // Arrow Storm deals 4 damage to target creature or player. + // Arrow Storm deals 4 damage to any target. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(4), new InvertCondition(RaidCondition.instance), - "{this} deals 4 damage to target creature or player")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + "{this} deals 4 damage to any target")); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Raid - If you attacked with a creature this turn, instead Arrow Storm deals 5 damage to that creature or player and the damage can't be prevented. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(5, false), RaidCondition.instance, - "<br/><br/><i>Raid</i> — If you attacked with a creature this turn, instead {this} deals 5 damage to that creature or player and the damage can't be prevented")); + "<br/><br/><i>Raid</i> — If you attacked with a creature this turn, instead {this} deals 5 damage to that permanent or player and the damage can't be prevented")); this.getSpellAbility().addWatcher(new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/a/Artillerize.java b/Mage.Sets/src/mage/cards/a/Artillerize.java index be3de49bcf..7c283ad79d 100644 --- a/Mage.Sets/src/mage/cards/a/Artillerize.java +++ b/Mage.Sets/src/mage/cards/a/Artillerize.java @@ -37,7 +37,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,7 +57,7 @@ public class Artillerize extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); } diff --git a/Mage.Sets/src/mage/cards/a/AssaultBattery.java b/Mage.Sets/src/mage/cards/a/AssaultBattery.java index edc3513100..9a9805751e 100644 --- a/Mage.Sets/src/mage/cards/a/AssaultBattery.java +++ b/Mage.Sets/src/mage/cards/a/AssaultBattery.java @@ -36,7 +36,7 @@ import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.SpellAbilityType; import mage.game.permanent.token.ElephantToken; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; public class AssaultBattery extends SplitCard { @@ -44,11 +44,11 @@ public class AssaultBattery extends SplitCard { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}", "{3}{G}", SpellAbilityType.SPLIT); // Assault - // Assault deals 2 damage to target creature or player. + // Assault deals 2 damage to any target. Effect effect = new DamageTargetEffect(2); - effect.setText("Assault deals 2 damage to target creature or player"); + effect.setText("Assault deals 2 damage to any target"); getLeftHalfCard().getSpellAbility().addEffect(effect); - getLeftHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); // Battery // Create a 3/3 green Elephant creature token. diff --git a/Mage.Sets/src/mage/cards/a/AtarkaEfreet.java b/Mage.Sets/src/mage/cards/a/AtarkaEfreet.java index 1503ddbba0..bbd54f6f15 100644 --- a/Mage.Sets/src/mage/cards/a/AtarkaEfreet.java +++ b/Mage.Sets/src/mage/cards/a/AtarkaEfreet.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,11 +57,11 @@ public class AtarkaEfreet extends CardImpl { // Megamorph {2}{R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}"), true)); - // When Atarka Efreet is turned face up, it deals 1 damage to target creature or player. + // When Atarka Efreet is turned face up, it deals 1 damage to any target. Effect effect = new DamageTargetEffect(1, "it"); - effect.setText("it deals 1 damage to target creature or player"); + effect.setText("it deals 1 damage to any target"); Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect, false, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java index e34d4e1019..ff2129dc28 100644 --- a/Mage.Sets/src/mage/cards/a/AureliasFury.java +++ b/Mage.Sets/src/mage/cards/a/AureliasFury.java @@ -49,7 +49,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; @@ -88,7 +88,7 @@ public class AureliasFury extends CardImpl { DynamicValue xValue = new ManacostVariableValue(); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); this.getSpellAbility().addEffect(new AureliasFuryEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); this.getSpellAbility().addWatcher(new AureliasFuryDamagedByWatcher()); } diff --git a/Mage.Sets/src/mage/cards/a/AuroraEidolon.java b/Mage.Sets/src/mage/cards/a/AuroraEidolon.java index 1b34a4f45f..d97af29631 100644 --- a/Mage.Sets/src/mage/cards/a/AuroraEidolon.java +++ b/Mage.Sets/src/mage/cards/a/AuroraEidolon.java @@ -44,7 +44,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.MulticoloredPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -64,10 +64,10 @@ public class AuroraEidolon extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {W}, Sacrifice Aurora Eidolon: Prevent the next 3 damage that would be dealt to target creature or player this turn. + // {W}, Sacrifice Aurora Eidolon: Prevent the next 3 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Whenever you cast a multicolored spell, you may return Aurora Eidolon from your graveyard to your hand. this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, true, false)); diff --git a/Mage.Sets/src/mage/cards/a/AvacynGuardianAngel.java b/Mage.Sets/src/mage/cards/a/AvacynGuardianAngel.java index fbfa09f67f..5ac6231748 100644 --- a/Mage.Sets/src/mage/cards/a/AvacynGuardianAngel.java +++ b/Mage.Sets/src/mage/cards/a/AvacynGuardianAngel.java @@ -47,8 +47,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -57,13 +57,13 @@ import mage.target.common.TargetCreaturePermanent; public class AvacynGuardianAngel extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); - + static { filter.add(new AnotherPredicate()); } - + public AvacynGuardianAngel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ANGEL); @@ -75,17 +75,17 @@ public class AvacynGuardianAngel extends CardImpl { // Vigilance this.addAbility(VigilanceAbility.getInstance()); // {1}{W}: Prevent all damage that would be dealt to another target creature this turn by sources of the color of your choice. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new AvacynGuardianAngelPreventToCreatureEffect(), + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new AvacynGuardianAngelPreventToCreatureEffect(), new ManaCostsImpl<>("{1}{W}")); - ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); - + // {5}{W}{W}: Prevent all damage that would be dealt to target player this turn by sources of the color of your choice. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new AvacynGuardianAngelPreventToPlayerEffect(), + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new AvacynGuardianAngelPreventToPlayerEffect(), new ManaCostsImpl<>("{5}{W}{W}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -100,21 +100,21 @@ public class AvacynGuardianAngel extends CardImpl { } class AvacynGuardianAngelPreventToCreatureEffect extends OneShotEffect { - + AvacynGuardianAngelPreventToCreatureEffect() { super(Outcome.PreventDamage); this.staticText = "Prevent all damage that would be dealt to another target creature this turn by sources of the color of your choice"; } - + AvacynGuardianAngelPreventToCreatureEffect(final AvacynGuardianAngelPreventToCreatureEffect effect) { super(effect); } - + @Override public AvacynGuardianAngelPreventToCreatureEffect copy() { return new AvacynGuardianAngelPreventToCreatureEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -130,7 +130,7 @@ class AvacynGuardianAngelPreventToCreatureEffect extends OneShotEffect { } class AvacynGuardianAngelPreventToCreaturePreventionEffect extends PreventionEffectImpl { - + private final ObjectColor color; AvacynGuardianAngelPreventToCreaturePreventionEffect(ObjectColor color) { @@ -169,21 +169,21 @@ class AvacynGuardianAngelPreventToCreaturePreventionEffect extends PreventionEff } class AvacynGuardianAngelPreventToPlayerEffect extends OneShotEffect { - + AvacynGuardianAngelPreventToPlayerEffect() { super(Outcome.PreventDamage); - this.staticText = "Prevent all damage that would be dealt to target player this turn by sources of the color of your choice"; + this.staticText = "Prevent all damage that would be dealt to target player or planeswalker this turn by sources of the color of your choice"; } - + AvacynGuardianAngelPreventToPlayerEffect(final AvacynGuardianAngelPreventToPlayerEffect effect) { super(effect); } - + @Override public AvacynGuardianAngelPreventToPlayerEffect copy() { return new AvacynGuardianAngelPreventToPlayerEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -199,7 +199,7 @@ class AvacynGuardianAngelPreventToPlayerEffect extends OneShotEffect { } class AvacynGuardianAngelPreventToPlayerPreventionEffect extends PreventionEffectImpl { - + private final ObjectColor color; AvacynGuardianAngelPreventToPlayerPreventionEffect(ObjectColor color) { @@ -220,7 +220,8 @@ class AvacynGuardianAngelPreventToPlayerPreventionEffect extends PreventionEffec @Override public boolean applies(GameEvent event, Ability source, Game game) { if (super.applies(event, source, game)) { - if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER + if ((event.getType() == GameEvent.EventType.DAMAGE_PLAYER + || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) && event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { MageObject sourceObject = game.getObject(event.getSourceId()); if (sourceObject != null && sourceObject.getColor(game).shares(this.color)) { diff --git a/Mage.Sets/src/mage/cards/a/AvacynsJudgment.java b/Mage.Sets/src/mage/cards/a/AvacynsJudgment.java index 3fcfd65d15..e89b559381 100644 --- a/Mage.Sets/src/mage/cards/a/AvacynsJudgment.java +++ b/Mage.Sets/src/mage/cards/a/AvacynsJudgment.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.game.Game; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -60,7 +60,7 @@ public class AvacynsJudgment extends CardImpl { Effect effect = new DamageMultiEffect(xValue); effect.setText("{this} deals 2 damage divided as you choose among any number of target creatures and/or players. If {this}'s madness cost was paid, it deals X damage divided as you choose among those creatures and/or players instead."); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); } public AvacynsJudgment(final AvacynsJudgment card) { diff --git a/Mage.Sets/src/mage/cards/a/AvenRedeemer.java b/Mage.Sets/src/mage/cards/a/AvenRedeemer.java index 24224d57ec..a21f18c4bb 100644 --- a/Mage.Sets/src/mage/cards/a/AvenRedeemer.java +++ b/Mage.Sets/src/mage/cards/a/AvenRedeemer.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class AvenRedeemer extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java index c36cb3c830..c389674311 100644 --- a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java +++ b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java @@ -42,7 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.filter.StaticFilters; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -66,7 +66,7 @@ public class AxelrodGunnarson extends CardImpl { Effect effect = new DamageTargetEffect(1); effect.setText("and {this} deals 1 damage to target player"); ability.addEffect(effect); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BalefireLiege.java b/Mage.Sets/src/mage/cards/b/BalefireLiege.java index ea85d54463..93832398b0 100644 --- a/Mage.Sets/src/mage/cards/b/BalefireLiege.java +++ b/Mage.Sets/src/mage/cards/b/BalefireLiege.java @@ -45,7 +45,7 @@ import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author Loki @@ -65,16 +65,15 @@ public class BalefireLiege extends CardImpl { } public BalefireLiege(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}{R/W}{R/W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/W}{R/W}{R/W}"); this.subtype.add(SubType.SPIRIT, SubType.HORROR); - this.power = new MageInt(2); this.toughness = new MageInt(4); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterRedCreature, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterWhiteCreature, true))); Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(3), filterRedSpell, false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(3), filterWhiteSpell, false)); } diff --git a/Mage.Sets/src/mage/cards/b/BallistaCharger.java b/Mage.Sets/src/mage/cards/b/BallistaCharger.java index fd1752823d..afa1fbecc3 100644 --- a/Mage.Sets/src/mage/cards/b/BallistaCharger.java +++ b/Mage.Sets/src/mage/cards/b/BallistaCharger.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class BallistaCharger extends CardImpl { this.power = new MageInt(6); this.toughness = new MageInt(6); - // Whenever Ballista Charger attacks, it deals 1 damage to target creature or player. + // Whenever Ballista Charger attacks, it deals 1 damage to any target. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Crew 3 diff --git a/Mage.Sets/src/mage/cards/b/BalmOfRestoration.java b/Mage.Sets/src/mage/cards/b/BalmOfRestoration.java index 7e9309db42..efc6acf597 100644 --- a/Mage.Sets/src/mage/cards/b/BalmOfRestoration.java +++ b/Mage.Sets/src/mage/cards/b/BalmOfRestoration.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,10 +57,10 @@ public class BalmOfRestoration extends CardImpl { ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - // or prevent the next 2 damage that would be dealt to target creature or player this turn. + // or prevent the next 2 damage that would be dealt to any target this turn. Mode mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/b/Bandage.java b/Mage.Sets/src/mage/cards/b/Bandage.java index ca63702b87..076517d98d 100644 --- a/Mage.Sets/src/mage/cards/b/Bandage.java +++ b/Mage.Sets/src/mage/cards/b/Bandage.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,7 +46,7 @@ public class Bandage extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/b/Banefire.java b/Mage.Sets/src/mage/cards/b/Banefire.java index 46f7d109b5..ea5010d5a3 100644 --- a/Mage.Sets/src/mage/cards/b/Banefire.java +++ b/Mage.Sets/src/mage/cards/b/Banefire.java @@ -48,7 +48,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,9 +59,9 @@ public class Banefire extends CardImpl { public Banefire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Banefire deals X damage to target creature or player. + // Banefire deals X damage to any target. this.getSpellAbility().addEffect(new BaneFireEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // If X is 5 or more, Banefire can't be countered by spells or abilities and the damage can't be prevented. this.addAbility(new SimpleStaticAbility(Zone.STACK, new BanefireCantCounterEffect())); } @@ -101,7 +101,7 @@ class BaneFireEffect extends OneShotEffect { public BaneFireEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target creature or player"; + staticText = "{this} deals X damage to any target"; } public BaneFireEffect(final BaneFireEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/Banshee.java b/Mage.Sets/src/mage/cards/b/Banshee.java index 1e363ba069..74e344b9a7 100644 --- a/Mage.Sets/src/mage/cards/b/Banshee.java +++ b/Mage.Sets/src/mage/cards/b/Banshee.java @@ -43,7 +43,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,11 +57,11 @@ public class Banshee extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); - // {X}, {T}: Banshee deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(new ManacostVariableValue(), false)).setText("Banshee deals half X damage, rounded down, to target creature or player,"), new ManaCostsImpl("{X}")); + // {X}, {T}: Banshee deals half X damage, rounded down, to any target, and half X damage, rounded up, to you. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new HalfValue(new ManacostVariableValue(), false)).setText("Banshee deals half X damage, rounded down, to any target,"), new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); ability.addEffect(new DamageControllerEffect(new HalfValue(new ManacostVariableValue(), true)).setText(" and half X damage, rounded up, to you")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarbarianRing.java b/Mage.Sets/src/mage/cards/b/BarbarianRing.java index 0be70c8b3f..9ff322633f 100644 --- a/Mage.Sets/src/mage/cards/b/BarbarianRing.java +++ b/Mage.Sets/src/mage/cards/b/BarbarianRing.java @@ -42,7 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,14 +58,14 @@ public class BarbarianRing extends CardImpl { redManaAbility.addEffect(new DamageControllerEffect(1)); this.addAbility(redManaAbility); - // Threshold - {R}, {T}, Sacrifice Barbarian Ring: Barbarian Ring deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard. + // Threshold - {R}, {T}, Sacrifice Barbarian Ring: Barbarian Ring deals 2 damage to any target. Activate this ability only if seven or more cards are in your graveyard. Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}"), new CardsInControllerGraveCondition(7)); thresholdAbility.addCost(new TapSourceCost()); thresholdAbility.addCost(new SacrificeSourceCost()); - thresholdAbility.addTarget(new TargetCreatureOrPlayer()); + thresholdAbility.addTarget(new TargetAnyTarget()); thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(thresholdAbility); } diff --git a/Mage.Sets/src/mage/cards/b/BarbedField.java b/Mage.Sets/src/mage/cards/b/BarbedField.java index bf3923d04f..4ecff46c74 100644 --- a/Mage.Sets/src/mage/cards/b/BarbedField.java +++ b/Mage.Sets/src/mage/cards/b/BarbedField.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetLandPermanent; /** @@ -60,11 +60,11 @@ public class BarbedField extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted land has "{tap}: This land deals 1 damage to target creature or player." + // Enchanted land has "{tap}: This land deals 1 damage to any target." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: This land deals 1 damage to target creature or player.\""); + effect.setText("Enchanted land has \"{T}: This land deals 1 damage to any target.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/b/BarbedLightning.java b/Mage.Sets/src/mage/cards/b/BarbedLightning.java index 47098866f4..d79655bc32 100644 --- a/Mage.Sets/src/mage/cards/b/BarbedLightning.java +++ b/Mage.Sets/src/mage/cards/b/BarbedLightning.java @@ -34,8 +34,8 @@ import mage.abilities.keyword.EntwineAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,18 +44,18 @@ import mage.target.common.TargetCreaturePermanent; public class BarbedLightning extends CardImpl { public BarbedLightning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Choose one - Barbed Lightning deals 3 damage to target creature; this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - + // or Barbed Lightning deals 3 damage to target player. Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(3)); - mode.getTargets().add(new TargetPlayer()); + mode.getTargets().add(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().getModes().addMode(mode); - + // Entwine {2} this.addAbility(new EntwineAbility("{2}")); } diff --git a/Mage.Sets/src/mage/cards/b/BarrageOfExpendables.java b/Mage.Sets/src/mage/cards/b/BarrageOfExpendables.java index 34c1aa0091..41f05f1cd6 100644 --- a/Mage.Sets/src/mage/cards/b/BarrageOfExpendables.java +++ b/Mage.Sets/src/mage/cards/b/BarrageOfExpendables.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,10 +50,10 @@ public class BarrageOfExpendables extends CardImpl { public BarrageOfExpendables(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); - // {R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to target creature or player. + // {R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarrageOgre.java b/Mage.Sets/src/mage/cards/b/BarrageOgre.java index 2dee5278af..e6d6491e22 100644 --- a/Mage.Sets/src/mage/cards/b/BarrageOgre.java +++ b/Mage.Sets/src/mage/cards/b/BarrageOgre.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -64,7 +64,7 @@ public class BarrageOgre extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarrageTyrant.java b/Mage.Sets/src/mage/cards/b/BarrageTyrant.java index ac5751260e..bb351b52f5 100644 --- a/Mage.Sets/src/mage/cards/b/BarrageTyrant.java +++ b/Mage.Sets/src/mage/cards/b/BarrageTyrant.java @@ -46,7 +46,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorlessPredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -70,12 +70,12 @@ public class BarrageTyrant extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - // {2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to target creature or player. + // {2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to any target. Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower()); - effect.setText("{this} deals damage equal to the sacrificed creature's power to target creature or player"); + effect.setText("{this} deals damage equal to the sacrificed creature's power to any target"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarrentonMedic.java b/Mage.Sets/src/mage/cards/b/BarrentonMedic.java index 70c22c7b8f..33a439557c 100644 --- a/Mage.Sets/src/mage/cards/b/BarrentonMedic.java +++ b/Mage.Sets/src/mage/cards/b/BarrentonMedic.java @@ -42,7 +42,7 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class BarrentonMedic extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(4); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Put a -1/-1 counter on Barrenton Medic: Untap Barrenton Medic. diff --git a/Mage.Sets/src/mage/cards/b/BeaconOfDestruction.java b/Mage.Sets/src/mage/cards/b/BeaconOfDestruction.java index 64a9d749d4..09f5d0f09a 100644 --- a/Mage.Sets/src/mage/cards/b/BeaconOfDestruction.java +++ b/Mage.Sets/src/mage/cards/b/BeaconOfDestruction.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.ShuffleSpellEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,7 +45,7 @@ public class BeaconOfDestruction extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}"); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/b/BeeSting.java b/Mage.Sets/src/mage/cards/b/BeeSting.java index 2fecd72824..b9bb37fd65 100644 --- a/Mage.Sets/src/mage/cards/b/BeeSting.java +++ b/Mage.Sets/src/mage/cards/b/BeeSting.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,9 +43,9 @@ public class BeeSting extends CardImpl { public BeeSting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); - // Bee Sting deals 2 damage to target creature or player. + // Bee Sting deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public BeeSting(final BeeSting card) { diff --git a/Mage.Sets/src/mage/cards/b/BenevolentAncestor.java b/Mage.Sets/src/mage/cards/b/BenevolentAncestor.java index 9ce6ac9601..6294f27535 100644 --- a/Mage.Sets/src/mage/cards/b/BenevolentAncestor.java +++ b/Mage.Sets/src/mage/cards/b/BenevolentAncestor.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class BenevolentAncestor extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(4); this.addAbility(DefenderAbility.getInstance()); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlastOfGenius.java b/Mage.Sets/src/mage/cards/b/BlastOfGenius.java index 3b4a68b412..3be7b1f6ff 100644 --- a/Mage.Sets/src/mage/cards/b/BlastOfGenius.java +++ b/Mage.Sets/src/mage/cards/b/BlastOfGenius.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.b; import java.util.UUID; @@ -39,24 +38,21 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetDiscard; /** * * @author LevelX2 */ - - public class BlastOfGenius extends CardImpl { public BlastOfGenius(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{R}"); - - // Choose target creature or player. Draw three cards and discard a card. Blast of Genius deals damage equal to the converted mana cost of the discard card to that creature or player. + // Choose any target. Draw three cards and discard a card. Blast of Genius deals damage equal to the converted mana cost of the discard card to that creature or player. this.getSpellAbility().addEffect(new BlastOfGeniusEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public BlastOfGenius(final BlastOfGenius card) { @@ -74,7 +70,7 @@ class BlastOfGeniusEffect extends OneShotEffect { public BlastOfGeniusEffect() { super(Outcome.Benefit); - this.staticText = "Choose target creature or player. Draw three cards and discard a card. Blast of Genius deals damage equal to the converted mana cost of the discard card to that creature or player"; + this.staticText = "Choose any target. Draw three cards and discard a card. Blast of Genius deals damage equal to the converted mana cost of the discard card to that permanent or player"; } public BlastOfGeniusEffect(final BlastOfGeniusEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BlastingStation.java b/Mage.Sets/src/mage/cards/b/BlastingStation.java index 84c642e9b2..d99ff45889 100644 --- a/Mage.Sets/src/mage/cards/b/BlastingStation.java +++ b/Mage.Sets/src/mage/cards/b/BlastingStation.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.filter.common.FilterCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,10 +53,10 @@ public class BlastingStation extends CardImpl { public BlastingStation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - // {tap}, Sacrifice a creature: Blasting Station deals 1 damage to target creature or player. + // {tap}, Sacrifice a creature: Blasting Station deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Whenever a creature enters the battlefield, you may untap Blasting Station. this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new FilterCreaturePermanent("a creature"), true)); diff --git a/Mage.Sets/src/mage/cards/b/Blaze.java b/Mage.Sets/src/mage/cards/b/Blaze.java index 3f61dd30e7..a4430e9ea5 100644 --- a/Mage.Sets/src/mage/cards/b/Blaze.java +++ b/Mage.Sets/src/mage/cards/b/Blaze.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class Blaze extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Blaze deals X damage to target creature or player. + // Blaze deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Blaze(final Blaze card) { diff --git a/Mage.Sets/src/mage/cards/b/BlazingHellhound.java b/Mage.Sets/src/mage/cards/b/BlazingHellhound.java index e41b123b20..bd0ded2db5 100644 --- a/Mage.Sets/src/mage/cards/b/BlazingHellhound.java +++ b/Mage.Sets/src/mage/cards/b/BlazingHellhound.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class BlazingHellhound extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(3); - // {1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to target creature or player. + // {1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlazingTorch.java b/Mage.Sets/src/mage/cards/b/BlazingTorch.java index 623f9ee63b..7377c4d82a 100644 --- a/Mage.Sets/src/mage/cards/b/BlazingTorch.java +++ b/Mage.Sets/src/mage/cards/b/BlazingTorch.java @@ -43,7 +43,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.List; import java.util.UUID; @@ -73,10 +73,10 @@ public class BlazingTorch extends CardImpl { new CantBeBlockedByCreaturesAttachedEffect(Duration.WhileOnBattlefield, filter, AttachmentType.EQUIPMENT))); - // Equipped creature has "{tap}, Sacrifice Blazing Torch: Blazing Torch deals 2 damage to target creature or player.") + // Equipped creature has "{tap}, Sacrifice Blazing Torch: Blazing Torch deals 2 damage to any target.") Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlazingTorchDamageEffect(), new TapSourceCost()); ability.addCost(new BlazingTorchCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT))); // Equip {1} @@ -135,7 +135,7 @@ class BlazingTorchDamageEffect extends OneShotEffect { public BlazingTorchDamageEffect() { super(Outcome.Damage); - this.staticText = "Blazing Torch deals 2 damage to target creature or player"; + this.staticText = "Blazing Torch deals 2 damage to any target"; } public BlazingTorchDamageEffect(final BlazingTorchDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BlightedGorge.java b/Mage.Sets/src/mage/cards/b/BlightedGorge.java index 6a22c9fbbb..d749a3ec26 100644 --- a/Mage.Sets/src/mage/cards/b/BlightedGorge.java +++ b/Mage.Sets/src/mage/cards/b/BlightedGorge.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,13 +53,13 @@ public class BlightedGorge extends CardImpl { // {T}: Add {C}. this.addAbility(new ColorlessManaAbility()); - // {4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to target creature or player. + // {4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/Blightning.java b/Mage.Sets/src/mage/cards/b/Blightning.java index 7094630412..44579c451e 100644 --- a/Mage.Sets/src/mage/cards/b/Blightning.java +++ b/Mage.Sets/src/mage/cards/b/Blightning.java @@ -24,17 +24,24 @@ * 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.b; import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.targetpointer.FixedTarget; /** * @@ -43,14 +50,12 @@ import mage.target.TargetPlayer; public class Blightning extends CardImpl { public Blightning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{R}"); - - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{R}"); // Blightning deals 3 damage to target player. That player discards two cards. - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + this.getSpellAbility().addEffect(new BlightningEffect()); } public Blightning(final Blightning card) { @@ -62,3 +67,37 @@ public class Blightning extends CardImpl { return new Blightning(this); } } + +class BlightningEffect extends OneShotEffect { + + BlightningEffect() { + super(Outcome.Benefit); + this.staticText = "That player or that planeswalker’s controller discards two cards."; + } + + BlightningEffect(final BlightningEffect effect) { + super(effect); + } + + @Override + public BlightningEffect copy() { + return new BlightningEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player == null) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + player = game.getPlayer(permanent.getControllerId()); + } + } + if (player == null) { + return false; + } + Effect effect = new DiscardTargetEffect(2); + effect.setTargetPointer(new FixedTarget(player.getId(), game)); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/b/BlisterstickShaman.java b/Mage.Sets/src/mage/cards/b/BlisterstickShaman.java index d3e6d97929..be08e03f8f 100644 --- a/Mage.Sets/src/mage/cards/b/BlisterstickShaman.java +++ b/Mage.Sets/src/mage/cards/b/BlisterstickShaman.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,7 +52,7 @@ public class BlisterstickShaman extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodRites.java b/Mage.Sets/src/mage/cards/b/BloodRites.java index 5bc483980d..7a08a0239f 100644 --- a/Mage.Sets/src/mage/cards/b/BloodRites.java +++ b/Mage.Sets/src/mage/cards/b/BloodRites.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -51,7 +51,7 @@ public class BloodRites extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodhallPriest.java b/Mage.Sets/src/mage/cards/b/BloodhallPriest.java index 00f457e087..3139813d16 100644 --- a/Mage.Sets/src/mage/cards/b/BloodhallPriest.java +++ b/Mage.Sets/src/mage/cards/b/BloodhallPriest.java @@ -40,7 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,13 +54,13 @@ public class BloodhallPriest extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // Whenever Bloodhall Priest enters the battlefield or attacks, if you have no cards in hand, Bloodhall Priest deals 2 damage to target creature or player. + // 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 TargetCreatureOrPlayer()); + triggeredAbility.addTarget(new TargetAnyTarget()); this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, HellbentCondition.instance, - "Whenever {this} enters the battlefield or attacks, if you have no cards in hand, {this} deals 2 damage to target creature or player" + "Whenever {this} enters the battlefield or attacks, if you have no cards in hand, {this} deals 2 damage to any target" )); // Madness {1}{B}{R} diff --git a/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java b/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java index 353e5985fe..46b51b5f1f 100644 --- a/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java +++ b/Mage.Sets/src/mage/cards/b/BloodshotCyclops.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,12 +57,12 @@ public class BloodshotCyclops extends CardImpl { this.toughness = new MageInt(4); // {T}, Sacrifice a creature: Bloodshot Cyclops deals damage equal to the sacrificed - // creature's power to target creature or player. + // creature's power to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SacrificeCostCreaturesPower()), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BogardanHellkite.java b/Mage.Sets/src/mage/cards/b/BogardanHellkite.java index 755ec1723b..30ca44d995 100644 --- a/Mage.Sets/src/mage/cards/b/BogardanHellkite.java +++ b/Mage.Sets/src/mage/cards/b/BogardanHellkite.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -57,7 +57,7 @@ public class BogardanHellkite extends CardImpl { this.addAbility(FlashAbility.getInstance()); this.addAbility(FlyingAbility.getInstance()); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(5), false); - ability.addTarget(new TargetCreatureOrPlayerAmount(5)); + ability.addTarget(new TargetAnyTargetAmount(5)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java b/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java index 7c411620cc..459508d8d1 100644 --- a/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java +++ b/Mage.Sets/src/mage/cards/b/BoggartShenanigans.java @@ -39,7 +39,7 @@ import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -55,13 +55,12 @@ public class BoggartShenanigans extends CardImpl { } public BoggartShenanigans(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{2}{R}"); this.subtype.add(SubType.GOBLIN); - // Whenever another Goblin you control dies, you may have Boggart Shenanigans deal 1 damage to target player. Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1), true, filter, false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java b/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java index 52acc39fb1..095dd14d85 100644 --- a/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java +++ b/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java @@ -33,7 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,7 +47,7 @@ public class BoltOfKeranos extends CardImpl { // Bolt of Keranos deals 3 damage to target creature and/or player. Scry 1. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ScryEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/b/BomberCorps.java b/Mage.Sets/src/mage/cards/b/BomberCorps.java index 2e8ec3f62d..ae22396a38 100644 --- a/Mage.Sets/src/mage/cards/b/BomberCorps.java +++ b/Mage.Sets/src/mage/cards/b/BomberCorps.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class BomberCorps extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // Battalion - Whenever Bomber Corps and at least two other creatures attack, Bomber Corps deals 1 damage to target creature or player. + // Battalion - Whenever Bomber Corps and at least two other creatures attack, Bomber Corps deals 1 damage to any target. Ability ability = new BattalionAbility(new DamageTargetEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BonethornValesk.java b/Mage.Sets/src/mage/cards/b/BonethornValesk.java index ebaa60b72f..ec3bf003a9 100644 --- a/Mage.Sets/src/mage/cards/b/BonethornValesk.java +++ b/Mage.Sets/src/mage/cards/b/BonethornValesk.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class BonethornValesk extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(2); - // Whenever a permanent is turned face up, Bonethorn Valesk deals 1 damage to target creature or player. + // Whenever a permanent is turned face up, Bonethorn Valesk deals 1 damage to any target. Ability ability = new TurnedFaceUpAllTriggeredAbility(new DamageTargetEffect(1), new FilterPermanent("a permanent")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java index 3d3153f68f..cb0e9db6c2 100644 --- a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java @@ -50,8 +50,7 @@ import mage.target.TargetPlayer; public class BonfireOfTheDamned extends CardImpl { public BonfireOfTheDamned(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{X}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}"); // Bonfire of the Damned deals X damage to target player and each creature he or she controls. this.getSpellAbility().addEffect(new BonfireOfTheDamnedEffect()); @@ -77,7 +76,7 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { public BonfireOfTheDamnedEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target player and each creature he or she controls"; + staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; } public BonfireOfTheDamnedEffect(final BonfireOfTheDamnedEffect effect) { @@ -86,12 +85,12 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getFirstTarget()); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); if (player != null) { - int damage = source.getManaCostsToPay().getX(); - if (damage > 0) { + int damage = source.getManaCostsToPay().getX(); + if (damage > 0) { player.damage(damage, source.getSourceId(), game, false, true); - for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { + for (Permanent perm : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { perm.damage(damage, source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/b/BorborygmosEnraged.java b/Mage.Sets/src/mage/cards/b/BorborygmosEnraged.java index 0ccd6197b9..3e0d90897f 100644 --- a/Mage.Sets/src/mage/cards/b/BorborygmosEnraged.java +++ b/Mage.Sets/src/mage/cards/b/BorborygmosEnraged.java @@ -44,7 +44,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,9 +67,9 @@ public class BorborygmosEnraged extends CardImpl { //Whenever Borborygmous Enraged deals combat damage to a player, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard. this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new RevealLibraryPutIntoHandEffect(3, new FilterLandCard(), Zone.GRAVEYARD), false, false)); - //Discard a land card: Borborygmos Enraged deals 3 damage to target creature or player + //Discard a land card: Borborygmos Enraged deals 3 damage to any target Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BorosCharm.java b/Mage.Sets/src/mage/cards/b/BorosCharm.java index 62b2a76728..0be3fee184 100644 --- a/Mage.Sets/src/mage/cards/b/BorosCharm.java +++ b/Mage.Sets/src/mage/cards/b/BorosCharm.java @@ -40,8 +40,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.filter.common.FilterControlledPermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -49,13 +49,12 @@ import mage.target.common.TargetCreaturePermanent; */ public class BorosCharm extends CardImpl { - public BorosCharm (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}"); - + public BorosCharm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{W}"); //Choose one - Boros Charm deals 4 damage to target player this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); //or permanents you control are indestructible this turn Mode mode = new Mode(); Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledPermanent(), false); @@ -74,7 +73,7 @@ public class BorosCharm extends CardImpl { } @Override - public BorosCharm copy() { + public BorosCharm copy() { return new BorosCharm(this); } } diff --git a/Mage.Sets/src/mage/cards/b/BorosReckoner.java b/Mage.Sets/src/mage/cards/b/BorosReckoner.java index 54a67621c9..01e9bb8aeb 100644 --- a/Mage.Sets/src/mage/cards/b/BorosReckoner.java +++ b/Mage.Sets/src/mage/cards/b/BorosReckoner.java @@ -42,7 +42,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class BorosReckoner extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player. + // Whenever Boros Reckoner is dealt damage, it deals that much damage to any target. Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false, false, true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {R/W}: Boros Reckoner gains first strike until end of turn. @@ -81,7 +81,7 @@ class BorosReckonerDealDamageEffect extends OneShotEffect { public BorosReckonerDealDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals that much damage to target creature or player"; + this.staticText = "it deals that much damage to any target"; } public BorosReckonerDealDamageEffect(final BorosReckonerDealDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BoshIronGolem.java b/Mage.Sets/src/mage/cards/b/BoshIronGolem.java index 7a536f8755..484ed6270c 100644 --- a/Mage.Sets/src/mage/cards/b/BoshIronGolem.java +++ b/Mage.Sets/src/mage/cards/b/BoshIronGolem.java @@ -45,7 +45,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -64,12 +64,12 @@ public class BoshIronGolem extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); - // {3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player. + // {3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to any target. Effect effect = new DamageTargetEffect(new SacrificeCostConvertedMana("artifact")); - effect.setText("{this} deals damage equal to the sacrificed artifact's converted mana cost to target creature or player"); + effect.setText("{this} deals damage equal to the sacrificed artifact's converted mana cost to any target"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/Boulderfall.java b/Mage.Sets/src/mage/cards/b/Boulderfall.java index 6811d577e2..3696aa62e2 100644 --- a/Mage.Sets/src/mage/cards/b/Boulderfall.java +++ b/Mage.Sets/src/mage/cards/b/Boulderfall.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -46,7 +46,7 @@ public class Boulderfall extends CardImpl { // Boulderfall deals 5 damage divided as you choose among any number of target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(5)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5)); } public Boulderfall(final Boulderfall card) { diff --git a/Mage.Sets/src/mage/cards/b/BreyaEtheriumShaper.java b/Mage.Sets/src/mage/cards/b/BreyaEtheriumShaper.java index 231bbdbb45..6b03346951 100644 --- a/Mage.Sets/src/mage/cards/b/BreyaEtheriumShaper.java +++ b/Mage.Sets/src/mage/cards/b/BreyaEtheriumShaper.java @@ -44,9 +44,9 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.common.FilterControlledArtifactPermanent; import mage.game.permanent.token.ThopterToken; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -71,7 +71,7 @@ public class BreyaEtheriumShaper extends CardImpl { new DamageTargetEffect(3), new GenericManaCost(2)); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledArtifactPermanent("two artifacts"), true))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); // Target creature gets -4/-4 until end of turn. Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/b/BrimstoneMage.java b/Mage.Sets/src/mage/cards/b/BrimstoneMage.java index 4c71440e0c..f7109c0482 100644 --- a/Mage.Sets/src/mage/cards/b/BrimstoneMage.java +++ b/Mage.Sets/src/mage/cards/b/BrimstoneMage.java @@ -44,7 +44,7 @@ import mage.cards.LevelerCard; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,12 +62,12 @@ public class BrimstoneMage extends LevelerCard { this.addAbility(new LevelUpAbility(new ManaCostsImpl("{3}{R}"))); Abilities<Ability> abilities1 = new AbilitiesImpl<>(); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); abilities1.add(ability); Abilities<Ability> abilities2 = new AbilitiesImpl<>(); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); abilities2.add(ability); this.addAbilities(LevelerCardBuilder.construct( diff --git a/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java b/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java index 4cecd21270..4bd38fdb02 100644 --- a/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java +++ b/Mage.Sets/src/mage/cards/b/BrimstoneVolley.java @@ -37,7 +37,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.Watcher; import mage.watchers.common.MorbidWatcher; @@ -47,13 +47,12 @@ import mage.watchers.common.MorbidWatcher; public class BrimstoneVolley extends CardImpl { public BrimstoneVolley(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); - - // Brimstone Volley deals 3 damage to target creature or player. + // Brimstone Volley deals 3 damage to any target. // Morbid - Brimstone Volley deals 5 damage to that creature or player instead if a creature died this turn. this.getSpellAbility().addEffect(new BrimstoneVolleyEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public BrimstoneVolley(final BrimstoneVolley card) { @@ -70,7 +69,7 @@ class BrimstoneVolleyEffect extends OneShotEffect { public BrimstoneVolleyEffect() { super(Outcome.Damage); - staticText = "{this} deals 3 damage to target creature or player.\n Morbid - {this} deals 5 damage to that creature or player instead if a creature died this turn"; + staticText = "{this} deals 3 damage to any target.\n Morbid - {this} deals 5 damage to that permanent or player instead if a creature died this turn"; } public BrimstoneVolleyEffect(final BrimstoneVolleyEffect effect) { @@ -82,7 +81,7 @@ class BrimstoneVolleyEffect extends OneShotEffect { int damage = 3; Watcher watcher = game.getState().getWatchers().get(MorbidWatcher.class.getSimpleName()); if (watcher.conditionMet()) { - damage = 5; + damage = 5; } Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { diff --git a/Mage.Sets/src/mage/cards/b/BrionStoutarm.java b/Mage.Sets/src/mage/cards/b/BrionStoutarm.java index 94273699ee..2beaac8387 100644 --- a/Mage.Sets/src/mage/cards/b/BrionStoutarm.java +++ b/Mage.Sets/src/mage/cards/b/BrionStoutarm.java @@ -36,6 +36,7 @@ import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,9 +44,8 @@ import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -60,7 +60,7 @@ public class BrionStoutarm extends CardImpl { } public BrionStoutarm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GIANT, SubType.WARRIOR); @@ -73,7 +73,7 @@ public class BrionStoutarm extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BrionStoutarmEffect(), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -91,7 +91,7 @@ class BrionStoutarmEffect extends OneShotEffect { public BrionStoutarmEffect() { super(Outcome.Benefit); - this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player"; + this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player or planeswalker"; } public BrionStoutarmEffect(final BrionStoutarmEffect effect) { @@ -113,10 +113,7 @@ class BrionStoutarmEffect extends OneShotEffect { } } if (amount > 0) { - Player player = game.getPlayer(source.getFirstTarget()); - if (player != null) { - player.damage(amount, source.getSourceId(), game, false, true); - } + return new DamageTargetEffect(amount).apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/b/BrothersOfFire.java b/Mage.Sets/src/mage/cards/b/BrothersOfFire.java index 4af973a4fa..4bc9fd6223 100644 --- a/Mage.Sets/src/mage/cards/b/BrothersOfFire.java +++ b/Mage.Sets/src/mage/cards/b/BrothersOfFire.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,12 +54,12 @@ public class BrothersOfFire extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {1}{R}{R}: Brothers of Fire deals 1 damage to target creature or player and 1 damage to you. + // {1}{R}{R}: Brothers of Fire deals 1 damage to any target and 1 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}{R}")); Effect effect = new DamageControllerEffect(1); effect.setText("and 1 damage to you"); ability.addEffect(effect); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java b/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java index 0d9e581e8f..4cf29edf4d 100644 --- a/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java +++ b/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java @@ -42,7 +42,7 @@ import mage.filter.predicate.permanent.TappedPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class BurnAtTheStake extends CardImpl { // As an additional cost to cast Burn at the Stake, tap any number of untapped creatures you control. this.getSpellAbility().addCost(new TapVariableTargetCost(filter, true, "any number of")); - // Burn at the Stake deals damage to target creature or player equal to three times the number of creatures tapped this way. + // Burn at the Stake deals damage to any target equal to three times the number of creatures tapped this way. this.getSpellAbility().addEffect(new BurnAtTheStakeEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public BurnAtTheStake(final BurnAtTheStake card) { @@ -81,7 +81,7 @@ class BurnAtTheStakeEffect extends OneShotEffect { public BurnAtTheStakeEffect() { super(Outcome.Damage); - this.staticText = "{this} deals damage to target creature or player equal to three times the number of creatures tapped this way"; + this.staticText = "{this} deals damage to any target equal to three times the number of creatures tapped this way"; } public BurnAtTheStakeEffect(final BurnAtTheStakeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BurnFromWithin.java b/Mage.Sets/src/mage/cards/b/BurnFromWithin.java index e099d9ac81..df486c26b6 100644 --- a/Mage.Sets/src/mage/cards/b/BurnFromWithin.java +++ b/Mage.Sets/src/mage/cards/b/BurnFromWithin.java @@ -43,7 +43,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -55,10 +55,10 @@ public class BurnFromWithin extends CardImpl { public BurnFromWithin(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); - // Burn from Within deals X damage to target creature or player. If a creature is dealt damage this way, it loses indestructible until end of turn. + // Burn from Within deals X damage to any target. If a creature is dealt damage this way, it loses indestructible until end of turn. // If that creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new BurnFromWithinEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } @@ -76,7 +76,7 @@ class BurnFromWithinEffect extends OneShotEffect { public BurnFromWithinEffect() { super(Outcome.Benefit); - this.staticText = "{this} deals X damage to target creature or player. If a creature is dealt damage this way, it loses indestructible until end of turn. If that creature would die this turn, exile it instead"; + this.staticText = "{this} deals X damage to any target. If a creature is dealt damage this way, it loses indestructible until end of turn. If that creature would die this turn, exile it instead"; } public BurnFromWithinEffect(final BurnFromWithinEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BurnTrail.java b/Mage.Sets/src/mage/cards/b/BurnTrail.java index 2054c39020..619fc8a848 100644 --- a/Mage.Sets/src/mage/cards/b/BurnTrail.java +++ b/Mage.Sets/src/mage/cards/b/BurnTrail.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.ConspireAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class BurnTrail extends CardImpl { public BurnTrail(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); - // Burn Trail deals 3 damage to target creature or player. + // Burn Trail deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Conspire this.addAbility(new ConspireAbility(getId(), ConspireAbility.ConspireTargets.ONE)); diff --git a/Mage.Sets/src/mage/cards/b/BurningAnger.java b/Mage.Sets/src/mage/cards/b/BurningAnger.java index 902a62681f..90961c8297 100644 --- a/Mage.Sets/src/mage/cards/b/BurningAnger.java +++ b/Mage.Sets/src/mage/cards/b/BurningAnger.java @@ -42,7 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -63,13 +63,13 @@ public class BurningAnger extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{T}: This creature deals damage equal to its power to target creature or player." + // Enchanted creature has "{T}: This creature deals damage equal to its power to any target." Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); - effect.setText("{this} deals damage equal to its power to target creature or player"); + effect.setText("{this} deals damage equal to its power to any target"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals damage equal to its power to target creature or player.\""))); + "Enchanted creature has \"{T}: This creature deals damage equal to its power to any target.\""))); } public BurningAnger(final BurningAnger card) { diff --git a/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java b/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java index 11b08af2cd..121496fd2c 100644 --- a/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java +++ b/Mage.Sets/src/mage/cards/b/BurningEyeZubera.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,10 +56,10 @@ public class BurningEyeZubera extends CardImpl { this.power = new MageInt(3); 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 target creature or player. + // 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(), - "When {this} dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to target creature or player"); - ability.addTarget(new TargetCreatureOrPlayer()); + "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/b/BurningFields.java b/Mage.Sets/src/mage/cards/b/BurningFields.java index c8aaeae03f..e445d6f5cd 100644 --- a/Mage.Sets/src/mage/cards/b/BurningFields.java +++ b/Mage.Sets/src/mage/cards/b/BurningFields.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -41,10 +41,10 @@ import mage.target.common.TargetOpponent; public class BurningFields extends CardImpl { public BurningFields(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}"); // Burning Fields deals 5 damage to target opponent. - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); } diff --git a/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java b/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java index 22576a7ce3..8b350221a4 100644 --- a/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java +++ b/Mage.Sets/src/mage/cards/b/BurningSunsAvatar.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -56,9 +56,9 @@ public class BurningSunsAvatar extends CardImpl { // When Burning Sun's Avatar enters the battlefield, it deals 3 damage to target opponent and 3 damage to up to one target creature. Effect effect = new DamageTargetEffect(3); - effect.setText("it deals 3 damage to target opponent and 3 damage to up to one target creature"); + effect.setText("it deals 3 damage to target opponent or planeswalker and 3 damage to up to one target creature"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); ability.addTarget(new TargetCreaturePermanent(0, 1)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BurningVengeance.java b/Mage.Sets/src/mage/cards/b/BurningVengeance.java index 24a100e866..6b45a94c32 100644 --- a/Mage.Sets/src/mage/cards/b/BurningVengeance.java +++ b/Mage.Sets/src/mage/cards/b/BurningVengeance.java @@ -37,7 +37,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author nantuko @@ -48,7 +48,7 @@ public class BurningVengeance extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to target creature or player. + // Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to any target. this.addAbility(new BurningVengeanceOnCastAbility()); } @@ -64,11 +64,11 @@ public class BurningVengeance extends CardImpl { class BurningVengeanceOnCastAbility extends TriggeredAbilityImpl { - private static final String abilityText = "Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to target creature or player"; + private static final String abilityText = "Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to any target"; BurningVengeanceOnCastAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(2), false); - TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + TargetAnyTarget target = new TargetAnyTarget(); this.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/b/BurstLightning.java b/Mage.Sets/src/mage/cards/b/BurstLightning.java index 9bd47068d1..1a3ca50cc2 100644 --- a/Mage.Sets/src/mage/cards/b/BurstLightning.java +++ b/Mage.Sets/src/mage/cards/b/BurstLightning.java @@ -24,8 +24,7 @@ * 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.b; import java.util.UUID; @@ -36,7 +35,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,16 +44,15 @@ import mage.target.common.TargetCreatureOrPlayer; public class BurstLightning extends CardImpl { public BurstLightning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // Kicker {4} (You may pay an additional {4} as you cast this spell.) this.addAbility(new KickerAbility("{4}")); - // Burst Lightning deals 2 damage to target creature or player. If Burst Lightning was kicked, it deals 4 damage to that creature or player instead. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Burst Lightning deals 2 damage to any target. If Burst Lightning was kicked, it deals 4 damage to that creature or player instead. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(4), - new DamageTargetEffect(2), KickedCondition.instance, "{this} deals 2 damage to target creature or player. If {this} was kicked, it deals 4 damage to that creature or player instead")); + new DamageTargetEffect(2), KickedCondition.instance, "{this} deals 2 damage to any target. If {this} was kicked, it deals 4 damage to that permanent or player instead")); } public BurstLightning(final BurstLightning card) { diff --git a/Mage.Sets/src/mage/cards/c/CacklingFlames.java b/Mage.Sets/src/mage/cards/c/CacklingFlames.java index e4946b1444..10a3f9e4fe 100644 --- a/Mage.Sets/src/mage/cards/c/CacklingFlames.java +++ b/Mage.Sets/src/mage/cards/c/CacklingFlames.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,22 +44,20 @@ import mage.target.common.TargetCreatureOrPlayer; public class CacklingFlames extends CardImpl { public CacklingFlames(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - - // Cackling Flames deals 3 damage to target creature or player. + // Cackling Flames deals 3 damage to any target. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(3), new InvertCondition(HellbentCondition.instance), - "{this} deals 3 damage to target creature or player")); + "{this} deals 3 damage to any target")); // Hellbent - Cackling Flames deals 5 damage to that creature or player instead if you have no cards in hand. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(5), HellbentCondition.instance, - "<br/><br/><i>Hellbent</i> - {this} deals 5 damage to that creature or player instead if you have no cards in hand.")); - - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + "<br/><br/><i>Hellbent</i> - {this} deals 5 damage to that permanent or player instead if you have no cards in hand.")); + + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public CacklingFlames(final CacklingFlames card) { diff --git a/Mage.Sets/src/mage/cards/c/CandlesGlow.java b/Mage.Sets/src/mage/cards/c/CandlesGlow.java index 9377a6d3cb..5dd1a212fe 100644 --- a/Mage.Sets/src/mage/cards/c/CandlesGlow.java +++ b/Mage.Sets/src/mage/cards/c/CandlesGlow.java @@ -38,7 +38,7 @@ import mage.constants.SubType; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -53,9 +53,9 @@ public class CandlesGlow extends CardImpl { this.subtype.add(SubType.ARCANE); - // Prevent the next 3 damage that would be dealt to target creature or player this turn. You gain life equal to the damage prevented this way. + // Prevent the next 3 damage that would be dealt to any target this turn. You gain life equal to the damage prevented this way. this.getSpellAbility().addEffect(new CandlesGlowPreventDamageTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Splice onto Arcane {1}{W} this.addAbility(new SpliceOntoArcaneAbility("{1}{W}")); } @@ -76,7 +76,7 @@ class CandlesGlowPreventDamageTargetEffect extends PreventionEffectImpl { public CandlesGlowPreventDamageTargetEffect(Duration duration) { super(duration); - staticText = "Prevent the next 3 damage that would be dealt to target creature or player this turn. You gain life equal to the damage prevented this way"; + staticText = "Prevent the next 3 damage that would be dealt to any target this turn. You gain life equal to the damage prevented this way"; } public CandlesGlowPreventDamageTargetEffect(final CandlesGlowPreventDamageTargetEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java b/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java index a6015743b3..a482bab3da 100644 --- a/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java +++ b/Mage.Sets/src/mage/cards/c/CapriciousSorcerer.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class CapriciousSorcerer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Capricious Sorcerer deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared. + // {tap}: Capricious Sorcerer deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/Carbonize.java b/Mage.Sets/src/mage/cards/c/Carbonize.java index 2994312582..fc5381ca80 100644 --- a/Mage.Sets/src/mage/cards/c/Carbonize.java +++ b/Mage.Sets/src/mage/cards/c/Carbonize.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -47,11 +47,11 @@ public class Carbonize extends CardImpl { public Carbonize(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); - // Carbonize deals 3 damage to target creature or player. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. + // Carbonize deals 3 damage to any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature")); this.getSpellAbility().addEffect(new ExileTargetIfDiesEffect().setText("If the creature would die this turn, exile it instead")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addWatcher(new DamagedByWatcher()); } diff --git a/Mage.Sets/src/mage/cards/c/Caregiver.java b/Mage.Sets/src/mage/cards/c/Caregiver.java index 8ccac42800..b974fd7b4e 100644 --- a/Mage.Sets/src/mage/cards/c/Caregiver.java +++ b/Mage.Sets/src/mage/cards/c/Caregiver.java @@ -43,7 +43,7 @@ import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,10 +59,10 @@ public class Caregiver extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {W}, Sacrifice a creature: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {W}, Sacrifice a creature: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ColoredManaCost(ColoredManaSymbol.W)); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CauterySliver.java b/Mage.Sets/src/mage/cards/c/CauterySliver.java index d4eea5a66f..9827edb286 100644 --- a/Mage.Sets/src/mage/cards/c/CauterySliver.java +++ b/Mage.Sets/src/mage/cards/c/CauterySliver.java @@ -44,9 +44,9 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreatureOrPlayer; import mage.filter.common.FilterCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; +import mage.target.common.TargetAnyTarget; /** * @@ -57,18 +57,18 @@ public class CauterySliver extends CardImpl { private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "All Slivers"); public CauterySliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); - // All Slivers have "{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player." + // All Slivers have "{1}, Sacrifice this permanent: This permanent deals 1 damage to any target." Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("1")); ability1.addCost(new SacrificeSourceCost()); - ability1.addTarget(new TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability1, Duration.WhileOnBattlefield, filter, - "All Slivers have \"{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player.\""))); + "All Slivers have \"{1}, Sacrifice this permanent: This permanent deals 1 damage to any target.\""))); // All Slivers have "{1}, Sacrifice this permanent: Prevent the next 1 damage that would be dealt to target Sliver creature or player this turn." Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("1")); ability2.addCost(new SacrificeSourceCost()); @@ -88,16 +88,17 @@ public class CauterySliver extends CardImpl { } } +class TargetSliverCreatureOrPlayer extends TargetAnyTarget { -class TargetSliverCreatureOrPlayer extends TargetCreatureOrPlayer { - public TargetSliverCreatureOrPlayer(){ + public TargetSliverCreatureOrPlayer() { super(); filter = new FilterCreatureOrPlayerByType("Sliver", "Sliver creature or player"); } } -class FilterCreatureOrPlayerByType extends FilterCreatureOrPlayer { - public FilterCreatureOrPlayerByType (String type, String name) { +class FilterCreatureOrPlayerByType extends FilterCreaturePlayerOrPlaneswalker { + + public FilterCreatureOrPlayerByType(String type, String name) { super(name); creatureFilter = new FilterCreaturePermanent(type); } diff --git a/Mage.Sets/src/mage/cards/c/ChainLightning.java b/Mage.Sets/src/mage/cards/c/ChainLightning.java index bb06d3431b..0be470e6a0 100644 --- a/Mage.Sets/src/mage/cards/c/ChainLightning.java +++ b/Mage.Sets/src/mage/cards/c/ChainLightning.java @@ -40,7 +40,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class ChainLightning extends CardImpl { public ChainLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Chain Lightning deals 3 damage to target creature or player. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy. + // Chain Lightning deals 3 damage to any target. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy. this.getSpellAbility().addEffect(new ChainLightningEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ChainLightning(final ChainLightning card) { @@ -70,7 +70,7 @@ class ChainLightningEffect extends OneShotEffect { ChainLightningEffect() { super(Outcome.Damage); - this.staticText = "Chain Lightning deals 3 damage to target creature or player. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy."; + this.staticText = "Chain Lightning deals 3 damage to any target. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy."; } ChainLightningEffect(final ChainLightningEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/ChainOfPlasma.java b/Mage.Sets/src/mage/cards/c/ChainOfPlasma.java index 7d7a5019a5..984664125e 100644 --- a/Mage.Sets/src/mage/cards/c/ChainOfPlasma.java +++ b/Mage.Sets/src/mage/cards/c/ChainOfPlasma.java @@ -40,7 +40,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class ChainOfPlasma extends CardImpl { public ChainOfPlasma(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - // Chain of Plasma deals 3 damage to target creature or player. Then that player or that creature's controller may discard a card. If the player does, he or she may copy this spell and may choose a new target for that copy. + // Chain of Plasma deals 3 damage to any target. Then that player or that creature's controller may discard a card. If the player does, he or she may copy this spell and may choose a new target for that copy. this.getSpellAbility().addEffect(new ChainOfPlasmaEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ChainOfPlasma(final ChainOfPlasma card) { @@ -70,7 +70,7 @@ class ChainOfPlasmaEffect extends OneShotEffect { ChainOfPlasmaEffect() { super(Outcome.Damage); - this.staticText = "{this} deals 3 damage to target creature or player. Then that player or that creature's controller may discard a card. If the player does, he or she may copy this spell and may choose a new target for that copy."; + this.staticText = "{this} deals 3 damage to any target. Then that player or that creature's controller may discard a card. If the player does, he or she may copy this spell and may choose a new target for that copy."; } ChainOfPlasmaEffect(final ChainOfPlasmaEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/Chainflinger.java b/Mage.Sets/src/mage/cards/c/Chainflinger.java index 40518970cb..6c53686a34 100644 --- a/Mage.Sets/src/mage/cards/c/Chainflinger.java +++ b/Mage.Sets/src/mage/cards/c/Chainflinger.java @@ -42,7 +42,7 @@ import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,18 +57,18 @@ public class Chainflinger extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {1}{R}, {tap}: Chainflinger deals 1 damage to target creature or player. + // {1}{R}, {tap}: Chainflinger deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1),new ManaCostsImpl("{1}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // Threshold - {2}{R}, {tap}: Chainflinger deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard. + // Threshold - {2}{R}, {tap}: Chainflinger deals 2 damage to any target. Activate this ability only if seven or more cards are in your graveyard. Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}"), new CardsInControllerGraveCondition(7)); thresholdAbility.addCost(new TapSourceCost()); - thresholdAbility.addTarget(new TargetCreatureOrPlayer()); + thresholdAbility.addTarget(new TargetAnyTarget()); thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(thresholdAbility); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraAblaze.java b/Mage.Sets/src/mage/cards/c/ChandraAblaze.java index 5eb51cacf8..912937767a 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraAblaze.java +++ b/Mage.Sets/src/mage/cards/c/ChandraAblaze.java @@ -52,7 +52,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetDiscard; /** @@ -68,10 +68,10 @@ public class ChandraAblaze extends CardImpl { this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); - // +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player. + // +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to any target. LoyaltyAbility ability = new LoyaltyAbility(new ChandraAblazeEffect1(), 1); ability.addEffect(new ChandraAblazeEffect2()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // -2: Each player discards their hand, then draws three cards. ability = new LoyaltyAbility(new DiscardHandAllEffect(), -2); @@ -132,7 +132,7 @@ class ChandraAblazeEffect2 extends OneShotEffect { public ChandraAblazeEffect2() { super(Outcome.Damage); - this.staticText = "If a red card is discarded this way, {this} deals 4 damage to target creature or player"; + this.staticText = "If a red card is discarded this way, {this} deals 4 damage to any target"; } public ChandraAblazeEffect2(final ChandraAblazeEffect2 effect) { diff --git a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java index 55e1fcc0bf..4ee014c814 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java +++ b/Mage.Sets/src/mage/cards/c/ChandraFireOfKaladesh.java @@ -49,7 +49,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -64,7 +64,7 @@ public class ChandraFireOfKaladesh extends CardImpl { } public ChandraFireOfKaladesh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); @@ -73,15 +73,15 @@ public class ChandraFireOfKaladesh extends CardImpl { this.transformable = true; this.secondSideCardClazz = ChandraRoaringFlame.class; - + // Whenever you cast a red spell, untap Chandra, Fire of Kaladesh. this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false)); - + // {T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control. this.addAbility(new TransformAbility()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Gender.FEMALE), new SourceDealtDamageCondition(3))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java index fb4aec1f8b..8f0c92c2f6 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java +++ b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java @@ -47,6 +47,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -55,7 +56,7 @@ import mage.target.common.TargetCreaturePermanent; public class ChandraNalaar extends CardImpl { public ChandraNalaar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CHANDRA); @@ -74,9 +75,11 @@ public class ChandraNalaar extends CardImpl { // -8: Chandra Nalaar deals 10 damage to target player and each creature he or she controls. Effects effects1 = new Effects(); effects1.add(new DamageTargetEffect(10)); - effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent())); + effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent()) + .setText("and each creature that player or that planeswalker’s controller controls") + ); LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8); - ability3.addTarget(new TargetPlayer()); + ability3.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability3); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java index bc27583600..3490d0000d 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java @@ -43,8 +43,8 @@ import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -53,7 +53,7 @@ import mage.target.common.TargetCreaturePermanent; public class ChandraPyrogenius extends CardImpl { public ChandraPyrogenius(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CHANDRA); @@ -70,9 +70,11 @@ public class ChandraPyrogenius extends CardImpl { // -10: Chandra, Pyrogenius deals 6 damage to target player and each creature he or she controls. Effects effects = new Effects(); effects.add(new DamageTargetEffect(6)); - effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent())); + effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent()) + .setText("and each creature that player or that planeswalker’s controller controls") + ); ability = new LoyaltyAbility(effects, -10); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java index 2ad8974aa9..7ada58cf61 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java @@ -51,7 +51,7 @@ import mage.players.Player; import mage.target.Target; import mage.target.TargetCard; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.targetpointer.FixedTarget; /** @@ -68,7 +68,7 @@ public class ChandraPyromaster extends CardImpl { // +1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn. LoyaltyAbility ability1 = new LoyaltyAbility(new ChandraPyromasterEffect1(), 1); - Target target1 = new TargetPlayer(); + Target target1 = new TargetPlayerOrPlaneswalker(); ability1.addTarget(target1); ability1.addTarget(new ChandraPyromasterTarget()); this.addAbility(ability1); @@ -97,7 +97,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { public ChandraPyromasterEffect1() { super(Outcome.Damage); - staticText = "{this} deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn"; + staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to up to one target creature that player or that planeswalker’s controller controls. That creature can’t block this turn."; } public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) { @@ -111,10 +111,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); - if (player != null) { - player.damage(1, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 1, source.getSourceId(), game, false, true); Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { creature.damage(1, source.getSourceId(), game, false, true); @@ -129,7 +126,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { class ChandraPyromasterTarget extends TargetPermanent { public ChandraPyromasterTarget() { - super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false); + super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false); } public ChandraPyromasterTarget(final ChandraPyromasterTarget target) { @@ -138,7 +135,11 @@ class ChandraPyromasterTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - UUID firstTarget = source.getFirstTarget(); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + UUID firstTarget = player.getId(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -163,10 +164,13 @@ class ChandraPyromasterTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - for (UUID targetId : availablePossibleTargets) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null && permanent.getControllerId().equals(playerId)) { - possibleTargets.add(targetId); + Player player = game.getPlayerOrPlaneswalkerController(playerId); + if (player != null) { + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(player.getId())) { + possibleTargets.add(targetId); + } } } } diff --git a/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java b/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java index 3f3fda5930..f048556ec5 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java +++ b/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java @@ -44,8 +44,8 @@ import mage.constants.SuperType; import mage.game.Game; import mage.game.command.emblems.ChandraRoaringFlameEmblem; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -66,7 +66,7 @@ public class ChandraRoaringFlame extends CardImpl { // +1: Chandra, Roaring Flame deals 2 damage to target player. LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DamageTargetEffect(2), 1); - loyaltyAbility.addTarget(new TargetPlayer()); + loyaltyAbility.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(loyaltyAbility); //-2: Chandra, Roaring Flame deals 2 damage to target creature. diff --git a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java index 1d474d1b25..4648830aca 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTheFirebrand.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -55,15 +55,15 @@ import mage.target.targetpointer.FixedTarget; public class ChandraTheFirebrand extends CardImpl { public ChandraTheFirebrand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CHANDRA); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(3)); - // +1: Chandra, the Firebrand deals 1 damage to target creature or player. + // +1: Chandra, the Firebrand deals 1 damage to any target. LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(1), 1); - ability1.addTarget(new TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); this.addAbility(ability1); // -2: When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy. @@ -72,8 +72,8 @@ public class ChandraTheFirebrand extends CardImpl { this.addAbility(new LoyaltyAbility(effect, -2)); // -6: Chandra, the Firebrand deals 6 damage to each of up to six target creatures and/or players - LoyaltyAbility ability2 = new LoyaltyAbility(new DamageTargetEffect(6, true, "each of up to six target creatures and/or players"), -6); - ability2.addTarget(new TargetCreatureOrPlayer(0, 6)); + LoyaltyAbility ability2 = new LoyaltyAbility(new DamageTargetEffect(6, true, "each of up to six targets"), -6); + ability2.addTarget(new TargetAnyTarget(0, 6)); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index 2280704991..182452c4f3 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java @@ -78,7 +78,7 @@ public class ChandraTorchOfDefiance extends CardImpl { ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - // -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player." + // -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to any target." this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ChandraTorchOfDefianceEmblem()), -7)); } diff --git a/Mage.Sets/src/mage/cards/c/ChandrasFury.java b/Mage.Sets/src/mage/cards/c/ChandrasFury.java index 0f1806ab5c..a25b23272c 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasFury.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasFury.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -43,13 +43,14 @@ import mage.target.TargetPlayer; public class ChandrasFury extends CardImpl { public ChandrasFury(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); // Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent())); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()) + .setText("and each creature that player or that planeswalker’s controller controls") + ); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public ChandrasFury(final ChandrasFury card) { diff --git a/Mage.Sets/src/mage/cards/c/ChandrasPyrohelix.java b/Mage.Sets/src/mage/cards/c/ChandrasPyrohelix.java index b08f8abf24..b86587adb9 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasPyrohelix.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasPyrohelix.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -48,7 +48,7 @@ public class ChandrasPyrohelix extends CardImpl { Effect effect = new DamageMultiEffect(2); effect.setText("{this} deals 2 damage divided as you choose among one or two target creatures and/or players"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2)); } public ChandrasPyrohelix(final ChandrasPyrohelix card) { diff --git a/Mage.Sets/src/mage/cards/c/Char.java b/Mage.Sets/src/mage/cards/c/Char.java index cbc0979302..b9defa2b2e 100644 --- a/Mage.Sets/src/mage/cards/c/Char.java +++ b/Mage.Sets/src/mage/cards/c/Char.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class Char extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Char deals 4 damage to target creature or player and 2 damage to you. + // Char deals 4 damage to any target and 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); Effect effect = new DamageControllerEffect(2); effect.setText("and 2 damage to you"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/c/CinderElemental.java b/Mage.Sets/src/mage/cards/c/CinderElemental.java index 93c6340345..e7836fce76 100644 --- a/Mage.Sets/src/mage/cards/c/CinderElemental.java +++ b/Mage.Sets/src/mage/cards/c/CinderElemental.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,11 +56,11 @@ public class CinderElemental extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {X}{R}, {tap}, Sacrifice Cinder Elemental: Cinder Elemental deals X damage to target creature or player. + // {X}{R}, {tap}, Sacrifice Cinder Elemental: Cinder Elemental deals X damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CinderHellion.java b/Mage.Sets/src/mage/cards/c/CinderHellion.java index ea96a42fd0..fc4713ee59 100644 --- a/Mage.Sets/src/mage/cards/c/CinderHellion.java +++ b/Mage.Sets/src/mage/cards/c/CinderHellion.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -46,7 +46,7 @@ import mage.target.common.TargetOpponent; public class CinderHellion extends CardImpl { public CinderHellion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); this.subtype.add(SubType.HELLION); this.power = new MageInt(4); this.toughness = new MageInt(4); @@ -56,7 +56,7 @@ public class CinderHellion extends CardImpl { // When Cinder Hellion enters the battlefield, it deals 2 damage to target opponent. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java index 92b7e87d9e..a6d10ccb38 100644 --- a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java +++ b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.c; import java.util.UUID; @@ -44,33 +43,34 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author Loki */ public class CinderPyromancer extends CardImpl { + private static final FilterSpell filter = new FilterSpell("a red spell"); static { filter.add(new ColorPredicate(ObjectColor.RED)); } - public CinderPyromancer (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + public CinderPyromancer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(0); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, true)); } - public CinderPyromancer (final CinderPyromancer card) { + public CinderPyromancer(final CinderPyromancer card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/c/CinderStorm.java b/Mage.Sets/src/mage/cards/c/CinderStorm.java index 645951e4a4..0926274e63 100644 --- a/Mage.Sets/src/mage/cards/c/CinderStorm.java +++ b/Mage.Sets/src/mage/cards/c/CinderStorm.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,8 +43,8 @@ public class CinderStorm extends CardImpl { public CinderStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{R}"); - // Cinder Storm deals 7 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Cinder Storm deals 7 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(7)); } diff --git a/Mage.Sets/src/mage/cards/c/ClanDefiance.java b/Mage.Sets/src/mage/cards/c/ClanDefiance.java index 7df2fee54c..c918242c0a 100644 --- a/Mage.Sets/src/mage/cards/c/ClanDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ClanDefiance.java @@ -38,8 +38,8 @@ import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -56,8 +56,7 @@ public class ClanDefiance extends CardImpl { } public ClanDefiance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{G}"); // Choose one or more - this.getSpellAbility().getModes().setMinModes(1); @@ -73,9 +72,9 @@ public class ClanDefiance extends CardImpl { // and/or Clan Defiance deals X damage to target player. Mode mode2 = new Mode(); mode2.getEffects().add(new DamageTargetEffect(new ManacostVariableValue())); - mode2.getTargets().add(new TargetPlayer()); + mode2.getTargets().add(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addMode(mode2); - + } public ClanDefiance(final ClanDefiance card) { @@ -86,5 +85,5 @@ public class ClanDefiance extends CardImpl { public ClanDefiance copy() { return new ClanDefiance(this); } - + } diff --git a/Mage.Sets/src/mage/cards/c/ClergyEnVec.java b/Mage.Sets/src/mage/cards/c/ClergyEnVec.java index 3b2da63813..6065d50495 100644 --- a/Mage.Sets/src/mage/cards/c/ClergyEnVec.java +++ b/Mage.Sets/src/mage/cards/c/ClergyEnVec.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class ClergyEnVec extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn ,1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ClockworkHydra.java b/Mage.Sets/src/mage/cards/c/ClockworkHydra.java index 1c7859fb70..aea57305f8 100644 --- a/Mage.Sets/src/mage/cards/c/ClockworkHydra.java +++ b/Mage.Sets/src/mage/cards/c/ClockworkHydra.java @@ -49,7 +49,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -66,7 +66,7 @@ public class ClockworkHydra extends CardImpl { // Clockwork Hydra enters the battlefield with four +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(4)), "with four +1/+1 counters on it")); - // Whenever Clockwork Hydra attacks or blocks, remove a +1/+1 counter from it. If you do, Clockwork Hydra deals 1 damage to target creature or player. + // Whenever Clockwork Hydra attacks or blocks, remove a +1/+1 counter from it. If you do, Clockwork Hydra deals 1 damage to any target. this.addAbility(new AttacksOrBlocksTriggeredAbility(new ClockworkHydraEffect(), false)); // {tap}: Put a +1/+1 counter on Clockwork Hydra. @@ -88,7 +88,7 @@ class ClockworkHydraEffect extends OneShotEffect { public ClockworkHydraEffect() { super(Outcome.Damage); - this.staticText = "remove a +1/+1 counter from it. If you do, {this} deals 1 damage to target creature or player"; + this.staticText = "remove a +1/+1 counter from it. If you do, {this} deals 1 damage to any target"; } public ClockworkHydraEffect(final ClockworkHydraEffect effect) { @@ -106,7 +106,7 @@ class ClockworkHydraEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && permanent != null && permanent.getCounters(game).getCount(CounterType.P1P1) > 0) { permanent.removeCounters(CounterType.P1P1.createInstance(), game); - Target target = new TargetCreatureOrPlayer(); + Target target = new TargetAnyTarget(); if (controller.chooseTarget(outcome, target, source, game)) { Effect effect = new DamageTargetEffect(1); effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); diff --git a/Mage.Sets/src/mage/cards/c/CloseQuarters.java b/Mage.Sets/src/mage/cards/c/CloseQuarters.java index a6e9a21fcc..717f352b81 100644 --- a/Mage.Sets/src/mage/cards/c/CloseQuarters.java +++ b/Mage.Sets/src/mage/cards/c/CloseQuarters.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class CloseQuarters extends CardImpl { public CloseQuarters(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - // Whenever a creature you control becomes blocked, Close Quarters deals 1 damage to target creature or player. + // Whenever a creature you control becomes blocked, Close Quarters deals 1 damage to any target. Ability ability = new BecomesBlockedAllTriggeredAbility(new DamageTargetEffect(1), false, filter, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CollateralDamage.java b/Mage.Sets/src/mage/cards/c/CollateralDamage.java index 78ad524d54..0bc5e08af7 100644 --- a/Mage.Sets/src/mage/cards/c/CollateralDamage.java +++ b/Mage.Sets/src/mage/cards/c/CollateralDamage.java @@ -35,7 +35,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,8 +49,8 @@ public class CollateralDamage extends CardImpl { // As an additional cost to cast Collateral Damge, sacrifice a creature. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - // Collateral Damage deals 3 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Collateral Damage deals 3 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java b/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java index 0cb47fe18d..08d99d1e7f 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java @@ -40,14 +40,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.constants.TargetController; import mage.filter.FilterPlayer; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.other.PlayerPredicate; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -57,11 +56,6 @@ public class CollectiveDefiance extends CardImpl { private static final FilterPlayer filterDiscard = new FilterPlayer("player to discard and then draw cards"); private static final FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature to be dealt damage"); - private static final FilterPlayer filterDamageOpponent = new FilterPlayer("opponent to be dealt damage"); - - static { - filterDamageOpponent.add(new PlayerPredicate(TargetController.OPPONENT)); - } public CollectiveDefiance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); @@ -90,7 +84,7 @@ public class CollectiveDefiance extends CardImpl { effect = new DamageTargetEffect(3); effect.setText("{this} deals 3 damage to target opponent"); mode.getEffects().add(effect); - mode.getTargets().add(new TargetPlayer(1, 1, false, filterDamageOpponent)); + mode.getTargets().add(new TargetOpponentOrPlaneswalker()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/c/CombatMedic.java b/Mage.Sets/src/mage/cards/c/CombatMedic.java index 22f4a02f12..d9c185ba13 100644 --- a/Mage.Sets/src/mage/cards/c/CombatMedic.java +++ b/Mage.Sets/src/mage/cards/c/CombatMedic.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class CombatMedic extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(2); - // {1}{W}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {1}{W}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CometStorm.java b/Mage.Sets/src/mage/cards/c/CometStorm.java index 1e662e317c..63cd202799 100644 --- a/Mage.Sets/src/mage/cards/c/CometStorm.java +++ b/Mage.Sets/src/mage/cards/c/CometStorm.java @@ -40,7 +40,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,14 +49,14 @@ import mage.target.common.TargetCreatureOrPlayer; public class CometStorm extends CardImpl { public CometStorm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}{R}"); // Multikicker {1} this.addAbility(new MultikickerAbility("{1}")); - // Choose target creature or player, then choose another target creature or player for each time Comet Storm was kicked. Comet Storm deals X damage to each of them. + // Choose any target, then choose another any target for each time Comet Storm was kicked. Comet Storm deals X damage to each of them. this.getSpellAbility().addEffect(new CometStormEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(1)); + this.getSpellAbility().addTarget(new TargetAnyTarget(1)); } public CometStorm(final CometStorm card) { @@ -68,7 +68,7 @@ public class CometStorm extends CardImpl { if (ability instanceof SpellAbility) { ability.getTargets().clear(); int numbTargets = new MultikickerCount().calculate(game, ability, null) + 1; - ability.addTarget(new TargetCreatureOrPlayer(numbTargets)); + ability.addTarget(new TargetAnyTarget(numbTargets)); } } @@ -82,7 +82,7 @@ class CometStormEffect extends OneShotEffect { public CometStormEffect() { super(Outcome.Damage); - staticText = "Choose target creature or player, then choose another target creature or player for each time Comet Storm was kicked. Comet Storm deals X damage to each of them"; + staticText = "Choose any target, then choose another target for each time Comet Storm was kicked. Comet Storm deals X damage to each of them"; } public CometStormEffect(final CometStormEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java b/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java index d8cf945370..510301eca8 100644 --- a/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java +++ b/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java @@ -40,7 +40,8 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.TargetPlayer; +import mage.players.Player; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -49,11 +50,10 @@ import mage.target.TargetPlayer; public class ConcussiveBolt extends CardImpl { public ConcussiveBolt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Concussive Bolt deals 4 damage to target player. - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); // Metalcraft - If you control three or more artifacts, creatures that player controls can't block this turn. this.getSpellAbility().addEffect(new ConcussiveBoltEffect()); @@ -74,7 +74,7 @@ class ConcussiveBoltEffect extends OneShotEffect { public ConcussiveBoltEffect() { super(Outcome.Benefit); - this.staticText = "Metalcraft - If you control three or more artifacts, creatures that player controls can't block this turn"; + this.staticText = "Metalcraft - If you control three or more artifacts, creatures controlled by that player or by that planeswalker’s controller can’t block this turn."; } public ConcussiveBoltEffect(final ConcussiveBoltEffect effect) { @@ -111,7 +111,11 @@ class ConcussiveBoltRestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { boolean metalcraft = (Boolean) this.getValue("MetalcraftConcussiveBolt"); - if (metalcraft && permanent.getControllerId().equals(source.getFirstTarget())) { + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + if (metalcraft && permanent.getControllerId().equals(player.getId())) { return true; } return false; diff --git a/Mage.Sets/src/mage/cards/c/ConeOfFlame.java b/Mage.Sets/src/mage/cards/c/ConeOfFlame.java index ed36dec16a..d1b63281a3 100644 --- a/Mage.Sets/src/mage/cards/c/ConeOfFlame.java +++ b/Mage.Sets/src/mage/cards/c/ConeOfFlame.java @@ -34,13 +34,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; import mage.filter.predicate.mageobject.AnotherTargetPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,31 +49,30 @@ import mage.target.common.TargetCreatureOrPlayer; public class ConeOfFlame extends CardImpl { public ConeOfFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - - // Cone of Flame deals 1 damage to target creature or player, 2 damage to another target creature or player, and 3 damage to a third target creature or player. - FilterCreatureOrPlayer filter1 = new FilterCreatureOrPlayer("creature or player to deal 1 damage"); - TargetCreatureOrPlayer target1 = new TargetCreatureOrPlayer(1, 1, filter1); + // Cone of Flame deals 1 damage to any target, 2 damage to another any target, and 3 damage to a third any target. + FilterCreaturePlayerOrPlaneswalker filter1 = new FilterCreaturePlayerOrPlaneswalker("creature, player or planeswalker to deal 1 damage"); + TargetAnyTarget target1 = new TargetAnyTarget(1, 1, filter1); target1.setTargetTag(1); this.getSpellAbility().addTarget(target1); - - FilterCreatureOrPlayer filter2 = new FilterCreatureOrPlayer("another creature or player to deal 2 damage"); + + FilterCreaturePlayerOrPlaneswalker filter2 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 2 damage"); AnotherTargetPredicate predicate2 = new AnotherTargetPredicate(2); filter2.getCreatureFilter().add(predicate2); filter2.getPlayerFilter().add(predicate2); - TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(1, 1, filter2); + TargetAnyTarget target2 = new TargetAnyTarget(1, 1, filter2); target2.setTargetTag(2); this.getSpellAbility().addTarget(target2); - - FilterCreatureOrPlayer filter3 = new FilterCreatureOrPlayer("another creature or player to deal 3 damage"); + + FilterCreaturePlayerOrPlaneswalker filter3 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 3 damage"); AnotherTargetPredicate predicate3 = new AnotherTargetPredicate(3); filter3.getCreatureFilter().add(predicate3); filter3.getPlayerFilter().add(predicate3); - TargetCreatureOrPlayer target3 = new TargetCreatureOrPlayer(1, 1, filter3); + TargetAnyTarget target3 = new TargetAnyTarget(1, 1, filter3); target3.setTargetTag(3); this.getSpellAbility().addTarget(target3); - + this.getSpellAbility().addEffect(new ConeOfFlameEffect()); } @@ -91,9 +90,11 @@ class ConeOfFlameEffect extends OneShotEffect { public ConeOfFlameEffect() { super(Outcome.Damage); - this.staticText = "{source} deals 1 damage to target creature or player, 2 damage to another target creature or player, and 3 damage to a third target creature or player"; + this.staticText = "{source} deals 1 damage to any target, " + + "2 damage to another target, " + + "and 3 damage to a third target"; } - + public ConeOfFlameEffect(final ConeOfFlameEffect effect) { super(effect); } @@ -102,7 +103,7 @@ class ConeOfFlameEffect extends OneShotEffect { public ConeOfFlameEffect copy() { return new ConeOfFlameEffect(this); } - + @Override public boolean apply(Game game, Ability source) { boolean applied = false; @@ -120,5 +121,5 @@ class ConeOfFlameEffect extends OneShotEffect { } return applied; } - + } diff --git a/Mage.Sets/src/mage/cards/c/Conflagrate.java b/Mage.Sets/src/mage/cards/c/Conflagrate.java index 7028972735..b4289fe279 100644 --- a/Mage.Sets/src/mage/cards/c/Conflagrate.java +++ b/Mage.Sets/src/mage/cards/c/Conflagrate.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.TimingRule; import mage.filter.FilterCard; import mage.game.Game; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -56,7 +56,7 @@ public class Conflagrate extends CardImpl { // Conflagrate deals X damage divided as you choose among any number of target creatures and/or players. DynamicValue xValue = new ConflagrateVariableValue(); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); // Flashback-{R}{R}, Discard X cards. Ability ability = new FlashbackAbility(new ManaCostsImpl("{R}{R}"), TimingRule.SORCERY); diff --git a/Mage.Sets/src/mage/cards/c/ConsulateTurret.java b/Mage.Sets/src/mage/cards/c/ConsulateTurret.java index edbfd34e5c..80321981bb 100644 --- a/Mage.Sets/src/mage/cards/c/ConsulateTurret.java +++ b/Mage.Sets/src/mage/cards/c/ConsulateTurret.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -55,7 +55,7 @@ public class ConsulateTurret extends CardImpl { // {T}, Pay {E}{E}{E}: Consulate Turret deals 2 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new PayEnergyCost(3)); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java b/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java index ab73021fbf..e6635cb146 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java +++ b/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java @@ -40,7 +40,7 @@ import mage.filter.FilterMana; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; @@ -60,8 +60,8 @@ public class ConsumeSpirit extends CardImpl { // Spend only black mana on X. - // Consume Spirit deals X damage to target creature or player and you gain X life. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Consume Spirit deals X damage to any target and you gain X life. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ConsumeSpiritEffect()); VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0); if (variableCost instanceof VariableManaCost) { @@ -83,7 +83,7 @@ class ConsumeSpiritEffect extends OneShotEffect { public ConsumeSpiritEffect() { super(Outcome.Damage); - staticText = "Consume Spirit deals X damage to target creature or player and you gain X life. Spend only black mana on X"; + staticText = "Consume Spirit deals X damage to any target and you gain X life. Spend only black mana on X"; } public ConsumeSpiritEffect(final ConsumeSpiritEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/ConsumingSinkhole.java b/Mage.Sets/src/mage/cards/c/ConsumingSinkhole.java index afbfb02895..ad6f74199e 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingSinkhole.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingSinkhole.java @@ -38,8 +38,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.CardTypePredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -54,7 +54,7 @@ public class ConsumingSinkhole extends CardImpl { } public ConsumingSinkhole(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); // Devoid this.addAbility(new DevoidAbility(this.color)); @@ -68,7 +68,7 @@ public class ConsumingSinkhole extends CardImpl { // Consuming Sinkhole deals 4 damage to target player. Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(4)); - mode.getTargets().add(new TargetPlayer()); + mode.getTargets().add(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/c/Corrupt.java b/Mage.Sets/src/mage/cards/c/Corrupt.java index af2dd84bd5..09817116f9 100644 --- a/Mage.Sets/src/mage/cards/c/Corrupt.java +++ b/Mage.Sets/src/mage/cards/c/Corrupt.java @@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,8 +54,8 @@ public class Corrupt extends CardImpl { public Corrupt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{B}"); - // Corrupt deals damage to target creature or player equal to the number of Swamps you control. You gain life equal to the damage dealt this way. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Corrupt deals damage to any target equal to the number of Swamps you control. You gain life equal to the damage dealt this way. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new CorruptEffect()); } @@ -81,7 +81,7 @@ class CorruptEffect extends OneShotEffect { public CorruptEffect() { super(Outcome.Damage); - staticText = "{this} deals damage to target creature or player equal to the number of Swamps you control. You gain life equal to the damage dealt this way"; + staticText = "{this} deals damage to any target equal to the number of Swamps you control. You gain life equal to the damage dealt this way"; } public CorruptEffect(final CorruptEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/CosisRavager.java b/Mage.Sets/src/mage/cards/c/CosisRavager.java index c305d3a1d9..292f408067 100644 --- a/Mage.Sets/src/mage/cards/c/CosisRavager.java +++ b/Mage.Sets/src/mage/cards/c/CosisRavager.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.c; import java.util.UUID; @@ -37,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -45,18 +44,18 @@ import mage.target.TargetPlayer; */ public class CosisRavager extends CardImpl { - public CosisRavager (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + public CosisRavager(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.ELEMENTAL); - this.color.setRed(true); + this.color.setRed(true); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new LandfallAbility(new DamageTargetEffect(1), false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } - public CosisRavager (final CosisRavager card) { + public CosisRavager(final CosisRavager card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/c/CovenantOfBlood.java b/Mage.Sets/src/mage/cards/c/CovenantOfBlood.java index f007435fea..32fd28ac90 100644 --- a/Mage.Sets/src/mage/cards/c/CovenantOfBlood.java +++ b/Mage.Sets/src/mage/cards/c/CovenantOfBlood.java @@ -35,7 +35,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,15 +50,15 @@ public class CovenantOfBlood extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); - // Covenant of Blood deals 4 damage to target creature or player + // Covenant of Blood deals 4 damage to any target Effect effect = new DamageTargetEffect(4); - effect.setText("{this} deals 4 damage to target creature or player"); + effect.setText("{this} deals 4 damage to any target"); this.getSpellAbility().addEffect(effect); // and you gain 4 life. effect = new GainLifeEffect(4); effect.setText("and you gain 4 life"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public CovenantOfBlood(final CovenantOfBlood card) { diff --git a/Mage.Sets/src/mage/cards/c/Crackleburr.java b/Mage.Sets/src/mage/cards/c/Crackleburr.java index b6b81a070e..0a7dac031b 100644 --- a/Mage.Sets/src/mage/cards/c/Crackleburr.java +++ b/Mage.Sets/src/mage/cards/c/Crackleburr.java @@ -49,7 +49,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -77,11 +77,11 @@ public class Crackleburr extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {UR}{UR}, {tap}, Tap two untapped red creatures you control: Crackleburr deals 3 damage to target creature or player. + // {UR}{UR}, {tap}, Tap two untapped red creatures you control: Crackleburr deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{U/R}{U/R}")); ability.addCost(new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {UR}{UR}, {untap}, Untap two tapped blue creatures you control: Return target creature to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/c/CracklingTriton.java b/Mage.Sets/src/mage/cards/c/CracklingTriton.java index 1b597da8af..c1a5c3f04c 100644 --- a/Mage.Sets/src/mage/cards/c/CracklingTriton.java +++ b/Mage.Sets/src/mage/cards/c/CracklingTriton.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class CracklingTriton extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // {2}{R}, Sacrifice Crackling Triton: Crackling Triton deals 2 damage to target creature or player. + // {2}{R}, Sacrifice Crackling Triton: Crackling Triton deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java index 4fdbf66f84..08de7ad100 100644 --- a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java +++ b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java @@ -32,6 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -49,7 +50,7 @@ import mage.target.TargetPlayer; public class CragganwickCremator extends CardImpl { public CragganwickCremator(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.GIANT); this.subtype.add(SubType.SHAMAN); @@ -92,16 +93,12 @@ class CragganwickCrematorEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { Card discardedCard = controller.discardOne(true, source, game); if (discardedCard != null && discardedCard.isCreature()) { - Player targetedPlayer = game.getPlayer(source.getFirstTarget()); - if (targetedPlayer != null) { - int damage = discardedCard.getPower().getValue(); - targetedPlayer.damage(damage, source.getSourceId(), game, false, true); - } + int damage = discardedCard.getPower().getValue(); + return new DamageTargetEffect(damage).apply(game, source); } return true; } diff --git a/Mage.Sets/src/mage/cards/c/CratersClaws.java b/Mage.Sets/src/mage/cards/c/CratersClaws.java index 266f2ac8ee..e844238119 100644 --- a/Mage.Sets/src/mage/cards/c/CratersClaws.java +++ b/Mage.Sets/src/mage/cards/c/CratersClaws.java @@ -36,7 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,17 +45,17 @@ import mage.target.common.TargetCreatureOrPlayer; public class CratersClaws extends CardImpl { public CratersClaws(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); - // Crater's Claws deals X damage to target creature or player. + // Crater's Claws deals X damage to any target. // <i>Ferocious</i> - Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new IntPlusDynamicValue(2, new ManacostVariableValue())), new DamageTargetEffect(new ManacostVariableValue()), FerociousCondition.instance, - "{this} deals X damage to target creature or player." + - "<br><i>Ferocious</i> — {this} deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + "{this} deals X damage to any target." + + "<br><i>Ferocious</i> — {this} deals X plus 2 damage to that permanent or player instead if you control a creature with power 4 or greater")); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public CratersClaws(final CratersClaws card) { diff --git a/Mage.Sets/src/mage/cards/c/CunningSparkmage.java b/Mage.Sets/src/mage/cards/c/CunningSparkmage.java index 72447100d8..052abacea8 100644 --- a/Mage.Sets/src/mage/cards/c/CunningSparkmage.java +++ b/Mage.Sets/src/mage/cards/c/CunningSparkmage.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,7 +57,7 @@ public class CunningSparkmage extends CardImpl { this.toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CunningStrike.java b/Mage.Sets/src/mage/cards/c/CunningStrike.java index 22eac92fa3..6d2f946bee 100644 --- a/Mage.Sets/src/mage/cards/c/CunningStrike.java +++ b/Mage.Sets/src/mage/cards/c/CunningStrike.java @@ -35,8 +35,8 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.targetpointer.SecondTargetPointer; /** @@ -46,7 +46,7 @@ import mage.target.targetpointer.SecondTargetPointer; public class CunningStrike extends CardImpl { public CunningStrike(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{R}"); // Cunning Strike deals 2 damage to target creature and 2 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(new StaticValue(2), true, "", true)); @@ -55,7 +55,7 @@ public class CunningStrike extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); effect.setText("and 2 damage to target player"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java index f4ea8c4cf1..0012e9e255 100644 --- a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java +++ b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java @@ -43,7 +43,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; /** @@ -63,12 +63,12 @@ public class CuombajjWitches extends CardImpl { this.toughness = new MageInt(3); //TODO: Make ability properly copiable - // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. + // {T}: Cuombajj Witches deals 1 damage to any target and 1 damage to any target of an opponent's choice. Effect effect = new DamageTargetEffect(1); - effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); + effect.setText("{this} deals 1 damage to any target and 1 damage to any target of an opponent's choice"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); originalId = ability.getOriginalId(); } diff --git a/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java b/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java index 5bf4973eb3..520e3992b4 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java @@ -30,7 +30,6 @@ package mage.cards.c; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -47,6 +46,10 @@ import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; import java.util.UUID; +import mage.abilities.effects.OneShotEffect; +import mage.filter.common.FilterPlaneswalkerPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.target.TargetPermanent; /** * @@ -55,7 +58,7 @@ import java.util.UUID; public class CurseOfThePiercedHeart extends CardImpl { public CurseOfThePiercedHeart(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add(SubType.AURA, SubType.CURSE); // Enchant player @@ -82,7 +85,7 @@ public class CurseOfThePiercedHeart extends CardImpl { class CurseOfThePiercedHeartAbility extends TriggeredAbilityImpl { public CurseOfThePiercedHeartAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); + super(Zone.BATTLEFIELD, new CurseOfThePiercedHeartEffect()); } public CurseOfThePiercedHeartAbility(final CurseOfThePiercedHeartAbility ability) { @@ -114,7 +117,54 @@ class CurseOfThePiercedHeartAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "At the beginning of enchanted player's upkeep, Curse of the Pierced Heart deals 1 damage to that player."; + return "At the beginning of enchanted player's upkeep, " + + "{this} deals 1 damage to that player or a planeswalker that player controls."; } } + +class CurseOfThePiercedHeartEffect extends OneShotEffect { + + public CurseOfThePiercedHeartEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 1 damage to that player or a planeswalker that player controls"; + } + + public CurseOfThePiercedHeartEffect(final CurseOfThePiercedHeartEffect effect) { + super(effect); + } + + @Override + public CurseOfThePiercedHeartEffect copy() { + return new CurseOfThePiercedHeartEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (controller == null || enchantment == null) { + return false; + } + UUID opponentId = enchantment.getAttachedTo(); + Player opponent = game.getPlayer(opponentId); + if (opponent == null) { + return false; + } + if (game.getBattlefield().getAllActivePermanents(new FilterPlaneswalkerPermanent(), opponentId, game).size() > 0) { + if (controller.chooseUse(Outcome.Damage, "Redirect to a planeswalker controlled by " + opponent.getLogName() + "?", source, game)) { + FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent("a planeswalker controlled by " + opponent.getLogName()); + filter.add(new ControllerIdPredicate(opponentId)); + TargetPermanent target = new TargetPermanent(1, 1, filter, false); + if (target.choose(Outcome.Damage, controller.getId(), source.getSourceId(), game)) { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + return permanent.damage(1, source.getSourceId(), game, false, true) > 0; + } + } + } + } + opponent.damage(1, source.getSourceId(), game, false, true); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CursedScroll.java b/Mage.Sets/src/mage/cards/c/CursedScroll.java index 37e13a27ad..cc57140ee9 100644 --- a/Mage.Sets/src/mage/cards/c/CursedScroll.java +++ b/Mage.Sets/src/mage/cards/c/CursedScroll.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,11 +54,11 @@ public class CursedScroll extends CardImpl { public CursedScroll(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - // {3}, {T}: Name a card. Reveal a card at random from your hand. If it's the named card, Cursed Scroll deals 2 damage to target creature or player. + // {3}, {T}: Name a card. Reveal a card at random from your hand. If it's the named card, Cursed Scroll deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); ability.addEffect(new CursedScrollEffect()); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -76,7 +76,7 @@ class CursedScrollEffect extends OneShotEffect { public CursedScrollEffect() { super(Outcome.Neutral); - staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; + staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to any target"; } public CursedScrollEffect(final CursedScrollEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DAvenantHealer.java b/Mage.Sets/src/mage/cards/d/DAvenantHealer.java index a2bbfde3ac..5c67de59df 100644 --- a/Mage.Sets/src/mage/cards/d/DAvenantHealer.java +++ b/Mage.Sets/src/mage/cards/d/DAvenantHealer.java @@ -50,7 +50,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class DAvenantHealer extends CardImpl { public DAvenantHealer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.ARCHER); @@ -61,7 +61,7 @@ public class DAvenantHealer extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetAttackingOrBlockingCreature()); this.addAbility(ability); - // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {T}: Prevent the next 1 damage that would be dealt to any target this turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/d/DanceWithDevils.java b/Mage.Sets/src/mage/cards/d/DanceWithDevils.java index 4516331d3e..0d80fb5a6e 100644 --- a/Mage.Sets/src/mage/cards/d/DanceWithDevils.java +++ b/Mage.Sets/src/mage/cards/d/DanceWithDevils.java @@ -42,11 +42,11 @@ import mage.game.permanent.token.DevilToken; public class DanceWithDevils extends CardImpl { public DanceWithDevils(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - // Create two 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to target creature or player." + // Create two 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to any target." Effect effect = new CreateTokenEffect(new DevilToken(), 2); - effect.setText("Create two 1/1 red Devil creature tokens. They have \"When this creature dies, it deals 1 damage to target creature or player.\""); + effect.setText("Create two 1/1 red Devil creature tokens. They have \"When this creature dies, it deals 1 damage to any target.\""); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/d/DarigaazsCharm.java b/Mage.Sets/src/mage/cards/d/DarigaazsCharm.java index e7bce7f4ad..eddd66b9d7 100644 --- a/Mage.Sets/src/mage/cards/d/DarigaazsCharm.java +++ b/Mage.Sets/src/mage/cards/d/DarigaazsCharm.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.filter.common.FilterCreatureCard; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -57,10 +57,10 @@ public class DarigaazsCharm extends CardImpl { this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); - // or Darigaaz's Charm deals 3 damage to target creature or player; + // or Darigaaz's Charm deals 3 damage to any target; Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(3)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); // or target creature gets +3/+3 until end of turn. diff --git a/Mage.Sets/src/mage/cards/d/DarkNourishment.java b/Mage.Sets/src/mage/cards/d/DarkNourishment.java index 4ade700f3c..b613ea90f1 100644 --- a/Mage.Sets/src/mage/cards/d/DarkNourishment.java +++ b/Mage.Sets/src/mage/cards/d/DarkNourishment.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class DarkNourishment extends CardImpl { public DarkNourishment(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}"); - // Dark Nourishment deals 3 damage to target creature or player. You gain 3 life. + // Dark Nourishment deals 3 damage to any target. You gain 3 life. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new GainLifeEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/d/DaruHealer.java b/Mage.Sets/src/mage/cards/d/DaruHealer.java index 88fa15a77b..4bb99ec76e 100644 --- a/Mage.Sets/src/mage/cards/d/DaruHealer.java +++ b/Mage.Sets/src/mage/cards/d/DaruHealer.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class DaruHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Morph {W} diff --git a/Mage.Sets/src/mage/cards/d/Dawnfluke.java b/Mage.Sets/src/mage/cards/d/Dawnfluke.java index cdcebfcbb1..667cfee3d6 100644 --- a/Mage.Sets/src/mage/cards/d/Dawnfluke.java +++ b/Mage.Sets/src/mage/cards/d/Dawnfluke.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class Dawnfluke extends CardImpl { // Flash this.addAbility(FlashAbility.getInstance()); - // When Dawnfluke enters the battlefield, prevent the next 3 damage that would be dealt to target creature or player this turn. + // When Dawnfluke enters the battlefield, prevent the next 3 damage that would be dealt to any target this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - Target target = new TargetCreatureOrPlayer(); + Target target = new TargetAnyTarget(); ability.addTarget(target); this.addAbility(ability); // Evoke {W} diff --git a/Mage.Sets/src/mage/cards/d/Deadapult.java b/Mage.Sets/src/mage/cards/d/Deadapult.java index a1bc081046..d3b9d1096f 100644 --- a/Mage.Sets/src/mage/cards/d/Deadapult.java +++ b/Mage.Sets/src/mage/cards/d/Deadapult.java @@ -41,7 +41,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,10 +59,10 @@ public class Deadapult extends CardImpl { public Deadapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // {R}, Sacrifice a Zombie: Deadapult deals 2 damage to target creature or player. + // {R}, Sacrifice a Zombie: Deadapult deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DeathGrasp.java b/Mage.Sets/src/mage/cards/d/DeathGrasp.java index e92ea1411a..9582d93a88 100644 --- a/Mage.Sets/src/mage/cards/d/DeathGrasp.java +++ b/Mage.Sets/src/mage/cards/d/DeathGrasp.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,7 +49,7 @@ public class DeathGrasp extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public DeathGrasp (final DeathGrasp card) { diff --git a/Mage.Sets/src/mage/cards/d/DeathSpark.java b/Mage.Sets/src/mage/cards/d/DeathSpark.java index a9442c4a67..3a2e3edd1d 100644 --- a/Mage.Sets/src/mage/cards/d/DeathSpark.java +++ b/Mage.Sets/src/mage/cards/d/DeathSpark.java @@ -44,7 +44,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class DeathSpark extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - // Death Spark deals 1 damage to target creature or player. + // Death Spark deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + 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( diff --git a/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java b/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java index 094e5b662e..d745b657ab 100644 --- a/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java +++ b/Mage.Sets/src/mage/cards/d/DeathbringerThoctar.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class DeathbringerThoctar extends CardImpl { // Whenever another creature dies, you may put a +1/+1 counter on Deathbringer Thoctar. this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true)); - // Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to target creature or player. + // Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java index f389704351..3247ce5a22 100644 --- a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java +++ b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java @@ -34,6 +34,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -41,8 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; -import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -51,7 +51,7 @@ import mage.target.TargetPlayer; public class DeathforgeShaman extends CardImpl { public DeathforgeShaman(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.SHAMAN); @@ -63,7 +63,7 @@ public class DeathforgeShaman extends CardImpl { // When Deathforge Shaman enters the battlefield, it deals damage to target player equal to twice the number of times it was kicked. Ability ability = new EntersBattlefieldTriggeredAbility(new DeathforgeShamanEffect()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -81,7 +81,7 @@ class DeathforgeShamanEffect extends OneShotEffect { public DeathforgeShamanEffect() { super(Outcome.Damage); - staticText = "it deals damage to target player equal to twice the number of times it was kicked"; + staticText = "it deals damage to target player or planeswalker equal to twice the number of times it was kicked"; } public DeathforgeShamanEffect(final DeathforgeShamanEffect effect) { @@ -97,13 +97,7 @@ class DeathforgeShamanEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { DynamicValue value = new MultikickerCount(); int damage = value.calculate(game, source, this) * 2; - - Player player = game.getPlayer(source.getFirstTarget()); - if (player != null) { - player.damage(damage, source.getSourceId(), game, false, true); - return true; - } - return false; + return new DamageTargetEffect(damage).apply(game, source); } } diff --git a/Mage.Sets/src/mage/cards/d/DefenderEnVec.java b/Mage.Sets/src/mage/cards/d/DefenderEnVec.java index 7b1236370c..738debce1a 100644 --- a/Mage.Sets/src/mage/cards/d/DefenderEnVec.java +++ b/Mage.Sets/src/mage/cards/d/DefenderEnVec.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,10 +59,10 @@ public class DefenderEnVec extends CardImpl { // Fading 4 this.addAbility(new FadingAbility(4, this)); - // Remove a fade counter from Defender en-Vec: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // Remove a fade counter from Defender en-Vec: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new RemoveCountersSourceCost(CounterType.FADE.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Demonfire.java b/Mage.Sets/src/mage/cards/d/Demonfire.java index b994ca89c4..186976479e 100644 --- a/Mage.Sets/src/mage/cards/d/Demonfire.java +++ b/Mage.Sets/src/mage/cards/d/Demonfire.java @@ -43,7 +43,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -55,11 +55,11 @@ public class Demonfire extends CardImpl { public Demonfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Demonfire deals X damage to target creature or player. + // Demonfire deals X damage to any target. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new ManacostVariableValue()), new InvertCondition(HellbentCondition.instance), - "{this} deals X damage to target creature or player")); + "{this} deals X damage to any target")); // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); @@ -77,7 +77,7 @@ public class Demonfire extends CardImpl { (CantBeCounteredSourceEffect) effect, HellbentCondition.instance))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Demonfire(final Demonfire card) { diff --git a/Mage.Sets/src/mage/cards/d/DemonicPact.java b/Mage.Sets/src/mage/cards/d/DemonicPact.java index ef3306e780..ae54517d98 100644 --- a/Mage.Sets/src/mage/cards/d/DemonicPact.java +++ b/Mage.Sets/src/mage/cards/d/DemonicPact.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; /** @@ -54,10 +54,10 @@ public class DemonicPact extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{B}"); // At the beginning of your upkeep, choose one that hasn't been chosen - // - Demonic Pact deals 4 damage to target creature or player and you gain 4 life; + // - Demonic Pact deals 4 damage to any target and you gain 4 life; Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(4), TargetController.YOU, false); ability.getModes().setEachModeOnlyOnce(true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Effect effect = new GainLifeEffect(4); effect.setText("and you gain 4 life"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/d/DevilsPlay.java b/Mage.Sets/src/mage/cards/d/DevilsPlay.java index 9fdf56c6bf..3b617d7d70 100644 --- a/Mage.Sets/src/mage/cards/d/DevilsPlay.java +++ b/Mage.Sets/src/mage/cards/d/DevilsPlay.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class DevilsPlay extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Devil's Play deals X damage to target creature or player. + // Devil's Play deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Flashback {X}{R}{R}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{X}{R}{R}{R}"), TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/d/DevilsPlayground.java b/Mage.Sets/src/mage/cards/d/DevilsPlayground.java index aba8268be2..b82a54d42e 100644 --- a/Mage.Sets/src/mage/cards/d/DevilsPlayground.java +++ b/Mage.Sets/src/mage/cards/d/DevilsPlayground.java @@ -42,11 +42,11 @@ import mage.game.permanent.token.DevilToken; public class DevilsPlayground extends CardImpl { public DevilsPlayground(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}"); - // Create four 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to target creature or player." + // Create four 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to any target." Effect effect = new CreateTokenEffect(new DevilToken(), 4); - effect.setText("Create four 1/1 red Devil creature tokens. They have \"When this creature dies, it deals 1 damage to target creature or player.\""); + effect.setText("Create four 1/1 red Devil creature tokens. They have \"When this creature dies, it deals 1 damage to any target.\""); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/d/Disintegrate.java b/Mage.Sets/src/mage/cards/d/Disintegrate.java index b1b2403bdc..ea60cfb58a 100644 --- a/Mage.Sets/src/mage/cards/d/Disintegrate.java +++ b/Mage.Sets/src/mage/cards/d/Disintegrate.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,13 +48,13 @@ public class Disintegrate extends CardImpl { public Disintegrate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); - // Disintegrate deals X damage to target creature or player. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. + // Disintegrate deals X damage to any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature")); Effect effect = new ExileTargetIfDiesEffect(); effect.setText("If the creature would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Disintegrate(final Disintegrate card) { diff --git a/Mage.Sets/src/mage/cards/d/DivineDeflection.java b/Mage.Sets/src/mage/cards/d/DivineDeflection.java index ea4a405c77..0dc61ecaab 100644 --- a/Mage.Sets/src/mage/cards/d/DivineDeflection.java +++ b/Mage.Sets/src/mage/cards/d/DivineDeflection.java @@ -39,7 +39,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author noxx @@ -50,9 +50,9 @@ public class DivineDeflection extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}"); - // Prevent the next X damage that would be dealt to you and/or permanents you control this turn. If damage is prevented this way, Divine Deflection deals that much damage to target creature or player. + // Prevent the next X damage that would be dealt to you and/or permanents you control this turn. If damage is prevented this way, Divine Deflection deals that much damage to any target. this.getSpellAbility().addEffect(new DivineDeflectionPreventDamageTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public DivineDeflection(final DivineDeflection card) { @@ -69,7 +69,7 @@ class DivineDeflectionPreventDamageTargetEffect extends PreventionEffectImpl { public DivineDeflectionPreventDamageTargetEffect(Duration duration) { super(duration, Integer.MIN_VALUE, false, true); - staticText = "Prevent the next X damage that would be dealt to you and/or permanents you control this turn. If damage is prevented this way, {this} deals that much damage to target creature or player"; + staticText = "Prevent the next X damage that would be dealt to you and/or permanents you control this turn. If damage is prevented this way, {this} deals that much damage to any target"; } public DivineDeflectionPreventDamageTargetEffect(final DivineDeflectionPreventDamageTargetEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DivinePresence.java b/Mage.Sets/src/mage/cards/d/DivinePresence.java index 5a7ab55499..cc534f2db0 100644 --- a/Mage.Sets/src/mage/cards/d/DivinePresence.java +++ b/Mage.Sets/src/mage/cards/d/DivinePresence.java @@ -47,7 +47,7 @@ import mage.game.events.GameEvent; public class DivinePresence extends CardImpl { public DivinePresence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DivinePresenceEffect())); @@ -67,7 +67,7 @@ class DivinePresenceEffect extends ReplacementEffectImpl { public DivinePresenceEffect() { super(Duration.WhileOnBattlefield, Outcome.Neutral); - staticText = "If a source would deal 4 or more damage to a creature or player, that source deals 3 damage to that creature or player instead."; + staticText = "If a source would deal 4 or more damage to a permanent or player, that source deals 3 damage to that permanent or player instead."; } public DivinePresenceEffect(final DivinePresenceEffect effect) { @@ -81,9 +81,10 @@ class DivinePresenceEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { - switch(event.getType()) { + switch (event.getType()) { case DAMAGE_CREATURE: case DAMAGE_PLAYER: + case DAMAGE_PLANESWALKER: return true; default: return false; diff --git a/Mage.Sets/src/mage/cards/d/Dogpile.java b/Mage.Sets/src/mage/cards/d/Dogpile.java index bd7f3cc8d6..2cc5b4f14b 100644 --- a/Mage.Sets/src/mage/cards/d/Dogpile.java +++ b/Mage.Sets/src/mage/cards/d/Dogpile.java @@ -36,7 +36,7 @@ import mage.constants.CardType; import mage.constants.TargetController; import mage.filter.common.FilterAttackingCreature; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,10 +53,10 @@ public class Dogpile extends CardImpl { public Dogpile(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); - // Dogpile deals damage to target creature or player equal to the number of attacking creatures you control. + // Dogpile deals damage to any target equal to the number of attacking creatures you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)). - setText("{this} deals damage to target creature or player equal to the number of attacking creatures you control")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + setText("{this} deals damage to any target equal to the number of attacking creatures you control")); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/d/DoomCannon.java b/Mage.Sets/src/mage/cards/d/DoomCannon.java index 320de221dc..249b2e6f0d 100644 --- a/Mage.Sets/src/mage/cards/d/DoomCannon.java +++ b/Mage.Sets/src/mage/cards/d/DoomCannon.java @@ -46,7 +46,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,11 +60,11 @@ public class DoomCannon extends CardImpl { // As Doom Cannon enters the battlefield, choose a creature type. this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Sacrifice))); - // {3}, {T}, Sacrifice a creature of the chosen type: Doom Cannon deals 3 damage to target creature or player. + // {3}, {T}, Sacrifice a creature of the chosen type: Doom Cannon deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new DoomCannonFilter()))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DragonTempest.java b/Mage.Sets/src/mage/cards/d/DragonTempest.java index a5556b6344..98ae8fb94f 100644 --- a/Mage.Sets/src/mage/cards/d/DragonTempest.java +++ b/Mage.Sets/src/mage/cards/d/DragonTempest.java @@ -45,7 +45,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,7 +67,7 @@ public class DragonTempest extends CardImpl { effect.setText("it gains haste until the end of turn"); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filterFlying, false, SetTargetPointer.PERMANENT, "")); - // Whenever a Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control. + // Whenever a Dragon enters the battlefield under your control, it deals X damage to any target, where X is the number of Dragons you control. Ability ability = new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new DragonTempestDamageEffect(), @@ -76,7 +76,7 @@ public class DragonTempest extends CardImpl { SetTargetPointer.NONE, "" ); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -101,7 +101,7 @@ class DragonTempestDamageEffect extends OneShotEffect { public DragonTempestDamageEffect() { super(Outcome.Damage); - staticText = "it deals X damage to target creature or player, where X is the number of Dragons you control"; + staticText = "it deals X damage to any target, where X is the number of Dragons you control"; } public DragonTempestDamageEffect(final DragonTempestDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DrainLife.java b/Mage.Sets/src/mage/cards/d/DrainLife.java index 5173130dc8..435096709d 100644 --- a/Mage.Sets/src/mage/cards/d/DrainLife.java +++ b/Mage.Sets/src/mage/cards/d/DrainLife.java @@ -40,7 +40,7 @@ import mage.filter.FilterMana; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,8 +59,8 @@ public class DrainLife extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}"); // Spend only black mana on X. - // Drain Life deals X damage to target creature or player. You gain life equal to the damage dealt, but not more life than the player's life total before Drain Life dealt damage or the creature's toughness. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Drain Life deals X damage to any target. You gain life equal to the damage dealt, but not more life than the player's life total before Drain Life dealt damage or the creature's toughness. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DrainLifeEffect()); VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0); if (variableCost instanceof VariableManaCost) { @@ -82,7 +82,7 @@ class DrainLifeEffect extends OneShotEffect { public DrainLifeEffect() { super(Outcome.Damage); - staticText = "Spend only black mana on X.<br>{this} deals X damage to target creature or player. You gain life equal to the damage dealt, but not more life than the player's life total before Drain Life dealt damage or the creature's toughness"; + staticText = "Spend only black mana on X.<br>{this} deals X damage to any target. You gain life equal to the damage dealt, but not more life than the player's life total before Drain Life dealt damage or the creature's toughness"; } public DrainLifeEffect(final DrainLifeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/DynavoltTower.java b/Mage.Sets/src/mage/cards/d/DynavoltTower.java index 15e19cc81c..7c11fee443 100644 --- a/Mage.Sets/src/mage/cards/d/DynavoltTower.java +++ b/Mage.Sets/src/mage/cards/d/DynavoltTower.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorcerySpell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class DynavoltTower extends CardImpl { // Whenever you cast an instant or sorcery spell, you get {E}{E}. this.addAbility(new SpellCastControllerTriggeredAbility(new GetEnergyCountersControllerEffect(2), new FilterInstantOrSorcerySpell(), false)); - // {T}, Pay {E}{E}{E}{E}{E}: Dynavolt Tower deals 3 damage to target creature or player. + // {T}, Pay {E}{E}{E}{E}{E}: Dynavolt Tower deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); ability.addCost(new PayEnergyCost(5)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java b/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java index ae2b2fc43d..b07176c9ad 100644 --- a/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java +++ b/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java @@ -44,7 +44,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,10 +58,10 @@ public class ElaborateFirecannon extends CardImpl { // Elaborate Firecannon doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - // {4}, {T}: Elaborate Firecannon deals 2 damage to target creature or player. + // {4}, {T}: Elaborate Firecannon deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // At the beginning of your upkeep, you may discard a card. If you do, untap Elaborate Firecannon. diff --git a/Mage.Sets/src/mage/cards/e/Electrolyze.java b/Mage.Sets/src/mage/cards/e/Electrolyze.java index 8aaf29be93..0659a306f5 100644 --- a/Mage.Sets/src/mage/cards/e/Electrolyze.java +++ b/Mage.Sets/src/mage/cards/e/Electrolyze.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -50,7 +50,7 @@ public class Electrolyze extends CardImpl { Effect effect = new DamageMultiEffect(2); effect.setText("{source} deals 2 damage divided as you choose among one or two target creatures and/or players"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/e/Electropotence.java b/Mage.Sets/src/mage/cards/e/Electropotence.java index e18c15f916..7078dfeb12 100644 --- a/Mage.Sets/src/mage/cards/e/Electropotence.java +++ b/Mage.Sets/src/mage/cards/e/Electropotence.java @@ -43,7 +43,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class Electropotence extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // Whenever a creature enters the battlefield under your control, you may pay {2}{R}. If you do, that creature deals damage equal to its power to target creature or player. + // Whenever a creature enters the battlefield under your control, you may pay {2}{R}. If you do, that creature deals damage equal to its power to any target. Ability ability = new ElectropotenceTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -99,7 +99,7 @@ class ElectropotenceTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature enters the battlefield under your control, you may pay {2}{R}. If you do, that creature deals damage equal to its power to target creature or player."; + return "Whenever a creature enters the battlefield under your control, you may pay {2}{R}. If you do, that creature deals damage equal to its power to any target."; } @Override @@ -130,7 +130,7 @@ class ElectropotenceEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (creature != null && controller != null) { if (controller.chooseUse(Outcome.Damage, "Pay {2}{R} to do the damage?", source, game)) { - // if (controller.chooseUse(Outcome.Damage, "Pay {2}{R}? If you do, " + creature.getName() + " deals damage equal to its power to target creature or player.", game)) { + // if (controller.chooseUse(Outcome.Damage, "Pay {2}{R}? If you do, " + creature.getName() + " deals damage equal to its power to any target.", game)) { ManaCosts manaCosts = new ManaCostsImpl("{2}{R}"); if (manaCosts.pay(source, game, source.getSourceId(), controller.getId(), false, null)) { int amount = creature.getPower().getValue(); diff --git a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java index 7a2b729f38..bb7f5e0827 100644 --- a/Mage.Sets/src/mage/cards/e/EmberFistZubera.java +++ b/Mage.Sets/src/mage/cards/e/EmberFistZubera.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.ZuberasDiedWatcher; /** @@ -55,7 +55,7 @@ public class EmberFistZubera extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(new ZuberasDiedDynamicValue())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability, new ZuberasDiedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/e/EmberHauler.java b/Mage.Sets/src/mage/cards/e/EmberHauler.java index 4410a1638e..63d7892e7c 100644 --- a/Mage.Sets/src/mage/cards/e/EmberHauler.java +++ b/Mage.Sets/src/mage/cards/e/EmberHauler.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,7 +57,7 @@ public class EmberHauler extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); ability.addManaCost(new GenericManaCost(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EmberShot.java b/Mage.Sets/src/mage/cards/e/EmberShot.java index d9b77045fe..4aab96914c 100644 --- a/Mage.Sets/src/mage/cards/e/EmberShot.java +++ b/Mage.Sets/src/mage/cards/e/EmberShot.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class EmberShot extends CardImpl { public EmberShot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{6}{R}"); - // Ember Shot deals 3 damage to target creature or player. + // Ember Shot deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java b/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java index 9e722e03ab..d6ce7f5a87 100644 --- a/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java +++ b/Mage.Sets/src/mage/cards/e/EmbermageGoblin.java @@ -43,7 +43,7 @@ import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -69,9 +69,9 @@ public class EmbermageGoblin extends CardImpl { TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); - // {tap}: Embermage Goblin deals 1 damage to target creature or player. + // {tap}: Embermage Goblin deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/Embersmith.java b/Mage.Sets/src/mage/cards/e/Embersmith.java index 5a6ec044ca..2e4deb3dcf 100644 --- a/Mage.Sets/src/mage/cards/e/Embersmith.java +++ b/Mage.Sets/src/mage/cards/e/Embersmith.java @@ -43,7 +43,7 @@ import mage.filter.common.FilterArtifactSpell; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki, North @@ -59,7 +59,7 @@ public class Embersmith extends CardImpl { FilterArtifactSpell filter = new FilterArtifactSpell("an artifact spell"); SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new EmbersmithEffect(), filter, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -76,7 +76,7 @@ public class Embersmith extends CardImpl { class EmbersmithEffect extends OneShotEffect { EmbersmithEffect() { super(Outcome.Damage); - staticText = "you may pay {1}. If you do, {this} deals 1 damage to target creature or player"; + staticText = "you may pay {1}. If you do, {this} deals 1 damage to any target"; } EmbersmithEffect(final EmbersmithEffect effect) { diff --git a/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java b/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java index c41a158610..6c973898cb 100644 --- a/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java +++ b/Mage.Sets/src/mage/cards/e/EmberwildeAugur.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.PhaseStep; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -49,7 +49,7 @@ import mage.target.TargetPlayer; public class EmberwildeAugur extends CardImpl { public EmberwildeAugur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.SHAMAN); @@ -59,10 +59,10 @@ public class EmberwildeAugur extends CardImpl { // Sacrifice Emberwilde Augur: Emberwilde Augur deals 3 damage to target player. Activate this ability only during your upkeep. Ability ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, - new DamageTargetEffect(3), + new DamageTargetEffect(3), new SacrificeSourceCost(), new IsStepCondition(PhaseStep.UPKEEP)); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/Embolden.java b/Mage.Sets/src/mage/cards/e/Embolden.java index be8ebffa0d..251701b1c3 100644 --- a/Mage.Sets/src/mage/cards/e/Embolden.java +++ b/Mage.Sets/src/mage/cards/e/Embolden.java @@ -36,7 +36,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -49,7 +49,7 @@ public class Embolden extends CardImpl { // Prevent the next 4 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4)); // Flashback {1}{W} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{1}{W}"), TimingRule.INSTANT)); diff --git a/Mage.Sets/src/mage/cards/e/Endbringer.java b/Mage.Sets/src/mage/cards/e/Endbringer.java index f80ab8c1c0..be8e45e53e 100644 --- a/Mage.Sets/src/mage/cards/e/Endbringer.java +++ b/Mage.Sets/src/mage/cards/e/Endbringer.java @@ -44,7 +44,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -62,9 +62,9 @@ public class Endbringer extends CardImpl { // Untap Endbringer during each other player's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new UntapSourceDuringEachOtherPlayersUntapStepEffect())); - // {T}: Endbringer deals 1 damage to target creature or player. + // {T}: Endbringer deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {C}, {T}: Target creature can't attack or block this turn. diff --git a/Mage.Sets/src/mage/cards/e/EnergyBolt.java b/Mage.Sets/src/mage/cards/e/EnergyBolt.java index 140d43836f..1eb911ae8b 100644 --- a/Mage.Sets/src/mage/cards/e/EnergyBolt.java +++ b/Mage.Sets/src/mage/cards/e/EnergyBolt.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,7 +49,7 @@ public class EnergyBolt extends CardImpl { // Choose one - Energy Bolt deals X damage to target player; or target player gains X life. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); Mode mode = new Mode(); mode.getEffects().add(new GainLifeTargetEffect(new ManacostVariableValue())); mode.getTargets().add(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/cards/e/EqualTreatment.java b/Mage.Sets/src/mage/cards/e/EqualTreatment.java index cf48946316..0aaa6be6c7 100644 --- a/Mage.Sets/src/mage/cards/e/EqualTreatment.java +++ b/Mage.Sets/src/mage/cards/e/EqualTreatment.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.e; import java.util.UUID; @@ -47,7 +46,7 @@ import mage.game.events.GameEvent; public class EqualTreatment extends CardImpl { public EqualTreatment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); // If any source would deal 1 or more damage to a creature or player this turn, it deals 2 damage to that creature or player instead. this.getSpellAbility().addEffect(new EqualTreatmentEffect()); @@ -70,7 +69,7 @@ class EqualTreatmentEffect extends ReplacementEffectImpl { public EqualTreatmentEffect() { super(Duration.EndOfTurn, Outcome.PreventDamage); - staticText = "If any source would deal 1 or more damage to a creature or player this turn, it deals 2 damage to that creature or player instead"; + staticText = "If any source would deal 1 or more damage to a permanent or player this turn, it deals 2 damage to that permanent or player instead"; } public EqualTreatmentEffect(final EqualTreatmentEffect effect) { @@ -85,7 +84,8 @@ class EqualTreatmentEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.DAMAGE_CREATURE - || event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + || event.getType() == GameEvent.EventType.DAMAGE_PLAYER + || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER; } @Override diff --git a/Mage.Sets/src/mage/cards/e/ErraticExplosion.java b/Mage.Sets/src/mage/cards/e/ErraticExplosion.java index c626519798..97189b3d0f 100644 --- a/Mage.Sets/src/mage/cards/e/ErraticExplosion.java +++ b/Mage.Sets/src/mage/cards/e/ErraticExplosion.java @@ -40,7 +40,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,10 +49,10 @@ import mage.target.common.TargetCreatureOrPlayer; public class ErraticExplosion extends CardImpl { public ErraticExplosion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); - // Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. Erratic Explosion deals damage equal to that card's converted mana cost to that creature or player. Put the revealed cards on the bottom of your library in any order. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Choose any target. Reveal cards from the top of your library until you reveal a nonland card. Erratic Explosion deals damage equal to that card's converted mana cost to that creature or player. Put the revealed cards on the bottom of your library in any order. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ErraticExplosionEffect()); } @@ -70,7 +70,7 @@ class ErraticExplosionEffect extends OneShotEffect { public ErraticExplosionEffect() { super(Outcome.Damage); - this.staticText = "Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. {this} deals damage equal to that card's converted mana cost to that creature or player. Put the revealed cards on the bottom of your library in any order"; + this.staticText = "Choose any target. Reveal cards from the top of your library until you reveal a nonland card. {this} deals damage equal to that card's converted mana cost to that permanent or player. Put the revealed cards on the bottom of your library in any order"; } public ErraticExplosionEffect(ErraticExplosionEffect effect) { diff --git a/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java b/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java index 862af71863..bea742bf9c 100644 --- a/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java +++ b/Mage.Sets/src/mage/cards/e/EruptingDreadwolf.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class EruptingDreadwolf extends CardImpl { // this card is the second face of double-faced card this.nightCard = true; - // Whenever Erupting Dreadwolf attacks, it deals 2 damage to target creature or player. + // Whenever Erupting Dreadwolf attacks, it deals 2 damage to any target. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EssenceDrain.java b/Mage.Sets/src/mage/cards/e/EssenceDrain.java index bded796524..9b322850b4 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceDrain.java +++ b/Mage.Sets/src/mage/cards/e/EssenceDrain.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,7 +46,7 @@ public class EssenceDrain extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new GainLifeEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/e/EternalFlame.java b/Mage.Sets/src/mage/cards/e/EternalFlame.java index 9c28d75f57..be9df520eb 100644 --- a/Mage.Sets/src/mage/cards/e/EternalFlame.java +++ b/Mage.Sets/src/mage/cards/e/EternalFlame.java @@ -46,14 +46,14 @@ import mage.target.common.TargetOpponent; */ public class EternalFlame extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountains you control"); - static { + static { filter.add(new SubtypePredicate(SubType.MOUNTAIN)); } public EternalFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); // Eternal Flame deals X damage to target opponent, where X is the number of Mountains you control. It deals half X damage, rounded up, to you.); this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)).setText("{this} deals X damage to target opponent, where X is the number of Mountains you control")); diff --git a/Mage.Sets/src/mage/cards/e/ExplodingBorders.java b/Mage.Sets/src/mage/cards/e/ExplodingBorders.java index e6bc6cd6d6..4b963ef0dd 100644 --- a/Mage.Sets/src/mage/cards/e/ExplodingBorders.java +++ b/Mage.Sets/src/mage/cards/e/ExplodingBorders.java @@ -34,10 +34,10 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; -import mage.target.TargetPlayer; import mage.target.common.TargetCardInLibrary; import java.util.UUID; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -46,13 +46,12 @@ import java.util.UUID; public class ExplodingBorders extends CardImpl { public ExplodingBorders(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{G}"); // Domain - Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Exploding Borders deals X damage to target player, where X is the number of basic land types among lands you control. this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true)); this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public ExplodingBorders(final ExplodingBorders card) { diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveApparatus.java b/Mage.Sets/src/mage/cards/e/ExplosiveApparatus.java index dfe7e31cbc..8bad2078b9 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveApparatus.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveApparatus.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,11 +49,11 @@ public class ExplosiveApparatus extends CardImpl { public ExplosiveApparatus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - // {3}, {T}, Sacrifice Explosive Apparatus: Explosive Apparatus deals 2 damage to target creature or player. + // {3}, {T}, Sacrifice Explosive Apparatus: Explosive Apparatus deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java b/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java index 140fecaf66..68615f8202 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,8 +45,8 @@ public class ExplosiveImpact extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{R}"); - // Explosive Impact deals 5 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Explosive Impact deals 5 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); } diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java index c1707a1e65..4d9796da4a 100644 --- a/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java +++ b/Mage.Sets/src/mage/cards/e/ExplosiveRevelation.java @@ -42,7 +42,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Library; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class ExplosiveRevelation extends CardImpl { public ExplosiveRevelation(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - // Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card. Explosive Revelation deals damage equal to that card's converted mana cost to that creature or player. Put the nonland card into your hand and the rest on the bottom of your library in any order. + // Choose any target. Reveal cards from the top of your library until you reveal a nonland card. Explosive Revelation deals damage equal to that card's converted mana cost to that creature or player. Put the nonland card into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new ExplosiveRevelationEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ExplosiveRevelation(final ExplosiveRevelation card) { @@ -72,7 +72,7 @@ class ExplosiveRevelationEffect extends OneShotEffect { public ExplosiveRevelationEffect() { super(Outcome.DrawCard); - this.staticText = "Choose target creature or player. Reveal cards from the top of your library until you reveal a nonland card, {this} deals damage equal to that card's converted mana cost to that creature or player. Put the nonland card into your hand and the rest on the bottom of your library in any order"; + this.staticText = "Choose any target. Reveal cards from the top of your library until you reveal a nonland card, {this} deals damage equal to that card's converted mana cost to that permanent or player. Put the nonland card into your hand and the rest on the bottom of your library in any order"; } public ExplosiveRevelationEffect(final ExplosiveRevelationEffect effect) { diff --git a/Mage.Sets/src/mage/cards/e/ExquisiteFirecraft.java b/Mage.Sets/src/mage/cards/e/ExquisiteFirecraft.java index 4bff2b57bb..49bd943d4f 100644 --- a/Mage.Sets/src/mage/cards/e/ExquisiteFirecraft.java +++ b/Mage.Sets/src/mage/cards/e/ExquisiteFirecraft.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,8 +50,8 @@ public class ExquisiteFirecraft extends CardImpl { public ExquisiteFirecraft(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{R}"); - // Exquisite Firecraft deals 4 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Exquisite Firecraft deals 4 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); // <i>Spell mastery</i> - If there are two or more instant and/or sorcery cards in your graveyard, Exquisite Firecraft can't be countered by spells or abilities. diff --git a/Mage.Sets/src/mage/cards/e/ExtraArms.java b/Mage.Sets/src/mage/cards/e/ExtraArms.java index 351fc54707..60431b8cf7 100644 --- a/Mage.Sets/src/mage/cards/e/ExtraArms.java +++ b/Mage.Sets/src/mage/cards/e/ExtraArms.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -60,9 +60,9 @@ public class ExtraArms extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Whenever enchanted creature attacks, it deals 2 damage to target creature or player. + // Whenever enchanted creature attacks, it deals 2 damage to any target. ability = new AttacksAttachedTriggeredAbility(new DamageTargetEffect(2, "it"), AttachmentType.AURA, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java index 8bd0c51b57..0ed6e7c105 100644 --- a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java +++ b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java @@ -43,7 +43,7 @@ import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author North @@ -85,7 +85,7 @@ class ExuberantFirestokerTriggeredAbility extends TriggeredAbilityImpl { public ExuberantFirestokerTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(2), true); - this.addTarget(new TargetPlayer()); + this.addTarget(new TargetPlayerOrPlaneswalker()); } public ExuberantFirestokerTriggeredAbility(final ExuberantFirestokerTriggeredAbility ability) { @@ -114,6 +114,6 @@ class ExuberantFirestokerTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "At the beginning of your end step, if you control a creature with power 5 or greater, you may have {this} deal 2 damage to target player."; + return "At the beginning of your end step, if you control a creature with power 5 or greater, you may have {this} deal 2 damage to target player or planeswalker."; } } diff --git a/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java b/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java index 8c0f86eb84..e0e5b68bed 100644 --- a/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java +++ b/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.SurgeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,7 +46,7 @@ public class FallOfTheTitans extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{X}{R}"); // Fall of the Titans deals X damage to each of up to two target creatures and/or players. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0, 2)); + this.getSpellAbility().addTarget(new TargetAnyTarget(0, 2)); this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); // Surge {X}{R} diff --git a/Mage.Sets/src/mage/cards/f/FallenFerromancer.java b/Mage.Sets/src/mage/cards/f/FallenFerromancer.java index ba77d08382..4d4637ded5 100644 --- a/Mage.Sets/src/mage/cards/f/FallenFerromancer.java +++ b/Mage.Sets/src/mage/cards/f/FallenFerromancer.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,10 +58,10 @@ public class FallenFerromancer extends CardImpl { // Infect (This creature deals damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) this.addAbility(InfectAbility.getInstance()); - // {1}{R}, {T}: Fallen Ferromancer deals 1 damage to target creature or player. + // {1}{R}, {T}: Fallen Ferromancer deals 1 damage to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{1}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java b/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java index 42d3d2dab5..ce17cbd4f1 100644 --- a/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java +++ b/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -62,10 +62,10 @@ public class FanaticalFirebrand extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - // {T}, Sacrifice Fanatical Firebrand: It deals 1 damage to target creature or player. + // {T}, Sacrifice Fanatical Firebrand: It deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FanningTheFlames.java b/Mage.Sets/src/mage/cards/f/FanningTheFlames.java index 9061a611f8..6a88351046 100644 --- a/Mage.Sets/src/mage/cards/f/FanningTheFlames.java +++ b/Mage.Sets/src/mage/cards/f/FanningTheFlames.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class FanningTheFlames extends CardImpl { // Buyback {3} this.addAbility(new BuybackAbility("{3}")); - // Fanning the Flames deals X damage to target creature or player. + // Fanning the Flames deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public FanningTheFlames(final FanningTheFlames card) { diff --git a/Mage.Sets/src/mage/cards/f/FatefulShowdown.java b/Mage.Sets/src/mage/cards/f/FatefulShowdown.java index dd5f8cab3b..733cb73732 100644 --- a/Mage.Sets/src/mage/cards/f/FatefulShowdown.java +++ b/Mage.Sets/src/mage/cards/f/FatefulShowdown.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.discard.DiscardHandDrawSameNumberSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,11 +46,11 @@ public class FatefulShowdown extends CardImpl { public FatefulShowdown(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{R}"); - // Fateful Showdown deals damage to target creature or player equal to the number of cards in your hand. Discard all the cards in your hand, then draw that many cards. + // Fateful Showdown deals damage to any target equal to the number of cards in your hand. Discard all the cards in your hand, then draw that many cards. Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); - effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand"); + effect.setText("{this} deals damage to any target equal to the number of cards in your hand"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DiscardHandDrawSameNumberSourceEffect()); } diff --git a/Mage.Sets/src/mage/cards/f/FeedbackBolt.java b/Mage.Sets/src/mage/cards/f/FeedbackBolt.java index 76d917a3ad..ac0cfc6a2e 100644 --- a/Mage.Sets/src/mage/cards/f/FeedbackBolt.java +++ b/Mage.Sets/src/mage/cards/f/FeedbackBolt.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterControlledArtifactPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,14 +44,13 @@ import mage.target.TargetPlayer; public class FeedbackBolt extends CardImpl { public FeedbackBolt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); // Feedback Bolt deals damage to target player equal to the number of artifacts you control. Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent())); - effect.setText("{this} deals damage to target player equal to the number of artifacts you control"); + effect.setText("{this} deals damage to target player or planeswalker equal to the number of artifacts you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public FeedbackBolt(final FeedbackBolt card) { diff --git a/Mage.Sets/src/mage/cards/f/FemerefHealer.java b/Mage.Sets/src/mage/cards/f/FemerefHealer.java index 4eaf6ec881..85baae097c 100644 --- a/Mage.Sets/src/mage/cards/f/FemerefHealer.java +++ b/Mage.Sets/src/mage/cards/f/FemerefHealer.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class FemerefHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FerventPaincaster.java b/Mage.Sets/src/mage/cards/f/FerventPaincaster.java index 819d3d0379..50899abced 100644 --- a/Mage.Sets/src/mage/cards/f/FerventPaincaster.java +++ b/Mage.Sets/src/mage/cards/f/FerventPaincaster.java @@ -39,8 +39,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -50,24 +50,24 @@ public class FerventPaincaster extends CardImpl { public FerventPaincaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - + this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); - + this.power = new MageInt(3); this.toughness = new MageInt(1); // {T}: Fervent Paincaster deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); - + // {T}, Exert Fervent Paincaster: It deals 1 damage to target creature. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new TapSourceCost()); ability2.addCost(new ExertSourceCost()); ability2.addTarget(new TargetCreaturePermanent()); this.addAbility(ability2); - + } public FerventPaincaster(final FerventPaincaster card) { diff --git a/Mage.Sets/src/mage/cards/f/FieryBombardment.java b/Mage.Sets/src/mage/cards/f/FieryBombardment.java index 48dbb4f9d9..092ebc1c07 100644 --- a/Mage.Sets/src/mage/cards/f/FieryBombardment.java +++ b/Mage.Sets/src/mage/cards/f/FieryBombardment.java @@ -46,7 +46,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class FieryBombardment extends CardImpl { public FieryBombardment(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - // Chroma - {2}, Sacrifice a creature: Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost. + // Chroma - {2}, Sacrifice a creature: Fiery Bombardment deals damage to any target equal to the number of red mana symbols in the sacrificed creature's mana cost. Effect effect = new FieryBombardmentEffect(); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.setAbilityWord(AbilityWord.CHROMA); this.addAbility(ability); @@ -82,7 +82,7 @@ class FieryBombardmentEffect extends OneShotEffect { public FieryBombardmentEffect() { super(Outcome.Benefit); - staticText = "{this} deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost."; + staticText = "{this} deals damage to any target equal to the number of red mana symbols in the sacrificed creature's mana cost."; } public FieryBombardmentEffect(final FieryBombardmentEffect effect) { diff --git a/Mage.Sets/src/mage/cards/f/FieryJustice.java b/Mage.Sets/src/mage/cards/f/FieryJustice.java index 18b279736a..f38d9970ea 100644 --- a/Mage.Sets/src/mage/cards/f/FieryJustice.java +++ b/Mage.Sets/src/mage/cards/f/FieryJustice.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.GainLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; import mage.target.common.TargetOpponent; import mage.target.targetpointer.SecondTargetPointer; @@ -50,7 +50,7 @@ public class FieryJustice extends CardImpl { // Fiery Justice deals 5 damage divided as you choose among any number of target creatures and/or players. Target opponent gains 5 life. this.getSpellAbility().addEffect(new DamageMultiEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(5)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5)); Effect effect = new GainLifeTargetEffect(5); effect.setTargetPointer(new SecondTargetPointer()); effect.setText("Target opponent gains 5 life"); diff --git a/Mage.Sets/src/mage/cards/f/FieryTemper.java b/Mage.Sets/src/mage/cards/f/FieryTemper.java index 1331c46e3a..3df798b1d3 100644 --- a/Mage.Sets/src/mage/cards/f/FieryTemper.java +++ b/Mage.Sets/src/mage/cards/f/FieryTemper.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class FieryTemper extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); - // Fiery Temper deals 3 damage to target creature or player. + // Fiery Temper deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Madness {R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{R}"))); diff --git a/Mage.Sets/src/mage/cards/f/FinalStrike.java b/Mage.Sets/src/mage/cards/f/FinalStrike.java index 751635fdb7..4dfd8f1c2e 100644 --- a/Mage.Sets/src/mage/cards/f/FinalStrike.java +++ b/Mage.Sets/src/mage/cards/f/FinalStrike.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -53,9 +53,9 @@ public class FinalStrike extends CardImpl { // Final Strike deals damage to target opponent equal to the sacrificed creature's power. Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower()); - effect.setText("{this} deals damage to target opponent equal to the sacrificed creature's power"); + effect.setText("{this} deals damage to target opponent or planeswalker equal to the sacrificed creature's power"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); } public FinalStrike(final FinalStrike card) { diff --git a/Mage.Sets/src/mage/cards/f/FireAmbush.java b/Mage.Sets/src/mage/cards/f/FireAmbush.java index e5f6abd191..e0e9a4ca33 100644 --- a/Mage.Sets/src/mage/cards/f/FireAmbush.java +++ b/Mage.Sets/src/mage/cards/f/FireAmbush.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class FireAmbush extends CardImpl { public FireAmbush(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Fire Ambush deals 3 damage to target creature or player. + // Fire Ambush deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public FireAmbush(final FireAmbush card) { diff --git a/Mage.Sets/src/mage/cards/f/FireBowman.java b/Mage.Sets/src/mage/cards/f/FireBowman.java index c7de392c33..e7d17a5235 100644 --- a/Mage.Sets/src/mage/cards/f/FireBowman.java +++ b/Mage.Sets/src/mage/cards/f/FireBowman.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class FireBowman extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Sacrifice Fire Bowman: Fire Bowman deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared. + // Sacrifice Fire Bowman: Fire Bowman deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FireIce.java b/Mage.Sets/src/mage/cards/f/FireIce.java index a704fa2cfc..bdbb6ef1fa 100644 --- a/Mage.Sets/src/mage/cards/f/FireIce.java +++ b/Mage.Sets/src/mage/cards/f/FireIce.java @@ -37,7 +37,7 @@ import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.SpellAbilityType; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; public class FireIce extends SplitCard { @@ -49,7 +49,7 @@ public class FireIce extends SplitCard { Effect effect = new DamageMultiEffect(2); effect.setText("Fire deals 2 damage divided as you choose among one or two target creatures and/or players"); getLeftHalfCard().getSpellAbility().addEffect(effect); - getLeftHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); + getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTargetAmount(2)); // Ice // Tap target permanent. diff --git a/Mage.Sets/src/mage/cards/f/FireWhip.java b/Mage.Sets/src/mage/cards/f/FireWhip.java index 8196680e08..9609f461b4 100644 --- a/Mage.Sets/src/mage/cards/f/FireWhip.java +++ b/Mage.Sets/src/mage/cards/f/FireWhip.java @@ -42,7 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,13 +62,13 @@ public class FireWhip extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{t}: This creature deals 1 damage to target creature or player." + // Enchanted creature has "{t}: This creature deals 1 damage to any target." Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability1.addTarget(new TargetCreatureOrPlayer()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability1, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted creature has \"{t}: This creature deals 1 damage to target creature or player.\""))); - // Sacrifice Fire Whip: Fire Whip deals 1 damage to target creature or player. + ability1.addTarget(new TargetAnyTarget()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability1, AttachmentType.AURA, Duration.WhileOnBattlefield, "Enchanted creature has \"{t}: This creature deals 1 damage to any target.\""))); + // Sacrifice Fire Whip: Fire Whip deals 1 damage to any target. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/f/Fireball.java b/Mage.Sets/src/mage/cards/f/Fireball.java index 22aaac5be9..db6b42e945 100644 --- a/Mage.Sets/src/mage/cards/f/Fireball.java +++ b/Mage.Sets/src/mage/cards/f/Fireball.java @@ -38,7 +38,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -115,7 +115,7 @@ class FireballEffect extends OneShotEffect { } -class FireballTargetCreatureOrPlayer extends TargetCreatureOrPlayer { +class FireballTargetCreatureOrPlayer extends TargetAnyTarget { public FireballTargetCreatureOrPlayer(int minNumTargets, int maxNumTargets) { super(minNumTargets, maxNumTargets); @@ -133,9 +133,9 @@ class FireballTargetCreatureOrPlayer extends TargetCreatureOrPlayer { * @return */ @Override - public List<TargetCreatureOrPlayer> getTargetOptions(Ability source, Game game) { + public List<TargetAnyTarget> getTargetOptions(Ability source, Game game) { - List<TargetCreatureOrPlayer> options = new ArrayList<>(); + List<TargetAnyTarget> options = new ArrayList<>(); int xVal = source.getManaCostsToPay().getX(); if (xVal < 1) { @@ -155,7 +155,7 @@ class FireballTargetCreatureOrPlayer extends TargetCreatureOrPlayer { possibleTargets.removeAll(getTargets()); for (UUID targetId : possibleTargets) { - TargetCreatureOrPlayer target = this.copy(); + TargetAnyTarget target = this.copy(); target.clearChosen(); target.addTarget(targetId, source, game, true); diff --git a/Mage.Sets/src/mage/cards/f/Fireblast.java b/Mage.Sets/src/mage/cards/f/Fireblast.java index 8b4e5c4b0c..f5bf8aab78 100644 --- a/Mage.Sets/src/mage/cards/f/Fireblast.java +++ b/Mage.Sets/src/mage/cards/f/Fireblast.java @@ -38,7 +38,7 @@ import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,9 +59,9 @@ public class Fireblast extends CardImpl { // You may sacrifice two Mountains rather than pay Fireblast's mana cost. this.addAbility(new AlternativeCostSourceAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, filter, true)))); - // Fireblast deals 4 damage to target creature or player. + // Fireblast deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/f/Firebolt.java b/Mage.Sets/src/mage/cards/f/Firebolt.java index 10d787f268..627cdce7ff 100644 --- a/Mage.Sets/src/mage/cards/f/Firebolt.java +++ b/Mage.Sets/src/mage/cards/f/Firebolt.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class Firebolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Firebolt deals 2 damage to target creature or player. + // Firebolt deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Flashback {4}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{4}{R}"), TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/f/FireforgersPuzzleknot.java b/Mage.Sets/src/mage/cards/f/FireforgersPuzzleknot.java index 175306c8e6..4d31686943 100644 --- a/Mage.Sets/src/mage/cards/f/FireforgersPuzzleknot.java +++ b/Mage.Sets/src/mage/cards/f/FireforgersPuzzleknot.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,16 +50,16 @@ public class FireforgersPuzzleknot extends CardImpl { public FireforgersPuzzleknot(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); - // When Fireforger's Puzzleknot enters the battlefield, it deals 1 damage to target creature or player. + // When Fireforger's Puzzleknot enters the battlefield, it deals 1 damage to any target. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // {2}{R}, Sacrifice Fireforger's Puzzleknot: It deals 1 damage to target creature or player. + // {2}{R}, Sacrifice Fireforger's Puzzleknot: It deals 1 damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new ManaCostsImpl<>("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java b/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java index 8a7f74c448..b1a3656df2 100644 --- a/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java +++ b/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class FiremaneAvenger extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Battalion - Whenever Firemane Avenger and at least two other creatures attack, Firemane Avenger deals 3 damage to target creature or player and you gain 3 life. + // Battalion - Whenever Firemane Avenger and at least two other creatures attack, Firemane Avenger deals 3 damage to any target and you gain 3 life. Ability ability = new BattalionAbility(new DamageTargetEffect(3)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new GainLifeEffect(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FiresOfUndeath.java b/Mage.Sets/src/mage/cards/f/FiresOfUndeath.java index b0c967e367..44dbffae4f 100644 --- a/Mage.Sets/src/mage/cards/f/FiresOfUndeath.java +++ b/Mage.Sets/src/mage/cards/f/FiresOfUndeath.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,8 +47,8 @@ public class FiresOfUndeath extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Fires of Undeath deals 2 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Fires of Undeath deals 2 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(2)); // Flashback {5}{B} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{B}"), TimingRule.INSTANT)); diff --git a/Mage.Sets/src/mage/cards/f/Fireslinger.java b/Mage.Sets/src/mage/cards/f/Fireslinger.java index f2f51fedbc..9caa9705a6 100644 --- a/Mage.Sets/src/mage/cards/f/Fireslinger.java +++ b/Mage.Sets/src/mage/cards/f/Fireslinger.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,7 +56,7 @@ public class Fireslinger extends CardImpl { this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addEffect(new DamageControllerEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java b/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java index 405f09e662..cbf485bda0 100644 --- a/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java +++ b/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java @@ -75,7 +75,7 @@ public class FiresongAndSunspeaker extends CardImpl { Effect effect = new GainAbilitySpellsEffect(LifelinkAbility.getInstance(), filter); effect.setText("Instant and sorcery spells you control have lifelink"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - // Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to target creature or player. + // Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to any target. this.addAbility(new FiresongAndSunspeakerTriggeredAbility()); } @@ -125,6 +125,6 @@ class FiresongAndSunspeakerTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to target creature or player."; + return "Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to any target."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/Firestorm.java b/Mage.Sets/src/mage/cards/f/Firestorm.java index 0047fb105f..46da040cd8 100644 --- a/Mage.Sets/src/mage/cards/f/Firestorm.java +++ b/Mage.Sets/src/mage/cards/f/Firestorm.java @@ -41,7 +41,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,7 +67,7 @@ public class Firestorm extends CardImpl { public void adjustTargets(Ability ability, Game game) { int xValue = new GetXValue().calculate(game, ability, null); if (xValue > 0) { - Target target = new TargetCreatureOrPlayer(xValue); + Target target = new TargetAnyTarget(xValue); ability.addTarget(target); } } diff --git a/Mage.Sets/src/mage/cards/f/FiveAlarmFire.java b/Mage.Sets/src/mage/cards/f/FiveAlarmFire.java index e78f9ce457..a33cc51eef 100644 --- a/Mage.Sets/src/mage/cards/f/FiveAlarmFire.java +++ b/Mage.Sets/src/mage/cards/f/FiveAlarmFire.java @@ -44,7 +44,7 @@ import mage.game.events.DamagedEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.HashSet; import java.util.Set; @@ -63,9 +63,9 @@ public class FiveAlarmFire extends CardImpl { //Whenever a creature you control deals combat damage, put a blaze counter on Five-Alarm Fire. this.addAbility(new FiveAlarmFireTriggeredAbility()); - //Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to target creature or player. + //Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new RemoveCountersSourceCost(CounterType.BLAZE.createInstance(5))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FlameBurst.java b/Mage.Sets/src/mage/cards/f/FlameBurst.java index 600535ce69..96510484b8 100644 --- a/Mage.Sets/src/mage/cards/f/FlameBurst.java +++ b/Mage.Sets/src/mage/cards/f/FlameBurst.java @@ -43,7 +43,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,11 +61,11 @@ public class FlameBurst extends CardImpl { public FlameBurst(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Flame Burst deals X damage to target creature or player, where X is 2 plus the number of cards named Flame Burst in all graveyards. + // Flame Burst deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards. Effect effect = new DamageTargetEffect(new FlameBurstCount(filter)); - effect.setText("{this} deals X damage to target creature or player, where X is 2 plus the number of cards named Flame Burst in all graveyards."); + effect.setText("{this} deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards."); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public FlameBurst(final FlameBurst card) { diff --git a/Mage.Sets/src/mage/cards/f/FlameFusillade.java b/Mage.Sets/src/mage/cards/f/FlameFusillade.java index 57390e72a7..f570b7ca76 100644 --- a/Mage.Sets/src/mage/cards/f/FlameFusillade.java +++ b/Mage.Sets/src/mage/cards/f/FlameFusillade.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class FlameFusillade extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); - // Until end of turn, permanents you control gain "{tap}: This permanent deals 1 damage to target creature or player." + // Until end of turn, permanents you control gain "{tap}: This permanent deals 1 damage to any target." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new GainAbilityControlledEffect(gainedAbility, Duration.EndOfTurn)); } diff --git a/Mage.Sets/src/mage/cards/f/FlameJab.java b/Mage.Sets/src/mage/cards/f/FlameJab.java index 95d610ecf6..e683be723c 100644 --- a/Mage.Sets/src/mage/cards/f/FlameJab.java +++ b/Mage.Sets/src/mage/cards/f/FlameJab.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.RetraceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class FlameJab extends CardImpl { public FlameJab(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Flame Jab deals 1 damage to target creature or player. + // Flame Jab deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Retrace this.addAbility(new RetraceAbility(this)); } diff --git a/Mage.Sets/src/mage/cards/f/FlameJavelin.java b/Mage.Sets/src/mage/cards/f/FlameJavelin.java index 3043de4b97..1f02395b51 100644 --- a/Mage.Sets/src/mage/cards/f/FlameJavelin.java +++ b/Mage.Sets/src/mage/cards/f/FlameJavelin.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class FlameJavelin extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2/R}{2/R}{2/R}"); - // Flame Javelin deals 4 damage to target creature or player. + // Flame Javelin deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public FlameJavelin(final FlameJavelin card) { diff --git a/Mage.Sets/src/mage/cards/f/FlameJet.java b/Mage.Sets/src/mage/cards/f/FlameJet.java index a8d8683f7a..56bac17b06 100644 --- a/Mage.Sets/src/mage/cards/f/FlameJet.java +++ b/Mage.Sets/src/mage/cards/f/FlameJet.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -43,11 +43,11 @@ import mage.target.TargetPlayer; public class FlameJet extends CardImpl { public FlameJet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); // Flame Jet deals 3 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); } diff --git a/Mage.Sets/src/mage/cards/f/FlameLash.java b/Mage.Sets/src/mage/cards/f/FlameLash.java index f23eb71205..d7c93d3dfc 100644 --- a/Mage.Sets/src/mage/cards/f/FlameLash.java +++ b/Mage.Sets/src/mage/cards/f/FlameLash.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,9 +43,9 @@ public class FlameLash extends CardImpl { public FlameLash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - // Flame Lash deals 4 damage to target creature or player. + // Flame Lash deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public FlameLash(final FlameLash card) { diff --git a/Mage.Sets/src/mage/cards/f/FlameWave.java b/Mage.Sets/src/mage/cards/f/FlameWave.java index 8e770851c6..9ffb84f079 100644 --- a/Mage.Sets/src/mage/cards/f/FlameWave.java +++ b/Mage.Sets/src/mage/cards/f/FlameWave.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -43,12 +43,14 @@ import mage.target.TargetPlayer; public class FlameWave extends CardImpl { public FlameWave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}{R}"); // Flame Wave deals 4 damage to target player and each creature he or she controls. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent())); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent()) + .setText("and each creature that player or that planeswalker’s controller controls") + ); } public FlameWave(final FlameWave card) { @@ -59,4 +61,4 @@ public class FlameWave extends CardImpl { public FlameWave copy() { return new FlameWave(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FlameblastDragon.java b/Mage.Sets/src/mage/cards/f/FlameblastDragon.java index 1ca9af2aac..1157f1a8ec 100644 --- a/Mage.Sets/src/mage/cards/f/FlameblastDragon.java +++ b/Mage.Sets/src/mage/cards/f/FlameblastDragon.java @@ -44,7 +44,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -60,9 +60,9 @@ public class FlameblastDragon extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Flameblast Dragon attacks, you may pay {X}{R}. If you do, Flameblast Dragon deals X damage to target creature or player. + // Whenever Flameblast Dragon attacks, you may pay {X}{R}. If you do, Flameblast Dragon deals X damage to any target. Ability ability = new AttacksTriggeredAbility(new FlameblastDragonEffect(), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -80,7 +80,7 @@ class FlameblastDragonEffect extends OneShotEffect { FlameblastDragonEffect() { super(Outcome.Benefit); - staticText = "you may pay {X}{R}. If you do, {this} deals X damage to target creature or player"; + staticText = "you may pay {X}{R}. If you do, {this} deals X damage to any target"; } FlameblastDragonEffect(final FlameblastDragonEffect effect) { @@ -92,7 +92,7 @@ class FlameblastDragonEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); ManaCosts cost = new ManaCostsImpl("{X}{R}"); if (player != null) { - if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + "? If you do, Flameblast Dragon deals X damage to target creature or player", source, game)) { + if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + "? If you do, Flameblast Dragon deals X damage to any target", source, game)) { int costX = player.announceXMana(0, Integer.MAX_VALUE, "Announce the value for {X}", game, source); cost.add(new GenericManaCost(costX)); if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) { diff --git a/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java b/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java index 23038d1bff..e7c4ca407c 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinSpitfire.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,7 +54,7 @@ public class FlamekinSpitfire extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{3}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java b/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java index 3613deb3cf..1af364ac62 100644 --- a/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java +++ b/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java @@ -38,7 +38,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,14 +47,13 @@ import mage.target.TargetPlayer; public class FlamesOfTheBloodHand extends CardImpl { public FlamesOfTheBloodHand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Flames of the Blood Hand deals 4 damage to target player. The damage can't be prevented. this.getSpellAbility().addEffect(new DamageTargetEffect(4, false)); // If that player would gain life this turn, that player gains no life instead. this.getSpellAbility().addEffect(new FlamesOfTheBloodHandReplacementEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public FlamesOfTheBloodHand(final FlamesOfTheBloodHand card) { @@ -86,8 +85,8 @@ class FlamesOfTheBloodHandReplacementEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.GAIN_LIFE; - } - + } + @Override public boolean applies(GameEvent event, Ability source, Game game) { return event.getPlayerId().equals(getTargetPointer().getFirst(game, source)); @@ -103,4 +102,4 @@ class FlamesOfTheBloodHandReplacementEffect extends ReplacementEffectImpl { return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FlamesOfTheFirebrand.java b/Mage.Sets/src/mage/cards/f/FlamesOfTheFirebrand.java index e76acc7312..bdbaaff773 100644 --- a/Mage.Sets/src/mage/cards/f/FlamesOfTheFirebrand.java +++ b/Mage.Sets/src/mage/cards/f/FlamesOfTheFirebrand.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -46,7 +46,7 @@ public class FlamesOfTheFirebrand extends CardImpl { // Flames of the Firebrand deals 3 damage divided as you choose among one, two, or three target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(3)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3)); } public FlamesOfTheFirebrand(final FlamesOfTheFirebrand card) { diff --git a/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java b/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java index cf9a716659..acbe454ddd 100644 --- a/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java +++ b/Mage.Sets/src/mage/cards/f/FlamewaveInvoker.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,14 +47,14 @@ import mage.target.TargetPlayer; public class FlamewaveInvoker extends CardImpl { public FlamewaveInvoker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.MUTANT); this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new ManaCostsImpl("{7}{R}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Flamewright.java b/Mage.Sets/src/mage/cards/f/Flamewright.java index 24cca2e3ce..6f2b6693d0 100644 --- a/Mage.Sets/src/mage/cards/f/Flamewright.java +++ b/Mage.Sets/src/mage/cards/f/Flamewright.java @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.permanent.token.ConstructToken; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -74,10 +74,10 @@ public class Flamewright extends CardImpl { ability.addCost(new TapSourceCost()); this.addAbility(ability); - // {tap}, Sacrifice a creature with defender: Flamewright deals 1 damage to target creature or player. + // {tap}, Sacrifice a creature with defender: Flamewright deals 1 damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Flare.java b/Mage.Sets/src/mage/cards/f/Flare.java index abe661997c..9cf37fcdd7 100644 --- a/Mage.Sets/src/mage/cards/f/Flare.java +++ b/Mage.Sets/src/mage/cards/f/Flare.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class Flare extends CardImpl { public Flare(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Flare deals 1 damage to target creature or player. + // Flare deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); diff --git a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java index a986e11891..75ec723f8e 100644 --- a/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java +++ b/Mage.Sets/src/mage/cards/f/FlayerOfTheHatebound.java @@ -46,7 +46,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,9 +63,9 @@ public class FlayerOfTheHatebound extends CardImpl { this.addAbility(new UndyingAbility()); - // Whenever Flayer of the Hatebound or another creature enters the battlefield from your graveyard, that creature deals damage equal to its power to target creature or player. + // Whenever Flayer of the Hatebound or another creature enters the battlefield from your graveyard, that creature deals damage equal to its power to any target. Ability ability = new FlayerTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -109,7 +109,7 @@ class FlayerTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever Flayer of the Hatebound or another creature enters the battlefield from your graveyard, that creature deals damage equal to its power to target creature or player."; + return "Whenever Flayer of the Hatebound or another creature enters the battlefield from your graveyard, that creature deals damage equal to its power to any target."; } @Override @@ -122,7 +122,7 @@ class FlayerEffect extends OneShotEffect { public FlayerEffect() { super(Outcome.Damage); - staticText = "that creature deals damage equal to its power to target creature or player"; + staticText = "that creature deals damage equal to its power to any target"; } public FlayerEffect(final FlayerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/f/FledglingMawcor.java b/Mage.Sets/src/mage/cards/f/FledglingMawcor.java index 6ac9a811e8..98761a4503 100644 --- a/Mage.Sets/src/mage/cards/f/FledglingMawcor.java +++ b/Mage.Sets/src/mage/cards/f/FledglingMawcor.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class FledglingMawcor extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Fledgling Mawcor deals 1 damage to target creature or player. + // {tap}: Fledgling Mawcor deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Morph {U}{U} diff --git a/Mage.Sets/src/mage/cards/f/FleshBlood.java b/Mage.Sets/src/mage/cards/f/FleshBlood.java index 14b6b98df3..6fcc518946 100644 --- a/Mage.Sets/src/mage/cards/f/FleshBlood.java +++ b/Mage.Sets/src/mage/cards/f/FleshBlood.java @@ -45,7 +45,7 @@ import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; public class FleshBlood extends SplitCard { @@ -61,9 +61,9 @@ public class FleshBlood extends SplitCard { getLeftHalfCard().getSpellAbility().addEffect(new FleshEffect()); // Blood - // Target creature you control deals damage equal to its power to target creature or player. + // Target creature you control deals damage equal to its power to any target. getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - getRightHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + getRightHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); getRightHalfCard().getSpellAbility().addEffect(new BloodEffect()); } @@ -117,7 +117,7 @@ class BloodEffect extends OneShotEffect { public BloodEffect() { super(Outcome.Damage); - staticText = "Target creature you control deals damage equal to its power to target creature or player"; + staticText = "Target creature you control deals damage equal to its power to any target"; } public BloodEffect(final BloodEffect effect) { diff --git a/Mage.Sets/src/mage/cards/f/Fling.java b/Mage.Sets/src/mage/cards/f/Fling.java index 60f5457d20..f428d5b989 100644 --- a/Mage.Sets/src/mage/cards/f/Fling.java +++ b/Mage.Sets/src/mage/cards/f/Fling.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,9 +49,9 @@ public class Fling extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower()); - effect.setText("{this} deals damage equal to the sacrificed creature's power to target creature or player"); + effect.setText("{this} deals damage equal to the sacrificed creature's power to any target"); this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/f/FloweringField.java b/Mage.Sets/src/mage/cards/f/FloweringField.java index 6103554d2a..e909164cae 100644 --- a/Mage.Sets/src/mage/cards/f/FloweringField.java +++ b/Mage.Sets/src/mage/cards/f/FloweringField.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetLandPermanent; /** @@ -60,11 +60,11 @@ public class FloweringField extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn." + // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to any target this turn." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\""); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to any target this turn.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/f/FontOfIre.java b/Mage.Sets/src/mage/cards/f/FontOfIre.java index d17ab709c0..7853977f54 100644 --- a/Mage.Sets/src/mage/cards/f/FontOfIre.java +++ b/Mage.Sets/src/mage/cards/f/FontOfIre.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -46,14 +46,13 @@ import mage.target.TargetPlayer; public class FontOfIre extends CardImpl { public FontOfIre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); // {3}{R}, Sacrifice Font of Ire: Font of Ire deals 5 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new ManaCostsImpl("{3}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); - this.addAbility(ability); + ability.addTarget(new TargetPlayerOrPlaneswalker()); + this.addAbility(ability); } public FontOfIre(final FontOfIre card) { diff --git a/Mage.Sets/src/mage/cards/f/ForceDrain.java b/Mage.Sets/src/mage/cards/f/ForceDrain.java index 60b2483cf4..c4cf51ada8 100644 --- a/Mage.Sets/src/mage/cards/f/ForceDrain.java +++ b/Mage.Sets/src/mage/cards/f/ForceDrain.java @@ -38,7 +38,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,8 +49,8 @@ public class ForceDrain extends CardImpl { public ForceDrain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); - // ForceDrain deals 2 damage to target creature or player. If player was dealt damage this way, you gain 2 life. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // ForceDrain deals 2 damage to any target. If player was dealt damage this way, you gain 2 life. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ForceDrainEffect()); // Scry 1 @@ -71,7 +71,7 @@ class ForceDrainEffect extends OneShotEffect { public ForceDrainEffect() { super(Outcome.Damage); - this.staticText = "ForceDrain deals 2 damage to target creature or player. If player was dealt damage this way, you gain 2 life"; + this.staticText = "ForceDrain deals 2 damage to any target. If player was dealt damage this way, you gain 2 life"; } public ForceDrainEffect(final ForceDrainEffect effect) { diff --git a/Mage.Sets/src/mage/cards/f/ForceHealing.java b/Mage.Sets/src/mage/cards/f/ForceHealing.java index e69acd05f3..34aac29fbd 100644 --- a/Mage.Sets/src/mage/cards/f/ForceHealing.java +++ b/Mage.Sets/src/mage/cards/f/ForceHealing.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class ForceHealing extends CardImpl { public ForceHealing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - // Prevent the next 4 damage that would be dealt to target creature or player this turn. + // Prevent the next 4 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Scry 1 this.getSpellAbility().addEffect(new ScryEffect(1)); diff --git a/Mage.Sets/src/mage/cards/f/ForceLightning.java b/Mage.Sets/src/mage/cards/f/ForceLightning.java index 43fde38faa..8efea5082c 100644 --- a/Mage.Sets/src/mage/cards/f/ForceLightning.java +++ b/Mage.Sets/src/mage/cards/f/ForceLightning.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,9 +49,9 @@ public class ForceLightning extends CardImpl { public ForceLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}{R}"); - // Force Lightning deals X damage to target creature or player. + // Force Lightning deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Scry X. this.getSpellAbility().addEffect(new ForceLightningEffect()); diff --git a/Mage.Sets/src/mage/cards/f/ForceSpark.java b/Mage.Sets/src/mage/cards/f/ForceSpark.java index aeb5043a79..0cdb67d810 100644 --- a/Mage.Sets/src/mage/cards/f/ForceSpark.java +++ b/Mage.Sets/src/mage/cards/f/ForceSpark.java @@ -33,7 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class ForceSpark extends CardImpl { public ForceSpark(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Force Spark deals 1 damage to target creature or player. + // Force Spark deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Scry 1. this.getSpellAbility().addEffect(new ScryEffect(1)); diff --git a/Mage.Sets/src/mage/cards/f/ForgebornOreads.java b/Mage.Sets/src/mage/cards/f/ForgebornOreads.java index 0772f07379..735f30ca9d 100644 --- a/Mage.Sets/src/mage/cards/f/ForgebornOreads.java +++ b/Mage.Sets/src/mage/cards/f/ForgebornOreads.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class ForgebornOreads extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(2); - // Constellation - Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. + // Constellation - Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to any target. Ability ability = new ConstellationAbility(new DamageTargetEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/ForkedBolt.java b/Mage.Sets/src/mage/cards/f/ForkedBolt.java index dceb13efc3..9f7cb72e19 100644 --- a/Mage.Sets/src/mage/cards/f/ForkedBolt.java +++ b/Mage.Sets/src/mage/cards/f/ForkedBolt.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -49,7 +49,7 @@ public class ForkedBolt extends CardImpl { Effect effect = new DamageMultiEffect(2); effect.setText("{this} deals 2 damage divided as you choose among one or two target creatures and/or players"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java b/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java index 859e047b7b..5fd32482ee 100644 --- a/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java +++ b/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java @@ -45,7 +45,7 @@ import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class FormOfTheDragon extends CardImpl { public FormOfTheDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}{R}{R}"); - // At the beginning of your upkeep, Form of the Dragon deals 5 damage to target creature or player. + // At the beginning of your upkeep, Form of the Dragon deals 5 damage to any target. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(5), TargetController.YOU, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // At the beginning of each end step, your life total becomes 5. diff --git a/Mage.Sets/src/mage/cards/f/FoundryChampion.java b/Mage.Sets/src/mage/cards/f/FoundryChampion.java index cf5f12c981..7b524de3b4 100644 --- a/Mage.Sets/src/mage/cards/f/FoundryChampion.java +++ b/Mage.Sets/src/mage/cards/f/FoundryChampion.java @@ -44,7 +44,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,9 +61,9 @@ public class FoundryChampion extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - //When Foundry Champion enters the battlefield, it deals damage to target creature or player equal to the number of creatures you control. + //When Foundry Champion enters the battlefield, it deals damage to any target equal to the number of creatures you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); //{R}: Foundry Champion gets +1/+0 until end of turn. diff --git a/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java b/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java index 3dde24eed3..aa136bec84 100644 --- a/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java +++ b/Mage.Sets/src/mage/cards/f/FrilledDeathspitter.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -54,9 +54,9 @@ public class FrilledDeathspitter extends CardImpl { // <i>Enrage</i> — Whenever Frilled Deathspitter is dealt damage, it deals 2 damage to target opponent. Ability ability = new DealtDamageToSourceTriggeredAbility( - Zone.BATTLEFIELD, new DamageTargetEffect(2).setText("it deals 2 damage to target opponent"), false, true + Zone.BATTLEFIELD, new DamageTargetEffect(2).setText("it deals 2 damage to target opponent or planeswalker"), false, true ); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Frostwielder.java b/Mage.Sets/src/mage/cards/f/Frostwielder.java index d8f755e4ee..69ef1f827b 100644 --- a/Mage.Sets/src/mage/cards/f/Frostwielder.java +++ b/Mage.Sets/src/mage/cards/f/Frostwielder.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -58,9 +58,9 @@ public class Frostwielder extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // {T}: Frostwielder deals 1 damage to target creature or player. + // {T}: Frostwielder deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // If a creature dealt damage by Frostwielder this turn would die, exile it instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher()); diff --git a/Mage.Sets/src/mage/cards/f/FuriousAssault.java b/Mage.Sets/src/mage/cards/f/FuriousAssault.java index 429978ce77..6346206d3a 100644 --- a/Mage.Sets/src/mage/cards/f/FuriousAssault.java +++ b/Mage.Sets/src/mage/cards/f/FuriousAssault.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,7 +48,7 @@ public class FuriousAssault extends CardImpl { // Whenever you cast a creature spell, Furious Assault deals 1 damage to target player. Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), StaticFilters.FILTER_SPELL_A_CREATURE, false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FuriousReprisal.java b/Mage.Sets/src/mage/cards/f/FuriousReprisal.java index 4615422f86..f791cda488 100644 --- a/Mage.Sets/src/mage/cards/f/FuriousReprisal.java +++ b/Mage.Sets/src/mage/cards/f/FuriousReprisal.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -41,11 +41,11 @@ import mage.target.common.TargetCreatureOrPlayer; public class FuriousReprisal extends CardImpl { public FuriousReprisal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); // Furious Reprisal deals 2 damage to each of two target creatures and/or players. - this.getSpellAbility().addEffect(new DamageTargetEffect(2, true, "each of two target creatures and/or players")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(2, 2)); + this.getSpellAbility().addEffect(new DamageTargetEffect(2, true, "each of two targets")); + this.getSpellAbility().addTarget(new TargetAnyTarget(2, 2)); } public FuriousReprisal(final FuriousReprisal card) { diff --git a/Mage.Sets/src/mage/cards/f/FurnaceCelebration.java b/Mage.Sets/src/mage/cards/f/FurnaceCelebration.java index c07b9f342e..f422b3be38 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceCelebration.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceCelebration.java @@ -39,7 +39,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,7 +68,7 @@ class FurnaceCelebrationAbility extends TriggeredAbilityImpl { public FurnaceCelebrationAbility() { super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(2), new ManaCostsImpl("{2}"))); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } public FurnaceCelebrationAbility(final FurnaceCelebrationAbility ability) { diff --git a/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java b/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java index 9b8d485b31..bb290fe4b0 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java @@ -49,8 +49,7 @@ import mage.util.CardUtil; public class FurnaceOfRath extends CardImpl { public FurnaceOfRath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}{R}"); // If a source would deal damage to a creature or player, it deals double that damage to that creature or player instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FurnaceOfRathEffect())); @@ -70,7 +69,7 @@ class FurnaceOfRathEffect extends ReplacementEffectImpl { public FurnaceOfRathEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a source would deal damage to a creature or player, that source deals double that damage to that creature or player instead"; + staticText = "If a source would deal damage to a permanent or player, that source deals double that damage to that permanent or player instead"; } public FurnaceOfRathEffect(final FurnaceOfRathEffect effect) { @@ -89,10 +88,12 @@ class FurnaceOfRathEffect extends ReplacementEffectImpl { return true; case DAMAGE_CREATURE: return true; + case DAMAGE_PLANESWALKER: + return true; } return false; - } - + } + @Override public boolean applies(GameEvent event, Ability source, Game game) { return true; diff --git a/Mage.Sets/src/mage/cards/f/FurystokeGiant.java b/Mage.Sets/src/mage/cards/f/FurystokeGiant.java index 6f59dde457..f196f4920d 100644 --- a/Mage.Sets/src/mage/cards/f/FurystokeGiant.java +++ b/Mage.Sets/src/mage/cards/f/FurystokeGiant.java @@ -43,7 +43,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class FurystokeGiant extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // When Furystoke Giant enters the battlefield, other creatures you control gain "{tap}: This creature deals 2 damage to target creature or player" until end of turn. + // When Furystoke Giant enters the battlefield, other creatures you control gain "{tap}: This creature deals 2 damage to any target" until end of turn. SimpleActivatedAbility FurystokeGiantAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - FurystokeGiantAbility.addTarget(new TargetCreatureOrPlayer()); + FurystokeGiantAbility.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAllEffect(FurystokeGiantAbility, Duration.EndOfTurn, new FilterControlledCreaturePermanent("other creatures"), true); - effect.setText("other creatures you control gain \"{T}: This creature deals 2 damage to target creature or player.\" until end of turn."); + effect.setText("other creatures you control gain \"{T}: This creature deals 2 damage to any target.\" until end of turn."); this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); // Persist diff --git a/Mage.Sets/src/mage/cards/g/GalvanicArc.java b/Mage.Sets/src/mage/cards/g/GalvanicArc.java index 8399915fc8..d15d0e6558 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicArc.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicArc.java @@ -44,7 +44,7 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -64,9 +64,9 @@ public class GalvanicArc extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // When Galvanic Arc enters the battlefield, it deals 3 damage to target creature or player. + // When Galvanic Arc enters the battlefield, it deals 3 damage to any target. Ability triggeredAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - triggeredAbility.addTarget(new TargetCreatureOrPlayer()); + triggeredAbility.addTarget(new TargetAnyTarget()); this.addAbility(triggeredAbility); // Enchanted creature has first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA))); diff --git a/Mage.Sets/src/mage/cards/g/GalvanicBlast.java b/Mage.Sets/src/mage/cards/g/GalvanicBlast.java index e5c807f1d3..ce192f0709 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicBlast.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicBlast.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -42,16 +42,16 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class GalvanicBlast extends CardImpl { - private static final String effectText = "{this} deals 2 damage to target creature or player.<br>Metalcraft - {this} deals 4 damage to that creature or player instead if you control three or more artifacts"; + private static final String effectText = "{this} deals 2 damage to anytarget.<br>Metalcraft - {this} deals 4 damage to that permanent or player instead if you control three or more artifacts"; public GalvanicBlast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); this.color.setRed(true); - // Galvanic Blast deals 2 damage to target creature or player. + // Galvanic Blast deals 2 damage to any target. // Metalcraft - Galvanic Blast deals 4 damage to that creature or player instead if you control three or more artifacts. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(4), new DamageTargetEffect(2), MetalcraftCondition.instance, effectText)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public GalvanicBlast(final GalvanicBlast card) { diff --git a/Mage.Sets/src/mage/cards/g/GangOfDevils.java b/Mage.Sets/src/mage/cards/g/GangOfDevils.java index f7046cd938..3ec09c5324 100644 --- a/Mage.Sets/src/mage/cards/g/GangOfDevils.java +++ b/Mage.Sets/src/mage/cards/g/GangOfDevils.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -54,7 +54,7 @@ public class GangOfDevils extends CardImpl { // When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players. Ability ability = new DiesTriggeredAbility(new DamageMultiEffect(3, "it")); - ability.addTarget(new TargetCreatureOrPlayerAmount(3)); + ability.addTarget(new TargetAnyTargetAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Geistblast.java b/Mage.Sets/src/mage/cards/g/Geistblast.java index 6563af8852..413e1509fe 100644 --- a/Mage.Sets/src/mage/cards/g/Geistblast.java +++ b/Mage.Sets/src/mage/cards/g/Geistblast.java @@ -44,7 +44,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetSpell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -64,9 +64,9 @@ public class Geistblast extends CardImpl { public Geistblast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Geistblast deals 2 damage to target creature or player. + // Geistblast deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // {2}{U}, Exile Geistblast from your graveyard: Copy target instant or sorcery you control. You may choose new targets for the copy. Ability ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new CopyTargetSpellEffect(), new ManaCostsImpl<>("{2}{U}")); diff --git a/Mage.Sets/src/mage/cards/g/Geistflame.java b/Mage.Sets/src/mage/cards/g/Geistflame.java index 80dbf8a77d..47b4497182 100644 --- a/Mage.Sets/src/mage/cards/g/Geistflame.java +++ b/Mage.Sets/src/mage/cards/g/Geistflame.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author nantuko @@ -46,9 +46,9 @@ public class Geistflame extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Geistflame deals 1 damage to target creature or player. + // Geistflame deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Flashback {3}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT)); diff --git a/Mage.Sets/src/mage/cards/g/Gelectrode.java b/Mage.Sets/src/mage/cards/g/Gelectrode.java index 1c2a692841..b3b7c98911 100644 --- a/Mage.Sets/src/mage/cards/g/Gelectrode.java +++ b/Mage.Sets/src/mage/cards/g/Gelectrode.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterInstantOrSorcerySpell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,7 +56,7 @@ public class Gelectrode extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), new FilterInstantOrSorcerySpell("an instant or sorcery spell"), true)); } diff --git a/Mage.Sets/src/mage/cards/g/GhirapurAetherGrid.java b/Mage.Sets/src/mage/cards/g/GhirapurAetherGrid.java index c6f5c6fbb4..655b1792ae 100644 --- a/Mage.Sets/src/mage/cards/g/GhirapurAetherGrid.java +++ b/Mage.Sets/src/mage/cards/g/GhirapurAetherGrid.java @@ -40,7 +40,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class GhirapurAetherGrid extends CardImpl { public GhirapurAetherGrid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // Tap two untaped artifacts you control: Ghirapur Aether Grid deals 1 damage to target creature or player + // Tap two untaped artifacts you control: Ghirapur Aether Grid deals 1 damage to any target SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GhituFire.java b/Mage.Sets/src/mage/cards/g/GhituFire.java index 833cf73397..f5c4ccc856 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFire.java +++ b/Mage.Sets/src/mage/cards/g/GhituFire.java @@ -37,7 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,12 +53,12 @@ public class GhituFire extends CardImpl { // You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it. Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); ability.addEffect(effect); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.setRuleAtTheTop(true); this.addAbility(ability); - // Ghitu Fire deals X damage to target creature or player. + // Ghitu Fire deals X damage to any target. this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public GhituFire(final GhituFire card) { diff --git a/Mage.Sets/src/mage/cards/g/GhituFireEater.java b/Mage.Sets/src/mage/cards/g/GhituFireEater.java index 57c9a1761c..fd93501d4a 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFireEater.java +++ b/Mage.Sets/src/mage/cards/g/GhituFireEater.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,10 +56,10 @@ public class GhituFireEater extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {T}, Sacrifice Ghitu Fire-Eater: Ghitu Fire-Eater deals damage equal to its power to target creature or player. + // {T}, Sacrifice Ghitu Fire-Eater: Ghitu Fire-Eater deals damage equal to its power to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GhituSlinger.java b/Mage.Sets/src/mage/cards/g/GhituSlinger.java index 677d71ed48..05ecf226d7 100644 --- a/Mage.Sets/src/mage/cards/g/GhituSlinger.java +++ b/Mage.Sets/src/mage/cards/g/GhituSlinger.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class GhituSlinger extends CardImpl { // Echo {2}{R} this.addAbility(new EchoAbility("{2}{R}")); - // When Ghitu Slinger enters the battlefield, it deals 2 damage to target creature or player. + // When Ghitu Slinger enters the battlefield, it deals 2 damage to any target. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Ghostfire.java b/Mage.Sets/src/mage/cards/g/Ghostfire.java index e5d4f8ad09..5fdadfaec3 100644 --- a/Mage.Sets/src/mage/cards/g/Ghostfire.java +++ b/Mage.Sets/src/mage/cards/g/Ghostfire.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.InfoEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,9 +49,9 @@ public class Ghostfire extends CardImpl { this.color = new ObjectColor(); this.getSpellAbility().addEffect(new InfoEffect("{this} is colorless")); - // Ghostfire deals 3 damage to target creature or player. + // Ghostfire deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Ghostfire(final Ghostfire card) { diff --git a/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java b/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java index a60482359a..d89fb0b636 100644 --- a/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java +++ b/Mage.Sets/src/mage/cards/g/GhostsOfTheInnocent.java @@ -75,7 +75,7 @@ class GhostsOfTheInnocentPreventDamageEffect extends ReplacementEffectImpl imple public GhostsOfTheInnocentPreventDamageEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a source would deal damage to a creature or player, it deals half that damage, rounded down, to that creature or player instead"; + staticText = "If a source would deal damage to a permanent or player, it deals half that damage, rounded down, to that permanent or player instead"; } public GhostsOfTheInnocentPreventDamageEffect(final GhostsOfTheInnocentPreventDamageEffect effect) { @@ -90,7 +90,8 @@ class GhostsOfTheInnocentPreventDamageEffect extends ReplacementEffectImpl imple @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == EventType.DAMAGE_CREATURE - || event.getType() == EventType.DAMAGE_PLAYER; + || event.getType() == EventType.DAMAGE_PLAYER + || event.getType() == EventType.DAMAGE_PLANESWALKER; } @Override diff --git a/Mage.Sets/src/mage/cards/g/GiantsIre.java b/Mage.Sets/src/mage/cards/g/GiantsIre.java index 58f170e401..948ebe743e 100644 --- a/Mage.Sets/src/mage/cards/g/GiantsIre.java +++ b/Mage.Sets/src/mage/cards/g/GiantsIre.java @@ -38,14 +38,14 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author fireshoes */ public class GiantsIre extends CardImpl { - + private static final FilterPermanent filter = new FilterPermanent("Giant"); static { @@ -53,16 +53,16 @@ public class GiantsIre extends CardImpl { } public GiantsIre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{R}"); this.subtype.add(SubType.GIANT); // Giant's Ire deals 4 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); - + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + // If you control a Giant, draw a card. - this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), - new PermanentsOnTheBattlefieldCondition(filter),"If you control a Giant, draw a card")); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DrawCardSourceControllerEffect(1), + new PermanentsOnTheBattlefieldCondition(filter), "If you control a Giant, draw a card")); } public GiantsIre(final GiantsIre card) { diff --git a/Mage.Sets/src/mage/cards/g/GlacialRay.java b/Mage.Sets/src/mage/cards/g/GlacialRay.java index 52054e74b4..998201142e 100644 --- a/Mage.Sets/src/mage/cards/g/GlacialRay.java +++ b/Mage.Sets/src/mage/cards/g/GlacialRay.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -48,9 +48,9 @@ public class GlacialRay extends CardImpl { this.subtype.add(SubType.ARCANE); - // Glacial Ray deals 2 damage to target creature or player. + // Glacial Ray deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Splice onto Arcane {1}{R} this.addAbility(new SpliceOntoArcaneAbility("{1}{R}")); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinArsonist.java b/Mage.Sets/src/mage/cards/g/GoblinArsonist.java index ad0e68fefc..d1a09a2124 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArsonist.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArsonist.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class GoblinArsonist extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // When Goblin Arsonist dies, you may have it deal 1 damage to target creature or player. + // When Goblin Arsonist dies, you may have it deal 1 damage to any target. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinArtillery.java b/Mage.Sets/src/mage/cards/g/GoblinArtillery.java index 1668e5e3d1..0c290576d9 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinArtillery.java +++ b/Mage.Sets/src/mage/cards/g/GoblinArtillery.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class GoblinArtillery extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new DamageControllerEffect(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java b/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java index b2de386b84..48827879b1 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBangchuckers.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class GoblinBangchuckers extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {T}: Flip a coin. If you win the flip, Goblin Bangchuckers deals 2 damage to target creature or player. If you lose the flip, Goblin Bangchuckers deals 2 damage to itself. + // {T}: Flip a coin. If you win the flip, Goblin Bangchuckers deals 2 damage to any target. If you lose the flip, Goblin Bangchuckers deals 2 damage to itself. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinBangchuckersEffect(), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -78,7 +78,7 @@ class GoblinBangchuckersEffect extends OneShotEffect { public GoblinBangchuckersEffect() { super(Outcome.Damage); - staticText = "Flip a coin. If you win the flip, {this} deals 2 damage to target creature or player. If you lose the flip, {this} deals 2 damage to itself"; + staticText = "Flip a coin. If you win the flip, {this} deals 2 damage to any target. If you lose the flip, {this} deals 2 damage to itself"; } public GoblinBangchuckersEffect(GoblinBangchuckersEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinBomb.java b/Mage.Sets/src/mage/cards/g/GoblinBomb.java index d9120b9512..0d537fa5a0 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBomb.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBomb.java @@ -47,7 +47,7 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -56,15 +56,19 @@ import mage.target.TargetPlayer; public class GoblinBomb extends CardImpl { public GoblinBomb(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); // At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GoblinBombEffect(), TargetController.YOU, true)); - + // Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(20), new RemoveCountersSourceCost(CounterType.FUSE.createInstance(5))); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(20), + new RemoveCountersSourceCost(CounterType.FUSE.createInstance(5)) + ); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBombardment.java b/Mage.Sets/src/mage/cards/g/GoblinBombardment.java index 251cc98777..c1be7f5376 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBombardment.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBombardment.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,7 +50,7 @@ public class GoblinBombardment extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java b/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java index 25eb321443..11cd0bf93b 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java +++ b/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class GoblinBoomKeg extends CardImpl { // At the beginning of your upkeep, sacrifice Goblin Boom Keg. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.YOU, false)); - // When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to target creature or player. + // When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to any target. Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DamageTargetEffect(3, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinCannon.java b/Mage.Sets/src/mage/cards/g/GoblinCannon.java index f9d60952a6..b87d7602ad 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCannon.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCannon.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class GoblinCannon extends CardImpl { public GoblinCannon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - // {2}: Goblin Cannon deals 1 damage to target creature or player. Sacrifice Goblin Cannon. + // {2}: Goblin Cannon deals 1 damage to any target. Sacrifice Goblin Cannon. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new SacrificeSourceEffect()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java index beb3cd4068..3150d6d44f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java +++ b/Mage.Sets/src/mage/cards/g/GoblinCharbelcher.java @@ -41,7 +41,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -54,10 +54,10 @@ public class GoblinCharbelcher extends CardImpl { public GoblinCharbelcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); - // {3}, {tap}: Reveal cards from the top of your library until you reveal a land card. Goblin Charbelcher deals damage equal to the number of nonland cards revealed this way to target creature or player. If the revealed land card was a Mountain, Goblin Charbelcher deals double that damage instead. Put the revealed cards on the bottom of your library in any order. + // {3}, {tap}: Reveal cards from the top of your library until you reveal a land card. Goblin Charbelcher deals damage equal to the number of nonland cards revealed this way to any target. If the revealed land card was a Mountain, Goblin Charbelcher deals double that damage instead. Put the revealed cards on the bottom of your library in any order. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinCharbelcherEffect(), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -75,7 +75,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { public GoblinCharbelcherEffect() { super(Outcome.Damage); - this.staticText = "Reveal cards from the top of your library until you reveal a land card. {this} deals damage equal to the number of nonland cards revealed this way to target creature or player. If the revealed land card was a Mountain, {this} deals double that damage instead. Put the revealed cards on the bottom of your library in any order"; + this.staticText = "Reveal cards from the top of your library until you reveal a land card. {this} deals damage equal to the number of nonland cards revealed this way to any target. If the revealed land card was a Mountain, {this} deals double that damage instead. Put the revealed cards on the bottom of your library in any order"; } public GoblinCharbelcherEffect(final GoblinCharbelcherEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java index 889ebeff62..60eb5c10cf 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinDynamo.java +++ b/Mage.Sets/src/mage/cards/g/GoblinDynamo.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author BursegSardaukar @@ -55,15 +55,15 @@ public class GoblinDynamo extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // {T}: Goblin Dynamo deals 1 damage to target creature or player. + // {T}: Goblin Dynamo deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to target creature or player. + //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFestival.java b/Mage.Sets/src/mage/cards/g/GoblinFestival.java index b6bf5778ae..55852a15ac 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFestival.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFestival.java @@ -43,7 +43,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; import mage.target.targetpointer.FixedTarget; @@ -56,9 +56,9 @@ public class GoblinFestival extends CardImpl { public GoblinFestival(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - // {2}: Goblin Festival deals 1 damage to target creature or player. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival. + // {2}: Goblin Festival deals 1 damage to any target. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new GoblinFestivalChangeControlEffect()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java b/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java index d417c1ac96..46ef29d477 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.g; import java.util.UUID; @@ -39,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author Loki @@ -47,16 +46,16 @@ import mage.target.TargetPlayer; public class GoblinFireslinger extends CardImpl { public GoblinFireslinger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); - + // {tap}: Goblin Fireslinger deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java b/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java index 7f0afb2fe7..1cf2307c13 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,10 +53,10 @@ public class GoblinFirestarter extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Sacrifice Goblin Firestarter: Goblin Firestarter deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared. + // Sacrifice Goblin Firestarter: Goblin Firestarter deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinGrenade.java b/Mage.Sets/src/mage/cards/g/GoblinGrenade.java index 0cacd7a6a0..ea5ba2a4ce 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinGrenade.java +++ b/Mage.Sets/src/mage/cards/g/GoblinGrenade.java @@ -37,7 +37,7 @@ import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -55,7 +55,7 @@ public class GoblinGrenade extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false))); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public GoblinGrenade(final GoblinGrenade card) { diff --git a/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java b/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java index cd3c43e80b..3d0bb4896a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLegionnaire.java @@ -42,7 +42,7 @@ import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,11 +60,11 @@ public class GoblinLegionnaire extends CardImpl { this.toughness = new MageInt(2); Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ColoredManaCost(ColoredManaSymbol.R)); firstAbility.addCost(new SacrificeSourceCost()); - firstAbility.addTarget(new TargetCreatureOrPlayer()); + firstAbility.addTarget(new TargetAnyTarget()); this.addAbility(firstAbility); Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ColoredManaCost(ColoredManaSymbol.W)); secondAbility.addCost(new SacrificeSourceCost()); - secondAbility.addTarget(new TargetCreatureOrPlayer()); + secondAbility.addTarget(new TargetAnyTarget()); this.addAbility(secondAbility); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinLyre.java b/Mage.Sets/src/mage/cards/g/GoblinLyre.java index 96d7411cc9..55843a7a1f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLyre.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLyre.java @@ -32,7 +32,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,7 +42,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -52,11 +51,11 @@ import mage.target.common.TargetOpponent; public class GoblinLyre extends CardImpl { public GoblinLyre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // Sacrifice Goblin Lyre: Flip a coin. If you win the flip, Goblin Lyre deals damage to target opponent equal to the number of creatures you control. If you lose the flip, Goblin Lyre deals damage to you equal to the number of creatures that opponent controls. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinLyreEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } @@ -74,7 +73,8 @@ class GoblinLyreEffect extends OneShotEffect { public GoblinLyreEffect() { super(Outcome.Damage); - this.staticText = "Flip a coin. If you win the flip, {this} deals damage to target opponent equal to the number of creatures you control. If you lose the flip, {this} deals damage to you equal to the number of creatures that opponent controls"; + this.staticText = "Flip a coin. If you win the flip, {this} deals damage to target opponent or planeswalker equal to the number of creatures you control. " + + "If you lose the flip, Goblin Lyre deals damage to you equal to the number of creatures that opponent or that planeswalker’s controller controls"; } public GoblinLyreEffect(final GoblinLyreEffect effect) { @@ -89,16 +89,16 @@ class GoblinLyreEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); + Player opponent = game.getPlayerOrPlaneswalkerController(getTargetPointer().getFirst(game, source)); if (controller != null) { if (controller.flipCoin(game)) { + int damage = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()).calculate(game, source, this); if (opponent != null) { - opponent.damage(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()).calculate(game, source, this), source.getSourceId(), game, false, true); - return true; + return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true) > 0; } } else { - controller.damage(new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()).calculate(game, source, this), source.getSourceId(), game, false, true); - return true; + int damage = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), opponent.getId(), game).size(); + return controller.damage(damage, source.getSourceId(), game, false, true) > 0; } } return false; diff --git a/Mage.Sets/src/mage/cards/g/GoblinMedics.java b/Mage.Sets/src/mage/cards/g/GoblinMedics.java index 43c8e4ef10..3c5837afcf 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinMedics.java +++ b/Mage.Sets/src/mage/cards/g/GoblinMedics.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class GoblinMedics extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Whenever Goblin Medics becomes tapped, it deals 1 damage to target creature or player. + // Whenever Goblin Medics becomes tapped, it deals 1 damage to any target. Ability ability = new BecomesTappedSourceTriggeredAbility(new DamageTargetEffect(1, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java index 9b0398b985..4ef3c4c38a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.g; import java.util.UUID; @@ -46,8 +45,8 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -57,8 +56,8 @@ public class GoblinRazerunners extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land"); - public GoblinRazerunners (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + public GoblinRazerunners(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); @@ -72,11 +71,11 @@ public class GoblinRazerunners extends CardImpl { // At the beginning of your end step, you may have Goblin Razerunners deal damage equal to the number of +1/+1 counters on it to target player. ability = new BeginningOfYourEndStepTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } - public GoblinRazerunners (final GoblinRazerunners card) { + public GoblinRazerunners(final GoblinRazerunners card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java b/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java index 211c1d81cc..a3826b8754 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSharpshooter.java @@ -42,7 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,9 +61,9 @@ public class GoblinSharpshooter extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); // Whenever a creature dies, untap Goblin Sharpshooter. this.addAbility(new DiesCreatureTriggeredAbility(new UntapSourceEffect(), false)); - // {T}: Goblin Sharpshooter deals 1 damage to target creature or player. + // {T}: Goblin Sharpshooter deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java b/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java index 247d7a51d1..304e900366 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java +++ b/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,9 +59,9 @@ public class GoblinTestPilot extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Goblin Test Pilot deals 2 damage to target creature or player chosen at random. + // {tap}: Goblin Test Pilot deals 2 damage to any target chosen at random. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - Target target = new TargetCreatureOrPlayer(); + Target target = new TargetAnyTarget(); target.setRandom(true); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GoblinWarStrike.java b/Mage.Sets/src/mage/cards/g/GoblinWarStrike.java index 329c813a19..8217e81c19 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinWarStrike.java +++ b/Mage.Sets/src/mage/cards/g/GoblinWarStrike.java @@ -38,7 +38,7 @@ import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,19 +47,18 @@ import mage.target.TargetPlayer; public class GoblinWarStrike extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblins you control"); - + static { filter.add(new SubtypePredicate(SubType.GOBLIN)); filter.add(new ControllerPredicate(TargetController.YOU)); } - - public GoblinWarStrike(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); + public GoblinWarStrike(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); // Goblin War Strike deals damage equal to the number of Goblins you control to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public GoblinWarStrike(final GoblinWarStrike card) { diff --git a/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java b/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java index e8591fa132..1d34792225 100644 --- a/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java +++ b/Mage.Sets/src/mage/cards/g/GoretuskFirebeast.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -45,7 +45,7 @@ import mage.target.TargetPlayer; public class GoretuskFirebeast extends CardImpl { public GoretuskFirebeast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.BOAR); this.subtype.add(SubType.BEAST); @@ -55,7 +55,7 @@ public class GoretuskFirebeast extends CardImpl { // When Goretusk Firebeast enters the battlefield, it deals 4 damage to target player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(4, "it"), false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GrabTheReins.java b/Mage.Sets/src/mage/cards/g/GrabTheReins.java index 0a0e42f590..6bae8aa5c6 100644 --- a/Mage.Sets/src/mage/cards/g/GrabTheReins.java +++ b/Mage.Sets/src/mage/cards/g/GrabTheReins.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -71,10 +71,10 @@ public class GrabTheReins extends CardImpl { TargetCreaturePermanent target = new TargetCreaturePermanent(); target.setTargetName("a creature to take control of"); this.getSpellAbility().addTarget(target); - // or sacrifice a creature, then Grab the Reins deals damage equal to that creature's power to target creature or player. + // or sacrifice a creature, then Grab the Reins deals damage equal to that creature's power to any target. Mode mode = new Mode(); mode.getEffects().add(new GrabTheReinsEffect()); - TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(); + TargetAnyTarget target2 = new TargetAnyTarget(); target2.setTargetName("a creature or player to damage"); mode.getTargets().add(target2); this.getSpellAbility().getModes().addMode(mode); @@ -97,7 +97,7 @@ class GrabTheReinsEffect extends OneShotEffect { public GrabTheReinsEffect() { super(Outcome.Damage); - staticText = "sacrifice a creature. {this} deals damage equal to the sacrificed creature's power to target creature or player"; + staticText = "sacrifice a creature. {this} deals damage equal to the sacrificed creature's power to any target"; } public GrabTheReinsEffect(final GrabTheReinsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java b/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java index c5cdbce274..cb958893bb 100644 --- a/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java +++ b/Mage.Sets/src/mage/cards/g/GrangerGuildmage.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -59,11 +59,11 @@ public class GrangerGuildmage extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {R}, {tap}: Granger Guildmage deals 1 damage to target creature or player and 1 damage to you. + // {R}, {tap}: Granger Guildmage deals 1 damage to any target and 1 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addEffect(new DamageControllerEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {W}, {tap}: Target creature gains first strike until end of turn. diff --git a/Mage.Sets/src/mage/cards/g/GraniteShard.java b/Mage.Sets/src/mage/cards/g/GraniteShard.java index 96940fc955..e304e2eb0f 100644 --- a/Mage.Sets/src/mage/cards/g/GraniteShard.java +++ b/Mage.Sets/src/mage/cards/g/GraniteShard.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,14 +48,14 @@ public class GraniteShard extends CardImpl { public GraniteShard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - // {3}, {tap} or {R}, {tap}: Granite Shard deals 1 damage to target creature or player. + // {3}, {tap} or {R}, {tap}: Granite Shard deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Grapeshot.java b/Mage.Sets/src/mage/cards/g/Grapeshot.java index ae11b0eab1..ab3104e432 100644 --- a/Mage.Sets/src/mage/cards/g/Grapeshot.java +++ b/Mage.Sets/src/mage/cards/g/Grapeshot.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.StormAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,8 +45,8 @@ public class Grapeshot extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Grapeshot deals 1 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Grapeshot deals 1 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(1)); // Storm this.addAbility(new StormAbility()); diff --git a/Mage.Sets/src/mage/cards/g/GratuitousViolence.java b/Mage.Sets/src/mage/cards/g/GratuitousViolence.java index dea9322ecd..ed40dbba8a 100644 --- a/Mage.Sets/src/mage/cards/g/GratuitousViolence.java +++ b/Mage.Sets/src/mage/cards/g/GratuitousViolence.java @@ -49,7 +49,7 @@ import mage.util.CardUtil; public class GratuitousViolence extends CardImpl { public GratuitousViolence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}{R}"); // If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GratuitousViolenceReplacementEffect())); @@ -69,7 +69,7 @@ class GratuitousViolenceReplacementEffect extends ReplacementEffectImpl { GratuitousViolenceReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a creature you control would deal damage to a creature or player, it deals double that damage to that creature or player instead"; + staticText = "If a creature you control would deal damage to a permanent or player, it deals double that permanent to that creature or player instead"; } GratuitousViolenceReplacementEffect(final GratuitousViolenceReplacementEffect effect) { @@ -81,17 +81,18 @@ class GratuitousViolenceReplacementEffect extends ReplacementEffectImpl { return new GratuitousViolenceReplacementEffect(this); } - @Override + @Override public boolean checksEventType(GameEvent event, Game game) { - switch(event.getType()) { + switch (event.getType()) { case DAMAGE_CREATURE: case DAMAGE_PLAYER: + case DAMAGE_PLANESWALKER: return true; default: return false; } } - + @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/g/GrimLavamancer.java b/Mage.Sets/src/mage/cards/g/GrimLavamancer.java index b38a2b3e7a..af141f25d0 100644 --- a/Mage.Sets/src/mage/cards/g/GrimLavamancer.java +++ b/Mage.Sets/src/mage/cards/g/GrimLavamancer.java @@ -43,7 +43,7 @@ import mage.constants.ColoredManaSymbol; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,7 +62,7 @@ public class GrimLavamancer extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ColoredManaCost(ColoredManaSymbol.R)); ability.addCost(new TapSourceCost()); ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(2, new FilterCard("cards from your graveyard")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GruulGuildmage.java b/Mage.Sets/src/mage/cards/g/GruulGuildmage.java index cd35a78f78..dd83c86e5e 100644 --- a/Mage.Sets/src/mage/cards/g/GruulGuildmage.java +++ b/Mage.Sets/src/mage/cards/g/GruulGuildmage.java @@ -43,9 +43,9 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledPermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author Loki @@ -55,18 +55,17 @@ public class GruulGuildmage extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land"); public GruulGuildmage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R/G}{R/G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/G}{R/G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); - this.power = new MageInt(2); this.toughness = new MageInt(2); // {3}{R}, Sacrifice a land: Gruul Guildmage deals 2 damage to target player. Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{R}")); firstAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - firstAbility.addTarget(new TargetPlayer(1)); + firstAbility.addTarget(new TargetPlayerOrPlaneswalker(1)); this.addAbility(firstAbility); // {3}{G}: Target creature gets +2/+2 until end of turn. Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{3}{G}")); diff --git a/Mage.Sets/src/mage/cards/g/GuardianAngel.java b/Mage.Sets/src/mage/cards/g/GuardianAngel.java index f183f418b9..23156c9878 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianAngel.java +++ b/Mage.Sets/src/mage/cards/g/GuardianAngel.java @@ -48,7 +48,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,9 +59,9 @@ public class GuardianAngel extends CardImpl { public GuardianAngel(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{W}"); - // Prevent the next X damage that would be dealt to target creature or player this turn. Until end of turn, you may pay {1} any time you could cast an instant. If you do, prevent the next 1 damage that would be dealt to that creature or player this turn. + // Prevent the next X damage that would be dealt to any target this turn. Until end of turn, you may pay {1} any time you could cast an instant. If you do, prevent the next 1 damage that would be dealt to that creature or player this turn. this.getSpellAbility().addEffect(new GuardianAngelEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public GuardianAngel(final GuardianAngel card) { @@ -78,7 +78,7 @@ class GuardianAngelEffect extends OneShotEffect { public GuardianAngelEffect() { super(Outcome.Benefit); - this.staticText = "Prevent the next X damage that would be dealt to target creature or player this turn. Until end of turn, you may pay {1} any time you could cast an instant. If you do, prevent the next 1 damage that would be dealt to that creature or player this turn"; + this.staticText = "Prevent the next X damage that would be dealt to any target this turn. Until end of turn, you may pay {1} any time you could cast an instant. If you do, prevent the next 1 damage that would be dealt to that permanent or player this turn"; } public GuardianAngelEffect(final GuardianAngelEffect effect) { @@ -110,7 +110,7 @@ class GuardianAngelEffect extends OneShotEffect { game.addEffect(effect, source); SpecialAction specialAction = new GuardianAngelAction(); specialAction.getEffects().get(0).setTargetPointer(getTargetPointer()); - specialAction.getEffects().get(0).setText("Prevent the next 1 damage that would be dealt to target creature or player this turn (" + targetName + ")."); + specialAction.getEffects().get(0).setText("Prevent the next 1 damage that would be dealt to any target this turn (" + targetName + ")."); new CreateSpecialActionEffect(specialAction).apply(game, source); // Create a hidden delayed triggered ability to remove the special action at end of turn. new CreateDelayedTriggeredAbilityEffect(new GuardianAngelDelayedTriggeredAbility(specialAction.getId()), false).apply(game, source); diff --git a/Mage.Sets/src/mage/cards/g/GuerrillaTactics.java b/Mage.Sets/src/mage/cards/g/GuerrillaTactics.java index 782490da4f..7d539dc0b8 100644 --- a/Mage.Sets/src/mage/cards/g/GuerrillaTactics.java +++ b/Mage.Sets/src/mage/cards/g/GuerrillaTactics.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,13 +45,13 @@ public class GuerrillaTactics extends CardImpl { public GuerrillaTactics(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); - // Guerrilla Tactics deals 2 damage to target creature or player. + // Guerrilla Tactics deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); - // When a spell or ability an opponent controls causes you to discard Guerrilla Tactics, Guerrilla Tactics deals 4 damage to target creature or player. + // When a spell or ability an opponent controls causes you to discard Guerrilla Tactics, Guerrilla Tactics deals 4 damage to any target. Ability ability = new DiscardedByOpponentTriggerAbility(new DamageTargetEffect(4)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GutShot.java b/Mage.Sets/src/mage/cards/g/GutShot.java index 3262a1dcc6..34ad281595 100644 --- a/Mage.Sets/src/mage/cards/g/GutShot.java +++ b/Mage.Sets/src/mage/cards/g/GutShot.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,7 +44,7 @@ public class GutShot extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R/P}"); this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public GutShot(final GutShot card) { diff --git a/Mage.Sets/src/mage/cards/h/HallowedHealer.java b/Mage.Sets/src/mage/cards/h/HallowedHealer.java index 853b507b6b..d863fff218 100644 --- a/Mage.Sets/src/mage/cards/h/HallowedHealer.java +++ b/Mage.Sets/src/mage/cards/h/HallowedHealer.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,16 +59,16 @@ public class HallowedHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn,2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // Threshold - {tap}: Prevent the next 4 damage that would be dealt to target creature or player this turn. Activate this ability only if seven or more cards are in your graveyard. + // Threshold - {tap}: Prevent the next 4 damage that would be dealt to any target this turn. Activate this ability only if seven or more cards are in your graveyard. Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 4), new TapSourceCost(), new CardsInControllerGraveCondition(7)); - thresholdAbility.addTarget(new TargetCreatureOrPlayer()); + thresholdAbility.addTarget(new TargetAnyTarget()); thresholdAbility.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(thresholdAbility); } diff --git a/Mage.Sets/src/mage/cards/h/HammerOfBogardan.java b/Mage.Sets/src/mage/cards/h/HammerOfBogardan.java index e78201607d..f51762f250 100644 --- a/Mage.Sets/src/mage/cards/h/HammerOfBogardan.java +++ b/Mage.Sets/src/mage/cards/h/HammerOfBogardan.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.PhaseStep; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class HammerOfBogardan extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}{R}"); - // Hammer of Bogardan deals 3 damage to target creature or player. + // Hammer of Bogardan deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // {2}{R}{R}{R}: Return Hammer of Bogardan from your graveyard to your hand. Activate this ability only during your upkeep. this.addAbility(new ConditionalActivatedAbility(Zone.GRAVEYARD, diff --git a/Mage.Sets/src/mage/cards/h/HanabiBlast.java b/Mage.Sets/src/mage/cards/h/HanabiBlast.java index 6ca0ce2d20..f6157bf367 100644 --- a/Mage.Sets/src/mage/cards/h/HanabiBlast.java +++ b/Mage.Sets/src/mage/cards/h/HanabiBlast.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.discard.DiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,7 +47,7 @@ public class HanabiBlast extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(ReturnToHandSpellEffect.getInstance()); this.getSpellAbility().addEffect(new DiscardControllerEffect(1, true)); } diff --git a/Mage.Sets/src/mage/cards/h/Hankyu.java b/Mage.Sets/src/mage/cards/h/Hankyu.java index 4e5fd9c14b..d68b955af2 100644 --- a/Mage.Sets/src/mage/cards/h/Hankyu.java +++ b/Mage.Sets/src/mage/cards/h/Hankyu.java @@ -49,7 +49,7 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,11 +67,11 @@ public class Hankyu extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability1, AttachmentType.EQUIPMENT))); /* "{T}, Remove all aim counters from Hankyu: This creature deals - * damage to target creature or player equal to the number of + * damage to any target equal to the number of * aim counters removed this way." */ SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HankyuDealsDamageEffect(), new TapSourceCost()); ability2.addCost(new HankyuCountersSourceCost(this.getId())); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability2, AttachmentType.EQUIPMENT))); // Equip {4} ({4}: Attach to target creature you control. Equip only as a sorcery.) @@ -125,7 +125,7 @@ class HankyuDealsDamageEffect extends OneShotEffect { public HankyuDealsDamageEffect() { super(Outcome.Damage); - staticText = "This creature deals damage to target creature or player equal to the number of aim counters removed this way"; + staticText = "This creature deals damage to any target equal to the number of aim counters removed this way"; } public HankyuDealsDamageEffect(final HankyuDealsDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HarmsWay.java b/Mage.Sets/src/mage/cards/h/HarmsWay.java index 6be5d553cf..cd2214e697 100644 --- a/Mage.Sets/src/mage/cards/h/HarmsWay.java +++ b/Mage.Sets/src/mage/cards/h/HarmsWay.java @@ -42,7 +42,7 @@ import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetSource; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author noxx @@ -52,9 +52,9 @@ public class HarmsWay extends CardImpl { public HarmsWay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - // The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to target creature or player instead. + // The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to any target instead. this.getSpellAbility().addEffect(new HarmsWayPreventDamageTargetEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public HarmsWay(final HarmsWay card) { @@ -73,7 +73,7 @@ class HarmsWayPreventDamageTargetEffect extends RedirectionEffect { public HarmsWayPreventDamageTargetEffect() { super(Duration.EndOfTurn, 2, true); - staticText = "The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to target creature or player instead"; + staticText = "The next 2 damage that a source of your choice would deal to you and/or permanents you control this turn is dealt to any target instead"; this.damageSource = new TargetSource(); } diff --git a/Mage.Sets/src/mage/cards/h/HarshSustenance.java b/Mage.Sets/src/mage/cards/h/HarshSustenance.java index e6a0ca3650..d3637d9e15 100644 --- a/Mage.Sets/src/mage/cards/h/HarshSustenance.java +++ b/Mage.Sets/src/mage/cards/h/HarshSustenance.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,12 +48,12 @@ public class HarshSustenance extends CardImpl { public HarshSustenance(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}{B}"); - // Harsh Sustenance deals X damage to target creature or player and you gain X life, where X is the number of creatures you control. + // Harsh Sustenance deals X damage to any target and you gain X life, where X is the number of creatures you control. DynamicValue xValue = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()); Effect effect = new DamageTargetEffect(xValue); - effect.setText("{this} deals X damage to target creature or player"); + effect.setText("{this} deals X damage to any target"); getSpellAbility().addEffect(effect); - getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + getSpellAbility().addTarget(new TargetAnyTarget()); effect = new GainLifeEffect(xValue); effect.setText("and you gain X life, where X is the number of creatures you control"); getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/h/HatchetBully.java b/Mage.Sets/src/mage/cards/h/HatchetBully.java index df412ac14e..155ff22eaf 100644 --- a/Mage.Sets/src/mage/cards/h/HatchetBully.java +++ b/Mage.Sets/src/mage/cards/h/HatchetBully.java @@ -48,7 +48,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -64,11 +64,11 @@ public class HatchetBully extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // {2}{R}, {tap}, Put a -1/-1 counter on a creature you control: Hatchet Bully deals 2 damage to target creature or player. + // {2}{R}, {tap}, Put a -1/-1 counter on a creature you control: Hatchet Bully deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HatchetBullyEffect(), new ManaCostsImpl("{2}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new HatchetBullyCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Target target = new TargetControlledCreaturePermanent(); target.setNotTarget(true); ability.addTarget(target); @@ -121,7 +121,7 @@ class HatchetBullyEffect extends OneShotEffect { public HatchetBullyEffect() { super(Outcome.Damage); - staticText = "{this} deals 2 damage to target creature or player"; + staticText = "{this} deals 2 damage to any target"; } public HatchetBullyEffect(final HatchetBullyEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/Hateflayer.java b/Mage.Sets/src/mage/cards/h/Hateflayer.java index 6450c5785c..edfe0240a8 100644 --- a/Mage.Sets/src/mage/cards/h/Hateflayer.java +++ b/Mage.Sets/src/mage/cards/h/Hateflayer.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,10 +59,10 @@ public class Hateflayer extends CardImpl { // Wither this.addAbility(WitherAbility.getInstance()); - // {2}{R}, {untap}: Hateflayer deals damage equal to its power to target creature or player. + // {2}{R}, {untap}: Hateflayer deals damage equal to its power to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{2}{R}")); ability.addCost(new UntapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HauntingMisery.java b/Mage.Sets/src/mage/cards/h/HauntingMisery.java index d74e5e4933..814211fbd1 100644 --- a/Mage.Sets/src/mage/cards/h/HauntingMisery.java +++ b/Mage.Sets/src/mage/cards/h/HauntingMisery.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreatureCard; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,12 +44,12 @@ import mage.target.TargetPlayer; public class HauntingMisery extends CardImpl { public HauntingMisery(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); // As an additional cost to cast Haunting Misery, exile X creature cards from your graveyard. this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard())); // Haunting Misery deals X damage to target player. - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(new GetXValue())); } diff --git a/Mage.Sets/src/mage/cards/h/Heal.java b/Mage.Sets/src/mage/cards/h/Heal.java index 1e778b2f46..a109589c36 100644 --- a/Mage.Sets/src/mage/cards/h/Heal.java +++ b/Mage.Sets/src/mage/cards/h/Heal.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,11 +47,11 @@ public class Heal extends CardImpl { public Heal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - // Prevent the next 1 damage that would be dealt to target creature or player this turn. + // Prevent the next 1 damage that would be dealt to any target this turn. // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1)); this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/h/HealersHeaddress.java b/Mage.Sets/src/mage/cards/h/HealersHeaddress.java index 32d74de446..71d4477210 100644 --- a/Mage.Sets/src/mage/cards/h/HealersHeaddress.java +++ b/Mage.Sets/src/mage/cards/h/HealersHeaddress.java @@ -49,7 +49,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,14 +61,14 @@ public class HealersHeaddress extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); this.subtype.add(SubType.EQUIPMENT); - // Equipped creature gets +0/+2 and has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." + // Equipped creature gets +0/+2 and has "{tap}: Prevent the next 1 damage that would be dealt to any target this turn." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - gainAbility.addTarget(new TargetCreatureOrPlayer()); + gainAbility.addTarget(new TargetAnyTarget()); Effect effect = new BoostEquippedEffect(0, 2); effect.setText("Equipped creature gets +0/+2"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect(gainAbility, AttachmentType.EQUIPMENT); - effect.setText("and has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\""); + effect.setText("and has \"{T}: Prevent the next 1 damage that would be dealt to any target this turn.\""); ability.addEffect(effect); this.addAbility(ability); // {W}{W}: Attach Healer's Headdress to target creature you control. diff --git a/Mage.Sets/src/mage/cards/h/HealingLeaves.java b/Mage.Sets/src/mage/cards/h/HealingLeaves.java index 687f4f3719..9cd1cad9b0 100644 --- a/Mage.Sets/src/mage/cards/h/HealingLeaves.java +++ b/Mage.Sets/src/mage/cards/h/HealingLeaves.java @@ -36,7 +36,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.target.TargetPlayer; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,12 +47,12 @@ public class HealingLeaves extends CardImpl { public HealingLeaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to target creature or player this turn. + // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new GainLifeTargetEffect(3)); this.getSpellAbility().addTarget(new TargetPlayer()); Mode mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/h/HealingSalve.java b/Mage.Sets/src/mage/cards/h/HealingSalve.java index 90a409f6be..d4e58af296 100644 --- a/Mage.Sets/src/mage/cards/h/HealingSalve.java +++ b/Mage.Sets/src/mage/cards/h/HealingSalve.java @@ -36,7 +36,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.target.TargetPlayer; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,13 +48,13 @@ public class HealingSalve extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to target creature or player this turn. + // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new GainLifeTargetEffect(3)); this.getSpellAbility().addTarget(new TargetPlayer()); Mode mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java index 62e1dc72cf..6e6b211f35 100644 --- a/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java +++ b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java @@ -45,7 +45,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -77,7 +77,7 @@ class HeartOfBogardanTriggeredAbility extends TriggeredAbilityImpl { HeartOfBogardanTriggeredAbility() { super(Zone.BATTLEFIELD, new HeartOfBogardanEffect(), false); - this.addTarget(new TargetPlayer()); + this.addTarget(new TargetPlayerOrPlaneswalker()); } HeartOfBogardanTriggeredAbility(final HeartOfBogardanTriggeredAbility ability) { @@ -101,7 +101,10 @@ class HeartOfBogardanTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When a player doesn't pay {this}'s cumulative upkeep, {this} deals X damage to target player and each creature he or she controls, where X is twice the number of age counters on {this} minus 2."; + return "When a player doesn't pay {this}'s cumulative upkeep, " + + "{this} deals X damage to target player or planeswalker " + + "and each creature that player or that planeswalker’s controller controls," + + " where X is twice the number of age counters on {this} minus 2."; } } @@ -109,7 +112,9 @@ class HeartOfBogardanEffect extends OneShotEffect { public HeartOfBogardanEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target player and each creature he or she controls, where X is twice the number of age counters on {this} minus 2"; + staticText = "{this} deals X damage to target player or planeswalker " + + "and each creature that player or that planeswalker’s controller controls, " + + "where X is twice the number of age counters on {this} minus 2"; } public HeartOfBogardanEffect(final HeartOfBogardanEffect effect) { @@ -118,13 +123,13 @@ class HeartOfBogardanEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getFirstTarget()); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (player != null && sourcePermanent != null) { - int damage = sourcePermanent.getCounters(game).getCount(CounterType.AGE) * 2 - 2; - if (damage > 0) { + int damage = sourcePermanent.getCounters(game).getCount(CounterType.AGE) * 2 - 2; + if (damage > 0) { player.damage(damage, source.getSourceId(), game, false, true); - for (Permanent perm: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) { + for (Permanent perm : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) { perm.damage(damage, source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java index 745c124ccb..2a2967d9b6 100644 --- a/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java +++ b/Mage.Sets/src/mage/cards/h/HeartPiercerManticore.java @@ -52,7 +52,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -70,9 +70,9 @@ public class HeartPiercerManticore extends CardImpl { // 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 target creature or player. + // 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 TargetCreatureOrPlayer()); + secondAbility.addTarget(new TargetAnyTarget()); this.addAbility(secondAbility); // Embalm {5}{R} this.addAbility(new EmbalmAbility(new ManaCostsImpl("{5}{R}"), this)); @@ -128,7 +128,7 @@ class HeartPiercerManticoreSacrificeTriggeredAbility extends TriggeredAbilityImp private final UUID relatedTriggerdAbilityOriginalId; public HeartPiercerManticoreSacrificeTriggeredAbility(UUID relatedTriggerdAbilityOriginalId) { - super(Zone.BATTLEFIELD, new InfoEffect("{this} deals damage equal to that creature's power to target creature or player")); + super(Zone.BATTLEFIELD, new InfoEffect("{this} deals damage equal to that creature's power to any target")); this.relatedTriggerdAbilityOriginalId = relatedTriggerdAbilityOriginalId; } @@ -161,6 +161,6 @@ class HeartPiercerManticoreSacrificeTriggeredAbility extends TriggeredAbilityImp @Override public String getRule() { - return "When you do, {this} deals damage equal to that creature's power to target creature or player."; + return "When you do, {this} deals damage equal to that creature's power to any target."; } } diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java b/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java index 1b9dafabae..f17c605724 100644 --- a/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java +++ b/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java @@ -41,8 +41,8 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -57,14 +57,14 @@ public class HeartwoodGiant extends CardImpl { } public HeartwoodGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(4); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HeavyArbalest.java b/Mage.Sets/src/mage/cards/h/HeavyArbalest.java index 5296ca5f8b..9bf2efc33f 100644 --- a/Mage.Sets/src/mage/cards/h/HeavyArbalest.java +++ b/Mage.Sets/src/mage/cards/h/HeavyArbalest.java @@ -50,7 +50,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,9 +65,9 @@ public class HeavyArbalest extends CardImpl { // Equipped creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HeavyArbalestEffect())); - // Equipped creature has "{T}: This creature deals 2 damage to target creature or player." + // Equipped creature has "{T}: This creature deals 2 damage to any target." SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability2, AttachmentType.EQUIPMENT))); // Equip {4) diff --git a/Mage.Sets/src/mage/cards/h/Hecatomb.java b/Mage.Sets/src/mage/cards/h/Hecatomb.java index 1017619b1f..5908cd56ce 100644 --- a/Mage.Sets/src/mage/cards/h/Hecatomb.java +++ b/Mage.Sets/src/mage/cards/h/Hecatomb.java @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,9 +68,9 @@ public class Hecatomb extends CardImpl { // When Hecatomb enters the battlefield, sacrifice Hecatomb unless you sacrifice four creatures. this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledCreaturePermanent(4))), false)); - // Tap an untapped Swamp you control: Hecatomb deals 1 damage to target creature or player. + // Tap an untapped Swamp you control: Hecatomb deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/Heliophial.java b/Mage.Sets/src/mage/cards/h/Heliophial.java index 6ae2508fa1..505b84bef5 100644 --- a/Mage.Sets/src/mage/cards/h/Heliophial.java +++ b/Mage.Sets/src/mage/cards/h/Heliophial.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,12 +54,12 @@ public class Heliophial extends CardImpl { // Sunburst this.addAbility(new SunburstAbility(this)); - // {2}, Sacrifice Heliophial: Heliophial deals damage equal to the number of charge counters on it to target creature or player. + // {2}, Sacrifice Heliophial: Heliophial deals damage equal to the number of charge counters on it to any target. Effect effect = new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE)); - effect.setText("{this} deals damage equal to the number of charge counters on it to target creature or player"); + effect.setText("{this} deals damage equal to the number of charge counters on it to any target"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HellholeFlailer.java b/Mage.Sets/src/mage/cards/h/HellholeFlailer.java index a649adf8c5..a71a10dcfd 100644 --- a/Mage.Sets/src/mage/cards/h/HellholeFlailer.java +++ b/Mage.Sets/src/mage/cards/h/HellholeFlailer.java @@ -26,7 +26,7 @@ * or implied, of BetaSteward_at_googlemail.com. */ package mage.cards.h; - + import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; @@ -41,41 +41,39 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; - +import mage.target.common.TargetPlayerOrPlaneswalker; + /** * * @author LevelX2 */ public class HellholeFlailer extends CardImpl { - + public HellholeFlailer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.WARRIOR); - - this.power = new MageInt(3); this.toughness = new MageInt(2); - + // Unleash (You may have this creature enter the battlefield with a +1/+1 counter on it. It can't block as long as it has a +1/+1 counter on it.) this.addAbility(new UnleashAbility()); - + // {2}{B}{R}, Sacrifice Hellhole Flailer: Hellhole Flailer deals damage equal to its power to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{2}{B}{R}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); - + } - + public HellholeFlailer(final HellholeFlailer card) { super(card); } - + @Override public HellholeFlailer copy() { return new HellholeFlailer(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/h/Hellrider.java b/Mage.Sets/src/mage/cards/h/Hellrider.java index 8afaea91ea..b75b9eecfc 100644 --- a/Mage.Sets/src/mage/cards/h/Hellrider.java +++ b/Mage.Sets/src/mage/cards/h/Hellrider.java @@ -50,7 +50,7 @@ import mage.target.targetpointer.FixedTarget; public class Hellrider extends CardImpl { public Hellrider(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.DEVIL); this.power = new MageInt(3); @@ -95,7 +95,7 @@ class HellriderTriggeredAbility extends TriggeredAbilityImpl { public boolean checkTrigger(GameEvent event, Game game) { Permanent source = game.getPermanent(event.getSourceId()); if (source != null && source.getControllerId().equals(controllerId)) { - UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(event.getSourceId(), game); + UUID defendingPlayerId = game.getCombat().getDefenderId(event.getSourceId()); this.getEffects().get(0).setTargetPointer(new FixedTarget(defendingPlayerId)); return true; } @@ -104,6 +104,6 @@ class HellriderTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature you control attacks, {this} deals 1 damage to defending player."; + return "Whenever a creature you control attacks, {this} deals 1 damage to the player or planeswalker it’s attacking."; } } diff --git a/Mage.Sets/src/mage/cards/h/HereticsPunishment.java b/Mage.Sets/src/mage/cards/h/HereticsPunishment.java index b453316ad1..1e2d70918d 100644 --- a/Mage.Sets/src/mage/cards/h/HereticsPunishment.java +++ b/Mage.Sets/src/mage/cards/h/HereticsPunishment.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,11 +51,11 @@ import mage.target.common.TargetCreatureOrPlayer; public class HereticsPunishment extends CardImpl { public HereticsPunishment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}"); - // {3}{R}: Choose target creature or player, then put the top three cards of your library into your graveyard. Heretic's Punishment deals damage to that creature or player equal to the highest converted mana cost among those cards. + // {3}{R}: Choose any target, then put the top three cards of your library into your graveyard. Heretic's Punishment deals damage to that creature or player equal to the highest converted mana cost among those cards. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HereticsPunishmentEffect(), new ManaCostsImpl("{3}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -73,7 +73,7 @@ class HereticsPunishmentEffect extends OneShotEffect { public HereticsPunishmentEffect() { super(Outcome.Damage); - staticText = "Choose target creature or player, then put the top three cards of your library into your graveyard. {this} deals damage to that creature or player equal to the highest converted mana cost among those cards"; + staticText = "Choose any target, then put the top three cards of your library into your graveyard. {this} deals damage to that permanent or player equal to the highest converted mana cost among those cards"; } public HereticsPunishmentEffect(final HereticsPunishmentEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HermeticStudy.java b/Mage.Sets/src/mage/cards/h/HermeticStudy.java index b1284707c4..1c91a11a71 100644 --- a/Mage.Sets/src/mage/cards/h/HermeticStudy.java +++ b/Mage.Sets/src/mage/cards/h/HermeticStudy.java @@ -45,7 +45,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** * @@ -63,11 +63,11 @@ public class HermeticStudy extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." + // Enchanted creature has "{tap}: This creature deals 1 damage to any target." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals 1 damage to target creature or player.\""))); + "Enchanted creature has \"{T}: This creature deals 1 damage to any target.\""))); } public HermeticStudy(final HermeticStudy card) { diff --git a/Mage.Sets/src/mage/cards/h/HissingIguanar.java b/Mage.Sets/src/mage/cards/h/HissingIguanar.java index fcc909a103..4aad54eac2 100644 --- a/Mage.Sets/src/mage/cards/h/HissingIguanar.java +++ b/Mage.Sets/src/mage/cards/h/HissingIguanar.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,7 +44,7 @@ import mage.target.TargetPlayer; public class HissingIguanar extends CardImpl { public HissingIguanar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.LIZARD); this.power = new MageInt(3); @@ -52,7 +52,7 @@ public class HissingIguanar extends CardImpl { // Whenever another creature dies, you may have Hissing Iguanar deal 1 damage to target player. DiesCreatureTriggeredAbility ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1), true, true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HoldAtBay.java b/Mage.Sets/src/mage/cards/h/HoldAtBay.java index d6dec29f56..0d54c09c0f 100644 --- a/Mage.Sets/src/mage/cards/h/HoldAtBay.java +++ b/Mage.Sets/src/mage/cards/h/HoldAtBay.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class HoldAtBay extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - // Prevent the next 7 damage that would be dealt to target creature or player this turn. + // Prevent the next 7 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 7)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public HoldAtBay(final HoldAtBay card) { diff --git a/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java b/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java index 6f80ac46bc..4c3e26f670 100644 --- a/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java +++ b/Mage.Sets/src/mage/cards/h/HondenOfInfiniteRage.java @@ -40,7 +40,7 @@ import mage.constants.SuperType; import mage.constants.TargetController; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -62,9 +62,9 @@ public class HondenOfInfiniteRage extends CardImpl { this.subtype.add(SubType.SHRINE); - // At the beginning of your upkeep, Honden of Infinite Rage deals damage to target creature or player equal to the number of Shrines you control. + // At the beginning of your upkeep, Honden of Infinite Rage deals damage to any target equal to the number of Shrines you control. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HonorablePassage.java b/Mage.Sets/src/mage/cards/h/HonorablePassage.java index 585d6256e0..8ccf1200cf 100644 --- a/Mage.Sets/src/mage/cards/h/HonorablePassage.java +++ b/Mage.Sets/src/mage/cards/h/HonorablePassage.java @@ -40,7 +40,7 @@ import mage.constants.Duration; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class HonorablePassage extends CardImpl { public HonorablePassage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - // The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. If damage from a red source is prevented this way, Honorable Passage deals that much damage to the source's controller. + // The next time a source of your choice would deal damage to any target this turn, prevent that damage. If damage from a red source is prevented this way, Honorable Passage deals that much damage to the source's controller. this.getSpellAbility().addEffect(new HonorablePassageEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public HonorablePassage(final HonorablePassage card) { @@ -103,6 +103,6 @@ class HonorablePassageEffect extends PreventNextDamageFromChosenSourceToTargetEf @Override public String getText(Mode mode) { - return "The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. If damage from a red source is prevented this way, {this} deals that much damage to the source's controller"; + return "The next time a source of your choice would deal damage to any target this turn, prevent that damage. If damage from a red source is prevented this way, {this} deals that much damage to the source's controller"; } } diff --git a/Mage.Sets/src/mage/cards/h/HornetSting.java b/Mage.Sets/src/mage/cards/h/HornetSting.java index 852289b16d..63e2f45bbc 100644 --- a/Mage.Sets/src/mage/cards/h/HornetSting.java +++ b/Mage.Sets/src/mage/cards/h/HornetSting.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,7 +44,7 @@ public class HornetSting extends CardImpl { public HornetSting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/h/HotSprings.java b/Mage.Sets/src/mage/cards/h/HotSprings.java index 03b392d8b3..28e446c46f 100644 --- a/Mage.Sets/src/mage/cards/h/HotSprings.java +++ b/Mage.Sets/src/mage/cards/h/HotSprings.java @@ -47,7 +47,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,11 +65,11 @@ public class HotSprings extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted land has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." + // Enchanted land has "{tap}: Prevent the next 1 damage that would be dealt to any target this turn." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.\""); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to any target this turn.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/h/HungryFlames.java b/Mage.Sets/src/mage/cards/h/HungryFlames.java index 2d7c76cea8..2e220952b1 100644 --- a/Mage.Sets/src/mage/cards/h/HungryFlames.java +++ b/Mage.Sets/src/mage/cards/h/HungryFlames.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.h; import java.util.UUID; @@ -38,8 +37,8 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author JRHerlehy @@ -51,7 +50,7 @@ public class HungryFlames extends CardImpl { // Hungry Flames deals 3 damage to target creature and 2 damage to target player. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new HungryFlamesEffect()); } @@ -65,9 +64,10 @@ public class HungryFlames extends CardImpl { } private static class HungryFlamesEffect extends OneShotEffect { + HungryFlamesEffect() { super(Outcome.Damage); - this.staticText = "{this} deals 3 damage to target creature and 2 damage to target player"; + this.staticText = "{this} deals 3 damage to target creature and 2 damage to target player or planeswalker"; } HungryFlamesEffect(final HungryFlamesEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java b/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java index 353481c35e..5406dba301 100644 --- a/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java +++ b/Mage.Sets/src/mage/cards/h/HypervoltGrasp.java @@ -42,7 +42,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -64,9 +64,9 @@ public class HypervoltGrasp extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "Tap: This creature deals 1 damage to target creature or player." + // Enchanted creature has "Tap: This creature deals 1 damage to any target." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); // {1}{U}: Return Hypervolt Grasp to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/h/Hypochondria.java b/Mage.Sets/src/mage/cards/h/Hypochondria.java index af55a6ad1a..599cd60419 100644 --- a/Mage.Sets/src/mage/cards/h/Hypochondria.java +++ b/Mage.Sets/src/mage/cards/h/Hypochondria.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,15 +50,15 @@ public class Hypochondria extends CardImpl { public Hypochondria(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); - // {W}, Discard a card: Prevent the next 3 damage that would be dealt to target creature or player this turn. + // {W}, Discard a card: Prevent the next 3 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // {W}, Sacrifice Hypochondria: Prevent the next 3 damage that would be dealt to target creature or player this turn. + // {W}, Sacrifice Hypochondria: Prevent the next 3 damage that would be dealt to any target this turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java b/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java index de8dfee17f..be01459181 100644 --- a/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java +++ b/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,10 +60,10 @@ public class IcatianJavelineers extends CardImpl { // Icatian Javelineers enters the battlefield with a javelin counter on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.JAVELIN.createInstance()), "with a javelin counter on it")); - // {tap}, Remove a javelin counter from Icatian Javelineers: Icatian Javelineers deals 1 damage to target creature or player. + // {tap}, Remove a javelin counter from Icatian Javelineers: Icatian Javelineers deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.JAVELIN.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/ImminentDoom.java b/Mage.Sets/src/mage/cards/i/ImminentDoom.java index 4f875fb860..a8b06b8abb 100644 --- a/Mage.Sets/src/mage/cards/i/ImminentDoom.java +++ b/Mage.Sets/src/mage/cards/i/ImminentDoom.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,9 +59,9 @@ public class ImminentDoom extends CardImpl { // Imminent Doom enters the battlefield with a doom counter on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.DOOM.createInstance(1)))); - // Whenever you cast a spell with converted mana cost equal to the number of doom counters on Imminent Doom, Imminent Doom deals that much damage to target creature or player. Then put a doom counter on Imminent Doom. + // Whenever you cast a spell with converted mana cost equal to the number of doom counters on Imminent Doom, Imminent Doom deals that much damage to any target. Then put a doom counter on Imminent Doom. Ability ability = new ImminentDoomTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -78,7 +78,7 @@ public class ImminentDoom extends CardImpl { class ImminentDoomTriggeredAbility extends TriggeredAbilityImpl { - private String rule = "Whenever you cast a spell with converted mana cost equal to the number of doom counters on {this}, {this} deals that much damage to target creature or player. Then put a doom counter on {this}."; + private String rule = "Whenever you cast a spell with converted mana cost equal to the number of doom counters on {this}, {this} deals that much damage to any target. Then put a doom counter on {this}."; public ImminentDoomTriggeredAbility() { super(Zone.BATTLEFIELD, new ImminentDoomEffect()); diff --git a/Mage.Sets/src/mage/cards/i/ImperialGunner.java b/Mage.Sets/src/mage/cards/i/ImperialGunner.java index 9ca9bffa95..c102ab8290 100644 --- a/Mage.Sets/src/mage/cards/i/ImperialGunner.java +++ b/Mage.Sets/src/mage/cards/i/ImperialGunner.java @@ -39,9 +39,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,14 +49,14 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class ImperialGunner extends CardImpl { - private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("target player or Starship creature"); + private static final FilterCreaturePlayerOrPlaneswalker filter = new FilterCreaturePlayerOrPlaneswalker("target player, planeswalker or Starship creature"); static { filter.getCreatureFilter().add(new SubtypePredicate(SubType.STARSHIP)); } public ImperialGunner(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(1); @@ -64,7 +64,7 @@ public class ImperialGunner extends CardImpl { // {1},{T}:Imperial Gunner deals 1 damage to target player or Starship creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); - ability.addTarget(new TargetCreatureOrPlayer(filter)); + ability.addTarget(new TargetAnyTarget(filter)); ability.addCost(new TapSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java b/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java index 879f7b8266..8b254b0a6c 100644 --- a/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java +++ b/Mage.Sets/src/mage/cards/i/ImplementOfCombustion.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -53,7 +53,7 @@ public class ImplementOfCombustion extends CardImpl { // {R}, Sacrifice Implement of Combustion: It deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); // When Implement of Combustion is put into a graveyard from the battlefield, draw a card. diff --git a/Mage.Sets/src/mage/cards/i/IncendiaryCommand.java b/Mage.Sets/src/mage/cards/i/IncendiaryCommand.java index 7cbed799b5..442b5171bc 100644 --- a/Mage.Sets/src/mage/cards/i/IncendiaryCommand.java +++ b/Mage.Sets/src/mage/cards/i/IncendiaryCommand.java @@ -43,8 +43,8 @@ import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetNonBasicLandPermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -53,14 +53,14 @@ import mage.target.common.TargetNonBasicLandPermanent; public class IncendiaryCommand extends CardImpl { public IncendiaryCommand(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Choose two - this.getSpellAbility().getModes().setMinModes(2); this.getSpellAbility().getModes().setMaxModes(2); // Incendiary Command deals 4 damage to target player; this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); // or Incendiary Command deals 2 damage to each creature; Mode mode = new Mode(); mode.getEffects().add(new DamageAllEffect(2, new FilterCreaturePermanent())); diff --git a/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java b/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java index 03b10f9881..68607d0c78 100644 --- a/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java +++ b/Mage.Sets/src/mage/cards/i/IncendiaryFlow.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -47,9 +47,9 @@ public class IncendiaryFlow extends CardImpl { public IncendiaryFlow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Incendiary Flow deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead. + // Incendiary Flow deals 3 damage to any target. If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/i/Incinerate.java b/Mage.Sets/src/mage/cards/i/Incinerate.java index 2f82ee3423..f3904012a4 100644 --- a/Mage.Sets/src/mage/cards/i/Incinerate.java +++ b/Mage.Sets/src/mage/cards/i/Incinerate.java @@ -39,7 +39,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -53,7 +53,7 @@ public class Incinerate extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new IncinerateEffect()); this.getSpellAbility().addWatcher(new DamagedByWatcher()); } diff --git a/Mage.Sets/src/mage/cards/i/InfernoFist.java b/Mage.Sets/src/mage/cards/i/InfernoFist.java index c7461dd06d..355260e01b 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoFist.java +++ b/Mage.Sets/src/mage/cards/i/InfernoFist.java @@ -45,7 +45,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,10 +68,10 @@ public class InfernoFist extends CardImpl { // Enchanted creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0))); - // {R}, Sacrifice Inferno Fist: Inferno Fist deals 2 damage to target creature or player. + // {R}, Sacrifice Inferno Fist: Inferno Fist deals 2 damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/InfernoJet.java b/Mage.Sets/src/mage/cards/i/InfernoJet.java index f1bc9c9395..eddffdfa85 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoJet.java +++ b/Mage.Sets/src/mage/cards/i/InfernoJet.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -47,7 +47,7 @@ public class InfernoJet extends CardImpl { // Inferno Jet deals 6 damage to target opponent. getSpellAbility().addEffect(new DamageTargetEffect(6)); - getSpellAbility().addTarget(new TargetOpponent()); + getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/cards/i/InfernoTitan.java b/Mage.Sets/src/mage/cards/i/InfernoTitan.java index 335f7120a0..797281846b 100644 --- a/Mage.Sets/src/mage/cards/i/InfernoTitan.java +++ b/Mage.Sets/src/mage/cards/i/InfernoTitan.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -61,7 +61,7 @@ public class InfernoTitan extends CardImpl { // Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players. Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageMultiEffect(3, "it")); - ability.addTarget(new TargetCreatureOrPlayerAmount(3)); + ability.addTarget(new TargetAnyTargetAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/InsultInjury.java b/Mage.Sets/src/mage/cards/i/InsultInjury.java index 7ecd9561c1..d2c7699a34 100644 --- a/Mage.Sets/src/mage/cards/i/InsultInjury.java +++ b/Mage.Sets/src/mage/cards/i/InsultInjury.java @@ -17,8 +17,8 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.util.CardUtil; /** @@ -40,7 +40,7 @@ public class InsultInjury extends SplitCard { // Injury deals 2 damage to target creature and 2 damage to target player. ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); getRightHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); - getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer()); + getRightHalfCard().getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); getRightHalfCard().getSpellAbility().addEffect(new InjuryEffect()); } @@ -58,7 +58,7 @@ class InsultDoubleDamageEffect extends ReplacementEffectImpl { public InsultDoubleDamageEffect() { super(Duration.EndOfTurn, Outcome.Damage); - staticText = "If a source you control would deal damage this turn, it deals double that damage to that creature or player instead."; + staticText = "If a source you control would deal damage this turn, it deals double that damage to that permanent or player instead."; } public InsultDoubleDamageEffect(final InsultDoubleDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java b/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java index 4c42cb06c6..1f1edd7cfe 100644 --- a/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java +++ b/Mage.Sets/src/mage/cards/i/InvokeTheFiremind.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,7 +50,7 @@ public class InvokeTheFiremind extends CardImpl { this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new ManacostVariableValue())); Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(new ManacostVariableValue())); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/i/IonStorm.java b/Mage.Sets/src/mage/cards/i/IonStorm.java index 4eeb77f84f..65a8eea927 100644 --- a/Mage.Sets/src/mage/cards/i/IonStorm.java +++ b/Mage.Sets/src/mage/cards/i/IonStorm.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,10 +52,10 @@ public class IonStorm extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // {1}{R}, Remove a +1/+1 counter or a charge counter from a permanent you control: Ion Storm deals 2 damage to target creature or player. + // {1}{R}, Remove a +1/+1 counter or a charge counter from a permanent you control: Ion Storm deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}")); ability.addCost(new OrCost(new RemoveCounterCost(new TargetControlledPermanent(), CounterType.P1P1), new RemoveCounterCost(new TargetControlledPermanent(), CounterType.CHARGE), " Remove a +1/+1 counter or a charge counter from a permanent you control")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IreOfKaminari.java b/Mage.Sets/src/mage/cards/i/IreOfKaminari.java index 655f06afbd..b6db46ee9d 100644 --- a/Mage.Sets/src/mage/cards/i/IreOfKaminari.java +++ b/Mage.Sets/src/mage/cards/i/IreOfKaminari.java @@ -35,7 +35,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -55,9 +55,9 @@ public class IreOfKaminari extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); this.subtype.add(SubType.ARCANE); - // Ire of Kaminari deals damage to target creature or player equal to the number of Arcane cards in your graveyard. + // Ire of Kaminari deals damage to any target equal to the number of Arcane cards in your graveyard. this.getSpellAbility().addEffect(new DamageTargetEffect(new CardsInControllerGraveyardCount(filter))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public IreOfKaminari(final IreOfKaminari card) { diff --git a/Mage.Sets/src/mage/cards/i/IvoryCharm.java b/Mage.Sets/src/mage/cards/i/IvoryCharm.java index d7bb8b69ca..8ed515d712 100644 --- a/Mage.Sets/src/mage/cards/i/IvoryCharm.java +++ b/Mage.Sets/src/mage/cards/i/IvoryCharm.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -55,10 +55,10 @@ public class IvoryCharm extends CardImpl { mode.getEffects().add(new TapTargetEffect()); mode.getTargets().add(new TargetCreaturePermanent()); this.getSpellAbility().addMode(mode); - // or prevent the next 1 damage that would be dealt to target creature or player this turn. + // or prevent the next 1 damage that would be dealt to any target this turn. mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/j/JawsOfStone.java b/Mage.Sets/src/mage/cards/j/JawsOfStone.java index c450498711..d929511bf4 100644 --- a/Mage.Sets/src/mage/cards/j/JawsOfStone.java +++ b/Mage.Sets/src/mage/cards/j/JawsOfStone.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -61,7 +61,7 @@ public class JawsOfStone extends CardImpl { Effect effect = new DamageMultiEffect(mountains); effect.setText(rule); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(mountains)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(mountains)); } diff --git a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java index 087d61809d..202c8d05a6 100644 --- a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java +++ b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java @@ -48,7 +48,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -79,9 +79,9 @@ public class JayaBallardTaskMage extends CardImpl { ability.addCost(new DiscardCardCost()); this.addAbility(ability); - // {1}{R}, {tap}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. + // {1}{R}, {tap}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to any target. A creature dealt damage this way can't be regenerated this turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); ability.addEffect(new CantRegenerateEffect()); diff --git a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java index 9af594c660..c807711e98 100644 --- a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java +++ b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java @@ -6,7 +6,6 @@ import mage.abilities.common.LegendarySpellAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -14,8 +13,7 @@ import mage.constants.SuperType; import mage.target.common.TargetAnyTarget; /** - * @author JRHerlehy - * Created on 4/8/18. + * @author JRHerlehy Created on 4/8/18. */ public class JayasImmolatingInferno extends CardImpl { diff --git a/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java b/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java index 540868fdf2..cb2a1e88eb 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java +++ b/Mage.Sets/src/mage/cards/j/JeskaWarriorAdept.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class JeskaWarriorAdept extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Haste this.addAbility(HasteAbility.getInstance()); - // {tap}: Jeska, Warrior Adept deals 1 damage to target creature or player. + // {tap}: Jeska, Warrior Adept deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JeskaiCharm.java b/Mage.Sets/src/mage/cards/j/JeskaiCharm.java index 72e5ca95e4..12d4792401 100644 --- a/Mage.Sets/src/mage/cards/j/JeskaiCharm.java +++ b/Mage.Sets/src/mage/cards/j/JeskaiCharm.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.filter.common.FilterControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -50,8 +50,7 @@ import mage.target.common.TargetOpponent; public class JeskaiCharm extends CardImpl { public JeskaiCharm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{R}{W}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{R}{W}"); // Choose one - // - Put target creature on top of its owner's library. @@ -60,11 +59,11 @@ public class JeskaiCharm extends CardImpl { // - Jeskai Charm deals 4 damage to target opponent. Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(4)); - mode.getTargets().add(new TargetOpponent()); + mode.getTargets().add(new TargetOpponentOrPlaneswalker()); this.getSpellAbility().addMode(mode); // - Creatures you control get +1/+1 and gain lifelink until end of turn. mode = new Mode(); - Effect effect = new BoostControlledEffect(1,1, Duration.EndOfTurn); + Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn); effect.setText("Creatures you control get +1/+1"); mode.getEffects().add(effect); effect = new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java b/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java index 6a12411892..d0b947100d 100644 --- a/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java +++ b/Mage.Sets/src/mage/cards/j/JhessianBalmgiver.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -57,9 +57,9 @@ public class JhessianBalmgiver extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {tap}: Target creature can't be blocked this turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/j/JundSojourners.java b/Mage.Sets/src/mage/cards/j/JundSojourners.java index d6d52d90e3..f309d88735 100644 --- a/Mage.Sets/src/mage/cards/j/JundSojourners.java +++ b/Mage.Sets/src/mage/cards/j/JundSojourners.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class JundSojourners extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(2); - // When you cycle Jund Sojourners or it dies, you may have it deal 1 damage to target creature or player. + // When you cycle Jund Sojourners or it dies, you may have it deal 1 damage to any target. Ability ability1 = new CycleTriggeredAbility(new DamageTargetEffect(1)); Ability ability2 = new DiesTriggeredAbility(new DamageTargetEffect(1)); - ability1.addTarget(new TargetCreatureOrPlayer()); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability1); this.addAbility(ability2); diff --git a/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java b/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java index a196c1f169..19bab1ed43 100644 --- a/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java +++ b/Mage.Sets/src/mage/cards/k/KaervekTheMerciless.java @@ -40,7 +40,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class KaervekTheMerciless extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(4); - // Whenever an opponent casts a spell, Kaervek the Merciless deals damage to target creature or player equal to that spell's converted mana cost. + // Whenever an opponent casts a spell, Kaervek the Merciless deals damage to any target equal to that spell's converted mana cost. Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new KaervekTheMercilessEffect(), StaticFilters.FILTER_SPELL, false, SetTargetPointer.SPELL); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -79,7 +79,7 @@ class KaervekTheMercilessEffect extends OneShotEffect { public KaervekTheMercilessEffect() { super(Outcome.Benefit); - this.staticText = "{this} deals damage to target creature or player equal to that spell's converted mana cost"; + this.staticText = "{this} deals damage to any target equal to that spell's converted mana cost"; } public KaervekTheMercilessEffect(final KaervekTheMercilessEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KaerveksTorch.java b/Mage.Sets/src/mage/cards/k/KaerveksTorch.java index 84d0436c94..ee0b668972 100644 --- a/Mage.Sets/src/mage/cards/k/KaerveksTorch.java +++ b/Mage.Sets/src/mage/cards/k/KaerveksTorch.java @@ -44,7 +44,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.util.CardUtil; /** @@ -59,9 +59,9 @@ public class KaerveksTorch extends CardImpl { // As long as Kaervek's Torch is on the stack, spells that target it cost {2} more to cast. this.addAbility(new SimpleStaticAbility(Zone.STACK, new KaerveksTorchCostIncreaseEffect())); - // Kaervek's Torch deals X damage to target creature or player. + // Kaervek's Torch deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public KaerveksTorch(final KaerveksTorch card) { diff --git a/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java b/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java index 76a2a36e2d..5e0767ac9c 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java +++ b/Mage.Sets/src/mage/cards/k/KamahlPitFighter.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,7 +58,7 @@ public class KamahlPitFighter extends CardImpl { this.toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java index a244cd23b1..b6505bfce8 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; /** @@ -64,15 +64,15 @@ public class KarplusanMinotaur extends CardImpl { // Cumulative upkeep-Flip a coin. this.addAbility(new CumulativeUpkeepAbility(new KarplusanMinotaurCost())); - // Whenever you win a coin flip, Karplusan Minotaur deals 1 damage to target creature or player. + // Whenever you win a coin flip, Karplusan Minotaur deals 1 damage to any target. Ability abilityWin = new KarplusanMinotaurFlipWinTriggeredAbility(); - abilityWin.addTarget(new TargetCreatureOrPlayer()); + abilityWin.addTarget(new TargetAnyTarget()); this.addAbility(abilityWin); //TODO: Make ability properly copiable - // Whenever you lose a coin flip, Karplusan Minotaur deals 1 damage to target creature or player of an opponent's choice. + // Whenever you lose a coin flip, Karplusan Minotaur deals 1 damage to any target of an opponent's choice. Ability abilityLose = new KarplusanMinotaurFlipLoseTriggeredAbility(); - abilityLose.addTarget(new TargetCreatureOrPlayer()); + abilityLose.addTarget(new TargetAnyTarget()); this.addAbility(abilityLose); } @@ -134,7 +134,7 @@ class KarplusanMinotaurFlipWinTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you win a coin flip, {this} deals 1 damage to target creature or player"; + return "Whenever you win a coin flip, {this} deals 1 damage to any target"; } } @@ -165,7 +165,7 @@ class KarplusanMinotaurFlipLoseTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you lose a coin flip, {this} deals 1 damage to target creature or player of an opponent's choice."; + return "Whenever you lose a coin flip, {this} deals 1 damage to any target of an opponent's choice."; } } diff --git a/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java b/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java index 3229b5635d..84ab4bec9c 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanWolverine.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class KarplusanWolverine extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Whenever Karplusan Wolverine becomes blocked, you may have it deal 1 damage to target creature or player. + // Whenever Karplusan Wolverine becomes blocked, you may have it deal 1 damage to any target. Ability ability = new BecomesBlockedTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonChampion.java b/Mage.Sets/src/mage/cards/k/KeldonChampion.java index caf5f284fc..a72b636ec3 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonChampion.java +++ b/Mage.Sets/src/mage/cards/k/KeldonChampion.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,7 +47,7 @@ import mage.target.TargetPlayer; public class KeldonChampion extends CardImpl { public KeldonChampion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.BARBARIAN); @@ -59,7 +59,7 @@ public class KeldonChampion extends CardImpl { this.addAbility(new EchoAbility("{2}{R}{R}")); // When Keldon Champion enters the battlefield, it deals 3 damage to target player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it"), false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java index 24b59faa44..6ab4f786ce 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java +++ b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -50,7 +50,7 @@ import mage.target.TargetPlayer; public class KeldonMarauders extends CardImpl { public KeldonMarauders(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); @@ -66,7 +66,7 @@ public class KeldonMarauders extends CardImpl { // When Keldon Marauders enters the battlefield or leaves the battlefield, it deals 1 damage to target player. ability = new EntersBattlefieldOrLeavesSourceTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java b/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java index db94c7aab2..385350122a 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java +++ b/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class KeldonMegaliths extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // {tap}: Add {R}. this.addAbility(new RedManaAbility()); - // Hellbent - {1}{R}, {tap}: Keldon Megaliths deals 1 damage to target creature or player. Activate this ability only if you have no cards in hand. + // Hellbent - {1}{R}, {tap}: Keldon Megaliths deals 1 damage to any target. Activate this ability only if you have no cards in hand. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{1}{R}"), HellbentCondition.instance, - "<i>Hellbent</i> — {1}{R}, {T}: {this} deals 1 damage to target creature or player. Activate this ability only if you have no cards in hand."); - ability.addTarget(new TargetCreatureOrPlayer()); + "<i>Hellbent</i> — {1}{R}, {T}: {this} deals 1 damage to any target. Activate this ability only if you have no cards in hand."); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java b/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java index 0c1e25eb8b..79f655d558 100644 --- a/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java +++ b/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java @@ -42,7 +42,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,11 +56,11 @@ public class KeldonNecropolis extends CardImpl { // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); - // {4}{R}, {T}, Sacrifice a creature: Keldon Necropolis deals 2 damage to target creature or player. + // {4}{R}, {T}, Sacrifice a creature: Keldon Necropolis deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl(new ManaCostsImpl("{4}{R}"))); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java index beb304ebd9..11e6606b7b 100644 --- a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java +++ b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java @@ -52,7 +52,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.CardsAmountDrawnThisTurnWatcher; /** @@ -79,7 +79,7 @@ public class KeranosGodOfStorms extends CardImpl { // Reveal the first card you draw on each of your turns. // Whenever you reveal a land card this way, draw a card. - // Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player. + // Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target. this.addAbility(new KeranosGodOfStormsTriggeredAbility(), new CardsAmountDrawnThisTurnWatcher()); @@ -135,7 +135,7 @@ class KeranosGodOfStormsTriggeredAbility extends TriggeredAbilityImpl { this.addEffect(new DrawCardSourceControllerEffect(1)); } else { this.addEffect(new DamageTargetEffect(3)); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } return true; } @@ -147,6 +147,6 @@ class KeranosGodOfStormsTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { return "Reveal the first card you draw on each of your turns. Whenever you reveal a land card this way, draw a card. " + - "Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player."; + "Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target."; } } diff --git a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java index 38fde758bc..7083624e19 100644 --- a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java +++ b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author noxx @@ -53,7 +53,7 @@ public class KessigMalcontents extends CardImpl { } public KessigMalcontents(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); @@ -62,7 +62,7 @@ public class KessigMalcontents extends CardImpl { // When Kessig Malcontents enters the battlefield, it deals damage to target player equal to the number of Humans you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter), "it")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java b/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java index ccd1da4b3e..deb6557ad3 100644 --- a/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java +++ b/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,10 +63,10 @@ public class KilnmouthDragon extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to target creature or player. + // {tap}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/Kindle.java b/Mage.Sets/src/mage/cards/k/Kindle.java index 756c28400a..d0bc2aa6f5 100644 --- a/Mage.Sets/src/mage/cards/k/Kindle.java +++ b/Mage.Sets/src/mage/cards/k/Kindle.java @@ -40,7 +40,7 @@ import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; import mage.players.Player; import mage.players.PlayerList; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class Kindle extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Kindle deals X damage to target creature or player, where X is 2 plus the number of cards named Kindle in all graveyards. + // Kindle deals X damage to any target, where X is 2 plus the number of cards named Kindle in all graveyards. Effect effect = new DamageTargetEffect(new KindleCardsInAllGraveyardsCount(filter)); - effect.setText("{this} deals X damage to target creature or player, where X is 2 plus the number of cards named {source} in all graveyards"); + effect.setText("{this} deals X damage to any target, where X is 2 plus the number of cards named {source} in all graveyards"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Kindle(final Kindle card) { diff --git a/Mage.Sets/src/mage/cards/k/KissOfDeath.java b/Mage.Sets/src/mage/cards/k/KissOfDeath.java index b727e46c19..1f653a219e 100644 --- a/Mage.Sets/src/mage/cards/k/KissOfDeath.java +++ b/Mage.Sets/src/mage/cards/k/KissOfDeath.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -42,12 +42,12 @@ import mage.target.TargetPlayer; public class KissOfDeath extends CardImpl { public KissOfDeath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); // Kiss of Death deals 4 damage to target opponent. You gain 4 life. - this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new GainLifeEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); } public KissOfDeath(final KissOfDeath card) { diff --git a/Mage.Sets/src/mage/cards/k/KithkinHealer.java b/Mage.Sets/src/mage/cards/k/KithkinHealer.java index 44bd43f692..2ec92ab237 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinHealer.java +++ b/Mage.Sets/src/mage/cards/k/KithkinHealer.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class KithkinHealer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KitsuneHealer.java b/Mage.Sets/src/mage/cards/k/KitsuneHealer.java index 2ccc828cbb..d72ebd3620 100644 --- a/Mage.Sets/src/mage/cards/k/KitsuneHealer.java +++ b/Mage.Sets/src/mage/cards/k/KitsuneHealer.java @@ -43,7 +43,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SupertypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -65,9 +65,9 @@ public class KitsuneHealer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {T}: Prevent the next 1 damage that would be dealt to any target this turn. Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - firstAbility.addTarget(new TargetCreatureOrPlayer()); + firstAbility.addTarget(new TargetAnyTarget()); this.addAbility(firstAbility); // {T}: Prevent all damage that would be dealt to target legendary creature this turn. Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE), new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java index e21b474627..b111b3c32b 100644 --- a/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java +++ b/Mage.Sets/src/mage/cards/k/KnollspineInvocation.java @@ -44,7 +44,7 @@ import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,10 +57,10 @@ public class KnollspineInvocation extends CardImpl { public KnollspineInvocation(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}"); - // {X}, Discard a card with converted mana cost X: Knollspine Invocation deals X damage to target creature or player. + // {X}, Discard a card with converted mana cost X: Knollspine Invocation deals X damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue(), true), new ManaCostsImpl<>("{X}")); ability.addCost(new DiscardTargetCost(new TargetCardInHand(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java b/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java index a957cdd0f5..8fe3fd8fd3 100644 --- a/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java +++ b/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java @@ -39,7 +39,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,7 +51,7 @@ public class KnowledgeAndPower extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - // Whenever you scry, you may pay 2. If you do. Knowledge and Power deals 2 damage to target creature or player. + // Whenever you scry, you may pay 2. If you do. Knowledge and Power deals 2 damage to any target. this.addAbility(new ScryTriggeredAbility() ); } @@ -70,7 +70,7 @@ class ScryTriggeredAbility extends TriggeredAbilityImpl { public ScryTriggeredAbility() { super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(2), new GenericManaCost(2)), false); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } public ScryTriggeredAbility(final ScryTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/k/KolaghansCommand.java b/Mage.Sets/src/mage/cards/k/KolaghansCommand.java index 7ac3119ec1..cad8697fbf 100644 --- a/Mage.Sets/src/mage/cards/k/KolaghansCommand.java +++ b/Mage.Sets/src/mage/cards/k/KolaghansCommand.java @@ -42,7 +42,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -79,10 +79,10 @@ public class KolaghansCommand extends CardImpl { mode.getTargets().add(new TargetPermanent(filter)); this.getSpellAbility().getModes().addMode(mode); - // or Kolaghan's Command deals 2 damage to target creature or player. + // or Kolaghan's Command deals 2 damage to any target. mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(2)); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); this.getSpellAbility().getModes().addMode(mode); } diff --git a/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java b/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java index 4bc59964b6..06a821a7fa 100644 --- a/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java +++ b/Mage.Sets/src/mage/cards/k/KothOfTheHammer.java @@ -83,7 +83,7 @@ public class KothOfTheHammer extends CardImpl { // -2: Add {R} for each Mountain you control. this.addAbility(new LoyaltyAbility(new DynamicManaEffect(Mana.RedMana(1), new PermanentsOnBattlefieldCount(filterCount)), -2)); - // -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.' + // -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to any target.' this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new KothOfTheHammerEmblem()), -5)); } diff --git a/Mage.Sets/src/mage/cards/k/KrisMage.java b/Mage.Sets/src/mage/cards/k/KrisMage.java index b68c394a9f..da30a393c5 100644 --- a/Mage.Sets/src/mage/cards/k/KrisMage.java +++ b/Mage.Sets/src/mage/cards/k/KrisMage.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,11 +55,11 @@ public class KrisMage extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {R}, {tap}, Discard a card: Kris Mage deals 1 damage to target creature or player. + // {R}, {tap}, Discard a card: Kris Mage deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanHorror.java b/Mage.Sets/src/mage/cards/k/KrovikanHorror.java index 3f85d49524..ff2063899d 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanHorror.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanHorror.java @@ -48,7 +48,7 @@ import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -70,10 +70,10 @@ public class KrovikanHorror extends CardImpl { TargetController.ANY, KrovikanHorrorCondition.instance, true )); - // {1}, Sacrifice a creature: Krovikan Horror deals 1 damage to target creature or player. + // {1}, Sacrifice a creature: Krovikan Horror deals 1 damage to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1)); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanPlague.java b/Mage.Sets/src/mage/cards/k/KrovikanPlague.java index 190b341536..fc86428223 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanPlague.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanPlague.java @@ -55,7 +55,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -90,11 +90,11 @@ public class KrovikanPlague extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false)); - // Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to target creature or player. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped. + // Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to any target. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped. Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filter)); ability2.addEffect(new AddCountersAttachedEffect(new BoostCounter(0, -1),"enchanted creature")); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java b/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java index 4559c93812..9651265d27 100644 --- a/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java +++ b/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -57,7 +57,7 @@ public class KuldothaFlamefiend extends CardImpl { // When Kuldotha Flamefiend enters the battlefield, you may sacrifice an artifact. If you do, Kuldotha Flamefiend deals 4 damage divided as you choose among any number of target creatures and/or players. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageMultiEffect(4), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))), false); - ability.addTarget(new TargetCreatureOrPlayerAmount(4)); + ability.addTarget(new TargetAnyTargetAmount(4)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java index 4149e6e605..e90a65f192 100644 --- a/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java +++ b/Mage.Sets/src/mage/cards/k/KumanoMasterYamabushi.java @@ -45,7 +45,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -62,9 +62,9 @@ public class KumanoMasterYamabushi extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // {{1}{R}: Kumano, Master Yamabushi deals 1 damage to target creature or player. + // {{1}{R}: Kumano, Master Yamabushi deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}") ); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // If a creature dealt damage by Kumano this turn would die, exile it instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DealtDamageToCreatureBySourceDies(this, Duration.WhileOnBattlefield)), new DamagedByWatcher()); diff --git a/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java b/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java index 686dc0806f..936615d90e 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java +++ b/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java @@ -12,9 +12,8 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; - +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -32,8 +31,12 @@ public class KyrenNegotiations extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); // Tap an untapped creature you control: Kyren Negotiations deals 1 damage to target player. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); - ability.addTarget(new TargetPlayer()); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new DamageTargetEffect(1), + new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)) + ); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KyrenSniper.java b/Mage.Sets/src/mage/cards/k/KyrenSniper.java index 40a0d91f34..627a07c37e 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenSniper.java +++ b/Mage.Sets/src/mage/cards/k/KyrenSniper.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author BursegSardaukar @@ -45,7 +45,7 @@ import mage.target.TargetPlayer; public class KyrenSniper extends CardImpl { public KyrenSniper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.GOBLIN); this.power = new MageInt(1); @@ -53,7 +53,7 @@ public class KyrenSniper extends CardImpl { // At the beginning of your upkeep, you may have Kyren Sniper deal 1 damage to target player. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(1), TargetController.YOU, true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -65,4 +65,4 @@ public class KyrenSniper extends CardImpl { public KyrenSniper copy() { return new KyrenSniper(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java b/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java index 8c2f146127..8927db4409 100644 --- a/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java +++ b/Mage.Sets/src/mage/cards/l/LabyrinthChampion.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class LabyrinthChampion extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // Heroic - Whenever you cast a spell that targets Labyrinth Champion, Labyrinth Champion deals 2 damage to target creature or player. + // Heroic - Whenever you cast a spell that targets Labyrinth Champion, Labyrinth Champion deals 2 damage to any target. Ability ability = new HeroicAbility(new DamageTargetEffect(2), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LandsEdge.java b/Mage.Sets/src/mage/cards/l/LandsEdge.java index 85df17f44d..16014035b0 100644 --- a/Mage.Sets/src/mage/cards/l/LandsEdge.java +++ b/Mage.Sets/src/mage/cards/l/LandsEdge.java @@ -31,8 +31,6 @@ import java.util.List; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.CostImpl; import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -48,8 +46,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.TargetPlayer; - +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author L_J @@ -57,12 +54,12 @@ import mage.target.TargetPlayer; public class LandsEdge extends CardImpl { public LandsEdge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{R}"); addSuperType(SuperType.WORLD); // Discard a card: If the discarded card was a land card, Land's Edge deals 2 damage to target player. Any player may activate this ability. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LandsEdgeEffect(), new DiscardCardCost(false)); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.setMayActivate(TargetController.ANY); ability.addEffect(new InfoEffect("Any player may activate this ability")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/l/Landslide.java b/Mage.Sets/src/mage/cards/l/Landslide.java index 9388d000d2..ec41463b3e 100644 --- a/Mage.Sets/src/mage/cards/l/Landslide.java +++ b/Mage.Sets/src/mage/cards/l/Landslide.java @@ -44,7 +44,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -53,11 +53,11 @@ import mage.target.TargetPlayer; public class Landslide extends CardImpl { public Landslide(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); // Sacrifice any number of Mountains. Landslide deals that much damage to target player. this.getSpellAbility().addEffect(new LandslideEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public Landslide(final Landslide card) { @@ -81,7 +81,7 @@ class LandslideEffect extends OneShotEffect { public LandslideEffect() { super(Outcome.Benefit); - staticText = "Sacrifice any number of Mountains. {this} deals that much damage to target player"; + staticText = "Sacrifice any number of Mountains. {this} deals that much damage to target player or planeswalker"; } public LandslideEffect(final LandslideEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LastDitchEffort.java b/Mage.Sets/src/mage/cards/l/LastDitchEffort.java index f2dbe86ca2..e5a9aaf187 100644 --- a/Mage.Sets/src/mage/cards/l/LastDitchEffort.java +++ b/Mage.Sets/src/mage/cards/l/LastDitchEffort.java @@ -40,7 +40,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class LastDitchEffort extends CardImpl { public LastDitchEffort(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Sacrifice any number of creatures. Last-Ditch Effort deals that much damage to target creature or player. + // Sacrifice any number of creatures. Last-Ditch Effort deals that much damage to any target. this.getSpellAbility().addEffect(new LastDitchEffortEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public LastDitchEffort(final LastDitchEffort card) { @@ -70,7 +70,7 @@ class LastDitchEffortEffect extends OneShotEffect { LastDitchEffortEffect() { super(Outcome.Damage); - this.staticText = "Sacrifice any number of creatures. {this} deals that much damage to target creature or player"; + this.staticText = "Sacrifice any number of creatures. {this} deals that much damage to any target"; } LastDitchEffortEffect(final LastDitchEffortEffect effect) { diff --git a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java index f68c923792..71fb2cc768 100644 --- a/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java +++ b/Mage.Sets/src/mage/cards/l/LatullaKeldonOverseer.java @@ -44,7 +44,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,11 +60,11 @@ public class LatullaKeldonOverseer extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // {X}{R}, {tap}, Discard two cards: Latulla, Keldon Overseer deals X damage to target creature or player. + // {X}{R}, {tap}, Discard two cards: Latulla, Keldon Overseer deals X damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, 2, new FilterCard("two cards")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LavaAxe.java b/Mage.Sets/src/mage/cards/l/LavaAxe.java index fe3f4234a2..11a3b5f499 100644 --- a/Mage.Sets/src/mage/cards/l/LavaAxe.java +++ b/Mage.Sets/src/mage/cards/l/LavaAxe.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.l; import java.util.UUID; @@ -33,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -42,9 +41,9 @@ import mage.target.TargetPlayer; public class LavaAxe extends CardImpl { public LavaAxe(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}"); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); } diff --git a/Mage.Sets/src/mage/cards/l/LavaDart.java b/Mage.Sets/src/mage/cards/l/LavaDart.java index 90372fffe2..c191d8abe4 100644 --- a/Mage.Sets/src/mage/cards/l/LavaDart.java +++ b/Mage.Sets/src/mage/cards/l/LavaDart.java @@ -39,7 +39,7 @@ import mage.constants.TimingRule; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class LavaDart extends CardImpl { public LavaDart(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Lava Dart deals 1 damage to target creature or player. + // Lava Dart deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Flashback-Sacrifice a Mountain. this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledPermanent(filter)), TimingRule.INSTANT)); diff --git a/Mage.Sets/src/mage/cards/l/LavaSpike.java b/Mage.Sets/src/mage/cards/l/LavaSpike.java index acddcf89c4..68cd540581 100644 --- a/Mage.Sets/src/mage/cards/l/LavaSpike.java +++ b/Mage.Sets/src/mage/cards/l/LavaSpike.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.l; import java.util.UUID; @@ -34,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -42,16 +41,16 @@ import mage.target.TargetPlayer; */ public class LavaSpike extends CardImpl { - public LavaSpike (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); + public LavaSpike(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); this.subtype.add(SubType.ARCANE); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); } - public LavaSpike (final LavaSpike card) { + public LavaSpike(final LavaSpike card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/l/Lavalanche.java b/Mage.Sets/src/mage/cards/l/Lavalanche.java index d0d1cc70ec..c9ba9c8874 100644 --- a/Mage.Sets/src/mage/cards/l/Lavalanche.java +++ b/Mage.Sets/src/mage/cards/l/Lavalanche.java @@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -52,16 +52,12 @@ import mage.target.TargetPlayer; public class Lavalanche extends CardImpl { public Lavalanche(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}{G}"); - - - - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}{G}"); // Lavalanche deals X damage to target player and each creature he or she controls. this.getSpellAbility().addEffect(new LavalancheEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetPlayer()); - + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + } public Lavalanche(final Lavalanche card) { @@ -81,7 +77,7 @@ class LavalancheEffect extends OneShotEffect { public LavalancheEffect(DynamicValue amount) { super(Outcome.Damage); this.amount = amount; - staticText = "Lavalanche deals X damage to target player and each creature he or she controls"; + staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; } public LavalancheEffect(final LavalancheEffect effect) { @@ -96,16 +92,16 @@ class LavalancheEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(source.getFirstTarget()); + Player targetPlayer = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); if (targetPlayer == null) { return false; } targetPlayer.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true); - FilterPermanent filter = new FilterPermanent("and each creature he or she controls"); + FilterPermanent filter = new FilterPermanent("and each creature that player or that planeswalker’s controller controls"); filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new ControllerIdPredicate(targetPlayer.getId())); List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - for (Permanent permanent: permanents) { + for (Permanent permanent : permanents) { permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true); } return true; diff --git a/Mage.Sets/src/mage/cards/l/LeylineOfLightning.java b/Mage.Sets/src/mage/cards/l/LeylineOfLightning.java index e9be4a4d1d..596bf17551 100644 --- a/Mage.Sets/src/mage/cards/l/LeylineOfLightning.java +++ b/Mage.Sets/src/mage/cards/l/LeylineOfLightning.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.game.Game; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,15 +48,14 @@ import mage.target.TargetPlayer; public class LeylineOfLightning extends CardImpl { public LeylineOfLightning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); // If Leyline of Lightning is in your opening hand, you may begin the game with it on the battlefield. this.addAbility(LeylineAbility.getInstance()); - + // Whenever you cast a spell, you may pay {1}. If you do, Leyline of Lightning deals 1 damage to target player. Ability ability = new SpellCastControllerTriggeredAbility(new LeylineOfLightningEffect(), true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -71,21 +70,21 @@ public class LeylineOfLightning extends CardImpl { } class LeylineOfLightningEffect extends DamageTargetEffect { - + LeylineOfLightningEffect() { super(1); this.staticText = "you may pay {1}. If you do, {this} deals 1 damage to target player."; } - + LeylineOfLightningEffect(final LeylineOfLightningEffect effect) { super(effect); } - + @Override public LeylineOfLightningEffect copy() { return new LeylineOfLightningEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/l/LightningBlast.java b/Mage.Sets/src/mage/cards/l/LightningBlast.java index 5f06367d99..e9bef09298 100644 --- a/Mage.Sets/src/mage/cards/l/LightningBlast.java +++ b/Mage.Sets/src/mage/cards/l/LightningBlast.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,7 +45,7 @@ public class LightningBlast extends CardImpl { // Lightning Blast deals 4 damage to target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public LightningBlast(final LightningBlast card) { diff --git a/Mage.Sets/src/mage/cards/l/LightningBolt.java b/Mage.Sets/src/mage/cards/l/LightningBolt.java index f053bac4a7..4856671061 100644 --- a/Mage.Sets/src/mage/cards/l/LightningBolt.java +++ b/Mage.Sets/src/mage/cards/l/LightningBolt.java @@ -24,8 +24,7 @@ * 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.l; import java.util.UUID; @@ -33,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -42,9 +41,9 @@ import mage.target.common.TargetCreatureOrPlayer; public class LightningBolt extends CardImpl { public LightningBolt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/l/LightningCloud.java b/Mage.Sets/src/mage/cards/l/LightningCloud.java index 07d5034145..a696e4b2cd 100644 --- a/Mage.Sets/src/mage/cards/l/LightningCloud.java +++ b/Mage.Sets/src/mage/cards/l/LightningCloud.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class LightningCloud extends CardImpl { public LightningCloud(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); - // Whenever a player casts a red spell, you may pay {R}. If you do, Lightning Cloud deals 1 damage to target creature or player. + // Whenever a player casts a red spell, you may pay {R}. If you do, Lightning Cloud deals 1 damage to any target. Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(1), new ManaCostsImpl("{R}")), filter, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningCrafter.java b/Mage.Sets/src/mage/cards/l/LightningCrafter.java index 3702258898..7b18190c2a 100644 --- a/Mage.Sets/src/mage/cards/l/LightningCrafter.java +++ b/Mage.Sets/src/mage/cards/l/LightningCrafter.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class LightningCrafter extends CardImpl { // Champion a Goblin or Shaman this.addAbility(new ChampionAbility(this, EnumSet.of(SubType.GOBLIN, SubType.SHAMAN), false)); - // {T}: Lightning Crafter deals 3 damage to target creature or player. + // {T}: Lightning Crafter deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningDiadem.java b/Mage.Sets/src/mage/cards/l/LightningDiadem.java index 0f20e8d40a..e87e16105d 100644 --- a/Mage.Sets/src/mage/cards/l/LightningDiadem.java +++ b/Mage.Sets/src/mage/cards/l/LightningDiadem.java @@ -43,7 +43,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -64,9 +64,9 @@ public class LightningDiadem extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // When Lightning Diadem enters the battlefield, it deals 2 damage to target creature or player. + // When Lightning Diadem enters the battlefield, it deals 2 damage to any target. ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Enchanted creature gets +2/+2. diff --git a/Mage.Sets/src/mage/cards/l/LightningHelix.java b/Mage.Sets/src/mage/cards/l/LightningHelix.java index c16434c8c9..ac086bdf16 100644 --- a/Mage.Sets/src/mage/cards/l/LightningHelix.java +++ b/Mage.Sets/src/mage/cards/l/LightningHelix.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,7 +46,7 @@ public class LightningHelix extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addEffect(new GainLifeEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/l/LightningJavelin.java b/Mage.Sets/src/mage/cards/l/LightningJavelin.java index 8658003274..b48cc3257b 100644 --- a/Mage.Sets/src/mage/cards/l/LightningJavelin.java +++ b/Mage.Sets/src/mage/cards/l/LightningJavelin.java @@ -33,7 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class LightningJavelin extends CardImpl { public LightningJavelin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); - // Lightning Javelin deals 3 damage to target creature or player. + // Lightning Javelin deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Scry 1. this.getSpellAbility().addEffect(new ScryEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/l/LightningProwess.java b/Mage.Sets/src/mage/cards/l/LightningProwess.java index 30a0f4340a..a93cc2e7fd 100644 --- a/Mage.Sets/src/mage/cards/l/LightningProwess.java +++ b/Mage.Sets/src/mage/cards/l/LightningProwess.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -61,10 +61,10 @@ public class LightningProwess extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has haste and "{tap}: This creature deals 1 damage to target creature or player." + // Enchanted creature has haste and "{tap}: This creature deals 1 damage to any target." this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.AURA))); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA))); } diff --git a/Mage.Sets/src/mage/cards/l/LightningRift.java b/Mage.Sets/src/mage/cards/l/LightningRift.java index 126a6de3b0..5f65beabfc 100644 --- a/Mage.Sets/src/mage/cards/l/LightningRift.java +++ b/Mage.Sets/src/mage/cards/l/LightningRift.java @@ -36,7 +36,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class LightningRift extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - // Whenever a player cycles a card, you may pay {1}. If you do, Lightning Rift deals 2 damage to target creature or player. + // Whenever a player cycles a card, you may pay {1}. If you do, Lightning Rift deals 2 damage to any target. Ability ability = new CycleAllTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(2), new GenericManaCost(1)), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningStorm.java b/Mage.Sets/src/mage/cards/l/LightningStorm.java index 0c7c4cd07b..f92a98d28c 100644 --- a/Mage.Sets/src/mage/cards/l/LightningStorm.java +++ b/Mage.Sets/src/mage/cards/l/LightningStorm.java @@ -48,7 +48,7 @@ import mage.filter.common.FilterLandCard; import mage.game.Game; import mage.game.stack.Spell; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,11 +59,11 @@ public class LightningStorm extends CardImpl { public LightningStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); - // Lightning Storm deals X damage to target creature or player, where X is 3 plus the number of charge counters on it. + // Lightning Storm deals X damage to any target, where X is 3 plus the number of charge counters on it. Effect effect = new DamageTargetEffect(new LightningStormCountCondition(CounterType.CHARGE)); - effect.setText("{this} deals X damage to target creature or player, where X is 3 plus the number of charge counters on it"); + effect.setText("{this} deals X damage to any target, where X is 3 plus the number of charge counters on it"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Discard a land card: Put two charge counters on Lightning Storm. You may choose a new target for it. Any player may activate this ability but only if Lightning Storm is on the stack. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.STACK, new LightningStormAddCounterEffect(), diff --git a/Mage.Sets/src/mage/cards/l/LightningStrike.java b/Mage.Sets/src/mage/cards/l/LightningStrike.java index 8ae559c5f9..c95bfc8005 100644 --- a/Mage.Sets/src/mage/cards/l/LightningStrike.java +++ b/Mage.Sets/src/mage/cards/l/LightningStrike.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class LightningStrike extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Lightning Strike deals 3 damage to target creature or player. + // Lightning Strike deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/l/LightningSurge.java b/Mage.Sets/src/mage/cards/l/LightningSurge.java index f97cfd739d..0c80ac11a0 100644 --- a/Mage.Sets/src/mage/cards/l/LightningSurge.java +++ b/Mage.Sets/src/mage/cards/l/LightningSurge.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,17 +47,17 @@ import mage.target.common.TargetCreatureOrPlayer; public class LightningSurge extends CardImpl { public LightningSurge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - // Lightning Surge deals 4 damage to target creature or player. + // Lightning Surge deals 4 damage to any target. // Threshold - If seven or more cards are in your graveyard, instead Lightning Surge deals 6 damage to that creature or player and the damage can't be prevented. - Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(6, false), - new DamageTargetEffect(4), - new CardsInControllerGraveCondition(7), - "{this} deals 4 damage to target creature or player.<br/><br/><i>Threshold</i> - {this} deals 6 damage to that creature or player and the damage can't be prevented instead if seven or more cards are in your graveyard."); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(6, false), + new DamageTargetEffect(4), + new CardsInControllerGraveCondition(7), + "{this} deals 4 damage to any target.<br/><br/><i>Threshold</i> - {this} deals 6 damage to that permanent or player and the damage can't be prevented instead if seven or more cards are in your graveyard."); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(effect); - + // Flashback {5}{R}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{R}{R}"), TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/l/LightningVolley.java b/Mage.Sets/src/mage/cards/l/LightningVolley.java index b4ff6a28c4..4dc55953eb 100644 --- a/Mage.Sets/src/mage/cards/l/LightningVolley.java +++ b/Mage.Sets/src/mage/cards/l/LightningVolley.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,11 +52,11 @@ public class LightningVolley extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - // Until end of turn, creatures you control gain "{T}: This creature deals 1 damage to target creature or player." + // Until end of turn, creatures you control gain "{T}: This creature deals 1 damage to any target." Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - grantedAbility.addTarget(new TargetCreatureOrPlayer()); + grantedAbility.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityControlledEffect(grantedAbility, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES); - effect.setText("Until end of turn, creatures you control gain \"{T}: This creature deals 1 damage to target creature or player.\""); + effect.setText("Until end of turn, creatures you control gain \"{T}: This creature deals 1 damage to any target.\""); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/l/LivewireLash.java b/Mage.Sets/src/mage/cards/l/LivewireLash.java index 71c501cc66..8b66b737fc 100644 --- a/Mage.Sets/src/mage/cards/l/LivewireLash.java +++ b/Mage.Sets/src/mage/cards/l/LivewireLash.java @@ -46,7 +46,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,7 +60,7 @@ public class LivewireLash extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); LivewireLashAbility ability = new LivewireLashAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT))); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); } @@ -107,6 +107,6 @@ class LivewireLashAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever this creature becomes the target of a spell, this creature deals 2 damage to target creature or player."; + return "Whenever this creature becomes the target of a spell, this creature deals 2 damage to any target."; } } diff --git a/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java b/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java index 705e751816..28d0309344 100644 --- a/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java +++ b/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class LoxodonAnchorite extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/Lunge.java b/Mage.Sets/src/mage/cards/l/Lunge.java index f602f212be..cad56254bb 100644 --- a/Mage.Sets/src/mage/cards/l/Lunge.java +++ b/Mage.Sets/src/mage/cards/l/Lunge.java @@ -33,8 +33,8 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.targetpointer.SecondTargetPointer; /** @@ -54,7 +54,7 @@ public class Lunge extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); effect.setText("and 2 damage to target player"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public Lunge(final Lunge card) { diff --git a/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java b/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java index ee32afa6e8..21dbc76413 100644 --- a/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java +++ b/Mage.Sets/src/mage/cards/l/LyzoldaTheBloodWitch.java @@ -52,7 +52,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -77,11 +77,11 @@ public class LyzoldaTheBloodWitch extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(1); - // {2}, Sacrifice a creature: Lyzolda, the Blood Witch deals 2 damage to target creature or player if the sacrificed creature was red. Draw a card if the sacrificed creature was black. + // {2}, Sacrifice a creature: Lyzolda, the Blood Witch deals 2 damage to any target if the sacrificed creature was red. Draw a card if the sacrificed creature was black. Effect effect = new ConditionalOneShotEffect( new DamageTargetEffect(2), new SacrificedWasCondition(redFilter), - "{source} deals 2 damage to target creature or player if the sacrificed creature was red"); + "{source} deals 2 damage to any target if the sacrificed creature was red"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); effect = new ConditionalOneShotEffect( new DrawCardSourceControllerEffect(1), @@ -89,7 +89,7 @@ public class LyzoldaTheBloodWitch extends CardImpl { "Draw a card if the sacrificed creature was black"); ability.addEffect(effect); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MageIlVec.java b/Mage.Sets/src/mage/cards/m/MageIlVec.java index aa9a1571c8..51896df1a0 100644 --- a/Mage.Sets/src/mage/cards/m/MageIlVec.java +++ b/Mage.Sets/src/mage/cards/m/MageIlVec.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class MageIlVec extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {tap}, Discard a card at random: Mage il-Vec deals 1 damage to target creature or player. + // {tap}, Discard a card at random: Mage il-Vec deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MageSlayer.java b/Mage.Sets/src/mage/cards/m/MageSlayer.java index 5846113861..1d4e1c3a7c 100644 --- a/Mage.Sets/src/mage/cards/m/MageSlayer.java +++ b/Mage.Sets/src/mage/cards/m/MageSlayer.java @@ -40,7 +40,6 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; /** @@ -58,7 +57,6 @@ public class MageSlayer extends CardImpl { // Equip {3} this.addAbility(new EquipAbility(Outcome.Benefit, new GenericManaCost(3), new TargetControlledCreaturePermanent())); - } public MageSlayer(final MageSlayer card) { @@ -75,7 +73,7 @@ class MageSlayerEffect extends OneShotEffect { public MageSlayerEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to its power to defending player"; + staticText = "it deals damage equal to the player or planeswalker it’s attacking"; } public MageSlayerEffect(final MageSlayerEffect effect) { @@ -92,13 +90,11 @@ class MageSlayerEffect extends OneShotEffect { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { int power = game.getPermanent(equipment.getAttachedTo()).getPower().getValue(); - UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(equipment.getAttachedTo(), game); - if (power > 0 && defendingPlayerId != null) { - Player defendingPlayer = game.getPlayer(defendingPlayerId); - + UUID defenderId = game.getCombat().getDefenderId(equipment.getAttachedTo()); + if (power > 0 && defenderId != null) { UUID sourceId = (UUID) this.getValue("sourceId"); - if (sourceId != null && defendingPlayer != null) { - defendingPlayer.damage(power, source.getSourceId(), game, false, true); + if (sourceId != null) { + game.damagePlayerOrPlaneswalker(defenderId, power, source.getSourceId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/cards/m/MagmaBurst.java b/Mage.Sets/src/mage/cards/m/MagmaBurst.java index 83512218bd..e386eef851 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaBurst.java +++ b/Mage.Sets/src/mage/cards/m/MagmaBurst.java @@ -40,33 +40,33 @@ import mage.constants.CardType; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * * @author LoneFox - + * */ public class MagmaBurst extends CardImpl { private final UUID originalId; public MagmaBurst(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); // Kicker-Sacrifice two lands. this.addAbility(new KickerAbility(new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledLandPermanent("two lands"), true)))); - // Magma Burst deals 3 damage to target creature or player. If Magma Burst was kicked, it deals 3 damage to another target creature or player. + // Magma Burst deals 3 damage to any target. If Magma Burst was kicked, it deals 3 damage to another any target. Effect effect = new DamageTargetEffect(3); - effect.setText("{this} deals 3 damage to target creature or player. If {this} was kicked, it deals 3 damage to another target creature or player."); + effect.setText("{this} deals 3 damage to any target. If {this} was kicked, it deals 3 damage to another target."); this.getSpellAbility().addEffect(effect); originalId = this.getSpellAbility().getOriginalId(); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability.getOriginalId().equals(originalId)) { - ability.addTarget(new TargetCreatureOrPlayer(KickedCondition.instance.apply(game, ability) ? 2 : 1)); + if (ability.getOriginalId().equals(originalId)) { + ability.addTarget(new TargetAnyTarget(KickedCondition.instance.apply(game, ability) ? 2 : 1)); } } diff --git a/Mage.Sets/src/mage/cards/m/MagmaJet.java b/Mage.Sets/src/mage/cards/m/MagmaJet.java index 4ba6971dc8..90d6e5a1ea 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaJet.java +++ b/Mage.Sets/src/mage/cards/m/MagmaJet.java @@ -33,7 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class MagmaJet extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Magma Jet deals 2 damage to target creature or player. + // Magma Jet deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Scry 2. this.getSpellAbility().addEffect(new ScryEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaMine.java b/Mage.Sets/src/mage/cards/m/MagmaMine.java index c1a863b35c..1704cd2fc7 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaMine.java +++ b/Mage.Sets/src/mage/cards/m/MagmaMine.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,10 +57,10 @@ public class MagmaMine extends CardImpl { new AddCountersSourceEffect(CounterType.PRESSURE.createInstance(), true), new GenericManaCost(4))); - // {tap}, Sacrifice Magma Mine: Magma Mine deals damage equal to the number of pressure counters on it to target creature or player. + // {tap}, Sacrifice Magma Mine: Magma Mine deals damage equal to the number of pressure counters on it to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.PRESSURE)), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaticForce.java b/Mage.Sets/src/mage/cards/m/MagmaticForce.java index b017368f30..bf05ff7fc7 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaticForce.java +++ b/Mage.Sets/src/mage/cards/m/MagmaticForce.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class MagmaticForce extends CardImpl { this.power = new MageInt(7); this.toughness = new MageInt(7); - // At the beginning of each upkeep, Magmatic Force deals 3 damage to target creature or player. + // At the beginning of each upkeep, Magmatic Force deals 3 damage to any target. Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.ANY, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/Magmaw.java b/Mage.Sets/src/mage/cards/m/Magmaw.java index a4a9ed2622..865025bd8c 100644 --- a/Mage.Sets/src/mage/cards/m/Magmaw.java +++ b/Mage.Sets/src/mage/cards/m/Magmaw.java @@ -42,7 +42,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,7 +65,7 @@ public class Magmaw extends CardImpl { SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1)); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java index 2ec8ede24a..346c2b418e 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java @@ -48,7 +48,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,11 +63,11 @@ public class MagusOfTheScroll extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {3}, {tap}: Name a card. Reveal a card at random from your hand. If it's the named card, Magus of the Scroll deals 2 damage to target creature or player. + // {3}, {tap}: Name a card. Reveal a card at random from your hand. If it's the named card, Magus of the Scroll deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); ability.addEffect(new MagusOfTheScrollEffect()); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -85,7 +85,7 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect() { super(Outcome.Neutral); - staticText = ", then reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; + staticText = ", then reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to any target"; } public MagusOfTheScrollEffect(final MagusOfTheScrollEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MakeMischief.java b/Mage.Sets/src/mage/cards/m/MakeMischief.java index 87fadc5606..05da556bde 100644 --- a/Mage.Sets/src/mage/cards/m/MakeMischief.java +++ b/Mage.Sets/src/mage/cards/m/MakeMischief.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.game.permanent.token.DevilToken; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,10 +45,10 @@ public class MakeMischief extends CardImpl { public MakeMischief(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - // Make Mischief deals 1 damage to target creature or player. Create a 1/1 red Devil creature token. - // It has "When this creature dies, it deals 1 damage to target creature or player." + // Make Mischief deals 1 damage to any target. Create a 1/1 red Devil creature token. + // It has "When this creature dies, it deals 1 damage to any target." this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new CreateTokenEffect(new DevilToken())); } diff --git a/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java index fa00aa89c2..bd98c7f775 100644 --- a/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java +++ b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -53,13 +53,13 @@ public class MakeshiftMunitions extends CardImpl { public MakeshiftMunitions(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); - // {1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to target creature or player. + // {1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to any target. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE)) ); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new GenericManaCost(1)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java index c6371855c5..9afcd0584d 100644 --- a/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java +++ b/Mage.Sets/src/mage/cards/m/ManticoreOfTheGauntlet.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; import mage.target.targetpointer.FirstTargetPointer; import mage.target.targetpointer.SecondTargetPointer; @@ -64,14 +64,14 @@ public class ManticoreOfTheGauntlet extends CardImpl { counters.setTargetPointer(new FirstTargetPointer()); Effect damage = new DamageTargetEffect(new StaticValue(3), true, "", true); - damage.setText("{this} deals 3 damage to target opponent."); + damage.setText("{this} deals 3 damage to target opponent or planeswalker."); damage.setTargetPointer(new SecondTargetPointer()); Ability ability = new EntersBattlefieldTriggeredAbility(counters); ability.addEffect(damage); ability.addTarget(new TargetControlledCreaturePermanent()); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java index db1fc6326d..83919abce5 100644 --- a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java +++ b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java @@ -59,7 +59,7 @@ import mage.game.permanent.token.MarathWillOfTheWildElementalToken; import mage.game.permanent.token.TokenImpl; import mage.game.permanent.token.Token; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -89,10 +89,10 @@ public class MarathWillOfTheWild extends CardImpl { ability.addCost(new MarathWillOfTheWildRemoveCountersCost()); ability.addTarget(new TargetCreaturePermanent()); - // or Marath deals X damage to target creature or player; + // or Marath deals X damage to any target; Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(new ManacostVariableValue())); - mode.getTargets().add(new TargetCreatureOrPlayer()); + mode.getTargets().add(new TargetAnyTarget()); ability.addMode(mode); // or create an X/X green Elemental creature token. diff --git a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java index 78291c4edd..bce976a76b 100644 --- a/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java +++ b/Mage.Sets/src/mage/cards/m/MarduHeartPiercer.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -55,10 +55,10 @@ public class MarduHeartPiercer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // <em>Raid</em> - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to target creature or player. + // <em>Raid</em> - 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, - "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player."); - ability.addTarget(new TargetCreatureOrPlayer()); + "<i>Raid</i> - 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/Martyrdom.java b/Mage.Sets/src/mage/cards/m/Martyrdom.java index a1c38fa946..fb0cf6c682 100644 --- a/Mage.Sets/src/mage/cards/m/Martyrdom.java +++ b/Mage.Sets/src/mage/cards/m/Martyrdom.java @@ -28,16 +28,12 @@ package mage.cards.m; import java.util.UUID; -import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; import mage.abilities.effects.RedirectionEffect; -import mage.abilities.effects.common.RedirectDamageFromSourceToTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -52,9 +48,8 @@ import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,9 +58,9 @@ import mage.target.common.TargetCreatureOrPlayer; public class Martyrdom extends CardImpl { public Martyrdom(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}{W}"); - // Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead." Only you may activate this ability. + // Until end of turn, target creature you control gains "{0}: The next 1 damage that would be dealt to any target this turn is dealt to this creature instead." Only you may activate this ability. this.getSpellAbility().addEffect(new MartyrdomGainAbilityTargetEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); } @@ -84,9 +79,9 @@ class MartyrdomGainAbilityTargetEffect extends ContinuousEffectImpl { public MartyrdomGainAbilityTargetEffect() { super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - this.staticText = "Until end of turn, target creature you control gains \"{0}: The next 1 damage that would be dealt to target creature or player this turn is dealt to this creature instead.\" Only you may activate this ability"; + this.staticText = "Until end of turn, target creature you control gains \"{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to this creature instead.\" Only you may activate this ability"; } - + public MartyrdomGainAbilityTargetEffect(final MartyrdomGainAbilityTargetEffect effect) { super(effect); } @@ -110,13 +105,13 @@ class MartyrdomGainAbilityTargetEffect extends ContinuousEffectImpl { } class MartyrdomActivatedAbility extends ActivatedAbilityImpl { - + private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); private UUID caster; - + public MartyrdomActivatedAbility(UUID caster) { super(Zone.BATTLEFIELD, new MartyrdomRedirectDamageTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(0)); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); this.caster = caster; } @@ -150,7 +145,7 @@ class MartyrdomActivatedAbility extends ActivatedAbilityImpl { @Override public String getRule() { - return "{0}: The next 1 damage that would be dealt to target creature or player this turn is dealt to {this} instead."; + return "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to {this} instead."; } } @@ -160,7 +155,7 @@ class MartyrdomRedirectDamageTargetEffect extends RedirectionEffect { public MartyrdomRedirectDamageTargetEffect(Duration duration, int amount) { super(duration, amount, true); - staticText = "The next " + amount + " damage that would be dealt to target creature or player this turn is dealt to {this} instead"; + staticText = "The next " + amount + " damage that would be dealt to target creature, planeswalker, or player this turn is dealt to {this} instead"; } public MartyrdomRedirectDamageTargetEffect(final MartyrdomRedirectDamageTargetEffect effect) { @@ -179,7 +174,7 @@ class MartyrdomRedirectDamageTargetEffect extends RedirectionEffect { if (filter.match(permanent, permanent.getId(), permanent.getControllerId(), game)) { if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { if (event.getTargetId() != null) { - TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + TargetAnyTarget target = new TargetAnyTarget(); target.add(source.getSourceId(), game); redirectTarget = target; return true; diff --git a/Mage.Sets/src/mage/cards/m/MartyrsCause.java b/Mage.Sets/src/mage/cards/m/MartyrsCause.java index f838886367..24e166b007 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrsCause.java +++ b/Mage.Sets/src/mage/cards/m/MartyrsCause.java @@ -39,7 +39,7 @@ import mage.constants.Duration; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,10 +50,10 @@ public class MartyrsCause extends CardImpl { public MartyrsCause(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - // Sacrifice a creature: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. + // Sacrifice a creature: The next time a source of your choice would deal damage to any target this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToTargetEffect(Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MassiveRaid.java b/Mage.Sets/src/mage/cards/m/MassiveRaid.java index 3f7478c4c2..0d865fc1df 100644 --- a/Mage.Sets/src/mage/cards/m/MassiveRaid.java +++ b/Mage.Sets/src/mage/cards/m/MassiveRaid.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class MassiveRaid extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); - // Massive Raid deals damage to target creature or player equal to the number of creatures you control. + // Massive Raid deals damage to any target equal to the number of creatures you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public MassiveRaid(final MassiveRaid card) { diff --git a/Mage.Sets/src/mage/cards/m/MasterApothecary.java b/Mage.Sets/src/mage/cards/m/MasterApothecary.java index d967abe643..c8ecf3fb9c 100644 --- a/Mage.Sets/src/mage/cards/m/MasterApothecary.java +++ b/Mage.Sets/src/mage/cards/m/MasterApothecary.java @@ -44,7 +44,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,11 +67,11 @@ public class MasterApothecary extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // Tap an untapped Cleric you control: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // Tap an untapped Cleric you control: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MasterHealer.java b/Mage.Sets/src/mage/cards/m/MasterHealer.java index 7d9aaa733c..dcd71c3557 100644 --- a/Mage.Sets/src/mage/cards/m/MasterHealer.java +++ b/Mage.Sets/src/mage/cards/m/MasterHealer.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class MasterHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(4); - // {tap}: Prevent the next 4 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 4 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 4), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MasterTheWay.java b/Mage.Sets/src/mage/cards/m/MasterTheWay.java index 6ee51f00b5..93573959a5 100644 --- a/Mage.Sets/src/mage/cards/m/MasterTheWay.java +++ b/Mage.Sets/src/mage/cards/m/MasterTheWay.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,12 +47,12 @@ public class MasterTheWay extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}{R}"); - // Draw a card. Master the Way deals damage to target creature or player equal to the number of cards in your hand. + // Draw a card. Master the Way deals damage to any target equal to the number of cards in your hand. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); - effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand"); + effect.setText("{this} deals damage to any target equal to the number of cards in your hand"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public MasterTheWay(final MasterTheWay card) { diff --git a/Mage.Sets/src/mage/cards/m/Mawcor.java b/Mage.Sets/src/mage/cards/m/Mawcor.java index 939f6d7291..3c4a8311a1 100644 --- a/Mage.Sets/src/mage/cards/m/Mawcor.java +++ b/Mage.Sets/src/mage/cards/m/Mawcor.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class Mawcor extends CardImpl { this.toughness = new MageInt(3); this.addAbility(FlyingAbility.getInstance()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MendingHands.java b/Mage.Sets/src/mage/cards/m/MendingHands.java index 39d187b15e..bc73ccb652 100644 --- a/Mage.Sets/src/mage/cards/m/MendingHands.java +++ b/Mage.Sets/src/mage/cards/m/MendingHands.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class MendingHands extends CardImpl { public MendingHands(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); - // Prevent the next 4 damage that would be dealt to target creature or player this turn. + // Prevent the next 4 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public MendingHands(final MendingHands card) { diff --git a/Mage.Sets/src/mage/cards/m/MeteorBlast.java b/Mage.Sets/src/mage/cards/m/MeteorBlast.java index f872e2e6fd..51309b0224 100644 --- a/Mage.Sets/src/mage/cards/m/MeteorBlast.java +++ b/Mage.Sets/src/mage/cards/m/MeteorBlast.java @@ -38,7 +38,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,7 +61,7 @@ public class MeteorBlast extends CardImpl { public void adjustTargets(Ability ability, Game game) { int xValue = ability.getManaCostsToPay().getX(); if (xValue > 0) { - Target target = new TargetCreatureOrPlayer(xValue); + Target target = new TargetAnyTarget(xValue); ability.addTarget(target); } } diff --git a/Mage.Sets/src/mage/cards/m/MeteorShower.java b/Mage.Sets/src/mage/cards/m/MeteorShower.java index 37ab91d1f0..a692161140 100644 --- a/Mage.Sets/src/mage/cards/m/MeteorShower.java +++ b/Mage.Sets/src/mage/cards/m/MeteorShower.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -49,7 +49,7 @@ public class MeteorShower extends CardImpl { // Meteor Shower deals X plus 1 damage divided as you choose among any number of target creatures and/or players. DynamicValue xValue = new IntPlusDynamicValue(1, new ManacostVariableValue()); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); } public MeteorShower(final MeteorShower card) { diff --git a/Mage.Sets/src/mage/cards/m/MeteorStorm.java b/Mage.Sets/src/mage/cards/m/MeteorStorm.java index 823da2437d..04fcaeed3a 100644 --- a/Mage.Sets/src/mage/cards/m/MeteorStorm.java +++ b/Mage.Sets/src/mage/cards/m/MeteorStorm.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,10 +51,10 @@ public class MeteorStorm extends CardImpl { public MeteorStorm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{G}"); - // {2}{R}{G}, Discard two cards at random: Meteor Storm deals 4 damage to target creature or player. + // {2}{R}{G}, Discard two cards at random: Meteor Storm deals 4 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{2}{R}{G}")); ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, new FilterCard("two cards at random")), true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/Meteorite.java b/Mage.Sets/src/mage/cards/m/Meteorite.java index 227ea2cb55..de2eae4298 100644 --- a/Mage.Sets/src/mage/cards/m/Meteorite.java +++ b/Mage.Sets/src/mage/cards/m/Meteorite.java @@ -35,7 +35,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class Meteorite extends CardImpl { public Meteorite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); - // When Meteorite enters the battlefield, it deals 2 damage to target creature or player. + // When Meteorite enters the battlefield, it deals 2 damage to any target. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {T}: Add one mana of any color to your mana pool. diff --git a/Mage.Sets/src/mage/cards/m/MilitantMonk.java b/Mage.Sets/src/mage/cards/m/MilitantMonk.java index a302c41e16..1f98a9396e 100644 --- a/Mage.Sets/src/mage/cards/m/MilitantMonk.java +++ b/Mage.Sets/src/mage/cards/m/MilitantMonk.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class MilitantMonk extends CardImpl { // Vigilance this.addAbility(VigilanceAbility.getInstance()); - // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {T}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MobJustice.java b/Mage.Sets/src/mage/cards/m/MobJustice.java index d7adee5672..c733e5397b 100644 --- a/Mage.Sets/src/mage/cards/m/MobJustice.java +++ b/Mage.Sets/src/mage/cards/m/MobJustice.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,13 +44,13 @@ import mage.target.TargetPlayer; public class MobJustice extends CardImpl { public MobJustice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); // Mob Justice deals damage to target player equal to the number of creatures you control. Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); - effect.setText("{this} deals damage to target player equal to the number of creatures you control"); + effect.setText("{this} deals damage to target player or planeswalker equal to the number of creatures you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public MobJustice(final MobJustice card) { diff --git a/Mage.Sets/src/mage/cards/m/MoggFanatic.java b/Mage.Sets/src/mage/cards/m/MoggFanatic.java index 0f19a42bac..34b68e41d6 100644 --- a/Mage.Sets/src/mage/cards/m/MoggFanatic.java +++ b/Mage.Sets/src/mage/cards/m/MoggFanatic.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class MoggFanatic extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player. + // Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoggManiac.java b/Mage.Sets/src/mage/cards/m/MoggManiac.java index 73423646f3..6a7e790fe1 100644 --- a/Mage.Sets/src/mage/cards/m/MoggManiac.java +++ b/Mage.Sets/src/mage/cards/m/MoggManiac.java @@ -39,8 +39,7 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; -import mage.players.Player; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -56,7 +55,7 @@ public class MoggManiac extends CardImpl { // Whenever Mogg Maniac is dealt damage, it deals that much damage to target opponent. Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new MoggManiacDealDamageEffect(), false, false, true); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } @@ -74,7 +73,7 @@ class MoggManiacDealDamageEffect extends OneShotEffect { public MoggManiacDealDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals that much damage to target opponent"; + this.staticText = "it deals that much damage to target opponent or planeswalker"; } public MoggManiacDealDamageEffect(final MoggManiacDealDamageEffect effect) { @@ -90,11 +89,8 @@ class MoggManiacDealDamageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = (Integer) getValue("damage"); if (amount > 0) { - Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); - if (opponent != null) { - opponent.damage(amount, source.getSourceId(), game, false, true); - return true; - } + game.damagePlayerOrPlaneswalker(targetPointer.getFirst(game, source), amount, source.getSourceId(), game, false, true); + return true; } return false; } diff --git a/Mage.Sets/src/mage/cards/m/MoltenHydra.java b/Mage.Sets/src/mage/cards/m/MoltenHydra.java index 20c4b563db..8ff157ed21 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenHydra.java +++ b/Mage.Sets/src/mage/cards/m/MoltenHydra.java @@ -48,7 +48,7 @@ import mage.counters.Counter; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,10 +67,10 @@ public class MoltenHydra extends CardImpl { // {1}{R}{R}: Put a +1/+1 counter on Molten Hydra. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl("{1}{R}{R}"))); - // {tap}, Remove all +1/+1 counters from Molten Hydra: Molten Hydra deals damage to target creature or player equal to the number of +1/+1 counters removed this way. + // {tap}, Remove all +1/+1 counters from Molten Hydra: Molten Hydra deals damage to any target equal to the number of +1/+1 counters removed this way. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new MotltenHydraDynamicValue()), new TapSourceCost()); ability.addCost(new RemoveAllCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoltenNursery.java b/Mage.Sets/src/mage/cards/m/MoltenNursery.java index a47d354a37..c991f71ecc 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenNursery.java +++ b/Mage.Sets/src/mage/cards/m/MoltenNursery.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorlessPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class MoltenNursery extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - // Whenever you cast a colorless spell, Molten Nursery deals 1 damage to target creature or player. + // Whenever you cast a colorless spell, Molten Nursery deals 1 damage to any target. Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), filter, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java b/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java index 7260a33ff3..f5f846e9e7 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java +++ b/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java @@ -50,7 +50,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -66,10 +66,10 @@ public class MoltenTailMasticore extends CardImpl { // At the beginning of your upkeep, sacrifice Molten-Tail Masticore unless you discard a card. this.addAbility(new MoltenTailMasticoreAbility()); - // {4}, Exile a creature card from your graveyard: Molten-Tail Masticore deals 4 damage to target creature or player. + // {4}, Exile a creature card from your graveyard: Molten-Tail Masticore deals 4 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new GenericManaCost(4)); ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard(new FilterCreatureCard("a creature card from your graveyard")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {2}: Regenerate Molten-Tail Masticore. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/m/MoltenVortex.java b/Mage.Sets/src/mage/cards/m/MoltenVortex.java index 1b655b9258..caa6795fee 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenVortex.java +++ b/Mage.Sets/src/mage/cards/m/MoltenVortex.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,10 +50,10 @@ public class MoltenVortex extends CardImpl { public MoltenVortex(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - // {R}, Discard a land card: Molten Vortex deals 2 damage to target creature or player. + // {R}, Discard a land card: Molten Vortex deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); ability.addCost(new ManaCostsImpl("{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoongloveExtract.java b/Mage.Sets/src/mage/cards/m/MoongloveExtract.java index b70b4d377e..e0eb06c8c8 100644 --- a/Mage.Sets/src/mage/cards/m/MoongloveExtract.java +++ b/Mage.Sets/src/mage/cards/m/MoongloveExtract.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class MoongloveExtract extends CardImpl { public MoongloveExtract(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - // Sacrifice Moonglove Extract: Moonglove Extract deals 2 damage to target creature or player. + // Sacrifice Moonglove Extract: Moonglove Extract deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MorbidHunger.java b/Mage.Sets/src/mage/cards/m/MorbidHunger.java index 9d2b555dd5..c4e0ad3fbb 100644 --- a/Mage.Sets/src/mage/cards/m/MorbidHunger.java +++ b/Mage.Sets/src/mage/cards/m/MorbidHunger.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class MorbidHunger extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}"); - // Morbid Hunger deals 3 damage to target creature or player. You gain 3 life. + // Morbid Hunger deals 3 damage to any target. You gain 3 life. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new GainLifeEffect(3)); // Flashback {7}{B}{B} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{7}{B}{B}"), TimingRule.SORCERY)); diff --git a/Mage.Sets/src/mage/cards/m/MorgueBurst.java b/Mage.Sets/src/mage/cards/m/MorgueBurst.java index 9e2e7b20da..94ca706440 100644 --- a/Mage.Sets/src/mage/cards/m/MorgueBurst.java +++ b/Mage.Sets/src/mage/cards/m/MorgueBurst.java @@ -42,7 +42,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,10 +53,10 @@ public class MorgueBurst extends CardImpl { public MorgueBurst(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{R}"); - // Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way. + // Return target creature card from your graveyard to your hand. Morgue Burst deals damage to any target equal to the power of the card returned this way. this.getSpellAbility().addEffect(new MorgueBurstEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public MorgueBurst(final MorgueBurst card) { @@ -110,7 +110,7 @@ class MorgueBurstEffect extends OneShotEffect { @Override public String getText(Mode mode) { StringBuilder sb = new StringBuilder(); - sb.append("Return target creature card from your graveyard to your hand. Morgue Burst deals damage to target creature or player equal to the power of the card returned this way"); + sb.append("Return target creature card from your graveyard to your hand. Morgue Burst deals damage to any target equal to the power of the card returned this way"); return sb.toString(); } } diff --git a/Mage.Sets/src/mage/cards/m/Mortarpod.java b/Mage.Sets/src/mage/cards/m/Mortarpod.java index b83c2f3ff8..378e892742 100644 --- a/Mage.Sets/src/mage/cards/m/Mortarpod.java +++ b/Mage.Sets/src/mage/cards/m/Mortarpod.java @@ -46,7 +46,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,14 +61,14 @@ public class Mortarpod extends CardImpl { // Living weapon (When this Equipment enters the battlefield, create a 0/0 black Germ creature token, then attach this to it.) this.addAbility(new LivingWeaponAbility()); - // Equipped creature gets +0/+1 and has "Sacrifice this creature: This creature deals 1 damage to target creature or player." + // Equipped creature gets +0/+1 and has "Sacrifice this creature: This creature deals 1 damage to any target." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 1)); SimpleActivatedAbility abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - abilityToGain.addTarget(new TargetCreatureOrPlayer()); + abilityToGain.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.EQUIPMENT); - effect.setText("and has \"Sacrifice this creature: This creature deals 1 damage to target creature or player.\""); + effect.setText("and has \"Sacrifice this creature: This creature deals 1 damage to any target.\""); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java index 6b1e5d852c..093b1ba7a6 100644 --- a/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java +++ b/Mage.Sets/src/mage/cards/m/MudbuttonTorchrunner.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,9 +51,9 @@ public class MudbuttonTorchrunner extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // When Mudbutton Torchrunner dies, it deals 3 damage to target creature or player. + // When Mudbutton Torchrunner dies, it deals 3 damage to any target. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MurderousRedcap.java b/Mage.Sets/src/mage/cards/m/MurderousRedcap.java index 0f34f234d8..d3a21b57ae 100644 --- a/Mage.Sets/src/mage/cards/m/MurderousRedcap.java +++ b/Mage.Sets/src/mage/cards/m/MurderousRedcap.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class MurderousRedcap extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. + // When Murderous Redcap enters the battlefield, it deals damage equal to its power to any target. Ability ability = new EntersBattlefieldTriggeredAbility(new MurderousRedcapEffect()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Persist this.addAbility(new PersistAbility()); @@ -80,7 +80,7 @@ class MurderousRedcapEffect extends OneShotEffect { public MurderousRedcapEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to its power to target creature or player"; + staticText = "it deals damage equal to its power to any target"; } public MurderousRedcapEffect(final MurderousRedcapEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java index 03a8a691cc..42e4002f2e 100644 --- a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java +++ b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java @@ -33,7 +33,7 @@ import java.util.Map; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -44,16 +44,18 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.game.Game; +import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.MyrToken; import mage.players.Player; import mage.target.TargetPermanent; -import mage.watchers.common.CreatureAttackedWhichPlayerWatcher; +import mage.target.targetpointer.FixedTarget; /** * @@ -72,7 +74,7 @@ public class MyrBattlesphere extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MyrToken(), 4), false)); // Whenever Myr Battlesphere attacks, you may tap X untapped Myr you control. If you do, Myr Battlesphere gets +X/+0 until end of turn and deals X damage to defending player. - this.addAbility(new AttacksTriggeredAbility(new MyrBattlesphereEffect(), true), new CreatureAttackedWhichPlayerWatcher()); + this.addAbility(new MyrBattlesphereTriggeredAbility()); } @@ -87,6 +89,43 @@ public class MyrBattlesphere extends CardImpl { } +class MyrBattlesphereTriggeredAbility extends TriggeredAbilityImpl { + + public MyrBattlesphereTriggeredAbility() { + super(Zone.BATTLEFIELD, new MyrBattlesphereEffect(), true); + } + + public MyrBattlesphereTriggeredAbility(final MyrBattlesphereTriggeredAbility ability) { + super(ability); + } + + @Override + public MyrBattlesphereTriggeredAbility copy() { + return new MyrBattlesphereTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ATTACKER_DECLARED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent source = game.getPermanent(event.getSourceId()); + if (source != null && source.getControllerId().equals(controllerId)) { + UUID defenderId = game.getCombat().getDefenderId(event.getSourceId()); + this.getEffects().get(0).setTargetPointer(new FixedTarget(defenderId)); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature you control attacks, you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it’s attacking."; + } +} + class MyrBattlesphereEffect extends OneShotEffect { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Myr you control"); @@ -98,7 +137,7 @@ class MyrBattlesphereEffect extends OneShotEffect { public MyrBattlesphereEffect() { super(Outcome.Damage); - staticText = "tap X untapped Myr you control. If you do, {source} gets +X/+0 until end of turn and deals X damage to defending player"; + staticText = "you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it’s attacking."; } public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) { @@ -109,46 +148,36 @@ class MyrBattlesphereEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - CreatureAttackedWhichPlayerWatcher watcher = (CreatureAttackedWhichPlayerWatcher) game.getState().getWatchers().get(CreatureAttackedWhichPlayerWatcher.class.getSimpleName()); - if (watcher != null) { - // even if the Myr Battlesphere is off the battlefield, it still does damage to the defender - Permanent myr = game.getPermanentOrLKIBattlefield(source.getSourceId()); - UUID defenderId = watcher.getPlayerAttackedThisTurnByCreature(myr.getId()); - Player defender = game.getPlayer(defenderId); - int tappedAmount = 0; - TargetPermanent target = new TargetPermanent(0, 1, filter, false); - while (true && controller.canRespond()) { - target.clearChosen(); - if (target.canChoose(source.getControllerId(), game)) { - Map<String, Serializable> options = new HashMap<>(); - options.put("UI.right.btn.text", "Myr tapping complete"); - controller.choose(outcome, target, source.getControllerId(), game, options); - if (!target.getTargets().isEmpty()) { - UUID creature = target.getFirstTarget(); - if (creature != null) { - game.getPermanent(creature).tap(game); - tappedAmount++; - } - } else { - break; + Permanent myr = game.getPermanentOrLKIBattlefield(source.getSourceId()); + int tappedAmount = 0; + TargetPermanent target = new TargetPermanent(0, 1, filter, false); + while (true && controller.canRespond()) { + target.clearChosen(); + if (target.canChoose(source.getControllerId(), game)) { + Map<String, Serializable> options = new HashMap<>(); + options.put("UI.right.btn.text", "Myr tapping complete"); + controller.choose(outcome, target, source.getControllerId(), game, options); + if (!target.getTargets().isEmpty()) { + UUID creature = target.getFirstTarget(); + if (creature != null) { + game.getPermanent(creature).tap(game); + tappedAmount++; } } else { break; } + } else { + break; } - if (tappedAmount > 0) { - game.informPlayers(new StringBuilder(controller.getLogName()).append(" taps ").append(tappedAmount).append(" Myrs").toString()); - // boost effect - game.addEffect(new BoostSourceEffect(tappedAmount, 0, Duration.EndOfTurn), source); - // damage to defender - if (defender != null) { - defender.damage(tappedAmount, myr.getId(), game, false, true); - return true; - } - - } - return true; } + if (tappedAmount > 0) { + game.informPlayers(new StringBuilder(controller.getLogName()).append(" taps ").append(tappedAmount).append(" Myrs").toString()); + // boost effect + game.addEffect(new BoostSourceEffect(tappedAmount, 0, Duration.EndOfTurn), source); + // damage to defender + return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), tappedAmount, myr.getId(), game, false, true) > 0; + } + return true; } return false; } diff --git a/Mage.Sets/src/mage/cards/n/NecraDisciple.java b/Mage.Sets/src/mage/cards/n/NecraDisciple.java index e019785849..b234a9ff80 100644 --- a/Mage.Sets/src/mage/cards/n/NecraDisciple.java +++ b/Mage.Sets/src/mage/cards/n/NecraDisciple.java @@ -38,7 +38,7 @@ import mage.abilities.mana.AnyColorManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,7 +58,7 @@ public class NecraDisciple extends CardImpl { this.addAbility(firstAbility); Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ColoredManaCost(ColoredManaSymbol.W)); secondAbility.addCost(new TapSourceCost()); - secondAbility.addTarget(new TargetCreatureOrPlayer()); + secondAbility.addTarget(new TargetAnyTarget()); this.addAbility(secondAbility); } diff --git a/Mage.Sets/src/mage/cards/n/NeedleDrop.java b/Mage.Sets/src/mage/cards/n/NeedleDrop.java index c51f788676..946cd232be 100644 --- a/Mage.Sets/src/mage/cards/n/NeedleDrop.java +++ b/Mage.Sets/src/mage/cards/n/NeedleDrop.java @@ -36,11 +36,11 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.common.FilterCreatureOrPlayer; +import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamageDoneWatcher; /** @@ -49,21 +49,22 @@ import mage.watchers.common.DamageDoneWatcher; */ public class NeedleDrop extends CardImpl { - private static final FilterCreatureOrPlayer FILTER = new FilterCreatureOrPlayer(); + private static final FilterCreaturePlayerOrPlaneswalker FILTER = new FilterCreaturePlayerOrPlaneswalker(); static { FILTER.getCreatureFilter().add(new DamagedThisTurnPredicate()); + FILTER.getPlaneswalkerFilter().add(new DamagedThisTurnPredicate()); FILTER.getPlayerFilter().add(new DamagedThisTurnPredicate()); } public NeedleDrop(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - // Needle Drop deals 1 damage to target creature or player that was dealt damage this turn. + // Needle Drop deals 1 damage to any target that was dealt damage this turn. Effect effect = new DamageTargetEffect(1); - effect.setText("{this} deals 1 damage to target creature or player that was dealt damage this turn"); + effect.setText("{this} deals 1 damage to any target that was dealt damage this turn"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(1, 1, FILTER)); + this.getSpellAbility().addTarget(new TargetAnyTarget(1, 1, FILTER)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); @@ -73,7 +74,6 @@ public class NeedleDrop extends CardImpl { super(card); } - @Override public NeedleDrop copy() { return new NeedleDrop(this); diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java b/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java index c0a91b3b52..4d0412b7b6 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasGodPharaoh.java @@ -47,7 +47,7 @@ import mage.players.Library; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; import mage.target.targetpointer.FixedTarget; @@ -82,9 +82,9 @@ public class NicolBolasGodPharaoh extends CardImpl { // +1: Each opponent exiles two cards from their hand. this.addAbility(new LoyaltyAbility(new NicolBolasGodPharaohPlusOneEffect(), 1)); - // -4: Nicol Bolas, God-Pharaoh deals 7 damage to target creature or player. + // -4: Nicol Bolas, God-Pharaoh deals 7 damage to any target. ability = new LoyaltyAbility(new DamageTargetEffect(7), -4); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // -12: Exile each nonland permanent your opponents control. diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java index 3ed03a0803..ddcb0d0ca9 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java @@ -45,8 +45,8 @@ import mage.filter.FilterPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -61,7 +61,7 @@ public class NicolBolasPlaneswalker extends CardImpl { } public NicolBolasPlaneswalker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{U}{B}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BOLAS); @@ -77,9 +77,13 @@ public class NicolBolasPlaneswalker extends CardImpl { this.addAbility(ability); // -9: Nicol Bolas, Planeswalker deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents. ability = new LoyaltyAbility(new DamageTargetEffect(7), -9); - ability.addTarget(new TargetPlayer()); - ability.addEffect(new DiscardTargetEffect(7)); - ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then")); + ability.addTarget(new TargetPlayerOrPlaneswalker()); + ability.addEffect(new DiscardTargetEffect(7) + .setText("That player or that planeswalker’s controller discards seven cards") + ); + ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then") + .setText("then sacrifices seven permanents") + ); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NightfireGiant.java b/Mage.Sets/src/mage/cards/n/NightfireGiant.java index 9ebb31f9eb..1e3a74cf8d 100644 --- a/Mage.Sets/src/mage/cards/n/NightfireGiant.java +++ b/Mage.Sets/src/mage/cards/n/NightfireGiant.java @@ -42,7 +42,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,9 +68,9 @@ public class NightfireGiant extends CardImpl { // Nightfire Giant gets +1/+1 as long as you control a Mountain. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceWhileControlsEffect(filter, 1, 1))); - // {4}{R}: Nightfire Giant deals 2 damage to target creature or player. + // {4}{R}: Nightfire Giant deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{4}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java b/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java index 83a14dd403..ae97dd82a5 100644 --- a/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java +++ b/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -66,9 +66,9 @@ public class NivMizzetDracogenius extends CardImpl { // Whenever Niv-Mizzet, Dracogenius deals damage to a player, you may draw a card. this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), true)); - // {U}{R}: Niv-Mizzet, Dracogenius deals 1 damage to target creature or player. + // {U}{R}: Niv-Mizzet, Dracogenius deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1),new ManaCostsImpl("{U}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java b/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java index 486e8cfd29..aea62de3b4 100644 --- a/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java +++ b/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class NivMizzetTheFiremind extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player. + // Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to any target. Ability ability = new DrawCardControllerTriggeredAbility(new DamageTargetEffect(1), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {T}: Draw a card. diff --git a/Mage.Sets/src/mage/cards/n/NobleVestige.java b/Mage.Sets/src/mage/cards/n/NobleVestige.java index c841127ede..f5b711993b 100644 --- a/Mage.Sets/src/mage/cards/n/NobleVestige.java +++ b/Mage.Sets/src/mage/cards/n/NobleVestige.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -49,7 +49,7 @@ import mage.target.TargetPlayer; public class NobleVestige extends CardImpl { public NobleVestige(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); @@ -57,7 +57,7 @@ public class NobleVestige extends CardImpl { this.addAbility(FlyingAbility.getInstance()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java index 43f6313ea0..abdebf482f 100644 --- a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java +++ b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java @@ -44,7 +44,7 @@ import mage.filter.FilterPermanent; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -62,10 +62,10 @@ public class NoggleHedgeMage extends CardImpl { } private String rule = "When {this} enters the battlefield, if you control two or more Islands, you may tap two target permanents."; - private String rule2 = "When {this} enters the battlefield, if you control two or more Mountains, you may have {this} deal 2 damage to target player."; + private String rule2 = "When {this} enters the battlefield, if you control two or more Mountains, you may have {this} deal 2 damage to target player or planeswalker."; public NoggleHedgeMage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U/R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U/R}"); this.subtype.add(SubType.NOGGLE); this.subtype.add(SubType.WIZARD); @@ -79,7 +79,7 @@ public class NoggleHedgeMage extends CardImpl { // 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); - ability2.addTarget(new TargetPlayer()); + ability2.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java b/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java index a00a3b94b9..384a5b00ea 100644 --- a/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java +++ b/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java @@ -41,8 +41,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -51,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent; public class ObeliskOfAlara extends CardImpl { public ObeliskOfAlara(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); // {1}{W}, {tap}: You gain 5 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(5), new ManaCostsImpl("{1}{W}")); @@ -69,7 +69,7 @@ public class ObeliskOfAlara extends CardImpl { // {1}{R}, {tap}: Obelisk of Alara deals 3 damage to target player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); // {1}{G}, {tap}: Target creature gets +4/+4 until end of turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(4, 4, Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")); diff --git a/Mage.Sets/src/mage/cards/o/OgreShaman.java b/Mage.Sets/src/mage/cards/o/OgreShaman.java index b20c644694..97f1c98321 100644 --- a/Mage.Sets/src/mage/cards/o/OgreShaman.java +++ b/Mage.Sets/src/mage/cards/o/OgreShaman.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class OgreShaman extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // {2}, Discard a card at random: Ogre Shaman deals 2 damage to target creature or player. + // {2}, Discard a card at random: Ogre Shaman deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(2)); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java index fd60ffb2d6..9f422026a8 100644 --- a/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java +++ b/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java @@ -44,7 +44,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.permanent.token.OmnathElementalToken; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -69,9 +69,9 @@ public class OmnathLocusOfRage extends CardImpl { // <i>Landfall</i> - Whenever a land enters the battlefield under your control, create a 5/5 red and green Elemental creature token. this.addAbility(new LandfallAbility(new CreateTokenEffect(new OmnathElementalToken()), false)); - // Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. + // Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to any target. Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DamageTargetEffect(3), false, filter); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OpenFire.java b/Mage.Sets/src/mage/cards/o/OpenFire.java index d34e1fa456..987f88072c 100644 --- a/Mage.Sets/src/mage/cards/o/OpenFire.java +++ b/Mage.Sets/src/mage/cards/o/OpenFire.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,9 +43,9 @@ public class OpenFire extends CardImpl { public OpenFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); - // Open Fire deals 3 damage to target creature or player. + // Open Fire deals 3 damage to any target. getSpellAbility().addEffect(new DamageTargetEffect(3)); - getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + getSpellAbility().addTarget(new TargetAnyTarget()); } public OpenFire(final OpenFire card) { diff --git a/Mage.Sets/src/mage/cards/o/OrcishArtillery.java b/Mage.Sets/src/mage/cards/o/OrcishArtillery.java index 4b98ca7b21..8c0f30dcd5 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishArtillery.java +++ b/Mage.Sets/src/mage/cards/o/OrcishArtillery.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class OrcishArtillery extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - // {tap}: Orcish Artillery deals 2 damage to target creature or player and 3 damage to you. + // {tap}: Orcish Artillery deals 2 damage to any target and 3 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new DamageControllerEffect(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java b/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java index c6fb4c2b28..b4c5c87b8d 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java +++ b/Mage.Sets/src/mage/cards/o/OrcishBloodpainter.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,10 +56,10 @@ public class OrcishBloodpainter extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // {tap}, Sacrifice a creature: Orcish Bloodpainter deals 1 damage to target creature or player. + // {tap}, Sacrifice a creature: Orcish Bloodpainter deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishCannonade.java b/Mage.Sets/src/mage/cards/o/OrcishCannonade.java index 470bf4cf50..0659bb8b9b 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishCannonade.java +++ b/Mage.Sets/src/mage/cards/o/OrcishCannonade.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class OrcishCannonade extends CardImpl { public OrcishCannonade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); - // Orcish Cannonade deals 2 damage to target creature or player and 3 damage to you. + // Orcish Cannonade deals 2 damage to any target and 3 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); Effect effect = new DamageControllerEffect(3); effect.setText("and 3 damage to you"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java b/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java index f3d727b498..6cf13f0bd1 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java +++ b/Mage.Sets/src/mage/cards/o/OrcishCannoneers.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,8 +56,8 @@ public class OrcishCannoneers extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - // {tap}: Orcish Cannoneers deals 2 damage to target creature or player and 3 damage to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); + // {tap}: Orcish Cannoneers deals 2 damage to any target and 3 damage to you. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); Effect effect = new DamageControllerEffect(3); effect.setText("and 3 damage to you"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/o/OrcishMechanics.java b/Mage.Sets/src/mage/cards/o/OrcishMechanics.java index d7f77bc852..be1bd9158e 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishMechanics.java +++ b/Mage.Sets/src/mage/cards/o/OrcishMechanics.java @@ -41,7 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class OrcishMechanics extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}, Sacrifice an artifact: Orcish Mechanics deals 2 damage to target creature or player. + // {tap}, Sacrifice an artifact: Orcish Mechanics deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishVandal.java b/Mage.Sets/src/mage/cards/o/OrcishVandal.java index f261299255..96e9400b6c 100644 --- a/Mage.Sets/src/mage/cards/o/OrcishVandal.java +++ b/Mage.Sets/src/mage/cards/o/OrcishVandal.java @@ -41,7 +41,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; /** @@ -65,7 +65,7 @@ public class OrcishVandal extends CardImpl { // {t}, Sacrifice an artifact: Orcish Vandal deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java index 618ac9b1c0..9382b1d141 100644 --- a/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java +++ b/Mage.Sets/src/mage/cards/o/OrdealOfPurphoros.java @@ -46,7 +46,7 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.counters.CounterType; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -71,10 +71,10 @@ public class OrdealOfPurphoros extends CardImpl { ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), "Then if it has three or more +1/+1 counters on it, sacrifice {this}")); this.addAbility(ability); - // When you sacrifice Ordeal of Purphoros, it deals 3 damage to target creature or player. + // When you sacrifice Ordeal of Purphoros, it deals 3 damage to any target. ability = new SacrificeSourceTriggeredAbility( new DamageTargetEffect(3, "it"),false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java b/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java index ed1e3281ff..0f8b6b77ed 100644 --- a/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java +++ b/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java @@ -40,7 +40,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class OrimSamiteHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // {tap}: Prevent the next 3 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 3 damage that would be dealt to any target this turn. } public OrimSamiteHealer(final OrimSamiteHealer card) { diff --git a/Mage.Sets/src/mage/cards/o/OrimsCure.java b/Mage.Sets/src/mage/cards/o/OrimsCure.java index 0eb663bcf0..dfb9875c88 100644 --- a/Mage.Sets/src/mage/cards/o/OrimsCure.java +++ b/Mage.Sets/src/mage/cards/o/OrimsCure.java @@ -44,7 +44,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,9 +68,9 @@ public class OrimsCure extends CardImpl { cost.setText(" tap an untapped creature you control"); this.addAbility(new AlternativeCostSourceAbility(cost, new PermanentsOnTheBattlefieldCondition(filter))); - // Prevent the next 4 damage that would be dealt to target creature or player this turn. + // Prevent the next 4 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public OrimsCure(final OrimsCure card) { diff --git a/Mage.Sets/src/mage/cards/o/OrimsTouch.java b/Mage.Sets/src/mage/cards/o/OrimsTouch.java index 82e2162469..27020d9cd7 100644 --- a/Mage.Sets/src/mage/cards/o/OrimsTouch.java +++ b/Mage.Sets/src/mage/cards/o/OrimsTouch.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,21 +47,21 @@ import mage.target.common.TargetCreatureOrPlayer; public class OrimsTouch extends CardImpl { public OrimsTouch(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Kicker {1} this.addAbility(new KickerAbility("{1}")); - // Prevent the next 2 damage that would be dealt to target creature or player this turn. If Orim's Touch was kicked, prevent the next 4 damage that would be dealt to that creature or player this turn instead. + // Prevent the next 2 damage that would be dealt to any target this turn. If Orim's Touch was kicked, prevent the next 4 damage that would be dealt to that creature or player this turn instead. Effect effect = new ConditionalReplacementEffect( new PreventDamageToTargetEffect(Duration.EndOfTurn, 4), new LockedInCondition(KickedCondition.instance), new PreventDamageToTargetEffect(Duration.EndOfTurn, 2)); - effect.setText("Prevent the next 2 damage that would be dealt to target creature or player this turn. If Orim's Touch was kicked, prevent the next 4 damage that would be dealt to that creature or player this turn instead"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + effect.setText("Prevent the next 2 damage that would be dealt to any target this turn. If Orim's Touch was kicked, prevent the next 4 damage that would be dealt to that permanent or player this turn instead"); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(effect); } - + public OrimsTouch(final OrimsTouch card) { super(card); } @@ -70,4 +70,4 @@ public class OrimsTouch extends CardImpl { public OrimsTouch copy() { return new OrimsTouch(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/o/OutpostSiege.java b/Mage.Sets/src/mage/cards/o/OutpostSiege.java index bb4bfef2da..7887d55754 100644 --- a/Mage.Sets/src/mage/cards/o/OutpostSiege.java +++ b/Mage.Sets/src/mage/cards/o/OutpostSiege.java @@ -52,7 +52,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -62,7 +62,7 @@ import mage.target.targetpointer.FixedTarget; public class OutpostSiege extends CardImpl { private final static String ruleTrigger1 = "&bull Khans — At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card."; - private final static String ruleTrigger2 = "&bull Dragons — Whenever a creature you control leaves the battlefield, {this} deals 1 damage to target creature or player."; + private final static String ruleTrigger2 = "&bull Dragons — Whenever a creature you control leaves the battlefield, {this} deals 1 damage to any target."; public OutpostSiege(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); @@ -77,13 +77,13 @@ public class OutpostSiege extends CardImpl { new ModeChoiceSourceCondition("Khans"), ruleTrigger1)); - // * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to target creature or player. + // * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to any target. Ability ability2 = new ConditionalTriggeredAbility( new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null, new DamageTargetEffect(1), new FilterControlledCreaturePermanent(), "", false), new ModeChoiceSourceCondition("Dragons"), ruleTrigger2); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/o/Overblaze.java b/Mage.Sets/src/mage/cards/o/Overblaze.java index db7811c296..98230d948b 100644 --- a/Mage.Sets/src/mage/cards/o/Overblaze.java +++ b/Mage.Sets/src/mage/cards/o/Overblaze.java @@ -49,12 +49,11 @@ import mage.util.CardUtil; public class Overblaze extends CardImpl { public Overblaze(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}"); this.subtype.add(SubType.ARCANE); - // Each time target permanent would deal damage to a creature or player this turn, it deals double that damage to that creature or player instead. - this.getSpellAbility().addEffect(new FireServantEffect()); + this.getSpellAbility().addEffect(new OverblazeEffect()); this.getSpellAbility().addTarget(new TargetPermanent()); // Splice onto Arcane {2}{R}{R} this.addAbility(new SpliceOntoArcaneAbility("{2}{R}{R}")); @@ -70,26 +69,27 @@ public class Overblaze extends CardImpl { } } -class FireServantEffect extends ReplacementEffectImpl { +class OverblazeEffect extends ReplacementEffectImpl { - public FireServantEffect() { + public OverblazeEffect() { super(Duration.EndOfTurn, Outcome.Damage); - staticText = "Each time target permanent would deal damage to a creature or player this turn, it deals double that damage to that creature or player instead."; + staticText = "Each time target permanent would deal damage to a permanent or player this turn, it deals double that damage to that permanent or player instead."; } - public FireServantEffect(final FireServantEffect effect) { + public OverblazeEffect(final OverblazeEffect effect) { super(effect); } @Override - public FireServantEffect copy() { - return new FireServantEffect(this); + public OverblazeEffect copy() { + return new OverblazeEffect(this); } @Override public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGE_CREATURE || - event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + return event.getType() == GameEvent.EventType.DAMAGE_CREATURE + || event.getType() == GameEvent.EventType.DAMAGE_PLAYER + || event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER; } @Override diff --git a/Mage.Sets/src/mage/cards/p/Panacea.java b/Mage.Sets/src/mage/cards/p/Panacea.java index e8b9f02192..260a564add 100644 --- a/Mage.Sets/src/mage/cards/p/Panacea.java +++ b/Mage.Sets/src/mage/cards/p/Panacea.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,13 +49,13 @@ public class Panacea extends CardImpl { public Panacea(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - // {X}{X}, {tap}: Prevent the next X damage that would be dealt to target creature or player this turn. + // {X}{X}, {tap}: Prevent the next X damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility( new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()), new ManaCostsImpl("{X}{X}") ); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Pandemonium.java b/Mage.Sets/src/mage/cards/p/Pandemonium.java index 20c2b01668..75b58d14b0 100644 --- a/Mage.Sets/src/mage/cards/p/Pandemonium.java +++ b/Mage.Sets/src/mage/cards/p/Pandemonium.java @@ -41,7 +41,7 @@ import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class Pandemonium extends CardImpl { public Pandemonium(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); - // Whenever a creature enters the battlefield, that creature's controller may have it deal damage equal to its power to target creature or player of their choice. + // Whenever a creature enters the battlefield, that creature's controller may have it deal damage equal to its power to any target of their choice. Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new PandemoniumEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, false, SetTargetPointer.PERMANENT, ""); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); originalId = ability.getOriginalId(); this.addAbility(ability); } @@ -87,7 +87,7 @@ class PandemoniumEffect extends OneShotEffect { public PandemoniumEffect() { super(Outcome.Benefit); - this.staticText = "that creature's controller may have it deal damage equal to its power to target creature or player of their choice"; + this.staticText = "that creature's controller may have it deal damage equal to its power to any target of their choice"; } public PandemoniumEffect(final PandemoniumEffect effect) { diff --git a/Mage.Sets/src/mage/cards/p/Parch.java b/Mage.Sets/src/mage/cards/p/Parch.java index 7d80d42ef9..f965ee2504 100644 --- a/Mage.Sets/src/mage/cards/p/Parch.java +++ b/Mage.Sets/src/mage/cards/p/Parch.java @@ -36,7 +36,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -55,9 +55,9 @@ public class Parch extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Choose one - Parch deals 2 damage to target creature or player; or Parch deals 4 damage to target blue creature. + // Choose one - Parch deals 2 damage to any target; or Parch deals 4 damage to target blue creature. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(4)); mode.getTargets().add(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/p/PardicArsonist.java b/Mage.Sets/src/mage/cards/p/PardicArsonist.java index e3b268f78d..392fb2fb42 100644 --- a/Mage.Sets/src/mage/cards/p/PardicArsonist.java +++ b/Mage.Sets/src/mage/cards/p/PardicArsonist.java @@ -42,7 +42,7 @@ import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,13 +57,13 @@ public class PardicArsonist extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Threshold - As long as seven or more cards are in your graveyard, Pardic Arsonist has "When Pardic Arsonist enters the battlefield, it deals 3 damage to target creature or player." + // Threshold - As long as seven or more cards are in your graveyard, Pardic Arsonist has "When Pardic Arsonist enters the battlefield, it deals 3 damage to any target." Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilitySourceEffect(gainedAbility), new CardsInControllerGraveCondition(7), - "As long as seven or more cards are in your graveyard, {this} has \"When {this} enters the battlefield, it deals 3 damage to target creature or player.\"")); + "As long as seven or more cards are in your graveyard, {this} has \"When {this} enters the battlefield, it deals 3 damage to any target.\"")); ability.setAbilityWord(AbilityWord.THRESHOLD); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PearlShard.java b/Mage.Sets/src/mage/cards/p/PearlShard.java index 222aa7e53d..86ba231846 100644 --- a/Mage.Sets/src/mage/cards/p/PearlShard.java +++ b/Mage.Sets/src/mage/cards/p/PearlShard.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,14 +49,14 @@ public class PearlShard extends CardImpl { public PearlShard(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); - // {3}, {tap} or {W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {3}, {tap} or {W}, {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{W}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PerilousMyr.java b/Mage.Sets/src/mage/cards/p/PerilousMyr.java index 196975e2e9..3f8d5a9b62 100644 --- a/Mage.Sets/src/mage/cards/p/PerilousMyr.java +++ b/Mage.Sets/src/mage/cards/p/PerilousMyr.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class PerilousMyr extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // When Perilous Myr dies, it deals 2 damage to target creature or player. + // When Perilous Myr dies, it deals 2 damage to any target. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java b/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java index e56ee47493..6acc4d6ba1 100644 --- a/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java +++ b/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java @@ -46,7 +46,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.game.permanent.token.ThopterColorlessToken; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,10 +67,10 @@ public class PiaAndKiranNalaar extends CardImpl { effect.setText("create two 1/1 colorless Thopter artifact creature tokens with flying"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); - // {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. + // {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, new FilterControlledArtifactPermanent("an artifact"), true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PillarOfFlame.java b/Mage.Sets/src/mage/cards/p/PillarOfFlame.java index a6e32a8b79..d3e016cd93 100644 --- a/Mage.Sets/src/mage/cards/p/PillarOfFlame.java +++ b/Mage.Sets/src/mage/cards/p/PillarOfFlame.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -46,9 +46,9 @@ public class PillarOfFlame extends CardImpl { public PillarOfFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Pillar of Flame deals 2 damage to target creature or player. + // Pillar of Flame deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); this.getSpellAbility().addWatcher(new DamagedByWatcher()); diff --git a/Mage.Sets/src/mage/cards/p/PinnacleOfRage.java b/Mage.Sets/src/mage/cards/p/PinnacleOfRage.java index 511d54835e..ab3d468041 100644 --- a/Mage.Sets/src/mage/cards/p/PinnacleOfRage.java +++ b/Mage.Sets/src/mage/cards/p/PinnacleOfRage.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -42,13 +42,12 @@ import mage.target.common.TargetCreatureOrPlayer; public class PinnacleOfRage extends CardImpl { public PinnacleOfRage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{R}"); // Pinnacle of Rage deals 3 damage to each of two target creatures and/or players. Effect effect = new DamageTargetEffect(3); - effect.setText("{this} deals 3 damage to each of two target creatures and/or players"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(2,2)); + effect.setText("{this} deals 3 damage to each of two targets"); + this.getSpellAbility().addTarget(new TargetAnyTarget(2, 2)); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/p/PirateShip.java b/Mage.Sets/src/mage/cards/p/PirateShip.java index e5c723ce6a..7c0d507060 100644 --- a/Mage.Sets/src/mage/cards/p/PirateShip.java +++ b/Mage.Sets/src/mage/cards/p/PirateShip.java @@ -44,7 +44,7 @@ import mage.constants.ComparisonType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterLandPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author KholdFuzion @@ -61,9 +61,9 @@ public class PirateShip extends CardImpl { // Pirate Ship can't attack unless defending player controls an Island. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent(SubType.ISLAND, "an Island")))); - // {tap}: Pirate Ship deals 1 damage to target creature or player. + // {tap}: Pirate Ship deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // When you control no Islands, sacrifice Pirate Ship. this.addAbility(new ControlsPermanentsControllerTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java index a29fcaf59e..b7ec0ed362 100644 --- a/Mage.Sets/src/mage/cards/p/PitchburnDevils.java +++ b/Mage.Sets/src/mage/cards/p/PitchburnDevils.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class PitchburnDevils extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // When Pitchburn Devils dies, it deals 3 damage to target creature or player. + // When Pitchburn Devils dies, it deals 3 damage to any target. DiesTriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PollenRemedy.java b/Mage.Sets/src/mage/cards/p/PollenRemedy.java index 68f400226e..974dcc94d3 100644 --- a/Mage.Sets/src/mage/cards/p/PollenRemedy.java +++ b/Mage.Sets/src/mage/cards/p/PollenRemedy.java @@ -42,7 +42,7 @@ import mage.constants.Duration; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -69,7 +69,7 @@ public class PollenRemedy extends CardImpl { @Override public void adjustTargets(Ability ability, Game game) { if(ability.getOriginalId().equals(originalId)) { - ability.addTarget(new TargetCreatureOrPlayerAmount(KickedCondition.instance.apply(game, ability) ? 6 : 3)); + ability.addTarget(new TargetAnyTargetAmount(KickedCondition.instance.apply(game, ability) ? 6 : 3)); } } diff --git a/Mage.Sets/src/mage/cards/p/PowerOfFire.java b/Mage.Sets/src/mage/cards/p/PowerOfFire.java index df227e5011..bd66fa87e0 100644 --- a/Mage.Sets/src/mage/cards/p/PowerOfFire.java +++ b/Mage.Sets/src/mage/cards/p/PowerOfFire.java @@ -45,7 +45,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -66,11 +66,11 @@ public class PowerOfFire extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." + // Enchanted creature has "{tap}: This creature deals 1 damage to any target." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals 1 damage to target creature or player.\""))); + "Enchanted creature has \"{T}: This creature deals 1 damage to any target.\""))); } diff --git a/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java b/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java index 8fb9bf3669..99f156a975 100644 --- a/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java +++ b/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -62,9 +62,9 @@ public class PreyseizerDragon extends CardImpl { // Devour 2 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with twice that many +1/+1 counters on it.) this.addAbility(new DevourAbility(DevourFactor.Devour2)); - // Whenever Preyseizer Dragon attacks, it deals damage to target creature or player equal to the number of +1/+1 counters on Preyseizer Dragon. + // Whenever Preyseizer Dragon attacks, it deals damage to any target equal to the number of +1/+1 counters on Preyseizer Dragon. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java index 525e37b40b..1f191df767 100644 --- a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java +++ b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,7 +56,7 @@ public class ProdigalPyromancer extends CardImpl { this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java b/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java index 2c64a8a6c0..29daf8d1cb 100644 --- a/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java +++ b/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class ProdigalSorcerer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - //{T}: Prodigal Sorcerer deals 1 damage to target creature or player. + //{T}: Prodigal Sorcerer deals 1 damage to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProfanePrayers.java b/Mage.Sets/src/mage/cards/p/ProfanePrayers.java index b201dcb563..7a4f6157f5 100644 --- a/Mage.Sets/src/mage/cards/p/ProfanePrayers.java +++ b/Mage.Sets/src/mage/cards/p/ProfanePrayers.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class ProfanePrayers extends CardImpl { public ProfanePrayers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}{B}"); - // Profane Prayers deals X damage to target creature or player and you gain X life, where X is the number of Clerics on the battlefield. + // Profane Prayers deals X damage to any target and you gain X life, where X is the number of Clerics on the battlefield. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); } diff --git a/Mage.Sets/src/mage/cards/p/PropheticBolt.java b/Mage.Sets/src/mage/cards/p/PropheticBolt.java index 54733870fe..fb5de701a8 100644 --- a/Mage.Sets/src/mage/cards/p/PropheticBolt.java +++ b/Mage.Sets/src/mage/cards/p/PropheticBolt.java @@ -36,7 +36,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class PropheticBolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{R}"); - // Prophetic Bolt deals 4 damage to target creature or player. Look at the top four cards of your library. Put one of those cards into your hand and the rest on the bottom of your library in any order. + // Prophetic Bolt deals 4 damage to any target. Look at the top four cards of your library. Put one of those cards into your hand and the rest on the bottom of your library in any order. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); } diff --git a/Mage.Sets/src/mage/cards/p/PsionicBlast.java b/Mage.Sets/src/mage/cards/p/PsionicBlast.java index beb0a38268..9f15fb07cb 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicBlast.java +++ b/Mage.Sets/src/mage/cards/p/PsionicBlast.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,10 +49,10 @@ public class PsionicBlast extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - // Psionic Blast deals 4 damage to target creature or player and 2 damage to you. + // Psionic Blast deals 4 damage to any target and 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new PsionicBlastEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public PsionicBlast(final PsionicBlast card) { diff --git a/Mage.Sets/src/mage/cards/p/PsionicEntity.java b/Mage.Sets/src/mage/cards/p/PsionicEntity.java index 105de19b4b..cdf46e7727 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicEntity.java +++ b/Mage.Sets/src/mage/cards/p/PsionicEntity.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class PsionicEntity extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {tap}: Psionic Entity deals 2 damage to target creature or player and 3 damage to itself. + // {tap}: Psionic Entity deals 2 damage to any target and 3 damage to itself. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addEffect(new DamageSelfEffect(3).setText("and 3 damage to itself")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PsionicGift.java b/Mage.Sets/src/mage/cards/p/PsionicGift.java index e7a452fd5b..75111941f3 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicGift.java +++ b/Mage.Sets/src/mage/cards/p/PsionicGift.java @@ -44,7 +44,7 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -65,9 +65,9 @@ public class PsionicGift extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." + // Enchanted creature has "{tap}: This creature deals 1 damage to any target." Ability psiAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - psiAbility.addTarget(new TargetCreatureOrPlayer()); + psiAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(psiAbility, AttachmentType.AURA))); } diff --git a/Mage.Sets/src/mage/cards/p/PsionicSliver.java b/Mage.Sets/src/mage/cards/p/PsionicSliver.java index c5c26851d3..073bd61a01 100644 --- a/Mage.Sets/src/mage/cards/p/PsionicSliver.java +++ b/Mage.Sets/src/mage/cards/p/PsionicSliver.java @@ -43,7 +43,7 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,17 +60,17 @@ public class PsionicSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // All Sliver creatures have "{T}: This creature deals 2 damage to target creature or player and 3 damage to itself." + // All Sliver creatures have "{T}: This creature deals 2 damage to any target and 3 damage to itself." Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, - new DamageTargetEffect(2).setText("This creature deals 2 damage to target creature or player"), + new DamageTargetEffect(2).setText("This creature deals 2 damage to any target"), new TapSourceCost() ); ability.addEffect(new DamageSelfEffect(3).setText("3 damage to itself.")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility( new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, - "All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player and 3 damage to itself.\"") + "All Sliver creatures have \"{T}: This creature deals 2 damage to any target and 3 damage to itself.\"") ) ); } diff --git a/Mage.Sets/src/mage/cards/p/PsychicPurge.java b/Mage.Sets/src/mage/cards/p/PsychicPurge.java index 3e6c3dc46d..257c2a597a 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicPurge.java +++ b/Mage.Sets/src/mage/cards/p/PsychicPurge.java @@ -41,7 +41,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.StackObject; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -53,9 +53,9 @@ public class PsychicPurge extends CardImpl { public PsychicPurge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}"); - // Psychic Purge deals 1 damage to target creature or player. + // Psychic Purge deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // When a spell or ability an opponent controls causes you to discard Psychic Purge, that player loses 5 life. Ability ability = new PsychicPurgeTriggeredAbility(); diff --git a/Mage.Sets/src/mage/cards/p/PulseOfTheForge.java b/Mage.Sets/src/mage/cards/p/PulseOfTheForge.java index e20d330cc6..de60ac9e7e 100644 --- a/Mage.Sets/src/mage/cards/p/PulseOfTheForge.java +++ b/Mage.Sets/src/mage/cards/p/PulseOfTheForge.java @@ -39,7 +39,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,11 +48,11 @@ import mage.target.TargetPlayer; public class PulseOfTheForge extends CardImpl { public PulseOfTheForge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); // Pulse of the Forge deals 4 damage to target player. Then if that player has more life than you, return Pulse of the Forge to its owner's hand. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new PulseOfTheForgeReturnToHandEffect()); } @@ -84,7 +84,7 @@ class PulseOfTheForgeReturnToHandEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); + Player controller = game.getPlayerOrPlaneswalkerController(source.getControllerId()); if (controller != null) { Player player = game.getPlayer(source.getFirstTarget()); if (player != null && player.getLife() > controller.getLife()) { diff --git a/Mage.Sets/src/mage/cards/p/PunctureBlast.java b/Mage.Sets/src/mage/cards/p/PunctureBlast.java index 715e672a61..671bb2f7cd 100644 --- a/Mage.Sets/src/mage/cards/p/PunctureBlast.java +++ b/Mage.Sets/src/mage/cards/p/PunctureBlast.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.WitherAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -45,7 +45,7 @@ public class PunctureBlast extends CardImpl { this.addAbility(WitherAbility.getInstance()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().setRuleAtTheTop(false); } diff --git a/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java b/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java index c618ec300d..6c093f17f3 100644 --- a/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java +++ b/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.p; import java.util.UUID; @@ -34,24 +33,21 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.Target; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author LevelX2 */ - - public class PunishTheEnemy extends CardImpl { public PunishTheEnemy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); // Punish the Enemy deals 3 damage to target player and 3 damage to target creature. - this.getSpellAbility().addEffect(new DamageTargetEffect(3, true, "target player and 3 damage to target creature")); - Target target = new TargetPlayer(); + this.getSpellAbility().addEffect(new DamageTargetEffect(3, true, "target player or planeswalker and 3 damage to target creature")); + Target target = new TargetPlayerOrPlaneswalker(); this.getSpellAbility().addTarget(target); target = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(target); diff --git a/Mage.Sets/src/mage/cards/p/PunishingFire.java b/Mage.Sets/src/mage/cards/p/PunishingFire.java index 5bfe721648..717eb46bf0 100644 --- a/Mage.Sets/src/mage/cards/p/PunishingFire.java +++ b/Mage.Sets/src/mage/cards/p/PunishingFire.java @@ -40,7 +40,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class PunishingFire extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Punishing Fire deals 2 damage to target creature or player. + // Punishing Fire deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Whenever an opponent gains life, you may pay {R}. If you do, return Punishing Fire from your graveyard to your hand. this.addAbility(new PunishingFireTriggeredAbility()); } diff --git a/Mage.Sets/src/mage/cards/p/PyreZombie.java b/Mage.Sets/src/mage/cards/p/PyreZombie.java index 7dc0441124..1bef108c76 100644 --- a/Mage.Sets/src/mage/cards/p/PyreZombie.java +++ b/Mage.Sets/src/mage/cards/p/PyreZombie.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,10 +61,10 @@ public class PyreZombie extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnToHandSourceEffect().setText("return {this} to your hand"), new ManaCostsImpl("{1}{B}{B}")), TargetController.YOU, false)); - // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to target creature or player. + // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java b/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java index 38dbcb1bc8..a9c187bc63 100644 --- a/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java +++ b/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,7 +52,7 @@ public class PyriteSpellbomb extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ColoredManaCost(ColoredManaSymbol.R)); firstAbility.addCost(new SacrificeSourceCost()); - firstAbility.addTarget(new TargetCreatureOrPlayer()); + firstAbility.addTarget(new TargetAnyTarget()); this.addAbility(firstAbility); Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(1)); secondAbility.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/p/Pyroconvergence.java b/Mage.Sets/src/mage/cards/p/Pyroconvergence.java index f12235bfe6..48681f1456 100644 --- a/Mage.Sets/src/mage/cards/p/Pyroconvergence.java +++ b/Mage.Sets/src/mage/cards/p/Pyroconvergence.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.MulticoloredPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class Pyroconvergence extends CardImpl { public Pyroconvergence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - // Whenever you cast a multicolored spell, Pyroconvergence deals 2 damage to target creature or player. + // Whenever you cast a multicolored spell, Pyroconvergence deals 2 damage to any target. Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(2), filter, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PyromancersAssault.java b/Mage.Sets/src/mage/cards/p/PyromancersAssault.java index 8cd1de94a8..e3450eb745 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancersAssault.java +++ b/Mage.Sets/src/mage/cards/p/PyromancersAssault.java @@ -38,7 +38,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.CastSpellLastTurnWatcher; /** @@ -50,9 +50,9 @@ public class PyromancersAssault extends CardImpl { public PyromancersAssault(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); - // Whenever you cast your second spell each turn, Pyromancer's Assault deals 2 damage to target creature or player. + // Whenever you cast your second spell each turn, Pyromancer's Assault deals 2 damage to any target. Ability ability = new PyromancersAssaultTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability, new CastSpellLastTurnWatcher()); } @@ -99,6 +99,6 @@ class PyromancersAssaultTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you cast your second spell each turn, {this} deals 2 damage to target creature or player."; + return "Whenever you cast your second spell each turn, {this} deals 2 damage to any target."; } } diff --git a/Mage.Sets/src/mage/cards/p/PyromancersSwath.java b/Mage.Sets/src/mage/cards/p/PyromancersSwath.java index 933c587e75..dd9f118aa8 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancersSwath.java +++ b/Mage.Sets/src/mage/cards/p/PyromancersSwath.java @@ -48,7 +48,7 @@ import mage.util.CardUtil; public class PyromancersSwath extends CardImpl { public PyromancersSwath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PyromancersSwathReplacementEffect())); @@ -72,26 +72,27 @@ class PyromancersSwathReplacementEffect extends ReplacementEffectImpl { PyromancersSwathReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "If an instant or sorcery source you control would deal damage to a creature or player, it deals that much damage plus 2 to that creature or player instead"; + staticText = "If an instant or sorcery source you control would deal damage to a permanent or player, it deals that much damage plus 2 to that permanent or player instead"; } PyromancersSwathReplacementEffect(final PyromancersSwathReplacementEffect effect) { super(effect); } - @Override + @Override public boolean checksEventType(GameEvent event, Game game) { - switch(event.getType()) { + switch (event.getType()) { case DAMAGE_CREATURE: case DAMAGE_PLAYER: + case DAMAGE_PLANESWALKER: return true; default: return false; } } - + @Override - public boolean applies(GameEvent event, Ability source, Game game) { + public boolean applies(GameEvent event, Ability source, Game game) { if (source.getControllerId().equals(game.getControllerId(event.getSourceId()))) { MageObject object = game.getObject(event.getSourceId()); return object != null && (object.isInstant() || object.isSorcery()); diff --git a/Mage.Sets/src/mage/cards/p/Pyromancy.java b/Mage.Sets/src/mage/cards/p/Pyromancy.java index cab7d67280..ec0473adf9 100644 --- a/Mage.Sets/src/mage/cards/p/Pyromancy.java +++ b/Mage.Sets/src/mage/cards/p/Pyromancy.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class Pyromancy extends CardImpl { public Pyromancy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}{R}"); - // {3}, Discard a card at random: Pyromancy deals damage to target creature or player equal to the converted mana cost of the discarded card. + // {3}, Discard a card at random: Pyromancy deals damage to any target equal to the converted mana cost of the discarded card. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new DiscardCostCardConvertedMana()), new ManaCostsImpl("{3}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addCost(new DiscardCardCost(true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Pyromania.java b/Mage.Sets/src/mage/cards/p/Pyromania.java index 6b68402ed6..c052456aba 100644 --- a/Mage.Sets/src/mage/cards/p/Pyromania.java +++ b/Mage.Sets/src/mage/cards/p/Pyromania.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,15 +49,15 @@ public class Pyromania extends CardImpl { public Pyromania(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // {1}{R}, Discard a card at random: Pyromania deals 1 damage to target creature or player. + // {1}{R}, Discard a card at random: Pyromania deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // {1}{R}, Sacrifice Pyromania: Pyromania deals 1 damage to target creature or player. + // {1}{R}, Sacrifice Pyromania: Pyromania deals 1 damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Pyromatics.java b/Mage.Sets/src/mage/cards/p/Pyromatics.java index 8ddbcf552f..fe456209b9 100644 --- a/Mage.Sets/src/mage/cards/p/Pyromatics.java +++ b/Mage.Sets/src/mage/cards/p/Pyromatics.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.ReplicateAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class Pyromatics extends CardImpl { // Replicate {1}{R} this.addAbility(new ReplicateAbility(this, "{1}{R}")); - // Pyromatics deals 1 damage to target creature or player. + // Pyromatics deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/p/Pyrotechnics.java b/Mage.Sets/src/mage/cards/p/Pyrotechnics.java index 0b1a9d5a47..3818761604 100644 --- a/Mage.Sets/src/mage/cards/p/Pyrotechnics.java +++ b/Mage.Sets/src/mage/cards/p/Pyrotechnics.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -46,7 +46,7 @@ public class Pyrotechnics extends CardImpl { // Pyrotechnics deals 4 damage divided as you choose among any number of target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4)); } public Pyrotechnics(final Pyrotechnics card) { diff --git a/Mage.Sets/src/mage/cards/q/QuestForPureFlame.java b/Mage.Sets/src/mage/cards/q/QuestForPureFlame.java index de563d27ac..b6ec2006f8 100644 --- a/Mage.Sets/src/mage/cards/q/QuestForPureFlame.java +++ b/Mage.Sets/src/mage/cards/q/QuestForPureFlame.java @@ -54,7 +54,7 @@ import mage.util.CardUtil; public class QuestForPureFlame extends CardImpl { public QuestForPureFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); // Whenever a source you control deals damage to an opponent, you may put a quest counter on Quest for Pure Flame. this.addAbility(new QuestForPureFlameTriggeredAbility()); @@ -113,7 +113,7 @@ class QuestForPureFlameEffect extends ReplacementEffectImpl { public QuestForPureFlameEffect() { super(Duration.EndOfTurn, Outcome.Damage); - staticText = "If any source you control would deal damage to a creature or player this turn, it deals double that damage to that creature or player instead"; + staticText = "If any source you control would deal damage to a permanent or player this turn, it deals double that damage to that permanent or player instead"; } public QuestForPureFlameEffect(final QuestForPureFlameEffect effect) { @@ -127,8 +127,9 @@ class QuestForPureFlameEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGE_CREATURE || - event.getType() == EventType.DAMAGE_PLAYER; + return event.getType() == EventType.DAMAGE_CREATURE + || event.getType() == EventType.DAMAGE_PLAYER + || event.getType() == EventType.DAMAGE_PLANESWALKER; } @Override diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java index b98b816b55..89649d2fc2 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java @@ -46,8 +46,8 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -68,11 +68,11 @@ public class QuicksilverDagger extends CardImpl { // Enchanted creature has "{tap}: This creature deals 1 damage to target player. You draw a card." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainAbility.addTarget(new TargetPlayer()); + gainAbility.addTarget(new TargetPlayerOrPlaneswalker()); gainAbility.addEffect(new DrawCardSourceControllerEffect(1)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals 1 damage to target player. You draw a card.\"") + "Enchanted creature has \"{T}: This creature deals 1 damage to target player or planeswalker. You draw a card.\"") )); } diff --git a/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java b/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java index a4480f5e8a..59485b8bc4 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java +++ b/Mage.Sets/src/mage/cards/q/QuicksmithRebel.java @@ -45,7 +45,7 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledArtifactPermanent; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,13 +61,13 @@ public class QuicksmithRebel extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(2); - // When Quicksmith Rebel enters the battlefield, target artifact you control gains "{T}: This artifact deals 2 damage to target creature or player" for as long as you control Quicksmith Rebel. + // When Quicksmith Rebel enters the battlefield, target artifact you control gains "{T}: This artifact deals 2 damage to any target" for as long as you control Quicksmith Rebel. Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - artifactAbility.addTarget(new TargetCreatureOrPlayer()); + artifactAbility.addTarget(new TargetAnyTarget()); ConditionalContinuousEffect effect = new ConditionalContinuousEffect( new GainAbilityTargetEffect(artifactAbility, Duration.Custom), new SourceOnBattlefieldControlUnchangedCondition(), - "target artifact you control gains \"{T}: This artifact deals 2 damage to target creature or player\" for as long as you control {this}"); + "target artifact you control gains \"{T}: This artifact deals 2 damage to any target\" for as long as you control {this}"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); ability.addTarget(new TargetPermanent(new FilterControlledArtifactPermanent())); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RageExtractor.java b/Mage.Sets/src/mage/cards/r/RageExtractor.java index 6d3f98edd5..3b69656a5a 100644 --- a/Mage.Sets/src/mage/cards/r/RageExtractor.java +++ b/Mage.Sets/src/mage/cards/r/RageExtractor.java @@ -41,7 +41,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -68,7 +68,7 @@ public class RageExtractor extends CardImpl { class RageExtractorTriggeredAbility extends TriggeredAbilityImpl { RageExtractorTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(0)); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } RageExtractorTriggeredAbility(final RageExtractorTriggeredAbility ability) { @@ -103,6 +103,6 @@ class RageExtractorTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you cast a spell with p in its mana cost, {this} deals damage equal to that spell's converted mana cost to target creature or player."; + return "Whenever you cast a spell with p in its mana cost, {this} deals damage equal to that spell's converted mana cost to any target."; } } diff --git a/Mage.Sets/src/mage/cards/r/RageForger.java b/Mage.Sets/src/mage/cards/r/RageForger.java index 54c4ee18f8..ef281b100f 100644 --- a/Mage.Sets/src/mage/cards/r/RageForger.java +++ b/Mage.Sets/src/mage/cards/r/RageForger.java @@ -50,7 +50,7 @@ import mage.filter.predicate.permanent.CounterPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -60,16 +60,16 @@ public class RageForger extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other Shaman creature you control"); private static final FilterControlledCreaturePermanent filterAttack = new FilterControlledCreaturePermanent("creature you control with a +1/+1 counter on it"); - + static { filter.add(new SubtypePredicate(SubType.SHAMAN)); filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new AnotherPredicate()); filterAttack.add(new CounterPredicate(CounterType.P1P1)); } - + public RageForger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.SHAMAN); @@ -80,9 +80,9 @@ public class RageForger extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false)); // Whenever a creature you control with a +1/+1 counter on it attacks, you may have that creature deal 1 damage to target player. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new RageForgerDamageEffect(), true, filterAttack, true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); - + } public RageForger(final RageForger card) { @@ -96,28 +96,27 @@ public class RageForger extends CardImpl { } class RageForgerDamageEffect extends OneShotEffect { - + public RageForgerDamageEffect() { super(Outcome.Benefit); - this.staticText = "you may have that creature deal 1 damage to target player"; + this.staticText = "you may have that creature deal 1 damage to target player or planeswalker"; } - + public RageForgerDamageEffect(final RageForgerDamageEffect effect) { super(effect); } - + @Override public RageForgerDamageEffect copy() { return new RageForgerDamageEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - Player targetPlayer = game.getPlayer(source.getFirstTarget()); Permanent attackingCreature = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); - if (controller != null && targetPlayer != null && attackingCreature != null) { - targetPlayer.damage(1, attackingCreature.getId(), game, false, true); + if (controller != null && attackingCreature != null) { + game.damagePlayerOrPlaneswalker(source.getFirstTarget(), 1, attackingCreature.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/r/RageThrower.java b/Mage.Sets/src/mage/cards/r/RageThrower.java index 0d6ff4948f..12ebc8f181 100644 --- a/Mage.Sets/src/mage/cards/r/RageThrower.java +++ b/Mage.Sets/src/mage/cards/r/RageThrower.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -44,7 +44,7 @@ import mage.target.TargetPlayer; public class RageThrower extends CardImpl { public RageThrower(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); @@ -53,7 +53,7 @@ public class RageThrower extends CardImpl { // Whenever another creature dies, Rage Thrower deals 2 damage to target player. DiesCreatureTriggeredAbility ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(2), false, true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RagingRegisaur.java b/Mage.Sets/src/mage/cards/r/RagingRegisaur.java index 261813a864..71498566c7 100644 --- a/Mage.Sets/src/mage/cards/r/RagingRegisaur.java +++ b/Mage.Sets/src/mage/cards/r/RagingRegisaur.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class RagingRegisaur extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // Whenever Raging Regisaur attacks, it deals 1 damage to target creature or player. + // Whenever Raging Regisaur attacks, it deals 1 damage to any target. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RaidBombardment.java b/Mage.Sets/src/mage/cards/r/RaidBombardment.java index fc18fc345a..589c0c7be1 100644 --- a/Mage.Sets/src/mage/cards/r/RaidBombardment.java +++ b/Mage.Sets/src/mage/cards/r/RaidBombardment.java @@ -47,8 +47,7 @@ import mage.target.targetpointer.FixedTarget; public class RaidBombardment extends CardImpl { public RaidBombardment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // Whenever a creature you control with power 2 or less attacks, Raid Bombardment deals 1 damage to defending player. this.addAbility(new RaidBombardmentTriggeredAbility()); @@ -86,11 +85,11 @@ class RaidBombardmentTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (game.getActivePlayerId().equals(this.controllerId) ) { + if (game.getActivePlayerId().equals(this.controllerId)) { Permanent attacker = game.getPermanent(event.getSourceId()); if (attacker != null) { if (attacker.getPower().getValue() <= 2) { - UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(attacker.getId(), game); + UUID defendingPlayerId = game.getCombat().getDefenderId(attacker.getId()); this.getEffects().get(0).setTargetPointer(new FixedTarget(defendingPlayerId)); return true; } @@ -101,8 +100,7 @@ class RaidBombardmentTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature you control with power 2 or less attacks, {this} deals 1 damage to defending player."; + return "Whenever a creature you control with power 2 or less attacks, {this} deals 1 damage to the player or planeswalker that creature is attacking."; } } - diff --git a/Mage.Sets/src/mage/cards/r/RakaDisciple.java b/Mage.Sets/src/mage/cards/r/RakaDisciple.java index db395c495b..818b99ac75 100644 --- a/Mage.Sets/src/mage/cards/r/RakaDisciple.java +++ b/Mage.Sets/src/mage/cards/r/RakaDisciple.java @@ -39,7 +39,7 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -56,7 +56,7 @@ public class RakaDisciple extends CardImpl { this.toughness = new MageInt(1); Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ColoredManaCost(ColoredManaSymbol.W)); firstAbility.addCost(new TapSourceCost()); - firstAbility.addTarget(new TargetCreatureOrPlayer()); + firstAbility.addTarget(new TargetAnyTarget()); this.addAbility(firstAbility); Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.U)); secondAbility.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/r/Rakalite.java b/Mage.Sets/src/mage/cards/r/Rakalite.java index 3023d69b9c..ea71e2bc95 100644 --- a/Mage.Sets/src/mage/cards/r/Rakalite.java +++ b/Mage.Sets/src/mage/cards/r/Rakalite.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,10 +51,10 @@ public class Rakalite extends CardImpl { public Rakalite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}"); - // {2}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Return Rakalite to its owner's hand at the beginning of the next end step. + // {2}: Prevent the next 1 damage that would be dealt to any target this turn. Return Rakalite to its owner's hand at the beginning of the next end step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1, false), new GenericManaCost(2)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnToHandSourceEffect(true)))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RakdossReturn.java b/Mage.Sets/src/mage/cards/r/RakdossReturn.java index 702e001a8b..ec2ac74be1 100644 --- a/Mage.Sets/src/mage/cards/r/RakdossReturn.java +++ b/Mage.Sets/src/mage/cards/r/RakdossReturn.java @@ -25,17 +25,24 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.r; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; /** * @@ -43,18 +50,16 @@ import mage.target.common.TargetOpponent; */ public class RakdossReturn extends CardImpl { - public RakdossReturn (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}"); - - + public RakdossReturn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}"); // Rakdos's Return deals X damage to target opponent. That player discards X cards. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addEffect(new DiscardTargetEffect(new ManacostVariableValue())); + this.getSpellAbility().addEffect(new RakdossReturnEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); } - public RakdossReturn (final RakdossReturn card) { + public RakdossReturn(final RakdossReturn card) { super(card); } @@ -63,3 +68,37 @@ public class RakdossReturn extends CardImpl { return new RakdossReturn(this); } } + +class RakdossReturnEffect extends OneShotEffect { + + RakdossReturnEffect() { + super(Outcome.Benefit); + this.staticText = "That player or that planeswalker’s controller discards X cards."; + } + + RakdossReturnEffect(final RakdossReturnEffect effect) { + super(effect); + } + + @Override + public RakdossReturnEffect copy() { + return new RakdossReturnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player == null) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + player = game.getPlayer(permanent.getControllerId()); + } + } + if (player == null) { + return false; + } + Effect effect = new DiscardTargetEffect(new ManacostVariableValue()); + effect.setTargetPointer(new FixedTarget(player.getId(), game)); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RalZarek.java b/Mage.Sets/src/mage/cards/r/RalZarek.java index 87f9640f29..df41e94667 100644 --- a/Mage.Sets/src/mage/cards/r/RalZarek.java +++ b/Mage.Sets/src/mage/cards/r/RalZarek.java @@ -48,7 +48,7 @@ import mage.game.Game; import mage.game.turn.TurnMod; import mage.players.Player; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.SecondTargetPointer; /** @@ -84,9 +84,9 @@ public class RalZarek extends CardImpl { ability1.addTarget(secondTarget); this.addAbility(ability1); - // -2: Ral Zarek deals 3 damage to target creature or player. + // -2: Ral Zarek deals 3 damage to any target. LoyaltyAbility ability2 = new LoyaltyAbility(new DamageTargetEffect(3), -2); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); // -7: Flip five coins. Take an extra turn after this one for each coin that comes up heads. diff --git a/Mage.Sets/src/mage/cards/r/RathsEdge.java b/Mage.Sets/src/mage/cards/r/RathsEdge.java index d59a04d3ef..24939327bc 100644 --- a/Mage.Sets/src/mage/cards/r/RathsEdge.java +++ b/Mage.Sets/src/mage/cards/r/RathsEdge.java @@ -42,7 +42,7 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class RathsEdge extends CardImpl { // {tap}: Add {C}. this.addAbility(new ColorlessManaAbility()); - // {4}, {tap}, Sacrifice a land: Rath's Edge deals 1 damage to target creature or player. + // {4}, {tap}, Sacrifice a land: Rath's Edge deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{4}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java index 685218673c..beec2d52db 100644 --- a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java +++ b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java @@ -57,7 +57,7 @@ import mage.game.stack.StackObject; import mage.players.Player; import mage.target.Target; import mage.target.TargetPermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -85,7 +85,11 @@ public 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(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE)); + this.addAbility(new ConditionalTriggeredAbility( + ability, + TwoOrMoreSpellsWereCastLastTurnCondition.instance, + TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE + )); } public RavagerOfTheFells(final RavagerOfTheFells card) { @@ -102,7 +106,7 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl { public RavagerOfTheFellsAbility() { super(Zone.BATTLEFIELD, new RavagerOfTheFellsEffect(), false); - Target target1 = new TargetOpponent(); + Target target1 = new TargetOpponentOrPlaneswalker(); this.addTarget(target1); this.addTarget(new RavagerOfTheFellsTarget()); } @@ -134,7 +138,9 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever this creature transforms into Ravager of the Fells, it deals 2 damage to target opponent and 2 damage to up to one target creature that player controls."; + return "Whenever this creature transforms into {this}, " + + "it deals 2 damage to target opponent or planeswalker " + + "and 2 damage to up to one target creature that player or that planeswalker’s controller controls."; } } @@ -156,10 +162,7 @@ class RavagerOfTheFellsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); - if (player != null) { - player.damage(2, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 2, source.getSourceId(), game, false, true); Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { creature.damage(2, source.getSourceId(), game, false, true); @@ -181,7 +184,11 @@ class RavagerOfTheFellsTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - UUID firstTarget = source.getFirstTarget(); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + UUID firstTarget = player.getId(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -206,10 +213,13 @@ class RavagerOfTheFellsTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - for (UUID targetId : availablePossibleTargets) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null && permanent.getControllerId().equals(playerId)) { - possibleTargets.add(targetId); + Player player = game.getPlayerOrPlaneswalkerController(playerId); + if (player != null) { + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(player.getId())) { + possibleTargets.add(targetId); + } } } } diff --git a/Mage.Sets/src/mage/cards/r/RazorBoomerang.java b/Mage.Sets/src/mage/cards/r/RazorBoomerang.java index 756f0ea048..20fe9169b1 100644 --- a/Mage.Sets/src/mage/cards/r/RazorBoomerang.java +++ b/Mage.Sets/src/mage/cards/r/RazorBoomerang.java @@ -43,7 +43,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class RazorBoomerang extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.EQUIPMENT); - // Equipped creature has "{tap}, Unattach Razor Boomerang: Razor Boomerang deals 1 damage to target creature or player. Return Razor Boomerang to its owner's hand." + // Equipped creature has "{tap}, Unattach Razor Boomerang: Razor Boomerang deals 1 damage to any target. Return Razor Boomerang to its owner's hand." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RazorBoomerangEffect(this.getId()), new TapSourceCost()); gainAbility.addCost(new UnattachCost(this.getName(), this.getId())); - gainAbility.addTarget(new TargetCreatureOrPlayer()); + gainAbility.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.EQUIPMENT))); // Equip {2} @@ -77,7 +77,7 @@ public class RazorBoomerang extends CardImpl { class RazorBoomerangEffect extends OneShotEffect { - private static String text = "Razor Boomerang deals 1 damage to target creature or player. Return Razor Boomerang to its owner's hand"; + private static String text = "Razor Boomerang deals 1 damage to any target. Return Razor Boomerang to its owner's hand"; private UUID attachmentid; RazorBoomerangEffect(UUID attachmentid) { diff --git a/Mage.Sets/src/mage/cards/r/RazorfinHunter.java b/Mage.Sets/src/mage/cards/r/RazorfinHunter.java index d7a3466b97..1e62683a6c 100644 --- a/Mage.Sets/src/mage/cards/r/RazorfinHunter.java +++ b/Mage.Sets/src/mage/cards/r/RazorfinHunter.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class RazorfinHunter extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RazortipWhip.java b/Mage.Sets/src/mage/cards/r/RazortipWhip.java index 9d392da8d4..d1b201ab8f 100644 --- a/Mage.Sets/src/mage/cards/r/RazortipWhip.java +++ b/Mage.Sets/src/mage/cards/r/RazortipWhip.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -46,12 +46,12 @@ import mage.target.common.TargetOpponent; public class RazortipWhip extends CardImpl { public RazortipWhip(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // {1}, {tap}: Razortip Whip deals 1 damage to target opponent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java b/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java index bc8f9af5dd..f4e5258441 100644 --- a/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java +++ b/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.DevoidAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class RealityHemorrhage extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - // Reality Hemorrhage deals 2 damage to target creature or player. + // Reality Hemorrhage deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public RealityHemorrhage(final RealityHemorrhage card) { diff --git a/Mage.Sets/src/mage/cards/r/RecklessAbandon.java b/Mage.Sets/src/mage/cards/r/RecklessAbandon.java index 08a1a7b10d..79095c7c5d 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessAbandon.java +++ b/Mage.Sets/src/mage/cards/r/RecklessAbandon.java @@ -35,7 +35,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,9 +49,9 @@ public class RecklessAbandon extends CardImpl { // As an additional cost to cast Reckless Abandon, sacrifice a creature. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - // Reckless Abandon deals 4 damage to target creature or player. + // Reckless Abandon deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public RecklessAbandon(final RecklessAbandon card) { diff --git a/Mage.Sets/src/mage/cards/r/RecklessAssault.java b/Mage.Sets/src/mage/cards/r/RecklessAssault.java index 0a75c670f6..77338105ca 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessAssault.java +++ b/Mage.Sets/src/mage/cards/r/RecklessAssault.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,10 +49,10 @@ public class RecklessAssault extends CardImpl { public RecklessAssault(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}{R}"); - // {1}, Pay 2 life: Reckless Assault deals 1 damage to target creature or player. + // {1}, Pay 2 life: Reckless Assault deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new PayLifeCost(2)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java b/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java index b39024d81c..7337204d56 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java +++ b/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class RecklessEmbermage extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {1}{R}: Reckless Embermage deals 1 damage to target creature or player and 1 damage to itself. + // {1}{R}: Reckless Embermage deals 1 damage to any target and 1 damage to itself. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addEffect(new DamageSelfEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java index ae8d8ca14d..67d1fc0fdd 100644 --- a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java +++ b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -48,10 +48,10 @@ public class RedSunsZenith extends CardImpl { public RedSunsZenith(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Red Sun's Zenith deals X damage to target creature or player. + // Red Sun's Zenith deals X damage to any target. // If a creature dealt damage this way would die this turn, exile it instead. // Shuffle Red Sun's Zenith into its owner's library. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance()); diff --git a/Mage.Sets/src/mage/cards/r/RefractionTrap.java b/Mage.Sets/src/mage/cards/r/RefractionTrap.java index 1de57ac5a2..3dcfdb627b 100644 --- a/Mage.Sets/src/mage/cards/r/RefractionTrap.java +++ b/Mage.Sets/src/mage/cards/r/RefractionTrap.java @@ -47,7 +47,7 @@ import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetSource; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.SpellsCastWatcher; import java.util.List; @@ -65,9 +65,9 @@ public class RefractionTrap extends CardImpl { // If an opponent cast a red instant or sorcery spell this turn, you may pay {W} rather than pay Refraction Trap's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl("{W}"), RefractionTrapCondition.instance), new SpellsCastWatcher()); - // Prevent the next 3 damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, Refraction Trap deals that much damage to target creature or player. + // Prevent the next 3 damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, Refraction Trap deals that much damage to any target. this.getSpellAbility().addEffect(new RefractionTrapPreventDamageEffect(Duration.EndOfTurn, 3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public RefractionTrap(final RefractionTrap card) { @@ -117,7 +117,7 @@ class RefractionTrapPreventDamageEffect extends PreventionEffectImpl { super(duration, amount, false, false); this.amount = amount; this.target = new TargetSource(); - staticText = "The next " + amount + " damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, {this} deals that much damage to target creature or player"; + staticText = "The next " + amount + " damage that a source of your choice would deal to you and/or permanents you control this turn. If damage is prevented this way, {this} deals that much damage to any target"; } public RefractionTrapPreventDamageEffect(final RefractionTrapPreventDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RekindledFlame.java b/Mage.Sets/src/mage/cards/r/RekindledFlame.java index c8fde66460..7d9a9ab336 100644 --- a/Mage.Sets/src/mage/cards/r/RekindledFlame.java +++ b/Mage.Sets/src/mage/cards/r/RekindledFlame.java @@ -41,7 +41,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class RekindledFlame extends CardImpl { public RekindledFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); - // Rekindled Flame deals 4 damage to target creature or player. + // Rekindled Flame deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + 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( diff --git a/Mage.Sets/src/mage/cards/r/ReleaseTheAnts.java b/Mage.Sets/src/mage/cards/r/ReleaseTheAnts.java index d987d2ba16..7448783482 100644 --- a/Mage.Sets/src/mage/cards/r/ReleaseTheAnts.java +++ b/Mage.Sets/src/mage/cards/r/ReleaseTheAnts.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class ReleaseTheAnts extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Release the Ants deals 1 damage to target creature or player. Clash with an opponent. If you win, return Release the Ants to its owner's hand. + // Release the Ants deals 1 damage to any target. Clash with an opponent. If you win, return Release the Ants to its owner's hand. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(ClashWinReturnToHandSpellEffect.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/r/Remedy.java b/Mage.Sets/src/mage/cards/r/Remedy.java index 0a9d460f54..87fd088635 100644 --- a/Mage.Sets/src/mage/cards/r/Remedy.java +++ b/Mage.Sets/src/mage/cards/r/Remedy.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -47,7 +47,7 @@ public class Remedy extends CardImpl { // Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(5)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5)); } public Remedy(final Remedy card) { diff --git a/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java b/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java index 315b5a02c3..e8cfb2a295 100644 --- a/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java +++ b/Mage.Sets/src/mage/cards/r/RepeatingBarrage.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -51,9 +51,9 @@ public class RepeatingBarrage extends CardImpl { public RepeatingBarrage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); - // Repeating Barrage deals 3 damage to target creature or player. + // Repeating Barrage deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Raid — {3}{R}{R}: Return Repeating Barrage from your graveyard to your hand. Activate this ability only if you attacked with a creature this turn. Ability ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, diff --git a/Mage.Sets/src/mage/cards/r/ResoundingThunder.java b/Mage.Sets/src/mage/cards/r/ResoundingThunder.java index 74d30bb447..e03c8b1ad3 100644 --- a/Mage.Sets/src/mage/cards/r/ResoundingThunder.java +++ b/Mage.Sets/src/mage/cards/r/ResoundingThunder.java @@ -36,7 +36,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,14 +48,14 @@ public class ResoundingThunder extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Resounding Thunder deals 3 damage to target creature or player. + // Resounding Thunder deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Cycling {5}{B}{R}{G} this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{B}{R}{G}"))); - // When you cycle Resounding Thunder, it deals 6 damage to target creature or player. + // When you cycle Resounding Thunder, it deals 6 damage to any target. Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(6, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java b/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java index d136ae69c8..7ea2852c51 100644 --- a/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java +++ b/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class RevekaWizardSavant extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); - // {tap}: Reveka, Wizard Savant deals 2 damage to target creature or player and doesn't untap during your next untap step. + // {tap}: Reveka, Wizard Savant deals 2 damage to any target and doesn't untap during your next untap step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new DontUntapInControllersNextUntapStepSourceEffect()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RhysticLightning.java b/Mage.Sets/src/mage/cards/r/RhysticLightning.java index 83d3f35dae..03e8371e45 100644 --- a/Mage.Sets/src/mage/cards/r/RhysticLightning.java +++ b/Mage.Sets/src/mage/cards/r/RhysticLightning.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DoUnlessTargetPlayerOrTargetsControllerPays import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,12 +46,12 @@ public class RhysticLightning extends CardImpl { public RhysticLightning(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Rhystic Lightning deals 4 damage to target creature or player unless that creature's controller or that player pays {2}. If he or she does, Rhystic Lightning deals 2 damage to the creature or player. + // Rhystic Lightning deals 4 damage to any target unless that creature's controller or that player pays {2}. If he or she does, Rhystic Lightning deals 2 damage to the creature or player. Effect effect = new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new DamageTargetEffect(4), new DamageTargetEffect(2), new ManaCostsImpl("{2}"), "Pay {2} to have {this} deal 2 damage instead of 4 damage?"); - effect.setText("{this} deals 4 damage to target creature or player unless that creature's controller or that player pays {2}. If he or she does, {this} deals 2 damage to the creature or player"); + effect.setText("{this} deals 4 damage to any target unless that creature's controller or that player pays {2}. If he or she does, {this} deals 2 damage to the creature or player"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public RhysticLightning(final RhysticLightning card) { diff --git a/Mage.Sets/src/mage/cards/r/RiddleOfLightning.java b/Mage.Sets/src/mage/cards/r/RiddleOfLightning.java index 6c44f191bd..89860eaca4 100644 --- a/Mage.Sets/src/mage/cards/r/RiddleOfLightning.java +++ b/Mage.Sets/src/mage/cards/r/RiddleOfLightning.java @@ -41,7 +41,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,15 +50,14 @@ import mage.target.common.TargetCreatureOrPlayer; public class RiddleOfLightning extends CardImpl { public RiddleOfLightning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}"); - - // Choose target creature or player. Scry 3, then reveal the top card of your library. Riddle of Lightning deals damage equal to that card's converted mana cost to that creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Choose any target. Scry 3, then reveal the top card of your library. Riddle of Lightning deals damage equal to that card's converted mana cost to that creature or player. + this.getSpellAbility().addTarget(new TargetAnyTarget()); Effect effect = new ScryEffect(3); - effect.setText("Choose target creature or player. Scry 3"); + effect.setText("Choose any target. Scry 3"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new RiddleOfLightningEffect()); + this.getSpellAbility().addEffect(new RiddleOfLightningEffect()); } public RiddleOfLightning(final RiddleOfLightning card) { @@ -72,21 +71,21 @@ public class RiddleOfLightning extends CardImpl { } class RiddleOfLightningEffect extends OneShotEffect { - + public RiddleOfLightningEffect() { super(Outcome.Damage); - this.staticText = ", then reveal the top card of your library. {this} deals damage equal to that card's converted mana cost to that creature or player"; + this.staticText = ", then reveal the top card of your library. {this} deals damage equal to that card's converted mana cost to that permanent or player"; } - + public RiddleOfLightningEffect(final RiddleOfLightningEffect effect) { super(effect); } - + @Override public RiddleOfLightningEffect copy() { return new RiddleOfLightningEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -104,8 +103,8 @@ class RiddleOfLightningEffect extends OneShotEffect { if (targetPlayer != null) { targetPlayer.damage(card.getConvertedManaCost(), source.getSourceId(), game, false, true); return true; - } - } + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/cards/r/RiftBolt.java b/Mage.Sets/src/mage/cards/r/RiftBolt.java index 40c00631e5..cb0d541cd4 100644 --- a/Mage.Sets/src/mage/cards/r/RiftBolt.java +++ b/Mage.Sets/src/mage/cards/r/RiftBolt.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.SuspendAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class RiftBolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - // Rift Bolt deals 3 damage to target creature or player. + // Rift Bolt deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Suspend 1-{R} this.addAbility(new SuspendAbility(1, new ManaCostsImpl("{R}"), this)); diff --git a/Mage.Sets/src/mage/cards/r/RiteOfConsumption.java b/Mage.Sets/src/mage/cards/r/RiteOfConsumption.java index 16f3cb594c..824ac1913d 100644 --- a/Mage.Sets/src/mage/cards/r/RiteOfConsumption.java +++ b/Mage.Sets/src/mage/cards/r/RiteOfConsumption.java @@ -40,8 +40,8 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -50,14 +50,13 @@ import mage.target.common.TargetControlledCreaturePermanent; public class RiteOfConsumption extends CardImpl { public RiteOfConsumption(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // As an additional cost to cast Rite of Consumption, sacrifice a creature. - this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false))); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), false))); // Rite of Consumption deals damage equal to the sacrificed creature's power to target player. You gain life equal to the damage dealt this way. this.getSpellAbility().addEffect(new RiteOfConsumptionEffect()); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public RiteOfConsumption(final RiteOfConsumption card) { @@ -74,7 +73,7 @@ class RiteOfConsumptionEffect extends OneShotEffect { public RiteOfConsumptionEffect() { super(Outcome.Benefit); - this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player. You gain life equal to the damage dealt this way"; + this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player or planeswalker. You gain life equal to the damage dealt this way"; } public RiteOfConsumptionEffect(final RiteOfConsumptionEffect effect) { @@ -88,14 +87,13 @@ class RiteOfConsumptionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); - if (targetPlayer != null && controller != null) { + if (controller != null) { Permanent sacrificedCreature = null; - for (Cost cost :source.getCosts()) { + for (Cost cost : source.getCosts()) { if (cost instanceof SacrificeTargetCost) { SacrificeTargetCost sacCost = (SacrificeTargetCost) cost; - for(Permanent permanent : sacCost.getPermanents()) { + for (Permanent permanent : sacCost.getPermanents()) { sacrificedCreature = permanent; break; } @@ -104,7 +102,7 @@ class RiteOfConsumptionEffect extends OneShotEffect { if (sacrificedCreature != null) { int damage = sacrificedCreature.getPower().getValue(); if (damage > 0) { - int damageDealt = targetPlayer.damage(damage, source.getSourceId(), game, false, true); + int damageDealt = game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true); if (damageDealt > 0) { controller.gainLife(damage, game, source); } diff --git a/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java b/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java index 180d2fff81..c4b995cc01 100644 --- a/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java +++ b/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java @@ -43,7 +43,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author michael.napoleon@gmail.com @@ -53,8 +53,8 @@ public class RoarOfTheCrowd extends CardImpl { public RoarOfTheCrowd(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); - // Choose a creature type. Roar of the Crowd deals damage to target creature or player equal to the number of permanents you control of the chosen type. - TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); + // Choose a creature type. Roar of the Crowd deals damage to any target equal to the number of permanents you control of the chosen type. + TargetAnyTarget target = new TargetAnyTarget(); this.getSpellAbility().addTarget(target); this.getSpellAbility().addEffect(new RoarOfTheCrowdEffect()); } @@ -73,7 +73,7 @@ class RoarOfTheCrowdEffect extends OneShotEffect { RoarOfTheCrowdEffect() { super(Outcome.LoseLife); - this.staticText = "Choose a creature type. {this} deals damage to target creature or player equal to the number of permanents you control of the chosen type."; + this.staticText = "Choose a creature type. {this} deals damage to any target equal to the number of permanents you control of the chosen type."; } RoarOfTheCrowdEffect(final RoarOfTheCrowdEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RocketLauncher.java b/Mage.Sets/src/mage/cards/r/RocketLauncher.java index dfe832e41b..0241898e80 100644 --- a/Mage.Sets/src/mage/cards/r/RocketLauncher.java +++ b/Mage.Sets/src/mage/cards/r/RocketLauncher.java @@ -44,7 +44,7 @@ import mage.constants.WatcherScope; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.Watcher; /** @@ -57,10 +57,10 @@ public class RocketLauncher extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); Watcher watcher = new RocketLauncherWatcher(this.getId()); - // {2}: Rocket Launcher deals 1 damage to target creature or player. Destroy Rocket Launcher at the beginning of the next end step. Activate this ability only if you've controlled Rocket Launcher continuously since the beginning of your most recent turn. + // {2}: Rocket Launcher deals 1 damage to any target. Destroy Rocket Launcher at the beginning of the next end step. Activate this ability only if you've controlled Rocket Launcher continuously since the beginning of your most recent turn. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2), ControlledTurnCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DestroySourceEffect(true)))); this.addAbility(ability, watcher); diff --git a/Mage.Sets/src/mage/cards/r/RodOfRuin.java b/Mage.Sets/src/mage/cards/r/RodOfRuin.java index e9d5a10847..be1dbda56f 100644 --- a/Mage.Sets/src/mage/cards/r/RodOfRuin.java +++ b/Mage.Sets/src/mage/cards/r/RodOfRuin.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,7 +49,7 @@ public class RodOfRuin extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RollingThunder.java b/Mage.Sets/src/mage/cards/r/RollingThunder.java index 8f39fb7b80..78a21e7ac8 100644 --- a/Mage.Sets/src/mage/cards/r/RollingThunder.java +++ b/Mage.Sets/src/mage/cards/r/RollingThunder.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -48,7 +48,7 @@ public class RollingThunder extends CardImpl { // Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players. DynamicValue xValue = new ManacostVariableValue(); this.getSpellAbility().addEffect(new DamageMultiEffect(xValue)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(xValue)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue)); } public RollingThunder(final RollingThunder card) { diff --git a/Mage.Sets/src/mage/cards/r/RootwaterHunter.java b/Mage.Sets/src/mage/cards/r/RootwaterHunter.java index bf870ea1fa..b3528a0b8a 100644 --- a/Mage.Sets/src/mage/cards/r/RootwaterHunter.java +++ b/Mage.Sets/src/mage/cards/r/RootwaterHunter.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,7 +53,7 @@ public class RootwaterHunter extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java b/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java index 76573a4c55..0732874d28 100644 --- a/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java +++ b/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java @@ -46,7 +46,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -64,9 +64,9 @@ public class RumblingAftershocks extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - // Whenever you cast a kicked spell, you may have Rumbling Aftershocks deal damage to target creature or player equal to the number of times that spell was kicked. + // Whenever you cast a kicked spell, you may have Rumbling Aftershocks deal damage to any target equal to the number of times that spell was kicked. Ability ability = new RumblingAftershocksTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -129,7 +129,7 @@ class RumblingAftershocksDealDamageEffect extends OneShotEffect { public RumblingAftershocksDealDamageEffect() { super(Outcome.Damage); - this.staticText = "you may have {this} deal damage to target creature or player equal to the number of times that spell was kicked"; + this.staticText = "you may have {this} deal damage to any target equal to the number of times that spell was kicked"; } public RumblingAftershocksDealDamageEffect(final RumblingAftershocksDealDamageEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java index cbad26db52..d428266ff6 100644 --- a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java +++ b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java @@ -41,7 +41,6 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; /** * @@ -50,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class RushingTideZubera extends CardImpl { public RushingTideZubera(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.subtype.add(SubType.ZUBERA); this.subtype.add(SubType.SPIRIT); @@ -58,9 +57,8 @@ public 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 ConditionalTriggeredAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(3)), new RushingTideZuberaCondition(), "When {this} dies, if 4 or more damage was dealt to it this turn, draw three cards."); - ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -75,12 +73,13 @@ public class RushingTideZubera extends CardImpl { } class RushingTideZuberaCondition implements Condition { + @Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent == null) { permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - } + } return permanent.getDamage() > 3; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/s/SamiteArcher.java b/Mage.Sets/src/mage/cards/s/SamiteArcher.java index 8337fb9361..3486c9ce35 100644 --- a/Mage.Sets/src/mage/cards/s/SamiteArcher.java +++ b/Mage.Sets/src/mage/cards/s/SamiteArcher.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,14 +57,14 @@ public class SamiteArcher extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {T}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); - // {T}: Samite Archer deals 1 damage to target creature or player. + // {T}: Samite Archer deals 1 damage to any target. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SamiteHealer.java b/Mage.Sets/src/mage/cards/s/SamiteHealer.java index 6d0ca02046..461e623999 100644 --- a/Mage.Sets/src/mage/cards/s/SamiteHealer.java +++ b/Mage.Sets/src/mage/cards/s/SamiteHealer.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class SamiteHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SamutTheTested.java b/Mage.Sets/src/mage/cards/s/SamutTheTested.java index 697df0fdfc..603a20ff48 100644 --- a/Mage.Sets/src/mage/cards/s/SamutTheTested.java +++ b/Mage.Sets/src/mage/cards/s/SamutTheTested.java @@ -45,7 +45,7 @@ import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInLibrary; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; import mage.target.common.TargetCreaturePermanent; /** @@ -69,7 +69,7 @@ public class SamutTheTested extends CardImpl { // -2: Samut, the Tested deals 2 damage divided as you choose among one or two target creatures and/or players. effect = new DamageMultiEffect(2); ability = new LoyaltyAbility(effect, -2); - ability.addTarget(new TargetCreatureOrPlayerAmount(2)); + ability.addTarget(new TargetAnyTargetAmount(2)); this.addAbility(ability); // -7: Search your library or up to two creature and/or planeswalkercards, put them onto the battlefield, then shuffle your library. diff --git a/Mage.Sets/src/mage/cards/s/SanctumCustodian.java b/Mage.Sets/src/mage/cards/s/SanctumCustodian.java index 7446fef12d..01317eb1cb 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumCustodian.java +++ b/Mage.Sets/src/mage/cards/s/SanctumCustodian.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class SanctumCustodian extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SanctumGuardian.java b/Mage.Sets/src/mage/cards/s/SanctumGuardian.java index a7f2611e36..aa1e519953 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumGuardian.java +++ b/Mage.Sets/src/mage/cards/s/SanctumGuardian.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,10 +54,10 @@ public class SanctumGuardian extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(4); - // Sacrifice Sanctum Guardian: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. + // Sacrifice Sanctum Guardian: The next time a source of your choice would deal damage to any target this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToTargetEffect(Duration.EndOfTurn), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java index 68278b8fec..357fb42949 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java @@ -49,12 +49,11 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.DragonToken2; -import mage.game.permanent.token.TokenImpl; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.Target; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -63,7 +62,7 @@ import mage.target.common.TargetCreaturePermanent; public class SarkhanTheMad extends CardImpl { public SarkhanTheMad(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{R}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.SARKHAN); this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); @@ -76,7 +75,7 @@ public class SarkhanTheMad extends CardImpl { this.addAbility(sacAbility); Ability damageAbility = new LoyaltyAbility(new SarkhanTheMadDragonDamageEffect(), -4); - damageAbility.addTarget(new TargetPlayer()); + damageAbility.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(damageAbility); } @@ -162,7 +161,7 @@ class SarkhanTheMadSacEffect extends OneShotEffect { class SarkhanTheMadDragonDamageEffect extends OneShotEffect { - private static final String effectText = "Each Dragon creature you control deals damage equal to its power to target player"; + private static final String effectText = "Each Dragon creature you control deals damage equal to its power to target player or planeswalker"; private static final FilterControlledPermanent filter; static { @@ -183,10 +182,9 @@ class SarkhanTheMadDragonDamageEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { List<Permanent> dragons = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - Player player = game.getPlayer(source.getTargets().getFirstTarget()); - if (player != null && dragons != null && !dragons.isEmpty()) { + if (dragons != null && !dragons.isEmpty()) { for (Permanent dragon : dragons) { - player.damage(dragon.getPower().getValue(), dragon.getId(), game, false, true); + game.damagePlayerOrPlaneswalker(source.getFirstTarget(), dragon.getPower().getValue(), dragon.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/cards/s/SarkhansRage.java b/Mage.Sets/src/mage/cards/s/SarkhansRage.java index 6a367f0531..bf0b37f13d 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhansRage.java +++ b/Mage.Sets/src/mage/cards/s/SarkhansRage.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,9 +49,9 @@ public class SarkhansRage extends CardImpl { public SarkhansRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}"); - // Sarkhan's Rage deals 5 damage to target creature or player. If you control no Dragons, Sarkhan's Rage deals 2 damage to you. + // Sarkhan's Rage deals 5 damage to any target. If you control no Dragons, Sarkhan's Rage deals 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageControllerEffect(2), new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(SubType.DRAGON,"you control no Dragons"), ComparisonType.EQUAL_TO, 0) )); diff --git a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java index e86ff94fec..419a57fb5d 100644 --- a/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java +++ b/Mage.Sets/src/mage/cards/s/SavraQueenOfTheGolgari.java @@ -50,7 +50,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * diff --git a/Mage.Sets/src/mage/cards/s/ScaldingDevil.java b/Mage.Sets/src/mage/cards/s/ScaldingDevil.java index 814f97a33d..4176397a5f 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingDevil.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingDevil.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,7 +47,7 @@ import mage.target.TargetPlayer; public class ScaldingDevil extends CardImpl { public ScaldingDevil(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.DEVIL); this.power = new MageInt(1); @@ -55,7 +55,7 @@ public class ScaldingDevil extends CardImpl { // {2}{R}: Scalding Devil deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}{R}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScaldingTongs.java b/Mage.Sets/src/mage/cards/s/ScaldingTongs.java index b92a962d40..d901028149 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingTongs.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingTongs.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @author fireshoes @@ -51,9 +51,13 @@ public class ScaldingTongs extends CardImpl { // At the beginning of your upkeep, if you have three or fewer cards in hand, Scalding Tongs deals 1 damage to target opponent. TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.YOU, false); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 4); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have three or fewer cards in hand, {this} deals 1 damage to target opponent.")); + this.addAbility(new ConditionalTriggeredAbility( + 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." + )); } public ScaldingTongs(final ScaldingTongs card) { diff --git a/Mage.Sets/src/mage/cards/s/Scaldkin.java b/Mage.Sets/src/mage/cards/s/Scaldkin.java index 061a8ca69e..f0e9471821 100644 --- a/Mage.Sets/src/mage/cards/s/Scaldkin.java +++ b/Mage.Sets/src/mage/cards/s/Scaldkin.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,10 +57,10 @@ public class Scaldkin extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {2}{R}, Sacrifice Scaldkin: Scaldkin deals 2 damage to target creature or player. + // {2}{R}, Sacrifice Scaldkin: Scaldkin deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java b/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java index 171f263e09..804350d75a 100644 --- a/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java +++ b/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java @@ -40,8 +40,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author nantuko @@ -49,12 +48,12 @@ import mage.target.TargetPlayer; public class ScepterOfEmpires extends CardImpl { public ScepterOfEmpires(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); // {tap}: Scepter of Empires deals 1 damage to target player. It deals 3 damage to that player instead if you control artifacts named Crown of Empires and Throne of Empires. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScepterOfEmpiresEffect(), new GenericManaCost(0)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -72,7 +71,7 @@ class ScepterOfEmpiresEffect extends OneShotEffect { public ScepterOfEmpiresEffect() { super(Outcome.PutCreatureInPlay); - staticText = "Scepter of Empires deals 1 damage to target player. It deals 3 damage to that player instead if you control artifacts named Crown of Empires and Throne of Empires"; + staticText = "Scepter of Empires deals 1 damage to target player or planeswalker. It deals 3 damage to that player or planeswalker instead if you control artifacts named Crown of Empires and Throne of Empires"; } public ScepterOfEmpiresEffect(ScepterOfEmpiresEffect effect) { @@ -89,17 +88,12 @@ class ScepterOfEmpiresEffect extends OneShotEffect { } else if (permanent.getName().equals("Crown of Empires")) { crown = true; } - if (throne && crown) break; + if (throne && crown) { + break; + } } - int amount = throne && crown ? 3 : 1; - - Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if (player != null) { - player.damage(amount, source.getSourceId(), game, false, true); - return true; - } - return false; + return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), amount, source.getSourceId(), game, false, true) > 0; } @Override diff --git a/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java b/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java index 91e8dad3da..cbfdcb5d6a 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java +++ b/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java @@ -41,8 +41,8 @@ import mage.constants.ColoredManaSymbol; import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -58,7 +58,7 @@ public class ScorchedRusalka extends CardImpl { this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ColoredManaCost(ColoredManaSymbol.R)); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScorchingLava.java b/Mage.Sets/src/mage/cards/s/ScorchingLava.java index 3ce722d731..09653d9b66 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchingLava.java +++ b/Mage.Sets/src/mage/cards/s/ScorchingLava.java @@ -47,7 +47,7 @@ import mage.constants.Duration; import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,7 +60,7 @@ public class ScorchingLava extends CardImpl { // Kicker {R} this.addAbility(new KickerAbility("{R}")); - // Scorching Lava deals 2 damage to target creature or player. If Scorching Lava was kicked, that creature can't be regenerated this turn and if it would die this turn, exile it instead. + // Scorching Lava deals 2 damage to any target. If Scorching Lava was kicked, that creature can't be regenerated this turn and if it would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( new CantRegenerateTargetEffect(Duration.EndOfTurn, "that creature"), new LockedInCondition(KickedCondition.instance))); @@ -68,7 +68,7 @@ public class ScorchingLava extends CardImpl { new ExileTargetIfDiesEffect(), new LockedInCondition(KickedCondition.instance) ).setText("and if it would die this turn, exile it instead")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ScorchingLava(final ScorchingLava card) { diff --git a/Mage.Sets/src/mage/cards/s/ScorchingMissile.java b/Mage.Sets/src/mage/cards/s/ScorchingMissile.java index ce756796d5..b535c54d54 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchingMissile.java +++ b/Mage.Sets/src/mage/cards/s/ScorchingMissile.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,7 +48,7 @@ public class ScorchingMissile extends CardImpl { // Scorching Missile deals 4 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); // Flashback {9}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{9}{R}"), TimingRule.SORCERY)); diff --git a/Mage.Sets/src/mage/cards/s/ScorchingSpear.java b/Mage.Sets/src/mage/cards/s/ScorchingSpear.java index 14fd6eec6d..77c5bcd165 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchingSpear.java +++ b/Mage.Sets/src/mage/cards/s/ScorchingSpear.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,9 +43,9 @@ public class ScorchingSpear extends CardImpl { public ScorchingSpear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Scorching Spear deals 1 damage to target creature or player. + // Scorching Spear deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ScorchingSpear(final ScorchingSpear card) { diff --git a/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java b/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java index afb92c7a53..e108894cfc 100644 --- a/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java +++ b/Mage.Sets/src/mage/cards/s/ScourgeOfValkas.java @@ -47,7 +47,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,7 +63,7 @@ public class ScourgeOfValkas extends CardImpl { filter2.add(new SubtypePredicate(SubType.DRAGON)); } - private static final String rule = "Whenever {this} or another Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control."; + private static final String rule = "Whenever {this} or another Dragon enters the battlefield under your control, it deals X damage to any target, where X is the number of Dragons you control."; public ScourgeOfValkas(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{R}"); @@ -76,10 +76,10 @@ public class ScourgeOfValkas extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Scourge of Valkas or another Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control. + // Whenever Scourge of Valkas or another Dragon enters the battlefield under your control, it deals X damage to any target, where X is the number of Dragons you control. DynamicValue dragons = new PermanentsOnBattlefieldCount(filter2); Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(dragons), filter, false, rule); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {R}: Scourge of Valkas gets +1/+0 until end of turn. diff --git a/Mage.Sets/src/mage/cards/s/ScrapyardSalvo.java b/Mage.Sets/src/mage/cards/s/ScrapyardSalvo.java index 37fd4d6692..a722f442c8 100644 --- a/Mage.Sets/src/mage/cards/s/ScrapyardSalvo.java +++ b/Mage.Sets/src/mage/cards/s/ScrapyardSalvo.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterArtifactCard; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -45,7 +45,7 @@ public class ScrapyardSalvo extends CardImpl { public ScrapyardSalvo(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(new CardsInControllerGraveyardCount(new FilterArtifactCard()))); } diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java index 3cc12b7843..39f59ba37f 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingDoomEngine.java @@ -42,7 +42,7 @@ import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -58,7 +58,7 @@ public class ScuttlingDoomEngine extends CardImpl { public ScuttlingDoomEngine(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{6}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); this.subtype.add(SubType.CONSTRUCT); this.power = new MageInt(6); @@ -68,7 +68,7 @@ public class ScuttlingDoomEngine extends CardImpl { this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); // When Scuttling Doom Engine dies, it deals 6 damage to target opponnent Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(6, "it"), false); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SealOfFire.java b/Mage.Sets/src/mage/cards/s/SealOfFire.java index df8d782d44..dbd0072b29 100644 --- a/Mage.Sets/src/mage/cards/s/SealOfFire.java +++ b/Mage.Sets/src/mage/cards/s/SealOfFire.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class SealOfFire extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}"); - // Sacrifice Seal of Fire: Seal of Fire deals 2 damage to target creature or player. + // Sacrifice Seal of Fire: Seal of Fire deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SearingBlaze.java b/Mage.Sets/src/mage/cards/s/SearingBlaze.java index d06a022fae..e8639acc0f 100644 --- a/Mage.Sets/src/mage/cards/s/SearingBlaze.java +++ b/Mage.Sets/src/mage/cards/s/SearingBlaze.java @@ -43,7 +43,7 @@ import mage.game.permanent.Permanent; import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.watchers.common.LandfallWatcher; /** @@ -54,11 +54,11 @@ import mage.watchers.common.LandfallWatcher; public class SearingBlaze extends CardImpl { public SearingBlaze(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{R}"); // Searing Blaze deals 1 damage to target player and 1 damage to target creature that player controls. // Landfall - If you had a land enter the battlefield under your control this turn, Searing Blaze deals 3 damage to that player and 3 damage to that creature instead. - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addTarget(new SearingBlazeTarget()); this.getSpellAbility().addEffect(new SearingBlazeEffect()); this.getSpellAbility().addWatcher(new LandfallWatcher()); @@ -79,7 +79,7 @@ class SearingBlazeEffect extends OneShotEffect { public SearingBlazeEffect() { super(Outcome.Damage); - staticText = "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead"; + staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to target creature that player or that planeswalker’s controller controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player or planeswalker and 3 damage to that creature instead."; } public SearingBlazeEffect(final SearingBlazeEffect effect) { @@ -94,15 +94,12 @@ class SearingBlazeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { LandfallWatcher watcher = (LandfallWatcher) game.getState().getWatchers().get(LandfallWatcher.class.getSimpleName()); - Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); int damage = 1; if (watcher != null && watcher.landPlayed(source.getControllerId())) { damage = 3; } - if (player != null) { - player.damage(damage, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), damage, source.getSourceId(), game, false, true); if (creature != null) { creature.damage(damage, source.getSourceId(), game, false, true); } @@ -123,7 +120,11 @@ class SearingBlazeTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - UUID firstTarget = source.getFirstTarget(); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + UUID firstTarget = player.getId(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -138,10 +139,13 @@ class SearingBlazeTarget extends TargetPermanent { MageObject object = game.getObject(sourceId); if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - for (UUID targetId : availablePossibleTargets) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null && permanent.getControllerId().equals(playerId)) { - possibleTargets.add(targetId); + Player player = game.getPlayerOrPlaneswalkerController(playerId); + if (player != null) { + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(player.getId())) { + possibleTargets.add(targetId); + } } } } diff --git a/Mage.Sets/src/mage/cards/s/SearingFlesh.java b/Mage.Sets/src/mage/cards/s/SearingFlesh.java index e1ad9e9fa9..da133c7c67 100644 --- a/Mage.Sets/src/mage/cards/s/SearingFlesh.java +++ b/Mage.Sets/src/mage/cards/s/SearingFlesh.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -41,10 +41,10 @@ import mage.target.common.TargetOpponent; public class SearingFlesh extends CardImpl { public SearingFlesh(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{R}"); // Searing Flesh deals 7 damage to target opponent. - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageTargetEffect(7)); } diff --git a/Mage.Sets/src/mage/cards/s/SearingMeditation.java b/Mage.Sets/src/mage/cards/s/SearingMeditation.java index 527fa2773e..030c2788f7 100644 --- a/Mage.Sets/src/mage/cards/s/SearingMeditation.java +++ b/Mage.Sets/src/mage/cards/s/SearingMeditation.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; import mage.game.events.GameEvent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class SearingMeditation extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{W}"); - // Whenever you gain life, you may pay {2}. If you do, Searing Meditation deals 2 damage to target creature or player. + // Whenever you gain life, you may pay {2}. If you do, Searing Meditation deals 2 damage to any target. Ability ability = new SimpleTriggeredAbility(Zone.BATTLEFIELD, GameEvent.EventType.GAINED_LIFE, new DoIfCostPaid(new DamageTargetEffect(2), new GenericManaCost(2)), "Whenever you gain life, ", true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SearingSpear.java b/Mage.Sets/src/mage/cards/s/SearingSpear.java index b038849476..fbb4e1659b 100644 --- a/Mage.Sets/src/mage/cards/s/SearingSpear.java +++ b/Mage.Sets/src/mage/cards/s/SearingSpear.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class SearingSpear extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Searing Spear deals 3 damage to target creature or player. + // Searing Spear deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SearingSpear(final SearingSpear card) { diff --git a/Mage.Sets/src/mage/cards/s/SearingTouch.java b/Mage.Sets/src/mage/cards/s/SearingTouch.java index 68de383ca2..0c15e6aef0 100644 --- a/Mage.Sets/src/mage/cards/s/SearingTouch.java +++ b/Mage.Sets/src/mage/cards/s/SearingTouch.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class SearingTouch extends CardImpl { // Buyback {4} (You may pay an additional {4} as you cast this spell. If you do, put this card into your hand as it resolves.) this.addAbility(new BuybackAbility("{4}")); - // Searing Touch deals 1 damage to target creature or player. + // Searing Touch deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SearingTouch(final SearingTouch card) { diff --git a/Mage.Sets/src/mage/cards/s/SearingWind.java b/Mage.Sets/src/mage/cards/s/SearingWind.java index e229cb4992..076fddb6f8 100644 --- a/Mage.Sets/src/mage/cards/s/SearingWind.java +++ b/Mage.Sets/src/mage/cards/s/SearingWind.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,8 +44,8 @@ public class SearingWind extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{8}{R}"); - // Searing Wind deals 10 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Searing Wind deals 10 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(10)); } diff --git a/Mage.Sets/src/mage/cards/s/SeismicAssault.java b/Mage.Sets/src/mage/cards/s/SeismicAssault.java index 39b3a16e9e..7bb6d4bbe6 100644 --- a/Mage.Sets/src/mage/cards/s/SeismicAssault.java +++ b/Mage.Sets/src/mage/cards/s/SeismicAssault.java @@ -39,7 +39,7 @@ import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterLandCard; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class SeismicAssault extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{R}{R}"); - // Discard a land card: Seismic Assault deals 2 damage to target creature or player. + // Discard a land card: Seismic Assault deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new DiscardTargetCost(new TargetCardInHand(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SerraPaladin.java b/Mage.Sets/src/mage/cards/s/SerraPaladin.java index c38acc4838..7d36805742 100644 --- a/Mage.Sets/src/mage/cards/s/SerraPaladin.java +++ b/Mage.Sets/src/mage/cards/s/SerraPaladin.java @@ -41,7 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -58,9 +58,9 @@ public class SerraPaladin extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. + // {tap}: Prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // {1}{W}{W}, {tap}: Target creature gains vigilance until end of turn. diff --git a/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java b/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java index b8cced5210..e8ba413383 100644 --- a/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/ShadowGuildmage.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,11 +63,11 @@ public class ShadowGuildmage extends CardImpl { ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); - // {R}, {tap}: Shadow Guildmage deals 1 damage to target creature or player and 1 damage to you. + // {R}, {tap}: Shadow Guildmage deals 1 damage to any target and 1 damage to you. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addEffect(new DamageControllerEffect(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ShardVolley.java b/Mage.Sets/src/mage/cards/s/ShardVolley.java index b90caff89a..33451a4061 100644 --- a/Mage.Sets/src/mage/cards/s/ShardVolley.java +++ b/Mage.Sets/src/mage/cards/s/ShardVolley.java @@ -35,7 +35,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -50,9 +50,9 @@ public class ShardVolley extends CardImpl { // As an additional cost to cast Shard Volley, sacrifice a land. this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT))); - // Shard Volley deals 3 damage to target creature or player. + // Shard Volley deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ShardVolley(final ShardVolley card) { diff --git a/Mage.Sets/src/mage/cards/s/ShieldmageAdvocate.java b/Mage.Sets/src/mage/cards/s/ShieldmageAdvocate.java index 875e88cfff..627d7fe9f7 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/s/ShieldmageAdvocate.java @@ -49,7 +49,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.target.TargetSource; import mage.target.common.TargetCardInOpponentsGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.SecondTargetPointer; /** @@ -65,7 +65,7 @@ public class ShieldmageAdvocate extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - // {tap}: Return target card from an opponent's graveyard to their hand. Prevent all damage that would be dealt to target creature or player this turn by a source of your choice. + // {tap}: Return target card from an opponent's graveyard to their hand. Prevent all damage that would be dealt to any target this turn by a source of your choice. Effect effect = new ReturnFromGraveyardToHandTargetEffect(); effect.setText("Return target card from an opponent's graveyard to their hand"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); @@ -74,7 +74,7 @@ public class ShieldmageAdvocate extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); ability.addTarget(new TargetCardInOpponentsGraveyard(1, 1, new FilterCard(), true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -94,7 +94,7 @@ class ShieldmageAdvocateEffect extends PreventionEffectImpl { public ShieldmageAdvocateEffect() { super(Duration.EndOfTurn, Integer.MAX_VALUE, false); - staticText = "Prevent all damage that would be dealt to target creature or player this turn by a source of your choice"; + staticText = "Prevent all damage that would be dealt to any target this turn by a source of your choice"; this.targetSource = new TargetSource(); } diff --git a/Mage.Sets/src/mage/cards/s/ShieldmatesBlessing.java b/Mage.Sets/src/mage/cards/s/ShieldmatesBlessing.java index 2b2d6226d6..072661adb7 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldmatesBlessing.java +++ b/Mage.Sets/src/mage/cards/s/ShieldmatesBlessing.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,7 +46,7 @@ public class ShieldmatesBlessing extends CardImpl { this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ShieldmatesBlessing(final ShieldmatesBlessing card) { diff --git a/Mage.Sets/src/mage/cards/s/ShiningShoal.java b/Mage.Sets/src/mage/cards/s/ShiningShoal.java index 84dc870b36..ec4ec33919 100644 --- a/Mage.Sets/src/mage/cards/s/ShiningShoal.java +++ b/Mage.Sets/src/mage/cards/s/ShiningShoal.java @@ -51,7 +51,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.TargetSource; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -69,10 +69,10 @@ public class ShiningShoal extends CardImpl { filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter), true))); - // The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to target creature or player instead. + // The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to any target instead. this.getSpellAbility().addEffect(new ShiningShoalRedirectDamageTargetEffect(Duration.EndOfTurn, new ExileFromHandCostCardConvertedMana())); this.getSpellAbility().addTarget(new TargetSource()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ShiningShoal(final ShiningShoal card) { @@ -92,7 +92,7 @@ class ShiningShoalRedirectDamageTargetEffect extends RedirectDamageFromSourceToT public ShiningShoalRedirectDamageTargetEffect(Duration duration, DynamicValue dynamicAmount) { super(duration, 0, true); this.dynamicAmount = dynamicAmount; - staticText = "The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to target creature or player instead"; + staticText = "The next X damage that a source of your choice would deal to you and/or creatures you control this turn is dealt to any target instead"; } public ShiningShoalRedirectDamageTargetEffect(final ShiningShoalRedirectDamageTargetEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/ShivanFire.java b/Mage.Sets/src/mage/cards/s/ShivanFire.java index bbb4778f1e..da76aa6569 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanFire.java +++ b/Mage.Sets/src/mage/cards/s/ShivanFire.java @@ -52,7 +52,7 @@ public class ShivanFire extends CardImpl { // Kicker {4} (You may pay an additional {4} as you cast this spell.) this.addAbility(new KickerAbility("{4}")); - // Shivan Fire deals 2 damage to target creature or player. If Shivan Fire was kicked, it deals 4 damage to that creature or player instead. + // Shivan Fire deals 2 damage to any target. If Shivan Fire was kicked, it deals 4 damage to that creature or player instead. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(4), new DamageTargetEffect(2), KickedCondition.instance, "{this} deals 2 damage to target creature. If {this} was kicked, it deals 4 damage to that creature instead")); diff --git a/Mage.Sets/src/mage/cards/s/ShivanHellkite.java b/Mage.Sets/src/mage/cards/s/ShivanHellkite.java index ec26f2d23b..ff5736e631 100644 --- a/Mage.Sets/src/mage/cards/s/ShivanHellkite.java +++ b/Mage.Sets/src/mage/cards/s/ShivanHellkite.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,7 +55,7 @@ public class ShivanHellkite extends CardImpl { this.toughness = new MageInt(5); this.addAbility(FlyingAbility.getInstance()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Shock.java b/Mage.Sets/src/mage/cards/s/Shock.java index 83f5aa3ee6..a4795b4c3f 100644 --- a/Mage.Sets/src/mage/cards/s/Shock.java +++ b/Mage.Sets/src/mage/cards/s/Shock.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,7 +45,7 @@ public class Shock extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Shock (final Shock card) { diff --git a/Mage.Sets/src/mage/cards/s/ShockTroops.java b/Mage.Sets/src/mage/cards/s/ShockTroops.java index 035db5e4e3..6ef48b6abb 100644 --- a/Mage.Sets/src/mage/cards/s/ShockTroops.java +++ b/Mage.Sets/src/mage/cards/s/ShockTroops.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class ShockTroops extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // Sacrifice Shock Troops: Shock Troops deals 2 damage to target creature or player. + // Sacrifice Shock Troops: Shock Troops deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java b/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java index 9901f54c98..b66e2159ca 100644 --- a/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java +++ b/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,19 +44,17 @@ import mage.target.common.TargetCreatureOrPlayer; public class ShowerOfCoals extends CardImpl { public ShowerOfCoals(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Shower of Coals deals 2 damage to each of up to three target creatures and/or players. // Threshold - Shower of Coals deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard. - Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(4), - new DamageTargetEffect(2), - new CardsInControllerGraveCondition(7), - "{this} deals 2 damage to each of up to three target creatures and/or players.<br/><br/><i>Threshold</i> - {this} deals 4 damage to each of those creatures and/or players instead if seven or more cards are in your graveyard."); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0,3)); + Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(4), + new DamageTargetEffect(2), + new CardsInControllerGraveCondition(7), + "{this} deals 2 damage to each of up to three targets.<br/><br/><i>Threshold</i> - {this} deals 4 damage to each of those permanents and/or players instead if seven or more cards are in your graveyard."); + this.getSpellAbility().addTarget(new TargetAnyTarget(0, 3)); this.getSpellAbility().addEffect(effect); - - + } public ShowerOfCoals(final ShowerOfCoals card) { diff --git a/Mage.Sets/src/mage/cards/s/ShowerOfSparks.java b/Mage.Sets/src/mage/cards/s/ShowerOfSparks.java index e7ad5a3593..4be51a128b 100644 --- a/Mage.Sets/src/mage/cards/s/ShowerOfSparks.java +++ b/Mage.Sets/src/mage/cards/s/ShowerOfSparks.java @@ -33,8 +33,8 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.targetpointer.SecondTargetPointer; /** @@ -44,8 +44,7 @@ import mage.target.targetpointer.SecondTargetPointer; public class ShowerOfSparks extends CardImpl { public ShowerOfSparks(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // Shower of Sparks deals 1 damage to target creature and 1 damage to target player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); @@ -55,7 +54,7 @@ public class ShowerOfSparks extends CardImpl { effect.setTargetPointer(new SecondTargetPointer()); effect.setText("and 1 damage to target player"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } public ShowerOfSparks(final ShowerOfSparks card) { diff --git a/Mage.Sets/src/mage/cards/s/ShrapnelBlast.java b/Mage.Sets/src/mage/cards/s/ShrapnelBlast.java index 1e565759bb..d8e77f6a0b 100644 --- a/Mage.Sets/src/mage/cards/s/ShrapnelBlast.java +++ b/Mage.Sets/src/mage/cards/s/ShrapnelBlast.java @@ -36,7 +36,7 @@ import mage.constants.CardType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author anonymous @@ -54,7 +54,7 @@ public class ShrapnelBlast extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public ShrapnelBlast(final ShrapnelBlast card) { diff --git a/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java b/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java index f47b27bd07..7cffbbeaac 100644 --- a/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java +++ b/Mage.Sets/src/mage/cards/s/ShrineOfBurningRage.java @@ -48,7 +48,7 @@ import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,7 +68,7 @@ public class ShrineOfBurningRage extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE)), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java b/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java index 4e92042a52..2bdd8d323a 100644 --- a/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java +++ b/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java @@ -45,7 +45,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.GoblinToken; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -68,7 +68,7 @@ public class SiegeGangCommander extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 3), false)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SithMarauder.java b/Mage.Sets/src/mage/cards/s/SithMarauder.java index d4dc48ef01..5261b8ff0f 100644 --- a/Mage.Sets/src/mage/cards/s/SithMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SithMarauder.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** @@ -54,12 +54,12 @@ public class SithMarauder extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(4); - // <i>Hate</i> — 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 target creature or player. + // <i>Hate</i> — 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( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)), HateCondition.instance, - "<i>Hate</i> — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to target creature or player"); - ability.addTarget(new TargetCreatureOrPlayer()); + "<i>Hate</i> — 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"); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java b/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java index 27665e9a07..484d0df021 100644 --- a/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java +++ b/Mage.Sets/src/mage/cards/s/SkarrganSkybreaker.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,10 +59,10 @@ public class SkarrganSkybreaker extends CardImpl { // Bloodthirst 3 this.addAbility(new BloodthirstAbility(3)); - // {1}, Sacrifice Skarrgan Skybreaker: Skarrgan Skybreaker deals damage equal to its power to target creature or player. + // {1}, Sacrifice Skarrgan Skybreaker: Skarrgan Skybreaker deals damage equal to its power to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java index 3e1506a866..91387e3b98 100644 --- a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java +++ b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class SkirkMarauder extends CardImpl { // Morph {2}{R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{R}"))); - // When Skirk Marauder is turned face up, it deals 2 damage to target creature or player. + // When Skirk Marauder is turned face up, it deals 2 damage to any target. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageTargetEffect(2, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java b/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java index 84b9e297c2..eb403f45af 100644 --- a/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java +++ b/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java @@ -42,7 +42,7 @@ import mage.constants.SubType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author nantuko @@ -57,11 +57,11 @@ public class SkirsdagCultist extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {R}, {T}, Sacrifice a creature: Skirsdag Cultist deals 2 damage to target creature or player. + // {R}, {T}, Sacrifice a creature: Skirsdag Cultist deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkullCatapult.java b/Mage.Sets/src/mage/cards/s/SkullCatapult.java index d77aa3440c..8b29788160 100644 --- a/Mage.Sets/src/mage/cards/s/SkullCatapult.java +++ b/Mage.Sets/src/mage/cards/s/SkullCatapult.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Zone; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,11 +51,11 @@ public class SkullCatapult extends CardImpl { public SkullCatapult(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - // {1}, {tap}, Sacrifice a creature: Skull Catapult deals 2 damage to target creature or player. + // {1}, {tap}, Sacrifice a creature: Skull Catapult deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Skullcrack.java b/Mage.Sets/src/mage/cards/s/Skullcrack.java index 0f2652fda0..8f33a8ae58 100644 --- a/Mage.Sets/src/mage/cards/s/Skullcrack.java +++ b/Mage.Sets/src/mage/cards/s/Skullcrack.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -43,15 +43,14 @@ import mage.target.TargetPlayer; */ public class Skullcrack extends CardImpl { - public Skullcrack (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - + public Skullcrack(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); // Players can't gain life this turn. Damage can't be prevented this turn. Skullcrack deals 3 damage to target player. this.getSpellAbility().addEffect(new CantGainLifeAllEffect(Duration.EndOfTurn)); this.getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn", true, false)); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } @@ -60,7 +59,7 @@ public class Skullcrack extends CardImpl { } @Override - public Skullcrack copy() { + public Skullcrack copy() { return new Skullcrack(this); } } diff --git a/Mage.Sets/src/mage/cards/s/SolarBlast.java b/Mage.Sets/src/mage/cards/s/SolarBlast.java index 7ba8d82ce1..6e2344977f 100644 --- a/Mage.Sets/src/mage/cards/s/SolarBlast.java +++ b/Mage.Sets/src/mage/cards/s/SolarBlast.java @@ -36,7 +36,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,14 +48,14 @@ public class SolarBlast extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - // Solar Blast deals 3 damage to target creature or player. + // Solar Blast deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Cycling {1}{R}{R} this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{R}{R}"))); - // When you cycle Solar Blast, you may have it deal 1 damage to target creature or player. + // When you cycle Solar Blast, you may have it deal 1 damage to any target. Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SonicBurst.java b/Mage.Sets/src/mage/cards/s/SonicBurst.java index 2e604f7c26..5b25b5e17e 100644 --- a/Mage.Sets/src/mage/cards/s/SonicBurst.java +++ b/Mage.Sets/src/mage/cards/s/SonicBurst.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class SonicBurst extends CardImpl { // As an additional cost to cast Sonic Burst, discard a card at random. this.getSpellAbility().addCost(new DiscardCardCost(true)); - // Sonic Burst deals 4 damage to target creature or player. + // Sonic Burst deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SonicBurst(final SonicBurst card) { diff --git a/Mage.Sets/src/mage/cards/s/SonicSeizure.java b/Mage.Sets/src/mage/cards/s/SonicSeizure.java index 0bcb16e7bc..21725bfa71 100644 --- a/Mage.Sets/src/mage/cards/s/SonicSeizure.java +++ b/Mage.Sets/src/mage/cards/s/SonicSeizure.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class SonicSeizure extends CardImpl { // As an additional cost to cast Sonic Seizure, discard a card at random. this.getSpellAbility().addCost(new DiscardCardCost(true)); - // Sonic Seizure deals 3 damage to target creature or player. + // Sonic Seizure deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SonicSeizure(final SonicSeizure card) { diff --git a/Mage.Sets/src/mage/cards/s/SorinMarkov.java b/Mage.Sets/src/mage/cards/s/SorinMarkov.java index 9865669c3e..d6adb50b89 100644 --- a/Mage.Sets/src/mage/cards/s/SorinMarkov.java +++ b/Mage.Sets/src/mage/cards/s/SorinMarkov.java @@ -44,7 +44,7 @@ import mage.constants.SuperType; import mage.game.Game; import mage.players.Player; import mage.target.TargetPlayer; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetOpponent; /** @@ -60,10 +60,10 @@ public class SorinMarkov extends CardImpl { this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); - // +2: Sorin Markov deals 2 damage to target creature or player and you gain 2 life. + // +2: Sorin Markov deals 2 damage to any target and you gain 2 life. LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(2), 2); ability1.addEffect(new GainLifeEffect(2)); - ability1.addTarget(new TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); this.addAbility(ability1); // -3: Target opponent's life total becomes 10. diff --git a/Mage.Sets/src/mage/cards/s/SorinsVengeance.java b/Mage.Sets/src/mage/cards/s/SorinsVengeance.java index 75f2ada2d9..3a3e4194d7 100644 --- a/Mage.Sets/src/mage/cards/s/SorinsVengeance.java +++ b/Mage.Sets/src/mage/cards/s/SorinsVengeance.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.s; import java.util.UUID; @@ -34,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -42,15 +41,15 @@ import mage.target.TargetPlayer; */ public class SorinsVengeance extends CardImpl { - public SorinsVengeance (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}{B}"); + public SorinsVengeance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}{B}"); this.getSpellAbility().addEffect(new DamageTargetEffect(10)); this.getSpellAbility().addEffect(new GainLifeEffect(10)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } - public SorinsVengeance (final SorinsVengeance card) { + public SorinsVengeance(final SorinsVengeance card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/SoulBurn.java b/Mage.Sets/src/mage/cards/s/SoulBurn.java index aeb3aecdb1..0e27a8a9a7 100644 --- a/Mage.Sets/src/mage/cards/s/SoulBurn.java +++ b/Mage.Sets/src/mage/cards/s/SoulBurn.java @@ -40,7 +40,7 @@ import mage.filter.FilterMana; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Johnny E. Hastings @@ -58,8 +58,8 @@ public class SoulBurn extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{2}{B}"); // Spend only black or red mana on X. - // Soul Burn deals X damage to target creature or player. You gain life equal to the damage dealt for each black mana spent on X; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Soul Burn deals X damage to any target. You gain life equal to the damage dealt for each black mana spent on X; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new SoulBurnEffect()); VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0); if (variableCost instanceof VariableManaCost) { @@ -81,7 +81,7 @@ class SoulBurnEffect extends OneShotEffect { public SoulBurnEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target creature or player for each black or red mana spent on X. You gain life equal to the damage dealt for each black mana spent; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness."; + staticText = "{this} deals X damage to any target for each black or red mana spent on X. You gain life equal to the damage dealt for each black mana spent; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness."; } public SoulBurnEffect(final SoulBurnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java index 25e3d4e8fb..8d5f50803e 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java @@ -50,7 +50,7 @@ import mage.game.permanent.Permanent; import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetPermanent; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author noxx @@ -58,7 +58,7 @@ import mage.target.TargetPlayer; public class SoulOfShandalar extends CardImpl { public SoulOfShandalar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); this.subtype.add(SubType.AVATAR); this.power = new MageInt(6); @@ -69,14 +69,14 @@ public class SoulOfShandalar extends CardImpl { // {3}{R}{R}: Soul of Shandalar deals 3 damage to target player and 3 damage to up to one target creature that player controls. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoulOfShandalarEffect(), new ManaCostsImpl("{3}{R}{R}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.addTarget(new SoulOfShandalarTarget()); this.addAbility(ability); // {3}{R}{R}, Exile Soul of Shandalar from your graveyard: Soul of Shandalar deals 3 damage to target player and 3 damage to up to one target creature that player controls. ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new SoulOfShandalarEffect(), new ManaCostsImpl("{3}{R}{R}")); ability.addCost(new ExileSourceFromGraveCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.addTarget(new SoulOfShandalarTarget()); this.addAbility(ability); } @@ -95,7 +95,8 @@ class SoulOfShandalarEffect extends OneShotEffect { public SoulOfShandalarEffect() { super(Outcome.Damage); - staticText = "Soul of Shandalar deals 3 damage to target player and 3 damage to up to one target creature that player controls"; + staticText = "{this} deals 3 damage to target player or planeswalker " + + "and 3 damage to up to one target creature that player or that planeswalker’s controller controls"; } public SoulOfShandalarEffect(final SoulOfShandalarEffect effect) { @@ -109,10 +110,7 @@ class SoulOfShandalarEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); - if (player != null) { - player.damage(3, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 3, source.getSourceId(), game, false, true); Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { creature.damage(3, source.getSourceId(), game, false, true); @@ -124,7 +122,7 @@ class SoulOfShandalarEffect extends OneShotEffect { class SoulOfShandalarTarget extends TargetPermanent { public SoulOfShandalarTarget() { - super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false); + super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false); } public SoulOfShandalarTarget(final SoulOfShandalarTarget target) { @@ -133,7 +131,11 @@ class SoulOfShandalarTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - UUID firstTarget = source.getFirstTarget(); + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + UUID firstTarget = player.getId(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -158,10 +160,13 @@ class SoulOfShandalarTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - for (UUID targetId : availablePossibleTargets) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null && permanent.getControllerId().equals(playerId)) { - possibleTargets.add(targetId); + Player player = game.getPlayerOrPlaneswalkerController(playerId); + if (player != null) { + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(player.getId())) { + possibleTargets.add(targetId); + } } } } diff --git a/Mage.Sets/src/mage/cards/s/SoulSpike.java b/Mage.Sets/src/mage/cards/s/SoulSpike.java index 51e89bb117..b42d060de7 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSpike.java +++ b/Mage.Sets/src/mage/cards/s/SoulSpike.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,8 +59,8 @@ public class SoulSpike extends CardImpl { // You may exile two black cards from your hand rather than pay Soul Spike's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter)))); - // Soul Spike deals 4 damage to target creature or player and you gain 4 life. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Soul Spike deals 4 damage to any target and you gain 4 life. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new GainLifeEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/s/Soulblast.java b/Mage.Sets/src/mage/cards/s/Soulblast.java index c6391096b6..d2709169cb 100644 --- a/Mage.Sets/src/mage/cards/s/Soulblast.java +++ b/Mage.Sets/src/mage/cards/s/Soulblast.java @@ -40,7 +40,7 @@ import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class Soulblast extends CardImpl { // As an additional cost to cast Soulblast, sacrifice all creatures you control. this.getSpellAbility().addCost(new SacrificeAllCost(StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED)); - // Soulblast deals damage to target creature or player equal to the total power of the sacrificed creatures. + // Soulblast deals damage to any target equal to the total power of the sacrificed creatures. this.getSpellAbility().addEffect(new SoulblastEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Soulblast(final Soulblast card) { @@ -73,7 +73,7 @@ class SoulblastEffect extends OneShotEffect { public SoulblastEffect() { super(Outcome.Benefit); - this.staticText = "Soulblast deals damage to target creature or player equal to the total power of the sacrificed creatures"; + this.staticText = "Soulblast deals damage to any target equal to the total power of the sacrificed creatures"; } public SoulblastEffect(final SoulblastEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SoulsFire.java b/Mage.Sets/src/mage/cards/s/SoulsFire.java index 470e0d5268..4208809bd5 100644 --- a/Mage.Sets/src/mage/cards/s/SoulsFire.java +++ b/Mage.Sets/src/mage/cards/s/SoulsFire.java @@ -39,7 +39,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,10 +51,10 @@ public class SoulsFire extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Target creature you control on the battlefield deals damage equal to its power to target creature or player. + // Target creature you control on the battlefield deals damage equal to its power to any target. this.getSpellAbility().addEffect(new SoulsFireEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SoulsFire(final SoulsFire card) { @@ -71,7 +71,7 @@ class SoulsFireEffect extends OneShotEffect { public SoulsFireEffect() { super(Outcome.Damage); - this.staticText = "Target creature you control on the battlefield deals damage equal to its power to target creature or player"; + this.staticText = "Target creature you control on the battlefield deals damage equal to its power to any target"; } public SoulsFireEffect(final SoulsFireEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SparkJolt.java b/Mage.Sets/src/mage/cards/s/SparkJolt.java index d0e3ddd302..e5fa551abe 100644 --- a/Mage.Sets/src/mage/cards/s/SparkJolt.java +++ b/Mage.Sets/src/mage/cards/s/SparkJolt.java @@ -33,7 +33,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class SparkJolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Spark Jolt deals 1 damage to target creature or player. Scry 1. + // Spark Jolt deals 1 damage to any target. Scry 1. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new ScryEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/s/SparkSpray.java b/Mage.Sets/src/mage/cards/s/SparkSpray.java index f2064d2b80..1413487f9a 100644 --- a/Mage.Sets/src/mage/cards/s/SparkSpray.java +++ b/Mage.Sets/src/mage/cards/s/SparkSpray.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class SparkSpray extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Spark Spray deals 1 damage to target creature or player. + // Spark Spray deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Cycling {R} this.addAbility(new CyclingAbility(new ManaCostsImpl("{R}"))); diff --git a/Mage.Sets/src/mage/cards/s/Sparkcaster.java b/Mage.Sets/src/mage/cards/s/Sparkcaster.java index a55b95df7d..a3fccb0ccc 100644 --- a/Mage.Sets/src/mage/cards/s/Sparkcaster.java +++ b/Mage.Sets/src/mage/cards/s/Sparkcaster.java @@ -41,12 +41,12 @@ import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author LoneFox - + * */ public class Sparkcaster extends CardImpl { @@ -57,7 +57,7 @@ public class Sparkcaster extends CardImpl { } public Sparkcaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(5); this.toughness = new MageInt(3); @@ -66,7 +66,7 @@ public class Sparkcaster extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false)); // When Sparkcaster enters the battlefield, it deals 1 damage to target player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java b/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java index 7835ff49f6..6f932057d2 100644 --- a/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java +++ b/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,7 +52,7 @@ public class SparkmageApprentice extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java b/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java index aa6988b29b..498a8c8096 100644 --- a/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java +++ b/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,9 +63,9 @@ public class SpawnOfThraxes extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // When Spawn of Thraxes enters the battlefield, it deals damage to target creature or player equal to the number of Mountains you control. + // When Spawn of Thraxes enters the battlefield, it deals damage to any target equal to the number of Mountains you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpawningBreath.java b/Mage.Sets/src/mage/cards/s/SpawningBreath.java index 9b4d5dd0a1..b18a58e572 100644 --- a/Mage.Sets/src/mage/cards/s/SpawningBreath.java +++ b/Mage.Sets/src/mage/cards/s/SpawningBreath.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.game.permanent.token.EldraziSpawnToken; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,7 +47,7 @@ public class SpawningBreath extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new CreateTokenEffect(new EldraziSpawnToken())); } diff --git a/Mage.Sets/src/mage/cards/s/SphinxBoneWand.java b/Mage.Sets/src/mage/cards/s/SphinxBoneWand.java index 6bbcfbeb8f..22e38436c9 100644 --- a/Mage.Sets/src/mage/cards/s/SphinxBoneWand.java +++ b/Mage.Sets/src/mage/cards/s/SphinxBoneWand.java @@ -42,7 +42,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,9 +61,9 @@ public class SphinxBoneWand extends CardImpl { public SphinxBoneWand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{7}"); - // Whenever you cast an instant or sorcery spell, you may put a charge counter on Sphinx-Bone Wand. If you do, Sphinx-Bone Wand deals damage equal to the number of charge counters on it to target creature or player. + // Whenever you cast an instant or sorcery spell, you may put a charge counter on Sphinx-Bone Wand. If you do, Sphinx-Bone Wand deals damage equal to the number of charge counters on it to any target. SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new SphinxBoneWandEffect(), filter, true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -81,7 +81,7 @@ class SphinxBoneWandEffect extends OneShotEffect { public SphinxBoneWandEffect() { super(Outcome.Damage); - this.staticText = "put a charge counter on Sphinx-Bone Wand. If you do, Sphinx-Bone Wand deals damage equal to the number of charge counters on it to target creature or player"; + this.staticText = "put a charge counter on Sphinx-Bone Wand. If you do, Sphinx-Bone Wand deals damage equal to the number of charge counters on it to any target"; } public SphinxBoneWandEffect(final SphinxBoneWandEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpikeshotElder.java b/Mage.Sets/src/mage/cards/s/SpikeshotElder.java index e5ae655fa8..820072c8a0 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeshotElder.java +++ b/Mage.Sets/src/mage/cards/s/SpikeshotElder.java @@ -43,7 +43,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,7 +59,7 @@ public class SpikeshotElder extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SpikeshotElderEffect(), new ManaCostsImpl("{1}{R}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -76,7 +76,7 @@ public class SpikeshotElder extends CardImpl { class SpikeshotElderEffect extends OneShotEffect { public SpikeshotElderEffect() { super(Outcome.Damage); - staticText = "{this} deals damage equal to its power to target creature or player"; + staticText = "{this} deals damage equal to its power to any target"; } public SpikeshotElderEffect(final SpikeshotElderEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java b/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java index 5e4a258f1c..e60040e372 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java +++ b/Mage.Sets/src/mage/cards/s/SpikeshotGoblin.java @@ -40,7 +40,7 @@ import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,10 +56,10 @@ public class SpikeshotGoblin extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // {R}, {tap}: Spikeshot Goblin deals damage equal to its power to target creature or player. + // {R}, {tap}: Spikeshot Goblin deals damage equal to its power to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SpikeshotGoblinEffect(), new ColoredManaCost(ColoredManaSymbol.R)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -76,7 +76,7 @@ public class SpikeshotGoblin extends CardImpl { class SpikeshotGoblinEffect extends OneShotEffect { public SpikeshotGoblinEffect() { super(Outcome.Damage); - staticText = "{this} deals damage equal to its power to target creature or player"; + staticText = "{this} deals damage equal to its power to any target"; } public SpikeshotGoblinEffect(final SpikeshotGoblinEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java index 64795d497a..6ed7061b50 100644 --- a/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java +++ b/Mage.Sets/src/mage/cards/s/SpiralingEmbers.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,11 +48,11 @@ public class SpiralingEmbers extends CardImpl { this.subtype.add(SubType.ARCANE); - // Spiraling Embers deals damage to target creature or player equal to the number of cards in your hand. + // Spiraling Embers deals damage to any target equal to the number of cards in your hand. Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); - effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand."); + effect.setText("{this} deals damage to any target equal to the number of cards in your hand."); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SpiralingEmbers(final SpiralingEmbers card) { diff --git a/Mage.Sets/src/mage/cards/s/SpireBarrage.java b/Mage.Sets/src/mage/cards/s/SpireBarrage.java index a560b58397..db3d98eeec 100644 --- a/Mage.Sets/src/mage/cards/s/SpireBarrage.java +++ b/Mage.Sets/src/mage/cards/s/SpireBarrage.java @@ -38,7 +38,7 @@ import mage.constants.TargetController; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class SpireBarrage extends CardImpl { public SpireBarrage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); - // Spire Barrage deals damage to target creature or player equal to the number of Mountains you control. + // Spire Barrage deals damage to any target equal to the number of Mountains you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SpireBarrage(final SpireBarrage card) { diff --git a/Mage.Sets/src/mage/cards/s/Spitemare.java b/Mage.Sets/src/mage/cards/s/Spitemare.java index 7940ac1172..c94dc3d457 100644 --- a/Mage.Sets/src/mage/cards/s/Spitemare.java +++ b/Mage.Sets/src/mage/cards/s/Spitemare.java @@ -43,7 +43,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class Spitemare extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Whenever Spitemare is dealt damage, it deals that much damage to target creature or player. + // Whenever Spitemare is dealt damage, it deals that much damage to any target. Ability ability = new SpitemareTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -114,7 +114,7 @@ class SpitemareEffect extends OneShotEffect { public SpitemareEffect() { super(Outcome.Damage); - staticText = "it deals that much damage to target creature or player"; + staticText = "it deals that much damage to any target"; } public SpitemareEffect(final SpitemareEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpitfireBastion.java b/Mage.Sets/src/mage/cards/s/SpitfireBastion.java index a5040843d0..052e259545 100644 --- a/Mage.Sets/src/mage/cards/s/SpitfireBastion.java +++ b/Mage.Sets/src/mage/cards/s/SpitfireBastion.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,10 +56,10 @@ public class SpitfireBastion extends CardImpl { // {T}: Add {R}. this.addAbility(new RedManaAbility()); - // {2}{R}, {T}: Spitfire Bastion deals 3 damage to target creature or player. + // {2}{R}, {T}: Spitfire Bastion deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{2}{R}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SplitTailMiko.java b/Mage.Sets/src/mage/cards/s/SplitTailMiko.java index 2308d168d3..258402dd14 100644 --- a/Mage.Sets/src/mage/cards/s/SplitTailMiko.java +++ b/Mage.Sets/src/mage/cards/s/SplitTailMiko.java @@ -37,7 +37,7 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,10 +52,10 @@ public class SplitTailMiko extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {W}, {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ColoredManaCost(ColoredManaSymbol.W)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StaffOfNin.java b/Mage.Sets/src/mage/cards/s/StaffOfNin.java index 459e0f9452..63876dd4da 100644 --- a/Mage.Sets/src/mage/cards/s/StaffOfNin.java +++ b/Mage.Sets/src/mage/cards/s/StaffOfNin.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -52,9 +52,9 @@ public class StaffOfNin extends CardImpl { // At the beginning of your upkeep, draw a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false)); - // {tap}: Staff of Nin deals 1 damage to target creature or player. + // {tap}: Staff of Nin deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Staggershock.java b/Mage.Sets/src/mage/cards/s/Staggershock.java index 97ac4b3bdd..d6ed11d0ca 100644 --- a/Mage.Sets/src/mage/cards/s/Staggershock.java +++ b/Mage.Sets/src/mage/cards/s/Staggershock.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.ReboundAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,7 +44,7 @@ public class Staggershock extends CardImpl { public Staggershock(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.addAbility(new ReboundAbility()); } diff --git a/Mage.Sets/src/mage/cards/s/StalkingVengeance.java b/Mage.Sets/src/mage/cards/s/StalkingVengeance.java index 74ae405cf6..be18c155ef 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingVengeance.java +++ b/Mage.Sets/src/mage/cards/s/StalkingVengeance.java @@ -45,8 +45,7 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -55,13 +54,14 @@ import mage.target.TargetPlayer; public class StalkingVengeance extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you control"); + static { filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new AnotherPredicate()); } public StalkingVengeance(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); this.subtype.add(SubType.AVATAR); this.power = new MageInt(5); @@ -71,7 +71,7 @@ public class StalkingVengeance extends CardImpl { this.addAbility(HasteAbility.getInstance()); // Whenever another creature you control dies, it deals damage equal to its power to target player. Ability ability = new DiesCreatureTriggeredAbility(new StalkingVengeanceDamageEffect(), false, filter, true); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -89,7 +89,7 @@ class StalkingVengeanceDamageEffect extends OneShotEffect { public StalkingVengeanceDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals damage equal to its power to target player"; + this.staticText = "it deals damage equal to its power to target player or planeswalker"; } public StalkingVengeanceDamageEffect(final StalkingVengeanceDamageEffect effect) { @@ -103,13 +103,10 @@ class StalkingVengeanceDamageEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(source.getTargets().getFirstTarget()); - if (targetPlayer != null) { - Permanent creature = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD); - if (creature != null) { - targetPlayer.damage(creature.getPower().getValue(), creature.getId(), game, false, true); - return true; - } + Permanent creature = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD); + if (creature != null) { + game.damagePlayerOrPlaneswalker(source.getFirstTarget(), creature.getPower().getValue(), creature.getId(), game, false, true); + return true; } return false; } diff --git a/Mage.Sets/src/mage/cards/s/StarDestroyer.java b/Mage.Sets/src/mage/cards/s/StarDestroyer.java index 9c51ba6907..224bd3b714 100644 --- a/Mage.Sets/src/mage/cards/s/StarDestroyer.java +++ b/Mage.Sets/src/mage/cards/s/StarDestroyer.java @@ -65,7 +65,7 @@ public class StarDestroyer extends CardImpl { } public StarDestroyer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{U}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{U}{B}{R}"); this.subtype.add(SubType.STARSHIP); this.power = new MageInt(6); this.toughness = new MageInt(6); diff --git a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java index 825277da26..4097f645b0 100644 --- a/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java +++ b/Mage.Sets/src/mage/cards/s/SteamcoreWeird.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.ColoredManaSymbol; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.ManaSpentToCastWatcher; /** @@ -54,11 +54,11 @@ public class SteamcoreWeird extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - // When Steamcore Weird enters the battlefield, if {R} was spent to cast Steamcore Weird, it deals 2 damage to target creature or player. + // 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 TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R), - "if {R} was spent to cast {this}, it deals 2 damage to target creature or player."), + "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/StensiaBanquet.java b/Mage.Sets/src/mage/cards/s/StensiaBanquet.java index 03cf4b586a..fe211c3d5e 100644 --- a/Mage.Sets/src/mage/cards/s/StensiaBanquet.java +++ b/Mage.Sets/src/mage/cards/s/StensiaBanquet.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -53,13 +53,13 @@ public class StensiaBanquet extends CardImpl { } public StensiaBanquet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); // Stensia Banquet deals damage to target opponent equal to the number of Vampires you control. Effect effect = new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)); - effect.setText("{this} deals damage to target opponent equal to the number of Vampires you control"); + effect.setText("{this} deals damage to target opponent or planeswalker equal to the number of Vampires you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); diff --git a/Mage.Sets/src/mage/cards/s/StensiaBloodhall.java b/Mage.Sets/src/mage/cards/s/StensiaBloodhall.java index 55963b4887..307256fc4a 100644 --- a/Mage.Sets/src/mage/cards/s/StensiaBloodhall.java +++ b/Mage.Sets/src/mage/cards/s/StensiaBloodhall.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @author nantuko @@ -46,7 +46,7 @@ import mage.target.TargetPlayer; public class StensiaBloodhall extends CardImpl { public StensiaBloodhall(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); // {T}: Add {C}. this.addAbility(new ColorlessManaAbility()); @@ -54,7 +54,7 @@ public class StensiaBloodhall extends CardImpl { // {3}{B}{R}, {T}: Stensia Bloodhall deals 2 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{B}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StingingBarrier.java b/Mage.Sets/src/mage/cards/s/StingingBarrier.java index b281444e16..dad35fbee3 100644 --- a/Mage.Sets/src/mage/cards/s/StingingBarrier.java +++ b/Mage.Sets/src/mage/cards/s/StingingBarrier.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class StingingBarrier extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); - // {U}, {tap}: Stinging Barrier deals 1 damage to target creature or player. + // {U}, {tap}: Stinging Barrier deals 1 damage to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StokeTheFlames.java b/Mage.Sets/src/mage/cards/s/StokeTheFlames.java index a14eda5fe6..77c4044f4a 100644 --- a/Mage.Sets/src/mage/cards/s/StokeTheFlames.java +++ b/Mage.Sets/src/mage/cards/s/StokeTheFlames.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,9 +48,9 @@ public class StokeTheFlames extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); - // Stoke the Flames deals 4 damage to target creature or player. + // Stoke the Flames deals 4 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public StokeTheFlames(final StokeTheFlames card) { diff --git a/Mage.Sets/src/mage/cards/s/StolenGrain.java b/Mage.Sets/src/mage/cards/s/StolenGrain.java index 3ba4be7bd7..261d1ab9be 100644 --- a/Mage.Sets/src/mage/cards/s/StolenGrain.java +++ b/Mage.Sets/src/mage/cards/s/StolenGrain.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -42,12 +42,12 @@ import mage.target.common.TargetOpponent; public class StolenGrain extends CardImpl { public StolenGrain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); // Stolen Grain deals 5 damage to target opponent. You gain 5 life. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); this.getSpellAbility().addEffect(new GainLifeEffect(5)); - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); } public StolenGrain(final StolenGrain card) { diff --git a/Mage.Sets/src/mage/cards/s/StompingSlabs.java b/Mage.Sets/src/mage/cards/s/StompingSlabs.java index e40c876495..2a77c5d161 100644 --- a/Mage.Sets/src/mage/cards/s/StompingSlabs.java +++ b/Mage.Sets/src/mage/cards/s/StompingSlabs.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.targetpointer.FixedTarget; /** @@ -53,9 +53,9 @@ public class StompingSlabs extends CardImpl { public StompingSlabs(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - // Reveal the top seven cards of your library, then put those cards on the bottom of your library in any order. If a card named Stomping Slabs was revealed this way, Stomping Slabs deals 7 damage to target creature or player. + // Reveal the top seven cards of your library, then put those cards on the bottom of your library in any order. If a card named Stomping Slabs was revealed this way, Stomping Slabs deals 7 damage to any target. this.getSpellAbility().addEffect(new StompingSlabsEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public StompingSlabs(final StompingSlabs card) { @@ -72,7 +72,7 @@ class StompingSlabsEffect extends OneShotEffect { StompingSlabsEffect() { super(Outcome.Damage); - this.staticText = "Reveal the top seven cards of your library, then put those cards on the bottom of your library in any order. If a card named Stomping Slabs was revealed this way, {this} deals 7 damage to target creature or player"; + this.staticText = "Reveal the top seven cards of your library, then put those cards on the bottom of your library in any order. If a card named Stomping Slabs was revealed this way, {this} deals 7 damage to any target"; } StompingSlabsEffect(final StompingSlabsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java index 471c04af6c..08163b6bea 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetPyromancer.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -56,12 +56,12 @@ public class StormFleetPyromancer extends CardImpl { this.power = new MageInt(3); 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 target creature or player. + // 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( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, - "<i>Raid</i> — When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player."); - ability.addTarget(new TargetCreatureOrPlayer()); + "<i>Raid</i> — 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/s/Stormbind.java b/Mage.Sets/src/mage/cards/s/Stormbind.java index b6f07d1996..22f938de26 100644 --- a/Mage.Sets/src/mage/cards/s/Stormbind.java +++ b/Mage.Sets/src/mage/cards/s/Stormbind.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,10 +49,10 @@ public class Stormbind extends CardImpl { public Stormbind(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}{G}"); - // {2}, Discard a card at random: Stormbind deals 2 damage to target creature or player. + // {2}, Discard a card at random: Stormbind deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}")); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SuddenShock.java b/Mage.Sets/src/mage/cards/s/SuddenShock.java index 4380244306..4fe84f90ca 100644 --- a/Mage.Sets/src/mage/cards/s/SuddenShock.java +++ b/Mage.Sets/src/mage/cards/s/SuddenShock.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.SplitSecondAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class SuddenShock extends CardImpl { // Split second this.addAbility(new SplitSecondAbility()); - // Sudden Shock deals 2 damage to target creature or player. + // Sudden Shock deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2, true)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SuddenShock(final SuddenShock card) { diff --git a/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java b/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java index a433bbd376..4b268bd08b 100644 --- a/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java +++ b/Mage.Sets/src/mage/cards/s/SunCrownedHunters.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -56,7 +56,7 @@ public class SunCrownedHunters extends CardImpl { Ability ability = new DealtDamageToSourceTriggeredAbility( Zone.BATTLEFIELD, new DamageTargetEffect(3).setText("it deals 3 damage to target opponent"), false, true ); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SunfireBalm.java b/Mage.Sets/src/mage/cards/s/SunfireBalm.java index 8d2818cee3..459410c1e9 100644 --- a/Mage.Sets/src/mage/cards/s/SunfireBalm.java +++ b/Mage.Sets/src/mage/cards/s/SunfireBalm.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,14 +48,14 @@ public class SunfireBalm extends CardImpl { public SunfireBalm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); - // Prevent the next 4 damage that would be dealt to target creature or player this turn. + // Prevent the next 4 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Cycling {1}{W} this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}{W}"))); - // When you cycle Sunfire Balm, you may prevent the next 1 damage that would be dealt to target creature or player this turn. + // When you cycle Sunfire Balm, you may prevent the next 1 damage that would be dealt to any target this turn. Ability ability = new CycleTriggeredAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SunflareShaman.java b/Mage.Sets/src/mage/cards/s/SunflareShaman.java index 11e58a48f3..86b396037e 100644 --- a/Mage.Sets/src/mage/cards/s/SunflareShaman.java +++ b/Mage.Sets/src/mage/cards/s/SunflareShaman.java @@ -46,7 +46,7 @@ import mage.filter.FilterCard; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,10 +61,10 @@ public class SunflareShaman extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // {1}{R}, {tap}: Sunflare Shaman deals X damage to target creature or player and X damage to itself, where X is the number of Elemental cards in your graveyard. + // {1}{R}, {tap}: Sunflare Shaman deals X damage to any target and X damage to itself, where X is the number of Elemental cards in your graveyard. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SunflareShamanEffect(), new ManaCostsImpl("{1}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -89,7 +89,7 @@ class SunflareShamanEffect extends OneShotEffect { public SunflareShamanEffect() { super(Outcome.Damage); - this.staticText = "{this} deals X damage to target creature or player and X damage to itself, where X is the number of Elemental cards in your graveyard"; + this.staticText = "{this} deals X damage to any target and X damage to itself, where X is the number of Elemental cards in your graveyard"; } public SunflareShamanEffect(final SunflareShamanEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java index 400ac298ad..7e364e2dbb 100644 --- a/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java +++ b/Mage.Sets/src/mage/cards/s/SunscorchedDesert.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -51,7 +51,7 @@ public class SunscorchedDesert extends CardImpl { // When Sunscorced Desert enters the battlefield, it deals 1 damage to target player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); // {T}: Add {C}. diff --git a/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java b/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java index b193dabb4e..f8df4da88e 100644 --- a/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java +++ b/Mage.Sets/src/mage/cards/s/SuqAtaFirewalker.java @@ -44,7 +44,7 @@ import mage.constants.Zone; import mage.filter.FilterObject; import mage.filter.FilterStackObject; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -69,9 +69,9 @@ public class SuqAtaFirewalker extends CardImpl { // Suq'Ata Firewalker can't be the target of red spells or abilities from red sources. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeTargetedSourceEffect(filterRed, Duration.WhileOnBattlefield))); - //{T}: Suq'Ata Firewalker deals 1 damage to target creature or player. + //{T}: Suq'Ata Firewalker deals 1 damage to any target. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java b/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java index 1b039ef383..ebf82c74d2 100644 --- a/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java +++ b/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java @@ -48,7 +48,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -57,16 +57,16 @@ import mage.target.TargetPlayer; public class SurestrikeTrident extends CardImpl { public SurestrikeTrident(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike and "{T}, Unattach Surestrike Trident: This creature deals damage equal to its power to target player." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)); DynamicValue xValue = new SourcePermanentPowerCount(); Effect effect = new DamageTargetEffect(xValue); - effect.setText("This creature deals damage equal to its power to target player"); + effect.setText("This creature deals damage equal to its power to target player or planeswalker"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - gainedAbility.addTarget(new TargetPlayer()); + gainedAbility.addTarget(new TargetPlayerOrPlaneswalker()); gainedAbility.addCost(new UnattachCost(this.getName(), this.getId())); effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT); effect.setText("and \"{T}, Unattach {this}: This creature deals damage equal to its power to target player.\""); diff --git a/Mage.Sets/src/mage/cards/s/SurgingFlame.java b/Mage.Sets/src/mage/cards/s/SurgingFlame.java index 2a7b218a35..3efb4febae 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingFlame.java +++ b/Mage.Sets/src/mage/cards/s/SurgingFlame.java @@ -33,7 +33,7 @@ import mage.abilities.keyword.RippleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class SurgingFlame extends CardImpl { // Ripple 4 this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); - // Surging Flame deals 2 damage to target creature or player. + // Surging Flame deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public SurgingFlame(final SurgingFlame card) { diff --git a/Mage.Sets/src/mage/cards/s/SwiftManeuver.java b/Mage.Sets/src/mage/cards/s/SwiftManeuver.java index 3eacc76f7a..817d541195 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftManeuver.java +++ b/Mage.Sets/src/mage/cards/s/SwiftManeuver.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,9 +47,9 @@ public class SwiftManeuver extends CardImpl { public SwiftManeuver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - // Prevent the next 2 damage that would be dealt to target creature or player this turn. + // Prevent the next 2 damage that would be dealt to any target this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( diff --git a/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java b/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java index 2e137ff424..d03508ec30 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfFireAndIce.java @@ -51,7 +51,7 @@ import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author Loki @@ -65,7 +65,7 @@ public class SwordOfFireAndIce extends CardImpl { // Equipped creature gets +2/+2 and has protection from red and from blue. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ProtectionAbility.from(ObjectColor.RED, ObjectColor.BLUE), AttachmentType.EQUIPMENT))); - // Whenever equipped creature deals combat damage to a player, Sword of Fire and Ice deals 2 damage to target creature or player and you draw a card. + // Whenever equipped creature deals combat damage to a player, Sword of Fire and Ice deals 2 damage to any target and you draw a card. this.addAbility(new SwordOfFireAndIceAbility()); // Equip this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); @@ -87,7 +87,7 @@ class SwordOfFireAndIceAbility extends TriggeredAbilityImpl { public SwordOfFireAndIceAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(2)); this.addEffect(new DrawCardSourceControllerEffect(1)); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } public SwordOfFireAndIceAbility(final SwordOfFireAndIceAbility ability) { @@ -113,6 +113,6 @@ class SwordOfFireAndIceAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever equipped creature deals combat damage to a player, {this} deals 2 damage to target creature or player and you draw a card."; + return "Whenever equipped creature deals combat damage to a player, {this} deals 2 damage to any target and you draw a card."; } } diff --git a/Mage.Sets/src/mage/cards/s/SwordOfTheAges.java b/Mage.Sets/src/mage/cards/s/SwordOfTheAges.java index 9e7acafb15..2c6cea0f13 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfTheAges.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfTheAges.java @@ -49,7 +49,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,7 +63,7 @@ public class SwordOfTheAges extends CardImpl { // Sword of the Ages enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); - // {T}, Sacrifice Sword of the Ages and any number of creatures you control: Sword of the Ages deals X damage to target creature or player, where X is the total power of the creatures sacrificed this way, then exile Sword of the Ages and those creature cards. + // {T}, Sacrifice Sword of the Ages and any number of creatures you control: Sword of the Ages deals X damage to any target, where X is the total power of the creatures sacrificed this way, then exile Sword of the Ages and those creature cards. Cost cost = new SacrificeSourceCost(); cost.setText("Sacrifice {this} and any number of creatures you control"); Cost cost2 = new SacrificeTargetCost(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, new FilterControlledCreaturePermanent(), true)); @@ -71,7 +71,7 @@ public class SwordOfTheAges extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SwordOfTheAgesEffect(), new TapSourceCost()); ability.addCost(cost); ability.addCost(cost2); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -89,7 +89,7 @@ class SwordOfTheAgesEffect extends OneShotEffect { public SwordOfTheAgesEffect() { super(Outcome.Damage); - this.staticText = "{this} deals X damage to target creature or player, where X is the total power of the creatures sacrificed this way, then exile {this} and those creature cards"; + this.staticText = "{this} deals X damage to any target, where X is the total power of the creatures sacrificed this way, then exile {this} and those creature cards"; } public SwordOfTheAgesEffect(final SwordOfTheAgesEffect effect) { diff --git a/Mage.Sets/src/mage/cards/t/TalonOfPain.java b/Mage.Sets/src/mage/cards/t/TalonOfPain.java index f9ddad3377..b4c1df248e 100644 --- a/Mage.Sets/src/mage/cards/t/TalonOfPain.java +++ b/Mage.Sets/src/mage/cards/t/TalonOfPain.java @@ -49,7 +49,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -67,11 +67,11 @@ public class TalonOfPain extends CardImpl { */ this.addAbility(new TalonOfPainTriggeredAbility()); - // {X}, {T}, Remove X charge counters from Talon of Pain: Talon of Pain deals X damage to target creature or player. + // {X}, {T}, Remove X charge counters from Talon of Pain: Talon of Pain deals X damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); ability.addCost(new TalonOfPainRemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TarPitcher.java b/Mage.Sets/src/mage/cards/t/TarPitcher.java index 29e9c45c0f..786960d578 100644 --- a/Mage.Sets/src/mage/cards/t/TarPitcher.java +++ b/Mage.Sets/src/mage/cards/t/TarPitcher.java @@ -42,7 +42,7 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -63,10 +63,10 @@ public class TarPitcher extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // {tap}, Sacrifice a Goblin: Tar Pitcher deals 2 damage to target creature or player. + // {tap}, Sacrifice a Goblin: Tar Pitcher deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/Tarfire.java b/Mage.Sets/src/mage/cards/t/Tarfire.java index 335c40c25e..2a9d910aba 100644 --- a/Mage.Sets/src/mage/cards/t/Tarfire.java +++ b/Mage.Sets/src/mage/cards/t/Tarfire.java @@ -33,7 +33,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class Tarfire extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{R}"); this.subtype.add(SubType.GOBLIN); - // Tarfire deals 2 damage to target creature or player. + // Tarfire deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public Tarfire(final Tarfire card) { diff --git a/Mage.Sets/src/mage/cards/t/TasteOfBlood.java b/Mage.Sets/src/mage/cards/t/TasteOfBlood.java index dfd3a455f8..9d1f969564 100644 --- a/Mage.Sets/src/mage/cards/t/TasteOfBlood.java +++ b/Mage.Sets/src/mage/cards/t/TasteOfBlood.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.t; import java.util.UUID; @@ -34,7 +33,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -42,15 +41,15 @@ import mage.target.TargetPlayer; */ public class TasteOfBlood extends CardImpl { - public TasteOfBlood (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); + public TasteOfBlood(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); this.getSpellAbility().addEffect(new DamageTargetEffect(1)); this.getSpellAbility().addEffect(new GainLifeEffect(1)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } - public TasteOfBlood (final TasteOfBlood card) { + public TasteOfBlood(final TasteOfBlood card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/t/TelimTorsDarts.java b/Mage.Sets/src/mage/cards/t/TelimTorsDarts.java index ec53e47303..10858962e9 100644 --- a/Mage.Sets/src/mage/cards/t/TelimTorsDarts.java +++ b/Mage.Sets/src/mage/cards/t/TelimTorsDarts.java @@ -37,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -46,12 +46,12 @@ import mage.target.TargetPlayer; public class TelimTorsDarts extends CardImpl { public TelimTorsDarts(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // {2}, {tap}: Telim'Tor's Darts deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TheFallen.java b/Mage.Sets/src/mage/cards/t/TheFallen.java index ab009381c6..9bc7445942 100644 --- a/Mage.Sets/src/mage/cards/t/TheFallen.java +++ b/Mage.Sets/src/mage/cards/t/TheFallen.java @@ -42,7 +42,6 @@ import mage.constants.WatcherScope; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.players.Player; import mage.watchers.Watcher; /** @@ -52,7 +51,7 @@ import mage.watchers.Watcher; public class TheFallen extends CardImpl { public TheFallen(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(3); @@ -75,7 +74,7 @@ class TheFallenEffect extends OneShotEffect { public TheFallenEffect() { super(Outcome.Damage); - this.staticText = "{this} deals 1 damage to each opponent it has dealt damage to this game"; + this.staticText = "{this} deals 1 damage to each opponent or planeswalker it has dealt damage to this game"; } public TheFallenEffect(final TheFallenEffect effect) { @@ -90,13 +89,10 @@ class TheFallenEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { TheFallenWatcher watcher = (TheFallenWatcher) game.getState().getWatchers().get(TheFallenWatcher.class.getSimpleName()); - if (watcher != null && watcher.getPlayerDealtDamageThisGame(source.getSourceId()) != null) { - for (UUID playerId : watcher.getPlayerDealtDamageThisGame(source.getSourceId())) { + if (watcher != null && watcher.getPlayersAndWalkersDealtDamageThisGame(source.getSourceId()) != null) { + for (UUID playerId : watcher.getPlayersAndWalkersDealtDamageThisGame(source.getSourceId())) { if (!source.getControllerId().equals(playerId)) { - Player player = game.getPlayer(playerId); - if (player != null) { - player.damage(1, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(playerId, 1, source.getSourceId(), game, false, true); } } return true; @@ -107,7 +103,7 @@ class TheFallenEffect extends OneShotEffect { class TheFallenWatcher extends Watcher { - private Map<UUID, Set<UUID>> playersDealtDamageThisGame = new HashMap<>(); // Map<creatureId, Set<playerId>> + private Map<UUID, Set<UUID>> playersAndWalkersDealtDamageThisGame = new HashMap<>(); // Map<creatureId, Set<playerId>> public TheFallenWatcher() { super(TheFallenWatcher.class.getSimpleName(), WatcherScope.GAME); @@ -115,28 +111,29 @@ class TheFallenWatcher extends Watcher { public TheFallenWatcher(final TheFallenWatcher watcher) { super(watcher); - playersDealtDamageThisGame = new HashMap<>(watcher.playersDealtDamageThisGame); + playersAndWalkersDealtDamageThisGame = new HashMap<>(watcher.playersAndWalkersDealtDamageThisGame); } @Override public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (permanent != null) { Set<UUID> toAdd; - if (playersDealtDamageThisGame.get(event.getSourceId()) == null) { + if (playersAndWalkersDealtDamageThisGame.get(event.getSourceId()) == null) { toAdd = new HashSet<>(); } else { - toAdd = playersDealtDamageThisGame.get(event.getSourceId()); + toAdd = playersAndWalkersDealtDamageThisGame.get(event.getSourceId()); } toAdd.add(event.getPlayerId()); - playersDealtDamageThisGame.put(event.getSourceId(), toAdd); + playersAndWalkersDealtDamageThisGame.put(event.getSourceId(), toAdd); } } } - public Set<UUID> getPlayerDealtDamageThisGame(UUID creatureId) { - return playersDealtDamageThisGame.get(creatureId); + public Set<UUID> getPlayersAndWalkersDealtDamageThisGame(UUID creatureId) { + return playersAndWalkersDealtDamageThisGame.get(creatureId); } @Override diff --git a/Mage.Sets/src/mage/cards/t/ThornThallid.java b/Mage.Sets/src/mage/cards/t/ThornThallid.java index 7a6c9ee6cb..07321b63a8 100644 --- a/Mage.Sets/src/mage/cards/t/ThornThallid.java +++ b/Mage.Sets/src/mage/cards/t/ThornThallid.java @@ -42,7 +42,7 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,11 +58,11 @@ public class ThornThallid extends CardImpl { // At the beginning of your upkeep, put a spore counter on Thorn Thallid. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); - // Remove three spore counters from Thorn Thallid: Thorn Thallid deals 1 damage to target creature or player. + // Remove three spore counters from Thorn Thallid: Thorn Thallid deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java b/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java index fe5f2b8827..cd1c5bde21 100644 --- a/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java +++ b/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java @@ -47,7 +47,7 @@ import mage.constants.*; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,12 +65,12 @@ public class ThornbiteStaff extends CardImpl { this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.EQUIPMENT); - // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature or player" and "Whenever a creature dies, untap this creature." + // Equipped creature has "{2}, {T}: This creature deals 1 damage to any target" and "Whenever a creature dies, untap this creature." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2)); gainedAbility.addCost(new TapSourceCost()); - gainedAbility.addTarget(new TargetCreatureOrPlayer()); + gainedAbility.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT); - effect.setText("Equipped creature has \"{2}, {T}: This creature deals 1 damage to target creature or player\""); + effect.setText("Equipped creature has \"{2}, {T}: This creature deals 1 damage to any target\""); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect(new DiesCreatureTriggeredAbility(new UntapSourceEffect(),false), AttachmentType.EQUIPMENT); effect.setText("and \"Whenever a creature dies, untap this creature.\""); diff --git a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java index f3dd09dbfe..de3e841aa5 100644 --- a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java +++ b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java @@ -40,7 +40,7 @@ import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.StaticFilters; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.UUID; @@ -56,13 +56,13 @@ public class ThorncasterSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to target creature or player." + // Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to any target." Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) - .setText("Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\""))); + .setText("Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to any target.\""))); } public ThorncasterSliver(final ThorncasterSliver card) { diff --git a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java index ba25667c34..82de3710e2 100644 --- a/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java +++ b/Mage.Sets/src/mage/cards/t/ThornscapeBattlemage.java @@ -41,7 +41,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetArtifactPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -61,11 +61,11 @@ public class ThornscapeBattlemage extends CardImpl { kickerAbility.addKickerCost("{W}"); this.addAbility(kickerAbility); - // When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to target creature or player. + // 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 TargetCreatureOrPlayer()); + ability1.addTarget(new TargetAnyTarget()); this.addAbility(new ConditionalTriggeredAbility(ability1, new KickedCostCondition("{R}"), - "When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to target creature or player.")); + "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()); diff --git a/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java b/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java index e36c84270c..ca31923e2c 100644 --- a/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java +++ b/Mage.Sets/src/mage/cards/t/ThornwindFaeries.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class ThornwindFaeries extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Thornwind Faeries deals 1 damage to target creature or player. + // {tap}: Thornwind Faeries deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThrowingKnife.java b/Mage.Sets/src/mage/cards/t/ThrowingKnife.java index 2bf4ca5f6e..825fbd164c 100644 --- a/Mage.Sets/src/mage/cards/t/ThrowingKnife.java +++ b/Mage.Sets/src/mage/cards/t/ThrowingKnife.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,12 +58,12 @@ public class ThrowingKnife extends CardImpl { // Equipped creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); - // Whenever equipped creature attacks, you may sacrifice Throwing Knife. If you do, Throwing Knife deals 2 damage to target creature or player. + // Whenever equipped creature attacks, you may sacrifice Throwing Knife. If you do, Throwing Knife deals 2 damage to any target. Effect effect = new SacrificeSourceEffect(); effect.setText("you may sacrifice {this}. If you do, "); Ability ability = new AttacksAttachedTriggeredAbility(new SacrificeSourceEffect(), true); ability.addEffect(new DamageTargetEffect(2)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); diff --git a/Mage.Sets/src/mage/cards/t/Thumbscrews.java b/Mage.Sets/src/mage/cards/t/Thumbscrews.java index 28ec26b4cf..c8f89fe0cd 100644 --- a/Mage.Sets/src/mage/cards/t/Thumbscrews.java +++ b/Mage.Sets/src/mage/cards/t/Thumbscrews.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.TargetController; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -48,14 +48,18 @@ import mage.target.common.TargetOpponent; public class Thumbscrews extends CardImpl { public Thumbscrews(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // At the beginning of your upkeep, if you have five or more cards in hand, Thumbscrews deals 1 damage to target opponent. - TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), TargetController.YOU, false); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 4); - this.addAbility(new ConditionalTriggeredAbility(ability, condition, "At the beginning of your upkeep, if you have five or more cards in hand, {this} deals 1 damage to target opponent.")); + this.addAbility(new ConditionalTriggeredAbility( + 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." + )); } public Thumbscrews(final Thumbscrews card) { diff --git a/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java b/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java index 658c9920ec..73f3e813c3 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java +++ b/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java @@ -42,7 +42,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class ThunderbladeCharge extends CardImpl { public ThunderbladeCharge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); - // Thunderblade Charge deals 3 damage to target creature or player. + // Thunderblade Charge deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Whenever one or more creatures you control deal combat damage to a player, if Thunderblade Charge is in your graveyard, you may pay {2}{R}{R}{R}. If you do, you may cast it without paying its mana cost. this.addAbility(new ControlledCreaturesDealCombatDamagePlayerTriggeredAbility(Zone.GRAVEYARD, diff --git a/Mage.Sets/src/mage/cards/t/Thunderbolt.java b/Mage.Sets/src/mage/cards/t/Thunderbolt.java index 502f96d0db..b88a01815d 100644 --- a/Mage.Sets/src/mage/cards/t/Thunderbolt.java +++ b/Mage.Sets/src/mage/cards/t/Thunderbolt.java @@ -36,8 +36,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -52,12 +52,11 @@ public class Thunderbolt extends CardImpl { } public Thunderbolt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); // Choose one - Thunderbolt deals 3 damage to target player; or Thunderbolt deals 4 damage to target creature with flying. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(4)); mode.getTargets().add(new TargetCreaturePermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/t/ThunderousWrath.java b/Mage.Sets/src/mage/cards/t/ThunderousWrath.java index a34d17e23a..f2757f79c4 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderousWrath.java +++ b/Mage.Sets/src/mage/cards/t/ThunderousWrath.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.MiracleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class ThunderousWrath extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}{R}"); - // Thunderous Wrath deals 5 damage to target creature or player. + // Thunderous Wrath deals 5 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Miracle {R} this.addAbility(new MiracleAbility(this, new ManaCostsImpl("{R}"))); diff --git a/Mage.Sets/src/mage/cards/t/TickingGnomes.java b/Mage.Sets/src/mage/cards/t/TickingGnomes.java index e7699c17e4..4bb74237cc 100644 --- a/Mage.Sets/src/mage/cards/t/TickingGnomes.java +++ b/Mage.Sets/src/mage/cards/t/TickingGnomes.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class TickingGnomes extends CardImpl { // Echo {3} this.addAbility(new EchoAbility("{3}")); - // Sacrifice Ticking Gnomes: Ticking Gnomes deals 1 damage to target creature or player. + // Sacrifice Ticking Gnomes: Ticking Gnomes deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java b/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java index 3d7fde8cef..5a64bd8e18 100644 --- a/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java +++ b/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java @@ -44,7 +44,7 @@ import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,12 +59,12 @@ public class TitanOfEternalFire extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(6); - // Each Human creature you control has "{R}, {T}: This creature deals 1 damage to target creature or player." + // Each Human creature you control has "{R}, {T}: This creature deals 1 damage to any target." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, new FilterCreaturePermanent(SubType.HUMAN, "Each Human creature")); - effect.setText("Each Human creature you control has \"{R}, {T}: This creature deals 1 damage to target creature or player.\""); + effect.setText("Each Human creature you control has \"{R}, {T}: This creature deals 1 damage to any target.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/t/TitansRevenge.java b/Mage.Sets/src/mage/cards/t/TitansRevenge.java index 4087f7d6bf..e313aa1a03 100644 --- a/Mage.Sets/src/mage/cards/t/TitansRevenge.java +++ b/Mage.Sets/src/mage/cards/t/TitansRevenge.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class TitansRevenge extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}{R}"); - // Titan's Revenge deals X damage to target creature or player. Clash with an opponent. If you win, return Titan's Revenge to its owner's hand. + // Titan's Revenge deals X damage to any target. Clash with an opponent. If you win, return Titan's Revenge to its owner's hand. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(ClashWinReturnToHandSpellEffect.getInstance()); } diff --git a/Mage.Sets/src/mage/cards/t/TorchSong.java b/Mage.Sets/src/mage/cards/t/TorchSong.java index d6a19c2a46..95c817566d 100644 --- a/Mage.Sets/src/mage/cards/t/TorchSong.java +++ b/Mage.Sets/src/mage/cards/t/TorchSong.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.TargetController; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,14 +57,14 @@ public class TorchSong extends CardImpl { this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), TargetController.YOU, true)); - // {2}{R}, Sacrifice Torch Song: Torch Song deals X damage to target creature or player, where X is the number of verse counters on Torch Song. + // {2}{R}, Sacrifice Torch Song: Torch Song deals X damage to any target, where X is the number of verse counters on Torch Song. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}") ); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java index 6f6501f595..b2ad280f6c 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java +++ b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,11 +44,11 @@ public class TorrentOfFire extends CardImpl { public TorrentOfFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); - // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to target creature or player. + // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue()) - .setText("{this} deals damage to target creature or player equal to the highest converted mana cost among permanents you control.") + .setText("{this} deals damage to any target equal to the highest converted mana cost among permanents you control.") ); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public TorrentOfFire(final TorrentOfFire card) { diff --git a/Mage.Sets/src/mage/cards/t/TouchOfDeath.java b/Mage.Sets/src/mage/cards/t/TouchOfDeath.java index 1c3e066837..21b6070cd3 100644 --- a/Mage.Sets/src/mage/cards/t/TouchOfDeath.java +++ b/Mage.Sets/src/mage/cards/t/TouchOfDeath.java @@ -36,7 +36,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -45,13 +45,13 @@ import mage.target.TargetPlayer; public class TouchOfDeath extends CardImpl { public TouchOfDeath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); // Touch of Death deals 1 damage to target player. You gain 1 life. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new GainLifeEffect(1)); - + // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); } diff --git a/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java b/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java index e890247811..b15b16dc17 100644 --- a/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java +++ b/Mage.Sets/src/mage/cards/t/TouchOfTheVoid.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -51,9 +51,9 @@ public class TouchOfTheVoid extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - // Touch of the Void deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead. + // Touch of the Void deals 3 damage to any target. If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/t/TreefolkHealer.java b/Mage.Sets/src/mage/cards/t/TreefolkHealer.java index 0218d22751..98261c82ed 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkHealer.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkHealer.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,13 +55,13 @@ public class TreefolkHealer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // {2}{W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // {2}{W}, {tap}: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{2}{W}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java index f699fff726..876d86e3be 100644 --- a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java +++ b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class TrialOfZeal extends CardImpl { public TrialOfZeal(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); - // When Trial of Zeal enters the battlefield, it deals 3 damage to target creature or player. + // When Trial of Zeal enters the battlefield, it deals 3 damage to any target. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // When a Cartouche enters the battlefield under your control, return Trial of Zeal to its owner's hand. diff --git a/Mage.Sets/src/mage/cards/t/TribalFlames.java b/Mage.Sets/src/mage/cards/t/TribalFlames.java index 63d5fc3123..cc9726954d 100644 --- a/Mage.Sets/src/mage/cards/t/TribalFlames.java +++ b/Mage.Sets/src/mage/cards/t/TribalFlames.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class TribalFlames extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Domain - Tribal Flames deals X damage to target creature or player, where X is the number of basic land types among lands you control. + // Domain - Tribal Flames deals X damage to any target, where X is the number of basic land types among lands you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public TribalFlames(final TribalFlames card) { diff --git a/Mage.Sets/src/mage/cards/t/Triskelavus.java b/Mage.Sets/src/mage/cards/t/Triskelavus.java index b0d4434443..69c4cd860f 100644 --- a/Mage.Sets/src/mage/cards/t/Triskelavus.java +++ b/Mage.Sets/src/mage/cards/t/Triskelavus.java @@ -63,7 +63,7 @@ public class Triskelavus extends CardImpl { // Triskelavus enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); - // {1}, Remove a +1/+1 counter from Triskelavus: Create a 1/1 colorless Triskelavite artifact creature token with flying. It has "Sacrifice this creature: This creature deals 1 damage to target creature or player." + // {1}, Remove a +1/+1 counter from Triskelavus: Create a 1/1 colorless Triskelavite artifact creature token with flying. It has "Sacrifice this creature: This creature deals 1 damage to any target." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new TriskelaviteToken()), new GenericManaCost(1)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/Triskelion.java b/Mage.Sets/src/mage/cards/t/Triskelion.java index c4a0842929..7fc7fbce72 100644 --- a/Mage.Sets/src/mage/cards/t/Triskelion.java +++ b/Mage.Sets/src/mage/cards/t/Triskelion.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -58,9 +58,9 @@ public class Triskelion extends CardImpl { // Triskelion enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); - // Remove a +1/+1 counter from Triskelion: Triskelion deals 1 damage to target creature or player. + // Remove a +1/+1 counter from Triskelion: Triskelion deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TroubledHealer.java b/Mage.Sets/src/mage/cards/t/TroubledHealer.java index 734c5b38ed..189b86ad56 100644 --- a/Mage.Sets/src/mage/cards/t/TroubledHealer.java +++ b/Mage.Sets/src/mage/cards/t/TroubledHealer.java @@ -41,7 +41,7 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,12 +56,12 @@ public class TroubledHealer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); - // Sacrifice a land: Prevent the next 2 damage that would be dealt to target creature or player this turn. + // Sacrifice a land: Prevent the next 2 damage that would be dealt to any target this turn. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TurnBurn.java b/Mage.Sets/src/mage/cards/t/TurnBurn.java index 6409e7061f..eb89d5ef0a 100644 --- a/Mage.Sets/src/mage/cards/t/TurnBurn.java +++ b/Mage.Sets/src/mage/cards/t/TurnBurn.java @@ -40,7 +40,7 @@ import mage.constants.Duration; import mage.constants.SpellAbilityType; import mage.game.permanent.token.TokenImpl; import mage.game.permanent.token.Token; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -60,11 +60,11 @@ public class TurnBurn extends SplitCard { getLeftHalfCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); // Burn - // Burn deals 2 damage to target creature or player. + // Burn deals 2 damage to any target. effect = new DamageTargetEffect(2); - effect.setText("Burn deals 2 damage to target creature or player"); + effect.setText("Burn deals 2 damage to any target"); getRightHalfCard().getSpellAbility().addEffect(effect); - getRightHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + getRightHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/t/TwinBolt.java b/Mage.Sets/src/mage/cards/t/TwinBolt.java index fcdf804e52..cfa3760ec2 100644 --- a/Mage.Sets/src/mage/cards/t/TwinBolt.java +++ b/Mage.Sets/src/mage/cards/t/TwinBolt.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -48,7 +48,7 @@ public class TwinBolt extends CardImpl { Effect effect = new DamageMultiEffect(2); effect.setText("{this} deals 2 damage divided as you choose among one or two target creatures and/or players"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java b/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java index 89cecce087..630a3f46a5 100644 --- a/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java +++ b/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java @@ -43,8 +43,8 @@ import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.StaticFilters; import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -64,7 +64,7 @@ public class TymaretTheMurderKing extends CardImpl { // {1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false))); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); // {1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand. ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{1}{B}")); diff --git a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java index 056bda04cd..8b429fe8dc 100644 --- a/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java +++ b/Mage.Sets/src/mage/cards/t/TyrantOfValakut.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,11 +59,11 @@ public class TyrantOfValakut extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to target creature or player. + // 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 TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new ConditionalTriggeredAbility(ability, SurgedCondition.instance, - "When {this} enters the battlefield, if its surge cost was paid, it deals 3 damage to target creature or player.")); + "When {this} enters the battlefield, if its surge cost was paid, it deals 3 damage to any target.")); } public TyrantOfValakut(final TyrantOfValakut card) { diff --git a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java index b0b1bf62ee..f716266b9c 100644 --- a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java @@ -55,7 +55,7 @@ import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInHand; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -70,9 +70,9 @@ public class UginTheSpiritDragon extends CardImpl { this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); - // +2: Ugin, the Spirit Dragon deals 3 damage to target creature or player. + // +2: Ugin, the Spirit Dragon deals 3 damage to any target. LoyaltyAbility ability = new LoyaltyAbility(new DamageTargetEffect(3), 2); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // -X: Exile each permanent with converted mana cost X or less that's one or more colors. diff --git a/Mage.Sets/src/mage/cards/u/UndyingFlames.java b/Mage.Sets/src/mage/cards/u/UndyingFlames.java index 0fdb37c995..69508a4367 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingFlames.java +++ b/Mage.Sets/src/mage/cards/u/UndyingFlames.java @@ -40,7 +40,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class UndyingFlames extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{R}"); - // Exile cards from the top of your library until you exile a nonland card. Undying Flames deals damage to target creature or player equal to that card's converted mana cost. + // Exile cards from the top of your library until you exile a nonland card. Undying Flames deals damage to any target equal to that card's converted mana cost. this.getSpellAbility().addEffect(new UndyingFlamesEffect()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Epic this.getSpellAbility().addEffect(new EpicEffect()); @@ -76,7 +76,7 @@ class UndyingFlamesEffect extends OneShotEffect { public UndyingFlamesEffect() { super(Outcome.Benefit); - staticText = "Exile cards from the top of your library until you exile a nonland card. {this} deals damage to target creature or player equal to that card's converted mana cost"; + staticText = "Exile cards from the top of your library until you exile a nonland card. {this} deals damage to any target equal to that card's converted mana cost"; } public UndyingFlamesEffect(final UndyingFlamesEffect effect) { diff --git a/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java b/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java index 6026d6d579..e17f6bb90c 100644 --- a/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java +++ b/Mage.Sets/src/mage/cards/u/UnfriendlyFire.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,8 +43,8 @@ public class UnfriendlyFire extends CardImpl { public UnfriendlyFire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); - // Unfriendly Fire deals 4 damage to target creature or player. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Unfriendly Fire deals 4 damage to any target. + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); } diff --git a/Mage.Sets/src/mage/cards/u/UnstableFooting.java b/Mage.Sets/src/mage/cards/u/UnstableFooting.java index 18717b2b9d..33abbc4717 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableFooting.java +++ b/Mage.Sets/src/mage/cards/u/UnstableFooting.java @@ -43,7 +43,7 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -52,7 +52,7 @@ import mage.target.TargetPlayer; public class UnstableFooting extends CardImpl { public UnstableFooting(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // Kicker {3}{R} (You may pay an additional {3}{R} as you cast this spell.) this.addAbility(new KickerAbility("{3}{R}")); @@ -62,7 +62,7 @@ public class UnstableFooting extends CardImpl { this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(5), KickedCondition.instance, - "If {this} was kicked, it deals 5 damage to target player")); + "If this spell was kicked, it deals 5 damage to target player or planeswalker")); } @@ -71,7 +71,7 @@ public class UnstableFooting extends CardImpl { if (ability instanceof SpellAbility) { ability.getTargets().clear(); if (KickedCondition.instance.apply(game, ability)) { - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); } } } @@ -106,15 +106,15 @@ class UnstableFootingEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { return true; } - + @Override public boolean checksEventType(GameEvent event, Game game) { return event.getType() == EventType.PREVENT_DAMAGE; } - + @Override public boolean applies(GameEvent event, Ability source, Game game) { return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/u/UnyaroBeeSting.java b/Mage.Sets/src/mage/cards/u/UnyaroBeeSting.java index d2755a77bc..7c7754e5b0 100644 --- a/Mage.Sets/src/mage/cards/u/UnyaroBeeSting.java +++ b/Mage.Sets/src/mage/cards/u/UnyaroBeeSting.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -43,9 +43,9 @@ public class UnyaroBeeSting extends CardImpl { public UnyaroBeeSting(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); - // Unyaro Bee Sting deals 2 damage to target creature or player. + // Unyaro Bee Sting deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public UnyaroBeeSting(final UnyaroBeeSting card) { diff --git a/Mage.Sets/src/mage/cards/u/UnyaroBees.java b/Mage.Sets/src/mage/cards/u/UnyaroBees.java index 0f1f58ae3a..6287ce1213 100644 --- a/Mage.Sets/src/mage/cards/u/UnyaroBees.java +++ b/Mage.Sets/src/mage/cards/u/UnyaroBees.java @@ -42,7 +42,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -60,10 +60,10 @@ public class UnyaroBees extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // {G}: Unyaro Bees gets +1/+1 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{G}"))); - // {3}{G}, Sacrifice Unyaro Bees: Unyaro Bees deals 2 damage to target creature or player. + // {3}{G}, Sacrifice Unyaro Bees: Unyaro Bees deals 2 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasRage.java b/Mage.Sets/src/mage/cards/u/UrzasRage.java index fadef48a42..911b5d236e 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasRage.java +++ b/Mage.Sets/src/mage/cards/u/UrzasRage.java @@ -40,7 +40,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class UrzasRage extends CardImpl { public UrzasRage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Kicker {8}{R} this.addAbility(new KickerAbility("{8}{R}")); @@ -61,11 +61,11 @@ public class UrzasRage extends CardImpl { ability.setRuleAtTheTop(true); this.addAbility(ability); - // Urza's Rage deals 3 damage to target creature or player. If Urza's Rage was kicked, instead it deals 10 damage to that creature or player and the damage can't be prevented. + // Urza's Rage deals 3 damage to any target. If Urza's Rage was kicked, instead it deals 10 damage to that creature or player and the damage can't be prevented. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(10, false), new DamageTargetEffect(3), KickedCondition.instance, - "{this} deals 3 damage to target creature or player. If {this} was kicked, instead it deals 10 damage to that creature or player and the damage can't be prevented.")); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + "{this} deals 3 damage to any target. If {this} was kicked, instead it deals 10 damage to that permanent or player and the damage can't be prevented.")); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public UrzasRage(final UrzasRage card) { diff --git a/Mage.Sets/src/mage/cards/v/ValakutInvoker.java b/Mage.Sets/src/mage/cards/v/ValakutInvoker.java index 19dd41cc37..73af292d61 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutInvoker.java +++ b/Mage.Sets/src/mage/cards/v/ValakutInvoker.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class ValakutInvoker extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // {8}: Valakut Invoker deals 3 damage to target creature or player. + // {8}: Valakut Invoker deals 3 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new GenericManaCost(8)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java b/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java index e4d1e5f301..4f3a1c3d28 100644 --- a/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java +++ b/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java @@ -45,7 +45,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,7 +65,7 @@ public class ValakutTheMoltenPinnacle extends CardImpl { // Valakut, the Molten Pinnacle enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); - // Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, you may have Valakut, the Molten Pinnacle deal 3 damage to target creature or player. + // Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, you may have Valakut, the Molten Pinnacle deal 3 damage to any target. this.addAbility(new ValakutTheMoltenPinnacleTriggeredAbility()); // {T}: Add {R}. this.addAbility(new RedManaAbility()); @@ -86,7 +86,7 @@ class ValakutTheMoltenPinnacleTriggeredAbility extends TriggeredAbilityImpl { ValakutTheMoltenPinnacleTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(3), true); - this.addTarget(new TargetCreatureOrPlayer()); + this.addTarget(new TargetAnyTarget()); } ValakutTheMoltenPinnacleTriggeredAbility(ValakutTheMoltenPinnacleTriggeredAbility ability) { @@ -121,6 +121,6 @@ class ValakutTheMoltenPinnacleTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, you may have {this} deal 3 damage to target creature or player."; + return "Whenever a Mountain enters the battlefield under your control, if you control at least five other Mountains, you may have {this} deal 3 damage to any target."; } } diff --git a/Mage.Sets/src/mage/cards/v/VampiricFeast.java b/Mage.Sets/src/mage/cards/v/VampiricFeast.java index 47945ad621..484ed2bdf7 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricFeast.java +++ b/Mage.Sets/src/mage/cards/v/VampiricFeast.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,15 +45,15 @@ public class VampiricFeast extends CardImpl { public VampiricFeast(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{B}{B}"); - // Vampiric Feast deals 4 damage to target creature or player and you gain 4 life. + // Vampiric Feast deals 4 damage to any target and you gain 4 life. Effect effect = new DamageTargetEffect(4); - effect.setText("{this} deals 4 damage to target creature or player"); + effect.setText("{this} deals 4 damage to any target"); this.getSpellAbility().addEffect(effect); // and you gain 4 life. effect = new GainLifeEffect(4); effect.setText("and you gain 4 life"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public VampiricFeast(final VampiricFeast card) { diff --git a/Mage.Sets/src/mage/cards/v/VampiricTouch.java b/Mage.Sets/src/mage/cards/v/VampiricTouch.java index a4abbeea60..17b9c64af7 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricTouch.java +++ b/Mage.Sets/src/mage/cards/v/VampiricTouch.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -43,16 +43,16 @@ import mage.target.common.TargetOpponent; public class VampiricTouch extends CardImpl { public VampiricTouch(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); // Vampiric Touch deals 2 damage to target opponent and you gain 2 life. Effect effect = new DamageTargetEffect(2); - effect.setText("{this} deals 2 damage to target opponent"); + effect.setText("{this} deals 2 damage to target opponent or planeswalker"); this.getSpellAbility().addEffect(effect); effect = new GainLifeEffect(2); effect.setText("and you gain 2 life"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); } public VampiricTouch(final VampiricTouch card) { diff --git a/Mage.Sets/src/mage/cards/v/VengefulArchon.java b/Mage.Sets/src/mage/cards/v/VengefulArchon.java index 79bcf63e48..1b2ef7c9cf 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulArchon.java +++ b/Mage.Sets/src/mage/cards/v/VengefulArchon.java @@ -44,8 +44,7 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.players.Player; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -65,7 +64,7 @@ public class VengefulArchon extends CardImpl { // {X}: Prevent the next X damage that would be dealt to you this turn. If damage is prevented this way, Vengeful Archon deals that much damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new VengefulArchonEffect(), new ManaCostsImpl("{X}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } @@ -84,7 +83,7 @@ class VengefulArchonEffect extends PreventDamageToControllerEffect { public VengefulArchonEffect() { super(Duration.EndOfTurn, false, true, new ManacostVariableValue()); - staticText = "Prevent the next X damage that would be dealt to you this turn. If damage is prevented this way, {this} deals that much damage to target player"; + staticText = "Prevent the next X damage that would be dealt to you this turn. If damage is prevented this way, {this} deals that much damage to target player or planeswalker"; } public VengefulArchonEffect(final VengefulArchonEffect effect) { @@ -101,10 +100,7 @@ class VengefulArchonEffect extends PreventDamageToControllerEffect { PreventionEffectData preventionEffectData = super.preventDamageAction(event, source, game); int damage = preventionEffectData.getPreventedDamage(); if (damage > 0) { - Player player = game.getPlayer(source.getFirstTarget()); - if (player != null) { - player.damage(damage, source.getSourceId(), game, false, true); - } + game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true); } return preventionEffectData; } diff --git a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java index f3ca17c7eb..abf6e02dff 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java +++ b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java @@ -42,7 +42,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class VengefulRebirth extends CardImpl { public VengefulRebirth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{G}"); - // Return target card from your graveyard to your hand. If you return a nonland card to your hand this way, {this} deals damage equal to that card's converted mana cost to target creature or player + // Return target card from your graveyard to your hand. If you return a nonland card to your hand this way, {this} deals damage equal to that card's converted mana cost to any target this.getSpellAbility().addTarget(new TargetCardInYourGraveyard()); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new VengefulRebirthEffect()); // Exile Vengeful Rebirth. @@ -76,7 +76,7 @@ class VengefulRebirthEffect extends OneShotEffect { public VengefulRebirthEffect() { super(Outcome.DrawCard); - staticText = "Return target card from your graveyard to your hand. If you return a nonland card to your hand this way, {this} deals damage equal to that card's converted mana cost to target creature or player"; + staticText = "Return target card from your graveyard to your hand. If you return a nonland card to your hand this way, {this} deals damage equal to that card's converted mana cost to any target"; } public VengefulRebirthEffect(final VengefulRebirthEffect effect) { diff --git a/Mage.Sets/src/mage/cards/v/VentSentinel.java b/Mage.Sets/src/mage/cards/v/VentSentinel.java index a52f34adee..35ed362c63 100644 --- a/Mage.Sets/src/mage/cards/v/VentSentinel.java +++ b/Mage.Sets/src/mage/cards/v/VentSentinel.java @@ -42,20 +42,22 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author North */ public class VentSentinel extends CardImpl { + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures with defender you control"); - static{ + + static { filter.add(new AbilityPredicate(DefenderAbility.class)); } public VentSentinel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); @@ -64,7 +66,7 @@ public class VentSentinel extends CardImpl { this.addAbility(DefenderAbility.getInstance()); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), new ManaCostsImpl("{1}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java index 1519c59b8b..0835369de4 100644 --- a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java +++ b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java @@ -43,10 +43,14 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.SuperType; +import mage.filter.common.FilterPlaneswalkerPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; +import mage.target.TargetPermanent; import mage.util.RandomUtil; import mage.watchers.common.SpellsCastWatcher; @@ -119,7 +123,8 @@ class VialSmasherTheFierceTriggeredAbility extends SpellCastControllerTriggeredA @Override public String getRule() { - return "Whenever you cast your first spell each turn, {this} deals damage equal to that spell's converted mana cost to an opponent chosen at random."; + return "Whenever you cast your first spell each turn, choose an opponent at random. " + + "{this} deals damage equal to that spell’s converted mana cost to that player or a planeswalker that player controls"; } } @@ -127,7 +132,7 @@ class VialSmasherTheFierceEffect extends OneShotEffect { public VialSmasherTheFierceEffect() { super(Outcome.Damage); - this.staticText = "{this} deals damage equal to that spell's converted mana cost to an opponent chosen at random"; + this.staticText = "{this} choose an opponent at random. {this} deals damage equal to that spell’s converted mana cost to that player or a planeswalker that player controls"; } public VialSmasherTheFierceEffect(final VialSmasherTheFierceEffect effect) { @@ -155,6 +160,19 @@ class VialSmasherTheFierceEffect extends OneShotEffect { Player opponent = game.getPlayer(opponentId); if (opponent != null) { game.informPlayers(opponent.getLogName() + " was chosen at random."); + if (game.getBattlefield().getAllActivePermanents(new FilterPlaneswalkerPermanent(), opponentId, game).size() > 0) { + if (controller.chooseUse(Outcome.Damage, "Redirect to a planeswalker controlled by " + opponent.getLogName() + "?", source, game)) { + FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent("a planeswalker controlled by " + opponent.getLogName()); + filter.add(new ControllerIdPredicate(opponent.getId())); + TargetPermanent target = new TargetPermanent(1, 1, filter, false); + if (target.choose(Outcome.Damage, controller.getId(), source.getSourceId(), game)) { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + return permanent.damage(damage, source.getSourceId(), game, false, true) > 0; + } + } + } + } opponent.damage(damage, source.getSourceId(), game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java b/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java index 5ef4ad3e26..be499dd523 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoFangtail.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class ViashinoFangtail extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // {tap}: Viashino Fangtail deals 1 damage to target creature or player. + // {tap}: Viashino Fangtail deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VigilanteJustice.java b/Mage.Sets/src/mage/cards/v/VigilanteJustice.java index 809a3c310f..1d0dab6b2b 100644 --- a/Mage.Sets/src/mage/cards/v/VigilanteJustice.java +++ b/Mage.Sets/src/mage/cards/v/VigilanteJustice.java @@ -38,7 +38,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class VigilanteJustice extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); - // Whenever a Human enters the battlefield under your control, Vigilante Justice deals 1 damage to target creature or player. + // Whenever a Human enters the battlefield under your control, Vigilante Justice deals 1 damage to any target. Ability ability = new CreatureEntersBattlefieldTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), filter, false, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ViolentEruption.java b/Mage.Sets/src/mage/cards/v/ViolentEruption.java index 3c4f87ca80..24eb98c89b 100644 --- a/Mage.Sets/src/mage/cards/v/ViolentEruption.java +++ b/Mage.Sets/src/mage/cards/v/ViolentEruption.java @@ -34,7 +34,7 @@ import mage.abilities.keyword.MadnessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -48,7 +48,7 @@ public class ViolentEruption extends CardImpl { // Violent Eruption deals 4 damage divided as you choose among any number of target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(4)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4)); // Madness {1}{R}{R} this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{R}{R}"))); diff --git a/Mage.Sets/src/mage/cards/v/ViridianLongbow.java b/Mage.Sets/src/mage/cards/v/ViridianLongbow.java index 2891ff0c7a..25f3396e8f 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianLongbow.java +++ b/Mage.Sets/src/mage/cards/v/ViridianLongbow.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,11 +55,11 @@ public class ViridianLongbow extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); this.subtype.add(SubType.EQUIPMENT); - // Equipped creature has "{tap}: This creature deals 1 damage to target creature or player." + // Equipped creature has "{tap}: This creature deals 1 damage to any target." Effect effect = new DamageTargetEffect(1); - effect.setText("This creature deals 1 damage to target creature or player"); + effect.setText("This creature deals 1 damage to any target"); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT))); // Equip {3} diff --git a/Mage.Sets/src/mage/cards/v/VithianStinger.java b/Mage.Sets/src/mage/cards/v/VithianStinger.java index 989d74ba14..e6567d9ece 100644 --- a/Mage.Sets/src/mage/cards/v/VithianStinger.java +++ b/Mage.Sets/src/mage/cards/v/VithianStinger.java @@ -40,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class VithianStinger extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(1); - // {tap}: Vithian Stinger deals 1 damage to target creature or player. + // {tap}: Vithian Stinger deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // Unearth {1}{R} this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{R}"))); diff --git a/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java b/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java index 0157580485..f08a3954eb 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicGeyser.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,9 +45,9 @@ public class VolcanicGeyser extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}{R}"); - // Volcanic Geyser deals X damage to target creature or player. + // Volcanic Geyser deals X damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public VolcanicGeyser(final VolcanicGeyser card) { diff --git a/Mage.Sets/src/mage/cards/v/VolcanicHammer.java b/Mage.Sets/src/mage/cards/v/VolcanicHammer.java index 41f1559410..fde1dbc0ed 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicHammer.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicHammer.java @@ -32,7 +32,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @author magenoxx_at_gmail.com @@ -43,9 +43,9 @@ public class VolcanicHammer extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Volcanic Hammer deals 3 damage to target creature or player. + // Volcanic Hammer deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public VolcanicHammer(final VolcanicHammer card) { diff --git a/Mage.Sets/src/mage/cards/v/VolcanicRambler.java b/Mage.Sets/src/mage/cards/v/VolcanicRambler.java index 550c42363e..174b2517b7 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicRambler.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicRambler.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -47,14 +47,14 @@ import mage.target.TargetPlayer; public class VolcanicRambler extends CardImpl { public VolcanicRambler(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(6); this.toughness = new MageInt(4); // {2}{R}: Volcanic Rambler deals 1 damage to target player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}{R}")); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java b/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java index dbe088a0b4..d6b73ad557 100644 --- a/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java +++ b/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java @@ -35,7 +35,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TimingRule; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.common.TargetAnyTargetAmount; /** * @@ -49,7 +49,7 @@ public class VolleyOfBoulders extends CardImpl { // Volley of Boulders deals 6 damage divided as you choose among any number of target creatures and/or players. this.getSpellAbility().addEffect(new DamageMultiEffect(6)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(6)); + this.getSpellAbility().addTarget(new TargetAnyTargetAmount(6)); // Flashback {R}{R}{R}{R}{R}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{R}{R}{R}{R}{R}{R}"),TimingRule.SORCERY)); } diff --git a/Mage.Sets/src/mage/cards/v/VoltCharge.java b/Mage.Sets/src/mage/cards/v/VoltCharge.java index c00328a524..aaabf01c26 100644 --- a/Mage.Sets/src/mage/cards/v/VoltCharge.java +++ b/Mage.Sets/src/mage/cards/v/VoltCharge.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.counter.ProliferateEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,7 +45,7 @@ public class VoltCharge extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addEffect(new ProliferateEffect()); } diff --git a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java index a85e511f0e..c02f4b6160 100644 --- a/Mage.Sets/src/mage/cards/v/VoraciousDragon.java +++ b/Mage.Sets/src/mage/cards/v/VoraciousDragon.java @@ -43,7 +43,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import java.util.List; import java.util.UUID; @@ -67,9 +67,9 @@ public class VoraciousDragon extends CardImpl { // Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.) this.addAbility(new DevourAbility(DevourFactor.Devour1)); - // When Voracious Dragon enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured. + // When Voracious Dragon enters the battlefield, it deals damage to any target equal to twice the number of Goblins it devoured. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new TwiceDevouredGoblins(), "it"), false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokReplica.java b/Mage.Sets/src/mage/cards/v/VulshokReplica.java index ef2ac27da1..ce3d07a70a 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokReplica.java +++ b/Mage.Sets/src/mage/cards/v/VulshokReplica.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.v; import java.util.UUID; @@ -40,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -48,18 +47,18 @@ import mage.target.TargetPlayer; */ public class VulshokReplica extends CardImpl { - public VulshokReplica (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}"); + public VulshokReplica(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); this.subtype.add(SubType.BERSERKER); this.power = new MageInt(3); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } - public VulshokReplica (final VulshokReplica card) { + public VulshokReplica(final VulshokReplica card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java b/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java index 7f718b0f3b..ba9decb871 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java +++ b/Mage.Sets/src/mage/cards/v/VulshokSorcerer.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -56,9 +56,9 @@ public class VulshokSorcerer extends CardImpl { this.toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); - // {tap}: Vulshok Sorcerer deals 1 damage to target creature or player. + // {tap}: Vulshok Sorcerer deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WalkingBallista.java b/Mage.Sets/src/mage/cards/w/WalkingBallista.java index 5bc3c0bf4b..5434eacec5 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingBallista.java +++ b/Mage.Sets/src/mage/cards/w/WalkingBallista.java @@ -44,7 +44,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -65,9 +65,9 @@ public class WalkingBallista extends CardImpl { // {4}: Put a +1/+1 counter on Walking Ballista. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(4))); - // Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to target creature or player. + // Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to any target. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java b/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java index 521517ebf2..91e4e3eb7d 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java +++ b/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java @@ -45,7 +45,7 @@ import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.TargetPlayer; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -76,10 +76,13 @@ public class WallOfForgottenPharaohs extends CardImpl { Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), - new OrCondition("only if you control a Desert or there is a Desert card in your graveyard", + new OrCondition( + "only if you control a Desert or there is a Desert card in your graveyard", new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(filterDesertPermanent)), - new CardsInControllerGraveCondition(1, filterDesertCard))); - ability.addTarget(new TargetPlayer()); + new CardsInControllerGraveCondition(1, filterDesertCard) + ) + ); + ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfSouls.java b/Mage.Sets/src/mage/cards/w/WallOfSouls.java index 5bb91961d9..814c50c9c0 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSouls.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSouls.java @@ -43,8 +43,7 @@ import mage.game.Game; import mage.game.events.DamagedCreatureEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.players.Player; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -53,17 +52,17 @@ import mage.target.common.TargetOpponent; public class WallOfSouls extends CardImpl { public WallOfSouls(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.WALL); this.power = new MageInt(0); this.toughness = new MageInt(4); // Defender this.addAbility(DefenderAbility.getInstance()); - + // Whenever Wall of Souls is dealt combat damage, it deals that much damage to target opponent. Ability ability = new WallOfSoulsTriggeredAbility(); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } @@ -99,9 +98,9 @@ class WallOfSoulsTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getTargetId().equals(this.sourceId) && ((DamagedCreatureEvent)event).isCombatDamage()) { - this.getEffects().get(0).setValue("damage", event.getAmount()); - return true; + if (event.getTargetId().equals(this.sourceId) && ((DamagedCreatureEvent) event).isCombatDamage()) { + this.getEffects().get(0).setValue("damage", event.getAmount()); + return true; } return false; } @@ -116,7 +115,7 @@ class WallOfSoulsDealDamageEffect extends OneShotEffect { public WallOfSoulsDealDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals that much damage to target opponent"; + this.staticText = "it deals that much damage to target opponent or planeswalker"; } public WallOfSoulsDealDamageEffect(final WallOfSoulsDealDamageEffect effect) { @@ -132,12 +131,8 @@ class WallOfSoulsDealDamageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = (Integer) getValue("damage"); if (amount > 0) { - Player targetOpponent = game.getPlayer(source.getTargets().getFirstTarget()); - if (targetOpponent != null) { - targetOpponent.damage(amount, source.getSourceId(), game, false, true); - return true; - } + return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), amount, source.getSourceId(), game, false, true) > 0; } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/w/WanderingMage.java b/Mage.Sets/src/mage/cards/w/WanderingMage.java index 930cc06569..6120d27c9c 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingMage.java +++ b/Mage.Sets/src/mage/cards/w/WanderingMage.java @@ -49,9 +49,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; -import mage.target.TargetPlayer; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -92,7 +92,7 @@ public class WanderingMage extends CardImpl { ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{B}")); ability.addCost(new WanderingMageCost()); - ability.addTarget(new TargetPlayer()); + ability.addTarget(new TargetPlayerOrPlaneswalker()); Target target = new TargetControlledCreaturePermanent(); target.setNotTarget(true); ability.addTarget(target); diff --git a/Mage.Sets/src/mage/cards/w/WardOfPiety.java b/Mage.Sets/src/mage/cards/w/WardOfPiety.java index 159788703f..aca4ea4397 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfPiety.java +++ b/Mage.Sets/src/mage/cards/w/WardOfPiety.java @@ -46,7 +46,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -66,9 +66,9 @@ public class WardOfPiety extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // {1}{W}: The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player instead. + // {1}{W}: The next 1 damage that would be dealt to enchanted creature this turn is dealt to any target instead. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WardOfPietyPreventDamageTargetEffect(), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -88,7 +88,7 @@ class WardOfPietyPreventDamageTargetEffect extends RedirectionEffect { public WardOfPietyPreventDamageTargetEffect() { super(Duration.EndOfTurn, 1, true); - staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player instead"; + staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to any target instead"; } public WardOfPietyPreventDamageTargetEffect(final WardOfPietyPreventDamageTargetEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WarleadersHelix.java b/Mage.Sets/src/mage/cards/w/WarleadersHelix.java index b41ca4bbe8..ff63fc1ef1 100644 --- a/Mage.Sets/src/mage/cards/w/WarleadersHelix.java +++ b/Mage.Sets/src/mage/cards/w/WarleadersHelix.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -47,10 +47,10 @@ public class WarleadersHelix extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}{W}"); - // Warleader's Helix deals 4 damage to target creature or player and you gain 4 life. + // Warleader's Helix deals 4 damage to any target and you gain 4 life. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new GainLifeEffect(4)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } public WarleadersHelix(final WarleadersHelix card) { @@ -65,7 +65,7 @@ public class WarleadersHelix extends CardImpl { @Override public List<String> getRules() { List<String> rules = new ArrayList<>(); - rules.add("Warleader's Helix deals 4 damage to target creature or player and you gain 4 life."); + rules.add("Warleader's Helix deals 4 damage to any target and you gain 4 life."); return rules; } } diff --git a/Mage.Sets/src/mage/cards/w/WarstormSurge.java b/Mage.Sets/src/mage/cards/w/WarstormSurge.java index 6dd22b9c68..368f5db642 100644 --- a/Mage.Sets/src/mage/cards/w/WarstormSurge.java +++ b/Mage.Sets/src/mage/cards/w/WarstormSurge.java @@ -42,7 +42,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -53,9 +53,9 @@ public class WarstormSurge extends CardImpl { public WarstormSurge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{R}"); - // Whenever a creature enters the battlefield under your control, it deals damage equal to its power to target creature or player. + // Whenever a creature enters the battlefield under your control, it deals damage equal to its power to any target. Ability ability = new WarstormSurgeTriggeredAbility(); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -98,7 +98,7 @@ class WarstormSurgeTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature enters the battlefield under your control, it deals damage equal to its power to target creature or player."; + return "Whenever a creature enters the battlefield under your control, it deals damage equal to its power to any target."; } @Override @@ -111,7 +111,7 @@ class WarstormSurgeEffect extends OneShotEffect { public WarstormSurgeEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to its power to target creature or player"; + staticText = "it deals damage equal to its power to any target"; } public WarstormSurgeEffect(final WarstormSurgeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java b/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java index 3f3c1d4b4f..d495ee253c 100644 --- a/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java +++ b/Mage.Sets/src/mage/cards/w/WhereAncientsTread.java @@ -38,7 +38,7 @@ import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ import mage.target.common.TargetCreatureOrPlayer; super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); - // Whenever a creature with power 5 or greater enters the battlefield under your control, you may have Where Ancients Tread deal 5 damage to target creature or player. + // Whenever a creature with power 5 or greater enters the battlefield under your control, you may have Where Ancients Tread deal 5 damage to any target. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), filter, true); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WildSlash.java b/Mage.Sets/src/mage/cards/w/WildSlash.java index d15386c72f..372526698c 100644 --- a/Mage.Sets/src/mage/cards/w/WildSlash.java +++ b/Mage.Sets/src/mage/cards/w/WildSlash.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,9 +55,9 @@ public class WildSlash extends CardImpl { this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect(effect, new LockedInCondition(FerociousCondition.instance))); - // Wild Slash deals 2 damage to target creature or player. + // Wild Slash deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); } diff --git a/Mage.Sets/src/mage/cards/w/WitchHunter.java b/Mage.Sets/src/mage/cards/w/WitchHunter.java index 81c637527c..653fefca3d 100644 --- a/Mage.Sets/src/mage/cards/w/WitchHunter.java +++ b/Mage.Sets/src/mage/cards/w/WitchHunter.java @@ -43,15 +43,15 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetPlayerOrPlaneswalker; /** * * @author fireshoes */ public class WitchHunter extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); static { @@ -59,7 +59,7 @@ public class WitchHunter extends CardImpl { } public WitchHunter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); @@ -67,9 +67,9 @@ public class WitchHunter extends CardImpl { // {tap}: Witch Hunter deals 1 damage to target player. Ability damageAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - damageAbility.addTarget(new TargetPlayer()); + damageAbility.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(damageAbility); - + // {1}{W}{W}, {tap}: Return target creature an opponent controls to its owner's hand. Ability returnAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{1}{W}{W}")); returnAbility.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/w/Withstand.java b/Mage.Sets/src/mage/cards/w/Withstand.java index 911d495b65..15ff94e3a4 100644 --- a/Mage.Sets/src/mage/cards/w/Withstand.java +++ b/Mage.Sets/src/mage/cards/w/Withstand.java @@ -34,7 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -46,9 +46,9 @@ public class Withstand extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}"); this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - // Prevent the next 3 damage that would be dealt to target creature or player this turn. + // Prevent the next 3 damage that would be dealt to any target this turn. // Draw a card. } diff --git a/Mage.Sets/src/mage/cards/w/WizardsLightning.java b/Mage.Sets/src/mage/cards/w/WizardsLightning.java index fbf87292cf..95e6f9883d 100644 --- a/Mage.Sets/src/mage/cards/w/WizardsLightning.java +++ b/Mage.Sets/src/mage/cards/w/WizardsLightning.java @@ -40,8 +40,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; - +import mage.target.common.TargetAnyTarget; /** * * @author Will @@ -63,7 +62,7 @@ public class WizardsLightning extends CardImpl { this.addAbility(ability); // Wizard's Lightning deals 3 damage to any target. - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); } diff --git a/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java b/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java index 9ea6a87f46..bfe345483d 100644 --- a/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java +++ b/Mage.Sets/src/mage/cards/w/WolfhuntersQuiver.java @@ -42,7 +42,7 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; /** @@ -61,11 +61,11 @@ public class WolfhuntersQuiver extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); this.subtype.add(SubType.EQUIPMENT); - // Equipped creature has "{T}: This creature deals 1 damage to target creature or player" + // Equipped creature has "{T}: This creature deals 1 damage to any target" Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - abilityToGain.addTarget(new TargetCreatureOrPlayer()); + abilityToGain.addTarget(new TargetAnyTarget()); Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.EQUIPMENT); - effect.setText("Equipped creature has \"{T}: This creature deals 1 damage to target creature or player\""); + effect.setText("Equipped creature has \"{T}: This creature deals 1 damage to any target\""); SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); // and "{T}: This creature deals 3 damage to target Werewolf creature." diff --git a/Mage.Sets/src/mage/cards/w/WordsOfWar.java b/Mage.Sets/src/mage/cards/w/WordsOfWar.java index 248eb71804..58248334fa 100644 --- a/Mage.Sets/src/mage/cards/w/WordsOfWar.java +++ b/Mage.Sets/src/mage/cards/w/WordsOfWar.java @@ -42,7 +42,7 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,9 +54,9 @@ public class WordsOfWar extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); - // {1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead. + // {1}: The next time you would draw a card this turn, Words of War deals 2 damage to any target instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WordsOfWarEffect(), new GenericManaCost(1)); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } @@ -74,7 +74,7 @@ class WordsOfWarEffect extends ReplacementEffectImpl { WordsOfWarEffect() { super(Duration.EndOfTurn, Outcome.Damage); - staticText = "The next time you would draw a card this turn, {this} deals 2 damage to target creature or player instead."; + staticText = "The next time you would draw a card this turn, {this} deals 2 damage to any target instead."; } WordsOfWarEffect(final WordsOfWarEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WuLongbowman.java b/Mage.Sets/src/mage/cards/w/WuLongbowman.java index 8cec137c8a..d19ce12a1e 100644 --- a/Mage.Sets/src/mage/cards/w/WuLongbowman.java +++ b/Mage.Sets/src/mage/cards/w/WuLongbowman.java @@ -39,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -55,10 +55,10 @@ public class WuLongbowman extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {tap}: Wu Longbowman deals 1 damage to target creature or player. Activate this ability only during your turn, before attackers are declared. + // {tap}: Wu Longbowman deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/y/YamabushisFlame.java b/Mage.Sets/src/mage/cards/y/YamabushisFlame.java index 2dc03d402f..94a64379b6 100644 --- a/Mage.Sets/src/mage/cards/y/YamabushisFlame.java +++ b/Mage.Sets/src/mage/cards/y/YamabushisFlame.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; import mage.watchers.common.DamagedByWatcher; /** @@ -48,9 +48,9 @@ public class YamabushisFlame extends CardImpl { public YamabushisFlame(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Yamabushi's Flame deals 3 damage to target creature or player. + // Yamabushi's Flame deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/z/ZadasCommando.java b/Mage.Sets/src/mage/cards/z/ZadasCommando.java index 9834f741c6..e1270dc6fb 100644 --- a/Mage.Sets/src/mage/cards/z/ZadasCommando.java +++ b/Mage.Sets/src/mage/cards/z/ZadasCommando.java @@ -46,7 +46,7 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetControlledPermanent; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -62,7 +62,7 @@ public class ZadasCommando extends CardImpl { } public ZadasCommando(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.GOBLIN, SubType.ARCHER, SubType.ALLY); //this.subtype.add(SubType.GOBLIN); //this.subtype.add(SubType.ARCHER); @@ -76,7 +76,7 @@ public class ZadasCommando extends CardImpl { // <i>Cohort</i> — {T}, Tap an untapped Ally you control: Zada's Commando deals 1 damage to target opponent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); ability.setAbilityWord(AbilityWord.COHORT); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/Zap.java b/Mage.Sets/src/mage/cards/z/Zap.java index 7941244952..bfb8e30abe 100644 --- a/Mage.Sets/src/mage/cards/z/Zap.java +++ b/Mage.Sets/src/mage/cards/z/Zap.java @@ -33,7 +33,7 @@ import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -44,9 +44,9 @@ public class Zap extends CardImpl { public Zap(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Zap deals 1 damage to target creature or player. + // Zap deals 1 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addTarget(new TargetAnyTarget()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Sets/src/mage/cards/z/ZealotOfTheGodPharaoh.java b/Mage.Sets/src/mage/cards/z/ZealotOfTheGodPharaoh.java index e9c50d90f5..9cb39435da 100644 --- a/Mage.Sets/src/mage/cards/z/ZealotOfTheGodPharaoh.java +++ b/Mage.Sets/src/mage/cards/z/ZealotOfTheGodPharaoh.java @@ -38,7 +38,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetOpponent; +import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -55,7 +55,7 @@ public class ZealotOfTheGodPharaoh extends CardImpl { // {4}{R}: Zealot of the God-Pharaoh deals 2 damage to target opponent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{4}{R}")); - ability.addTarget(new TargetOpponent()); + ability.addTarget(new TargetOpponentOrPlaneswalker()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java b/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java index c9ad6f53bd..ddd9bf083d 100644 --- a/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java +++ b/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -57,9 +57,9 @@ public class ZhalfirinCrusader extends CardImpl { // Flanking this.addAbility(new FlankingAbility()); - // {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to target creature or player instead. + // {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to any target instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java b/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java index 3bf0910f58..4d14178ba3 100644 --- a/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java +++ b/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java @@ -37,7 +37,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -51,8 +51,8 @@ public class ZuranSpellcaster extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // {T}: Zuran Spellcaster deals 1 damage to target creature or player. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); + // {T}: Zuran Spellcaster deals 1 damage to any target. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java index d0b8d4e8e1..e0ef557c53 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/alternate/CastFromHandWithoutPayingManaCostTest.java @@ -146,7 +146,7 @@ public class CastFromHandWithoutPayingManaCostTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Shrapnel Blast", 1); - castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shrapnel Blast"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shrapnel Blast", "Ornithopter"); setChoice(playerA, "Yes"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/GideonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/GideonTest.java index 700b59deb6..f9f76ce833 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/GideonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/GideonTest.java @@ -64,7 +64,7 @@ public class GideonTest extends CardTestPlayerBase { activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "+1: Until your next turn, target creature gains indestructible. Untap that creature.", "Silvercoat Lion"); - castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt"); + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Silvercoat Lion"); setStopAt(4, PhaseStep.PRECOMBAT_MAIN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/RedirectDamageToPlaneswalkerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/RedirectDamageToPlaneswalkerTest.java index 9fc1ca14a0..b8dd22af75 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/RedirectDamageToPlaneswalkerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/RedirectDamageToPlaneswalkerTest.java @@ -30,6 +30,7 @@ package org.mage.test.cards.planeswalker; import mage.constants.PhaseStep; import mage.constants.Zone; import mage.counters.CounterType; +import org.junit.Ignore; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -39,6 +40,7 @@ import org.mage.test.serverside.base.CardTestPlayerBase; */ public class RedirectDamageToPlaneswalkerTest extends CardTestPlayerBase { + @Ignore @Test public void testDirectDamage() { // +2: Look at the top card of target player's library. You may put that card on the bottom of that player's library. diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/UginTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/UginTest.java index e5a784f387..a9b3b74c14 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/UginTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/planeswalker/UginTest.java @@ -58,7 +58,7 @@ public class UginTest extends CardTestPlayerBase { // -7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands. addCard(Zone.HAND, playerB, "Nissa, Vastwood Seer"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage", playerB); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Nissa, Vastwood Seer"); playLand(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Forest"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DamageEffectsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DamageEffectsTest.java index 50fc886cf5..bbcb7c52a9 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DamageEffectsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DamageEffectsTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.replacement; import mage.constants.PhaseStep; import mage.constants.Zone; +import org.junit.Ignore; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -96,6 +97,7 @@ public class DamageEffectsTest extends CardTestPlayerBase { } + @Ignore @Test public void vexingDevilFurnaceRathRedirectToPlaneswalker() { 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 d8fe776a6b..2ae49ae5f8 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 @@ -913,7 +913,7 @@ public class TestPlayer implements Player { if (target.getTargetController() != null && target.getAbilityController() != null) { abilityControllerId = target.getAbilityController(); } - if (target instanceof TargetPlayer || target instanceof TargetCreatureOrPlayer) { + if (target instanceof TargetPlayer || target instanceof TargetAnyTarget) { for (String targetDefinition : targets) { if (targetDefinition.startsWith("targetPlayer=")) { String playerName = targetDefinition.substring(targetDefinition.indexOf("targetPlayer=") + 13); @@ -929,7 +929,7 @@ public class TestPlayer implements Player { } } - if ((target instanceof TargetPermanent) || (target instanceof TargetPermanentOrPlayer) || (target instanceof TargetCreatureOrPlayer)) { + if ((target instanceof TargetPermanent) || (target instanceof TargetPermanentOrPlayer) || (target instanceof TargetAnyTarget)) { for (String targetDefinition : targets) { String[] targetList = targetDefinition.split("\\^"); boolean targetFound = false; diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index 6070e4693d..09ee402005 100644 --- a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java @@ -79,7 +79,7 @@ public class ContinuousEffects implements Serializable { private final Map<AsThoughEffectType, ContinuousEffectsList<AsThoughEffect>> asThoughEffectsMap = new EnumMap<>(AsThoughEffectType.class); public final List<ContinuousEffectsList<?>> allEffectsLists = new ArrayList<>(); private final ApplyCountersEffect applyCounters; - private final PlaneswalkerRedirectionEffect planeswalkerRedirectionEffect; +// private final PlaneswalkerRedirectionEffect planeswalkerRedirectionEffect; private final AuraReplacementEffect auraReplacementEffect; private final List<ContinuousEffect> previous = new ArrayList<>(); @@ -89,14 +89,14 @@ public class ContinuousEffects implements Serializable { public ContinuousEffects() { applyCounters = new ApplyCountersEffect(); - planeswalkerRedirectionEffect = new PlaneswalkerRedirectionEffect(); +// planeswalkerRedirectionEffect = new PlaneswalkerRedirectionEffect(); auraReplacementEffect = new AuraReplacementEffect(); collectAllEffects(); } public ContinuousEffects(final ContinuousEffects effect) { this.applyCounters = effect.applyCounters.copy(); - this.planeswalkerRedirectionEffect = effect.planeswalkerRedirectionEffect.copy(); +// this.planeswalkerRedirectionEffect = effect.planeswalkerRedirectionEffect.copy(); this.auraReplacementEffect = effect.auraReplacementEffect.copy(); layeredEffects = effect.layeredEffects.copy(); continuousRuleModifyingEffects = effect.continuousRuleModifyingEffects.copy(); @@ -339,9 +339,9 @@ public class ContinuousEffects implements Serializable { */ private Map<ReplacementEffect, Set<Ability>> getApplicableReplacementEffects(GameEvent event, Game game) { Map<ReplacementEffect, Set<Ability>> replaceEffects = new HashMap<>(); - if (planeswalkerRedirectionEffect.checksEventType(event, game) && planeswalkerRedirectionEffect.applies(event, null, game)) { - replaceEffects.put(planeswalkerRedirectionEffect, null); - } +// if (planeswalkerRedirectionEffect.checksEventType(event, game) && planeswalkerRedirectionEffect.applies(event, null, game)) { +// replaceEffects.put(planeswalkerRedirectionEffect, null); +// } if (auraReplacementEffect.checksEventType(event, game) && auraReplacementEffect.applies(event, null, game)) { replaceEffects.put(auraReplacementEffect, null); } @@ -1235,8 +1235,8 @@ public class ContinuousEffects implements Serializable { } } } else { - if (!(entry.getKey() instanceof AuraReplacementEffect) - && !(entry.getKey() instanceof PlaneswalkerRedirectionEffect)) { + if (!(entry.getKey() instanceof AuraReplacementEffect)) { +// && !(entry.getKey() instanceof PlaneswalkerRedirectionEffect)) { logger.error("Replacement effect without ability: " + entry.getKey().toString()); } } diff --git a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java index 0085719467..c4c8345042 100644 --- a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -43,9 +43,12 @@ import mage.players.Player; import mage.target.TargetPermanent; /** + * NOTE: This is no longer used, but I'm leaving it in because why not + * -TheElk801 * * @author BetaSteward_at_googlemail.com */ +@Deprecated public class PlaneswalkerRedirectionEffect extends RedirectionEffect { public PlaneswalkerRedirectionEffect() { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java index cc0940579d..25d81ab79d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java @@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; /** * @@ -63,7 +64,11 @@ public class DamageAllControlledTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) { + Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + if (player == null) { + return false; + } + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { permanent.damage(amount, source.getSourceId(), game, false, true); } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java index 2ba553547d..335fdc169f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java @@ -187,7 +187,12 @@ public class DamageTargetEffect extends OneShotEffect { if (!targetDescription.isEmpty()) { sb.append(targetDescription); } else { - sb.append("target ").append(mode.getTargets().get(0).getTargetName()); + String targetName = mode.getTargets().get(0).getTargetName(); + if (targetName.contains("any")) { + sb.append(targetName); + } else { + sb.append("target ").append(targetName); + } } if (!message.isEmpty()) { if (message.equals("1")) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java index aa07e5bdd0..af82bbf0a8 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java @@ -82,11 +82,16 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { } StringBuilder sb = new StringBuilder(); if (amountToPrevent == Integer.MAX_VALUE) { - sb.append("prevent all damage that would be dealt to target "); + sb.append("prevent all damage that would be dealt to "); } else { - sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); + sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to "); + } + String targetName = mode.getTargets().get(0).getTargetName(); + if (targetName.contains("any")) { + sb.append(targetName); + } else { + sb.append("target ").append(targetName); } - sb.append(mode.getTargets().get(0).getTargetName()); if (!duration.toString().isEmpty()) { sb.append(' '); if (duration == Duration.EndOfTurn) { diff --git a/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java b/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java new file mode 100644 index 0000000000..95eaa60b17 --- /dev/null +++ b/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java @@ -0,0 +1,28 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.filter.common; + +import mage.filter.FilterOpponent; +import mage.filter.FilterPermanent; + +/** + * + * @author LevelX2 + */ +public class FilterOpponentOrPlaneswalker extends FilterPermanentOrPlayer { + + public FilterOpponentOrPlaneswalker() { + this("opponent or planeswalker"); + } + + public FilterOpponentOrPlaneswalker(String name) { + super(name, new FilterPermanent(), new FilterOpponent()); + } + + public FilterOpponentOrPlaneswalker(final FilterOpponentOrPlaneswalker filter) { + super(filter); + } +} diff --git a/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java b/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java index d4e024f476..9c2827181f 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java +++ b/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java @@ -50,9 +50,13 @@ public class FilterPermanentOrPlayer extends FilterImpl<MageItem> implements Fil } public FilterPermanentOrPlayer(String name) { + this(name, new FilterPermanent(), new FilterPlayer()); + } + + public FilterPermanentOrPlayer(String name, FilterPermanent permanentFilter, FilterPlayer playerFilter) { super(name); - permanentFilter = new FilterPermanent(); - playerFilter = new FilterPlayer(); + this.permanentFilter = permanentFilter; + this.playerFilter = playerFilter; } public FilterPermanentOrPlayer(final FilterPermanentOrPlayer filter) { diff --git a/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java b/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java index 63848adb21..e02bb5a03a 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java @@ -5,80 +5,24 @@ */ package mage.filter.common; -import java.util.UUID; -import mage.MageItem; -import mage.filter.FilterImpl; -import mage.filter.FilterInPlay; +import mage.filter.FilterPermanent; import mage.filter.FilterPlayer; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; /** * * @author LevelX2 */ -public class FilterPlayerOrPlaneswalker extends FilterImpl<MageItem> implements FilterInPlay<MageItem> { - - protected FilterPlaneswalkerPermanent planeswalkerFilter; - protected final FilterPlayer playerFilter; +public class FilterPlayerOrPlaneswalker extends FilterPermanentOrPlayer { public FilterPlayerOrPlaneswalker() { this("player or planeswalker"); } public FilterPlayerOrPlaneswalker(String name) { - super(name); - planeswalkerFilter = new FilterPlaneswalkerPermanent(); - playerFilter = new FilterPlayer(); + super(name, new FilterPermanent(), new FilterPlayer()); } public FilterPlayerOrPlaneswalker(final FilterPlayerOrPlaneswalker filter) { super(filter); - this.planeswalkerFilter = filter.planeswalkerFilter.copy(); - this.playerFilter = filter.playerFilter.copy(); } - - @Override - public boolean checkObjectClass(Object object) { - return true; - } - - @Override - public boolean match(MageItem o, Game game) { - if (o instanceof Player) { - return playerFilter.match((Player) o, game); - } else if (o instanceof Permanent) { - return planeswalkerFilter.match((Permanent) o, game); - } - return false; - } - - @Override - public boolean match(MageItem o, UUID sourceId, UUID playerId, Game game) { - if (o instanceof Player) { - return playerFilter.match((Player) o, sourceId, playerId, game); - } else if (o instanceof Permanent) { - return planeswalkerFilter.match((Permanent) o, sourceId, playerId, game); - } - return false; - } - - public FilterPlaneswalkerPermanent getPlaneswalkerFilter() { - return this.planeswalkerFilter; - } - - public FilterPlayer getPlayerFilter() { - return this.playerFilter; - } - - public void setPlaneswalkerFilter(FilterPlaneswalkerPermanent planeswalkerFilter) { - this.planeswalkerFilter = planeswalkerFilter; - } - - @Override - public FilterPlayerOrPlaneswalker copy() { - return new FilterPlayerOrPlaneswalker(this); - } - } diff --git a/Mage/src/main/java/mage/game/Game.java b/Mage/src/main/java/mage/game/Game.java index da64fd01a3..ac2a2e2af5 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -132,6 +132,8 @@ public interface Game extends MageItem, Serializable { Player getPlayer(UUID playerId); + Player getPlayerOrPlaneswalkerController(UUID playerId); + Players getPlayers(); PlayerList getPlayerList(); @@ -469,4 +471,8 @@ public interface Game extends MageItem, Serializable { UUID getMonarchId(); void setMonarchId(Ability source, UUID monarchId); + + int damagePlayerOrPlaneswalker(UUID playerOrWalker, int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable); + + int damagePlayerOrPlaneswalker(UUID playerOrWalker, int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, List<UUID> appliedEffects); } diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index a460253693..2514565d97 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -306,6 +306,20 @@ public abstract class GameImpl implements Game, Serializable { return state.getPlayer(playerId); } + @Override + public Player getPlayerOrPlaneswalkerController(UUID playerId) { + Player player = getPlayer(playerId); + if (player != null) { + return player; + } + Permanent permanent = getPermanent(playerId); + if (permanent == null) { + return null; + } + player = getPlayer(permanent.getControllerId()); + return player; + } + @Override public MageObject getObject(UUID objectId) { if (objectId == null) { @@ -1565,14 +1579,14 @@ public abstract class GameImpl implements Game, Serializable { } state.addCommandObject(newPlane); informPlayers("You have planeswalked to " + newPlane.getLogName()); - + // Fire off the planeswalked event GameEvent event = new GameEvent(GameEvent.EventType.PLANESWALK, newPlane.getId(), null, newPlane.getId(), 0, true); if (!replaceEvent(event)) { GameEvent ge = new GameEvent(GameEvent.EventType.PLANESWALKED, newPlane.getId(), null, newPlane.getId(), 0, true); fireEvent(ge); } - + return true; } @@ -3145,4 +3159,22 @@ public abstract class GameImpl implements Game, Serializable { fireEvent(new GameEvent(GameEvent.EventType.BECOMES_MONARCH, monarchId, source == null ? null : source.getSourceId(), monarchId)); } } + + @Override + public int damagePlayerOrPlaneswalker(UUID playerOrWalker, int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable) { + return damagePlayerOrPlaneswalker(playerOrWalker, damage, sourceId, game, combatDamage, preventable, null); + } + + @Override + public int damagePlayerOrPlaneswalker(UUID playerOrWalker, int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, List<UUID> appliedEffects) { + Player player = getPlayer(playerOrWalker); + if (player != null) { + return player.damage(damage, sourceId, game, combatDamage, preventable, appliedEffects); + } + Permanent permanent = getPermanent(playerOrWalker); + if (permanent != null) { + return permanent.damage(damage, sourceId, game, combatDamage, preventable, appliedEffects); + } + return 0; + } } diff --git a/Mage/src/main/java/mage/game/command/emblems/ArlinnEmbracedByTheMoonEmblem.java b/Mage/src/main/java/mage/game/command/emblems/ArlinnEmbracedByTheMoonEmblem.java index e2d7472777..053b9413a2 100644 --- a/Mage/src/main/java/mage/game/command/emblems/ArlinnEmbracedByTheMoonEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/ArlinnEmbracedByTheMoonEmblem.java @@ -41,7 +41,7 @@ import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledCreaturePermanent; import mage.game.command.Emblem; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -59,7 +59,7 @@ public class ArlinnEmbracedByTheMoonEmblem extends Emblem { Effect effect2 = new DamageTargetEffect(new SourcePermanentPowerCount()); effect2.setText("This creature deals damage equal to its power to target creature or player"); Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect2, new TapSourceCost()); - ability2.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetAnyTarget()); effect = new GainAbilityControlledEffect(ability2, Duration.EndOfGame, filter); effect.setText("and '{T}: This creature deals damage equal to its power to target creature or player"); ability.addEffect(effect); diff --git a/Mage/src/main/java/mage/game/command/emblems/ChandraTorchOfDefianceEmblem.java b/Mage/src/main/java/mage/game/command/emblems/ChandraTorchOfDefianceEmblem.java index de17acdc38..8b10b8765e 100644 --- a/Mage/src/main/java/mage/game/command/emblems/ChandraTorchOfDefianceEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/ChandraTorchOfDefianceEmblem.java @@ -34,7 +34,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.game.command.Emblem; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -48,7 +48,7 @@ public class ChandraTorchOfDefianceEmblem extends Emblem { Effect effect = new DamageTargetEffect(5); effect.setText("this emblem deals 5 damage to target creature or player"); Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, new FilterSpell("a spell"), false, false); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); getAbilities().add(ability); } } diff --git a/Mage/src/main/java/mage/game/command/emblems/KothOfTheHammerEmblem.java b/Mage/src/main/java/mage/game/command/emblems/KothOfTheHammerEmblem.java index d38928cfad..29e899db91 100644 --- a/Mage/src/main/java/mage/game/command/emblems/KothOfTheHammerEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/KothOfTheHammerEmblem.java @@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.command.Emblem; import mage.game.permanent.Permanent; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -83,7 +83,7 @@ class KothOfTheHammerThirdEffect extends ContinuousEffectImpl { if (sublayer == SubLayer.NA) { for (Permanent permanent : game.getBattlefield().getActivePermanents(mountains, source.getControllerId(), source.getSourceId(), game)) { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); permanent.addAbility(ability, source.getSourceId(), game); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/DevilToken.java b/Mage/src/main/java/mage/game/permanent/token/DevilToken.java index 7c6dd1a53e..85d8c8cc45 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DevilToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DevilToken.java @@ -36,7 +36,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -45,7 +45,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class DevilToken extends TokenImpl { public DevilToken() { - super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to target creature or player.\""); + super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to any target.\""); availableImageSetCodes.addAll(Collections.singletonList("SOI")); cardType.add(CardType.CREATURE); subtype.add(SubType.DEVIL); @@ -53,9 +53,9 @@ public class DevilToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); Effect effect = new DamageTargetEffect(1); - effect.setText("it deals 1 damage to target creature or player"); + effect.setText("it deals 1 damage to any target"); Ability ability = new DiesTriggeredAbility(effect); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java b/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java index 4249a8f526..e80a0ac8ff 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TriskelaviteToken.java @@ -36,7 +36,7 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.constants.Zone; -import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetAnyTarget; /** * @@ -54,7 +54,7 @@ public class TriskelaviteToken extends TokenImpl { toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); addAbility(FlyingAbility.getInstance()); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index dbd55c6c2f..c237718ee6 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -440,7 +440,7 @@ public abstract class PlayerImpl implements Player, Serializable { this.canLoseLife = true; this.topCardRevealed = false; this.payManaMode = false; - this.setLife(game.getLife(), game, UUID.randomUUID()); + this.setLife(game.getLife(), game, (UUID) null); this.setReachedNextTurnAfterLeaving(false); this.castSourceIdWithAlternateMana = null; diff --git a/Mage/src/main/java/mage/target/common/TargetAnyTarget.java b/Mage/src/main/java/mage/target/common/TargetAnyTarget.java index 3ebf6eee11..2fbe3046ed 100644 --- a/Mage/src/main/java/mage/target/common/TargetAnyTarget.java +++ b/Mage/src/main/java/mage/target/common/TargetAnyTarget.java @@ -15,8 +15,7 @@ import mage.players.Player; import mage.target.TargetImpl; /** - * @author JRHerlehy - * Created on 4/8/18. + * @author JRHerlehy Created on 4/8/18. */ public class TargetAnyTarget extends TargetImpl { @@ -165,14 +164,14 @@ public class TargetAnyTarget extends TargetImpl { for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { Player player = game.getPlayer(playerId); if (player != null - && player.canBeTargetedBy(targetSource, sourceControllerId, game) - && filter.getPlayerFilter().match(player, sourceId, sourceControllerId, game)) { + && player.canBeTargetedBy(targetSource, sourceControllerId, game) + && filter.getPlayerFilter().match(player, sourceId, sourceControllerId, game)) { possibleTargets.add(playerId); } } for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getCreatureFilter(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) - && filter.getCreatureFilter().match(permanent, sourceId, sourceControllerId, game)) { + && filter.getCreatureFilter().match(permanent, sourceId, sourceControllerId, game)) { possibleTargets.add(permanent.getId()); } } diff --git a/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java b/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java new file mode 100644 index 0000000000..4685e32c3b --- /dev/null +++ b/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java @@ -0,0 +1,35 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.target.common; + +import mage.filter.common.FilterOpponentOrPlaneswalker; + +/** + * + * @author LevelX2 + */ +public class TargetOpponentOrPlaneswalker extends TargetPermanentOrPlayer { + + public TargetOpponentOrPlaneswalker() { + this(1, 1, new FilterOpponentOrPlaneswalker(), false); + } + + public TargetOpponentOrPlaneswalker(int numTargets) { + this(numTargets, numTargets, new FilterOpponentOrPlaneswalker(), false); + } + + public TargetOpponentOrPlaneswalker(FilterOpponentOrPlaneswalker filter) { + this(1, 1, filter, false); + } + + public TargetOpponentOrPlaneswalker(int minNumTargets, int maxNumTargets, FilterOpponentOrPlaneswalker filter, boolean notTarget) { + super(minNumTargets, maxNumTargets, filter, notTarget); + } + + public TargetOpponentOrPlaneswalker(final TargetOpponentOrPlaneswalker target) { + super(target); + } +} diff --git a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java index 7cf54490bf..4be0a4b88b 100644 --- a/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java +++ b/Mage/src/main/java/mage/target/common/TargetPermanentOrPlayer.java @@ -65,7 +65,7 @@ public class TargetPermanentOrPlayer extends TargetImpl { this.zone = Zone.ALL; this.filter = new FilterPermanentOrPlayer(); this.targetName = filter.getMessage(); - this.filterPermanent = new FilterPermanent(); + this.filterPermanent = this.filter.getPermanentFilter(); } public TargetPermanentOrPlayer(int minNumTargets, int maxNumTargets, boolean notTarget) { @@ -73,6 +73,11 @@ public class TargetPermanentOrPlayer extends TargetImpl { this.notTarget = notTarget; } + public TargetPermanentOrPlayer(int minNumTargets, int maxNumTargets, FilterPermanentOrPlayer filter, boolean notTarget) { + this(minNumTargets, maxNumTargets, notTarget); + this.filter = filter; + } + public TargetPermanentOrPlayer(final TargetPermanentOrPlayer target) { super(target); this.filter = target.filter.copy(); diff --git a/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java b/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java index 5151043155..a7452ddf41 100644 --- a/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java @@ -14,204 +14,31 @@ import mage.constants.Zone; import mage.filter.Filter; import mage.filter.common.FilterPlaneswalkerPermanent; import mage.filter.common.FilterPlayerOrPlaneswalker; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.TargetImpl; /** * * @author LevelX2 */ -public class TargetPlayerOrPlaneswalker extends TargetImpl { - - protected FilterPlayerOrPlaneswalker filter; +public class TargetPlayerOrPlaneswalker extends TargetPermanentOrPlayer { public TargetPlayerOrPlaneswalker() { - this(1, 1, new FilterPlayerOrPlaneswalker()); + this(1, 1, new FilterPlayerOrPlaneswalker(), false); } public TargetPlayerOrPlaneswalker(int numTargets) { - this(numTargets, numTargets, new FilterPlayerOrPlaneswalker()); + this(numTargets, numTargets, new FilterPlayerOrPlaneswalker(), false); } public TargetPlayerOrPlaneswalker(FilterPlayerOrPlaneswalker filter) { - this(1, 1, filter); + this(1, 1, filter, false); } - public TargetPlayerOrPlaneswalker(int minNumTargets, int maxNumTargets, FilterPlayerOrPlaneswalker filter) { - this.minNumberOfTargets = minNumTargets; - this.maxNumberOfTargets = maxNumTargets; - this.zone = Zone.ALL; - this.filter = filter; - this.targetName = filter.getMessage(); + public TargetPlayerOrPlaneswalker(int minNumTargets, int maxNumTargets, FilterPlayerOrPlaneswalker filter, boolean notTarget) { + super(minNumTargets, maxNumTargets, filter, notTarget); } public TargetPlayerOrPlaneswalker(final TargetPlayerOrPlaneswalker target) { super(target); - this.filter = target.filter.copy(); - } - - @Override - public Filter getFilter() { - return this.filter; - } - - @Override - public boolean canTarget(UUID id, Game game) { - Permanent permanent = game.getPermanent(id); - if (permanent != null) { - return filter.match(permanent, game); - } - Player player = game.getPlayer(id); - return player != null && filter.match(player, game); - } - - @Override - public boolean canTarget(UUID id, Ability source, Game game) { - return canTarget(source.getControllerId(), id, source, game); - } - - @Override - public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) { - Permanent permanent = game.getPermanent(id); - Player player = game.getPlayer(id); - - if (source != null) { - MageObject targetSource = game.getObject(source.getSourceId()); - if (permanent != null) { - return permanent.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(permanent, source.getSourceId(), source.getControllerId(), game); - } - if (player != null) { - return player.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(player, game); - } - } - - if (permanent != null) { - return filter.match(permanent, game); - } - return player != null && filter.match(player, game); - } - - /** - * Checks if there are enough {@link Permanent} or {@link Player} that can - * be chosen. Should only be used for Ability targets since this checks for - * protection, shroud etc. - * - * @param sourceId - the target event source - * @param sourceControllerId - controller of the target event source - * @param game - * @return - true if enough valid {@link Permanent} or {@link Player} exist - */ - @Override - public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { - int count = 0; - MageObject targetSource = game.getObject(sourceId); - for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { - Player player = game.getPlayer(playerId); - if (player != null && player.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(player, game)) { - count++; - if (count >= this.minNumberOfTargets) { - return true; - } - } - } - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPlaneswalkerFilter(), sourceControllerId, game)) { - if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && filter.match(permanent, sourceId, sourceControllerId, game)) { - count++; - if (count >= this.minNumberOfTargets) { - return true; - } - } - } - return false; - } - - /** - * Checks if there are enough {@link Permanent} or {@link Player} that can - * be selected. Should not be used for Ability targets since this does not - * check for protection, shroud etc. - * - * @param sourceControllerId - controller of the select event - * @param game - * @return - true if enough valid {@link Permanent} or {@link Player} exist - */ - @Override - public boolean canChoose(UUID sourceControllerId, Game game) { - int count = 0; - for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { - Player player = game.getPlayer(playerId); - if (player != null && filter.match(player, game)) { - count++; - if (count >= this.minNumberOfTargets) { - return true; - } - } - } - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPlaneswalkerFilter(), sourceControllerId, game)) { - if (filter.match(permanent, null, sourceControllerId, game)) { - count++; - if (count >= this.minNumberOfTargets) { - return true; - } - } - } - return false; - } - - @Override - public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { - Set<UUID> possibleTargets = new HashSet<>(); - MageObject targetSource = game.getObject(sourceId); - for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { - Player player = game.getPlayer(playerId); - if (player != null - && player.canBeTargetedBy(targetSource, sourceControllerId, game) - && filter.getPlayerFilter().match(player, sourceId, sourceControllerId, game)) { - possibleTargets.add(playerId); - } - } - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPlaneswalkerFilter(), sourceControllerId, game)) { - if (permanent.canBeTargetedBy(targetSource, sourceControllerId, game) - && filter.getPlaneswalkerFilter().match(permanent, sourceId, sourceControllerId, game)) { - possibleTargets.add(permanent.getId()); - } - } - return possibleTargets; - } - - @Override - public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) { - Set<UUID> possibleTargets = new HashSet<>(); - for (UUID playerId : game.getState().getPlayersInRange(sourceControllerId, game)) { - Player player = game.getPlayer(playerId); - if (player != null && filter.getPlayerFilter().match(player, game)) { - possibleTargets.add(playerId); - } - } - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter.getPlaneswalkerFilter(), sourceControllerId, game)) { - if (filter.getPlaneswalkerFilter().match(permanent, null, sourceControllerId, game)) { - possibleTargets.add(permanent.getId()); - } - } - return possibleTargets; - } - - @Override - public String getTargetedName(Game game) { - StringBuilder sb = new StringBuilder(); - for (UUID targetId : getTargets()) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - sb.append(permanent.getLogName()).append(' '); - } else { - Player player = game.getPlayer(targetId); - if (player != null) { - sb.append(player.getLogName()).append(' '); - } - } - } - return sb.toString(); } public FilterPlaneswalkerPermanent getPlaneswalkerFilter() { @@ -222,5 +49,4 @@ public class TargetPlayerOrPlaneswalker extends TargetImpl { public TargetPlayerOrPlaneswalker copy() { return new TargetPlayerOrPlaneswalker(this); } - }