208 -- weird, if 0 bazooka isn't displayed in the weapons menu |
208 -- weird, if 0 bazooka isn't displayed in the weapons menu |
209 if tonumber(ammo:sub(7,7)) > 0 then |
209 if tonumber(ammo:sub(7,7)) > 0 then |
210 AddAmmo(hero.gear, amConstruction, tonumber(ammo:sub(7,7))) |
210 AddAmmo(hero.gear, amConstruction, tonumber(ammo:sub(7,7))) |
211 end |
211 end |
212 AddAmmo(hero.gear, amPortalGun, tonumber(ammo:sub(8,8))) |
212 AddAmmo(hero.gear, amPortalGun, tonumber(ammo:sub(8,8))) |
|
213 |
|
214 -- second battle |
|
215 heroIsInBattle = true |
|
216 ongoingBattle = 2 |
213 end |
217 end |
214 |
218 |
215 SendHealthStatsOff() |
219 SendHealthStatsOff() |
216 end |
220 end |
217 |
221 |
221 elseif CurrentHedgehog == hero.gear and not heroIsInBattle then |
225 elseif CurrentHedgehog == hero.gear and not heroIsInBattle then |
222 TurnTimeLeft = -1 |
226 TurnTimeLeft = -1 |
223 elseif (CurrentHedgehog == smuggler2.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 1 then |
227 elseif (CurrentHedgehog == smuggler2.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 1 then |
224 AnimSwitchHog(hero.gear) |
228 AnimSwitchHog(hero.gear) |
225 TurnTimeLeft = 0 |
229 TurnTimeLeft = 0 |
|
230 elseif (CurrentHedgehog == smuggler1.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 2 then |
|
231 AnimSwitchHog(hero.gear) |
|
232 TurnTimeLeft = 0 |
226 elseif CurrentHedgehog == ally.gear then |
233 elseif CurrentHedgehog == ally.gear then |
227 TurnTimeLeft = 0 |
234 TurnTimeLeft = 0 |
228 end |
235 end |
229 WriteLnToConsole("CURRENT HEDGEHOG IS "..CurrentHedgehog) |
236 WriteLnToConsole("CURRENT HEDGEHOG IS "..CurrentHedgehog) |
230 end |
237 end |
319 heroIsInBattle = false |
330 heroIsInBattle = false |
320 ongoingBattle = 0 |
331 ongoingBattle = 0 |
321 end |
332 end |
322 |
333 |
323 function heroAtCheckpoint2(gear) |
334 function heroAtCheckpoint2(gear) |
|
335 -- save checkpoint |
324 SaveCampaignVar("Desert01CheckPoint", "2") |
336 SaveCampaignVar("Desert01CheckPoint", "2") |
325 SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) |
337 SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) |
326 -- bazooka - grenade - rope - parachute - deagle - btorch - construct - portal |
338 -- bazooka - grenade - rope - parachute - deagle - btorch - construct - portal |
327 SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amBazooka)..GetAmmoCount(hero.gear, amGrenade).. |
339 SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amBazooka)..GetAmmoCount(hero.gear, amGrenade).. |
328 GetAmmoCount(hero.gear, amRope)..GetAmmoCount(hero.gear, amParachute)..GetAmmoCount(hero.gear, amDEagle).. |
340 GetAmmoCount(hero.gear, amRope)..GetAmmoCount(hero.gear, amParachute)..GetAmmoCount(hero.gear, amDEagle).. |
329 GetAmmoCount(hero.gear, amBlowTorch)..GetAmmoCount(hero.gear, amConstruction)..GetAmmoCount(hero.gear, amPortalGun)) |
341 GetAmmoCount(hero.gear, amBlowTorch)..GetAmmoCount(hero.gear, amConstruction)..GetAmmoCount(hero.gear, amPortalGun)) |
330 AnimCaption(hero.gear, loc("Checkpoint reached!"), 5000) |
342 AnimCaption(hero.gear, loc("Checkpoint reached!"), 5000) |
|
343 |
|
344 -- second battle |
|
345 heroIsInBattle = true |
|
346 ongoingBattle = 2 |
|
347 AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000) |
331 end |
348 end |
332 |
349 |
333 -------------- ANIMATIONS ------------------ |
350 -------------- ANIMATIONS ------------------ |
334 |
351 |
335 function Skipanim(anim) |
352 function Skipanim(anim) |