mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
Implement Freerunning mechanic (ready for review) (#12485)
* [ACR] Implement Eagle Vision * add test * [ACR] Implement Achilles Davenport * [ACR] Implement Chain Assassination * [ACR] Implement Restart Sequence * update test * add test for non-assassin, non-commander
This commit is contained in:
parent
6164953637
commit
e851e04906
8 changed files with 403 additions and 0 deletions
|
|
@ -0,0 +1,91 @@
|
|||
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.CardTestCommanderDuelBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class FreerunningTest extends CardTestCommanderDuelBase {
|
||||
|
||||
private static final String vision = "Eagle Vision";
|
||||
|
||||
@Test
|
||||
public void testRegular() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Zone.HAND, playerA, vision);
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, vision);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
assertTappedCount("Island", true, 5);
|
||||
}
|
||||
|
||||
private static final String poisoner = "Hired Poisoner";
|
||||
|
||||
@Test
|
||||
public void testAssassin() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, poisoner);
|
||||
addCard(Zone.HAND, playerA, vision);
|
||||
|
||||
attack(1, playerA, poisoner, playerB);
|
||||
|
||||
setChoice(playerA, true);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, vision);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
}
|
||||
|
||||
private static final String goblin = "Raging Goblin";
|
||||
|
||||
@Test
|
||||
public void testCommander() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 2 + 1);
|
||||
addCard(Zone.COMMAND, playerA, goblin);
|
||||
addCard(Zone.HAND, playerA, vision);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, goblin);
|
||||
|
||||
attack(1, playerA, goblin, playerB);
|
||||
|
||||
setChoice(playerA, true);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, vision);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNeither() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 5 + 1);
|
||||
addCard(Zone.HAND, playerA, goblin);
|
||||
addCard(Zone.HAND, playerA, vision);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, goblin);
|
||||
|
||||
attack(1, playerA, goblin, playerB);
|
||||
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, vision);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 3);
|
||||
assertTappedCount("Volcanic Island", true, 5 + 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue