add even more saga tests

enable the two ignored after #11619
This commit is contained in:
Susucre 2025-05-31 00:10:09 +02:00 committed by Failure
parent a609027e2f
commit e628cd0dc3
7 changed files with 314 additions and 2 deletions

View file

@ -48,7 +48,7 @@ public final class SummonEsperValigarmanda extends CardImpl {
// II, III, IV -- Add {R} for each lore counter on this Saga. You may cast an instant or sorcery card exiled with this Saga, and mana of any type can be spent to cast that spell.
sagaAbility.addChapterEffect(
this, SagaChapter.CHAPTER_I, SagaChapter.CHAPTER_IV,
this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_IV,
new SummonEsperValigarmandaCastEffect()
);
this.addAbility(sagaAbility);

View file

@ -0,0 +1,62 @@
package org.mage.test.cards.single.cmm;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class BattleAtTheHelvaultTest extends CardTestPlayerBase {
/**
* {@link mage.cards.b.BattleAtTheHelvault Battle at the Helvault} {4}{W}{W}
* Enchantment Saga
* I, II For each player, exile up to one target non-Saga, nonland permanent that player controls until this Saga leaves the battlefield.
* III Create Avacyn, a legendary 8/8 white Angel creature token with flying, vigilance, and indestructible.
*/
private static final String battle = "Battle at the Helvault";
@Ignore // goal of #11619 is to fix this nicely
@Test
public void test_SimplePlay() {
addCard(Zone.HAND, playerA, battle, 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 6);
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);
addCard(Zone.BATTLEFIELD, playerA, "Augmenting Automaton", 1);
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1);
addCard(Zone.BATTLEFIELD, playerB, "Bear Cub", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, battle);
addTarget(playerA, "Memnite");
addTarget(playerA, "Grizzly Bears");
checkExileCount("T1: Memnite exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 1);
checkExileCount("T1: Augmenting Automaton not exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Augmenting Automaton", 0);
checkExileCount("T1: Grizzly Bears exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Grizzly Bears", 1);
checkExileCount("T1: Bear Cub not exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Bear Cub", 0);
// turn 3
addTarget(playerA, "Augmenting Automaton");
addTarget(playerA, "Bear Cub");
checkExileCount("T3: Memnite exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 1);
checkExileCount("T3: Augmenting Automaton exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Augmenting Automaton", 1);
checkExileCount("T3: Grizzly Bears exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Grizzly Bears", 1);
checkExileCount("T3: Bear Cub exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Bear Cub", 1);
// turn 5
setStrictChooseMode(true);
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerA, "Memnite", 1);
assertPermanentCount(playerA, "Augmenting Automaton", 1);
assertPermanentCount(playerB, "Grizzly Bears", 1);
assertPermanentCount(playerB, "Bear Cub", 1);
assertPermanentCount(playerA, "Avacyn", 1);
}
}

View file

@ -0,0 +1,57 @@
package org.mage.test.cards.single.fic;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.player.TestPlayer;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class SummonEsperValigarmandaTest extends CardTestPlayerBase {
/**
* {@link mage.cards.s.SummonEsperValigarmanda Summon: Esper Valigarmanda} {3}{R}
* Enchantment Creature Saga Drake
* I Exile an instant or sorcery card from each graveyard.
* II, III, IV Add {R} for each lore counter on this Saga. You may cast an instant or sorcery card exiled with this Saga, and mana of any type can be spent to cast that spell.
* Flying, haste
*/
private static final String esper = "Summon: Esper Valigarmanda";
@Test
public void test_SimplePlay() {
addCard(Zone.HAND, playerA, esper, 1);
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4);
addCard(Zone.GRAVEYARD, playerB, "Lightning Bolt", 1);
addCard(Zone.GRAVEYARD, playerA, "Shock", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, esper);
setChoice(playerA, "Shock");
setChoice(playerA, "Lightning Bolt");
// turn 3
setChoice(playerA, "Shock"); // choose to be cast
setChoice(playerA, true); // choose to cast
addTarget(playerA, playerB);
checkLife("T3: after bolt life", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, 20 - 2);
// turn 5
setChoice(playerA, TestPlayer.CHOICE_SKIP);
checkLife("T5: no cast", 5, PhaseStep.POSTCOMBAT_MAIN, playerB, 20 - 2);
// turn 7
setChoice(playerA, "Lightning Bolt");
setChoice(playerA, true); // choose to cast
addTarget(playerA, playerB);
setStrictChooseMode(true);
setStopAt(7, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertLife(playerB, 20 - 2 - 3);
}
}

View file

@ -0,0 +1,75 @@
package org.mage.test.cards.single.ltr;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class LongListOfTheEntsTest extends CardTestPlayerBase {
/**
* {@link mage.cards.l.LongListOfTheEnts Long List of the Ents} {G}
* Enchantment Saga
* (As this Saga enters and after your draw step, add a lore counter. Sacrifice after VI.)
* I, II, III, IV, V, VI Note a creature type that hasnt been noted for this Saga. When you next cast a creature spell of that type this turn, that creature enters with an additional +1/+1 counter on it.
*/
private static final String list = "Long List of the Ents";
@Test
public void test_SimplePlay() {
addCard(Zone.HAND, playerA, list, 1);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
addCard(Zone.HAND, playerA, "Memnite", 1); // Construct
addCard(Zone.HAND, playerA, "Augmenting Automaton", 1); // Construct
addCard(Zone.HAND, playerA, "Grizzly Bears", 1); // Bear
addCard(Zone.HAND, playerA, "Bear Cub", 1); // Bear
addCard(Zone.HAND, playerA, "Woodland Changeling", 1); // Changeling
addCard(Zone.HAND, playerA, "Llanowar Elves", 1); // Elf Druid
addCard(Zone.HAND, playerA, "Balduvian Bears", 1); // Bear
addCard(Zone.HAND, playerA, "Centaur Courser", 1); // Centaur Warrior
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, list);
setChoice(playerA, "Construct");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", true);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Augmenting Automaton");
// turn 3
setChoice(playerA, "Bear");
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Grizzly Bears");
// turn 5
setChoice(playerA, "Warrior");
castSpell(5, PhaseStep.POSTCOMBAT_MAIN, playerA, "Bear Cub");
// turn 7
setChoice(playerA, "Centaur");
castSpell(7, PhaseStep.POSTCOMBAT_MAIN, playerA, "Centaur Courser");
// turn 9
setChoice(playerA, "Druid");
castSpell(9, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", true);
castSpell(9, PhaseStep.POSTCOMBAT_MAIN, playerA, "Llanowar Elves");
// turn 11
setChoice(playerA, "Elf");
castSpell(11, PhaseStep.POSTCOMBAT_MAIN, playerA, "Woodland Changeling");
setStrictChooseMode(true);
setStopAt(12, PhaseStep.END_TURN);
execute();
assertCounterCount(playerA, "Memnite", CounterType.P1P1, 1);
assertCounterCount(playerA, "Augmenting Automaton", CounterType.P1P1, 0);
assertCounterCount(playerA, "Grizzly Bears", CounterType.P1P1, 1);
assertCounterCount(playerA, "Bear Cub", CounterType.P1P1, 0);
assertCounterCount(playerA, "Centaur Courser", CounterType.P1P1, 1);
assertCounterCount(playerA, "Balduvian Bears", CounterType.P1P1, 0);
assertCounterCount(playerA, "Llanowar Elves", CounterType.P1P1, 1);
assertCounterCount(playerA, "Woodland Changeling", CounterType.P1P1, 1);
}
}

View file

@ -0,0 +1,53 @@
package org.mage.test.cards.single.ltr;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class ScrollOfIsildurTest extends CardTestPlayerBase {
/**
* {@link mage.cards.t.TrialOfATimeLord Scroll of Isildur} {2}{U}
* Enchantment Saga
* (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
* I Gain control of up to one target artifact for as long as you control this Saga. The Ring tempts you.
* II Tap up to two target creatures. Put a stun counter on each of them.
* III Draw a card for each tapped creature target opponent controls.
*/
private static final String scroll = "Scroll of Isildur";
@Test
public void test_SimplePlay() {
addCard(Zone.HAND, playerA, scroll, 1);
addCard(Zone.BATTLEFIELD, playerA, "Symbiotic Deployment", 1); // skip your draw step
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1);
addCard(Zone.BATTLEFIELD, playerB, "Bear Cub", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, scroll);
addTarget(playerA, "Memnite");
checkPermanentCount("T1: Memnite is controlled by A", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 1);
// turn 3
addTarget(playerA, "Grizzly Bears^Bear Cub");
checkPermanentCount("T3: Memnite is controlled by A", 3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Memnite", 1);
// turn 5
checkPermanentCount("T5: Memnite is controlled by A before III", 5, PhaseStep.UPKEEP, playerA, "Memnite", 1);
addTarget(playerA, playerB);
setStrictChooseMode(true);
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerB, "Memnite", 1);
assertHandCount(playerA, 2);
}
}

View file

@ -1,4 +1,4 @@
package org.mage.test.cards.single.ltr;
package org.mage.test.cards.single.pip;
import mage.constants.PhaseStep;
import mage.constants.Zone;

View file

@ -0,0 +1,65 @@
package org.mage.test.cards.single.who;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class TrialOfATimeLordTest extends CardTestPlayerBase {
/**
* {@link mage.cards.t.TrialOfATimeLord Trial of a Time Lord} {1}{W}{W}
* Enchantment Saga
* (As this Saga enters and after your draw step, add a lore counter. Sacrifice after IV.)
* I, II, III Exile target nontoken creature an opponent controls until this Saga leaves the battlefield.
* IV Starting with you, each player votes for innocent or guilty. If guilty gets more votes, the owner of each card exiled with this Saga puts that card on the bottom of their library.
*/
private static final String trial = "Trial of a Time Lord";
@Ignore // goal of #11619 is to fix this nicely
@Test
public void test_SimplePlay() {
addCard(Zone.HAND, playerA, trial, 1);
addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
addCard(Zone.BATTLEFIELD, playerB, "Memnite", 1);
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 1);
addCard(Zone.BATTLEFIELD, playerB, "Bear Cub", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, trial);
addTarget(playerA, "Memnite");
checkExileCount("T1: Memnite exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Memnite", 1);
checkExileCount("T1: Grizzly Bears not exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Grizzly Bears", 0);
checkExileCount("T1: Bear Cub not exiled", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Bear Cub", 0);
// turn 3
addTarget(playerA, "Grizzly Bears");
checkExileCount("T3: Memnite exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Memnite", 1);
checkExileCount("T3: Grizzly Bears exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Grizzly Bears", 1);
checkExileCount("T3: Bear Cub not exiled", 3, PhaseStep.POSTCOMBAT_MAIN, playerB, "Bear Cub", 0);
// turn 5
addTarget(playerA, "Bear Cub");
checkExileCount("T5: Memnite exiled", 5, PhaseStep.POSTCOMBAT_MAIN, playerB, "Memnite", 1);
checkExileCount("T5: Grizzly Bears exiled", 5, PhaseStep.POSTCOMBAT_MAIN, playerB, "Grizzly Bears", 1);
checkExileCount("T5: Bear Cub exiled", 5, PhaseStep.POSTCOMBAT_MAIN, playerB, "Bear Cub", 1);
// turn 7
setChoice(playerA, true); // Innocent
setChoice(playerB, false); // Guilty
setStrictChooseMode(true);
setStopAt(7, PhaseStep.POSTCOMBAT_MAIN);
execute();
assertPermanentCount(playerB, "Memnite", 1);
assertPermanentCount(playerB, "Grizzly Bears", 1);
assertPermanentCount(playerB, "Bear Cub", 1);
}
}