diff --git a/Mage.Sets/src/mage/cards/s/SyrKonradTheGrim.java b/Mage.Sets/src/mage/cards/s/SyrKonradTheGrim.java index aa61685d40..967fc74452 100644 --- a/Mage.Sets/src/mage/cards/s/SyrKonradTheGrim.java +++ b/Mage.Sets/src/mage/cards/s/SyrKonradTheGrim.java @@ -72,6 +72,7 @@ class SyrKonradTheGrimTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + // Whenever another creature dies if (zEvent.isDiesEvent() && zEvent.getTarget() != null && !zEvent.getTargetId().equals(this.getSourceId()) @@ -79,6 +80,7 @@ class SyrKonradTheGrimTriggeredAbility extends TriggeredAbilityImpl { return true; } Card card = game.getCard(zEvent.getTargetId()); + // Or a creature card is put into a graveyard from anywhere other than the battlefield if (card == null || !card.isCreature()) { return false; } @@ -86,7 +88,9 @@ class SyrKonradTheGrimTriggeredAbility extends TriggeredAbilityImpl { && zEvent.getFromZone() != Zone.BATTLEFIELD) { return true; } - return zEvent.getFromZone() == Zone.GRAVEYARD; + // Or a creature card leaves your graveyard + return zEvent.getFromZone() == Zone.GRAVEYARD + && zEvent.getPlayerId() == this.getControllerId(); } @Override @@ -95,4 +99,4 @@ class SyrKonradTheGrimTriggeredAbility extends TriggeredAbilityImpl { "from anywhere other than the battlefield, or a creature card leaves your graveyard, " + "{this} deals 1 damage to each opponent."; } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/ArchfiendOfSpiteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/ArchfiendOfSpiteTest.java index 00622f1471..4037097d6b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/ArchfiendOfSpiteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/ArchfiendOfSpiteTest.java @@ -2,7 +2,6 @@ package org.mage.test.cards.single; import mage.constants.PhaseStep; import mage.constants.Zone; -import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/SyrKonradTheGrimTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/SyrKonradTheGrimTest.java new file mode 100644 index 0000000000..f24543cf40 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/SyrKonradTheGrimTest.java @@ -0,0 +1,33 @@ +package org.mage.test.cards.single; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class SyrKonradTheGrimTest extends CardTestPlayerBase { + + @Test + public void leavesOwnGraveyardTriggerTest() { + addCard(Zone.HAND, playerA, "Rest in Peace"); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); + addCard(Zone.BATTLEFIELD, playerA, "Syr Konrad, the Grim"); + // These leaving the graveyard *should* cause loss of life + addCard(Zone.GRAVEYARD, playerA, "Grizzly Bears", 2); + // These ones *shouldn't* + addCard(Zone.GRAVEYARD, playerB, "Grizzly Bears"); + setStopAt(1, PhaseStep.UNTAP); + execute(); + + assertLife(playerB, 20); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rest in Peace"); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerA, 0); + assertGraveyardCount(playerB, 0); + assertLife(playerA, 20); + assertLife(playerB, 18); + } +}