From 44ac42a4b57a1adb3c7465762f27436ce6098e39 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 26 Aug 2017 19:08:35 +0000 Subject: [PATCH] - Puzzle Mode: A better solution for precasting Awaken in GameState (allows both Awaken and AwakenOnly). --- forge-ai/src/main/java/forge/ai/GameState.java | 5 +++-- forge-gui/res/puzzle/PC_101315.pzl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/GameState.java b/forge-ai/src/main/java/forge/ai/GameState.java index 1a65aff83b8..d17ce0ec862 100644 --- a/forge-ai/src/main/java/forge/ai/GameState.java +++ b/forge-ai/src/main/java/forge/ai/GameState.java @@ -675,14 +675,15 @@ public abstract class GameState { String kwName = sPtr.substring(3); FCollectionView saList = c.getSpellAbilities(); - if (kwName.equals("Awaken")) { + if (kwName.equals("Awaken") || kwName.equals("AwakenOnly")) { + // AwakenOnly only creates the Awaken effect, while Awaken precasts the whole spell with Awaken for (SpellAbility ab : saList) { if (ab.getDescription().startsWith("Awaken")) { ab.setActivatingPlayer(c.getController()); ab.getSubAbility().setActivatingPlayer(c.getController()); // target for Awaken is set in its first subability handleScriptedTargetingForSA(game, ab.getSubAbility(), tgtID); - sa = ab.getSubAbility(); // only resolve the keyworded part + sa = kwName.equals("AwakenOnly") ? ab.getSubAbility() : ab; } } if (sa == null) { diff --git a/forge-gui/res/puzzle/PC_101315.pzl b/forge-gui/res/puzzle/PC_101315.pzl index 1f0ae46b468..f1fa230bf37 100644 --- a/forge-gui/res/puzzle/PC_101315.pzl +++ b/forge-gui/res/puzzle/PC_101315.pzl @@ -17,7 +17,7 @@ humanbattlefield=Forest|Set:BFZ; Forest|Set:BFZ; Forest|Set:BFZ; Forest|Set:BFZ; aibattlefield=Swamp|Set:BFZ|Tapped; Swamp|Set:BFZ|Tapped; Swamp|Set:BFZ|Tapped; Swamp|Set:BFZ|Tapped; Swamp|Set:BFZ|Tapped; Swamp|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mountain|Set:BFZ|Tapped; Mortuary Mire|Set:BFZ|Tapped; Hedron Blade|Set:BFZ|Attaching:420; Silent Skimmer|Set:BFZ|Tapped|Id:420; Skitterskin|Set:BFZ; Goblin War Paint|Set:BFZ|Attaching:422; Shatterskull Recruit|Set:BFZ|Id:422|Tapped; Endless One|Set:BFZ|Counters:P1P1=13; Mountain|Set:BFZ|Id:424; Retreat to Hagra|Set:BFZ # Precast Ondu Rising with Awaken for the AI, targeting mountain - requires KW Awaken implementation # with the target for Awaken set in its first subability. -aiprecast=Ondu Rising:KW#Awaken->424 +aiprecast=Ondu Rising:KW#AwakenOnly->424 aihand= aigraveyard= ailibrary=