fix comparison error in Campaign mission 1
authorPeriklis Ntanasis <pntanasis@gmail.com>
Fri, 03 May 2013 07:09:04 +0300
changeset 8984 3c342826f299
parent 8983 a25e18295959
child 8985 fe8d1a476f0b
fix comparison error in Campaign mission 1
share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua	Mon May 13 22:49:14 2013 +0400
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/first_blood.lua	Fri May 03 07:09:04 2013 +0300
@@ -56,6 +56,7 @@
 canKilled = false
 desertTaken = false
 challengeFailed = false
+deleteCrate = false
 difficultyChoice = false
 princessFace = "Left"
 elderFace = "Left"
@@ -469,6 +470,7 @@
 
 function DoTimesUp()
   challengeFailed = true
+  deleteCrate = true
   DeleteGear(crates[1])
   TurnTimeLeft = -1
   AddCaption(loc("And so happenned that Leaks A Lot failed to complete the challenge! He landed, pressured by shame..."))
@@ -668,6 +670,8 @@
     rope2Taken = true
   elseif gear == ropeCrate3 then
     rope3Taken = true
+  elseif gear == crates[1] and deleteCrate == true then
+    deleteCrate = false
   elseif gear == crates[1] and challengeFailed == false then
     crates[1] = nil
     cratesCollected = cratesCollected + 1