ACF2: Convert to EndTurn
authorWuzzy <almikes@aol.com>
Wed, 27 Sep 2017 05:55:40 +0200
changeset 12551 f57af5c34ff4
parent 12550 0fa07df29499
child 12552 ed59dd8ff29d
ACF2: Convert to EndTurn
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Wed Sep 27 05:49:20 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Wed Sep 27 05:55:40 2017 +0200
@@ -98,7 +98,7 @@
   stage = ramonStage
   SwitchHog(cannibals[9])
   FollowGear(ramon)
-  TurnTimeLeft = 0
+  EndTurn(true)
   SetGearMessage(ramon, 0)
   SetGearMessage(leaks, 0)
   AnimWait(ramon, 1)
@@ -173,7 +173,7 @@
   AddAmmo(leaks, amSkip, 0)
   SetHealth(SpawnHealthCrate(2557, 1030), 50)
   SetHealth(SpawnHealthCrate(3599, 1009), 50)
-  TurnTimeLeft = 0
+  EndTurn(true)
 end
 
 function SkipStronglingsAnim()
@@ -619,7 +619,7 @@
 function KillCyborg()
   RestoreHog(cyborg)
   DeleteGear(cyborg)
-  TurnTimeLeft = 0
+  EndTurn(true)
 end
 -----------------------------Events------------------------------------
 
@@ -628,7 +628,7 @@
 end
 
 function DoBrainiacDead()
-  TurnTimeLeft = 0
+  EndTurn(true)
   SetGearMessage(CurrentHedgehog, 0)
   AddAnim(weaklingsAnim)
   AddFunction({func = AfterWeaklingsAnim, args = {}})
@@ -806,7 +806,7 @@
 function DoDead()
   AddCaption(loc("...and so the cyborgs took over the world..."))
   stage = loseStage
-  TurnTimeLeft = 0
+  EndTurn(true)
   DismissTeam(loc("Natives"))
 end
 
@@ -914,12 +914,9 @@
 function onNewTurn()
   if AnimInProgress() then
     TurnTimeLeft = -1
---  elseif stage == interSpyStage and GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
---    TurnTimeLeft = 0
---    SetState(CurrentHedgehog, gstInvisible)
   elseif stage == cyborgStage then
     if CurrentHedgehog ~= dense then
-      TurnTimeLeft = 0
+      EndTurn(true)
     else
       TurnTimeLeft = -1
     end