mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Teysa and Gitrog fixes
This commit is contained in:
@@ -1589,4 +1589,111 @@ public class GameSimulatorTest extends SimulationTestCase {
|
||||
int numZombies = countCardsWithName(simGame, "Zombie");
|
||||
assertTrue(numZombies == 3);
|
||||
}
|
||||
|
||||
|
||||
public void testTeysaKarlovGitrogMonster() {
|
||||
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
addCard("Teysa Karlov", p);
|
||||
addCard("The Gitrog Monster", p);
|
||||
addCard("Dryad Arbor", p);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCard("Plains", p);
|
||||
addCardToZone("Plains", p, ZoneType.Library);
|
||||
}
|
||||
|
||||
Card armageddon = addCardToZone("Armageddon", p, ZoneType.Hand);
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
|
||||
SpellAbility armageddonSA = armageddon.getFirstSpellAbility();
|
||||
|
||||
GameSimulator sim = createSimulator(game, p);
|
||||
int score = sim.simulateSpellAbility(armageddonSA).value;
|
||||
assertTrue(score > 0);
|
||||
Game simGame = sim.getSimulatedGameState();
|
||||
|
||||
// Two cards drawn
|
||||
assertTrue(simGame.getPlayers().get(0).getZone(ZoneType.Hand).size() == 2);
|
||||
}
|
||||
|
||||
public void testTeysaKarlovGitrogMonsterGitrogDies() {
|
||||
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
Card teysa = addCard("Teysa Karlov", p);
|
||||
addCard("The Gitrog Monster", p);
|
||||
addCard("Dryad Arbor", p);
|
||||
|
||||
String indestructibilityName = "Indestructibility";
|
||||
Card indestructibility = addCard(indestructibilityName, p);
|
||||
|
||||
indestructibility.attachToEntity(teysa);
|
||||
|
||||
// update Indestructible state
|
||||
game.getAction().checkStateEffects(true);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCard("Plains", p);
|
||||
addCardToZone("Plains", p, ZoneType.Library);
|
||||
}
|
||||
|
||||
Card armageddon = addCardToZone("Wrath of God", p, ZoneType.Hand);
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
|
||||
SpellAbility armageddonSA = armageddon.getFirstSpellAbility();
|
||||
|
||||
GameSimulator sim = createSimulator(game, p);
|
||||
int score = sim.simulateSpellAbility(armageddonSA).value;
|
||||
assertTrue(score > 0);
|
||||
Game simGame = sim.getSimulatedGameState();
|
||||
|
||||
// One cards drawn
|
||||
assertTrue(simGame.getPlayers().get(0).getZone(ZoneType.Hand).size() == 1);
|
||||
}
|
||||
|
||||
public void testTeysaKarlovGitrogMonsterTeysaDies() {
|
||||
|
||||
Game game = initAndCreateGame();
|
||||
Player p = game.getPlayers().get(0);
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p);
|
||||
|
||||
addCard("Teysa Karlov", p);
|
||||
Card gitrog = addCard("The Gitrog Monster", p);
|
||||
addCard("Dryad Arbor", p);
|
||||
|
||||
String indestructibilityName = "Indestructibility";
|
||||
Card indestructibility = addCard(indestructibilityName, p);
|
||||
|
||||
indestructibility.attachToEntity(gitrog);
|
||||
|
||||
// update Indestructible state
|
||||
game.getAction().checkStateEffects(true);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
addCard("Plains", p);
|
||||
addCardToZone("Plains", p, ZoneType.Library);
|
||||
}
|
||||
|
||||
Card armageddon = addCardToZone("Wrath of God", p, ZoneType.Hand);
|
||||
|
||||
game.getPhaseHandler().devModeSet(PhaseType.MAIN2, p);
|
||||
|
||||
SpellAbility armageddonSA = armageddon.getFirstSpellAbility();
|
||||
|
||||
GameSimulator sim = createSimulator(game, p);
|
||||
int score = sim.simulateSpellAbility(armageddonSA).value;
|
||||
assertTrue(score > 0);
|
||||
Game simGame = sim.getSimulatedGameState();
|
||||
|
||||
// One cards drawn
|
||||
assertTrue(simGame.getPlayers().get(0).getZone(ZoneType.Hand).size() == 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user