equal
deleted
inserted
replaced
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) |