mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Ketramose, the New Dawn - fixed that it doesn't trigger on itself (miss setLeavesTheBattlefieldTrigger, related to eafbd5a95c)
This commit is contained in:
parent
5b68b20a92
commit
0b4dbaabba
3 changed files with 52 additions and 28 deletions
|
|
@ -5,17 +5,27 @@ import mage.constants.Zone;
|
|||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class KetramoseTheNewDawnTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* Whenever one or more cards are put into exile from graveyards and/or the battlefield
|
||||
* during your turn, you draw a card and lose 1 life.
|
||||
*/
|
||||
private final String ketramose = "Ketramose, the New Dawn";
|
||||
/**
|
||||
* {T}: Target player exiles a card from their graveyard.
|
||||
* {1}, Exile Relic of Progenitus: Exile all cards from all graveyards. Draw a card.
|
||||
*/
|
||||
private final String relic = "Relic of Progenitus";
|
||||
/**
|
||||
* Exile target creature you control, then return it to the battlefield under its owner's control.
|
||||
*/
|
||||
private final String ephemerate = "Ephemerate";
|
||||
|
||||
@Test
|
||||
public void testExile() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, ketramose);
|
||||
addCard(Zone.BATTLEFIELD, playerA, relic);
|
||||
addCard(Zone.HAND, playerA, ephemerate);
|
||||
|
|
@ -23,17 +33,29 @@ public class KetramoseTheNewDawnTest extends CardTestPlayerBase {
|
|||
addCard(Zone.GRAVEYARD, playerA, "Forest", 10);
|
||||
addCard(Zone.GRAVEYARD, playerB, "Forest", 10);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:");
|
||||
// exile single
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Target player");
|
||||
addTarget(playerA, playerB);
|
||||
addTarget(playerB, "Forest");
|
||||
activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{1}, Exile {this}");
|
||||
waitStackResolved(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, ephemerate, ketramose, true);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkLife("exile single - after", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1);
|
||||
|
||||
// must have two triggers: exile on cost and exile on resolve
|
||||
// exile on cost
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, Exile {this}");
|
||||
checkStackSize("exile on cost - ability + trigger on stack", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 2);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, 1);
|
||||
checkLife("exile on cost - after trigger", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1 - 1);
|
||||
// exile on resolve
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkLife("exile on resolve - after trigger", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1 - 1 - 1);
|
||||
|
||||
// exile ketramose itself and return
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, ephemerate, ketramose);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkLife("exile itself - must trigger", 1, PhaseStep.PRECOMBAT_MAIN, playerA, 20 - 1 - 1 - 1 - 1);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, 4);
|
||||
assertLife(playerA, 20 - 3);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue