mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
fixed while on stack effects of copied spells not discarding when copy has left stack
This commit is contained in:
parent
bd92ced539
commit
7d07c220b0
3 changed files with 57 additions and 4 deletions
|
|
@ -0,0 +1,51 @@
|
|||
package org.mage.test.cards.continuous;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class SplitSecondTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCounterSpell() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 4);
|
||||
addCard(Zone.HAND, playerA, "Sudden Shock");
|
||||
addCard(Zone.HAND, playerA, "Counterspell");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sudden Shock", playerB);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Counterspell", "Sudden Shock");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Counterspell", 1);
|
||||
assertGraveyardCount(playerA, "Sudden Shock", 1);
|
||||
assertLife(playerB, 20 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCopiedSpell() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
addCard(Zone.HAND, playerA, "Doublecast");
|
||||
addCard(Zone.HAND, playerA, "Sudden Shock");
|
||||
addCard(Zone.HAND, playerA, "Raging Goblin");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Doublecast");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Sudden Shock", playerB);
|
||||
|
||||
// No split second spells are on the stack, effect should not apply anymore
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Raging Goblin");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerB, 20 - 2 - 2);
|
||||
assertPermanentCount(playerA, "Raging Goblin", 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue