128 if CurrentHedgehog ~= hero.gear then |
128 if CurrentHedgehog ~= hero.gear then |
129 EndTurn(true) |
129 EndTurn(true) |
130 runnerTime = runnerTime + runner.places[currentPosition].turnTime |
130 runnerTime = runnerTime + runner.places[currentPosition].turnTime |
131 SetTeamLabel(teamB.name, string.format(loc("%.1fs"), runnerTime/1000)) |
131 SetTeamLabel(teamB.name, string.format(loc("%.1fs"), runnerTime/1000)) |
132 else |
132 else |
|
133 if currentPosition > 2 then |
|
134 AddCaption(loc("Go, get him again!"), capcolDefault, capgrpGameState) |
|
135 end |
133 SetWeapon(amRope) |
136 SetWeapon(amRope) |
134 SetTurnTimeLeft(runner.places[currentPosition].turnTime + previousTimeLeft) |
137 SetTurnTimeLeft(runner.places[currentPosition].turnTime + previousTimeLeft) |
135 previousTimeLeft = 0 |
138 previousTimeLeft = 0 |
136 if currentPosition > 1 then |
139 if currentPosition > 1 then |
137 raceSectionStarted = true |
140 raceSectionStarted = true |
266 end |
269 end |
267 |
270 |
268 function moveRunner() |
271 function moveRunner() |
269 if currentPosition == 4 then |
272 if currentPosition == 4 then |
270 currentPosition = currentPosition + 1 |
273 currentPosition = currentPosition + 1 |
271 if GetX(hero.gear) > GetX(runner.gear) then |
|
272 HogTurnLeft(runner.gear, false) |
|
273 end |
|
274 AddAnim(dialog02) |
274 AddAnim(dialog02) |
275 |
275 |
276 -- Update time record |
276 -- Update time record |
277 winningTime = runnerTimeTotal - TurnTimeLeft |
277 winningTime = runnerTimeTotal - TurnTimeLeft |
278 SetTeamLabel(teamA.name, string.format(loc("%.3fs"), winningTime/1000)) |
278 SetTeamLabel(teamA.name, string.format(loc("%.3fs"), winningTime/1000)) |
293 startChallenge = true |
293 startChallenge = true |
294 end |
294 end |
295 AddAmmo(hero.gear, amRope, 1) |
295 AddAmmo(hero.gear, amRope, 1) |
296 if currentPosition ~= 1 then |
296 if currentPosition ~= 1 then |
297 if currentPosition > 1 and currentPosition < 4 then |
297 if currentPosition > 1 and currentPosition < 4 then |
298 AnimCaption(hero.gear, loc("Go, get him again!"), 3000) |
|
299 AnimSay(runner.gear, loc("You got me!"), SAY_SAY, 3000) |
298 AnimSay(runner.gear, loc("You got me!"), SAY_SAY, 3000) |
300 end |
299 end |
301 runnerCaught = true |
300 runnerCaught = true |
302 previousTimeLeft = TurnTimeLeft |
301 previousTimeLeft = TurnTimeLeft |
303 end |
302 end |
304 currentPosition = currentPosition + 1 |
303 currentPosition = currentPosition + 1 |
305 AddVisualGear(GetX(runner.gear), GetY(runner.gear), vgtExplosion, 0, false) |
304 AddVisualGear(GetX(runner.gear), GetY(runner.gear), vgtExplosion, 0, false) |
306 SetGearPosition(runner.gear, runner.places[currentPosition].x, runner.places[currentPosition].y) |
305 SetGearPosition(runner.gear, runner.places[currentPosition].x, runner.places[currentPosition].y) |
307 EndTurn(true) |
306 EndTurn(true) |
|
307 end |
|
308 if runner.gear and hero.gear then |
|
309 HogTurnLeft(runner.gear, GetX(hero.gear) < GetX(runner.gear)) |
308 end |
310 end |
309 end |
311 end |
310 |
312 |
311 function lose() |
313 function lose() |
312 if lostGame then |
314 if lostGame then |