- Added puzzle PS_STX2 with GameState support.

This commit is contained in:
Michael Kamensky
2021-06-28 07:22:11 +03:00
parent ac23ad25fc
commit b5bc614c65
2 changed files with 43 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ public abstract class GameState {
ZONES.put(ZoneType.Library, "library"); ZONES.put(ZoneType.Library, "library");
ZONES.put(ZoneType.Exile, "exile"); ZONES.put(ZoneType.Exile, "exile");
ZONES.put(ZoneType.Command, "command"); ZONES.put(ZoneType.Command, "command");
ZONES.put(ZoneType.Sideboard, "sideboard");
} }
private int humanLife = -1; private int humanLife = -1;
@@ -398,6 +399,12 @@ public abstract class GameState {
// Need to figure out a better way to detect if it's actually on adventure. // Need to figure out a better way to detect if it's actually on adventure.
newText.append("|OnAdventure"); newText.append("|OnAdventure");
} }
if (c.isForetold()) {
newText.append("|Foretold");
}
if (c.isForetoldThisTurn()) {
newText.append("|ForetoldThisTurn");
}
} }
@@ -565,6 +572,13 @@ public abstract class GameState {
aiCardTexts.put(ZoneType.Command, categoryValue); aiCardTexts.put(ZoneType.Command, categoryValue);
} }
else if (categoryName.endsWith("sideboard")) {
if (isHuman)
humanCardTexts.put(ZoneType.Sideboard, categoryValue);
else
aiCardTexts.put(ZoneType.Sideboard, categoryValue);
}
else if (categoryName.startsWith("ability")) { else if (categoryName.startsWith("ability")) {
abilityString.put(categoryName.substring("ability".length()), categoryValue); abilityString.put(categoryName.substring("ability".length()), categoryValue);
} }
@@ -1391,6 +1405,12 @@ public abstract class GameState {
} }
} else if (info.equals("NoETBTrigs")) { } else if (info.equals("NoETBTrigs")) {
cardsWithoutETBTrigs.add(c); cardsWithoutETBTrigs.add(c);
} else if (info.equals("Foretold")) {
c.setForetold(true);
c.turnFaceDown(true);
c.addMayLookTemp(c.getOwner());
} else if (info.equals("ForetoldThisTurn")) {
c.setForetoldThisTurn(true);
} }
} }

View File

@@ -0,0 +1,23 @@
[metadata]
Name:Possibility Storm - Strixhaven: School of Mages #02
URL:https://i1.wp.com/www.possibilitystorm.com/wp-content/uploads/2021/05/173.-STX2-scaled.jpg
Goal:Win
Turns:1
Difficulty:Mythic
Description:Win this turn. You have 36 cards remaining in your library. Your opponent has 40. Assume that any that are drawn are not relevant to the puzzle. Mystic Reflection is Foretold in exile and you have three Lessons in your sideboard: Expanded Anatomy, Environmental Sciences, Confront the Past
[state]
humanlife=20
ailife=19
turn=2
activeplayer=human
activephase=MAIN1
humanhand=Plumb the Forbidden;Peer into the Abyss;Quandrix Command;Poison the Cup
humanlibrary=Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt
humanbattlefield=Kasmina, Enigma Sage|Counters:LOYALTY=4;Garruk, Cursed Huntsman|Counters:LOYALTY=5;Gingerbrute|Counters:P1P1=6;Lorescale Coatl|Counters:P1P1=2;Eyetwitch;Necroblossom Snarl;Necroblossom Snarl;Necroblossom Snarl;Necroblossom Snarl;Vineglimmer Snarl;Vineglimmer Snarl;Vineglimmer Snarl
humanexile=Mystic Reflection|Foretold
humansideboard=Expanded Anatomy;Environmental Sciences;Confront the Past
humanprecast=Garruk, Cursed Huntsman:1
ailibrary=Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt;Opt
aibattlefield=Cubwarden;Eradicator Valkyrie;Chrome Replicator;Glorious Anthem
removesummoningsickness=true
aiprecast=Cubwarden:CustomScript:DB$ Token | TokenAmount$ 2 | TokenScript$ w_1_1_cat_lifelink | TokenOwner$ You;Chrome Replicator:CustomScript:DB$ Token | TokenAmount$ 1 | TokenScript$ c_4_4_a_construct | TokenOwner$ You