From a8d8f4e6219b77f3537feb80bf789e6caa92f860 Mon Sep 17 00:00:00 2001 From: dilnu Date: Sun, 2 Feb 2020 18:51:05 -0500 Subject: [PATCH] Add tests to debug issues with Bonecrusher Giant https://github.com/magefree/mage/issues/6158 --- .../mage/test/cards/copy/CopySpellTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java index e3d6030976b..bfb1a229a48 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java @@ -77,6 +77,68 @@ public class CopySpellTest extends CardTestPlayerBase { assertAbility(playerB, "Silvercoat Lion", FlyingAbility.getInstance(), false); } + @Test + public void BonecrusherGiantChangeTargetsTo() { + addCard(Zone.BATTLEFIELD, playerA, "Bonecrusher Giant"); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears"); + addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions"); + addCard(Zone.BATTLEFIELD, playerA, "Plains"); + addCard(Zone.HAND, playerA, "Barkshell Blessing"); + + castSpell(1, PhaseStep.UPKEEP, playerA, "Barkshell Blessing"); + setChoice(playerA, "Yes"); + setChoice(playerA, "Yes"); + addTarget(playerA, "Grizzly Bears"); + addTarget(playerA, "Bonecrusher Giant"); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Bonecrusher Giant", 6, 5); + assertPowerToughness(playerA, "Grizzly Bears", 4, 4); + assertPowerToughness(playerA, "Savannah Lions", 2, 1); + assertLife(playerA, 18); + } + + @Test + public void BonecrusherGiantChangeTargetsFrom() { + addCard(Zone.BATTLEFIELD, playerA, "Bonecrusher Giant"); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears"); + addCard(Zone.BATTLEFIELD, playerA, "Savannah Lions"); + addCard(Zone.BATTLEFIELD, playerA, "Plains"); + addCard(Zone.HAND, playerA, "Barkshell Blessing"); + + castSpell(1, PhaseStep.UPKEEP, playerA, "Barkshell Blessing"); + setChoice(playerA, "Yes"); + setChoice(playerA, "Yes"); + addTarget(playerA, "Bonecrusher Giant"); + addTarget(playerA, "Grizzly Bears"); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Bonecrusher Giant", 6, 5); + assertPowerToughness(playerA, "Grizzly Bears", 4, 4); + assertPowerToughness(playerA, "Savannah Lions", 2, 1); + assertLife(playerA, 18); + } + + @Test + public void BonecrusherGiantControl() { + addCard(Zone.BATTLEFIELD, playerA, "Bonecrusher Giant"); + addCard(Zone.BATTLEFIELD, playerA, "Plains"); + addCard(Zone.HAND, playerA, "Barkshell Blessing"); + + castSpell(1, PhaseStep.UPKEEP, playerA, "Barkshell Blessing"); + addTarget(playerA, "Bonecrusher Giant"); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Bonecrusher Giant", 6, 5); + assertLife(playerA, 18); + } + /* * Reported bug: "Silverfur Partisan and fellow wolves did not trigger off * of copies of Strength of Arms made by Zada, Hedron Grinder. Not sure