diff --git a/Mage.Sets/src/mage/cards/b/BellowingFiend.java b/Mage.Sets/src/mage/cards/b/BellowingFiend.java index 3dfc5ff9e8..1e332e77b9 100644 --- a/Mage.Sets/src/mage/cards/b/BellowingFiend.java +++ b/Mage.Sets/src/mage/cards/b/BellowingFiend.java @@ -15,6 +15,7 @@ import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.target.targetpointer.FixedTarget; import java.util.UUID; @@ -68,7 +69,7 @@ class BellowingFiendEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { boolean applied = false; - Permanent damagedCreature = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent damagedCreature = ((FixedTarget) targetPointer).getTargetedPermanentOrLKIBattlefield(game); if (damagedCreature != null) { Player controller = game.getPlayer(damagedCreature.getControllerId()); if (controller != null) { diff --git a/Mage.Sets/src/mage/cards/f/FaerieArtisans.java b/Mage.Sets/src/mage/cards/f/FaerieArtisans.java index ca5a0e0184..b751bffa32 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieArtisans.java +++ b/Mage.Sets/src/mage/cards/f/FaerieArtisans.java @@ -1,7 +1,5 @@ package mage.cards.f; -import java.util.StringTokenizer; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; @@ -21,8 +19,10 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.targetpointer.FixedTarget; +import java.util.StringTokenizer; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class FaerieArtisans extends CardImpl { @@ -79,7 +79,7 @@ class FaerieArtisansEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanentToCopy = game.getPermanentOrLKIBattlefield(getTargetPointer().getFixedTarget(game, source).getTarget()); + Permanent permanentToCopy = game.getPermanentOrLKIBattlefield(targetPointer.getFixedTarget(game, source).getTarget()); Player controller = game.getPlayer(source.getControllerId()); if (controller != null && permanentToCopy != null) { CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, CardType.ARTIFACT, false); diff --git a/Mage.Sets/src/mage/cards/f/FlayedNim.java b/Mage.Sets/src/mage/cards/f/FlayedNim.java index 4b066c62d2..336542943e 100644 --- a/Mage.Sets/src/mage/cards/f/FlayedNim.java +++ b/Mage.Sets/src/mage/cards/f/FlayedNim.java @@ -1,7 +1,5 @@ - package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DealsCombatDamageToACreatureTriggeredAbility; @@ -9,18 +7,20 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.RegenerateSourceEffect; -import mage.constants.SubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; /** - * * @author TheElk801 */ public final class FlayedNim extends CardImpl { @@ -67,7 +67,7 @@ class FlayedNimEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent creature = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent creature = ((FixedTarget) targetPointer).getTargetedPermanentOrLKIBattlefield(game); if (creature == null) { return false; } diff --git a/Mage.Sets/src/mage/cards/g/GenesisChamber.java b/Mage.Sets/src/mage/cards/g/GenesisChamber.java index a739a91f3c..5cee00b105 100644 --- a/Mage.Sets/src/mage/cards/g/GenesisChamber.java +++ b/Mage.Sets/src/mage/cards/g/GenesisChamber.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.TriggeredAbility; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; @@ -20,9 +18,11 @@ import mage.filter.predicate.permanent.TokenPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.MyrToken; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; /** - * * @author Plopman */ public final class GenesisChamber extends CardImpl { @@ -41,8 +41,8 @@ public final class GenesisChamber extends CardImpl { this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SourceUntappedCondition.instance, "Whenever a nontoken creature enters the battlefield, " - + "if {this} is untapped, " - + "that creature's controller creates a 1/1 colorless Myr artifact creature token")); + + "if {this} is untapped, " + + "that creature's controller creates a 1/1 colorless Myr artifact creature token")); } public GenesisChamber(final GenesisChamber card) { @@ -92,7 +92,7 @@ class GenesisChamberEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent permanent = ((FixedTarget) targetPointer).getTargetedPermanentOrLKIBattlefield(game); if (permanent != null) { MyrToken token = new MyrToken(); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/g/GrimFeast.java b/Mage.Sets/src/mage/cards/g/GrimFeast.java index c3be0ef0f0..57abc08d14 100644 --- a/Mage.Sets/src/mage/cards/g/GrimFeast.java +++ b/Mage.Sets/src/mage/cards/g/GrimFeast.java @@ -14,6 +14,7 @@ import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; import java.util.UUID; @@ -90,7 +91,7 @@ class GrimFeastEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent creature = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent creature = ((FixedTarget) targetPointer).getTargetedPermanentOrLKIBattlefield(game); if (creature == null) { return false; } diff --git a/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java b/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java index 07e76c0b33..bae310cd8f 100644 --- a/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java +++ b/Mage.Sets/src/mage/cards/i/IncubationIncongruity.java @@ -71,7 +71,10 @@ class IncongruityEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + // If the target creature is an illegal target by the time Incongruity tries to resolve, the spell doesn’t resolve. + // No player creates a Frog Lizard token. + // (2019-01-25) + Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { FrogLizardToken token = new FrogLizardToken(); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/l/LesserWerewolf.java b/Mage.Sets/src/mage/cards/l/LesserWerewolf.java index f743cf9842..0dac7f0932 100644 --- a/Mage.Sets/src/mage/cards/l/LesserWerewolf.java +++ b/Mage.Sets/src/mage/cards/l/LesserWerewolf.java @@ -73,8 +73,8 @@ class LesserWerewolfEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); - Permanent targetPermanent = game.getPermanentOrLKIBattlefield(targetPointer.getFirst(game, source)); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); + Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source)); // must be valid target if (controller != null && sourcePermanent != null && targetPermanent != null) { if (sourcePermanent.getPower().getValue() >= 1) { game.addEffect(new BoostSourceEffect(-1, 0, Duration.EndOfTurn), source);