ACF2: Fix breakage when Dense Cloud dies after accepting offer, but before returning to Leaks A Lot
authorWuzzy <Wuzzy2@mail.ru>
Thu, 23 May 2019 13:41:14 +0200
changeset 15034 981f16edea02
parent 15033 1bce780e55ac
child 15035 a315927a44b2
ACF2: Fix breakage when Dense Cloud dies after accepting offer, but before returning to Leaks A Lot
ChangeLog.txt
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
--- a/ChangeLog.txt	Thu May 23 08:50:18 2019 +0200
+++ b/ChangeLog.txt	Thu May 23 13:41:14 2019 +0200
@@ -51,7 +51,10 @@
  + Backstab: Disable utilities before traitor has been dealt with
  * Backstab: Prevent attacking the cannibals before making the choice
  * First blood: Fix Lua error when hitting Attack after failing the rope challenge
+ * First blood: Fix a cut scene being played twice in row
  * The Shadow Falls: Fix Lua error when hog dies during choice phase
+ * The Shadow Falls: Fix mission getting stuck when hog dies after accepting offer, but before returning
+ * The Shadow Falls: Fix many other Lua errors when hogs die in certain situations
  * General: Clear hazards around cyborg when it appears in cut scenes
  * General: Disable Sudden Death for all missions
  * Various minor tweaks and bugfixes
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Thu May 23 08:50:18 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Thu May 23 13:41:14 2019 +0200
@@ -23,20 +23,22 @@
 - The remaining Weaklings spawn
 - TBS
 - All Weaklings dead
-- Cut scene: stronglingsAnim: Stronglings spawn, hero walks to forest, meets cyborg, cyborg makes offer
+- Cut scene: stronglingsAnim: Stronglings spawn, Dense Cloud walks to forest, meets cyborg, cyborg makes offer
 - The cyborg offer is an IMPORTANT decision, it completely changes the next mission, and the rest of the story
 | Accept: Player walks to cyborg
     - Cut scene: acceptAnim
-    - Hero needs to walk all the way back (infinite turn time)
-    - Hero reached tree
-    - Turn time starts
-    - TBS
-    - Stronglings defeated
-    | Stronglings defeated with both hogs survived
-        - Cut scene: acceptedSurvivedFinalAnim
-    | Stronglings deafeated with Dense Cloud dead
-        - Cut scene: acceptedDiedFinalAnim
-    > Victory
+    - Dense Cloud needs to walk all the way back (infinite turn time)
+    | Dense Cloud reached tree
+        - Turn time starts
+        - TBS
+        - Stronglings defeated
+        | Stronglings defeated with both hogs survived
+            - Cut scene: acceptedSurvivedFinalAnim
+        | Stronglings defeated with Dense Cloud dead
+            - Cut scene: acceptedDiedFinalAnim
+        > Victory
+    | Dense Cloud dies before reaching the tree
+        > Game over
 | Reject: Player walks away
     - Cut scene: refusedAnim
     - Leaks a Lot teleports back to tree at the start (automatically)
@@ -48,7 +50,7 @@
     > Victory
 | Attack: Player attacks cyborg
     - Cut scene: attackAnim
-    - Cyborg kills hero
+    - Cyborg kills Dense Cloud
     - Other native's turn to defeat Stronglings
     - TBS
     - Stronglings defeated
@@ -301,7 +303,6 @@
   AddEvent(CheckReadyForStronglings, {}, DoReadyForStronglings, {}, 0)
   AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0)
   AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0)
-  RemoveEventFunc(CheckDenseDead)
   SwitchHog(dense)
   AnimWait(dense, 1)
   AddFunction({func = HideHog, args = {cyborg}})
@@ -925,6 +926,7 @@
   stage = duoStage
   RemoveEventFunc(CheckNeedGirder)
   RemoveEventFunc(CheckNeedWeapons)
+  RemoveEventFunc(CheckDenseDead)
   AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0)
   AddAmmo(cannibals[6], amGrenade, 2)
   AddAmmo(cannibals[6], amShotgun, 2)