fix #11211 (CR 602.3)

(Golgothian Sylex and Apocalypse Chime)
This commit is contained in:
xenohedron 2023-09-26 22:21:43 -04:00
parent e66c9900f7
commit 04dba063aa
5 changed files with 78 additions and 110 deletions

View file

@ -51,4 +51,30 @@ public class NamePredicateTest extends CardTestPlayerBase {
assertNamePredicate("by inner - non existing name must return zero", 0, "Island", true);
assertNamePredicate("by inner - existing name must work", 3, "Forest", true);
}
@Test
public void testCityInABottle() {
String bottle = "City in a Bottle"; // Artifact {2}
// Whenever one or more other nontoken permanents with a name originally printed in the Arabian Nights expansion
// are on the battlefield, their controllers sacrifice them.
// Players cant cast spells or play lands with a name originally printed in the Arabian Nights expansion.
String nomads = "Desert Nomads"; // Creature {2}{R} (originally printed in Arabian Nights)
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5); // printed in Arabian Nights, but first printed in Alpha
addCard(Zone.BATTLEFIELD, playerA, "Camel"); // originally printed in Arabian Nights
addCard(Zone.HAND, playerA, bottle);
addCard(Zone.HAND, playerA, nomads);
checkPlayableAbility("Nomads, unbottled", 1, PhaseStep.PRECOMBAT_MAIN , playerA, "Cast Desert Nomads", true);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, bottle);
checkGraveyardCount("Camel sacrificed" , 1, PhaseStep.BEGIN_COMBAT, playerA, "Camel", 1);
checkPlayableAbility("Nomads, bottled", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cast Desert Nomads", false);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertGraveyardCount(playerA, 1);
assertPermanentCount(playerA, bottle, 1);
assertPermanentCount(playerA, "Mountain", 5);
}
}