add boolean int method for setChoice

This commit is contained in:
Evan Kranzler 2021-07-31 08:11:57 -04:00
parent 530cd627cc
commit 1baf523522
8 changed files with 16 additions and 12 deletions

View file

@ -606,7 +606,7 @@ public class KickerTest extends CardTestPlayerBase {
// Multikicker (You may pay an additional {B} any number of times as you cast this spell.)
// When Bloodhusk Ritualist enters the battlefield, target opponent discards a card for each time it was kicked.
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Bloodhusk Ritualist");
setChoice(playerA, "Yes", 2); // 2 x Multikicker
setChoice(playerA, true, 2); // 2 x Multikicker
setChoice(playerA, false); // stop the kicking
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", "Bloodhusk Ritualist");
addTarget(playerA, playerB); // target for kicker's trigger (discard cards)

View file

@ -142,7 +142,7 @@ public class ModularTest extends CardTestPlayerBase {
// put three -1/-1 counters on lancer, which leaves it with one +1/+1
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Puncture Blast", "Arcbound Lancer");
setChoice(playerA, "Yes", 2);
setChoice(playerA, true, 2);
checkStackSize("stack1", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 1);
// kill lancer with one +1/+1 counter on it

View file

@ -74,7 +74,7 @@ public class TwinningStaffTest extends CardTestPlayerBase {
addCard(Zone.HAND, playerA, fork);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, disfigure, bear);
setChoice(playerA, "Yes", 2);
setChoice(playerA, true, 2);
addTarget(playerA, elite, 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, fork, disfigure, disfigure);

View file

@ -132,7 +132,7 @@ public class TheOzolithTest extends CardTestPlayerBase {
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, MURDER, FERTILID);
setChoice(playerA, "Yes", 2); // Move counters at beginning of combat
setChoice(playerA, true, 2); // Move counters at beginning of combat
setStopAt(1, PhaseStep.END_TURN);
execute();

View file

@ -67,7 +67,7 @@ public class UnpredictableCycloneTest extends CardTestPlayerBase {
showAvailableAbilities("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
setChoice(playerA, "Thought Reflection"); // apply doubling first
setChoice(playerA, "Yes", 2); // cast found library cards
setChoice(playerA, true, 2); // cast found library cards
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
@ -92,10 +92,10 @@ public class UnpredictableCycloneTest extends CardTestPlayerBase {
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cycling");
// from first cycle call
setChoice(playerA, "Thought Reflection", 2); // 3 triggers: 2x doubling + 1x cycle
setChoice(playerA, "Yes", 2); // cast found library cards for 2x doubling triggers
setChoice(playerA, true, 2); // cast found library cards for 2x doubling triggers
// from triggered cycle
setChoice(playerA, "Thought Reflection", 1); // 2 triggers: 1x doubling + 1x cycle
setChoice(playerA, "Yes", 2); // cast found library cards for 2x doubling triggers
setChoice(playerA, true, 2); // cast found library cards for 2x doubling triggers
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);

View file

@ -33,7 +33,7 @@ public class DivineVisitationTest extends CardTestPlayerBase {
// Let the opponent draw
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ancestral Recall", playerB);
setChoice(playerA, "Whenever an opponent draws a card", 2); // choose order of triggers
setChoice(playerB, "No", 3); // Decline to pay 2
setChoice(playerB, false, 3); // Decline to pay 2
setStopAt(1, PhaseStep.BEGIN_COMBAT);
setStrictChooseMode(true);

View file

@ -208,7 +208,7 @@ public class VotingTest extends CardTestCommander4PlayersWithAIHelps {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, illusion);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, lieutenant);
setChoice(playerA, "Yes", 4);
setChoice(playerA, true, 4);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
@ -228,7 +228,7 @@ public class VotingTest extends CardTestCommander4PlayersWithAIHelps {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, illusion);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, lieutenant);
setChoice(playerA, "Yes", 5);
setChoice(playerA, true, 5);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
@ -250,7 +250,7 @@ public class VotingTest extends CardTestCommander4PlayersWithAIHelps {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, illusion);
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, illusion);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, lieutenant);
setChoice(playerB, "Yes", 4);
setChoice(playerB, true, 4);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);

View file

@ -1923,7 +1923,11 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
* @param choice
*/
public void setChoice(TestPlayer player, boolean choice) {
setChoice(player, choice ? "Yes" : "No");
setChoice(player, choice, 1);
}
public void setChoice(TestPlayer player, boolean choice, int timesToChoose) {
setChoice(player, choice ? "Yes" : "No", timesToChoose);
}
public void setChoice(TestPlayer player, String choice) {