mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 04:12:14 -08:00
Implemented Idol of Endurance
This commit is contained in:
parent
0960794db4
commit
e914c38986
3 changed files with 391 additions and 0 deletions
|
|
@ -0,0 +1,125 @@
|
|||
package org.mage.test.cards.single;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class IdolOfEnduranceTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String idol = "Idol of Endurance";
|
||||
private static final String key = "Voltaic Key";
|
||||
private static final String sqr = "Squire";
|
||||
private static final String glrskr = "Glory Seeker";
|
||||
|
||||
@Test
|
||||
public void testIdol() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||
addCard(Zone.HAND, playerA, idol);
|
||||
addCard(Zone.GRAVEYARD, playerA, sqr);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, idol);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sqr);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, sqr, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIdol2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 5);
|
||||
addCard(Zone.HAND, playerA, idol);
|
||||
addCard(Zone.GRAVEYARD, playerA, sqr);
|
||||
addCard(Zone.GRAVEYARD, playerA, glrskr);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, idol);
|
||||
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sqr);
|
||||
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, glrskr);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, sqr, 1);
|
||||
assertPermanentCount(playerA, glrskr, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIdolTwice() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 8);
|
||||
addCard(Zone.BATTLEFIELD, playerA, key);
|
||||
addCard(Zone.HAND, playerA, idol);
|
||||
addCard(Zone.GRAVEYARD, playerA, sqr);
|
||||
addCard(Zone.GRAVEYARD, playerA, glrskr);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, idol);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},", idol);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sqr);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, glrskr);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, sqr, 1);
|
||||
assertPermanentCount(playerA, glrskr, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIdolTwice2() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 8);
|
||||
addCard(Zone.BATTLEFIELD, playerA, key);
|
||||
addCard(Zone.HAND, playerA, idol);
|
||||
addCard(Zone.GRAVEYARD, playerA, sqr);
|
||||
addCard(Zone.GRAVEYARD, playerA, glrskr);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, idol);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sqr);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},", idol);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{W}");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, glrskr);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, sqr, 1);
|
||||
assertPermanentCount(playerA, glrskr, 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue