14 loc("Each time you play this missions enemy hogs will play in a random order.").."|".. |
14 loc("Each time you play this missions enemy hogs will play in a random order.").."|".. |
15 loc("At the start of the game each enemy hog has only the weapon that he is named after.").."|".. |
15 loc("At the start of the game each enemy hog has only the weapon that he is named after.").."|".. |
16 loc("A random hedgehog will inherit the weapons of his deceased team-mates.").."|".. |
16 loc("A random hedgehog will inherit the weapons of his deceased team-mates.").."|".. |
17 loc("If you kill a hedgehog with the respective weapon your health points will be set to 100.").."|".. |
17 loc("If you kill a hedgehog with the respective weapon your health points will be set to 100.").."|".. |
18 loc("If you injure a hedgehog you'll get 35% of the damage dealt.").."|".. |
18 loc("If you injure a hedgehog you'll get 35% of the damage dealt.").."|".. |
19 loc("Every time you kill an enemy hog your ammo will get reset.").."|".. |
19 loc("Every time you kill an enemy hog your ammo will get reset next turn.").."|".. |
20 loc("The rope won't get reset.") |
20 loc("The rope won't get reset.") |
21 -- dialogs |
21 -- dialogs |
22 local dialog01 = {} |
22 local dialog01 = {} |
23 -- mission objectives |
23 -- mission objectives |
24 local goals = { |
24 local goals = { |
126 end |
130 end |
127 table.insert(enemies[randomHog].additionalWeapons, deadHog.weapon) |
131 table.insert(enemies[randomHog].additionalWeapons, deadHog.weapon) |
128 for i=1,table.getn(deadHog.additionalWeapons) do |
132 for i=1,table.getn(deadHog.additionalWeapons) do |
129 table.insert(enemies[randomHog].additionalWeapons, deadHog.additionalWeapons[i]) |
133 table.insert(enemies[randomHog].additionalWeapons, deadHog.additionalWeapons[i]) |
130 end |
134 end |
131 refreshHeroAmmo() |
135 heroWeaponResetPending = true |
132 end |
136 end |
133 end |
137 end |
134 |
138 |
135 function onGearDamage(gear, damage) |
139 function onGearDamage(gear, damage) |
136 if isHog(gear) and GetHealth(hero.gear) then |
140 if isHog(gear) and GetHealth(hero.gear) then |
223 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) |
227 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) |
224 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}}) |
228 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}}) |
225 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) |
229 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) |
226 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your health points will be set to 100"), 5000}}) |
230 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your health points will be set to 100"), 5000}}) |
227 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) |
231 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) |
228 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset"), 5000}}) |
232 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset next turn"), 5000}}) |
229 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) |
233 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) |
230 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
234 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
231 table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
235 table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
232 end |
236 end |
233 |
237 |
254 AddAmmo(hero.gear, amMortar, hero.mortarAmmo + extraAmmo) |
258 AddAmmo(hero.gear, amMortar, hero.mortarAmmo + extraAmmo) |
255 AddAmmo(hero.gear, amFirePunch, hero.firepunchAmmo + extraAmmo) |
259 AddAmmo(hero.gear, amFirePunch, hero.firepunchAmmo + extraAmmo) |
256 AddAmmo(hero.gear, amDEagle, hero.deagleAmmo + extraAmmo) |
260 AddAmmo(hero.gear, amDEagle, hero.deagleAmmo + extraAmmo) |
257 AddAmmo(hero.gear, amBazooka, hero.bazookaAmmo + extraAmmo) |
261 AddAmmo(hero.gear, amBazooka, hero.bazookaAmmo + extraAmmo) |
258 AddAmmo(hero.gear, amGrenade, hero.grenadeAmmo + extraAmmo) |
262 AddAmmo(hero.gear, amGrenade, hero.grenadeAmmo + extraAmmo) |
|
263 heroWeaponResetPending = false |
259 end |
264 end |
260 |
265 |
261 function enemyWeapons() |
266 function enemyWeapons() |
262 for i=1,table.getn(enemies) do |
267 for i=1,table.getn(enemies) do |
263 if GetHealth(enemies[i].gear) and enemies[i].gear == CurrentHedgehog then |
268 if GetHealth(enemies[i].gear) and enemies[i].gear == CurrentHedgehog then |