mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
tests: added batch event tests for #13089
This commit is contained in:
parent
d3be2f1f50
commit
12220a7ada
1 changed files with 46 additions and 2 deletions
|
|
@ -441,7 +441,7 @@ public class SacrificeDiesTriggerTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_SavraQueenOfTheGolgari_SacrificeAnother() {
|
public void test_SingleEvent_SavraQueenOfTheGolgari_SacrificeAnother() {
|
||||||
// Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature.
|
// Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature.
|
||||||
// Whenever you sacrifice a green creature, you may gain 2 life.
|
// Whenever you sacrifice a green creature, you may gain 2 life.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Savra, Queen of the Golgari"); // {2}{B}{G}
|
addCard(Zone.BATTLEFIELD, playerA, "Savra, Queen of the Golgari"); // {2}{B}{G}
|
||||||
|
|
@ -465,7 +465,7 @@ public class SacrificeDiesTriggerTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test_SavraQueenOfTheGolgari_SacrificeItself() {
|
public void test_SingleEvent_SavraQueenOfTheGolgari_SacrificeItself() {
|
||||||
// make sure it works on itself, bug #13089
|
// make sure it works on itself, bug #13089
|
||||||
|
|
||||||
// Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature.
|
// Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature.
|
||||||
|
|
@ -489,4 +489,48 @@ public class SacrificeDiesTriggerTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertLife(playerA, 20 + 2); // from green trigger
|
assertLife(playerA, 20 + 2); // from green trigger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_BatchEvent_ForgeNeverwinterCharlatan_SacrificeAnother() {
|
||||||
|
// Whenever one or more players sacrifice one or more creatures, you create a tapped Treasure token.
|
||||||
|
// This ability triggers only once each turn.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Forge, Neverwinter Charlatan");
|
||||||
|
//
|
||||||
|
// {2}, {T}, Sacrifice a creature: Draw a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||||
|
//
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||||
|
|
||||||
|
// sacrifice another creature
|
||||||
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice");
|
||||||
|
setChoice(playerA, "Grizzly Bears"); // to sacrifice
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertTokenCount(playerA, "Treasure Token", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test_BatchEvent_ForgeNeverwinterCharlatan_SacrificeItself() {
|
||||||
|
// Whenever one or more players sacrifice one or more creatures, you create a tapped Treasure token.
|
||||||
|
// This ability triggers only once each turn.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Forge, Neverwinter Charlatan");
|
||||||
|
//
|
||||||
|
// {2}, {T}, Sacrifice a creature: Draw a card.
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Phyrexian Vault", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||||
|
|
||||||
|
// sacrifice itself
|
||||||
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice");
|
||||||
|
setChoice(playerA, "Forge, Neverwinter Charlatan"); // to sacrifice
|
||||||
|
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertTokenCount(playerA, "Treasure Token", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue