ACF1: Fix various problems with the parachute section
authorWuzzy <almikes@aol.com>
Wed, 27 Sep 2017 02:26:33 +0200
changeset 12545 9c3ff4ffd4f3
parent 12544 77b05be26a6e
child 12546 5b51257c4122
ACF1: Fix various problems with the parachute section
ChangeLog.txt
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
--- a/ChangeLog.txt	Wed Sep 27 01:00:35 2017 +0200
+++ b/ChangeLog.txt	Wed Sep 27 02:26:33 2017 +0200
@@ -176,10 +176,11 @@
  * Disable Sudden Death for good in Shoppa game scheme, some game styles and mission maps
 
 A Classic Fairytale:
- + Mission 3: Improved mission panel texts to clarify the goals at all time
  + Mission 4: Add infinite skip
  + Mission 6: Add alternate dialogues when killing cyborgs before collecting the crates
  + All missions: Clarify mine timers
+ * Mission 1: Leaf of faith: Hog was able to walk to the right and get stuck
+ * Mission 1: Leap of faith: Teleport player back to mole when failing
  * Mission 2: Fix crash when trying to open ammo menu in opening sequence
  * Mission 3: Fix various Lua errors when playing with 2 hogs and one of them dies
  * Mission 3: Fix broken end sequence after killing cyborg or princess
@@ -188,11 +189,11 @@
  * Mission 5: Fix crash when skipping animation while the cyborg talks before the 3rd wave of cannibals starts
  * Mission 6: Block off left cave entrance to stop player to just rope all the way around
  * Mission 6: Fix mines not being able to get triggered in first turn
- * Mission 6: Rewrite misleading mission texts
  * Mission 8: Fix Lua error message at the beginning
  * Mission 10: Fix mission becoming unplayable when all hogs except the traitor died
  * All missions: Add missing texts for translation
  * All missions: Fix incorrect crate types
+ * All missions: Rewrite mission texts to state missions more clearly
  * Fix swapped mission preview images of missions 2 and 3
 
 A Space Adventure:
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Wed Sep 27 01:00:35 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Wed Sep 27 02:26:33 2017 +0200
@@ -31,7 +31,8 @@
 targetPosX = {{821, 866, 789}, {614, 656, 638}, {1238, 1237, 1200}}
 targetPosY = {{1342, 1347, 1326}, {1112, 1121, 1061}, {1152, 1111, 1111}}
 crateNum = {6, 8}
-
+rope2GirderX = 3245
+rope2GirderY = 1190
 
 stage = 1
 cratesCollected = 0
@@ -52,6 +53,7 @@
 rope1Taken = false
 paraTaken = false
 rope2Taken = false
+rope2InProgress = false
 punchTaken = false
 canKilled = false
 desertTaken = false
@@ -270,6 +272,9 @@
 
 function DoOnDamage()
   AddAnim(damageAnim)
+  if rope2InProgress and not rope2Taken then
+    AnimSetGearPosition(youngh, 3040, 1221)
+  end
   youngdamaged = false
   AddFunction({func = ResetTurnTime, args = {}})
 end
@@ -367,19 +372,27 @@
 end
 
 function DoPastMoleHead()
+  -- Initiate parachute challenge
   RemoveEventFunc(CheckOnMoleHead)
   ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
+  rope2InProgress = true
   AddAmmo(youngh, amRope, 0)
   SetGearMessage(CurrentHedgehog, 0)
+  -- Block the way to the hole to the right, since the player loses the rope for this section
+  PlaceGirder(rope2GirderX, rope2GirderY, 6)
   AddAnim(pastMoleHeadAnim)
   AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0)
 end
 
 function DoOnMoleHead()
+  -- Initiate parachute challenge
   RemoveEventFunc(CheckPastMoleHead)
   ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
+  rope2InProgress = true
   AddAmmo(youngh, amRope, 0)
   SetGearMessage(CurrentHedgehog, 0)
+  -- Block the way to the hole to the right, since the player loses the rope for this section
+  PlaceGirder(rope2GirderX, rope2GirderY, 6)
   AddAnim(onMoleHeadAnim)
   AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0)
 end
@@ -428,6 +441,8 @@
   AddEvent(CheckCratesColled, {}, DoCratesColled, {}, 0)
   AddEvent(CheckChallengeWon, {}, DoChallengeWon, {}, 0)
   AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1)
+  -- Remove up the old mole blockade from the parachute challenge
+  EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6)
 end
 
 function CheckChoice()
@@ -669,6 +684,7 @@
     paraTaken = true
   elseif gear == ropeCrate2 then
     rope2Taken = true
+    rope2InProgress = false
   elseif gear == ropeCrate3 then
     rope3Taken = true
   elseif gear == crates[1] then