- Puzzle Mode: A better solution for precasting Awaken in GameState (allows both Awaken and AwakenOnly).

This commit is contained in:
Agetian
2017-08-26 19:08:35 +00:00
parent 78a60c750a
commit 44ac42a4b5
2 changed files with 4 additions and 3 deletions

View File

@@ -675,14 +675,15 @@ public abstract class GameState {
String kwName = sPtr.substring(3); String kwName = sPtr.substring(3);
FCollectionView<SpellAbility> saList = c.getSpellAbilities(); FCollectionView<SpellAbility> 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) { for (SpellAbility ab : saList) {
if (ab.getDescription().startsWith("Awaken")) { if (ab.getDescription().startsWith("Awaken")) {
ab.setActivatingPlayer(c.getController()); ab.setActivatingPlayer(c.getController());
ab.getSubAbility().setActivatingPlayer(c.getController()); ab.getSubAbility().setActivatingPlayer(c.getController());
// target for Awaken is set in its first subability // target for Awaken is set in its first subability
handleScriptedTargetingForSA(game, ab.getSubAbility(), tgtID); handleScriptedTargetingForSA(game, ab.getSubAbility(), tgtID);
sa = ab.getSubAbility(); // only resolve the keyworded part sa = kwName.equals("AwakenOnly") ? ab.getSubAbility() : ab;
} }
} }
if (sa == null) { if (sa == null) {

View File

@@ -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 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 # Precast Ondu Rising with Awaken for the AI, targeting mountain - requires KW Awaken implementation
# with the target for Awaken set in its first subability. # with the target for Awaken set in its first subability.
aiprecast=Ondu Rising:KW#Awaken->424 aiprecast=Ondu Rising:KW#AwakenOnly->424
aihand= aihand=
aigraveyard= aigraveyard=
ailibrary= ailibrary=