From bafcff82ec0358d1fcf9de3edfdcb3670c10dd47 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 23 Jul 2014 17:22:32 +0200 Subject: [PATCH] Added a test. --- .../oneshot/damage/LightningBoltTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/LightningBoltTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/LightningBoltTest.java index a03d66c4cb7..85c4f6a9610 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/LightningBoltTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/damage/LightningBoltTest.java @@ -78,4 +78,22 @@ public class LightningBoltTest extends CardTestPlayerBase { assertPermanentCount(playerB, "Craw Wurm", 0); } + @Test + public void testDamageTarmagoyf() { + addCard(Zone.BATTLEFIELD, playerA, "Mountain"); + addCard(Zone.HAND, playerA, "Lightning Bolt"); + + addCard(Zone.GRAVEYARD, playerB, "Forest"); + addCard(Zone.GRAVEYARD, playerB, "Clear a Path"); + addCard(Zone.BATTLEFIELD, playerB, "Tarmogoyf"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", "Tarmogoyf"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + // Tarmogoyf is a 2/3 that then takes 3 damage, then becomes a 3/4 as the + // Lightning Bolt is put into the graveyard and then state base actions are checked and Tarmogoyf survives. + assertPermanentCount(playerB, "Tarmogoyf", 1); + } + }