share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
changeset 12605 d05a159e7874
parent 12604 a45f8eec6869
child 12606 f1e0fa009eb7
equal deleted inserted replaced
12604:a45f8eec6869 12605:d05a159e7874
   246   end
   246   end
   247   return false
   247   return false
   248 end
   248 end
   249 
   249 
   250 function DoNeedToTurn(gear)
   250 function DoNeedToTurn(gear)
   251   if gear == princess then
   251   if gear == princess and not princessDamaged then
   252     if GetX(princess) > GetX(youngh) then
   252     if GetX(princess) > GetX(youngh) then
   253       HogTurnLeft(princess, true)
   253       HogTurnLeft(princess, true)
   254       princessFace = "Left"
   254       princessFace = "Left"
   255     elseif GetX(princess) < GetX(youngh) then
   255     elseif GetX(princess) < GetX(youngh) then
   256       HogTurnLeft(princess, false)
   256       HogTurnLeft(princess, false)
   257       princessFace = "Right"
   257       princessFace = "Right"
   258     end
   258     end
   259   else
   259   elseif gear == elderh and not elderDamaged then
   260     if GetX(elderh) > GetX(youngh) then
   260     if GetX(elderh) > GetX(youngh) then
   261       HogTurnLeft(elderh, true)
   261       HogTurnLeft(elderh, true)
   262       elderFace = "Left"
   262       elderFace = "Left"
   263     elseif GetX(elderh) < GetX(youngh) then
   263     elseif GetX(elderh) < GetX(youngh) then
   264       HogTurnLeft(elderh, false)
   264       HogTurnLeft(elderh, false)