mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Implement Read Ahead mechanic (#9407)
* implement Read Ahead mechanic * [DMU] Implemented The World Spell * [DMU] Implemented The Elder Dragon War * added read ahead test * fix verify failure * small change to test * fix read ahead text
This commit is contained in:
parent
e557b7a04b
commit
90bd0dbf63
5 changed files with 300 additions and 7 deletions
|
|
@ -0,0 +1,72 @@
|
|||
package org.mage.test.cards.enchantments;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ReadAheadTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String war = "The Elder Dragon War";
|
||||
private static final String recall = "Ancestral Recall";
|
||||
|
||||
@Test
|
||||
public void testElderDragonWarChapter1() {
|
||||
addCard(Zone.HAND, playerA, war);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, war);
|
||||
setChoice(playerA, "X=1");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20 - 2);
|
||||
assertPermanentCount(playerA, war, 1);
|
||||
assertGraveyardCount(playerA, war, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testElderDragonWarChapter2() {
|
||||
addCard(Zone.HAND, playerA, war);
|
||||
addCard(Zone.HAND, playerA, recall);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, war);
|
||||
setChoice(playerA, "X=2");
|
||||
setChoice(playerA, recall);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertGraveyardCount(playerA, recall, 1);
|
||||
assertHandCount(playerA, recall, 0);
|
||||
assertPermanentCount(playerA, war, 1);
|
||||
assertGraveyardCount(playerA, war, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testElderDragonWarChapter3() {
|
||||
addCard(Zone.HAND, playerA, war);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, war);
|
||||
setChoice(playerA, "X=3");
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
setStrictChooseMode(true);
|
||||
execute();
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertPermanentCount(playerA, "Dragon Token", 1);
|
||||
assertPermanentCount(playerA, war, 0);
|
||||
assertGraveyardCount(playerA, war, 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue