mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Tests: fixed BlazingTorchTest
This commit is contained in:
parent
898d271c36
commit
19cd742f40
1 changed files with 13 additions and 3 deletions
|
@ -22,11 +22,13 @@ public class BlazingTorchTest extends CardTestPlayerBase {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, lion);
|
addCard(Zone.BATTLEFIELD, playerA, lion);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, torch);
|
addCard(Zone.BATTLEFIELD, playerA, torch);
|
||||||
|
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip");
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", lion);
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 18);
|
assertLife(playerB, 18);
|
||||||
|
@ -39,15 +41,21 @@ public class BlazingTorchTest extends CardTestPlayerBase {
|
||||||
public void testCardCopied() {
|
public void testCardCopied() {
|
||||||
addCard(Zone.BATTLEFIELD, playerA, plains, 2);
|
addCard(Zone.BATTLEFIELD, playerA, plains, 2);
|
||||||
addCard(Zone.BATTLEFIELD, playerA, lion);
|
addCard(Zone.BATTLEFIELD, playerA, lion);
|
||||||
|
// You may have Masterwork of Ingenuity enter the battlefield as a copy of any Equipment on the battlefield.
|
||||||
addCard(Zone.HAND, playerA, masterwork);
|
addCard(Zone.HAND, playerA, masterwork);
|
||||||
addCard(Zone.BATTLEFIELD, playerB, torch);
|
addCard(Zone.BATTLEFIELD, playerB, torch);
|
||||||
|
|
||||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, masterwork);
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, masterwork);
|
||||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip");
|
setChoice(playerA, "Yes"); // use copy
|
||||||
|
setChoice(playerA, torch);
|
||||||
|
|
||||||
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", lion);
|
||||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
setStopAt(1, PhaseStep.END_TURN);
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 18);
|
assertLife(playerB, 18);
|
||||||
|
@ -69,11 +77,13 @@ public class BlazingTorchTest extends CardTestPlayerBase {
|
||||||
setChoice(playerB, torch);
|
setChoice(playerB, torch);
|
||||||
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, halo);
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, halo);
|
||||||
|
|
||||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip");
|
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", lion);
|
||||||
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
activateAbility(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T},", playerB);
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
setStopAt(3, PhaseStep.END_TURN);
|
setStopAt(3, PhaseStep.END_TURN);
|
||||||
execute();
|
execute();
|
||||||
|
assertAllCommandsUsed();
|
||||||
|
|
||||||
assertLife(playerA, 20);
|
assertLife(playerA, 20);
|
||||||
assertLife(playerB, 20); // Ability resolves as it's from the equipped creature but damage is from torch and is prevented
|
assertLife(playerB, 20); // Ability resolves as it's from the equipped creature but damage is from torch and is prevented
|
||||||
|
|
Loading…
Reference in a new issue