* JumpStart - fixed that card was not always moved to exile after cast from graveyard.

This commit is contained in:
LevelX2 2018-09-26 16:30:17 +02:00
parent fa7ae3ee35
commit 61b1b1ba05
4 changed files with 103 additions and 5 deletions

View file

@ -0,0 +1,71 @@
package org.mage.test.cards.abilities.keywords;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* Jump-start is found on instants and sorceries. You can cast a card with
* jump-start from your graveyard by paying all its regular costs and one
* additional cost: discarding a card from your hand.
*
* @author LevelX2
*/
public class JumpStartTest extends CardTestPlayerBase {
@Test
public void testNormalUse() {
// Direct Current deals 2 damage to any target.
// Jump-start
addCard(Zone.HAND, playerA, "Direct Current", 1); // Sorcery {1}{R}{R}
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
addCard(Zone.HAND, playerA, "Disenchant", 1);
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // 2/2
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Direct Current", "Silvercoat Lion");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Direct Current with jump-start", playerB);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
assertHandCount(playerA, 0); // 1 from sacrificed Clue and 1 from draw of turn 3
assertExileCount(playerA, "Direct Current", 1);
assertLife(playerA, 20);
assertLife(playerB, 18);
}
@Test
public void testCastFromGraveyardCountered() {
// Direct Current deals 2 damage to any target.
// Jump-start
addCard(Zone.HAND, playerA, "Direct Current", 1); // Sorcery {1}{R}{R}
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
addCard(Zone.HAND, playerA, "Disenchant", 1);
addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion", 1); // 2/2
addCard(Zone.HAND, playerB, "Counterspell", 1);
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Direct Current", "Silvercoat Lion");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Direct Current with jump-start", playerB);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Counterspell", "Direct Current");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertGraveyardCount(playerB, "Silvercoat Lion", 1);
assertGraveyardCount(playerB, "Counterspell", 1);
assertHandCount(playerA, 0); // 1 from sacrificed Clue and 1 from draw of turn 3
assertGraveyardCount(playerA, "Direct Current", 0);
assertExileCount(playerA, "Direct Current", 1);
assertLife(playerA, 20);
assertLife(playerB, 20);
}
}

View file

@ -10,7 +10,7 @@ public class CryptRatsTest extends CardTestPlayerBase {
String cRats = "Crypt Rats";
@Test
public void damageOnlyCreatureAndPlayers(){
public void damageOnlyCreatureAndPlayers() {
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
addCard(Zone.BATTLEFIELD, playerA, cRats, 1);
addCard(Zone.BATTLEFIELD, playerB, "Shivan Dragon", 1);
@ -20,6 +20,7 @@ public class CryptRatsTest extends CardTestPlayerBase {
setChoice(playerA, "X=4");
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertLife(playerA, 16);
assertLife(playerB, 16);
assertGraveyardCount(playerA, cRats, 1);