mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Added a test for storm with flashback.
This commit is contained in:
parent
635c33fa87
commit
3bac7b550c
1 changed files with 61 additions and 29 deletions
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package org.mage.test.cards.abilities.keywords;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
@ -41,23 +40,20 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
public class StormTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* 702.39. Storm
|
||||
* 702.39a Storm is a triggered ability that functions on the stack. “Storm” means “When you cast this
|
||||
* spell, put a copy of it onto the stack for each other spell that was cast before it this turn. If the
|
||||
* 702.39. Storm 702.39a Storm is a triggered ability that functions on the
|
||||
* stack. “Storm” means “When you cast this spell, put a copy of it onto the
|
||||
* stack for each other spell that was cast before it this turn. If the
|
||||
* spell has any targets, you may choose new targets for any of the copies.”
|
||||
* 702.39b If a spell has multiple instances of storm, each triggers separately.
|
||||
*
|
||||
* 702.39b If a spell has multiple instances of storm, each triggers
|
||||
* separately.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Grapeshot
|
||||
* Sorcery, 1R (2)
|
||||
* Grapeshot deals 1 damage to target creature or player.
|
||||
* Storm (When you cast this spell, copy it for each spell cast before it
|
||||
* this turn. You may choose new targets for the copies.)
|
||||
*
|
||||
* Grapeshot Sorcery, 1R (2) Grapeshot deals 1 damage to target creature or
|
||||
* player. Storm (When you cast this spell, copy it for each spell cast
|
||||
* before it this turn. You may choose new targets for the copies.)
|
||||
*
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testStorm1x() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
@ -105,7 +101,7 @@ public class StormTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerB, 7);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testStorm4x() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||
|
@ -123,7 +119,7 @@ public class StormTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerB, 3);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testNoStorm() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
@ -136,13 +132,13 @@ public class StormTest extends CardTestPlayerBase {
|
|||
|
||||
assertLife(playerB, 19);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If a spell with storm gets countered, the strom trigger is also stifled, which isn't how its supposed to work.
|
||||
* For example a Chalic of the Void set to 1 counters Flusterstorm and also counters the storm trigger, which shouldn't happen
|
||||
* If a spell with storm gets countered, the strom trigger is also stifled,
|
||||
* which isn't how its supposed to work. For example a Chalic of the Void
|
||||
* set to 1 counters Flusterstorm and also counters the storm trigger, which
|
||||
* shouldn't happen
|
||||
*/
|
||||
|
||||
|
||||
@Test
|
||||
public void testStormSpellCountered() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
|
@ -155,20 +151,21 @@ public class StormTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Lightning Bolt", playerB);
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grapeshot", playerB);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Counterspell", "Grapeshot");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 16); // 3 (Lightning Bolt) + 1 from Storm copied Grapeshot
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* I provide a game log fo the issue with storm mentioned earlier. I guess Pyromancer Ascension is a culprit.
|
||||
*
|
||||
*
|
||||
* I provide a game log fo the issue with storm mentioned earlier. I guess
|
||||
* Pyromancer Ascension is a culprit.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testStormAndPyromancerAscension() {
|
||||
|
@ -178,7 +175,7 @@ public class StormTest extends CardTestPlayerBase {
|
|||
// Whenever you cast an instant or sorcery spell while Pyromancer Ascension has two or more quest counters on it, you may copy that spell. You may choose new targets for the copy.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pyromancer Ascension", 1);
|
||||
// Grapeshot deals 1 damage to target creature or player. - Sorcery {1}{R}
|
||||
// Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.)
|
||||
// Storm (When you cast this spell, copy it for each spell cast before it this turn. You may choose new targets for the copies.)
|
||||
addCard(Zone.LIBRARY, playerA, "Grapeshot", 2);
|
||||
skipInitShuffling();
|
||||
// Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library.
|
||||
|
@ -198,5 +195,40 @@ public class StormTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerA, "Grapeshot", 1);
|
||||
assertCounterCount("Pyromancer Ascension", CounterType.QUEST, 2);
|
||||
assertLife(playerB, 8); // 6 from the Shocks + 5 from Grapeshot + 1 from Pyromancer Ascencsion copy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* I provide a game log fo the issue with storm mentioned earlier. I guess
|
||||
* Pyromancer Ascension is a culprit.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testStormAndFlshback() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 8);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
// Geistflame deals 1 damage to target creature or player.
|
||||
// Flashback {3}{R} (You may cast this card from your graveyard for its flashback cost. Then exile it.)
|
||||
addCard(Zone.HAND, playerA, "Geistflame", 2); // {R}
|
||||
addCard(Zone.LIBRARY, playerA, "Grapeshot", 2);
|
||||
skipInitShuffling();
|
||||
// Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library.
|
||||
addCard(Zone.HAND, playerA, "Sleight of Hand");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sleight of Hand");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Geistflame", playerB);
|
||||
activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "Flashback {3}{R}");
|
||||
addTarget(playerA, playerB);
|
||||
castSpell(1, PhaseStep.END_COMBAT, playerA, "Geistflame", playerB);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grapeshot", playerB);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertExileCount("Geistflame", 1);
|
||||
assertGraveyardCount(playerA, "Geistflame", 1);
|
||||
assertGraveyardCount(playerA, "Grapeshot", 1);
|
||||
assertLife(playerB, 12); // 3 from the Geistflame + 5 from Grapeshot
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue