4 -- antigravity device. He has to capture Icy Pit who |
4 -- antigravity device. He has to capture Icy Pit who |
5 -- knows where the device is hidden. Hero will be |
5 -- knows where the device is hidden. Hero will be |
6 -- able to use only the ice gun for this mission. |
6 -- able to use only the ice gun for this mission. |
7 |
7 |
8 -- TODO |
8 -- TODO |
9 -- maybe use rope challenge to go there |
9 -- TEST TEST AND MORE TEST |
10 -- add checkpoints |
10 -- increase health in checkpoint 3 |
11 -- fix the stats |
11 -- fix the stats |
12 -- manually set the frozen hogs to last frozen for fixed number of turns |
|
13 -- SetState(bandit1.gear,bor(GetState(bandit1.gear),gstFrozen)) |
|
14 -- SetEffect(bandit1.gear,heFrozen,9999999) |
|
15 |
12 |
16 HedgewarsScriptLoad("/Scripts/Locale.lua") |
13 HedgewarsScriptLoad("/Scripts/Locale.lua") |
17 HedgewarsScriptLoad("/Scripts/Animate.lua") |
14 HedgewarsScriptLoad("/Scripts/Animate.lua") |
18 |
15 |
19 ----------------- VARIABLES -------------------- |
16 ----------------- VARIABLES -------------------- |
189 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 1) |
186 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 1) |
190 AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) |
187 AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) |
191 AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) |
188 AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) |
192 AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) |
189 AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) |
193 AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 1) |
190 AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 1) |
|
191 AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 1) |
194 |
192 |
195 AddAmmo(hero.gear, amJetpack, 99) |
193 AddAmmo(hero.gear, amJetpack, 99) |
196 AddAmmo(bandit1.gear, amBazooka, 5) |
194 AddAmmo(bandit1.gear, amBazooka, 5) |
197 AddAmmo(bandit2.gear, amBazooka, 4) |
195 AddAmmo(bandit2.gear, amBazooka, 4) |
198 AddAmmo(bandit3.gear, amMine, 2) |
196 AddAmmo(bandit3.gear, amMine, 2) |
368 return true |
366 return true |
369 end |
367 end |
370 return false |
368 return false |
371 end |
369 end |
372 |
370 |
|
371 function onHeroWin(gear) |
|
372 if (not hero.dead and not bandit1.dead) and (GetX(hero.gear)>=GetX(bandit1.gear)-15 and GetX(hero.gear)<=GetX(bandit1.gear)+15) |
|
373 and (GetY(hero.gear)>=GetY(bandit1.gear)-15 and GetY(hero.gear)<=GetY(bandit1.gear)+15) then |
|
374 return true |
|
375 end |
|
376 return false |
|
377 end |
|
378 |
373 -------------- OUTCOMES ------------------ |
379 -------------- OUTCOMES ------------------ |
374 |
380 |
375 function antiFlyArea(gear) |
381 function antiFlyArea(gear) |
376 heroAtAntiFlyArea = true |
382 heroAtAntiFlyArea = true |
377 if TurnTimeLeft < -1 then |
383 if TurnTimeLeft < -1 then |
415 iceGunTaken=true |
421 iceGunTaken=true |
416 end |
422 end |
417 |
423 |
418 function thantaDeath(gear) |
424 function thantaDeath(gear) |
419 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
425 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
|
426 -- more custom stats |
|
427 EndGame() |
|
428 end |
|
429 |
|
430 function heroWin(gear) |
|
431 SendStat('siGameResult', loc("Congratulations, you got the part!")) |
420 -- more custom stats |
432 -- more custom stats |
421 EndGame() |
433 EndGame() |
422 end |
434 end |
423 |
435 |
424 -------------- ANIMATIONS ------------------ |
436 -------------- ANIMATIONS ------------------ |