* Commander abilities - fixed that it increases commander tax after cast/play from non-command zone (as example: after Remand effect);

This commit is contained in:
Oleg Agafonov 2019-07-13 10:47:02 +04:00
parent 2197d8ee4a
commit 8c40a1d1a7
15 changed files with 105 additions and 92 deletions

View file

@ -183,4 +183,45 @@ public class CommandersCastTest extends CardTestCommander4Players {
execute();
assertAllCommandsUsed();
}
@Test
public void test_CastFromHandWithoutTaxIncrease() {
// Player order: A -> D -> C -> B
addCard(Zone.COMMAND, playerA, "Balduvian Bears", 1); // {1}{G}, 2/2, commander
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); // cast from command for {1}{G}, from hand for {1}{G}, from command for {1}{G}{2}
//
// Counter target spell. If that spell is countered this way, put it into its owners hand instead of into that players graveyard.
// Draw a card.
addCard(Zone.HAND, playerB, "Remand", 2);
addCard(Zone.BATTLEFIELD, playerB, "Island", 2); // counter 2 times
// cast 1 and counter (increase commander tax)
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Remand", "Balduvian Bears", "Balduvian Bears");
setChoice(playerA, "No"); // move to hand
checkCommandCardCount("cast 1", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 0);
checkHandCardCount("cast 1", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 1);
checkPermanentCount("cast 1", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 0);
///*
// cast 2 from hand without tax
castSpell(5, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears");
castSpell(5, PhaseStep.PRECOMBAT_MAIN, playerB, "Remand", "Balduvian Bears", "Balduvian Bears");
setChoice(playerA, "Yes"); // move to command zone
checkCommandCardCount("cast 2", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 1);
checkHandCardCount("cast 2", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 0);
checkPermanentCount("cast 2", 5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 0);
// cast 3 from command with tax for 1 play
castSpell(9, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears");
checkCommandCardCount("cast 3", 9, PhaseStep.BEGIN_COMBAT, playerA, "Balduvian Bears", 0);
checkHandCardCount("cast 3", 9, PhaseStep.BEGIN_COMBAT, playerA, "Balduvian Bears", 0);
checkPermanentCount("cast 3", 9, PhaseStep.BEGIN_COMBAT, playerA, "Balduvian Bears", 1);
setStrictChooseMode(true);
setStopAt(9, PhaseStep.END_TURN);
execute();
assertAllCommandsUsed();
}
}