diff --git a/Mage.Sets/src/mage/sets/magic2012/PhantasmalImage.java b/Mage.Sets/src/mage/sets/magic2012/PhantasmalImage.java index 576bfd7005b..3fef0ff88fb 100644 --- a/Mage.Sets/src/mage/sets/magic2012/PhantasmalImage.java +++ b/Mage.Sets/src/mage/sets/magic2012/PhantasmalImage.java @@ -110,7 +110,9 @@ class PhantasmalImageCopyEffect extends OneShotEffect { if (!permanent.getSubtype().contains("Illusion")) { permanent.getSubtype().add("Illusion"); } - permanent.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()), game); + // Add directly because the created permanent is only used to copy from, so there is no need to add the ability to e.g. TriggeredAbilities + permanent.getAbilities().add(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); + //permanent.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()), game); return true; } }); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/WurmcoilEngine.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/WurmcoilEngine.java index 6bdf90e9803..2a911f2e7f0 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/WurmcoilEngine.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/WurmcoilEngine.java @@ -54,9 +54,11 @@ public class WurmcoilEngine extends CardImpl { this.power = new MageInt(6); this.toughness = new MageInt(6); - + // Deathtouch, lifelink this.addAbility(DeathtouchAbility.getInstance()); this.addAbility(LifelinkAbility.getInstance()); + + // When Wurmcoil Engine dies, put a 3/3 colorless Wurm artifact creature token with deathtouch and a 3/3 colorless Wurm artifact creature token with lifelink onto the battlefield. Ability ability = new DiesTriggeredAbility(new CreateTokenEffect(new Wurm1Token(expansionSetCode)), false); ability.addEffect(new CreateTokenEffect(new Wurm2Token(expansionSetCode))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/tenthedition/Clone.java b/Mage.Sets/src/mage/sets/tenthedition/Clone.java index 2284d16afac..2412dacd079 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/Clone.java +++ b/Mage.Sets/src/mage/sets/tenthedition/Clone.java @@ -53,6 +53,7 @@ public class Clone extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); + // You may have Clone enter the battlefield as a copy of any creature on the battlefield. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect( new CopyPermanentEffect(), "You may have {this} enter the battlefield as a copy of any creature on the battlefield", diff --git a/Mage.Sets/src/mage/sets/tenthedition/Nightmare.java b/Mage.Sets/src/mage/sets/tenthedition/Nightmare.java index 42e0b57e4f9..57a192538c7 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/Nightmare.java +++ b/Mage.Sets/src/mage/sets/tenthedition/Nightmare.java @@ -61,7 +61,11 @@ public class Nightmare extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); + + // Flying this.addAbility(FlyingAbility.getInstance()); + + // Nightmare's power and toughness are each equal to the number of Swamps you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java index 47bf48d5091..b02bbe4e383 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java @@ -108,9 +108,11 @@ public class CloneTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 6); addCard(Zone.BATTLEFIELD, playerB, "Forest", 1); + // Target creature you control gets +1/+1 and gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.) addCard(Zone.HAND, playerB, "Ranger's Guile"); addCard(Zone.HAND, playerA, "Clone"); + // Return target nonland permanent to its owner's hand. addCard(Zone.HAND, playerA, "Disperse"); addCard(Zone.BATTLEFIELD, playerB, "Nightmare", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java index 7cd0d98e3b0..7b1ecd66b1e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java @@ -525,5 +525,50 @@ public class PhantasmalImageTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Butcher Ghoul", 1); assertPowerToughness(playerB, "Butcher Ghoul", 2, 2); + } + + /** + * 12:29: Attacker: Wurmcoil Engine [466] (6/6) blocked by Wurmcoil Engine + * [4ed] (6/6) + * 12:29: yespair gains 6 life + * 12:29: HipSomHap gains 6 life + * 12:29: Wurmcoil Engine [4ed] died + * 12:29: Ability triggers: Wurmcoil Engine [4ed] - When Wurmcoil Engine [4ed] dies, put a a 3/3 colorless + * Wurm artifact creature token with deathtouch onto the battlefield. Put a + * a 3/3 colorless Wurm artifact creature token with lifelink onto the + * battlefield. + * 12:29: Phantasmal Image [466] died + * 12:29: HipSomHap puts a Wurm [7d0] token onto the battlefield + * 12:29: HipSomHap puts a Wurm [186] token onto the battlefield + * + * To the best of my knowledge, the Phantasmal Image [466], which entered + * the battlefield as a Wurmcoil Engine, should grant tokens through the + * Dies-trigger as well, right? + */ + + @Test + public void testDiesTriggered2() { + addCard(Zone.BATTLEFIELD, playerB, "Wurmcoil Engine"); + + addCard(Zone.BATTLEFIELD, playerA, "Island", 2); + addCard(Zone.HAND, playerA, "Phantasmal Image"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phantasmal Image"); // not targeted + setChoice(playerB, "Wurmcoil Engine"); + + attack(2, playerB, "Wurmcoil Engine"); + block(2, playerA, "Wurmcoil Engine", "Wurmcoil Engine"); + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerB, 26); + assertLife(playerA, 26); + + assertGraveyardCount(playerA, "Phantasmal Image", 1); + assertGraveyardCount(playerB, "Wurmcoil Engine", 1); + + assertPermanentCount(playerA, "Wurm", 2); + assertPermanentCount(playerB, "Wurm", 2); + } }