ACF mission 5: Take away switch and always play with deployed hog in final mission stage
authorWuzzy <Wuzzy2@mail.ru>
Tue, 24 Oct 2017 06:25:12 +0200
changeset 12755 6cec6b881a1c
parent 12754 1df909b46c05
child 12756 838515c4e6c5
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
ChangeLog.txt
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
--- a/ChangeLog.txt	Tue Oct 24 04:48:20 2017 +0200
+++ b/ChangeLog.txt	Tue Oct 24 06:25:12 2017 +0200
@@ -240,6 +240,7 @@
  * Mission 3: Fix broken sequence of princess being caged
  * Mission 3: All girder crates now have 3 girders each
  * Mission 5: Fix crash when skipping animation while the cyborg talks before the 3rd wave of cannibals starts
+ * Mission 5: Make sure the player can only play with one hog after the cyborg imprisoned the other natives
  * 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 8: Fix Lua error message at the beginning
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Tue Oct 24 04:48:20 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Tue Oct 24 06:25:12 2017 +0200
@@ -474,6 +474,8 @@
 
 function DeployHog()
   if not hogDeployed then
+     -- Steal switch to force the deployed hog to be on its own
+     AddAmmo(deployedHog, amSwitch, 0)
      AnimSwitchHog(deployedHog)
      AnimTeleportGear(deployedHog, unpack(deployedPos))
      if deployedHog ~= natives[wiseNum] then
@@ -1070,6 +1072,11 @@
   if stage == platformStage then
     AddCaption(string.format(loc("Turns until arrival: %d"), TurnsLeft))
   end
+  if deployedHog then
+    if GetHogTeamName(CurrentHedgehog) == loc("Natives") then
+      AnimSwitchHog(deployedHog)
+    end
+  end
 
   if stage == spyKillStage then
     if CurrentHedgehog == spyHog or GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then