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 d6320f38b04..c53b0f71a9e 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 TargetAnyTarget) { + if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) { List targets; - TargetAnyTarget t = ((TargetAnyTarget) target); + TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) 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 TargetAnyTarget) { + if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) { List targets; - TargetAnyTarget t = ((TargetAnyTarget) target); + TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) target); if (outcome.isGood()) { targets = threats(abilityControllerId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } else { @@ -821,8 +821,7 @@ 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 - || target.getOriginalTarget() instanceof TargetAnyTargetAmount) { + if (target.getOriginalTarget() instanceof TargetCreatureOrPlayerAmount) { 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 5197c335365..c1bd72b2017 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget) { + if (target instanceof TargetCreaturePermanent || target instanceof TargetCreatureOrPlayer) { 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 de2363ce9ce..7f358f6c4e7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget(); + Target target = new TargetCreatureOrPlayer(); 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 e4aa41a9f62..6bd01b808c3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); 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 be2b1cd08ab..4aca4b12309 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // All Slivers have "{2}, Sacrifice this permanent: This permanent deals 2 damage to target creature or player." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); ability.addCost(new GenericManaCost(2)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""))); + "All Slivers have \"{2}, Sacrifice this permanent: This permanent deals 2 damage to target creature or player.\""))); } 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 74f96abad30..e56a4fbb330 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // 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. this.getSpellAbility().addEffect(new AcolytesRewardEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + 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"; } 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 fb2d3d3efce..34e7cf959c4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. That creature's controller or that player creates a 1/1 green Squirrel creature token. + // {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. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addEffect(new AcornCatapultEffect()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/Aeolipile.java b/Mage.Sets/src/mage/cards/a/Aeolipile.java index d7b7c269d12..65f30d2b696 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, {tap}, Sacrifice Aeolipile: Aeolipile deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AetherCharge.java b/Mage.Sets/src/mage/cards/a/AetherCharge.java index 1fc12854f09..a0a3bd96994 100644 --- a/Mage.Sets/src/mage/cards/a/AetherCharge.java +++ b/Mage.Sets/src/mage/cards/a/AetherCharge.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; @@ -44,7 +43,10 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.target.common.TargetOpponentOrPlaneswalker; +import mage.players.Player; +import mage.target.common.TargetOpponent; + +import java.util.UUID; /** * @@ -59,11 +61,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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } @@ -106,7 +108,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 or planeswalker."; + return "Whenever a Beast enters the battlefield under your control, you may have it deal 4 damage to target opponent."; } @Override @@ -119,7 +121,7 @@ class AetherChargeEffect extends OneShotEffect { public AetherChargeEffect() { super(Outcome.Damage); - staticText = "you may have it deal 4 damage to target opponent or planeswalker"; + staticText = "you may have it deal 4 damage to target opponent"; } public AetherChargeEffect(final AetherChargeEffect effect) { @@ -139,7 +141,12 @@ class AetherChargeEffect extends OneShotEffect { creature = (Permanent) game.getLastKnownInformation(creatureId, Zone.BATTLEFIELD); } if (creature != null) { - return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), 4, creature.getId(), game, false, true) > 0; + UUID target = source.getTargets().getFirstTarget(); + Player opponent = game.getPlayer(target); + if (opponent != null) { + opponent.damage(4, creature.getId(), game, false, true); + return true; + } } return false; } diff --git a/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java b/Mage.Sets/src/mage/cards/a/AetherfluxReservoir.java index 7fe71f66d9c..e03dc9d83bb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Pay 50 life: Aetherflux Reservoir deals 50 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(50), new PayLifeCost(50)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java b/Mage.Sets/src/mage/cards/a/AethertorchRenegade.java index b1182a161d5..847b0c98363 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.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 364baf20040..a547e75f0a2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}, Sacrifice a Goblin creature: Airdrop Condor deals damage equal to the sacrificed creature's power to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SacrificeCostCreaturesPower()), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AjaniVengeant.java b/Mage.Sets/src/mage/cards/a/AjaniVengeant.java index 4bf61182c4a..6a8f6e3fb37 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -70,12 +70,12 @@ public class AjaniVengeant extends CardImpl { ability1.addTarget(new TargetPermanent()); this.addAbility(ability1); - // −2: Ajani Vengeant deals 3 damage to any target and you gain 3 life. + // −2: Ajani Vengeant deals 3 damage to target creature or player 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 TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 d5306a5adc5..2cdac920701 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget(); + Target target = new TargetCreatureOrPlayer(); 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 04ac8ad3a3a..f81428b2c69 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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()); - // Landfall-Whenever a land enters the battlefield under you control, Akoum Hellkite deals 1 damage to any target. + // Landfall-Whenever a land enters the battlefield under you control, Akoum Hellkite 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. Ability ability = new AkoumHellkiteTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -82,8 +82,8 @@ public class AkoumHellkite extends CardImpl { class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl { - private static final String text = "Landfall - 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."; + private static final String text = "Landfall - 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."; public AkoumHellkiteTriggeredAbility() { super(Zone.BATTLEFIELD, new AkoumHellkiteDamageEffect()); @@ -110,13 +110,12 @@ 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)); - } - return true; + if (effect instanceof AkoumHellkiteDamageEffect) { + effect.setTargetPointer(new FixedTarget(permanent, game)); } + 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 36fdbf72b30..0dbcf088b98 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Choose one - Target player gains X life; or prevent the next X damage that would be dealt to target creature or player 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 TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 d23ce849f60..037074e100e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AladdinsRing.java b/Mage.Sets/src/mage/cards/a/AladdinsRing.java index f50c083cbf2..7a2df529f00 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {8}, {tap}: Aladdin's Ring deals 4 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{8}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 fbe7b6b4d4f..ced0fe62c8b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {2}, {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AnabaShaman.java b/Mage.Sets/src/mage/cards/a/AnabaShaman.java index c7423ba1d45..51b217fe98c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, {tap}: Anaba Shaman deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AncientHydra.java b/Mage.Sets/src/mage/cards/a/AncientHydra.java index 9268475e059..e1ab614e92f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, Remove a fade counter from Ancient Hydra: Ancient Hydra deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new RemoveCountersSourceCost(CounterType.FADE.createInstance(1))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java b/Mage.Sets/src/mage/cards/a/AngelOfSalvation.java index ec72e86d243..e520c692286 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(5)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 c916f562443..e685f257608 100644 --- a/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java +++ b/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java @@ -52,7 +52,6 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetOpponent; -import mage.target.common.TargetOpponentOrPlaneswalker; /** * @@ -70,11 +69,9 @@ 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 or that planeswalker’s controller controls") - ); + effects1.add(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()).setText("and each creature that player controls")); LoyaltyAbility ability1 = new LoyaltyAbility(effects1, +2); - ability1.addTarget(new TargetOpponentOrPlaneswalker()); + ability1.addTarget(new TargetOpponent()); 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 bd3e97a74a7..3141cb58d4b 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 or planeswalker")); - this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + .setText("{this} deals 3 damage to target player")); + this.getSpellAbility().addTarget(new TargetPlayer()); // 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 9af1d8e8f9a..44148bda0f1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Annihilating Fire deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 71625783534..c3ec17a4179 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 = "Hellbent - 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."; + staticText = "Hellbent - 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."; } public AnthemOfRakdosHellbentEffect(final AnthemOfRakdosHellbentEffect effect) { @@ -96,8 +96,7 @@ 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_PLANESWALKER; + || event.getType() == GameEvent.EventType.DAMAGE_PLAYER; } @Override diff --git a/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java b/Mage.Sets/src/mage/cards/a/ApocalypseHydra.java index 60b87e04ef8..349da3a7baf 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java b/Mage.Sets/src/mage/cards/a/ApprenticeSorcerer.java index fe710099911..03ca49a8ba1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only during your turn, before attackers are declared. + // {tap}: Apprentice Sorcerer deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArcBlade.java b/Mage.Sets/src/mage/cards/a/ArcBlade.java index b800c6330cc..c79568aab84 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Arc Blade deals 2 damage to target creature or player. 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 57d8ab770f6..6baa527099b 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 b143071752f..4475f5da9dd 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(2)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 2525d35386a..cf8ec355b81 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, Exile the top ten cards of your library: Arc-Slogger deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new ExileFromTopOfLibraryCost(10)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/ArcTrail.java b/Mage.Sets/src/mage/cards/a/ArcTrail.java index eaeec496df5..2052a6e33b1 100644 --- a/Mage.Sets/src/mage/cards/a/ArcTrail.java +++ b/Mage.Sets/src/mage/cards/a/ArcTrail.java @@ -25,6 +25,7 @@ * 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; @@ -36,13 +37,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.common.FilterCreaturePlayerOrPlaneswalker; +import mage.filter.common.FilterCreatureOrPlayer; 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -50,27 +51,27 @@ import mage.target.common.TargetAnyTarget; */ 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 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); + // 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); target1.setTargetTag(1); this.getSpellAbility().addTarget(target1); - - FilterCreaturePlayerOrPlaneswalker filter2 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 1 damage"); + + FilterCreatureOrPlayer filter2 = new FilterCreatureOrPlayer("another creature or player to deal 1 damage"); AnotherTargetPredicate predicate = new AnotherTargetPredicate(2); filter2.getCreatureFilter().add(predicate); filter2.getPlayerFilter().add(predicate); - TargetAnyTarget target2 = new TargetAnyTarget(1, 1, filter2); + TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(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); } @@ -83,7 +84,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; @@ -93,9 +94,9 @@ class ArcTrailEffect extends OneShotEffect { return instance; } - private ArcTrailEffect() { + private ArcTrailEffect ( ) { super(Outcome.Damage); - staticText = "{source} deals 2 damage to any target and 1 damage to another target"; + staticText = "{source} deals 2 damage to target creature or player and 1 damage to another target creature or player"; } @Override @@ -105,19 +106,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 64cadbdf3ab..8f9ad1f06d8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); 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 b101d4c6645..793ed6ffbd3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Transform Arlinn, Embraced by the Moon. + // -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player. Transform Arlinn, Embraced by the Moon. this.addAbility(new TransformAbility()); ability = new LoyaltyAbility(new DamageTargetEffect(3), -1); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target.'" + // -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.'" 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 efb4e5ae1df..741c85126ab 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Arrow Storm deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(4), new InvertCondition(RaidCondition.instance), - "{this} deals 4 damage to any target")); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + "{this} deals 4 damage to target creature or player")); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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, - "

Raid — 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")); + "

Raid — 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")); 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 7c283ad79d1..be3de49bcfc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 9a9805751e1..edc35131005 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Assault deals 2 damage to target creature or player. Effect effect = new DamageTargetEffect(2); - effect.setText("Assault deals 2 damage to any target"); + effect.setText("Assault deals 2 damage to target creature or player"); getLeftHalfCard().getSpellAbility().addEffect(effect); - getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); + getLeftHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 bbd54f6f15b..1503ddbba04 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Atarka Efreet is turned face up, it deals 1 damage to target creature or player. Effect effect = new DamageTargetEffect(1, "it"); - effect.setText("it deals 1 damage to any target"); + effect.setText("it deals 1 damage to target creature or player"); Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect, false, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java index ff2129dc28c..e34d4e1019a 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; 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 TargetAnyTargetAmount(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 d97af296314..1b34a4f45fe 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {W}, Sacrifice Aurora Eidolon: Prevent the next 3 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 5ac6231748d..fbfa09f67fc 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.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 or planeswalker this turn by sources of the color of your choice"; + this.staticText = "Prevent all damage that would be dealt to target player 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,8 +220,7 @@ 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 - || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) + if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER && 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 e89b5593815..3fcfd65d159 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 a21f18c4bb2..24224d57ece 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java b/Mage.Sets/src/mage/cards/a/AxelrodGunnarson.java index c3896743113..c36cb3c830a 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BalefireLiege.java b/Mage.Sets/src/mage/cards/b/BalefireLiege.java index 93832398b00..ea85d544633 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author Loki @@ -65,15 +65,16 @@ 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 afa1fbecc38..fd1752823d4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Ballista Charger attacks, it deals 1 damage to target creature or player. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 efc6acf5976..7e9309db425 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // or prevent the next 2 damage that would be dealt to target creature or player this turn. Mode mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2)); - mode.getTargets().add(new TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 076517d98d9..ca63702b878 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 ea5010d5a35..46f7d109b58 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Banefire deals X damage to target creature or player. this.getSpellAbility().addEffect(new BaneFireEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target"; + staticText = "{this} deals X damage to target creature or player"; } 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 74e344b9a76..1e363ba0699 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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}")); + // {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}")); 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarbarianRing.java b/Mage.Sets/src/mage/cards/b/BarbarianRing.java index 9ff322633f9..0be70c8b3f5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. 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 target creature or player. 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 TargetAnyTarget()); + thresholdAbility.addTarget(new TargetCreatureOrPlayer()); 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 4ecff46c74d..bf3923d04f4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted land has "{tap}: This land deals 1 damage to target creature or player." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: This land deals 1 damage to any target.\""); + effect.setText("Enchanted land has \"{T}: This land deals 1 damage to target creature or player.\""); 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 d79655bc32f..47098866f42 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.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + mode.getTargets().add(new TargetPlayer()); 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 41f05f1cd67..34c1aa0091b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarrageOgre.java b/Mage.Sets/src/mage/cards/b/BarrageOgre.java index e6d6491e225..2dee5278af2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 bb351b52f55..ac5751260ea 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, Sacrifice another colorless creature: Barrage Tyrant deals damage equal to the sacrificed creature's power to target creature or player. Effect effect = new DamageTargetEffect(new SacrificeCostCreaturesPower()); - effect.setText("{this} deals damage equal to the sacrificed creature's power to any target"); + effect.setText("{this} deals damage equal to the sacrificed creature's power to target creature or player"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BarrentonMedic.java b/Mage.Sets/src/mage/cards/b/BarrentonMedic.java index 33a439557cb..70c22c7b8f8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 09f5d0f09ad..64a9d749d40 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 b9bb37fd651..2fecd72824a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Bee Sting deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 6294f275356..9ce6ac96017 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlastOfGenius.java b/Mage.Sets/src/mage/cards/b/BlastOfGenius.java index 3be7b1f6ff3..3b4a68b4124 100644 --- a/Mage.Sets/src/mage/cards/b/BlastOfGenius.java +++ b/Mage.Sets/src/mage/cards/b/BlastOfGenius.java @@ -25,6 +25,7 @@ * 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; @@ -38,21 +39,24 @@ import mage.constants.Outcome; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 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. + + // 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.getSpellAbility().addEffect(new BlastOfGeniusEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public BlastOfGenius(final BlastOfGenius card) { @@ -70,7 +74,7 @@ class BlastOfGeniusEffect extends OneShotEffect { public BlastOfGeniusEffect() { super(Outcome.Benefit); - 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"; + 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"; } 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 d99ff45889e..84c642e9b23 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice a creature: Blasting Station deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 a4430e9ea5f..3f61dd30e72 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,9 +45,9 @@ public class Blaze extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); - // Blaze deals X damage to any target. + // Blaze deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 bd0ded2db5a..e41b123b209 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlazingTorch.java b/Mage.Sets/src/mage/cards/b/BlazingTorch.java index 7377c4d82a7..623f9ee63b5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target.") + // Equipped creature has "{tap}, Sacrifice Blazing Torch: Blazing Torch deals 2 damage to target creature or player.") Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlazingTorchDamageEffect(), new TapSourceCost()); ability.addCost(new BlazingTorchCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + this.staticText = "Blazing Torch deals 2 damage to target creature or player"; } 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 d749a3ec26c..6a22c9fbbb5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}{R}, {T}, Sacrifice Blighted Gorge: Blighted Gorge deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/Blightning.java b/Mage.Sets/src/mage/cards/b/Blightning.java index 44579c451e2..70946304124 100644 --- a/Mage.Sets/src/mage/cards/b/Blightning.java +++ b/Mage.Sets/src/mage/cards/b/Blightning.java @@ -24,24 +24,17 @@ * 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.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; +import mage.target.TargetPlayer; /** * @@ -50,12 +43,14 @@ import mage.target.targetpointer.FixedTarget; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addEffect(new BlightningEffect()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); } public Blightning(final Blightning card) { @@ -67,37 +62,3 @@ 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 be08e03f8f2..d3e6d979291 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodRites.java b/Mage.Sets/src/mage/cards/b/BloodRites.java index 7a08a0239f3..5bc483980d8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodhallPriest.java b/Mage.Sets/src/mage/cards/b/BloodhallPriest.java index 3139813d163..00f457e0877 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. TriggeredAbility triggeredAbility = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageTargetEffect(2)); - triggeredAbility.addTarget(new TargetAnyTarget()); + triggeredAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target" + "Whenever {this} enters the battlefield or attacks, if you have no cards in hand, {this} deals 2 damage to target creature or player" )); // 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 46b51b5f1f3..353e5985fee 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // creature's power to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BogardanHellkite.java b/Mage.Sets/src/mage/cards/b/BogardanHellkite.java index 30ca44d995c..755ec1723b7 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(5)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 459508d8d15..7c411620ccd 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -55,12 +55,13 @@ 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java b/Mage.Sets/src/mage/cards/b/BoltOfKeranos.java index 095dd14d854..52acc39fb1d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 ae22396a385..2e8ec3f62d2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Battalion - Whenever Bomber Corps and at least two other creatures attack, Bomber Corps deals 1 damage to target creature or player. Ability ability = new BattalionAbility(new DamageTargetEffect(1)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BonethornValesk.java b/Mage.Sets/src/mage/cards/b/BonethornValesk.java index ec3bf003a92..ebaa60b72fd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a permanent is turned face up, Bonethorn Valesk deals 1 damage to target creature or player. Ability ability = new TurnedFaceUpAllTriggeredAbility(new DamageTargetEffect(1), new FilterPermanent("a permanent")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java index cb0e9db6c2a..3d3153f68f9 100644 --- a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java @@ -50,7 +50,8 @@ 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()); @@ -76,7 +77,7 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { public BonfireOfTheDamnedEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; + staticText = "{this} deals X damage to target player and each creature he or she controls"; } public BonfireOfTheDamnedEffect(final BonfireOfTheDamnedEffect effect) { @@ -85,12 +86,12 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + Player player = game.getPlayer(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 3e0d90897f6..0ccd6197b9b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target + //Discard a land card: Borborygmos Enraged deals 3 damage to target creature or player Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BorosCharm.java b/Mage.Sets/src/mage/cards/b/BorosCharm.java index 0be3fee1846..62b2a76728e 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,12 +49,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); //or permanents you control are indestructible this turn Mode mode = new Mode(); Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledPermanent(), false); @@ -73,7 +74,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 01e9bb8aebb..54a67621c9d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Boros Reckoner is dealt damage, it deals that much damage to target creature or player. Ability ability = new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new BorosReckonerDealDamageEffect(), false, false, true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + this.staticText = "it deals that much damage to target creature or player"; } 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 484ed6270cd..7a536f87556 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player. Effect effect = new DamageTargetEffect(new SacrificeCostConvertedMana("artifact")); - effect.setText("{this} deals damage equal to the sacrificed artifact's converted mana cost to any target"); + effect.setText("{this} deals damage equal to the sacrificed artifact's converted mana cost to target creature or player"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/Boulderfall.java b/Mage.Sets/src/mage/cards/b/Boulderfall.java index 3696aa62e29..6811d577e24 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(5)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 6b033469512..231bbdbb45a 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); // 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 f7109c04829..4c71440e0ce 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -62,12 +62,12 @@ public class BrimstoneMage extends LevelerCard { this.addAbility(new LevelUpAbility(new ManaCostsImpl("{3}{R}"))); Abilities abilities1 = new AbilitiesImpl<>(); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); abilities1.add(ability); Abilities abilities2 = new AbilitiesImpl<>(); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 4bd38fdb02c..4cecd21270c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.Watcher; import mage.watchers.common.MorbidWatcher; @@ -47,12 +47,13 @@ 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 any target. + + // Brimstone Volley deals 3 damage to target creature or player. // 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public BrimstoneVolley(final BrimstoneVolley card) { @@ -69,7 +70,7 @@ class BrimstoneVolleyEffect extends OneShotEffect { public BrimstoneVolleyEffect() { super(Outcome.Damage); - 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"; + 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"; } public BrimstoneVolleyEffect(final BrimstoneVolleyEffect effect) { @@ -81,7 +82,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 2beaac8387c..94273699eef 100644 --- a/Mage.Sets/src/mage/cards/b/BrionStoutarm.java +++ b/Mage.Sets/src/mage/cards/b/BrionStoutarm.java @@ -36,7 +36,6 @@ 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; @@ -44,8 +43,9 @@ 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 or planeswalker"; + this.staticText = "{this} deals damage equal to the sacrificed creature's power to target player"; } public BrionStoutarmEffect(final BrionStoutarmEffect effect) { @@ -113,7 +113,10 @@ class BrionStoutarmEffect extends OneShotEffect { } } if (amount > 0) { - return new DamageTargetEffect(amount).apply(game, source); + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(amount, source.getSourceId(), game, false, true); + } } return true; } diff --git a/Mage.Sets/src/mage/cards/b/BrothersOfFire.java b/Mage.Sets/src/mage/cards/b/BrothersOfFire.java index 4bc9fd6223b..4af973a4faa 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 1 damage to you. + // {1}{R}{R}: Brothers of Fire deals 1 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java b/Mage.Sets/src/mage/cards/b/BurnAtTheStake.java index 4cf29edf4d4..0d9e581e8f9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to three times the number of creatures tapped this way. + // Burn at the Stake deals damage to target creature or player equal to three times the number of creatures tapped this way. this.getSpellAbility().addEffect(new BurnAtTheStakeEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public BurnAtTheStake(final BurnAtTheStake card) { @@ -81,7 +81,7 @@ class BurnAtTheStakeEffect extends OneShotEffect { public BurnAtTheStakeEffect() { super(Outcome.Damage); - this.staticText = "{this} deals damage to any target equal to three times the number of creatures tapped this way"; + this.staticText = "{this} deals damage to target creature or player 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 df486c26b66..e099d9ac81f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. If a creature is dealt damage this way, it loses indestructible until end of turn. + // 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. // If that creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new BurnFromWithinEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } @@ -76,7 +76,7 @@ class BurnFromWithinEffect extends OneShotEffect { public BurnFromWithinEffect() { super(Outcome.Benefit); - 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"; + 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"; } 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 619fc8a8480..2054c390200 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Burn Trail deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 90961c8297e..902a62681f9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has "{T}: This creature deals damage equal to its power to target creature or player." Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); - effect.setText("{this} deals damage equal to its power to any target"); + effect.setText("{this} deals damage equal to its power to target creature or player"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - gainedAbility.addTarget(new TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""))); + "Enchanted creature has \"{T}: This creature deals damage equal to its power to target creature or player.\""))); } 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 121496fd2c1..11b08af2cd6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. 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 any target"); - ability.addTarget(new TargetAnyTarget()); + "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()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BurningFields.java b/Mage.Sets/src/mage/cards/b/BurningFields.java index e445d6f5cde..c8aaeae03f5 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -41,10 +41,10 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); 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 8b350221a4c..22576a7ce35 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 or planeswalker and 3 damage to up to one target creature"); + effect.setText("it deals 3 damage to target opponent and 3 damage to up to one target creature"); Ability ability = new EntersBattlefieldTriggeredAbility(effect, false); - ability.addTarget(new TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); 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 6b45a94c328..24a100e8665 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to target creature or player. 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 any target"; + private static final String abilityText = "Whenever you cast a spell from your graveyard, Burning Vengeance deals 2 damage to target creature or player"; BurningVengeanceOnCastAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(2), false); - TargetAnyTarget target = new TargetAnyTarget(); + TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); this.addTarget(target); } diff --git a/Mage.Sets/src/mage/cards/b/BurstLightning.java b/Mage.Sets/src/mage/cards/b/BurstLightning.java index 1a3ca50cc27..9bd47068d1b 100644 --- a/Mage.Sets/src/mage/cards/b/BurstLightning.java +++ b/Mage.Sets/src/mage/cards/b/BurstLightning.java @@ -24,7 +24,8 @@ * 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; @@ -35,7 +36,7 @@ import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,15 +45,16 @@ import mage.target.common.TargetAnyTarget; 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 any target. If Burst Lightning was kicked, it deals 4 damage to that creature or player instead. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // 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()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(4), - 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")); + 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")); } 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 10a3f9e4fed..e4946b1444c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,20 +44,22 @@ import mage.target.common.TargetAnyTarget; 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 any target. + + // Cackling Flames deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(3), new InvertCondition(HellbentCondition.instance), - "{this} deals 3 damage to any target")); + "{this} deals 3 damage to target creature or player")); // 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, - "

Hellbent - {this} deals 5 damage to that permanent or player instead if you have no cards in hand.")); - - this.getSpellAbility().addTarget(new TargetAnyTarget()); + "

Hellbent - {this} deals 5 damage to that creature or player instead if you have no cards in hand.")); + + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 5dd1a212fe8..9377a6d3cb7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn. You gain life equal to the damage prevented this way. + // 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. this.getSpellAbility().addEffect(new CandlesGlowPreventDamageTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target this turn. You gain life equal to the damage prevented this way"; + 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"; } 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 a482bab3da9..a6015743b3b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only during your turn, before attackers are declared. + // {tap}: Capricious Sorcerer deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/Carbonize.java b/Mage.Sets/src/mage/cards/c/Carbonize.java index fc5381ca808..29943125826 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. + // 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. 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 b974fd7b4ec..8ccac428001 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {W}, Sacrifice a creature: Prevent the next 1 damage that would be dealt to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CauterySliver.java b/Mage.Sets/src/mage/cards/c/CauterySliver.java index 9827edb2868..d4eea5a66fd 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.filter.common.FilterCreaturePlayerOrPlaneswalker; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // All Slivers have "{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player." Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("1")); ability1.addCost(new SacrificeSourceCost()); - ability1.addTarget(new TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""))); + "All Slivers have \"{1}, Sacrifice this permanent: This permanent deals 1 damage to target creature or player.\""))); // 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,17 +88,16 @@ public class CauterySliver extends CardImpl { } } -class TargetSliverCreatureOrPlayer extends TargetAnyTarget { - public TargetSliverCreatureOrPlayer() { +class TargetSliverCreatureOrPlayer extends TargetCreatureOrPlayer { + public TargetSliverCreatureOrPlayer(){ super(); filter = new FilterCreatureOrPlayerByType("Sliver", "Sliver creature or player"); } } -class FilterCreatureOrPlayerByType extends FilterCreaturePlayerOrPlaneswalker { - - public FilterCreatureOrPlayerByType(String type, String name) { +class FilterCreatureOrPlayerByType extends FilterCreatureOrPlayer { + 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 0be470e6a0f..bb06d3431b9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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.getSpellAbility().addEffect(new ChainLightningEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 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.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."; } 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 984664125e9..7d7a5019a54 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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. this.getSpellAbility().addEffect(new ChainOfPlasmaEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public ChainOfPlasma(final ChainOfPlasma card) { @@ -70,7 +70,7 @@ class ChainOfPlasmaEffect extends OneShotEffect { ChainOfPlasmaEffect() { super(Outcome.Damage); - 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."; + 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."; } 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 6c53686a34f..40518970cbf 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}, {tap}: Chainflinger deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1),new ManaCostsImpl("{1}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // Threshold - {2}{R}, {tap}: Chainflinger deals 2 damage to any target. Activate this ability only if seven or more cards are in your graveyard. + // 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. Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}"), new CardsInControllerGraveCondition(7)); thresholdAbility.addCost(new TapSourceCost()); - thresholdAbility.addTarget(new TargetAnyTarget()); + thresholdAbility.addTarget(new TargetCreatureOrPlayer()); 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 912937767a5..5eb51cacf8c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to target creature or player. LoyaltyAbility ability = new LoyaltyAbility(new ChandraAblazeEffect1(), 1); ability.addEffect(new ChandraAblazeEffect2()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + this.staticText = "If a red card is discarded this way, {this} deals 4 damage to target creature or player"; } 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 4ee014c814f..55e1fcc0bf2 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java index 8f0c92c2f60..fb4aec1f8b0 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java +++ b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java @@ -47,7 +47,6 @@ import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; -import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -56,7 +55,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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); @@ -75,11 +74,9 @@ 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()) - .setText("and each creature that player or that planeswalker’s controller controls") - ); + effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent())); LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8); - ability3.addTarget(new TargetPlayerOrPlaneswalker()); + ability3.addTarget(new TargetPlayer()); this.addAbility(ability3); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java index 3490d0000d0..bc275836004 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.TargetPlayerOrPlaneswalker; 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,11 +70,9 @@ 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()) - .setText("and each creature that player or that planeswalker’s controller controls") - ); + effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent())); ability = new LoyaltyAbility(effects, -10); - ability.addTarget(new TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java index 7ada58cf61a..2ad8974aa93 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; 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 TargetPlayerOrPlaneswalker(); + Target target1 = new TargetPlayer(); 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 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."; + 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"; } public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) { @@ -111,7 +111,10 @@ class ChandraPyromasterEffect1 extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 1, source.getSourceId(), game, false, true); + Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); + if (player != null) { + player.damage(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); @@ -126,7 +129,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { class ChandraPyromasterTarget extends TargetPermanent { public ChandraPyromasterTarget() { - super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false); + super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false); } public ChandraPyromasterTarget(final ChandraPyromasterTarget target) { @@ -135,11 +138,7 @@ class ChandraPyromasterTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - UUID firstTarget = player.getId(); + UUID firstTarget = source.getFirstTarget(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -164,13 +163,10 @@ class ChandraPyromasterTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - 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); - } + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(playerId)) { + possibleTargets.add(targetId); } } } diff --git a/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java b/Mage.Sets/src/mage/cards/c/ChandraRoaringFlame.java index f048556ec5e..3f3fda59304 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 TargetPlayerOrPlaneswalker()); + loyaltyAbility.addTarget(new TargetPlayer()); 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 4648830acac..1d474d1b251 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // +1: Chandra, the Firebrand deals 1 damage to target creature or player. LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(1), 1); - ability1.addTarget(new TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); 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 targets"), -6); - ability2.addTarget(new TargetAnyTarget(0, 6)); + 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)); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index 182452c4f31..22807049911 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 any target." + // -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player." 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 a25b23272cb..0f1806ab5c0 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -43,14 +43,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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()) - .setText("and each creature that player or that planeswalker’s controller controls") - ); - this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent())); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 b86587adb9f..b08f8abf24e 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 b9defa2b2ec..cbc09793025 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,9 +46,9 @@ public class Char extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Char deals 4 damage to any target and 2 damage to you. + // Char deals 4 damage to target creature or player and 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 e7836fce763..93c63403458 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {X}{R}, {tap}, Sacrifice Cinder Elemental: Cinder Elemental deals X damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CinderHellion.java b/Mage.Sets/src/mage/cards/c/CinderHellion.java index fc4713ee595..ea96a42fd02 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -46,7 +46,7 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java index a6d10ccb38b..92b7e87d9ee 100644 --- a/Mage.Sets/src/mage/cards/c/CinderPyromancer.java +++ b/Mage.Sets/src/mage/cards/c/CinderPyromancer.java @@ -25,6 +25,7 @@ * 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; @@ -43,34 +44,33 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * * @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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 0926274e631..645951e4a40 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Cinder Storm deals 7 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 c918242c0a1..7df2fee54c9 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,7 +56,8 @@ 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); @@ -72,9 +73,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 TargetPlayerOrPlaneswalker()); + mode2.getTargets().add(new TargetPlayer()); this.getSpellAbility().addMode(mode2); - + } public ClanDefiance(final ClanDefiance card) { @@ -85,5 +86,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 6065d50495c..3b2da638131 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ClockworkHydra.java b/Mage.Sets/src/mage/cards/c/ClockworkHydra.java index aea57305f8d..1c7859fb703 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // 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. 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 any target"; + this.staticText = "remove a +1/+1 counter from it. If you do, {this} deals 1 damage to target creature or player"; } 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 TargetAnyTarget(); + Target target = new TargetCreatureOrPlayer(); 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 717f352b810..a6e9a21fcc8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a creature you control becomes blocked, Close Quarters deals 1 damage to target creature or player. Ability ability = new BecomesBlockedAllTriggeredAbility(new DamageTargetEffect(1), false, filter, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CollateralDamage.java b/Mage.Sets/src/mage/cards/c/CollateralDamage.java index 0bc5e08af79..78ad524d544 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Collateral Damage deals 3 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 08d99d1e7ff..0cb47fe18dc 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveDefiance.java @@ -40,13 +40,14 @@ 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; /** * @@ -56,6 +57,11 @@ 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}"); @@ -84,7 +90,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 TargetOpponentOrPlaneswalker()); + mode.getTargets().add(new TargetPlayer(1, 1, false, filterDamageOpponent)); 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 d9c185ba136..22f4a02f125 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {1}{W}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CometStorm.java b/Mage.Sets/src/mage/cards/c/CometStorm.java index 63cd202799d..1e662e317cd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,14 +49,14 @@ import mage.target.common.TargetAnyTarget; 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 any target, then choose another any target for each time Comet Storm was kicked. Comet Storm deals X damage to each of them. + // 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. this.getSpellAbility().addEffect(new CometStormEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget(1)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(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 TargetAnyTarget(numbTargets)); + ability.addTarget(new TargetCreatureOrPlayer(numbTargets)); } } @@ -82,7 +82,7 @@ class CometStormEffect extends OneShotEffect { public CometStormEffect() { super(Outcome.Damage); - staticText = "Choose any target, then choose another target for each time Comet Storm was kicked. Comet Storm deals X damage to each of them"; + 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"; } 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 510301eca83..d8cf9453701 100644 --- a/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java +++ b/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java @@ -40,8 +40,7 @@ import mage.constants.Duration; 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.TargetPlayer; /** * @@ -50,10 +49,11 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 controlled by that player or by that planeswalker’s controller can’t block this turn."; + this.staticText = "Metalcraft - If you control three or more artifacts, creatures that player controls can't block this turn"; } public ConcussiveBoltEffect(final ConcussiveBoltEffect effect) { @@ -111,11 +111,7 @@ class ConcussiveBoltRestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { boolean metalcraft = (Boolean) this.getValue("MetalcraftConcussiveBolt"); - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - if (metalcraft && permanent.getControllerId().equals(player.getId())) { + if (metalcraft && permanent.getControllerId().equals(source.getFirstTarget())) { 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 d1b63281a31..ed36dec16a0 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.FilterCreaturePlayerOrPlaneswalker; +import mage.filter.common.FilterCreatureOrPlayer; 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,30 +49,31 @@ import mage.target.common.TargetAnyTarget; 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 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); + + // 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); target1.setTargetTag(1); this.getSpellAbility().addTarget(target1); - - FilterCreaturePlayerOrPlaneswalker filter2 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 2 damage"); + + FilterCreatureOrPlayer filter2 = new FilterCreatureOrPlayer("another creature or player to deal 2 damage"); AnotherTargetPredicate predicate2 = new AnotherTargetPredicate(2); filter2.getCreatureFilter().add(predicate2); filter2.getPlayerFilter().add(predicate2); - TargetAnyTarget target2 = new TargetAnyTarget(1, 1, filter2); + TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(1, 1, filter2); target2.setTargetTag(2); this.getSpellAbility().addTarget(target2); - - FilterCreaturePlayerOrPlaneswalker filter3 = new FilterCreaturePlayerOrPlaneswalker("another creature, player or planeswalker to deal 3 damage"); + + FilterCreatureOrPlayer filter3 = new FilterCreatureOrPlayer("another creature or player to deal 3 damage"); AnotherTargetPredicate predicate3 = new AnotherTargetPredicate(3); filter3.getCreatureFilter().add(predicate3); filter3.getPlayerFilter().add(predicate3); - TargetAnyTarget target3 = new TargetAnyTarget(1, 1, filter3); + TargetCreatureOrPlayer target3 = new TargetCreatureOrPlayer(1, 1, filter3); target3.setTargetTag(3); this.getSpellAbility().addTarget(target3); - + this.getSpellAbility().addEffect(new ConeOfFlameEffect()); } @@ -90,11 +91,9 @@ class ConeOfFlameEffect extends OneShotEffect { public ConeOfFlameEffect() { super(Outcome.Damage); - this.staticText = "{source} deals 1 damage to any target, " - + "2 damage to another target, " - + "and 3 damage to a third target"; + 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"; } - + public ConeOfFlameEffect(final ConeOfFlameEffect effect) { super(effect); } @@ -103,7 +102,7 @@ class ConeOfFlameEffect extends OneShotEffect { public ConeOfFlameEffect copy() { return new ConeOfFlameEffect(this); } - + @Override public boolean apply(Game game, Ability source) { boolean applied = false; @@ -121,5 +120,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 b4289fe2792..70289727353 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 80321981bb8..edbfd34e5c0 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java b/Mage.Sets/src/mage/cards/c/ConsumeSpirit.java index e6635cb1469..ab73021fbf4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; @@ -60,8 +60,8 @@ public class ConsumeSpirit extends CardImpl { // Spend only black mana on X. - // Consume Spirit deals X damage to any target and you gain X life. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Consume Spirit deals X damage to target creature or player and you gain X life. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 any target and you gain X life. Spend only black mana on X"; + staticText = "Consume Spirit deals X damage to target creature or player 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 ad6f74199ee..afbfb02895e 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 TargetPlayerOrPlaneswalker()); + mode.getTargets().add(new TargetPlayer()); 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 09817116f97..af2dd84bd5d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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()); + // 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()); this.getSpellAbility().addEffect(new CorruptEffect()); } @@ -81,7 +81,7 @@ class CorruptEffect extends OneShotEffect { public CorruptEffect() { super(Outcome.Damage); - 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"; + 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"; } 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 292f408067a..c305d3a1d9e 100644 --- a/Mage.Sets/src/mage/cards/c/CosisRavager.java +++ b/Mage.Sets/src/mage/cards/c/CosisRavager.java @@ -25,6 +25,7 @@ * 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; @@ -36,7 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,18 +45,18 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 32fd28ac903..f007435feaa 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -50,15 +50,15 @@ public class CovenantOfBlood extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); - // Covenant of Blood deals 4 damage to any target + // Covenant of Blood deals 4 damage to target creature or player Effect effect = new DamageTargetEffect(4); - effect.setText("{this} deals 4 damage to any target"); + effect.setText("{this} deals 4 damage to target creature or player"); 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 0a7dac031ba..b6b81a070ec 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {UR}{UR}, {tap}, Tap two untapped red creatures you control: Crackleburr deals 3 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 c1a5c3f04c8..1b597da8af4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, Sacrifice Crackling Triton: Crackling Triton deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java index 08de7ad1008..4fdbf66f84e 100644 --- a/Mage.Sets/src/mage/cards/c/CragganwickCremator.java +++ b/Mage.Sets/src/mage/cards/c/CragganwickCremator.java @@ -32,7 +32,6 @@ 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; @@ -50,7 +49,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); @@ -93,12 +92,16 @@ 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()) { - int damage = discardedCard.getPower().getValue(); - return new DamageTargetEffect(damage).apply(game, source); + Player targetedPlayer = game.getPlayer(source.getFirstTarget()); + if (targetedPlayer != null) { + int damage = discardedCard.getPower().getValue(); + targetedPlayer.damage(damage, source.getSourceId(), game, false, true); + } } return true; } diff --git a/Mage.Sets/src/mage/cards/c/CratersClaws.java b/Mage.Sets/src/mage/cards/c/CratersClaws.java index e844238119e..266f2ac8ee7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,17 +45,17 @@ import mage.target.common.TargetAnyTarget; 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 any target. + // Crater's Claws deals X damage to target creature or player. // Ferocious - 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 any target." - + "
Ferocious — {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()); + "{this} deals X damage to target creature or player." + + "
Ferocious — {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()); } 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 052abacea81..72447100d8d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CunningStrike.java b/Mage.Sets/src/mage/cards/c/CunningStrike.java index 6d2f946bee9..22eac92fa34 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); // 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 0012e9e2551..f4ea8c4cf10 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target and 1 damage to any target of an opponent's choice. + // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. Effect effect = new DamageTargetEffect(1); - effect.setText("{this} deals 1 damage to any target and 1 damage to any target of an opponent's choice"); + effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 520e3992b41..5bf4973eb3a 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfThePiercedHeart.java @@ -30,6 +30,7 @@ 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; @@ -46,10 +47,6 @@ 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; /** * @@ -58,7 +55,7 @@ import mage.target.TargetPermanent; 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 @@ -85,7 +82,7 @@ public class CurseOfThePiercedHeart extends CardImpl { class CurseOfThePiercedHeartAbility extends TriggeredAbilityImpl { public CurseOfThePiercedHeartAbility() { - super(Zone.BATTLEFIELD, new CurseOfThePiercedHeartEffect()); + super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); } public CurseOfThePiercedHeartAbility(final CurseOfThePiercedHeartAbility ability) { @@ -117,54 +114,7 @@ class CurseOfThePiercedHeartAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "At the beginning of enchanted player's upkeep, " - + "{this} deals 1 damage to that player or a planeswalker that player controls."; + return "At the beginning of enchanted player's upkeep, Curse of the Pierced Heart deals 1 damage to that player."; } } - -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 cc57140ee9c..37e13a27ade 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {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. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; } 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 5c67de59df0..a2bbfde3ac2 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 any target this turn. + // {T}: Prevent the next 1 damage that would be dealt to target creature or player 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 0d80fb5a6ec..4516331d3e7 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 any target." + // Create two 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to target creature or player." 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 any target.\""); + 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.\""); 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 eddd66b9d79..e7bce7f4ad1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target; + // or Darigaaz's Charm deals 3 damage to target creature or player; Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(3)); - mode.getTargets().add(new TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 b613ea90f15..4ade700f3cc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. You gain 3 life. + // Dark Nourishment deals 3 damage to target creature or player. You gain 3 life. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 4bb99ec76e9..88fa15a77b9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 667cfee3d6a..cdcebfcbb1e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // When Dawnfluke enters the battlefield, prevent the next 3 damage that would be dealt to target creature or player this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - Target target = new TargetAnyTarget(); + Target target = new TargetCreatureOrPlayer(); 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 d3b9d1096fa..a1bc081046e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, Sacrifice a Zombie: Deadapult deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DeathGrasp.java b/Mage.Sets/src/mage/cards/d/DeathGrasp.java index 9582d93a88b..e92ea1411a8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 3a2e3edd1d7..a9442c4a672 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -56,9 +56,9 @@ public class DeathSpark extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - // Death Spark deals 1 damage to any target. + // Death Spark deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 d745b657ab3..094e5b662e8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java index 3247ce5a22e..f389704351c 100644 --- a/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java +++ b/Mage.Sets/src/mage/cards/d/DeathforgeShaman.java @@ -34,7 +34,6 @@ 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; @@ -42,7 +41,8 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; import mage.game.Game; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.players.Player; +import mage.target.TargetPlayer; /** * @@ -51,7 +51,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } @@ -81,7 +81,7 @@ class DeathforgeShamanEffect extends OneShotEffect { public DeathforgeShamanEffect() { super(Outcome.Damage); - staticText = "it deals damage to target player or planeswalker equal to twice the number of times it was kicked"; + staticText = "it deals damage to target player equal to twice the number of times it was kicked"; } public DeathforgeShamanEffect(final DeathforgeShamanEffect effect) { @@ -97,7 +97,13 @@ class DeathforgeShamanEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { DynamicValue value = new MultikickerCount(); int damage = value.calculate(game, source, this) * 2; - return new DamageTargetEffect(damage).apply(game, source); + + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(damage, source.getSourceId(), game, false, true); + return true; + } + return false; } } diff --git a/Mage.Sets/src/mage/cards/d/DefenderEnVec.java b/Mage.Sets/src/mage/cards/d/DefenderEnVec.java index 738debce1a8..7b1236370cc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Remove a fade counter from Defender en-Vec: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new RemoveCountersSourceCost(CounterType.FADE.createInstance())); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Demonfire.java b/Mage.Sets/src/mage/cards/d/Demonfire.java index 186976479eb..b994ca89c4c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Demonfire deals X damage to target creature or player. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new DamageTargetEffect(new ManacostVariableValue()), new InvertCondition(HellbentCondition.instance), - "{this} deals X damage to any target")); + "{this} deals X damage to target creature or player")); // 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 ae54517d981..ef3306e780a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target and you gain 4 life; + // - Demonic Pact deals 4 damage to target creature or player and you gain 4 life; Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(4), TargetController.YOU, false); ability.getModes().setEachModeOnlyOnce(true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 3b617d7d708..9fdf56c6bfd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Devil's Play deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 b82a54d42ee..aba8268be22 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 any target." + // Create four 1/1 red Devil creature tokens. They have "When this creature dies, it deals 1 damage to target creature or player." 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 any target.\""); + 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.\""); 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 ea60cfb58a3..b1b2403bdc0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. + // 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. 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 0dc61ecaab2..ea4a405c779 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // 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. this.getSpellAbility().addEffect(new DivineDeflectionPreventDamageTargetEffect(Duration.EndOfTurn)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + 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"; } 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 cc534f2db0f..5a7ab55499c 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 permanent or player, that source deals 3 damage to that permanent or player instead."; + 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."; } public DivinePresenceEffect(final DivinePresenceEffect effect) { @@ -81,10 +81,9 @@ 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 2cc5b4f14b5..bd7f3cc8d66 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of attacking creatures you control. + // Dogpile deals damage to target creature or player equal to the number of attacking creatures you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)). - setText("{this} deals damage to any target equal to the number of attacking creatures you control")); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + setText("{this} deals damage to target creature or player equal to the number of attacking creatures you control")); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/d/DoomCannon.java b/Mage.Sets/src/mage/cards/d/DoomCannon.java index 249b2e6f0d7..320de221dc9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {3}, {T}, Sacrifice a creature of the chosen type: Doom Cannon deals 3 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DragonTempest.java b/Mage.Sets/src/mage/cards/d/DragonTempest.java index 98ae8fb94f9..a5556b6344e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, where X is the number of Dragons you control. + // 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. Ability ability = new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new DragonTempestDamageEffect(), @@ -76,7 +76,7 @@ public class DragonTempest extends CardImpl { SetTargetPointer.NONE, "" ); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -101,7 +101,7 @@ class DragonTempestDamageEffect extends OneShotEffect { public DragonTempestDamageEffect() { super(Outcome.Damage); - staticText = "it deals X damage to any target, where X is the number of Dragons you control"; + staticText = "it deals X damage to target creature or player, 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 435096709d6..5173130dc8c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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()); + // 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()); 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.
{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"; + staticText = "Spend only black mana on X.
{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"; } 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 7c11fee4432..15e19cc81ca 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {T}, Pay {E}{E}{E}{E}{E}: Dynavolt Tower deals 3 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); ability.addCost(new PayEnergyCost(5)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java b/Mage.Sets/src/mage/cards/e/ElaborateFirecannon.java index b07176c9ad8..ae2b2fc43d2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}, {T}: Elaborate Firecannon deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl<>("{4}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 0659a306f56..8aaf29be936 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 7078dfeb12a..e18c15f9169 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. Ability ability = new ElectropotenceTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target."; + 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."; } @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 any target.", 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)) { 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 bb7f5e08277..7a2b729f387 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 63d7892e7ca..4410a1638ec 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EmberShot.java b/Mage.Sets/src/mage/cards/e/EmberShot.java index 4aab96914cd..d9b77045fed 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Ember Shot deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 d6ce7f5a87b..9e722e03ab6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Embermage Goblin deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/Embersmith.java b/Mage.Sets/src/mage/cards/e/Embersmith.java index 2e4deb3dcf7..5a6ec044cab 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "you may pay {1}. If you do, {this} deals 1 damage to target creature or player"; } 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 6c973898cbe..c41a1586105 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -49,7 +49,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/Embolden.java b/Mage.Sets/src/mage/cards/e/Embolden.java index 251701b1c37..be8ebffa0da 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 be8e45e53e8..f80ab8c1c03 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {T}: Endbringer deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 1eb911ae8b8..140d43836fa 100644 --- a/Mage.Sets/src/mage/cards/e/EnergyBolt.java +++ b/Mage.Sets/src/mage/cards/e/EnergyBolt.java @@ -36,7 +36,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.TargetPlayer; -import mage.target.common.TargetPlayerOrPlaneswalker; /** * @@ -49,7 +48,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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 0aaa6be6c75..cf489463161 100644 --- a/Mage.Sets/src/mage/cards/e/EqualTreatment.java +++ b/Mage.Sets/src/mage/cards/e/EqualTreatment.java @@ -25,6 +25,7 @@ * 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; @@ -46,7 +47,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()); @@ -69,7 +70,7 @@ class EqualTreatmentEffect extends ReplacementEffectImpl { public EqualTreatmentEffect() { super(Duration.EndOfTurn, Outcome.PreventDamage); - 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"; + 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"; } public EqualTreatmentEffect(final EqualTreatmentEffect effect) { @@ -84,8 +85,7 @@ 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.DAMAGED_PLANESWALKER; + || event.getType() == GameEvent.EventType.DAMAGE_PLAYER; } @Override diff --git a/Mage.Sets/src/mage/cards/e/ErraticExplosion.java b/Mage.Sets/src/mage/cards/e/ErraticExplosion.java index 97189b3d0fc..c626519798d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,10 +49,10 @@ import mage.target.common.TargetAnyTarget; 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 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()); + // 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()); this.getSpellAbility().addEffect(new ErraticExplosionEffect()); } @@ -70,7 +70,7 @@ class ErraticExplosionEffect extends OneShotEffect { public ErraticExplosionEffect() { super(Outcome.Damage); - 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"; + 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"; } 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 bea742bf9c5..862af71863d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Erupting Dreadwolf attacks, it deals 2 damage to target creature or player. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EssenceDrain.java b/Mage.Sets/src/mage/cards/e/EssenceDrain.java index 9b322850b44..bded796524e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 be9df520eb4..9c28d75f578 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 4b963ef0dd6..e6bc6cd6d68 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,12 +46,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 8bad2078b9f..dfe7e31cbc6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {3}, {T}, Sacrifice Explosive Apparatus: Explosive Apparatus deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(3)); ability.addCost(new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java b/Mage.Sets/src/mage/cards/e/ExplosiveImpact.java index 68615f8202b..140fecaf66d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,8 +45,8 @@ public class ExplosiveImpact extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{5}{R}"); - // Explosive Impact deals 5 damage to any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Explosive Impact deals 5 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 4d9796da4ab..c1707a1e654 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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. this.getSpellAbility().addEffect(new ExplosiveRevelationEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public ExplosiveRevelation(final ExplosiveRevelation card) { @@ -72,7 +72,7 @@ class ExplosiveRevelationEffect extends OneShotEffect { public ExplosiveRevelationEffect() { super(Outcome.DrawCard); - 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"; + 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"; } 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 49bd943d4fa..4bff2b57bbb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Exquisite Firecraft deals 4 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); // Spell mastery - 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 60431b8cf71..351fc547077 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Whenever enchanted creature attacks, it deals 2 damage to target creature or player. ability = new AttacksAttachedTriggeredAbility(new DamageTargetEffect(2, "it"), AttachmentType.AURA, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java b/Mage.Sets/src/mage/cards/e/ExuberantFirestoker.java index 0ed6e7c1055..8bd0c51b578 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author North @@ -85,7 +85,7 @@ class ExuberantFirestokerTriggeredAbility extends TriggeredAbilityImpl { public ExuberantFirestokerTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(2), true); - this.addTarget(new TargetPlayerOrPlaneswalker()); + this.addTarget(new TargetPlayer()); } 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 or planeswalker."; + 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."; } } diff --git a/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java b/Mage.Sets/src/mage/cards/f/FallOfTheTitans.java index e0e5b68bed2..8c0f86eb84e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget(0, 2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(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 4d4637ded59..ba77d083823 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}, {T}: Fallen Ferromancer deals 1 damage to target creature or player. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{1}{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java b/Mage.Sets/src/mage/cards/f/FanaticalFirebrand.java index ce17cbd4f17..42d3d2dab56 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {T}, Sacrifice Fanatical Firebrand: It deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FanningTheFlames.java b/Mage.Sets/src/mage/cards/f/FanningTheFlames.java index 6a88351046c..9061a611f8e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -48,9 +48,9 @@ public class FanningTheFlames extends CardImpl { // Buyback {3} this.addAbility(new BuybackAbility("{3}")); - // Fanning the Flames deals X damage to any target. + // Fanning the Flames deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 733cb73732a..dd5f8cab3b9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 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. Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); - effect.setText("{this} deals damage to any target equal to the number of cards in your hand"); + effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 ac0cfc6a2e6..76d917a3ade 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,13 +44,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 or planeswalker equal to the number of artifacts you control"); + effect.setText("{this} deals damage to target player equal to the number of artifacts you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 85baae097cb..4eaf6ec8810 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FerventPaincaster.java b/Mage.Sets/src/mage/cards/f/FerventPaincaster.java index 50899abcedc..819d3d0379a 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 092ebc1c071..48dbb4f9d9c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target equal to the number of red mana symbols in the sacrificed creature's mana cost."; + staticText = "{this} deals damage to target creature or player 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 f38d9970eaf..18b279736a2 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; 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 TargetAnyTargetAmount(5)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 3df798b1d3e..1331c46e3a1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Fiery Temper deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 4dfd8f1c2e3..751635fdb78 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 or planeswalker equal to the sacrificed creature's power"); + effect.setText("{this} deals damage to target opponent equal to the sacrificed creature's power"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); } 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 e0e9a4ca332..e5f6abd191e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Fire Ambush deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 e7d17a52350..c7de392c332 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only during your turn, before attackers are declared. + // Sacrifice Fire Bowman: Fire Bowman deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FireIce.java b/Mage.Sets/src/mage/cards/f/FireIce.java index bdbb6ef1fa7..a704fa2cfc3 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; 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 TargetAnyTargetAmount(2)); + getLeftHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 9609f461b49..8196680e082 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Enchanted creature has "{t}: This creature deals 1 damage to target creature or player." Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - 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. + 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. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability2.addTarget(new TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/f/Fireball.java b/Mage.Sets/src/mage/cards/f/Fireball.java index db6b42e945c..22aaac5be96 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -115,7 +115,7 @@ class FireballEffect extends OneShotEffect { } -class FireballTargetCreatureOrPlayer extends TargetAnyTarget { +class FireballTargetCreatureOrPlayer extends TargetCreatureOrPlayer { public FireballTargetCreatureOrPlayer(int minNumTargets, int maxNumTargets) { super(minNumTargets, maxNumTargets); @@ -133,9 +133,9 @@ class FireballTargetCreatureOrPlayer extends TargetAnyTarget { * @return */ @Override - public List getTargetOptions(Ability source, Game game) { + public List getTargetOptions(Ability source, Game game) { - List options = new ArrayList<>(); + List options = new ArrayList<>(); int xVal = source.getManaCostsToPay().getX(); if (xVal < 1) { @@ -155,7 +155,7 @@ class FireballTargetCreatureOrPlayer extends TargetAnyTarget { possibleTargets.removeAll(getTargets()); for (UUID targetId : possibleTargets) { - TargetAnyTarget target = this.copy(); + TargetCreatureOrPlayer 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 f5bf8aab78a..8b4e5c4b0c6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Fireblast deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/f/Firebolt.java b/Mage.Sets/src/mage/cards/f/Firebolt.java index 627cdce7ff9..10d787f2680 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,9 +47,9 @@ public class Firebolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); - // Firebolt deals 2 damage to any target. + // Firebolt deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 4d31686943b..175306c8e6a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Fireforger's Puzzleknot enters the battlefield, it deals 1 damage to target creature or player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // {2}{R}, Sacrifice Fireforger's Puzzleknot: It deals 1 damage to any target. + // {2}{R}, Sacrifice Fireforger's Puzzleknot: It deals 1 damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new ManaCostsImpl<>("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java b/Mage.Sets/src/mage/cards/f/FiremaneAvenger.java index b1a3656df2d..8a7f74c4482 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain 3 life. + // 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. Ability ability = new BattalionAbility(new DamageTargetEffect(3)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 44dbffae4fd..b0c967e3674 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Fires of Undeath deals 2 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 9caa9705a61..f2f51fedbcd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java b/Mage.Sets/src/mage/cards/f/FiresongAndSunspeaker.java index cbf485bda0c..405f09e6622 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 any target. + // Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to target creature or player. 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 any target."; + return "Whenever a white instant or sorcery spell causes you to gain life, Firesong and Sunspeaker deals 3 damage to target creature or player."; } -} +} \ 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 46da040cd80..0047fb105fc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget(xValue); + Target target = new TargetCreatureOrPlayer(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 a33cc51eefa..e78f9ce457e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + //Remove five blaze counters from Five-Alarm Fire: Five-Alarm Fire deals 5 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new RemoveCountersSourceCost(CounterType.BLAZE.createInstance(5))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FlameBurst.java b/Mage.Sets/src/mage/cards/f/FlameBurst.java index 96510484b8b..600535ce694 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, where X is 2 plus the number of cards named Flame Burst in all graveyards. + // 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. Effect effect = new DamageTargetEffect(new FlameBurstCount(filter)); - effect.setText("{this} deals X damage to any target, where X is 2 plus the number of cards named Flame Burst in all graveyards."); + 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."); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 f570b7ca769..57390e72a73 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Until end of turn, permanents you control gain "{tap}: This permanent deals 1 damage to target creature or player." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); 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 e683be723cd..95d610ecf63 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Flame Jab deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 1f02395b512..3043de4b97b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Flame Javelin deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 56bac17b069..a8d8683f7a4 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -43,11 +43,11 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); // 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 d7c93d3dfcc..f23eb71205f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Flame Lash deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 9ffb84f0791..8e770851c64 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -43,14 +43,12 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); - this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") - ); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent())); } public FlameWave(final FlameWave card) { @@ -61,4 +59,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 1157f1a8ec8..1ca9af2aacb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // Whenever Flameblast Dragon attacks, you may pay {X}{R}. If you do, Flameblast Dragon deals X damage to target creature or player. Ability ability = new AttacksTriggeredAbility(new FlameblastDragonEffect(), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "you may pay {X}{R}. If you do, {this} deals X damage to target creature or player"; } 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 any target", source, game)) { + if (player.chooseUse(Outcome.Damage, "Pay " + cost.getText() + "? If you do, Flameblast Dragon deals X damage to target creature or player", 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 e7c4ca407c0..23038d1bff0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java b/Mage.Sets/src/mage/cards/f/FlamesOfTheBloodHand.java index 1af364ac62f..3613deb3cf3 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,13 +47,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } public FlamesOfTheBloodHand(final FlamesOfTheBloodHand card) { @@ -85,8 +86,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)); @@ -102,4 +103,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 bdbaaff7734..e76acc73126 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 acbe454dddc..cf9a7166599 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,14 +47,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Flamewright.java b/Mage.Sets/src/mage/cards/f/Flamewright.java index 6f2b6693d06..24cca2e3ce6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice a creature with defender: Flamewright deals 1 damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Flare.java b/Mage.Sets/src/mage/cards/f/Flare.java index 9cf37fcdd71..abe661997c5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Flare deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 75ec723f8ed..a986e118916 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. Ability ability = new FlayerTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target."; + 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."; } @Override @@ -122,7 +122,7 @@ class FlayerEffect extends OneShotEffect { public FlayerEffect() { super(Outcome.Damage); - staticText = "that creature deals damage equal to its power to any target"; + staticText = "that creature deals damage equal to its power to target creature or player"; } 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 98761a4503f..6ac9a811e8f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -58,9 +58,9 @@ public class FledglingMawcor extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Fledgling Mawcor deals 1 damage to any target. + // {tap}: Fledgling Mawcor deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 6fcc518946f..14b6b98df3f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Target creature you control deals damage equal to its power to target creature or player. getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - getRightHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); + getRightHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "Target creature you control deals damage equal to its power to target creature or player"; } 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 f428d5b9895..60f5457d209 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target"); + effect.setText("{this} deals damage equal to the sacrificed creature's power to target creature or player"); this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 e909164caed..6103554d2a4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn." + // Enchanted land has "{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to any target this turn.\""); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player 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 7853977f54a..d17ab709c06 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -46,13 +46,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); - this.addAbility(ability); + ability.addTarget(new TargetPlayer()); + 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 c4cf51ada84..60b2483cf43 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. If player was dealt damage this way, you gain 2 life. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // 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()); 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 any target. If player was dealt damage this way, you gain 2 life"; + this.staticText = "ForceDrain deals 2 damage to target creature or player. 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 34aac29fbd2..e69acd05f39 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 4 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 8efea5082c3..43fde38faa3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Force Lightning deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 0cdb67d8102..aeb5043a79f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Force Spark deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 735f30ca9db..0772f073797 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Constellation - Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. Ability ability = new ConstellationAbility(new DamageTargetEffect(1)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/ForkedBolt.java b/Mage.Sets/src/mage/cards/f/ForkedBolt.java index 9f7cb72e197..dceb13efc37 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java b/Mage.Sets/src/mage/cards/f/FormOfTheDragon.java index 5fd32482ee2..859e047b7b6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // At the beginning of your upkeep, Form of the Dragon deals 5 damage to target creature or player. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(5), TargetController.YOU, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 7b524de3b4e..cf5f12c9813 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of creatures you control. + //When Foundry Champion enters the battlefield, it deals damage to target creature or player equal to the number of creatures you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()), "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 aa136bec84c..3dde24eed3a 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -54,9 +54,9 @@ public class FrilledDeathspitter extends CardImpl { // Enrage — 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 or planeswalker"), false, true + Zone.BATTLEFIELD, new DamageTargetEffect(2).setText("it deals 2 damage to target opponent"), false, true ); - ability.addTarget(new TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/Frostwielder.java b/Mage.Sets/src/mage/cards/f/Frostwielder.java index 69ef1f827b1..d8f755e4ee8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {T}: Frostwielder deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 6346206d3a7..429978ce77b 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FuriousReprisal.java b/Mage.Sets/src/mage/cards/f/FuriousReprisal.java index f791cda488b..4615422f862 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -41,11 +41,11 @@ import mage.target.common.TargetAnyTarget; 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 targets")); - this.getSpellAbility().addTarget(new TargetAnyTarget(2, 2)); + this.getSpellAbility().addEffect(new DamageTargetEffect(2, true, "each of two target creatures and/or players")); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(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 f422b3be389..c07b9f342ed 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -68,7 +68,7 @@ class FurnaceCelebrationAbility extends TriggeredAbilityImpl { public FurnaceCelebrationAbility() { super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(2), new ManaCostsImpl("{2}"))); - this.addTarget(new TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 bb290fe4b06..9b8d485b31b 100644 --- a/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java +++ b/Mage.Sets/src/mage/cards/f/FurnaceOfRath.java @@ -49,7 +49,8 @@ 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())); @@ -69,7 +70,7 @@ class FurnaceOfRathEffect extends ReplacementEffectImpl { public FurnaceOfRathEffect() { super(Duration.WhileOnBattlefield, Outcome.Damage); - staticText = "If a source would deal damage to a permanent or player, that source deals double that damage to that permanent or player instead"; + staticText = "If a source would deal damage to a creature or player, that source deals double that damage to that creature or player instead"; } public FurnaceOfRathEffect(final FurnaceOfRathEffect effect) { @@ -88,12 +89,10 @@ 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 f196f4920dc..6f59dde457a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target" until end of turn. + // 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. SimpleActivatedAbility FurystokeGiantAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - FurystokeGiantAbility.addTarget(new TargetAnyTarget()); + FurystokeGiantAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target.\" until end of turn."); + effect.setText("other creatures you control gain \"{T}: This creature deals 2 damage to target creature or player.\" 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 d15d0e6558e..8399915fc83 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // When Galvanic Arc enters the battlefield, it deals 3 damage to target creature or player. Ability triggeredAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - triggeredAbility.addTarget(new TargetAnyTarget()); + triggeredAbility.addTarget(new TargetCreatureOrPlayer()); 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 ce192f07099..e5c807f1d31 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -42,16 +42,16 @@ import mage.target.common.TargetAnyTarget; */ public class GalvanicBlast extends CardImpl { - private static final String effectText = "{this} deals 2 damage to anytarget.
Metalcraft - {this} deals 4 damage to that permanent or player instead if you control three or more artifacts"; + private static final String effectText = "{this} deals 2 damage to target creature or player.
Metalcraft - {this} deals 4 damage to that creature 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 any target. + // Galvanic Blast deals 2 damage to target creature or player. // 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 3ec09c53245..f7046cd9387 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(3)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 413e1509fe1..6563af8852c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Geistblast deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // {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 47b4497182b..80dbf8a77df 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @author nantuko @@ -46,9 +46,9 @@ public class Geistflame extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Geistflame deals 1 damage to any target. + // Geistflame deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 b3b7c989113..1c2a692841e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 655b1792ae6..c6f5c6fbb43 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target + // Tap two untaped artifacts you control: Ghirapur Aether Grid deals 1 damage to target creature or player SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, true))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GhituFire.java b/Mage.Sets/src/mage/cards/g/GhituFire.java index f5c4ccc856c..833cf73397b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); ability.setRuleAtTheTop(true); this.addAbility(ability); - // Ghitu Fire deals X damage to any target. + // Ghitu Fire deals X damage to target creature or player. this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 fd93501d4a3..57c9a1761c3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {T}, Sacrifice Ghitu Fire-Eater: Ghitu Fire-Eater deals damage equal to its power to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GhituSlinger.java b/Mage.Sets/src/mage/cards/g/GhituSlinger.java index 05ecf226d75..677d71ed48f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Ghitu Slinger enters the battlefield, it deals 2 damage to target creature or player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Ghostfire.java b/Mage.Sets/src/mage/cards/g/Ghostfire.java index 5fdadfaec3a..e5d4f8ad093 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Ghostfire deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 d89fb0b6365..a60482359a7 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 permanent or player, it deals half that damage, rounded down, to that permanent or player instead"; + 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"; } public GhostsOfTheInnocentPreventDamageEffect(final GhostsOfTheInnocentPreventDamageEffect effect) { @@ -90,8 +90,7 @@ 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_PLANESWALKER; + || event.getType() == EventType.DAMAGE_PLAYER; } @Override diff --git a/Mage.Sets/src/mage/cards/g/GiantsIre.java b/Mage.Sets/src/mage/cards/g/GiantsIre.java index 948ebe743e8..58f170e401b 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * * @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 TargetPlayerOrPlaneswalker()); - + this.getSpellAbility().addTarget(new TargetPlayer()); + // 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 998201142e4..52054e74b42 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import java.util.UUID; @@ -48,9 +48,9 @@ public class GlacialRay extends CardImpl { this.subtype.add(SubType.ARCANE); - // Glacial Ray deals 2 damage to any target. + // Glacial Ray deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 d1a09a21242..ad0e68fefcb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Goblin Arsonist dies, you may have it deal 1 damage to target creature or player. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinArtillery.java b/Mage.Sets/src/mage/cards/g/GoblinArtillery.java index 0c290576d96..1668e5e3d1b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 48827879b1c..b2de386b84a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. 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 target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target. 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 target creature or player. 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 0d537fa5a0f..d9120b95124 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -56,19 +56,15 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBombardment.java b/Mage.Sets/src/mage/cards/g/GoblinBombardment.java index c1be7f5376d..251cc987776 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java b/Mage.Sets/src/mage/cards/g/GoblinBoomKeg.java index 11cd0bf93b7..25eb3214432 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Goblin Boom Keg is put into a graveyard from the battlefield, it deals 3 damage to target creature or player. Ability ability = new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DamageTargetEffect(3, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinCannon.java b/Mage.Sets/src/mage/cards/g/GoblinCannon.java index b87d7602ad1..f9d60952a69 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Sacrifice Goblin Cannon. + // {2}: Goblin Cannon deals 1 damage to target creature or player. Sacrifice Goblin Cannon. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 3150d6d44f4..beb3cd4068a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 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. + // {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. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GoblinCharbelcherEffect(), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 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"; + 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"; } 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 60eb5c10cfc..889ebeff62a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // {T}: Goblin Dynamo deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target. + //{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(new ManacostVariableValue()), new ManaCostsImpl("{X}{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFestival.java b/Mage.Sets/src/mage/cards/g/GoblinFestival.java index 55852a15ac4..b6bf5778ae2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. 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 target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 46ef29d4779..d417c1ac96a 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java +++ b/Mage.Sets/src/mage/cards/g/GoblinFireslinger.java @@ -25,6 +25,7 @@ * 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; @@ -38,7 +39,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author Loki @@ -46,16 +47,16 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java b/Mage.Sets/src/mage/cards/g/GoblinFirestarter.java index 1cf2307c135..7f0afb2fe7f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only during your turn, before attackers are declared. + // Sacrifice Goblin Firestarter: Goblin Firestarter deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinGrenade.java b/Mage.Sets/src/mage/cards/g/GoblinGrenade.java index ea5ba2a4ce4..0cacd7a6a00 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 3d0bb4896ad..cd3c43e80b5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + firstAbility.addTarget(new TargetCreatureOrPlayer()); 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 TargetAnyTarget()); + secondAbility.addTarget(new TargetCreatureOrPlayer()); this.addAbility(secondAbility); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinLyre.java b/Mage.Sets/src/mage/cards/g/GoblinLyre.java index 55843a7a1fc..96d7411cc97 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLyre.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLyre.java @@ -32,6 +32,7 @@ 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; @@ -42,7 +43,7 @@ import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -51,11 +52,11 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } @@ -73,8 +74,7 @@ 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 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"; + 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"; } 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.getPlayerOrPlaneswalkerController(getTargetPointer().getFirst(game, source)); + Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); if (controller != null) { if (controller.flipCoin(game)) { - int damage = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()).calculate(game, source, this); if (opponent != null) { - return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true) > 0; + opponent.damage(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()).calculate(game, source, this), source.getSourceId(), game, false, true); + return true; } } else { - int damage = game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), opponent.getId(), game).size(); - return controller.damage(damage, source.getSourceId(), game, false, true) > 0; + controller.damage(new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()).calculate(game, source, this), source.getSourceId(), game, false, true); + return true; } } return false; diff --git a/Mage.Sets/src/mage/cards/g/GoblinMedics.java b/Mage.Sets/src/mage/cards/g/GoblinMedics.java index 3c5837afcf2..43c8e4ef104 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Goblin Medics becomes tapped, it deals 1 damage to target creature or player. Ability ability = new BecomesTappedSourceTriggeredAbility(new DamageTargetEffect(1, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java index 4ef3c4c38a6..9b0398b985f 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java +++ b/Mage.Sets/src/mage/cards/g/GoblinRazerunners.java @@ -25,6 +25,7 @@ * 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; @@ -45,8 +46,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; /** * @@ -56,8 +57,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); @@ -71,11 +72,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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 a3826b87540..211c1d81ccb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {T}: Goblin Sharpshooter deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java b/Mage.Sets/src/mage/cards/g/GoblinTestPilot.java index 304e9003664..247d7a51d1d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -59,9 +59,9 @@ public class GoblinTestPilot extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Goblin Test Pilot deals 2 damage to any target chosen at random. + // {tap}: Goblin Test Pilot deals 2 damage to target creature or player chosen at random. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - Target target = new TargetAnyTarget(); + Target target = new TargetCreatureOrPlayer(); 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 8217e81c199..329c813a194 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,18 +47,19 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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}"); + 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 1d347922257..e8591fa1321 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -45,7 +45,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GrabTheReins.java b/Mage.Sets/src/mage/cards/g/GrabTheReins.java index 6bae8aa5c61..0a0e42f590d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // or sacrifice a creature, then Grab the Reins deals damage equal to that creature's power to target creature or player. Mode mode = new Mode(); mode.getEffects().add(new GrabTheReinsEffect()); - TargetAnyTarget target2 = new TargetAnyTarget(); + TargetCreatureOrPlayer target2 = new TargetCreatureOrPlayer(); 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 any target"; + staticText = "sacrifice a creature. {this} deals damage equal to the sacrificed creature's power to target creature or player"; } 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 cb958893bbe..c5cdbce2748 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target and 1 damage to you. + // {R}, {tap}: Granger Guildmage deals 1 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 e304e2eb0f2..96940fc9551 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {3}, {tap} or {R}, {tap}: Granite Shard deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Grapeshot.java b/Mage.Sets/src/mage/cards/g/Grapeshot.java index ab3104e4326..ae11b0eab1e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,8 +45,8 @@ public class Grapeshot extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); - // Grapeshot deals 1 damage to any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Grapeshot deals 1 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 ed40dbba8a9..dea9322ecda 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 permanent or player, it deals double that permanent to that creature or player instead"; + 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"; } GratuitousViolenceReplacementEffect(final GratuitousViolenceReplacementEffect effect) { @@ -81,18 +81,17 @@ 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 af141f25d01..b38a2b3e7ae 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GruulGuildmage.java b/Mage.Sets/src/mage/cards/g/GruulGuildmage.java index dd83c86e5ed..cd35a78f787 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,17 +55,18 @@ 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 TargetPlayerOrPlaneswalker(1)); + firstAbility.addTarget(new TargetPlayer(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 23156c98780..f183f418b98 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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.getSpellAbility().addEffect(new GuardianAngelEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 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"; + 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"; } 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 any target this turn (" + targetName + ")."); + specialAction.getEffects().get(0).setText("Prevent the next 1 damage that would be dealt to target creature or player 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 7d539dc0b8d..782490da4f3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Guerrilla Tactics deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); - // When a spell or ability an opponent controls causes you to discard Guerrilla Tactics, Guerrilla Tactics deals 4 damage to any target. + // When a spell or ability an opponent controls causes you to discard Guerrilla Tactics, Guerrilla Tactics deals 4 damage to target creature or player. Ability ability = new DiscardedByOpponentTriggerAbility(new DamageTargetEffect(4)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/GutShot.java b/Mage.Sets/src/mage/cards/g/GutShot.java index 34ad281595b..3262a1dcc6f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 d863fff218e..853b507b6ba 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn,2), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // 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. + // 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. Ability thresholdAbility = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 4), new TapSourceCost(), new CardsInControllerGraveCondition(7)); - thresholdAbility.addTarget(new TargetAnyTarget()); + thresholdAbility.addTarget(new TargetCreatureOrPlayer()); 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 f51762f2505..e78201607d0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Hammer of Bogardan deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // {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 f6157bf367e..6ca0ce2d20b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 d68b955af2f..4e5fd9c14b7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of + * damage to target creature or player 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 TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 any target equal to the number of aim counters removed this way"; + staticText = "This creature deals damage to target creature or player 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 cd2214e6974..6be5d553cf1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target 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 target creature or player instead. this.getSpellAbility().addEffect(new HarmsWayPreventDamageTargetEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target 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 target creature or player 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 d3637d9e159..e6a0ca3650c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain X life, where X is the number of creatures you control. + // Harsh Sustenance deals X damage to target creature or player 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 any target"); + effect.setText("{this} deals X damage to target creature or player"); getSpellAbility().addEffect(effect); - getSpellAbility().addTarget(new TargetAnyTarget()); + getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 155ff22eafa..df412ac14e8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, {tap}, Put a -1/-1 counter on a creature you control: Hatchet Bully deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HatchetBullyEffect(), new ManaCostsImpl("{2}{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new HatchetBullyCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "{this} deals 2 damage to target creature or player"; } 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 edfe0240a8c..6450c5785c9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, {untap}: Hateflayer deals damage equal to its power to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{2}{R}")); ability.addCost(new UntapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HauntingMisery.java b/Mage.Sets/src/mage/cards/h/HauntingMisery.java index 814211fbd1e..d74e5e49335 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,12 +44,12 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 a109589c363..1e778b2f46b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 1 damage that would be dealt to target creature or player 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/h/HealersHeaddress.java b/Mage.Sets/src/mage/cards/h/HealersHeaddress.java index 71d44772101..32d74de446b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn." + // Equipped creature gets +0/+2 and has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - gainAbility.addTarget(new TargetAnyTarget()); + gainAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target this turn.\""); + effect.setText("and has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player 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 9cd1cad9b05..687f4f37192 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to target creature or player 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 TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 d4e58af2966..90a409f6be6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Choose one - Target player gains 3 life; or prevent the next 3 damage that would be dealt to target creature or player 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 TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 6e6b211f358..62e1dc72cfc 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -77,7 +77,7 @@ class HeartOfBogardanTriggeredAbility extends TriggeredAbilityImpl { HeartOfBogardanTriggeredAbility() { super(Zone.BATTLEFIELD, new HeartOfBogardanEffect(), false); - this.addTarget(new TargetPlayerOrPlaneswalker()); + this.addTarget(new TargetPlayer()); } HeartOfBogardanTriggeredAbility(final HeartOfBogardanTriggeredAbility ability) { @@ -101,10 +101,7 @@ 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 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."; + 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."; } } @@ -112,9 +109,7 @@ class HeartOfBogardanEffect extends OneShotEffect { public HeartOfBogardanEffect() { super(Outcome.Damage); - 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"; + 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"; } public HeartOfBogardanEffect(final HeartOfBogardanEffect effect) { @@ -123,13 +118,13 @@ class HeartOfBogardanEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + Player player = game.getPlayer(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 2a2967d9b61..745c124ccb7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When you do, Heart-Piercer Manticore deals damage equal to that creature's power to target creature or player. Ability secondAbility = new HeartPiercerManticoreSacrificeTriggeredAbility(firstAbility.getOriginalId()); - secondAbility.addTarget(new TargetAnyTarget()); + secondAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target")); + super(Zone.BATTLEFIELD, new InfoEffect("{this} deals damage equal to that creature's power to target creature or player")); 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 any target."; + return "When you do, {this} deals damage equal to that creature's power to target creature or player."; } } diff --git a/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java b/Mage.Sets/src/mage/cards/h/HeartwoodGiant.java index f17c6057242..1b9dafabae1 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HeavyArbalest.java b/Mage.Sets/src/mage/cards/h/HeavyArbalest.java index 9bf2efc33f0..5296ca5f8be 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Equipped creature has "{T}: This creature deals 2 damage to target creature or player." SimpleActivatedAbility ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability2.addTarget(new TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 5908cd56cef..1017619b1f4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Tap an untapped Swamp you control: Hecatomb deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, true))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/Heliophial.java b/Mage.Sets/src/mage/cards/h/Heliophial.java index 505b84bef52..6ae2508fa15 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}, Sacrifice Heliophial: Heliophial deals damage equal to the number of charge counters on it to target creature or player. Effect effect = new DamageTargetEffect(new CountersSourceCount(CounterType.CHARGE)); - effect.setText("{this} deals damage equal to the number of charge counters on it to any target"); + effect.setText("{this} deals damage equal to the number of charge counters on it to target creature or player"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HellholeFlailer.java b/Mage.Sets/src/mage/cards/h/HellholeFlailer.java index a71a10dcfdf..a649adf8c5c 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,39 +41,41 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetPlayerOrPlaneswalker; - +import mage.target.TargetPlayer; + /** * * @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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 b75b9eecfca..8afaea91ead 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().getDefenderId(event.getSourceId()); + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(event.getSourceId(), game); 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 the player or planeswalker it’s attacking."; + return "Whenever a creature you control attacks, {this} deals 1 damage to defending player."; } } diff --git a/Mage.Sets/src/mage/cards/h/HereticsPunishment.java b/Mage.Sets/src/mage/cards/h/HereticsPunishment.java index 1e2d70918df..b453316ad11 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -51,11 +51,11 @@ import mage.target.common.TargetAnyTarget; 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 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. + // {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. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HereticsPunishmentEffect(), new ManaCostsImpl("{3}{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -73,7 +73,7 @@ class HereticsPunishmentEffect extends OneShotEffect { public HereticsPunishmentEffect() { super(Outcome.Damage); - 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"; + 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"; } 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 1c91a11a717..b1284707c46 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals 1 damage to any target.\""))); + "Enchanted creature has \"{T}: This creature deals 1 damage to target creature or player.\""))); } 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 4aad54eac28..fcc909a103d 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,7 +44,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HoldAtBay.java b/Mage.Sets/src/mage/cards/h/HoldAtBay.java index 0d54c09c0f3..d6dec29f560 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 7 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 7)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 4c3e26f6705..6f80ac46bc6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target equal to the number of Shrines you control. + // 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. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), TargetController.YOU, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HonorablePassage.java b/Mage.Sets/src/mage/cards/h/HonorablePassage.java index 8ccf1200cf8..585d6256e09 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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. this.getSpellAbility().addEffect(new HonorablePassageEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 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"; + 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"; } } diff --git a/Mage.Sets/src/mage/cards/h/HornetSting.java b/Mage.Sets/src/mage/cards/h/HornetSting.java index 63e2f45bbcc..852289b16d7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 28e446c46fd..03b392d8b34 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn." + // Enchanted land has "{tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn." ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(ability, AttachmentType.AURA); - effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to any target this turn.\""); + effect.setText("Enchanted land has \"{T}: Prevent the next 1 damage that would be dealt to target creature or player 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 2e220952b12..2d7c76cea80 100644 --- a/Mage.Sets/src/mage/cards/h/HungryFlames.java +++ b/Mage.Sets/src/mage/cards/h/HungryFlames.java @@ -25,6 +25,7 @@ * 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; @@ -37,8 +38,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 @@ -50,7 +51,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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new HungryFlamesEffect()); } @@ -64,10 +65,9 @@ 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 or planeswalker"; + this.staticText = "{this} deals 3 damage to target creature and 2 damage to target player"; } 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 5406dba3019..353481c35ec 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has "Tap: This creature deals 1 damage to target creature or player." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); 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 599cd604198..af55a6ad1a5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {W}, Discard a card: Prevent the next 3 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // {W}, Sacrifice Hypochondria: Prevent the next 3 damage that would be dealt to any target this turn. + // {W}, Sacrifice Hypochondria: Prevent the next 3 damage that would be dealt to target creature or player this turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new ManaCostsImpl("{W}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java b/Mage.Sets/src/mage/cards/i/IcatianJavelineers.java index be01459181e..de8dfee17f4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Remove a javelin counter from Icatian Javelineers: Icatian Javelineers deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new RemoveCountersSourceCost(CounterType.JAVELIN.createInstance())); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/ImminentDoom.java b/Mage.Sets/src/mage/cards/i/ImminentDoom.java index a8b06b8abb2..4f875fb860a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. 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 target creature or player. Then put a doom counter on Imminent Doom. Ability ability = new ImminentDoomTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target. 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 target creature or player. 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 c102ab82909..9ca9bffa957 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.FilterCreaturePlayerOrPlaneswalker; +import mage.filter.common.FilterCreatureOrPlayer; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,14 +49,14 @@ import mage.target.common.TargetAnyTarget; */ public class ImperialGunner extends CardImpl { - private static final FilterCreaturePlayerOrPlaneswalker filter = new FilterCreaturePlayerOrPlaneswalker("target player, planeswalker or Starship creature"); + private static final FilterCreatureOrPlayer filter = new FilterCreatureOrPlayer("target player 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 TargetAnyTarget(filter)); + ability.addTarget(new TargetCreatureOrPlayer(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 8b254b0a6cd..879f7b82667 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 442b5171bc2..7cbed799b5d 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.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); // 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 68607d0c784..03b10f98814 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. If a creature dealt damage this way would die this turn, exile it instead. + // Incendiary Flow deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 f3904012a4b..2f82ee34231 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.DamagedByWatcher; /** @@ -53,7 +53,7 @@ public class Incinerate extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 355260e01b8..c7461dd06d2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, Sacrifice Inferno Fist: Inferno Fist deals 2 damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/InfernoJet.java b/Mage.Sets/src/mage/cards/i/InfernoJet.java index eddffdfa858..f1bc9c93956 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 TargetOpponentOrPlaneswalker()); + getSpellAbility().addTarget(new TargetOpponent()); // 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 797281846b3..335f7120a09 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(3)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 d2c7699a347..7ecd9561c18 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 TargetPlayerOrPlaneswalker()); + getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer()); 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 permanent or player instead."; + staticText = "If a source you control would deal damage this turn, it deals double that damage to that creature 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 1f1edd7cfee..4c42cb06c61 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 65a8eea9275..4eeb77f84fb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {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. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/i/IreOfKaminari.java b/Mage.Sets/src/mage/cards/i/IreOfKaminari.java index b6db46ee9df..655f06afbd2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target equal to the number of Arcane cards in your graveyard. + // Ire of Kaminari deals damage to target creature or player equal to the number of Arcane cards in your graveyard. this.getSpellAbility().addEffect(new DamageTargetEffect(new CardsInControllerGraveyardCount(filter))); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 8ed515d712c..d7bb8b69ca9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn. + // or prevent the next 1 damage that would be dealt to target creature or player this turn. mode = new Mode(); mode.getEffects().add(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1)); - mode.getTargets().add(new TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 d929511bf45..c450498711b 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(mountains)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(mountains)); } diff --git a/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java b/Mage.Sets/src/mage/cards/j/JayaBallardTaskMage.java index 202c8d05a6d..087d61809df 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. 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 target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 c807711e98e..9af594c6600 100644 --- a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java +++ b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java @@ -6,6 +6,7 @@ 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; @@ -13,7 +14,8 @@ 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 cb2a1e88eb8..540868fdf23 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Jeska, Warrior Adept deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JeskaiCharm.java b/Mage.Sets/src/mage/cards/j/JeskaiCharm.java index 12d47924016..72e5ca95e44 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -50,7 +50,8 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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. @@ -59,11 +60,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 TargetOpponentOrPlaneswalker()); + mode.getTargets().add(new TargetOpponent()); 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 d0b947100d1..6a124118920 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 f309d88735b..d6d52d90e3c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When you cycle Jund Sojourners or it dies, you may have it deal 1 damage to target creature or player. Ability ability1 = new CycleTriggeredAbility(new DamageTargetEffect(1)); Ability ability2 = new DiesTriggeredAbility(new DamageTargetEffect(1)); - ability1.addTarget(new TargetAnyTarget()); - ability2.addTarget(new TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 19bab1ed43a..a196c1f169a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to that spell's converted mana cost. + // Whenever an opponent casts a spell, Kaervek the Merciless deals damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -79,7 +79,7 @@ class KaervekTheMercilessEffect extends OneShotEffect { public KaervekTheMercilessEffect() { super(Outcome.Benefit); - this.staticText = "{this} deals damage to any target equal to that spell's converted mana cost"; + this.staticText = "{this} deals damage to target creature or player 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 ee0b668972b..84d0436c944 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Kaervek's Torch deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 5e0767ac9c3..76a2a36e2dc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java index b6505bfce8b..a244cd23b10 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Whenever you win a coin flip, Karplusan Minotaur deals 1 damage to target creature or player. Ability abilityWin = new KarplusanMinotaurFlipWinTriggeredAbility(); - abilityWin.addTarget(new TargetAnyTarget()); + abilityWin.addTarget(new TargetCreatureOrPlayer()); this.addAbility(abilityWin); //TODO: Make ability properly copiable - // Whenever you lose a coin flip, Karplusan Minotaur deals 1 damage to any target of an opponent's choice. + // Whenever you lose a coin flip, Karplusan Minotaur deals 1 damage to target creature or player of an opponent's choice. Ability abilityLose = new KarplusanMinotaurFlipLoseTriggeredAbility(); - abilityLose.addTarget(new TargetAnyTarget()); + abilityLose.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + return "Whenever you win a coin flip, {this} deals 1 damage to target creature or player"; } } @@ -165,7 +165,7 @@ class KarplusanMinotaurFlipLoseTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you lose a coin flip, {this} deals 1 damage to any target of an opponent's choice."; + return "Whenever you lose a coin flip, {this} deals 1 damage to target creature or player 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 84ab4bec9c1..3229b5635da 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Karplusan Wolverine becomes blocked, you may have it deal 1 damage to target creature or player. Ability ability = new BecomesBlockedTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonChampion.java b/Mage.Sets/src/mage/cards/k/KeldonChampion.java index a72b636ec36..caf5f284fcd 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,7 +47,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonMarauders.java b/Mage.Sets/src/mage/cards/k/KeldonMarauders.java index 6ab4f786ce9..24b59faa441 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -50,7 +50,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java b/Mage.Sets/src/mage/cards/k/KeldonMegaliths.java index 385350122ac..db94c7aab2b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only if you have no cards in hand. + // 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. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{1}{R}"), HellbentCondition.instance, - "Hellbent — {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()); + "Hellbent — {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()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java b/Mage.Sets/src/mage/cards/k/KeldonNecropolis.java index 79f655d558b..0c1e25eb8b4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}{R}, {T}, Sacrifice a creature: Keldon Necropolis deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java index 11e6606b7b1..beb304ebd9e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player. 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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 any target."; + "Whenever you reveal a nonland card this way, Keranos deals 3 damage to target creature or player."; } } diff --git a/Mage.Sets/src/mage/cards/k/KessigMalcontents.java b/Mage.Sets/src/mage/cards/k/KessigMalcontents.java index 7083624e19e..38fde758bce 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java b/Mage.Sets/src/mage/cards/k/KilnmouthDragon.java index deb6557ad3d..ccd1da4b3e5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Kilnmouth Dragon deals damage equal to the number of +1/+1 counters on it to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.P1P1)), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/Kindle.java b/Mage.Sets/src/mage/cards/k/Kindle.java index d0bc2aa6f5b..756c28400ab 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -58,11 +58,11 @@ public class Kindle extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Kindle deals X damage to any target, where X is 2 plus the number of cards named Kindle in all graveyards. + // Kindle deals X damage to target creature or player, 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 any target, where X is 2 plus the number of cards named {source} in all graveyards"); + 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"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 1f653a219e0..b727e46c19e 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.common.TargetOpponentOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -42,12 +42,12 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 2ec92ab237f..44bd43f692a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KitsuneHealer.java b/Mage.Sets/src/mage/cards/k/KitsuneHealer.java index d72ebd3620f..2ccc828cbbc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn. + // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - firstAbility.addTarget(new TargetAnyTarget()); + firstAbility.addTarget(new TargetCreatureOrPlayer()); 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 b111b3c32bd..e21b4746274 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {X}, Discard a card with converted mana cost X: Knollspine Invocation deals X damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new ManacostVariableValue(), true), new ManaCostsImpl<>("{X}")); ability.addCost(new DiscardTargetCost(new TargetCardInHand(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java b/Mage.Sets/src/mage/cards/k/KnowledgeAndPower.java index 8fe3fd8fd39..a957cdd0f55 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever you scry, you may pay 2. If you do. Knowledge and Power deals 2 damage to target creature or player. 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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 cad8697fbfc..7ac3119ec1a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // or Kolaghan's Command deals 2 damage to target creature or player. mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(2)); - mode.getTargets().add(new TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 06a821a7fa2..4bc59964b6c 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 any target.' + // -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.' 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 da30a393c52..b68c394a9fd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, {tap}, Discard a card: Kris Mage deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanHorror.java b/Mage.Sets/src/mage/cards/k/KrovikanHorror.java index ff2063899d9..3f85d495244 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -70,10 +70,10 @@ public class KrovikanHorror extends CardImpl { TargetController.ANY, KrovikanHorrorCondition.instance, true )); - // {1}, Sacrifice a creature: Krovikan Horror deals 1 damage to any target. + // {1}, Sacrifice a creature: Krovikan Horror deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanPlague.java b/Mage.Sets/src/mage/cards/k/KrovikanPlague.java index fc864282239..190b3415360 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. 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 target creature or player. 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 TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java b/Mage.Sets/src/mage/cards/k/KuldothaFlamefiend.java index 9651265d279..4559c938128 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(4)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 e90a65f1927..4149e6e6055 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {{1}{R}: Kumano, Master Yamabushi deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}") ); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 936615d90e8..686dc0806f6 100644 --- a/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java +++ b/Mage.Sets/src/mage/cards/k/KyrenNegotiations.java @@ -12,8 +12,9 @@ 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; + /** * @@ -31,12 +32,8 @@ 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 TargetPlayerOrPlaneswalker()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KyrenSniper.java b/Mage.Sets/src/mage/cards/k/KyrenSniper.java index 627a07c37e9..40a0d91f347 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author BursegSardaukar @@ -45,7 +45,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 8927db44096..8c2f1461276 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Heroic - Whenever you cast a spell that targets Labyrinth Champion, Labyrinth Champion deals 2 damage to target creature or player. Ability ability = new HeroicAbility(new DamageTargetEffect(2), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LandsEdge.java b/Mage.Sets/src/mage/cards/l/LandsEdge.java index 16014035b01..85df17f44de 100644 --- a/Mage.Sets/src/mage/cards/l/LandsEdge.java +++ b/Mage.Sets/src/mage/cards/l/LandsEdge.java @@ -31,6 +31,8 @@ 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; @@ -46,7 +48,8 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; + /** * @author L_J @@ -54,12 +57,12 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 ec41463b3eb..9388d000d28 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -53,11 +53,11 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 or planeswalker"; + staticText = "Sacrifice any number of Mountains. {this} deals that much damage to target player"; } 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 e5a9aaf187d..f2dbe86ca2b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice any number of creatures. Last-Ditch Effort deals that much damage to target creature or player. this.getSpellAbility().addEffect(new LastDitchEffortEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + this.staticText = "Sacrifice any number of creatures. {this} deals that much damage to target creature or player"; } 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 71fb2cc768d..f68c9237923 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {X}{R}, {tap}, Discard two cards: Latulla, Keldon Overseer deals X damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LavaAxe.java b/Mage.Sets/src/mage/cards/l/LavaAxe.java index 11a3b5f4997..fe3f4234a24 100644 --- a/Mage.Sets/src/mage/cards/l/LavaAxe.java +++ b/Mage.Sets/src/mage/cards/l/LavaAxe.java @@ -25,6 +25,7 @@ * 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; @@ -32,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.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -41,9 +42,9 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 c191d8abe40..90372fffe2d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Lava Dart deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 68cd5405815..acddcf89c46 100644 --- a/Mage.Sets/src/mage/cards/l/LavaSpike.java +++ b/Mage.Sets/src/mage/cards/l/LavaSpike.java @@ -25,6 +25,7 @@ * 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 +34,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -41,16 +42,16 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 c9ba9c8874c..d0d1cc70ec0 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -52,12 +52,16 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); - + this.getSpellAbility().addTarget(new TargetPlayer()); + } public Lavalanche(final Lavalanche card) { @@ -77,7 +81,7 @@ class LavalancheEffect extends OneShotEffect { public LavalancheEffect(DynamicValue amount) { super(Outcome.Damage); this.amount = amount; - staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; + staticText = "Lavalanche deals X damage to target player and each creature he or she controls"; } public LavalancheEffect(final LavalancheEffect effect) { @@ -92,16 +96,16 @@ class LavalancheEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); + Player targetPlayer = game.getPlayer(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 that player or that planeswalker’s controller controls"); + FilterPermanent filter = new FilterPermanent("and each creature he or she controls"); filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new ControllerIdPredicate(targetPlayer.getId())); List 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 596bf17551c..e9be4a4d1db 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -48,14 +48,15 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } @@ -70,21 +71,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 e9bef092988..5f06367d991 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 4856671061c..f053bac4a76 100644 --- a/Mage.Sets/src/mage/cards/l/LightningBolt.java +++ b/Mage.Sets/src/mage/cards/l/LightningBolt.java @@ -24,7 +24,8 @@ * 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; @@ -32,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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -41,9 +42,9 @@ import mage.target.common.TargetAnyTarget; 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 a696e4b2cd3..07d5034145d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a player casts a red spell, you may pay {R}. If you do, Lightning Cloud deals 1 damage to target creature or player. Ability ability = new SpellCastAllTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(1), new ManaCostsImpl("{R}")), filter, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningCrafter.java b/Mage.Sets/src/mage/cards/l/LightningCrafter.java index 7b18190c2a8..3702258898f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {T}: Lightning Crafter deals 3 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningDiadem.java b/Mage.Sets/src/mage/cards/l/LightningDiadem.java index e87e16105dd..0f20e8d40ad 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // When Lightning Diadem enters the battlefield, it deals 2 damage to target creature or player. ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 ac086bdf16e..c16434c8c91 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,7 +46,7 @@ public class LightningHelix extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}"); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 b48cc3257b8..86580032740 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Lightning Javelin deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 a93cc2e7fd5..30a0f4340a8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has haste and "{tap}: This creature deals 1 damage to target creature or player." 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 5f65beabfc4..126a6de3b0c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a player cycles a card, you may pay {1}. If you do, Lightning Rift deals 2 damage to target creature or player. Ability ability = new CycleAllTriggeredAbility(new DoIfCostPaid(new DamageTargetEffect(2), new GenericManaCost(1)), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LightningStorm.java b/Mage.Sets/src/mage/cards/l/LightningStorm.java index f92a98d28cf..0c7c4cd07bb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, where X is 3 plus the number of charge counters on it. + // Lightning Storm deals X damage to target creature or player, 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 any target, where X is 3 plus the number of charge counters on it"); + effect.setText("{this} deals X damage to target creature or player, where X is 3 plus the number of charge counters on it"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 c95bfc80052..8ae559c5f94 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,9 +44,9 @@ public class LightningStrike extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Lightning Strike deals 3 damage to any target. + // Lightning Strike deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/l/LightningSurge.java b/Mage.Sets/src/mage/cards/l/LightningSurge.java index 0c80ac11a06..f97cfd739dc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,17 +47,17 @@ import mage.target.common.TargetAnyTarget; 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 any target. + // Lightning Surge deals 4 damage to target creature or player. // 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 any target.

Threshold - {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()); + Effect effect = new ConditionalOneShotEffect(new DamageTargetEffect(6, false), + new DamageTargetEffect(4), + new CardsInControllerGraveCondition(7), + "{this} deals 4 damage to target creature or player.

Threshold - {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()); 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 4dc55953ebc..b4ff6a28c4e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Until end of turn, creatures you control gain "{T}: This creature deals 1 damage to target creature or player." Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - grantedAbility.addTarget(new TargetAnyTarget()); + grantedAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""); + effect.setText("Until end of turn, creatures you control gain \"{T}: This creature deals 1 damage to target creature or player.\""); 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 8b66b737fc2..71c501cc66c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target."; + return "Whenever this creature becomes the target of a spell, this creature deals 2 damage to target creature or player."; } } diff --git a/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java b/Mage.Sets/src/mage/cards/l/LoxodonAnchorite.java index 28d03093441..705e7518165 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/Lunge.java b/Mage.Sets/src/mage/cards/l/Lunge.java index cad56254bba..f602f212be0 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 21dbc764139..ee32afa6e85 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 any target if the sacrificed creature was red"); + "{source} deals 2 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MageIlVec.java b/Mage.Sets/src/mage/cards/m/MageIlVec.java index 51896df1a08..aa9a1571c86 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Discard a card at random: Mage il-Vec deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MageSlayer.java b/Mage.Sets/src/mage/cards/m/MageSlayer.java index 1d4e1c3a7c5..5846113861e 100644 --- a/Mage.Sets/src/mage/cards/m/MageSlayer.java +++ b/Mage.Sets/src/mage/cards/m/MageSlayer.java @@ -40,6 +40,7 @@ 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; /** @@ -57,6 +58,7 @@ public class MageSlayer extends CardImpl { // Equip {3} this.addAbility(new EquipAbility(Outcome.Benefit, new GenericManaCost(3), new TargetControlledCreaturePermanent())); + } public MageSlayer(final MageSlayer card) { @@ -73,7 +75,7 @@ class MageSlayerEffect extends OneShotEffect { public MageSlayerEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to the player or planeswalker it’s attacking"; + staticText = "it deals damage equal to its power to defending player"; } public MageSlayerEffect(final MageSlayerEffect effect) { @@ -90,11 +92,13 @@ 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 defenderId = game.getCombat().getDefenderId(equipment.getAttachedTo()); - if (power > 0 && defenderId != null) { + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(equipment.getAttachedTo(), game); + if (power > 0 && defendingPlayerId != null) { + Player defendingPlayer = game.getPlayer(defendingPlayerId); + UUID sourceId = (UUID) this.getValue("sourceId"); - if (sourceId != null) { - game.damagePlayerOrPlaneswalker(defenderId, power, source.getSourceId(), game, false, true); + if (sourceId != null && defendingPlayer != null) { + defendingPlayer.damage(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 e386eef851c..83512218bd9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * * @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 any target. If Magma Burst was kicked, it deals 3 damage to another any target. + // 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. Effect effect = new DamageTargetEffect(3); - effect.setText("{this} deals 3 damage to any target. If {this} was kicked, it deals 3 damage to another target."); + 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."); this.getSpellAbility().addEffect(effect); originalId = this.getSpellAbility().getOriginalId(); } @Override public void adjustTargets(Ability ability, Game game) { - if (ability.getOriginalId().equals(originalId)) { - ability.addTarget(new TargetAnyTarget(KickedCondition.instance.apply(game, ability) ? 2 : 1)); + if(ability.getOriginalId().equals(originalId)) { + ability.addTarget(new TargetCreatureOrPlayer(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 90d6e5a1ea2..4ba6971dc8f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,9 +45,9 @@ public class MagmaJet extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Magma Jet deals 2 damage to any target. + // Magma Jet deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 1704cd2fc7e..c1a863b35cf 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice Magma Mine: Magma Mine deals damage equal to the number of pressure counters on it to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.PRESSURE)), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MagmaticForce.java b/Mage.Sets/src/mage/cards/m/MagmaticForce.java index bf05ff7fc7a..b017368f30e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // At the beginning of each upkeep, Magmatic Force deals 3 damage to target creature or player. Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.ANY, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/Magmaw.java b/Mage.Sets/src/mage/cards/m/Magmaw.java index 865025bd8ca..a4a9ed2622d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java index 346c2b418e4..2ec8ede24a9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {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. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + 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"; } 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 05da556bde7..87fadc56067 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Create a 1/1 red Devil creature token. - // It has "When this creature dies, it deals 1 damage to any target." + // 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." this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 bd98c7f7751..fa00aa89c22 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // {1}, Sacrifice an artifact or creature: Makeshift Munitions deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE)) ); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 9afcd0584d5..c6371855c5e 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; 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 or planeswalker."); + damage.setText("{this} deals 3 damage to target opponent."); damage.setTargetPointer(new SecondTargetPointer()); Ability ability = new EntersBattlefieldTriggeredAbility(counters); ability.addEffect(damage); ability.addTarget(new TargetControlledCreaturePermanent()); - ability.addTarget(new TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java b/Mage.Sets/src/mage/cards/m/MarathWillOfTheWild.java index 83919abce59..db1fc6326db 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target; + // or Marath deals X damage to target creature or player; Mode mode = new Mode(); mode.getEffects().add(new DamageTargetEffect(new ManacostVariableValue())); - mode.getTargets().add(new TargetAnyTarget()); + mode.getTargets().add(new TargetCreatureOrPlayer()); 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 bce976a76bf..78291c4edd8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.PlayerAttackedWatcher; /** @@ -55,10 +55,10 @@ public class MarduHeartPiercer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(3); - // Raid - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to any target. + // Raid - 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. Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, - "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to any target."); - ability.addTarget(new TargetAnyTarget()); + "Raid - 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()); 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 fb0cf6c6827..a1c38fa9461 100644 --- a/Mage.Sets/src/mage/cards/m/Martyrdom.java +++ b/Mage.Sets/src/mage/cards/m/Martyrdom.java @@ -28,12 +28,16 @@ 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; @@ -48,8 +52,9 @@ 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -58,9 +63,9 @@ import mage.target.common.TargetAnyTarget; 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 any target 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 target creature or player this turn is dealt to this creature instead." Only you may activate this ability. this.getSpellAbility().addEffect(new MartyrdomGainAbilityTargetEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); } @@ -79,9 +84,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, planeswalker, 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 or player this turn is dealt to this creature instead.\" Only you may activate this ability"; } - + public MartyrdomGainAbilityTargetEffect(final MartyrdomGainAbilityTargetEffect effect) { super(effect); } @@ -105,13 +110,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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); this.caster = caster; } @@ -145,7 +150,7 @@ class MartyrdomActivatedAbility extends ActivatedAbilityImpl { @Override public String getRule() { - return "{0}: The next 1 damage that would be dealt to target creature, planeswalker, or player this turn is dealt to {this} instead."; + return "{0}: The next 1 damage that would be dealt to target creature or player this turn is dealt to {this} instead."; } } @@ -155,7 +160,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, planeswalker, or player this turn is dealt to {this} instead"; + staticText = "The next " + amount + " damage that would be dealt to target creature or player this turn is dealt to {this} instead"; } public MartyrdomRedirectDamageTargetEffect(final MartyrdomRedirectDamageTargetEffect effect) { @@ -174,7 +179,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) { - TargetAnyTarget target = new TargetAnyTarget(); + TargetCreatureOrPlayer target = new TargetCreatureOrPlayer(); 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 24e166b007b..f8388863676 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn, prevent that damage. + // Sacrifice a creature: The next time a source of your choice would deal damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MassiveRaid.java b/Mage.Sets/src/mage/cards/m/MassiveRaid.java index 0d865fc1dfe..3f7478c4c28 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,9 +46,9 @@ public class MassiveRaid extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); - // Massive Raid deals damage to any target equal to the number of creatures you control. + // Massive Raid deals damage to target creature or player equal to the number of creatures you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent()))); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 c8ecf3fb9c0..d967abe6432 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Tap an untapped Cleric you control: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MasterHealer.java b/Mage.Sets/src/mage/cards/m/MasterHealer.java index dcd71c35576..7d9aaa733ca 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 4 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 4), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MasterTheWay.java b/Mage.Sets/src/mage/cards/m/MasterTheWay.java index 93573959a56..6ee51f00b5f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of cards in your hand. + // Draw a card. Master the Way deals damage to target creature or player 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 any target equal to the number of cards in your hand"); + effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 3c4a8311a12..939f6d72910 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MendingHands.java b/Mage.Sets/src/mage/cards/m/MendingHands.java index bc73ccb652d..39d187b15e3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 4 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 51309b02240..f872e2e6fd5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget(xValue); + Target target = new TargetCreatureOrPlayer(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 a692161140a..37ab91d1f04 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 04fcaeed3a5..823da2437d9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}{G}, Discard two cards at random: Meteor Storm deals 4 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/Meteorite.java b/Mage.Sets/src/mage/cards/m/Meteorite.java index de2eae42984..227ea2cb55e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Meteorite enters the battlefield, it deals 2 damage to target creature or player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 1f98a9396e0..a302c41e160 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MobJustice.java b/Mage.Sets/src/mage/cards/m/MobJustice.java index c733e5397be..d7adee5672f 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,13 +44,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 or planeswalker equal to the number of creatures you control"); + effect.setText("{this} deals damage to target player equal to the number of creatures you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 34b68e41d65..0f19a42bac5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice Mogg Fanatic: Mogg Fanatic deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoggManiac.java b/Mage.Sets/src/mage/cards/m/MoggManiac.java index 6a7e790fe15..73423646f38 100644 --- a/Mage.Sets/src/mage/cards/m/MoggManiac.java +++ b/Mage.Sets/src/mage/cards/m/MoggManiac.java @@ -39,7 +39,8 @@ import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; -import mage.target.common.TargetOpponentOrPlaneswalker; +import mage.players.Player; +import mage.target.common.TargetOpponent; /** * @@ -55,7 +56,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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } @@ -73,7 +74,7 @@ class MoggManiacDealDamageEffect extends OneShotEffect { public MoggManiacDealDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals that much damage to target opponent or planeswalker"; + this.staticText = "it deals that much damage to target opponent"; } public MoggManiacDealDamageEffect(final MoggManiacDealDamageEffect effect) { @@ -89,8 +90,11 @@ class MoggManiacDealDamageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = (Integer) getValue("damage"); if (amount > 0) { - game.damagePlayerOrPlaneswalker(targetPointer.getFirst(game, source), amount, source.getSourceId(), game, false, true); - return true; + Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); + if (opponent != null) { + opponent.damage(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 8ff157ed211..20c4b563db5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoltenNursery.java b/Mage.Sets/src/mage/cards/m/MoltenNursery.java index c991f71ecc5..a47d354a377 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever you cast a colorless spell, Molten Nursery deals 1 damage to target creature or player. Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(1), filter, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java b/Mage.Sets/src/mage/cards/m/MoltenTailMasticore.java index f5f846e9e77..7260a33ff3e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}, Exile a creature card from your graveyard: Molten-Tail Masticore deals 4 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 caa6795fee3..1b655b92585 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, Discard a land card: Molten Vortex deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); ability.addCost(new ManaCostsImpl("{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MoongloveExtract.java b/Mage.Sets/src/mage/cards/m/MoongloveExtract.java index e0eb06c8c86..b70b4d377ee 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice Moonglove Extract: Moonglove Extract deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MorbidHunger.java b/Mage.Sets/src/mage/cards/m/MorbidHunger.java index c4e0ad3fbb3..9d2b555dd5f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. You gain 3 life. + // Morbid Hunger deals 3 damage to target creature or player. You gain 3 life. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 94ca706440d..9e2e7b20daf 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target 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 target creature or player 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 378e8927427..b83c2f3ff86 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Equipped creature gets +0/+1 and has "Sacrifice this creature: This creature deals 1 damage to target creature or player." Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 1)); SimpleActivatedAbility abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - abilityToGain.addTarget(new TargetAnyTarget()); + abilityToGain.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.EQUIPMENT); - effect.setText("and has \"Sacrifice this creature: This creature deals 1 damage to any target.\""); + effect.setText("and has \"Sacrifice this creature: This creature deals 1 damage to target creature or player.\""); 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 093b1ba7a64..6b1e5d852c0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Mudbutton Torchrunner dies, it deals 3 damage to target creature or player. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MurderousRedcap.java b/Mage.Sets/src/mage/cards/m/MurderousRedcap.java index d3a21b57aea..0f34f234d82 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Murderous Redcap enters the battlefield, it deals damage equal to its power to target creature or player. Ability ability = new EntersBattlefieldTriggeredAbility(new MurderousRedcapEffect()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "it deals damage equal to its power to target creature or player"; } 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 42e4002f2ec..03a8a691cce 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.TriggeredAbilityImpl; +import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; @@ -44,18 +44,16 @@ 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.target.targetpointer.FixedTarget; +import mage.watchers.common.CreatureAttackedWhichPlayerWatcher; /** * @@ -74,7 +72,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 MyrBattlesphereTriggeredAbility()); + this.addAbility(new AttacksTriggeredAbility(new MyrBattlesphereEffect(), true), new CreatureAttackedWhichPlayerWatcher()); } @@ -89,43 +87,6 @@ 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"); @@ -137,7 +98,7 @@ class MyrBattlesphereEffect extends OneShotEffect { public MyrBattlesphereEffect() { super(Outcome.Damage); - 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."; + 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"; } public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) { @@ -148,36 +109,46 @@ class MyrBattlesphereEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - 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 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++; + 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 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; } - } 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 b234a9ff800..e0197858496 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + secondAbility.addTarget(new TargetCreatureOrPlayer()); this.addAbility(secondAbility); } diff --git a/Mage.Sets/src/mage/cards/n/NeedleDrop.java b/Mage.Sets/src/mage/cards/n/NeedleDrop.java index 946cd232be4..c51f788676c 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.FilterCreaturePlayerOrPlaneswalker; +import mage.filter.common.FilterCreatureOrPlayer; import mage.filter.predicate.Predicate; import mage.game.Game; import mage.players.Player; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.DamageDoneWatcher; /** @@ -49,22 +49,21 @@ import mage.watchers.common.DamageDoneWatcher; */ public class NeedleDrop extends CardImpl { - private static final FilterCreaturePlayerOrPlaneswalker FILTER = new FilterCreaturePlayerOrPlaneswalker(); + private static final FilterCreatureOrPlayer FILTER = new FilterCreatureOrPlayer(); 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 any target that was dealt damage this turn. + // Needle Drop deals 1 damage to target creature or player that was dealt damage this turn. Effect effect = new DamageTargetEffect(1); - effect.setText("{this} deals 1 damage to any target that was dealt damage this turn"); + effect.setText("{this} deals 1 damage to target creature or player that was dealt damage this turn"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget(1, 1, FILTER)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(1, 1, FILTER)); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); @@ -74,6 +73,7 @@ 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 4d0412b7b61..c0a91b3b523 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // -4: Nicol Bolas, God-Pharaoh deals 7 damage to target creature or player. ability = new LoyaltyAbility(new DamageTargetEffect(7), -4); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 ddcb0d0ca90..3ed03a08032 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,13 +77,9 @@ 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 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") - ); + ability.addTarget(new TargetPlayer()); + ability.addEffect(new DiscardTargetEffect(7)); + ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NightfireGiant.java b/Mage.Sets/src/mage/cards/n/NightfireGiant.java index 1e3a74cf8d1..9ebb31f9eba 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}{R}: Nightfire Giant deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{4}{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java b/Mage.Sets/src/mage/cards/n/NivMizzetDracogenius.java index ae97dd82a50..83a14dd4036 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {U}{R}: Niv-Mizzet, Dracogenius deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1),new ManaCostsImpl("{U}{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java b/Mage.Sets/src/mage/cards/n/NivMizzetTheFiremind.java index aea62de3b4a..486e8cfd29a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player. Ability ability = new DrawCardControllerTriggeredAbility(new DamageTargetEffect(1), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 f5b711993be..c841127ede9 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -49,7 +49,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java b/Mage.Sets/src/mage/cards/n/NoggleHedgeMage.java index abdebf482ff..43f6313ea08 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 or planeswalker."; + 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."; 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 TargetPlayerOrPlaneswalker()); + ability2.addTarget(new TargetPlayer()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java b/Mage.Sets/src/mage/cards/o/ObeliskOfAlara.java index 384a5b00eaa..a00a3b94b96 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.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 97f1c983213..b20c6446946 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}, Discard a card at random: Ogre Shaman deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new GenericManaCost(2)); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfRage.java index 9f422026a8e..fd60ffb2d6a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -69,9 +69,9 @@ public class OmnathLocusOfRage extends CardImpl { // Landfall - 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 any target. + // Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. Ability ability = new DiesThisOrAnotherCreatureTriggeredAbility(new DamageTargetEffect(3), false, filter); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OpenFire.java b/Mage.Sets/src/mage/cards/o/OpenFire.java index 987f88072c1..d34e1fa456b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Open Fire deals 3 damage to target creature or player. getSpellAbility().addEffect(new DamageTargetEffect(3)); - getSpellAbility().addTarget(new TargetAnyTarget()); + getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 8c0f30dcd5e..4b98ca7b219 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 3 damage to you. + // {tap}: Orcish Artillery 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 b4c5c87b8d8..c6fb4c2b286 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice a creature: Orcish Bloodpainter deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishCannonade.java b/Mage.Sets/src/mage/cards/o/OrcishCannonade.java index 0659bb8b9b5..470bf4cf501 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 3 damage to you. + // Orcish Cannonade deals 2 damage to target creature or player and 3 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 6cf13f0bd1d..f3d727b4987 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 3 damage to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); + // {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()); 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 be1bd9158e2..d7f77bc852c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice an artifact: Orcish Mechanics deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrcishVandal.java b/Mage.Sets/src/mage/cards/o/OrcishVandal.java index 96e9400b6c3..f2612992554 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 9382b1d141f..618ac9b1c06 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // When you sacrifice Ordeal of Purphoros, it deals 3 damage to target creature or player. ability = new SacrificeSourceTriggeredAbility( new DamageTargetEffect(3, "it"),false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java b/Mage.Sets/src/mage/cards/o/OrimSamiteHealer.java index 0f8b6b77edf..ed1e3281ffe 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // {tap}: Prevent the next 3 damage that would be dealt to any target this turn. + // {tap}: Prevent the next 3 damage that would be dealt to target creature or player 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 dfb9875c882..0eb663bcf08 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 4 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 27020d9cd7d..82e21624690 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,21 +47,21 @@ import mage.target.common.TargetAnyTarget; 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 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. + // 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. 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 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()); + 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()); 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 7887d55754a..bb4bfef2da5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target."; + private final static String ruleTrigger2 = "&bull Dragons — Whenever a creature you control leaves the battlefield, {this} deals 1 damage to target creature or player."; 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 any target. + // * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to target creature or player. Ability ability2 = new ConditionalTriggeredAbility( new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null, new DamageTargetEffect(1), new FilterControlledCreaturePermanent(), "", false), new ModeChoiceSourceCondition("Dragons"), ruleTrigger2); - ability2.addTarget(new TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/o/Overblaze.java b/Mage.Sets/src/mage/cards/o/Overblaze.java index 98230d948b2..db7811c296c 100644 --- a/Mage.Sets/src/mage/cards/o/Overblaze.java +++ b/Mage.Sets/src/mage/cards/o/Overblaze.java @@ -49,11 +49,12 @@ 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 OverblazeEffect()); + this.getSpellAbility().addEffect(new FireServantEffect()); this.getSpellAbility().addTarget(new TargetPermanent()); // Splice onto Arcane {2}{R}{R} this.addAbility(new SpliceOntoArcaneAbility("{2}{R}{R}")); @@ -69,27 +70,26 @@ public class Overblaze extends CardImpl { } } -class OverblazeEffect extends ReplacementEffectImpl { +class FireServantEffect extends ReplacementEffectImpl { - public OverblazeEffect() { + public FireServantEffect() { super(Duration.EndOfTurn, Outcome.Damage); - 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."; + 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."; } - public OverblazeEffect(final OverblazeEffect effect) { + public FireServantEffect(final FireServantEffect effect) { super(effect); } @Override - public OverblazeEffect copy() { - return new OverblazeEffect(this); + public FireServantEffect copy() { + return new FireServantEffect(this); } @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_PLANESWALKER; + return event.getType() == GameEvent.EventType.DAMAGE_CREATURE || + event.getType() == GameEvent.EventType.DAMAGE_PLAYER; } @Override diff --git a/Mage.Sets/src/mage/cards/p/Panacea.java b/Mage.Sets/src/mage/cards/p/Panacea.java index 260a564addb..e8b9f02192d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {X}{X}, {tap}: Prevent the next X damage that would be dealt to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Pandemonium.java b/Mage.Sets/src/mage/cards/p/Pandemonium.java index 75b58d14b07..20c2b01668f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target of their choice. + // 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. Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new PandemoniumEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, false, SetTargetPointer.PERMANENT, ""); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target of their choice"; + this.staticText = "that creature's controller may have it deal damage equal to its power to target creature or player 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 f965ee2504d..7d80d42ef99 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target; or Parch deals 4 damage to target blue creature. + // Choose one - Parch deals 2 damage to target creature or player; or Parch deals 4 damage to target blue creature. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 392fb2fb425..e3b268f78da 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // 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." Ability gainedAbility = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - gainedAbility.addTarget(new TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target.\"")); + "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.\"")); 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 86ba2318464..222aa7e53d0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {3}, {tap} or {W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{3}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{W}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PerilousMyr.java b/Mage.Sets/src/mage/cards/p/PerilousMyr.java index 3f8d5a9b62e..196975e2e9a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Perilous Myr dies, it deals 2 damage to target creature or player. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java b/Mage.Sets/src/mage/cards/p/PiaAndKiranNalaar.java index 6acc4d6ba12..e56ee474934 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PillarOfFlame.java b/Mage.Sets/src/mage/cards/p/PillarOfFlame.java index d3e016cd939..a6e32a8b797 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Pillar of Flame deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 ab3d468041d..511d54835e5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -42,12 +42,13 @@ import mage.target.common.TargetAnyTarget; 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 targets"); - this.getSpellAbility().addTarget(new TargetAnyTarget(2, 2)); + effect.setText("{this} deals 3 damage to each of two target creatures and/or players"); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(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 7c0d507060c..e5c723ce6a4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // {tap}: Pirate Ship deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 b7ec0ed3623..a29fcaf59ee 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Pitchburn Devils dies, it deals 3 damage to target creature or player. DiesTriggeredAbility ability = new DiesTriggeredAbility(new DamageTargetEffect(3, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PollenRemedy.java b/Mage.Sets/src/mage/cards/p/PollenRemedy.java index 974dcc94d3f..68f400226e1 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(KickedCondition.instance.apply(game, ability) ? 6 : 3)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 bd66fa87e06..df227e5011e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - gainedAbility.addTarget(new TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, - "Enchanted creature has \"{T}: This creature deals 1 damage to any target.\""))); + "Enchanted creature has \"{T}: This creature deals 1 damage to target creature or player.\""))); } diff --git a/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java b/Mage.Sets/src/mage/cards/p/PreyseizerDragon.java index 99f156a975b..8fb9bf3669f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of +1/+1 counters on Preyseizer Dragon. + // Whenever Preyseizer Dragon attacks, it deals damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java b/Mage.Sets/src/mage/cards/p/ProdigalPyromancer.java index 1f191df767c..525e37b40b7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java b/Mage.Sets/src/mage/cards/p/ProdigalSorcerer.java index 29daf8d1cbd..2c64a8a6c03 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + //{T}: Prodigal Sorcerer deals 1 damage to target creature or player. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProfanePrayers.java b/Mage.Sets/src/mage/cards/p/ProfanePrayers.java index 7a4f6157f52..b201dcb5633 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain X life, where X is the number of Clerics on the battlefield. + // 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. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 fb5de701a87..54733870fe3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 9f15fb07cb3..beb0a382689 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,10 +49,10 @@ public class PsionicBlast extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); - // Psionic Blast deals 4 damage to any target and 2 damage to you. + // Psionic Blast deals 4 damage to target creature or player and 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new PsionicBlastEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 cdf46e77279..105de19b4b2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 3 damage to itself. + // {tap}: Psionic Entity deals 2 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PsionicGift.java b/Mage.Sets/src/mage/cards/p/PsionicGift.java index 75111941f34..e7a452fd5b3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Enchanted creature has "{tap}: This creature deals 1 damage to target creature or player." Ability psiAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - psiAbility.addTarget(new TargetAnyTarget()); + psiAbility.addTarget(new TargetCreatureOrPlayer()); 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 073bd61a010..c5c26851d38 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 3 damage to itself." + // All Sliver creatures have "{T}: This creature deals 2 damage to target creature or player and 3 damage to itself." Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, - new DamageTargetEffect(2).setText("This creature deals 2 damage to any target"), + new DamageTargetEffect(2).setText("This creature deals 2 damage to target creature or player"), new TapSourceCost() ); ability.addEffect(new DamageSelfEffect(3).setText("3 damage to itself.")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility( new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, filter, - "All Sliver creatures have \"{T}: This creature deals 2 damage to any target and 3 damage to itself.\"") + "All Sliver creatures have \"{T}: This creature deals 2 damage to target creature or player 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 257c2a597aa..3e6c3dc46df 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Psychic Purge deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 de60ac9e7e1..e20d330cc6e 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -48,11 +48,11 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new PulseOfTheForgeReturnToHandEffect()); } @@ -84,7 +84,7 @@ class PulseOfTheForgeReturnToHandEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayerOrPlaneswalkerController(source.getControllerId()); + Player controller = game.getPlayer(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 671bb2f7cd4..715e672a61b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 6c093f17f3d..c618ec300d4 100644 --- a/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java +++ b/Mage.Sets/src/mage/cards/p/PunishTheEnemy.java @@ -25,6 +25,7 @@ * 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; @@ -33,21 +34,24 @@ 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 or planeswalker and 3 damage to target creature")); - Target target = new TargetPlayerOrPlaneswalker(); + this.getSpellAbility().addEffect(new DamageTargetEffect(3, true, "target player and 3 damage to target creature")); + Target target = new TargetPlayer(); 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 717eb46bf0c..5bfe721648d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -52,9 +52,9 @@ public class PunishingFire extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Punishing Fire deals 2 damage to any target. + // Punishing Fire deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 1bef108c76d..7dc04411240 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java b/Mage.Sets/src/mage/cards/p/PyriteSpellbomb.java index a9c187bc63d..38dbcb1bc86 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + firstAbility.addTarget(new TargetCreatureOrPlayer()); 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 48681f1456c..f12235bfe6c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever you cast a multicolored spell, Pyroconvergence deals 2 damage to target creature or player. Ability ability = new SpellCastControllerTriggeredAbility(new DamageTargetEffect(2), filter, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PyromancersAssault.java b/Mage.Sets/src/mage/cards/p/PyromancersAssault.java index e3450eb7451..8cd1de94a8a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Whenever you cast your second spell each turn, Pyromancer's Assault deals 2 damage to target creature or player. Ability ability = new PyromancersAssaultTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target."; + return "Whenever you cast your second spell each turn, {this} deals 2 damage to target creature or player."; } } diff --git a/Mage.Sets/src/mage/cards/p/PyromancersSwath.java b/Mage.Sets/src/mage/cards/p/PyromancersSwath.java index dd9f118aa8d..933c587e750 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,27 +72,26 @@ class PyromancersSwathReplacementEffect extends ReplacementEffectImpl { PyromancersSwathReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - 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"; + 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"; } 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 ec0473adf9e..cab7d67280e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the converted mana cost of the discarded card. + // {3}, Discard a card at random: Pyromancy deals damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 c052456abaf..6b68402ed69 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}{R}, Discard a card at random: Pyromania deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // {1}{R}, Sacrifice Pyromania: Pyromania deals 1 damage to any target. + // {1}{R}, Sacrifice Pyromania: Pyromania deals 1 damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Pyromatics.java b/Mage.Sets/src/mage/cards/p/Pyromatics.java index fe456209b9c..8ddbcf552f5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,9 +47,9 @@ public class Pyromatics extends CardImpl { // Replicate {1}{R} this.addAbility(new ReplicateAbility(this, "{1}{R}")); - // Pyromatics deals 1 damage to any target. + // Pyromatics deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/p/Pyrotechnics.java b/Mage.Sets/src/mage/cards/p/Pyrotechnics.java index 3818761604a..0b1a9d5a478 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 b6ec2006f8b..de563d27acc 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 permanent or player this turn, it deals double that damage to that permanent or player instead"; + 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"; } public QuestForPureFlameEffect(final QuestForPureFlameEffect effect) { @@ -127,9 +127,8 @@ class QuestForPureFlameEffect extends ReplacementEffectImpl { @Override public boolean checksEventType(GameEvent event, Game game) { - return event.getType() == EventType.DAMAGE_CREATURE - || event.getType() == EventType.DAMAGE_PLAYER - || event.getType() == EventType.DAMAGE_PLANESWALKER; + return event.getType() == EventType.DAMAGE_CREATURE || + event.getType() == EventType.DAMAGE_PLAYER; } @Override diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java index 89649d2fc2c..b98b816b553 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 TargetPlayerOrPlaneswalker()); + gainAbility.addTarget(new TargetPlayer()); 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 or planeswalker. You draw a card.\"") + "Enchanted creature has \"{T}: This creature deals 1 damage to target player. 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 59485b8bc4d..a4480f5e8a3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target" 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 target creature or player" for as long as you control Quicksmith Rebel. Ability artifactAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - artifactAbility.addTarget(new TargetAnyTarget()); + artifactAbility.addTarget(new TargetCreatureOrPlayer()); ConditionalContinuousEffect effect = new ConditionalContinuousEffect( new GainAbilityTargetEffect(artifactAbility, Duration.Custom), new SourceOnBattlefieldControlUnchangedCondition(), - "target artifact you control gains \"{T}: This artifact deals 2 damage to any target\" for as long as you control {this}"); + "target artifact you control gains \"{T}: This artifact deals 2 damage to target creature or player\" 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 3b69656a5a5..6d3f98edd5e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 any target."; + 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."; } } diff --git a/Mage.Sets/src/mage/cards/r/RageForger.java b/Mage.Sets/src/mage/cards/r/RageForger.java index ef281b100f7..54c4ee18f86 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); - + } public RageForger(final RageForger card) { @@ -96,27 +96,28 @@ 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 or planeswalker"; + this.staticText = "you may have that creature deal 1 damage to target player"; } - + 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 && attackingCreature != null) { - game.damagePlayerOrPlaneswalker(source.getFirstTarget(), 1, attackingCreature.getId(), game, false, true); + if (controller != null && targetPlayer != null && attackingCreature != null) { + targetPlayer.damage(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 12ebc8f1811..0d6ff4948f1 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -44,7 +44,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RagingRegisaur.java b/Mage.Sets/src/mage/cards/r/RagingRegisaur.java index 71498566c77..261813a8642 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Raging Regisaur attacks, it deals 1 damage to target creature or player. Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RaidBombardment.java b/Mage.Sets/src/mage/cards/r/RaidBombardment.java index 589c0c7be15..fc18fc345a7 100644 --- a/Mage.Sets/src/mage/cards/r/RaidBombardment.java +++ b/Mage.Sets/src/mage/cards/r/RaidBombardment.java @@ -47,7 +47,8 @@ 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()); @@ -85,11 +86,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().getDefenderId(attacker.getId()); + UUID defendingPlayerId = game.getCombat().getDefendingPlayerId(attacker.getId(), game); this.getEffects().get(0).setTargetPointer(new FixedTarget(defendingPlayerId)); return true; } @@ -100,7 +101,8 @@ 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 the player or planeswalker that creature is attacking."; + return "Whenever a creature you control with power 2 or less attacks, {this} deals 1 damage to defending player."; } } + diff --git a/Mage.Sets/src/mage/cards/r/RakaDisciple.java b/Mage.Sets/src/mage/cards/r/RakaDisciple.java index 818b99ac75a..db395c495b1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 TargetAnyTarget()); + firstAbility.addTarget(new TargetCreatureOrPlayer()); 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 ea71e2bc950..3023d69b9c7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 ec2ac74be1a..702e001a8bf 100644 --- a/Mage.Sets/src/mage/cards/r/RakdossReturn.java +++ b/Mage.Sets/src/mage/cards/r/RakdossReturn.java @@ -25,24 +25,17 @@ * 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; /** * @@ -50,16 +43,18 @@ import mage.target.targetpointer.FixedTarget; */ 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 RakdossReturnEffect()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addTarget(new TargetOpponent()); } - public RakdossReturn(final RakdossReturn card) { + public RakdossReturn (final RakdossReturn card) { super(card); } @@ -68,37 +63,3 @@ 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 df41e94667e..87f9640f291 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // -2: Ral Zarek deals 3 damage to target creature or player. LoyaltyAbility ability2 = new LoyaltyAbility(new DamageTargetEffect(3), -2); - ability2.addTarget(new TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 24939327bc0..d59a04d3ef1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {4}, {tap}, Sacrifice a land: Rath's Edge deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java index beec2d52db0..685218673c4 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -85,11 +85,7 @@ 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) { @@ -106,7 +102,7 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl { public RavagerOfTheFellsAbility() { super(Zone.BATTLEFIELD, new RavagerOfTheFellsEffect(), false); - Target target1 = new TargetOpponentOrPlaneswalker(); + Target target1 = new TargetOpponent(); this.addTarget(target1); this.addTarget(new RavagerOfTheFellsTarget()); } @@ -138,9 +134,7 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl { @Override public String getRule() { - 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."; + 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."; } } @@ -162,7 +156,10 @@ class RavagerOfTheFellsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 2, source.getSourceId(), game, false, true); + Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); + if (player != null) { + player.damage(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); @@ -184,11 +181,7 @@ class RavagerOfTheFellsTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - UUID firstTarget = player.getId(); + UUID firstTarget = source.getFirstTarget(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -213,13 +206,10 @@ class RavagerOfTheFellsTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - 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); - } + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(playerId)) { + possibleTargets.add(targetId); } } } diff --git a/Mage.Sets/src/mage/cards/r/RazorBoomerang.java b/Mage.Sets/src/mage/cards/r/RazorBoomerang.java index 20fe9169b10..756f0ea0482 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Return Razor Boomerang to its owner's hand." + // 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." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RazorBoomerangEffect(this.getId()), new TapSourceCost()); gainAbility.addCost(new UnattachCost(this.getName(), this.getId())); - gainAbility.addTarget(new TargetAnyTarget()); + gainAbility.addTarget(new TargetCreatureOrPlayer()); 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 any target. Return Razor Boomerang to its owner's hand"; + private static String text = "Razor Boomerang deals 1 damage to target creature or player. 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 1e62683a6ca..d7a3466b972 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RazortipWhip.java b/Mage.Sets/src/mage/cards/r/RazortipWhip.java index d1b201ab8fa..9d392da8d41 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -46,12 +46,12 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java b/Mage.Sets/src/mage/cards/r/RealityHemorrhage.java index f4e52584415..bc8f9af5dde 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,9 +47,9 @@ public class RealityHemorrhage extends CardImpl { // Devoid this.addAbility(new DevoidAbility(this.color)); - // Reality Hemorrhage deals 2 damage to any target. + // Reality Hemorrhage deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 79095c7c5dd..08a1a7b10da 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Reckless Abandon deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 77338105caf..0a75c670f6e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, Pay 2 life: Reckless Assault deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}")); ability.addCost(new PayLifeCost(2)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java b/Mage.Sets/src/mage/cards/r/RecklessEmbermage.java index 7337204d566..b39024d81c6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and 1 damage to itself. + // {1}{R}: Reckless Embermage deals 1 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RedSunsZenith.java b/Mage.Sets/src/mage/cards/r/RedSunsZenith.java index 67d1fc0fdd5..ae8d8ca14d7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Red Sun's Zenith deals X damage to target creature or player. // 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 3dcfdb627b8..1de57ac5a2f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // 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. this.getSpellAbility().addEffect(new RefractionTrapPreventDamageEffect(Duration.EndOfTurn, 3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + 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"; } 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 7d9a9ab336c..c8fde664607 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Rekindled Flame deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 7448783482d..d987d2ba16e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Clash with an opponent. If you win, return Release the Ants to its owner's hand. + // 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. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 87fd0886356..0a9d460f54d 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(5)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 e8cfb2a2956..315b5a02c3a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Repeating Barrage deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 e03c8b1ad36..74d30bb4479 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -48,14 +48,14 @@ public class ResoundingThunder extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - // Resounding Thunder deals 3 damage to any target. + // Resounding Thunder deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target. + // When you cycle Resounding Thunder, it deals 6 damage to target creature or player. Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(6, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java b/Mage.Sets/src/mage/cards/r/RevekaWizardSavant.java index 7ea2852c511..d136ae69c88 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and doesn't untap during your next untap step. + // {tap}: Reveka, Wizard Savant deals 2 damage to target creature or player and doesn't untap during your next untap step. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 03e8371e45c..83d3f35dae1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 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. + // 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. 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 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"); + 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"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 89860eaca4d..6c44f191bd0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -50,14 +50,15 @@ import mage.target.common.TargetAnyTarget; 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 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()); + + // 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()); Effect effect = new ScryEffect(3); - effect.setText("Choose any target. Scry 3"); + effect.setText("Choose target creature or player. Scry 3"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new RiddleOfLightningEffect()); + this.getSpellAbility().addEffect(new RiddleOfLightningEffect()); } public RiddleOfLightning(final RiddleOfLightning card) { @@ -71,21 +72,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 permanent 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 creature 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()); @@ -103,8 +104,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 cb0d541cd41..40c00631e50 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,9 +46,9 @@ public class RiftBolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}"); - // Rift Bolt deals 3 damage to any target. + // Rift Bolt deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 824ac1913d7..16f3cb594c3 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,13 +50,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } public RiteOfConsumption(final RiteOfConsumption card) { @@ -73,7 +74,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 or planeswalker. 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. You gain life equal to the damage dealt this way"; } public RiteOfConsumptionEffect(final RiteOfConsumptionEffect effect) { @@ -87,13 +88,14 @@ 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 (controller != null) { + if (targetPlayer != null && 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; } @@ -102,7 +104,7 @@ class RiteOfConsumptionEffect extends OneShotEffect { if (sacrificedCreature != null) { int damage = sacrificedCreature.getPower().getValue(); if (damage > 0) { - int damageDealt = game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true); + int damageDealt = targetPlayer.damage(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 c4b995cc01f..180d2fff813 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target equal to the number of permanents you control of the chosen type. - TargetAnyTarget target = new TargetAnyTarget(); + // 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(); 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 any target equal to the number of permanents you control of the chosen type."; + 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."; } 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 0241898e809..dfe832e41b3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 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. + // {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. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(2), ControlledTurnCondition.instance); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 be1dbda56fb..e9d5a10847d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RollingThunder.java b/Mage.Sets/src/mage/cards/r/RollingThunder.java index 78a21e7ac85..8f39fb7b803 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(xValue)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 b3528a0b8ac..bf870ea1fa4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java b/Mage.Sets/src/mage/cards/r/RumblingAftershocks.java index 0732874d286..76573a4c555 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of times that spell was kicked. + // 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. Ability ability = new RumblingAftershocksTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target equal to the number of times that spell was kicked"; + this.staticText = "you may have {this} deal damage to target creature or player 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 d428266ff62..cbad26db525 100644 --- a/Mage.Sets/src/mage/cards/r/RushingTideZubera.java +++ b/Mage.Sets/src/mage/cards/r/RushingTideZubera.java @@ -41,6 +41,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,7 +50,7 @@ import mage.game.permanent.Permanent; 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); @@ -57,8 +58,9 @@ 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); } @@ -73,13 +75,12 @@ 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 3486c9ce355..8337fb9361d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); - // {T}: Samite Archer deals 1 damage to any target. + // {T}: Samite Archer deals 1 damage to target creature or player. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SamiteHealer.java b/Mage.Sets/src/mage/cards/s/SamiteHealer.java index 461e6239995..6d0ca020466 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SamutTheTested.java b/Mage.Sets/src/mage/cards/s/SamutTheTested.java index 603a20ff480..697df0fdfcc 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; 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 TargetAnyTargetAmount(2)); + ability.addTarget(new TargetCreatureOrPlayerAmount(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 01317eb1cb6..7446fef12d5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SanctumGuardian.java b/Mage.Sets/src/mage/cards/s/SanctumGuardian.java index aa1e5199533..a7f2611e36f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn, prevent that damage. + // Sacrifice Sanctum Guardian: The next time a source of your choice would deal damage to target creature or player this turn, prevent that damage. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToTargetEffect(Duration.EndOfTurn), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java index 357fb429492..68278b8fec3 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanTheMad.java @@ -49,11 +49,12 @@ 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; /** * @@ -62,7 +63,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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)); @@ -75,7 +76,7 @@ public class SarkhanTheMad extends CardImpl { this.addAbility(sacAbility); Ability damageAbility = new LoyaltyAbility(new SarkhanTheMadDragonDamageEffect(), -4); - damageAbility.addTarget(new TargetPlayerOrPlaneswalker()); + damageAbility.addTarget(new TargetPlayer()); this.addAbility(damageAbility); } @@ -161,7 +162,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 or planeswalker"; + private static final String effectText = "Each Dragon creature you control deals damage equal to its power to target player"; private static final FilterControlledPermanent filter; static { @@ -182,9 +183,10 @@ class SarkhanTheMadDragonDamageEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { List dragons = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - if (dragons != null && !dragons.isEmpty()) { + Player player = game.getPlayer(source.getTargets().getFirstTarget()); + if (player != null && dragons != null && !dragons.isEmpty()) { for (Permanent dragon : dragons) { - game.damagePlayerOrPlaneswalker(source.getFirstTarget(), dragon.getPower().getValue(), dragon.getId(), game, false, true); + player.damage(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 bf0b37f13d1..6a367f05318 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. If you control no Dragons, Sarkhan's Rage deals 2 damage to you. + // Sarkhan's Rage deals 5 damage to target creature or player. If you control no Dragons, Sarkhan's Rage deals 2 damage to you. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 419a57fb5d2..e86ff94fec3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * diff --git a/Mage.Sets/src/mage/cards/s/ScaldingDevil.java b/Mage.Sets/src/mage/cards/s/ScaldingDevil.java index 4176397a5fd..814f97a33d6 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,7 +47,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScaldingTongs.java b/Mage.Sets/src/mage/cards/s/ScaldingTongs.java index d9010281492..b92a962d407 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @author fireshoes @@ -51,13 +51,9 @@ 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); 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 or planeswalker." - )); + 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.")); } 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 f0e94718214..061a8ca69ed 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -57,10 +57,10 @@ public class Scaldkin extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {2}{R}, Sacrifice Scaldkin: Scaldkin deals 2 damage to any target. + // {2}{R}, Sacrifice Scaldkin: Scaldkin deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java b/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java index 804350d75a4..171f263e095 100644 --- a/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java +++ b/Mage.Sets/src/mage/cards/s/ScepterOfEmpires.java @@ -40,7 +40,8 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.players.Player; +import mage.target.TargetPlayer; /** * @author nantuko @@ -48,12 +49,12 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } @@ -71,7 +72,7 @@ class ScepterOfEmpiresEffect extends OneShotEffect { public ScepterOfEmpiresEffect() { super(Outcome.PutCreatureInPlay); - 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"; + 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"; } public ScepterOfEmpiresEffect(ScepterOfEmpiresEffect effect) { @@ -88,12 +89,17 @@ 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; - return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), amount, source.getSourceId(), game, false, true) > 0; + + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player != null) { + player.damage(amount, source.getSourceId(), game, false, true); + return true; + } + return false; } @Override diff --git a/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java b/Mage.Sets/src/mage/cards/s/ScorchedRusalka.java index cbfdcb5d6ae..91e8dad3dab 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ScorchingLava.java b/Mage.Sets/src/mage/cards/s/ScorchingLava.java index 09653d9b662..3ce722d731c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -60,7 +60,7 @@ public class ScorchingLava extends CardImpl { // Kicker {R} this.addAbility(new KickerAbility("{R}")); - // 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. + // 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. 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 b535c54d544..ce756796d5f 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); // 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 77c5bcd165b..14fd6eec6d9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Scorching Spear deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 e108894cfc3..afb92c7a530 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, 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 target creature or player, 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 any target, 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 target creature or player, 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 a722f442c8f..37fd4d66926 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 39f59ba37ff..3cc12b78430 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SealOfFire.java b/Mage.Sets/src/mage/cards/s/SealOfFire.java index dbd0072b291..df8d782d448 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice Seal of Fire: Seal of Fire deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SearingBlaze.java b/Mage.Sets/src/mage/cards/s/SearingBlaze.java index e8639acc0f3..d06a022faef 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 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."; + 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"; } public SearingBlazeEffect(final SearingBlazeEffect effect) { @@ -94,12 +94,15 @@ 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; } - game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), damage, source.getSourceId(), game, false, true); + if (player != null) { + player.damage(damage, source.getSourceId(), game, false, true); + } if (creature != null) { creature.damage(damage, source.getSourceId(), game, false, true); } @@ -120,11 +123,7 @@ class SearingBlazeTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - UUID firstTarget = player.getId(); + UUID firstTarget = source.getFirstTarget(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -139,13 +138,10 @@ class SearingBlazeTarget extends TargetPermanent { MageObject object = game.getObject(sourceId); if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - 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); - } + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(playerId)) { + possibleTargets.add(targetId); } } } diff --git a/Mage.Sets/src/mage/cards/s/SearingFlesh.java b/Mage.Sets/src/mage/cards/s/SearingFlesh.java index da133c7c67f..e1ad9e9fa92 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -41,10 +41,10 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); 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 030c2788f7c..527fa2773e5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever you gain life, you may pay {2}. If you do, Searing Meditation deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SearingSpear.java b/Mage.Sets/src/mage/cards/s/SearingSpear.java index fbb4e1659ba..b0388494762 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,9 +44,9 @@ public class SearingSpear extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); - // Searing Spear deals 3 damage to any target. + // Searing Spear deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 0c15e6aef0b..68de383ca2b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Searing Touch deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 076fddb6f8c..e229cb49928 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,8 +44,8 @@ public class SearingWind extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{8}{R}"); - // Searing Wind deals 10 damage to any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Searing Wind deals 10 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 7bb6d4bbe6c..39b3a16e9e4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Discard a land card: Seismic Assault deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new DiscardTargetCost(new TargetCardInHand(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SerraPaladin.java b/Mage.Sets/src/mage/cards/s/SerraPaladin.java index 7d368057428..c38acc4838f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target this turn. + // {tap}: Prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 e8ba413383b..b8cced52101 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -63,11 +63,11 @@ public class ShadowGuildmage extends CardImpl { ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); - // {R}, {tap}: Shadow Guildmage deals 1 damage to any target and 1 damage to you. + // {R}, {tap}: Shadow Guildmage deals 1 damage to target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ShardVolley.java b/Mage.Sets/src/mage/cards/s/ShardVolley.java index 33451a4061a..b90caff89a8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Shard Volley deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 627d7fe9f73..875e88cfff7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target 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 target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target this turn by a source of your choice"; + staticText = "Prevent all damage that would be dealt to target creature or player 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 072661adb7d..2b2d6226d6e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,7 +46,7 @@ public class ShieldmatesBlessing extends CardImpl { this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 ec4ec339197..84dc870b364 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player instead. this.getSpellAbility().addEffect(new ShiningShoalRedirectDamageTargetEffect(Duration.EndOfTurn, new ExileFromHandCostCardConvertedMana())); this.getSpellAbility().addTarget(new TargetSource()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target 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 target creature or player 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 da76aa6569b..bbb4778f1ea 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 any target. If Shivan Fire was kicked, it deals 4 damage to that creature or player instead. + // 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. 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 ff5736e6313..ec26f2d23bb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Shock.java b/Mage.Sets/src/mage/cards/s/Shock.java index a4795b4c3f9..83f5aa3ee6d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 6ef48b6abb2..035db5e4e34 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice Shock Troops: Shock Troops deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java b/Mage.Sets/src/mage/cards/s/ShowerOfCoals.java index b66e2159ca2..9901f54c985 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -44,17 +44,19 @@ import mage.target.common.TargetAnyTarget; 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 targets.

Threshold - {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)); + 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.

Threshold - {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)); 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 4be51a128b1..e7ad5a3593d 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,7 +44,8 @@ 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)); @@ -54,7 +55,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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } 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 d8e77f6a0b9..1e565759bb1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 7cffbbeaacc..f47b27bd07d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java b/Mage.Sets/src/mage/cards/s/SiegeGangCommander.java index 2bdd8d323ab..4e92042a52d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SithMarauder.java b/Mage.Sets/src/mage/cards/s/SithMarauder.java index 5261b8ff0f7..d4dc48ef016 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** @@ -54,12 +54,12 @@ public class SithMarauder extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(4); - // Hate — When Sith Marauder enters the battlefield, if an opponent lost life from a source other than combat damage this turn, Sith Marauder deals 3 damage to any target. + // Hate — When Sith Marauder enters the battlefield, if an opponent lost life from a source other than combat damage this turn, Sith Marauder deals 3 damage to target creature or player. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3)), HateCondition.instance, - "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to any target"); - ability.addTarget(new TargetAnyTarget()); + "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to target creature or player"); + ability.addTarget(new TargetCreatureOrPlayer()); 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 484d0df0212..27665e9a077 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, Sacrifice Skarrgan Skybreaker: Skarrgan Skybreaker deals damage equal to its power to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkirkMarauder.java b/Mage.Sets/src/mage/cards/s/SkirkMarauder.java index 91387e3b983..3e1506a866b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Skirk Marauder is turned face up, it deals 2 damage to target creature or player. Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageTargetEffect(2, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java b/Mage.Sets/src/mage/cards/s/SkirsdagCultist.java index eb403f45af3..84b9e297c2a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // {R}, {T}, Sacrifice a creature: Skirsdag Cultist deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SkullCatapult.java b/Mage.Sets/src/mage/cards/s/SkullCatapult.java index 8b297881605..d77aa3440c5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {1}, {tap}, Sacrifice a creature: Skull Catapult deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Skullcrack.java b/Mage.Sets/src/mage/cards/s/Skullcrack.java index 8f33a8ae580..0f2652fda00 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -43,14 +43,15 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -59,7 +60,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 6e2344977f3..7ba8d82ce15 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -48,14 +48,14 @@ public class SolarBlast extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - // Solar Blast deals 3 damage to any target. + // Solar Blast deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target. + // When you cycle Solar Blast, you may have it deal 1 damage to target creature or player. Ability ability = new CycleTriggeredAbility(new DamageTargetEffect(1), true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SonicBurst.java b/Mage.Sets/src/mage/cards/s/SonicBurst.java index 5b25b5e17e6..2e604f7c264 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sonic Burst deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 21725bfa71a..0bcb16e7bcb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sonic Seizure deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 d6adb50b89d..9865669c3e7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target and you gain 2 life. + // +2: Sorin Markov deals 2 damage to target creature or player and you gain 2 life. LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(2), 2); ability1.addEffect(new GainLifeEffect(2)); - ability1.addTarget(new TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); 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 3a3e4194d73..75f2ada2d93 100644 --- a/Mage.Sets/src/mage/cards/s/SorinsVengeance.java +++ b/Mage.Sets/src/mage/cards/s/SorinsVengeance.java @@ -25,6 +25,7 @@ * 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; @@ -33,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.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -41,15 +42,15 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } - 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 0e27a8a9a7a..aeb3aecdb1a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 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()); + // 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()); 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 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."; + 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."; } 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 8d5f50803ea..25e3d4e8fba 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author noxx @@ -58,7 +58,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); ability.addTarget(new SoulOfShandalarTarget()); this.addAbility(ability); } @@ -95,8 +95,7 @@ class SoulOfShandalarEffect extends OneShotEffect { public SoulOfShandalarEffect() { super(Outcome.Damage); - 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"; + staticText = "Soul of Shandalar deals 3 damage to target player and 3 damage to up to one target creature that player controls"; } public SoulOfShandalarEffect(final SoulOfShandalarEffect effect) { @@ -110,7 +109,10 @@ class SoulOfShandalarEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - game.damagePlayerOrPlaneswalker(source.getTargets().get(0).getFirstTarget(), 3, source.getSourceId(), game, false, true); + Player player = game.getPlayer(source.getTargets().get(0).getFirstTarget()); + if (player != null) { + player.damage(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); @@ -122,7 +124,7 @@ class SoulOfShandalarEffect extends OneShotEffect { class SoulOfShandalarTarget extends TargetPermanent { public SoulOfShandalarTarget() { - super(0, 1, new FilterCreaturePermanent("creature that the targeted player or planeswalker's controller controls"), false); + super(0, 1, new FilterCreaturePermanent("creature that the targeted player controls"), false); } public SoulOfShandalarTarget(final SoulOfShandalarTarget target) { @@ -131,11 +133,7 @@ class SoulOfShandalarTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - UUID firstTarget = player.getId(); + UUID firstTarget = source.getFirstTarget(); Permanent permanent = game.getPermanent(id); if (firstTarget != null && permanent != null && permanent.getControllerId().equals(firstTarget)) { return super.canTarget(id, source, game); @@ -160,13 +158,10 @@ class SoulOfShandalarTarget extends TargetPermanent { if (object instanceof StackObject) { UUID playerId = ((StackObject) object).getStackAbility().getFirstTarget(); - 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); - } + for (UUID targetId : availablePossibleTargets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null && permanent.getControllerId().equals(playerId)) { + possibleTargets.add(targetId); } } } diff --git a/Mage.Sets/src/mage/cards/s/SoulSpike.java b/Mage.Sets/src/mage/cards/s/SoulSpike.java index b42d060de7e..51e89bb1177 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain 4 life. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Soul Spike deals 4 damage to target creature or player and you gain 4 life. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 d2709169cb4..c6391096b60 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the total power of the sacrificed creatures. + // Soulblast deals damage to target creature or player equal to the total power of the sacrificed creatures. this.getSpellAbility().addEffect(new SoulblastEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public Soulblast(final Soulblast card) { @@ -73,7 +73,7 @@ class SoulblastEffect extends OneShotEffect { public SoulblastEffect() { super(Outcome.Benefit); - this.staticText = "Soulblast deals damage to any target equal to the total power of the sacrificed creatures"; + this.staticText = "Soulblast deals damage to target creature or player 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 4208809bd57..470e0d52682 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Target creature you control on the battlefield deals damage equal to its power to target creature or player. this.getSpellAbility().addEffect(new SoulsFireEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + this.staticText = "Target creature you control on the battlefield deals damage equal to its power to target creature or player"; } 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 e5fa551abeb..d0e3ddd3028 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,9 +45,9 @@ public class SparkJolt extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Spark Jolt deals 1 damage to any target. Scry 1. + // Spark Jolt deals 1 damage to target creature or player. Scry 1. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 1413487f9a7..f2064d2b80d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -46,9 +46,9 @@ public class SparkSpray extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); - // Spark Spray deals 1 damage to any target. + // Spark Spray deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 a3fccb0ccc0..a55b95df7d4 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * * @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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java b/Mage.Sets/src/mage/cards/s/SparkmageApprentice.java index 6f932057d29..7835ff49f6d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java b/Mage.Sets/src/mage/cards/s/SpawnOfThraxes.java index 498a8c80966..aa6988b29b1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of Mountains you control. + // When Spawn of Thraxes enters the battlefield, it deals damage to target creature or player equal to the number of Mountains you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SpawningBreath.java b/Mage.Sets/src/mage/cards/s/SpawningBreath.java index b18a58e5722..9b4d5dd0a1a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,7 +47,7 @@ public class SpawningBreath extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 22e38436c9e..6bbcfbeb8f9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new SphinxBoneWandEffect(), filter, true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + 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"; } 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 820072c8a01..e5ae655fa8d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "{this} deals damage equal to its power to target creature or player"; } 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 e60040e3729..5e4a258f1cb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {R}, {tap}: Spikeshot Goblin deals damage equal to its power to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SpikeshotGoblinEffect(), new ColoredManaCost(ColoredManaSymbol.R)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target"; + staticText = "{this} deals damage equal to its power to target creature or player"; } 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 6ed7061b50c..64795d497a4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -48,11 +48,11 @@ public class SpiralingEmbers extends CardImpl { this.subtype.add(SubType.ARCANE); - // Spiraling Embers deals damage to any target equal to the number of cards in your hand. + // Spiraling Embers deals damage to target creature or player equal to the number of cards in your hand. Effect effect = new DamageTargetEffect(new CardsInControllerHandCount()); - effect.setText("{this} deals damage to any target equal to the number of cards in your hand."); + effect.setText("{this} deals damage to target creature or player equal to the number of cards in your hand."); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 db3d98eeec8..a560b58397c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target equal to the number of Mountains you control. + // Spire Barrage deals damage to target creature or player equal to the number of Mountains you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 c94dc3d457e..7940ac1172d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever Spitemare is dealt damage, it deals that much damage to target creature or player. Ability ability = new SpitemareTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -114,7 +114,7 @@ class SpitemareEffect extends OneShotEffect { public SpitemareEffect() { super(Outcome.Damage); - staticText = "it deals that much damage to any target"; + staticText = "it deals that much damage to target creature or player"; } 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 052e259545a..a5040843d02 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}{R}, {T}: Spitfire Bastion deals 3 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{2}{R}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SplitTailMiko.java b/Mage.Sets/src/mage/cards/s/SplitTailMiko.java index 258402dd14c..2308d168d3a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ColoredManaCost(ColoredManaSymbol.W)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StaffOfNin.java b/Mage.Sets/src/mage/cards/s/StaffOfNin.java index 63876dd4da8..459e0f94521 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Staff of Nin deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/Staggershock.java b/Mage.Sets/src/mage/cards/s/Staggershock.java index d6ed11d0cad..97ac4b3bdd4 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 be18c155efb..74ae405cf6d 100644 --- a/Mage.Sets/src/mage/cards/s/StalkingVengeance.java +++ b/Mage.Sets/src/mage/cards/s/StalkingVengeance.java @@ -45,7 +45,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.players.Player; +import mage.target.TargetPlayer; /** * @@ -54,14 +55,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 or planeswalker"; + this.staticText = "it deals damage equal to its power to target player"; } public StalkingVengeanceDamageEffect(final StalkingVengeanceDamageEffect effect) { @@ -103,10 +103,13 @@ class StalkingVengeanceDamageEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - 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; + 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; + } } return false; } diff --git a/Mage.Sets/src/mage/cards/s/StarDestroyer.java b/Mage.Sets/src/mage/cards/s/StarDestroyer.java index 224bd3b7146..9c51ba69079 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 4097f645b0a..825277da262 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // When Steamcore Weird enters the battlefield, if {R} was spent to cast Steamcore Weird, it deals 2 damage to target creature or player. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new ConditionalTriggeredAbility(ability, new ManaWasSpentCondition(ColoredManaSymbol.R), - "if {R} was spent to cast {this}, it deals 2 damage to any target."), + "if {R} was spent to cast {this}, it deals 2 damage to target creature or player."), new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/StensiaBanquet.java b/Mage.Sets/src/mage/cards/s/StensiaBanquet.java index fe211c3d5ec..03cf4b586a5 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 or planeswalker equal to the number of Vampires you control"); + effect.setText("{this} deals damage to target opponent equal to the number of Vampires you control"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); // 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 307256fc4ab..55963b48879 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @author nantuko @@ -46,7 +46,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StingingBarrier.java b/Mage.Sets/src/mage/cards/s/StingingBarrier.java index dad35fbee3a..b281444e16b 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -55,10 +55,10 @@ public class StingingBarrier extends CardImpl { // Defender this.addAbility(DefenderAbility.getInstance()); - // {U}, {tap}: Stinging Barrier deals 1 damage to any target. + // {U}, {tap}: Stinging Barrier deals 1 damage to target creature or player. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StokeTheFlames.java b/Mage.Sets/src/mage/cards/s/StokeTheFlames.java index 77c4044f4a9..a14eda5fe6e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -48,9 +48,9 @@ public class StokeTheFlames extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); - // Stoke the Flames deals 4 damage to any target. + // Stoke the Flames deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 261d1ab9bea..3ba4be7bd79 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -42,12 +42,12 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); } 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 2a77c5d1618..e40c8764955 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // 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. this.getSpellAbility().addEffect(new StompingSlabsEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 any target"; + 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"; } 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 08163b6bea5..471c04af6c1 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // 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. Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.instance, - "Raid — When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to any target."); - ability.addTarget(new TargetAnyTarget()); + "Raid — 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()); 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 22f938de26c..b6f07d1996f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {2}, Discard a card at random: Stormbind deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}")); ability.addCost(new DiscardCardCost(true)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SuddenShock.java b/Mage.Sets/src/mage/cards/s/SuddenShock.java index 4fe84f90cac..43802443065 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,9 +47,9 @@ public class SuddenShock extends CardImpl { // Split second this.addAbility(new SplitSecondAbility()); - // Sudden Shock deals 2 damage to any target. + // Sudden Shock deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2, true)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 4b268bd08b9..a433bbd376a 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SunfireBalm.java b/Mage.Sets/src/mage/cards/s/SunfireBalm.java index 459410c1e9f..8d2818cee36 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 4 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target this turn. + // When you cycle Sunfire Balm, you may prevent the next 1 damage that would be dealt to target creature or player this turn. Ability ability = new CycleTriggeredAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1), true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SunflareShaman.java b/Mage.Sets/src/mage/cards/s/SunflareShaman.java index 86b396037ec..11e58a48f31 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -89,7 +89,7 @@ class SunflareShamanEffect extends OneShotEffect { public SunflareShamanEffect() { super(Outcome.Damage); - 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"; + 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"; } 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 7e364e2dbb0..400ac298ad8 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 f8df4da88ea..b193dabb4ed 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + //{T}: Suq'Ata Firewalker deals 1 damage to target creature or player. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java b/Mage.Sets/src/mage/cards/s/SurestrikeTrident.java index ebf82c74d24..1b039ef3834 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -57,16 +57,16 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 or planeswalker"); + effect.setText("This creature deals damage equal to its power to target player"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - gainedAbility.addTarget(new TargetPlayerOrPlaneswalker()); + gainedAbility.addTarget(new TargetPlayer()); 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 3efb4febaeb..2a7b218a354 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -47,9 +47,9 @@ public class SurgingFlame extends CardImpl { // Ripple 4 this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); - // Surging Flame deals 2 damage to any target. + // Surging Flame deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 817d541195f..3eacc76f7a3 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Prevent the next 2 damage that would be dealt to target creature or player this turn. this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, 2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 d03508ec300..2e137ff4240 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target and you draw a card. + // 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. 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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 any target and you draw a card."; + return "Whenever equipped creature deals combat damage to a player, {this} deals 2 damage to target creature or player 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 2c6cea0f137..9e7acafb154 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, 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 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. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } @@ -89,7 +89,7 @@ class SwordOfTheAgesEffect extends OneShotEffect { public SwordOfTheAgesEffect() { super(Outcome.Damage); - 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"; + 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"; } 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 b4c1df248e1..f9ddad33770 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {X}, {T}, Remove X charge counters from Talon of Pain: Talon of Pain deals X damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TarPitcher.java b/Mage.Sets/src/mage/cards/t/TarPitcher.java index 786960d578d..29e9c45c0ff 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}, Sacrifice a Goblin: Tar Pitcher deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/Tarfire.java b/Mage.Sets/src/mage/cards/t/Tarfire.java index 2a9d910aba9..335c40c25e2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Tarfire deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 9d1f9695642..dfd3a455f87 100644 --- a/Mage.Sets/src/mage/cards/t/TasteOfBlood.java +++ b/Mage.Sets/src/mage/cards/t/TasteOfBlood.java @@ -25,6 +25,7 @@ * 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; @@ -33,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.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -41,15 +42,15 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); } - 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 10858962e95..ec53e473035 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -46,12 +46,12 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TheFallen.java b/Mage.Sets/src/mage/cards/t/TheFallen.java index 9bc74459422..ab009381c6d 100644 --- a/Mage.Sets/src/mage/cards/t/TheFallen.java +++ b/Mage.Sets/src/mage/cards/t/TheFallen.java @@ -42,6 +42,7 @@ 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; /** @@ -51,7 +52,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); @@ -74,7 +75,7 @@ class TheFallenEffect extends OneShotEffect { public TheFallenEffect() { super(Outcome.Damage); - this.staticText = "{this} deals 1 damage to each opponent or planeswalker it has dealt damage to this game"; + this.staticText = "{this} deals 1 damage to each opponent it has dealt damage to this game"; } public TheFallenEffect(final TheFallenEffect effect) { @@ -89,10 +90,13 @@ 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.getPlayersAndWalkersDealtDamageThisGame(source.getSourceId()) != null) { - for (UUID playerId : watcher.getPlayersAndWalkersDealtDamageThisGame(source.getSourceId())) { + if (watcher != null && watcher.getPlayerDealtDamageThisGame(source.getSourceId()) != null) { + for (UUID playerId : watcher.getPlayerDealtDamageThisGame(source.getSourceId())) { if (!source.getControllerId().equals(playerId)) { - game.damagePlayerOrPlaneswalker(playerId, 1, source.getSourceId(), game, false, true); + Player player = game.getPlayer(playerId); + if (player != null) { + player.damage(1, source.getSourceId(), game, false, true); + } } } return true; @@ -103,7 +107,7 @@ class TheFallenEffect extends OneShotEffect { class TheFallenWatcher extends Watcher { - private Map> playersAndWalkersDealtDamageThisGame = new HashMap<>(); // Map> + private Map> playersDealtDamageThisGame = new HashMap<>(); // Map> public TheFallenWatcher() { super(TheFallenWatcher.class.getSimpleName(), WatcherScope.GAME); @@ -111,29 +115,28 @@ class TheFallenWatcher extends Watcher { public TheFallenWatcher(final TheFallenWatcher watcher) { super(watcher); - playersAndWalkersDealtDamageThisGame = new HashMap<>(watcher.playersAndWalkersDealtDamageThisGame); + playersDealtDamageThisGame = new HashMap<>(watcher.playersDealtDamageThisGame); } @Override public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); if (permanent != null) { Set toAdd; - if (playersAndWalkersDealtDamageThisGame.get(event.getSourceId()) == null) { + if (playersDealtDamageThisGame.get(event.getSourceId()) == null) { toAdd = new HashSet<>(); } else { - toAdd = playersAndWalkersDealtDamageThisGame.get(event.getSourceId()); + toAdd = playersDealtDamageThisGame.get(event.getSourceId()); } toAdd.add(event.getPlayerId()); - playersAndWalkersDealtDamageThisGame.put(event.getSourceId(), toAdd); + playersDealtDamageThisGame.put(event.getSourceId(), toAdd); } } } - public Set getPlayersAndWalkersDealtDamageThisGame(UUID creatureId) { - return playersAndWalkersDealtDamageThisGame.get(creatureId); + public Set getPlayerDealtDamageThisGame(UUID creatureId) { + return playersDealtDamageThisGame.get(creatureId); } @Override diff --git a/Mage.Sets/src/mage/cards/t/ThornThallid.java b/Mage.Sets/src/mage/cards/t/ThornThallid.java index 07321b63a83..7a6c9ee6cbc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Remove three spore counters from Thorn Thallid: Thorn Thallid deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java b/Mage.Sets/src/mage/cards/t/ThornbiteStaff.java index cd1c5bde21c..fe5f2b88279 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target" and "Whenever a creature dies, untap this creature." + // Equipped creature has "{2}, {T}: This creature deals 1 damage to target creature or player" 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 TargetAnyTarget()); + gainedAbility.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT); - effect.setText("Equipped creature has \"{2}, {T}: This creature deals 1 damage to any target\""); + effect.setText("Equipped creature has \"{2}, {T}: This creature deals 1 damage to target creature or player\""); 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 de3e841aa5f..f3dd09dbfed 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target." + // Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to target creature or player." Ability ability = new AttacksTriggeredAbility(new DamageTargetEffect(1, "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""))); + .setText("Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to target creature or player.\""))); } 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 82de3710e29..ba25667c34c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When {this} enters the battlefield, if it was kicked with its {R} kicker, it deals 2 damage to target creature or player. TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")); - ability1.addTarget(new TargetAnyTarget()); + ability1.addTarget(new TargetCreatureOrPlayer()); 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 any target.")); + "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 {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 ca31923e2c1..e36c84270c6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -56,9 +56,9 @@ public class ThornwindFaeries extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // {tap}: Thornwind Faeries deals 1 damage to any target. + // {tap}: Thornwind Faeries deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThrowingKnife.java b/Mage.Sets/src/mage/cards/t/ThrowingKnife.java index 825fbd164c5..2bf4ca5f6ef 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever equipped creature attacks, you may sacrifice Throwing Knife. If you do, Throwing Knife deals 2 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 c8f89fe0cdb..28ec26b4cfa 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -48,18 +48,14 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); 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 or planeswalker." - )); + 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.")); } 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 73f3e813c30..658c9920ecd 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Thunderblade Charge deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 b88a01815d1..502f96d0db3 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,11 +52,12 @@ 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 f2757f79c4e..a34d17e23aa 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Thunderous Wrath deals 5 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(5)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 4bb74237cc6..e7699c17e4e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Sacrifice Ticking Gnomes: Ticking Gnomes deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java b/Mage.Sets/src/mage/cards/t/TitanOfEternalFire.java index 5a64bd8e182..3d7fde8cef5 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Each Human creature you control has "{R}, {T}: This creature deals 1 damage to target creature or player." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target.\""); + effect.setText("Each Human creature you control has \"{R}, {T}: This creature deals 1 damage to target creature or player.\""); 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 e313aa1a03b..4087f7d6bf9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Clash with an opponent. If you win, return Titan's Revenge to its owner's hand. + // 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. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 95c817566d2..d6a19c2a46d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, where X is the number of verse counters on Torch Song. + // {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. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new DamageTargetEffect(new CountersSourceCount(CounterType.VERSE)), new ManaCostsImpl("{2}{R}") ); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java index b2ad280f6c0..6f6501f595a 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue()) - .setText("{this} deals damage to any target equal to the highest converted mana cost among permanents you control.") + .setText("{this} deals damage to target creature or player equal to the highest converted mana cost among permanents you control.") ); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 21b6070cd36..1c3e0668374 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -45,13 +45,13 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetPlayer()); 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 b15b16dc172..e8902478111 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. If a creature dealt damage this way would die this turn, exile it instead. + // 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. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 98261c82edf..0218d22751d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // {2}{W}, {tap}: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new ManaCostsImpl("{2}{W}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TrialOfZeal.java b/Mage.Sets/src/mage/cards/t/TrialOfZeal.java index 876d86e3be3..f699fff7263 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Trial of Zeal enters the battlefield, it deals 3 damage to target creature or player. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3, "it")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 cc9726954db..63d5fc3123d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target, where X is the number of basic land types among lands you control. + // Domain - Tribal Flames deals X damage to target creature or player, where X is the number of basic land types among lands you control. this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 69c4cd860f9..b0d4434443c 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 any target." + // {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." 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 7fc7fbce727..c4a08429294 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Remove a +1/+1 counter from Triskelion: Triskelion deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TroubledHealer.java b/Mage.Sets/src/mage/cards/t/TroubledHealer.java index 189b86ad56c..734c5b38ed0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target this turn. + // Sacrifice a land: Prevent the next 2 damage that would be dealt to target creature or player this turn. Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn, 2), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("land")))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TurnBurn.java b/Mage.Sets/src/mage/cards/t/TurnBurn.java index eb89d5ef0a0..6409e7061f6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Burn deals 2 damage to target creature or player. effect = new DamageTargetEffect(2); - effect.setText("Burn deals 2 damage to any target"); + effect.setText("Burn deals 2 damage to target creature or player"); getRightHalfCard().getSpellAbility().addEffect(effect); - getRightHalfCard().getSpellAbility().addTarget(new TargetAnyTarget()); + getRightHalfCard().getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/t/TwinBolt.java b/Mage.Sets/src/mage/cards/t/TwinBolt.java index cfa3760ec22..fcdf804e525 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(2)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java b/Mage.Sets/src/mage/cards/t/TymaretTheMurderKing.java index 630a3f46a5e..89cecce0870 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 8b429fe8dc6..056bda04cdf 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to target creature or player. EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(new ConditionalTriggeredAbility(ability, SurgedCondition.instance, - "When {this} enters the battlefield, if its surge cost was paid, it deals 3 damage to any target.")); + "When {this} enters the battlefield, if its surge cost was paid, it deals 3 damage to target creature or player.")); } 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 f716266b9cb..b0b1bf62ee2 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -70,9 +70,9 @@ public class UginTheSpiritDragon extends CardImpl { this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(7)); - // +2: Ugin, the Spirit Dragon deals 3 damage to any target. + // +2: Ugin, the Spirit Dragon deals 3 damage to target creature or player. LoyaltyAbility ability = new LoyaltyAbility(new DamageTargetEffect(3), 2); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 69508a43672..0fdb37c9958 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target 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 target creature or player equal to that card's converted mana cost. this.getSpellAbility().addEffect(new UndyingFlamesEffect()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 any target 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 target creature or player 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 e17f6bb90c5..6026d6d5798 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + // Unfriendly Fire deals 4 damage to target creature or player. + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 33abbc4717d..18717b2b9dc 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -52,7 +52,7 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 spell was kicked, it deals 5 damage to target player or planeswalker")); + "If {this} was kicked, it deals 5 damage to target player")); } @@ -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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); } } } @@ -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 7c7754e5b08..d2755a77bc8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Unyaro Bee Sting deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 6287ce12130..0f1f58ae3a0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {3}{G}, Sacrifice Unyaro Bees: Unyaro Bees deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{G}")); ability.addCost(new SacrificeSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasRage.java b/Mage.Sets/src/mage/cards/u/UrzasRage.java index 911b5d236e5..fadef48a425 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -49,7 +49,7 @@ import mage.target.common.TargetAnyTarget; 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 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. + // 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. this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new DamageTargetEffect(10, false), new DamageTargetEffect(3), KickedCondition.instance, - "{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()); + "{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()); } 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 73af292d614..19dd41cc379 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {8}: Valakut Invoker deals 3 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new GenericManaCost(8)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java b/Mage.Sets/src/mage/cards/v/ValakutTheMoltenPinnacle.java index 4f3a1c3d289..e4d1e5f3014 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // 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. 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 TargetAnyTarget()); + this.addTarget(new TargetCreatureOrPlayer()); } 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 any target."; + 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."; } } diff --git a/Mage.Sets/src/mage/cards/v/VampiricFeast.java b/Mage.Sets/src/mage/cards/v/VampiricFeast.java index 484ed2bdf76..47945ad6211 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain 4 life. + // Vampiric Feast deals 4 damage to target creature or player and you gain 4 life. Effect effect = new DamageTargetEffect(4); - effect.setText("{this} deals 4 damage to any target"); + effect.setText("{this} deals 4 damage to target creature or player"); 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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 17b9c64af7e..a4abbeea602 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -43,16 +43,16 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 or planeswalker"); + effect.setText("{this} deals 2 damage to target opponent"); this.getSpellAbility().addEffect(effect); effect = new GainLifeEffect(2); effect.setText("and you gain 2 life"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetOpponentOrPlaneswalker()); + this.getSpellAbility().addTarget(new TargetOpponent()); } 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 1b2ef7c9cff..79bcf63e488 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulArchon.java +++ b/Mage.Sets/src/mage/cards/v/VengefulArchon.java @@ -44,7 +44,8 @@ import mage.constants.Duration; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.players.Player; +import mage.target.TargetPlayer; /** * @@ -64,7 +65,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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } @@ -83,7 +84,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 or planeswalker"; + 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"; } public VengefulArchonEffect(final VengefulArchonEffect effect) { @@ -100,7 +101,10 @@ class VengefulArchonEffect extends PreventDamageToControllerEffect { PreventionEffectData preventionEffectData = super.preventDamageAction(event, source, game); int damage = preventionEffectData.getPreventedDamage(); if (damage > 0) { - game.damagePlayerOrPlaneswalker(source.getFirstTarget(), damage, source.getSourceId(), game, false, true); + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(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 abf6e02dff0..f3ca17c7eb8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target + // 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 this.getSpellAbility().addTarget(new TargetCardInYourGraveyard()); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 any target"; + 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"; } 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 35ed362c63e..a52f34adeef 100644 --- a/Mage.Sets/src/mage/cards/v/VentSentinel.java +++ b/Mage.Sets/src/mage/cards/v/VentSentinel.java @@ -42,22 +42,20 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * * @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); @@ -66,7 +64,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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java index 0835369de4f..1519c59b8b3 100644 --- a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java +++ b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java @@ -43,14 +43,10 @@ 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; @@ -123,8 +119,7 @@ class VialSmasherTheFierceTriggeredAbility extends SpellCastControllerTriggeredA @Override public String getRule() { - 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"; + 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."; } } @@ -132,7 +127,7 @@ class VialSmasherTheFierceEffect extends OneShotEffect { public VialSmasherTheFierceEffect() { super(Outcome.Damage); - 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"; + this.staticText = "{this} deals damage equal to that spell's converted mana cost to an opponent chosen at random"; } public VialSmasherTheFierceEffect(final VialSmasherTheFierceEffect effect) { @@ -160,19 +155,6 @@ 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 be499dd5230..5ef4ad3e26e 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Viashino Fangtail deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VigilanteJustice.java b/Mage.Sets/src/mage/cards/v/VigilanteJustice.java index 1d0dab6b2b2..809a3c310f6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a Human enters the battlefield under your control, Vigilante Justice deals 1 damage to target creature or player. Ability ability = new CreatureEntersBattlefieldTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), filter, false, false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ViolentEruption.java b/Mage.Sets/src/mage/cards/v/ViolentEruption.java index 24eb98c89be..3c4f87ca809 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 25f3396e8fd..2891ff0c7a0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target." + // Equipped creature has "{tap}: This creature deals 1 damage to target creature or player." Effect effect = new DamageTargetEffect(1); - effect.setText("This creature deals 1 damage to any target"); + effect.setText("This creature deals 1 damage to target creature or player"); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 e6567d9ece1..989d74ba14d 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Vithian Stinger deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 f08a3954ebc..01575804852 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Volcanic Geyser deals X damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 fde1dbc0ed7..41f15594102 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @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 any target. + // Volcanic Hammer deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } 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 174b2517b70..550c42363e1 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,14 +47,14 @@ import mage.target.common.TargetPlayerOrPlaneswalker; 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java b/Mage.Sets/src/mage/cards/v/VolleyOfBoulders.java index d6b73ad557c..dbe088a0b48 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.TargetAnyTargetAmount; +import mage.target.common.TargetCreatureOrPlayerAmount; /** * @@ -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 TargetAnyTargetAmount(6)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayerAmount(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 aaabf01c268..c00328a5248 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,7 +45,7 @@ public class VoltCharge extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 c02f4b6160d..a85e511f0ea 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target equal to twice the number of Goblins it devoured. + // When Voracious Dragon enters the battlefield, it deals damage to target creature or player equal to twice the number of Goblins it devoured. Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new TwiceDevouredGoblins(), "it"), false); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokReplica.java b/Mage.Sets/src/mage/cards/v/VulshokReplica.java index ce3d07a70a3..ef2ac27da11 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokReplica.java +++ b/Mage.Sets/src/mage/cards/v/VulshokReplica.java @@ -25,6 +25,7 @@ * 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; @@ -39,7 +40,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.target.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -47,18 +48,18 @@ import mage.target.common.TargetPlayerOrPlaneswalker; */ 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 ba9decb8717..7f718b0f3b9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // {tap}: Vulshok Sorcerer deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WalkingBallista.java b/Mage.Sets/src/mage/cards/w/WalkingBallista.java index 5434eacec51..5bc3c0bf4bb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Remove a +1/+1 counter from Walking Ballista: It deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1, "It"), new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1))); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java b/Mage.Sets/src/mage/cards/w/WallOfForgottenPharaohs.java index 91e4e3eb7dd..521517ebf27 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.common.TargetPlayerOrPlaneswalker; +import mage.target.TargetPlayer; /** * @@ -76,13 +76,10 @@ 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 TargetPlayerOrPlaneswalker()); + new CardsInControllerGraveCondition(1, filterDesertCard))); + ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfSouls.java b/Mage.Sets/src/mage/cards/w/WallOfSouls.java index 814c50c9c08..5bb91961d91 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSouls.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSouls.java @@ -43,7 +43,8 @@ import mage.game.Game; import mage.game.events.DamagedCreatureEvent; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.target.common.TargetOpponentOrPlaneswalker; +import mage.players.Player; +import mage.target.common.TargetOpponent; /** * @@ -52,17 +53,17 @@ import mage.target.common.TargetOpponentOrPlaneswalker; 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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } @@ -98,9 +99,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; } @@ -115,7 +116,7 @@ class WallOfSoulsDealDamageEffect extends OneShotEffect { public WallOfSoulsDealDamageEffect() { super(Outcome.Damage); - this.staticText = "it deals that much damage to target opponent or planeswalker"; + this.staticText = "it deals that much damage to target opponent"; } public WallOfSoulsDealDamageEffect(final WallOfSoulsDealDamageEffect effect) { @@ -131,8 +132,12 @@ class WallOfSoulsDealDamageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = (Integer) getValue("damage"); if (amount > 0) { - return game.damagePlayerOrPlaneswalker(source.getFirstTarget(), amount, source.getSourceId(), game, false, true) > 0; + Player targetOpponent = game.getPlayer(source.getTargets().getFirstTarget()); + if (targetOpponent != null) { + targetOpponent.damage(amount, source.getSourceId(), game, false, true); + return true; + } } 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 6120d27c9cb..930cc065698 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 TargetPlayerOrPlaneswalker()); + ability.addTarget(new TargetPlayer()); 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 aca4ea4397d..159788703f9 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target instead. + // {1}{W}: The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player instead. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WardOfPietyPreventDamageTargetEffect(), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target instead"; + staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to target creature or player 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 ff63fc1ef1e..b41ca4bbe81 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target and you gain 4 life. + // Warleader's Helix deals 4 damage to target creature or player and you gain 4 life. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new GainLifeEffect(4)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } public WarleadersHelix(final WarleadersHelix card) { @@ -65,7 +65,7 @@ public class WarleadersHelix extends CardImpl { @Override public List getRules() { List rules = new ArrayList<>(); - rules.add("Warleader's Helix deals 4 damage to any target and you gain 4 life."); + rules.add("Warleader's Helix deals 4 damage to target creature or player 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 368f5db6422..6dd22b9c686 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Whenever a creature enters the battlefield under your control, it deals damage equal to its power to target creature or player. Ability ability = new WarstormSurgeTriggeredAbility(); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target."; + return "Whenever a creature enters the battlefield under your control, it deals damage equal to its power to target creature or player."; } @Override @@ -111,7 +111,7 @@ class WarstormSurgeEffect extends OneShotEffect { public WarstormSurgeEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to its power to any target"; + staticText = "it deals damage equal to its power to target creature or player"; } 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 d495ee253c3..3f3c1d4b4f8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -55,9 +55,9 @@ import mage.target.common.TargetAnyTarget; 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 any target. + // 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. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), filter, true); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WildSlash.java b/Mage.Sets/src/mage/cards/w/WildSlash.java index 372526698c0..d15386c72f6 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Wild Slash deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/w/WitchHunter.java b/Mage.Sets/src/mage/cards/w/WitchHunter.java index 653fefca3d3..81c637527cd 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 TargetPlayerOrPlaneswalker()); + damageAbility.addTarget(new TargetPlayer()); 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 15ff94e3a41..911d495b650 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - // Prevent the next 3 damage that would be dealt to any target this turn. + // Prevent the next 3 damage that would be dealt to target creature or player 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 95e6f9883d4..fbf87292cf4 100644 --- a/Mage.Sets/src/mage/cards/w/WizardsLightning.java +++ b/Mage.Sets/src/mage/cards/w/WizardsLightning.java @@ -40,7 +40,8 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; + /** * * @author Will @@ -62,7 +63,7 @@ public class WizardsLightning extends CardImpl { this.addAbility(ability); // Wizard's Lightning deals 3 damage to any target. - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); 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 bfe345483dc..9ea6a87f467 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target" + // Equipped creature has "{T}: This creature deals 1 damage to target creature or player" Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); - abilityToGain.addTarget(new TargetAnyTarget()); + abilityToGain.addTarget(new TargetCreatureOrPlayer()); Effect effect = new GainAbilityAttachedEffect(abilityToGain, AttachmentType.EQUIPMENT); - effect.setText("Equipped creature has \"{T}: This creature deals 1 damage to any target\""); + effect.setText("Equipped creature has \"{T}: This creature deals 1 damage to target creature or player\""); 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 58248334fa6..248eb718046 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target instead. + // {1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new WordsOfWarEffect(), new GenericManaCost(1)); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 any target instead."; + staticText = "The next time you would draw a card this turn, {this} deals 2 damage to target creature or player 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 d19ce12a1e4..8cec137c8a7 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. Activate this ability only during your turn, before attackers are declared. + // {tap}: Wu Longbowman deals 1 damage to target creature or player. 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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/y/YamabushisFlame.java b/Mage.Sets/src/mage/cards/y/YamabushisFlame.java index 94a64379b64..2dc03d402fc 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; 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 any target. + // Yamabushi's Flame deals 3 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 e1270dc6fb7..9834f741c62 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 { // Cohort — {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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); 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 bfb8e30abe1..7941244952c 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. + // Zap deals 1 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); // 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 9cb39435dae..e9c50d90f58 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.TargetOpponentOrPlaneswalker; +import mage.target.common.TargetOpponent; /** * @@ -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 TargetOpponentOrPlaneswalker()); + ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java b/Mage.Sets/src/mage/cards/z/ZhalfirinCrusader.java index ddd9bf083d7..c9ad6f53bdb 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target instead. + // {1}{W}: The next 1 damage that would be dealt to Zhalfirin Crusader this turn is dealt to target creature or player instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RedirectDamageFromSourceToTargetEffect(Duration.EndOfTurn, 1, true), new ManaCostsImpl("{1}{W}")); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java b/Mage.Sets/src/mage/cards/z/ZuranSpellcaster.java index 4d14178ba3c..3bf0910f589 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 any target. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); + // {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()); 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 e0ef557c53e..d0b8d4e8e11 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", "Ornithopter"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Shrapnel Blast"); 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 f9f76ce833b..700b59deb68 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", "Silvercoat Lion"); + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt"); 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 b8dd22af75a..9fc1ca14a0e 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,7 +30,6 @@ 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; @@ -40,7 +39,6 @@ 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 a9b3b74c143..e5a784f3876 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", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+2: {source} deals 3 damage to target creature or player.", 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 bbcb7c52a95..50fc886cf52 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,7 +29,6 @@ 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; @@ -97,7 +96,6 @@ 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 2ae49ae5f83..d8fe776a6b2 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 TargetAnyTarget) { + if (target instanceof TargetPlayer || target instanceof TargetCreatureOrPlayer) { 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 TargetAnyTarget)) { + if ((target instanceof TargetPermanent) || (target instanceof TargetPermanentOrPlayer) || (target instanceof TargetCreatureOrPlayer)) { 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 09ee4020053..6070e4693de 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> asThoughEffectsMap = new EnumMap<>(AsThoughEffectType.class); public final List> allEffectsLists = new ArrayList<>(); private final ApplyCountersEffect applyCounters; -// private final PlaneswalkerRedirectionEffect planeswalkerRedirectionEffect; + private final PlaneswalkerRedirectionEffect planeswalkerRedirectionEffect; private final AuraReplacementEffect auraReplacementEffect; private final List 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> getApplicableReplacementEffects(GameEvent event, Game game) { Map> 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 c4c83450420..00857194670 100644 --- a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -43,12 +43,9 @@ 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 25d81ab79d7..cc0940579df 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageAllControlledTargetEffect.java @@ -33,7 +33,6 @@ import mage.abilities.effects.OneShotEffect; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.players.Player; /** * @@ -64,11 +63,7 @@ public class DamageAllControlledTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget()); - if (player == null) { - return false; - } - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), 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 335fdc169f3..2ba553547d5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DamageTargetEffect.java @@ -187,12 +187,7 @@ public class DamageTargetEffect extends OneShotEffect { if (!targetDescription.isEmpty()) { sb.append(targetDescription); } else { - String targetName = mode.getTargets().get(0).getTargetName(); - if (targetName.contains("any")) { - sb.append(targetName); - } else { - sb.append("target ").append(targetName); - } + sb.append("target ").append(mode.getTargets().get(0).getTargetName()); } 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 af82bbf0a88..aa07e5bdd03 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java @@ -82,16 +82,11 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { } StringBuilder sb = new StringBuilder(); if (amountToPrevent == Integer.MAX_VALUE) { - sb.append("prevent all damage that would be dealt to "); + sb.append("prevent all damage that would be dealt to target "); } else { - 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("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); } + 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 deleted file mode 100644 index 95eaa60b17f..00000000000 --- a/Mage/src/main/java/mage/filter/common/FilterOpponentOrPlaneswalker.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 9c2827181f3..d4e024f4762 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java +++ b/Mage/src/main/java/mage/filter/common/FilterPermanentOrPlayer.java @@ -50,13 +50,9 @@ public class FilterPermanentOrPlayer extends FilterImpl implements Fil } public FilterPermanentOrPlayer(String name) { - this(name, new FilterPermanent(), new FilterPlayer()); - } - - public FilterPermanentOrPlayer(String name, FilterPermanent permanentFilter, FilterPlayer playerFilter) { super(name); - this.permanentFilter = permanentFilter; - this.playerFilter = playerFilter; + permanentFilter = new FilterPermanent(); + playerFilter = new FilterPlayer(); } 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 e02bb5a03aa..63848adb214 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/filter/common/FilterPlayerOrPlaneswalker.java @@ -5,24 +5,80 @@ */ package mage.filter.common; -import mage.filter.FilterPermanent; +import java.util.UUID; +import mage.MageItem; +import mage.filter.FilterImpl; +import mage.filter.FilterInPlay; import mage.filter.FilterPlayer; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; /** * * @author LevelX2 */ -public class FilterPlayerOrPlaneswalker extends FilterPermanentOrPlayer { +public class FilterPlayerOrPlaneswalker extends FilterImpl implements FilterInPlay { + + protected FilterPlaneswalkerPermanent planeswalkerFilter; + protected final FilterPlayer playerFilter; public FilterPlayerOrPlaneswalker() { this("player or planeswalker"); } public FilterPlayerOrPlaneswalker(String name) { - super(name, new FilterPermanent(), new FilterPlayer()); + super(name); + planeswalkerFilter = new FilterPlaneswalkerPermanent(); + playerFilter = 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 ac2a2e2af52..da64fd01a34 100644 --- a/Mage/src/main/java/mage/game/Game.java +++ b/Mage/src/main/java/mage/game/Game.java @@ -132,8 +132,6 @@ public interface Game extends MageItem, Serializable { Player getPlayer(UUID playerId); - Player getPlayerOrPlaneswalkerController(UUID playerId); - Players getPlayers(); PlayerList getPlayerList(); @@ -471,8 +469,4 @@ 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 appliedEffects); } diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 2514565d979..a4602536931 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -306,20 +306,6 @@ 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) { @@ -1579,14 +1565,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; } @@ -3159,22 +3145,4 @@ 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 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 053b9413a29..e2d7472777f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability2.addTarget(new TargetCreatureOrPlayer()); 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 8b10b8765ea..de17acdc38f 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 29e899db914..d38928cfad0 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 85d8c8cc45e..7c6dd1a53e8 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -45,7 +45,7 @@ import mage.target.common.TargetAnyTarget; public class DevilToken extends TokenImpl { public DevilToken() { - super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to any target.\""); + super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to target creature or player.\""); 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 any target"); + effect.setText("it deals 1 damage to target creature or player"); Ability ability = new DiesTriggeredAbility(effect); - ability.addTarget(new TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 e80a0ac8ff0..4249a8f5266 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.TargetAnyTarget; +import mage.target.common.TargetCreatureOrPlayer; /** * @@ -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 TargetAnyTarget()); + ability.addTarget(new TargetCreatureOrPlayer()); 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 c237718ee64..dbd55c6c2f1 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) null); + this.setLife(game.getLife(), game, UUID.randomUUID()); 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 2fbe3046eda..3ebf6eee111 100644 --- a/Mage/src/main/java/mage/target/common/TargetAnyTarget.java +++ b/Mage/src/main/java/mage/target/common/TargetAnyTarget.java @@ -15,7 +15,8 @@ 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 { @@ -164,14 +165,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 deleted file mode 100644 index 4685e32c3b4..00000000000 --- a/Mage/src/main/java/mage/target/common/TargetOpponentOrPlaneswalker.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 4be0a4b88b4..7cf54490bf3 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 = this.filter.getPermanentFilter(); + this.filterPermanent = new FilterPermanent(); } public TargetPermanentOrPlayer(int minNumTargets, int maxNumTargets, boolean notTarget) { @@ -73,11 +73,6 @@ 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 a7452ddf411..51510431552 100644 --- a/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java +++ b/Mage/src/main/java/mage/target/common/TargetPlayerOrPlaneswalker.java @@ -14,31 +14,204 @@ 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 TargetPermanentOrPlayer { +public class TargetPlayerOrPlaneswalker extends TargetImpl { + + protected FilterPlayerOrPlaneswalker filter; public TargetPlayerOrPlaneswalker() { - this(1, 1, new FilterPlayerOrPlaneswalker(), false); + this(1, 1, new FilterPlayerOrPlaneswalker()); } public TargetPlayerOrPlaneswalker(int numTargets) { - this(numTargets, numTargets, new FilterPlayerOrPlaneswalker(), false); + this(numTargets, numTargets, new FilterPlayerOrPlaneswalker()); } public TargetPlayerOrPlaneswalker(FilterPlayerOrPlaneswalker filter) { - this(1, 1, filter, false); + this(1, 1, filter); } - public TargetPlayerOrPlaneswalker(int minNumTargets, int maxNumTargets, FilterPlayerOrPlaneswalker filter, boolean notTarget) { - super(minNumTargets, maxNumTargets, filter, notTarget); + 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(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 possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + Set 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 possibleTargets(UUID sourceControllerId, Game game) { + Set 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() { @@ -49,4 +222,5 @@ public class TargetPlayerOrPlaneswalker extends TargetPermanentOrPlayer { public TargetPlayerOrPlaneswalker copy() { return new TargetPlayerOrPlaneswalker(this); } + }