diff --git a/Mage.Sets/src/mage/cards/p/PerilousMyr.java b/Mage.Sets/src/mage/cards/p/PerilousMyr.java index 13f892ca95f..dc76c7452dc 100644 --- a/Mage.Sets/src/mage/cards/p/PerilousMyr.java +++ b/Mage.Sets/src/mage/cards/p/PerilousMyr.java @@ -25,17 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.p; import java.util.UUID; -import mage.constants.CardType; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.target.common.TargetCreatureOrPlayer; /** @@ -44,17 +43,19 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class PerilousMyr extends CardImpl { - public PerilousMyr (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); + public PerilousMyr(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}"); this.subtype.add("Myr"); this.power = new MageInt(1); this.toughness = new MageInt(1); + + // When Perilous Myr dies, it deals 2 damage to target creature or player. Ability ability = new DiesTriggeredAbility(new DamageTargetEffect(2), false); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } - public PerilousMyr (final PerilousMyr card) { + public PerilousMyr(final PerilousMyr card) { super(card); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/HavengulLichTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/HavengulLichTest.java index 61e62dd1ea2..59d2fe6b822 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/HavengulLichTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/HavengulLichTest.java @@ -53,7 +53,7 @@ public class HavengulLichTest extends CardTestPlayerBase { @Test public void testCard2() { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); - // {1}: You may cast target creature card in a graveyard this turn. When you cast that card this turn, Havengul Lich + // {1}: You may cast target creature card in a graveyard this turn. When you cast that card this turn, Havengul Lich // gains all activated abilities of that card until end of turn. addCard(Zone.BATTLEFIELD, playerA, "Havengul Lich"); // {T}: Prodigal Pyromancer deals 1 damage to target creature or player. @@ -75,4 +75,42 @@ public class HavengulLichTest extends CardTestPlayerBase { assertGraveyardCount(playerA, 0); } + /** + * hey i play a Havengul Lich and Heartless Summoning deck. and every time + * the lich is on the field as the same time as heartless summoning i cant + * use the lich's ability correctly. because if you know magic you know that + * a creature with one toughness will still enter the battlefield and + * immediately die but the creature's effect will still trigger. like when i + * "cast" Perilous Myr from the graveyard with the lich it doesn't actually + * enter the battlefield and its death ability doesn't trigger! and that is + * one of my decks i cast from the graveyard with the lich and things are + * SUPPOSED to enter the battlefield and die triggering whatever ability the + * creature might have alot like "myr retriever"! plz fix it, this is the + * second time i have had to mention this problem! + */ + @Test + public void testCardHeartlessSummoning() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1); + // {1}: You may cast target creature card in a graveyard this turn. When you cast that card this turn, Havengul Lich + // gains all activated abilities of that card until end of turn. + addCard(Zone.BATTLEFIELD, playerA, "Havengul Lich"); + // Creature spells you cast cost {2} less to cast. + // Creatures you control get -1/-1. + addCard(Zone.BATTLEFIELD, playerA, "Heartless Summoning"); // Enchantment + // When Perilous Myr dies, it deals 2 damage to target creature or player. + addCard(Zone.GRAVEYARD, playerA, "Perilous Myr"); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}: You may", "Perilous Myr"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Perilous Myr"); + addTarget(playerA, playerB); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 18); + + assertPermanentCount(playerA, "Havengul Lich", 1); + assertGraveyardCount(playerA, "Perilous Myr", 1); + + } + }