diff --git a/Mage.Sets/src/mage/cards/d/DeadlyAllure.java b/Mage.Sets/src/mage/cards/d/DeadlyAllure.java index 0191d316bc2..bfe8ce12aae 100644 --- a/Mage.Sets/src/mage/cards/d/DeadlyAllure.java +++ b/Mage.Sets/src/mage/cards/d/DeadlyAllure.java @@ -3,6 +3,7 @@ package mage.cards.d; import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.DeathtouchAbility; @@ -26,7 +27,9 @@ public final class DeadlyAllure extends CardImpl { // Target creature gains deathtouch until end of turn and must be blocked this turn if able. this.getSpellAbility().addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn)); + Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn); + effect.setText("and must be blocked this turn if able"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Flashback {G} diff --git a/Mage.Sets/src/mage/cards/e/ElementalUprising.java b/Mage.Sets/src/mage/cards/e/ElementalUprising.java index 319dcf1e2f0..56fb5578331 100644 --- a/Mage.Sets/src/mage/cards/e/ElementalUprising.java +++ b/Mage.Sets/src/mage/cards/e/ElementalUprising.java @@ -27,11 +27,11 @@ public final class ElementalUprising extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Target land you control becomes a 4/4 Elemental creature with haste until end of turn. It's still a land. It must be blocked this turn if able. - getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new ElementalUprisingToken(), false, true, Duration.EndOfTurn)); - getSpellAbility().addTarget(new TargetPermanent(new FilterControlledLandPermanent())); + this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new ElementalUprisingToken(), false, true, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetPermanent(new FilterControlledLandPermanent())); Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn); effect.setText("It must be blocked this turn if able"); - getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(effect); } public ElementalUprising(final ElementalUprising card) { diff --git a/Mage.Sets/src/mage/cards/e/EmergentGrowth.java b/Mage.Sets/src/mage/cards/e/EmergentGrowth.java index 3aa667cbcb7..c7d9c68d461 100644 --- a/Mage.Sets/src/mage/cards/e/EmergentGrowth.java +++ b/Mage.Sets/src/mage/cards/e/EmergentGrowth.java @@ -23,7 +23,7 @@ public final class EmergentGrowth extends CardImpl { // Target creature gets +5/+5 until end of turn and must be blocked this turn if able. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn)); - Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(); + Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn); effect.setText("and must be blocked this turn if able"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/e/Enlarge.java b/Mage.Sets/src/mage/cards/e/Enlarge.java index 73349d3edad..0e8a887a21c 100644 --- a/Mage.Sets/src/mage/cards/e/Enlarge.java +++ b/Mage.Sets/src/mage/cards/e/Enlarge.java @@ -2,6 +2,7 @@ package mage.cards.e; import java.util.UUID; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -25,7 +26,9 @@ public final class Enlarge extends CardImpl { // Target creature gets +7/+7 and gains trample until end of turn. It must be blocked this turn if able. this.getSpellAbility().addEffect(new BoostTargetEffect(7,7, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn)); + Effect effect = new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn); + effect.setText("It must be blocked this turn if able"); + this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/g/GaeasProtector.java b/Mage.Sets/src/mage/cards/g/GaeasProtector.java index 60e9adb41f8..4cd88df8832 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasProtector.java +++ b/Mage.Sets/src/mage/cards/g/GaeasProtector.java @@ -5,6 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; +import mage.abilities.effects.Effect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; diff --git a/Mage.Sets/src/mage/cards/i/IrresistiblePrey.java b/Mage.Sets/src/mage/cards/i/IrresistiblePrey.java index fb8579bc801..7f6f2d13c26 100644 --- a/Mage.Sets/src/mage/cards/i/IrresistiblePrey.java +++ b/Mage.Sets/src/mage/cards/i/IrresistiblePrey.java @@ -2,15 +2,12 @@ package mage.cards.i; import java.util.UUID; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; /** @@ -25,10 +22,7 @@ public final class IrresistiblePrey extends CardImpl { // Target creature must be blocked this turn if able. // Draw a card. - this.getSpellAbility().addEffect( - new GainAbilityTargetEffect( - new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneTargetEffect()), - Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new MustBeBlockedByAtLeastOneTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); } diff --git a/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java b/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java index 145e79a9cb1..de7a50b3210 100644 --- a/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/combat/AttackBlockRestrictionsTest.java @@ -542,4 +542,31 @@ public class AttackBlockRestrictionsTest extends CardTestPlayerBase { assertLife(playerA, 20); assertLife(playerB, 20); } + + @Test + public void irresistiblePreyMustBeBlockedTest() { + addCard(Zone.BATTLEFIELD, playerA, "Llanowar Elves"); + addCard(Zone.BATTLEFIELD, playerA, "Alpha Myr"); + addCard(Zone.BATTLEFIELD, playerA, "Forest"); + addCard(Zone.HAND, playerA, "Irresistible Prey"); + + addCard(Zone.BATTLEFIELD, playerB, "Bronze Sable"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Irresistible Prey", "Llanowar Elves"); // must be blocked + + attack(1, playerA, "Llanowar Elves"); + attack(1, playerA, "Alpha Myr"); + + // attempt to block the creature that doesn't have "must be blocked" + block(1, playerB, "Bronze Sable", "Alpha Myr"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerA, "Irresistible Prey", 1); + assertGraveyardCount(playerA, "Llanowar Elves", 1); + assertGraveyardCount(playerB, "Bronze Sable", 1); + assertTapped("Alpha Myr", true); + assertLife(playerB, 18); + } }