From 1b9585ead7198cc4f3c352006b28e59f900d19be Mon Sep 17 00:00:00 2001 From: Derek Monturo Date: Fri, 31 Mar 2017 11:00:08 -0400 Subject: [PATCH] #2872 added UT confirming bug for hangerback walker interaction --- .../EntersTheBattlefieldTriggerTest.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java index 6ab63a3331..b94797e5a0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/EntersTheBattlefieldTriggerTest.java @@ -29,6 +29,7 @@ package org.mage.test.cards.triggers; import mage.constants.PhaseStep; import mage.constants.Zone; +import mage.counters.CounterType; import mage.filter.Filter; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -358,4 +359,55 @@ public class EntersTheBattlefieldTriggerTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Elemental Shaman", 2); assertPowerToughness(playerA, "Elemental Shaman", 3, 1); } + + /* + Reported bug: HAngarback interaciton with Hardened Scales and Metallic Mimic on board is incorrect. + */ + @Test + public void hangarBackHardenedScalesMetallicMimicTest() { + + /* + Hangarback Walker {X}{X} + Artifact Creature — Construct 0/0 + Hangarback Walker enters the battlefield with X +1/+1 counters on it. + When Hangarback Walker dies, create a 1/1 colorless Thopter artifact creature token with flying for each +1/+1 counter on Hangarback Walker. + {1}, {T}: Put a +1/+1 counter on Hangarback Walker. + */ + String hWalker = "Hangarback Walker"; + + /* + Hardened Scales {G} + Enchantment + If one or more +1/+1 counters would be placed on a creature you control, that many plus one +1/+1 counters are placed on it instead. + */ + String hScales = "Hardened Scales"; + + /* + Metallic Mimic {2} + Artifact Creature — Shapeshifter 2/1 + As Metallic Mimic enters the battlefield, choose a creature type. + Metallic Mimic is the chosen type in addition to its other types. + Each other creature you control of the chosen type enters the battlefield with an additional +1/+1 counter on it. + */ + String mMimic = "Metallic Mimic"; + + addCard(Zone.BATTLEFIELD, playerA, hScales); + addCard(Zone.HAND, playerA, mMimic); + addCard(Zone.HAND, playerA, hWalker); + addCard(Zone.BATTLEFIELD, playerA, "Wastes", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, mMimic); + setChoice(playerA, "Construct"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, hWalker); + setChoice(playerA, "X=1"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, mMimic, 1); + assertPermanentCount(playerA, hWalker, 1); + assertCounterCount(playerA, hWalker, CounterType.P1P1, 3); + assertPowerToughness(playerA, hWalker, 3, 3); + } }