diff --git a/Mage.Sets/src/mage/cards/a/AjaniUnyielding.java b/Mage.Sets/src/mage/cards/a/AjaniUnyielding.java index 4bc712f1822..dc3140afb45 100644 --- a/Mage.Sets/src/mage/cards/a/AjaniUnyielding.java +++ b/Mage.Sets/src/mage/cards/a/AjaniUnyielding.java @@ -30,7 +30,7 @@ package mage.cards.a; import mage.abilities.LoyaltyAbility; import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; import mage.abilities.effects.common.RevealLibraryPutIntoHandEffect; -import mage.abilities.effects.common.SwordsToPlowsharesEffect; +import mage.abilities.effects.common.ExileAndGainLifeEqualPowerTargetEffect; import mage.abilities.effects.common.counter.AddCountersAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -73,7 +73,7 @@ public class AjaniUnyielding extends CardImpl { this.addAbility(new LoyaltyAbility(new RevealLibraryPutIntoHandEffect(3, nonlandPermanentFilter, Zone.LIBRARY), 2)); // -2: Exile target creature. Its controller gains life equal to its power. - LoyaltyAbility ajaniAbility2 = new LoyaltyAbility(new SwordsToPlowsharesEffect(), -2); + LoyaltyAbility ajaniAbility2 = new LoyaltyAbility(new ExileAndGainLifeEqualPowerTargetEffect(), -2); ajaniAbility2.addTarget(new TargetCreaturePermanent()); this.addAbility(ajaniAbility2); diff --git a/Mage.Sets/src/mage/cards/s/SwordsToPlowshares.java b/Mage.Sets/src/mage/cards/s/SwordsToPlowshares.java index 447ddf7995b..ef62afbad38 100644 --- a/Mage.Sets/src/mage/cards/s/SwordsToPlowshares.java +++ b/Mage.Sets/src/mage/cards/s/SwordsToPlowshares.java @@ -27,7 +27,7 @@ */ package mage.cards.s; -import mage.abilities.effects.common.SwordsToPlowsharesEffect; +import mage.abilities.effects.common.ExileAndGainLifeEqualPowerTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -46,7 +46,7 @@ public class SwordsToPlowshares extends CardImpl { // Exile target creature. Its controller gains life equal to its power. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new SwordsToPlowsharesEffect()); + this.getSpellAbility().addEffect(new ExileAndGainLifeEqualPowerTargetEffect()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/SwordsToPlowsharesEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAndGainLifeEqualPowerTargetEffect.java similarity index 87% rename from Mage/src/main/java/mage/abilities/effects/common/SwordsToPlowsharesEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ExileAndGainLifeEqualPowerTargetEffect.java index 180d76acf4e..4194b261cf6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SwordsToPlowsharesEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAndGainLifeEqualPowerTargetEffect.java @@ -37,20 +37,20 @@ import mage.players.Player; /** * @author JRHerlehy */ -public class SwordsToPlowsharesEffect extends OneShotEffect { +public class ExileAndGainLifeEqualPowerTargetEffect extends OneShotEffect { - public SwordsToPlowsharesEffect() { + public ExileAndGainLifeEqualPowerTargetEffect() { super(Outcome.GainLife); staticText = "Exile target creature. Its controller gains life equal to its power"; } - public SwordsToPlowsharesEffect(final SwordsToPlowsharesEffect effect) { + public ExileAndGainLifeEqualPowerTargetEffect(final ExileAndGainLifeEqualPowerTargetEffect effect) { super(effect); } @Override - public SwordsToPlowsharesEffect copy() { - return new SwordsToPlowsharesEffect(this); + public ExileAndGainLifeEqualPowerTargetEffect copy() { + return new ExileAndGainLifeEqualPowerTargetEffect(this); } @Override @@ -61,6 +61,7 @@ public class SwordsToPlowsharesEffect extends OneShotEffect { if (player != null) { int creaturePower = permanent.getPower().getValue(); permanent.moveToExile(null, null, source.getSourceId(), game); + game.applyEffects(); player.gainLife(creaturePower, game); } return true;