equal
deleted
inserted
replaced
215 lastName = GetHogName(CurrentHedgehog) |
215 lastName = GetHogName(CurrentHedgehog) |
216 started = true |
216 started = true |
217 switchStage = 0 |
217 switchStage = 0 |
218 end |
218 end |
219 |
219 |
220 function onGameTick() |
220 function onGameTick20() |
221 |
221 |
222 if (CurrentHedgehog ~= nil) then |
222 if (CurrentHedgehog ~= nil) then |
223 |
223 |
224 currName = GetHogName(CurrentHedgehog) |
224 currName = GetHogName(CurrentHedgehog) |
225 |
225 |
226 if (currName ~= lastName) and (switchStage > 100) then |
226 if (currName ~= lastName) and (switchStage > 5) then |
227 AddCaption(loc("Switched to ") .. currName .. "!") |
227 AddCaption(loc("Switched to ") .. currName .. "!") |
228 end |
228 end |
229 |
229 |
230 if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) and (switchStage < 100) then |
230 if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) and (switchStage < 5) then |
231 |
231 |
232 AddCaption(loc("Prepare yourself") .. ", " .. currName .. "!") |
232 AddCaption(loc("Prepare yourself") .. ", " .. currName .. "!") |
233 |
233 |
234 hogCounter = 0 |
234 hogCounter = 0 |
235 runOnHogsInTeam(CountHog, GetHogTeamName(CurrentHedgehog) ) |
235 runOnHogsInTeam(CountHog, GetHogTeamName(CurrentHedgehog) ) |
244 elseif switchStage == 2 then |
244 elseif switchStage == 2 then |
245 ParseCommand("setweap " .. string.char(amSwitch)) |
245 ParseCommand("setweap " .. string.char(amSwitch)) |
246 elseif switchStage == 3 then |
246 elseif switchStage == 3 then |
247 SetGearMessage(CurrentHedgehog,gmAttack) |
247 SetGearMessage(CurrentHedgehog,gmAttack) |
248 elseif switchStage == 4 then |
248 elseif switchStage == 4 then |
249 switchStage = 110 |
249 switchStage = 6 |
250 AddAmmo(CurrentHedgehog, amSwitch, 0) |
250 AddAmmo(CurrentHedgehog, amSwitch, 0) |
251 end |
251 end |
252 |
252 |
253 else |
253 else |
254 switchStage = 110 |
254 switchStage = 6 |
255 end |
255 end |
256 |
256 |
257 |
257 |
258 end |
258 end |
259 |
259 |