# HG changeset patch # User Wuzzy # Date 1558594218 -7200 # Node ID 1bce780e55ac441b28dda3432505fbd06d8fa108 # Parent b181ff6367c95d990bccc37cacce46dc52ee5296 ACF2: Add more isHogAlive checks diff -r b181ff6367c9 -r 1bce780e55ac share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Thu May 23 08:34:30 2019 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua Thu May 23 08:50:18 2019 +0200 @@ -807,7 +807,7 @@ end function CheckRefuse() - return GetHealth(dense) and GetX(dense) > 1400 and StoppedGear(dense) + return isHogAlive(dense) and GetX(dense) > 1400 and StoppedGear(dense) end function DoRefuse() @@ -818,7 +818,7 @@ end function CheckAccept() - if not GetHealth(dense) then + if not isHogAlive(dense) then return false end if GetX(dense) < 1300 then @@ -842,7 +842,7 @@ end function CheckConfront() - return cyborgAttacked and denseDead == false and StoppedGear(dense) + return cyborgAttacked and isHogAlive(dense) and StoppedGear(dense) end function DoConfront() @@ -906,6 +906,9 @@ if stage == loseStage then return false end + if not isHogAlive(dense) then + return false + end return (shotgunTaken and grenadeTaken) or GetX(dense) > 2700 end