mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
consolidate "Sacrifice all [filter] you control"
This commit is contained in:
parent
1b9335c788
commit
8a07ff30b9
9 changed files with 217 additions and 195 deletions
|
|
@ -0,0 +1,44 @@
|
|||
package org.mage.test.cards.single.nem;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class DeathPitOfferingTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.d.DeathPitOffering Death Pit Offering} {2}{B}{B}
|
||||
* Enchantment
|
||||
* When Death Pit Offering enters the battlefield, sacrifice all creatures you control.
|
||||
* Creatures you control get +2/+2.
|
||||
*/
|
||||
private static final String offering = "Death Pit Offering";
|
||||
|
||||
@Test
|
||||
public void test_Trigger() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.HAND, playerA, offering);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
||||
|
||||
// Will be sacrificed:
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 2);
|
||||
|
||||
// Will not be sacrificed:
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, offering);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, 4 + 1);
|
||||
assertPermanentCount(playerA, "Grizzly Bears", 0);
|
||||
assertGraveyardCount(playerA, "Grizzly Bears", 2);
|
||||
assertPermanentCount(playerB, "Grizzly Bears", 2);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package org.mage.test.cards.single.nem;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class OverlaidTerrainTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.o.OverlaidTerrain Overlaid Terrain} {2}{G}{G}
|
||||
* Enchantment
|
||||
* As Overlaid Terrain enters the battlefield, sacrifice all lands you control.
|
||||
* Lands you control have “{T}: Add two mana of any one color.”
|
||||
*/
|
||||
private static final String terrain = "Overlaid Terrain";
|
||||
|
||||
@Test
|
||||
public void test_Trigger() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.HAND, playerA, terrain);
|
||||
|
||||
// Will be sacrificed:
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
|
||||
// Will not be sacrificed:
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Taiga", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 2);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, terrain);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, 1 + 2);
|
||||
assertPermanentCount(playerA, "Forest", 0);
|
||||
assertGraveyardCount(playerA, "Forest", 4);
|
||||
assertPermanentCount(playerB, 4);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_Mana() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, terrain);
|
||||
addCard(Zone.HAND, playerA, "Swamp");
|
||||
addCard(Zone.HAND, playerA, "Ajani's Sunstriker"); // {W}{W}
|
||||
|
||||
playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Swamp");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ajani's Sunstriker");
|
||||
setChoice(playerA, "White"); // choice for mana color
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Ajani's Sunstriker", 1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue