diff --git a/Mage.Sets/src/mage/cards/m/MetallicMimic.java b/Mage.Sets/src/mage/cards/m/MetallicMimic.java index ea93082b97..ae92baf73a 100644 --- a/Mage.Sets/src/mage/cards/m/MetallicMimic.java +++ b/Mage.Sets/src/mage/cards/m/MetallicMimic.java @@ -27,7 +27,6 @@ */ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; @@ -37,17 +36,15 @@ import mage.abilities.effects.common.ChooseCreatureTypeEffect; import mage.abilities.effects.common.enterAttribute.EnterAttributeAddChosenSubtypeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.EnterEventType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.CounterType; import mage.game.Game; import mage.game.events.EntersTheBattlefieldEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author Styxo @@ -109,7 +106,7 @@ class MetallicMimicReplacementEffect extends ReplacementEffectImpl { && enteringCreature.isCreature() && !event.getTargetId().equals(source.getSourceId())) { String subtype = (String) game.getState().getValue(sourcePermanent.getId() + "_type"); - return subtype != null && enteringCreature.getSubtype(game).contains(subtype); + return subtype != null && enteringCreature.hasSubtype(subtype, game); } return false; } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ChangelingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ChangelingTest.java index 9f655f8a99..c57888e58c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ChangelingTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ChangelingTest.java @@ -48,11 +48,32 @@ public class ChangelingTest extends CardTestPlayerBase { */ assertPowerToughness(playerA, lordOfAtlantis, 6, 6); /* - mutavault token; +3 + mutavault token; +2 atlantis +1 unreal: +1 coat of arms: +5 */ assertPowerToughness(playerA, mutavault, 9, 9); } + + @Test + public void testMetallicMimicChangelingTrigger(){ + // all creatures with the chosen subtype come into play with a +1/+1 counter + final String mimic = "Metallic Mimic"; + + addCard(Zone.HAND, playerA, mimic, 1); + addCard(Zone.HAND, playerA, woodlandChangeling, 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 10); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, mimic); + setChoice(playerA, "Sliver"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, woodlandChangeling); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + // 2/2 + +1/+1 counter + assertPowerToughness(playerA, woodlandChangeling, 3, 3); + } }