From 98c94a487b9fc19b0ffea82618648d9e5f6ca7d4 Mon Sep 17 00:00:00 2001 From: ssouders412 Date: Wed, 13 Nov 2019 17:29:45 -0500 Subject: [PATCH] Added Must Be Blocked test --- .../combat/AttackBlockRestrictionsTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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 145e79a9cb..de7a50b321 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); + } }