tests: additional test for Double Season and test framework

This commit is contained in:
Oleg Agafonov 2024-05-11 14:27:59 +04:00
parent 085ed5a7a7
commit 8c0ed8a749

View file

@ -227,7 +227,7 @@ public class DoublingSeasonTest extends CardTestPlayerBase {
try {
execute();
Assert.fail("must throw exception on execute");
} catch (Throwable e) {
if (!e.getMessage().contains("Can't find available command - attack:Lightning Rager")) {
@ -240,6 +240,30 @@ public class DoublingSeasonTest extends CardTestPlayerBase {
assertTappedCount("Lightning Rager", true, 0);
}
@Test
public void test_AddCardOrderDepends() {
// put double season after planeswalker, so no x2 on etb
// planeswalker, 2 starting loyalty
// +1: Draw a card, then discard a card at random.
addCard(Zone.BATTLEFIELD, playerA, "Tibalt, the Fiend-Blooded");
addCard(Zone.BATTLEFIELD, playerA, "Doubling Season");
// 2 starting loyalty
// on etb: no double season effects
int onEtbCount = 2;
checkPermanentCounters("etb counters", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tibalt, the Fiend-Blooded", CounterType.LOYALTY, onEtbCount);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertCounterCount("Tibalt, the Fiend-Blooded", CounterType.LOYALTY, onEtbCount);
}
/**
* Gatherer Ruling: 10/1/2005: Planeswalkers will enter the battlefield with
* double the normal amount of loyalty counters. However, if you activate an