From 8c0ed8a749614b383942d235133a7a4d31def7e2 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 11 May 2024 14:27:59 +0400 Subject: [PATCH] tests: additional test for Double Season and test framework --- .../cards/replacement/DoublingSeasonTest.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java index 4d83309eedd..78d0750269b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java @@ -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