share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
changeset 15033 1bce780e55ac
parent 15030 2e89487540d8
child 15034 981f16edea02
equal deleted inserted replaced
15032:b181ff6367c9 15033:1bce780e55ac
   805   stage = interWeakStage
   805   stage = interWeakStage
   806   DismissTeam(weaklingsTeamName)
   806   DismissTeam(weaklingsTeamName)
   807 end
   807 end
   808 
   808 
   809 function CheckRefuse()
   809 function CheckRefuse()
   810   return GetHealth(dense) and GetX(dense) > 1400 and StoppedGear(dense)
   810   return isHogAlive(dense) and GetX(dense) > 1400 and StoppedGear(dense)
   811 end
   811 end
   812 
   812 
   813 function DoRefuse()
   813 function DoRefuse()
   814   if stage == loseStage then
   814   if stage == loseStage then
   815     return
   815     return
   816   end
   816   end
   817   choice = choiceRefuse
   817   choice = choiceRefuse
   818 end
   818 end
   819 
   819 
   820 function CheckAccept()
   820 function CheckAccept()
   821   if not GetHealth(dense) then
   821   if not isHogAlive(dense) then
   822     return false
   822     return false
   823   end
   823   end
   824   if GetX(dense) < 1300 then
   824   if GetX(dense) < 1300 then
   825     -- When close to cyborg, wait for a short time before accepting,
   825     -- When close to cyborg, wait for a short time before accepting,
   826     -- to allow player to attack with melee weapons.
   826     -- to allow player to attack with melee weapons.
   840   end
   840   end
   841   choice = choiceAccept
   841   choice = choiceAccept
   842 end
   842 end
   843 
   843 
   844 function CheckConfront()
   844 function CheckConfront()
   845   return cyborgAttacked and denseDead == false and StoppedGear(dense)
   845   return cyborgAttacked and isHogAlive(dense) and StoppedGear(dense)
   846 end
   846 end
   847 
   847 
   848 function DoConfront()
   848 function DoConfront()
   849   if stage == loseStage then
   849   if stage == loseStage then
   850     return
   850     return
   902   AddCaption(loc("A little gift from the cyborgs"))
   902   AddCaption(loc("A little gift from the cyborgs"))
   903 end
   903 end
   904 
   904 
   905 function CheckReadyForStronglings()
   905 function CheckReadyForStronglings()
   906   if stage == loseStage then
   906   if stage == loseStage then
       
   907     return false
       
   908   end
       
   909   if not isHogAlive(dense) then
   907     return false
   910     return false
   908   end
   911   end
   909   return (shotgunTaken and grenadeTaken) or GetX(dense) > 2700
   912   return (shotgunTaken and grenadeTaken) or GetX(dense) > 2700
   910 end
   913 end
   911 
   914