implement [EOE] Kav Landseeker; fix & test Meandering Towershell along the way

This commit is contained in:
Susucre 2025-07-11 20:40:50 +02:00
parent 2b7f8869dd
commit 0dceeb78bd
8 changed files with 298 additions and 53 deletions

View file

@ -0,0 +1,56 @@
package org.mage.test.cards.single.eoe;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class KavLandseekerTest extends CardTestPlayerBase {
/**
* {@link mage.cards.k.KavLandseeker Kav Landseeker} {3}{R}
* Creature Kavu Soldier
* Menace (This creature cant be blocked except by two or more creatures.)
* When this creature enters, create a Lander token. At the beginning of the end step on your next turn, sacrifice that token. (Its an artifact with {2}, {T}, Sacrifice this token: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle.)
* 4/3
*/
private static final String kav = "Kav Landseeker";
@Test
public void test_Simple() {
addCard(Zone.HAND, playerA, kav);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, kav);
checkPermanentCount("T3: playerA has a Lander Token", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, playerA, "Lander Token", 1);
setStopAt(4, PhaseStep.PRECOMBAT_MAIN);
setStrictChooseMode(true);
execute();
assertPermanentCount(playerA, "Lander Token", 0);
}
@Test
public void test_TimeStop() {
addCard(Zone.HAND, playerA, kav);
addCard(Zone.HAND, playerA, "Time Stop"); // end the turn
addCard(Zone.BATTLEFIELD, playerA, "Volcanic Island", 6);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, kav);
checkPermanentCount("T3: playerA has a Lander Token", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, playerA, "Lander Token", 1);
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Time Stop");
setStopAt(6, PhaseStep.PRECOMBAT_MAIN);
setStrictChooseMode(true);
execute();
// the delayed trigger has been cleaned up since the "next turn" had no end step.
assertPermanentCount(playerA, "Lander Token", 1);
}
}

View file

@ -0,0 +1,64 @@
package org.mage.test.cards.single.ktk;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class MeanderingTowershellTest extends CardTestPlayerBase {
/**
* {@link mage.cards.m.MeanderingTowershell Meandering Towershell} {3}{G}{G}
* Creature Turtle
* Islandwalk (This creature cant be blocked as long as defending player controls an Island.)
* Whenever this creature attacks, exile it. Return it to the battlefield under your control tapped and attacking at the beginning of the declare attackers step on your next turn.
* 5/9
*/
private static final String towershell = "Meandering Towershell";
@Test
public void test_Simple() {
addCard(Zone.BATTLEFIELD, playerA, towershell);
attack(1, playerA, towershell, playerB);
checkPermanentCount("T3 First Main: no Towershell", 3, PhaseStep.PRECOMBAT_MAIN, playerA, playerA, "Meandering Powershell", 0);
checkLife("T3 First Main: playerB at 20 life", 3, PhaseStep.PRECOMBAT_MAIN, playerB, 20);
// Meandering Towershell comes back attacking.
setStrictChooseMode(true);
setStopAt(3, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, towershell, 1);
assertLife(playerB, 20 - 5);
}
@Test
public void test_TimeStop() {
addCard(Zone.BATTLEFIELD, playerA, towershell);
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
addCard(Zone.HAND, playerA, "Time Stop");
attack(1, playerA, towershell, playerB);
checkPermanentCount("T3 First Main: no Towershell", 3, PhaseStep.PRECOMBAT_MAIN, playerA, playerA, "Meandering Powershell", 0);
checkLife("T3 First Main: playerB at 20 life", 3, PhaseStep.PRECOMBAT_MAIN, playerB, 20);
castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Time Stop");
// Meandering Towershell never comes back on future turns.
setStrictChooseMode(true);
setStopAt(6, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertExileCount(playerA, towershell, 1);
assertPermanentCount(playerA, towershell, 0);
assertLife(playerB, 20);
}
}