share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua
changeset 8944 ed2509832311
parent 8043 da083f8d95e6
child 9120 089411fbf4e6
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua	Wed May 01 01:27:35 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua	Wed May 01 04:05:10 2013 +0300
@@ -399,7 +399,9 @@
 
 function DoMissionFinished()
   AddCaption(loc("Salvation was one step closer now..."))
-  SaveCampaignVar("Progress", "6")
+  if progress and progress<6 then
+    SaveCampaignVar("Progress", "6")
+  end
   ParseCommand("teamgone " .. loc("011101001"))
   TurnTimeLeft = 0
 end
@@ -451,6 +453,7 @@
 end
 
 function GetVariables()
+  progress = tonumber(GetCampaignVar("Progress"))
   m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum"))
 end