--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua Wed Sep 27 02:57:44 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua Wed Sep 27 03:54:35 2017 +0200
@@ -414,6 +414,14 @@
AddFunction({func = AfterKillAnim, args = {}})
end
+function CheckPutCrates(gear)
+ if gear and GetHealth(gear) then
+ return StoppedGear(gear)
+ else
+ return false
+ end
+end
+
function PutCrates(index)
if index <= 7 then
cratesNum = cratesNum + 1
@@ -421,7 +429,7 @@
AddNewEvent(CheckGearDead, {crates[cratesNum]}, PutCrates, {index + 1}, 0)
FollowGear(native)
else
- AddEvent(StoppedGear, {native}, DoCratesTaken, {}, 0)
+ AddEvent(CheckPutCrates, {native}, DoCratesTaken, {}, 0)
end
if index == 4 then
AnimSay(native, loc("I'm a ninja."), SAY_THINK, 0)