share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
changeset 15025 fa597f6e301d
parent 15007 3ed1cbd31754
child 15026 62e3853fa2ed
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Tue May 21 12:58:28 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Tue May 21 14:38:10 2019 +0200
@@ -790,7 +790,7 @@
 end
 
 function CheckRefuse()
-  return GetX(dense) > 1400 and StoppedGear(dense)
+  return GetHealth(dense) and GetX(dense) > 1400 and StoppedGear(dense)
 end
 
 function DoRefuse()
@@ -801,6 +801,9 @@
 end
 
 function CheckAccept()
+  if not GetHealth(dense) then
+    return false
+  end
   if GetX(dense) < 1300 then
     -- When close to cyborg, wait for a short time before accepting,
     -- to allow player to attack with melee weapons.
@@ -822,7 +825,7 @@
 end
 
 function CheckConfront()
-  return cyborgAttacked and StoppedGear(dense)
+  return cyborgAttacked and GetHealth(dense) and StoppedGear(dense)
 end
 
 function DoConfront()