mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Storm - Fixed handling of countered Storm spells. * Reworked Rebound more rule conform. * Fixed that zone change counter was not raised if a card is moved to stack.
This commit is contained in:
parent
4b6993f398
commit
830765996f
15 changed files with 276 additions and 264 deletions
|
|
@ -15,9 +15,16 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*/
|
||||
public class ReboundTest extends CardTestPlayerBase{
|
||||
|
||||
/**
|
||||
* Test that the spell with rebound is moved to exile if
|
||||
* the spell resolves
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testCastFromHandMovedToExile() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
|
||||
// Target creature gets +1/+0 until end of turn and is unblockable this turn.
|
||||
addCard(Zone.HAND, playerA, "Distortion Strike");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
|
||||
|
|
@ -27,9 +34,91 @@ public class ReboundTest extends CardTestPlayerBase{
|
|||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
//check exile and graveyard
|
||||
|
||||
//check exile and graveyard
|
||||
assertExileCount("Distortion Strike", 1);
|
||||
assertGraveyardCount(playerA, 0);
|
||||
}
|
||||
/**
|
||||
* Test that the spell with rebound can be cast again
|
||||
* on the beginning of the next upkeep without paying mana costs
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testRecastFromExile() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
|
||||
// Target creature gets +1/+0 until end of turn and is unblockable this turn.
|
||||
addCard(Zone.HAND, playerA, "Distortion Strike");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Distortion Strike", "Memnite");
|
||||
|
||||
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
//check exile and graveyard
|
||||
assertPowerToughness(playerA, "Memnite", 2, 1);
|
||||
assertExileCount("Distortion Strike", 0);
|
||||
assertGraveyardCount(playerA, "Distortion Strike", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a countered spell with rebound
|
||||
* is not cast again
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testDontRecastAfterCounter() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
|
||||
// Target creature gets +1/+0 until end of turn and is unblockable this turn.
|
||||
addCard(Zone.HAND, playerA, "Distortion Strike");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
|
||||
addCard(Zone.HAND, playerB, "Counterspell");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Distortion Strike", "Memnite");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Counterspell", "Distortion Strike");
|
||||
|
||||
setStopAt(3, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
//check exile and graveyard
|
||||
assertGraveyardCount(playerB, "Counterspell", 1);
|
||||
assertGraveyardCount(playerA, "Distortion Strike", 1);
|
||||
|
||||
assertPowerToughness(playerA, "Memnite", 1, 1);
|
||||
assertExileCount("Distortion Strike", 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check that a fizzled spell with rebound
|
||||
* is not cast again on the next controllers upkeep
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testDontRecastAfterFizzling() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
|
||||
|
||||
// Target creature gets +1/+0 until end of turn and is unblockable this turn.
|
||||
addCard(Zone.HAND, playerA, "Distortion Strike");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 1);
|
||||
addCard(Zone.HAND, playerB, "Lightning Bolt", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Distortion Strike", "Memnite");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Memnite","Distortion Strike");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
//check exile and graveyard
|
||||
assertGraveyardCount(playerB, "Lightning Bolt", 1);
|
||||
assertGraveyardCount(playerA, "Distortion Strike", 1);
|
||||
assertGraveyardCount(playerA, "Memnite", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ package org.mage.test.cards.abilities.keywords;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -137,4 +136,32 @@ 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
|
||||
*/
|
||||
|
||||
|
||||
@Test
|
||||
public void testStormSpellCountered() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
// 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.)
|
||||
addCard(Zone.HAND, playerA, "Grapeshot");
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
|
||||
addCard(Zone.HAND, playerB, "Counterspell");
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public class CastThroughTimeTest extends CardTestPlayerBase {
|
|||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 14);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue