From 35cd7d0f4eee531892a945f36dd72bbd51a923d3 Mon Sep 17 00:00:00 2001 From: Agetian Date: Wed, 25 Sep 2024 11:02:22 +0300 Subject: [PATCH] - Add puzzle PS_BLB4, fix GameState support for class level. (#6195) --- forge-ai/src/main/java/forge/ai/GameState.java | 2 +- forge-gui/res/puzzle/PS_BLB4.pzl | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/puzzle/PS_BLB4.pzl diff --git a/forge-ai/src/main/java/forge/ai/GameState.java b/forge-ai/src/main/java/forge/ai/GameState.java index e663feb77da..4939cdd9282 100644 --- a/forge-ai/src/main/java/forge/ai/GameState.java +++ b/forge-ai/src/main/java/forge/ai/GameState.java @@ -1398,7 +1398,7 @@ public abstract class GameState { c.setTurnInZone(turn); } else if (info.equals("IsToken")) { c.setGamePieceType(GamePieceType.TOKEN); - } else if (info.equals("ClassLevel:")) { + } else if (info.startsWith("ClassLevel:")) { c.setClassLevel(Integer.parseInt(info.substring(info.indexOf(':') + 1))); } } diff --git a/forge-gui/res/puzzle/PS_BLB4.pzl b/forge-gui/res/puzzle/PS_BLB4.pzl new file mode 100644 index 00000000000..6ce0bc5ecad --- /dev/null +++ b/forge-gui/res/puzzle/PS_BLB4.pzl @@ -0,0 +1,16 @@ +[metadata] +Name:Possibility Storm - Bloomburrow #04 +URL:https://i2.wp.com/www.possibilitystorm.com/wp-content/uploads/2024/09/latest-scaled.jpg?ssl=1 +Goal:Win +Turns:1 +Difficulty:Mythic +Description:Win this turn. Ensure your solution satisfies all possible blocking decisions. Good luck! +[state] +turn=1 +activeplayer=p0 +activephase=MAIN1 +p0life=20 +p0hand=Ornery Tumblewagg;Oko, the Ringleader;Season of Gathering;Shivan Devastator;Ferocification +p0battlefield=Innkeeper's Talent|ClassLevel:2;Rampaging Geoderm;Kami of Whispered Hopes|Counters:P1P1=2;Island;Island;Mountain;Mountain;Forest;Forest +p1life=17 +p1battlefield=Fear of Immobility;Shield-Wall Sentinel