share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
changeset 13743 d7b72ea8d136
parent 13740 2bb7141496a9
child 13748 d09366ca4d7b
equal deleted inserted replaced
13742:cb2857f55130 13743:d7b72ea8d136
    51 --Will end the turn + give escape time
    51 --Will end the turn + give escape time
    52 function EndTurnCS(seconds)
    52 function EndTurnCS(seconds)
    53 	-- Set attacked state to prevent “Boring” sound to be played
    53 	-- Set attacked state to prevent “Boring” sound to be played
    54 	SetState(CurrentHedgehog, bor(GetState(CurrentHedgehog), gstAttacked))
    54 	SetState(CurrentHedgehog, bor(GetState(CurrentHedgehog), gstAttacked))
    55 	--set escape time
    55 	--set escape time
    56 	SetTurnTimeLeft(GetAwayTime*10*seconds)
    56 	local escapeTime = GetAwayTime*10*seconds
    57 	if TurnTimeLeft > 0 then
    57 	if escapeTime > 0 then
    58 		Retreat(TurnTimeLeft, false)
    58 		Retreat(escapeTime, false)
       
    59 	else
       
    60 		SetTurnTimeLeft(escapeTime)
    59 	end
    61 	end
    60  end
    62  end
    61 
    63 
    62  --show health tag (will mostly be used when a hog is damaged)
    64  --show health tag (will mostly be used when a hog is damaged)
    63 function ShowDamageTag(hog,damage)
    65 function ShowDamageTag(hog,damage)