share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
changeset 12384 eb11e1bc7547
parent 12383 b752003f04b1
child 12385 1eaef4b1b3c1
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Apr 28 18:54:59 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Fri Apr 28 20:08:35 2017 +0200
@@ -72,7 +72,6 @@
 endAnimRL = {}
 
 endFailAnim = {}
-endFailAnimAD = {}
 
 winAnim = {}
 winAnimAD = {}
@@ -80,7 +79,7 @@
 --/////////////////////////Animation Functions///////////////////////
 function AfterMidFailAnim()
   DismissTeam(loc("Natives"))
-  EndTurn(0)
+  EndTurn(true)
 end
 
 function AfterMidAnimAlone()
@@ -437,7 +436,6 @@
   midAnim = midAnimAD
   failAnim = failAnimAD
   endAnim = endAnimAD
-  endFailAnim = endFailAnimAD
   winAnim = winAnimAD
 end
 
@@ -803,9 +801,11 @@
 end
 
 function DoLeaksDead()
-  EndTurn(true)
-  AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
-  DismissTeam(loc("Natives"))
+  if not princessDead then
+    EndTurn(true)
+    AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
+    DismissTeam(loc("Natives"))
+  end
 end
 
 function CheckDenseDead()
@@ -813,9 +813,11 @@
 end
 
 function DoDenseDead()
-  EndTurn(true)
-  AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
-  DismissTeam(loc("Natives"))
+  if not princessDead then
+    EndTurn(true)
+    AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
+    DismissTeam(loc("Natives"))
+  end
 end
 
 function CheckTookBlowTorch()
@@ -896,8 +898,12 @@
 end
 
 function DoLost()
+  if not cyborgDead then
+    SwitchHog(cyborg)
+  end
   AddAnim(endFailAnim)
-  AddFunction({func = DismissTeam, args = {loc('Natives')}})
+  AddFunction({func = DismissTeam, args = {loc("Natives")}})
+  AddFunction({func = EndTurn, args = {true}})
 end
 
 function CheckWon()