17 -- missions objectives |
17 -- missions objectives |
18 local goals = { |
18 local goals = { |
19 [dialog01] = {missionName, loc("The final part"), loc("Defeat Professor Hogevil!"), 1, 4500}, |
19 [dialog01] = {missionName, loc("The final part"), loc("Defeat Professor Hogevil!"), 1, 4500}, |
20 } |
20 } |
21 -- crates |
21 -- crates |
22 local portalCrate = {x = 1935, y = 1830} |
22 local teleportCrate = {x = 1935, y = 1830} |
|
23 local drillCrate = {x = 3810, y = 1705} |
23 local batCrate = {x = 1975, y = 1830} |
24 local batCrate = {x = 1975, y = 1830} |
24 local blowtorchCrate = {x = 1520, y = 1950} |
25 local blowtorchCrate = {x = 1520, y = 1950} |
25 local cakeCrate = {x = 325, y = 1500} |
26 local cakeCrate = {x = 325, y = 1500} |
26 local ropeCrate = {x = 1860, y = 500} |
27 local ropeCrate = {x = 1860, y = 500} |
27 local pickHammerCrate = {x = 1900, y = 400} |
28 local pickHammerCrate = {x = 1900, y = 400} |
139 |
140 |
140 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
141 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
141 AddEvent(onEnemiesDeath, {hero.gear}, enemiesDeath, {hero.gear}, 0) |
142 AddEvent(onEnemiesDeath, {hero.gear}, enemiesDeath, {hero.gear}, 0) |
142 |
143 |
143 -- add crates |
144 -- add crates |
144 SpawnAmmoCrate(portalCrate.x, portalCrate.y, amPortalGun) |
145 SpawnAmmoCrate(teleportCrate.x, teleportCrate.y, amTeleport) |
|
146 SpawnAmmoCrate(drillCrate.x, drillCrate.y, amTeleport) |
|
147 SpawnAmmoCrate(drillCrate.x, drillCrate.y, amDrill) |
145 SpawnAmmoCrate(batCrate.x, batCrate.y, amBaseballBat) |
148 SpawnAmmoCrate(batCrate.x, batCrate.y, amBaseballBat) |
146 SpawnAmmoCrate(blowtorchCrate.x, blowtorchCrate.y, amBlowTorch) |
149 SpawnAmmoCrate(blowtorchCrate.x, blowtorchCrate.y, amBlowTorch) |
147 SpawnAmmoCrate(cakeCrate.x, cakeCrate.y, amCake) |
150 SpawnAmmoCrate(cakeCrate.x, cakeCrate.y, amCake) |
148 SpawnAmmoCrate(ropeCrate.x, ropeCrate.y, amRope) |
151 SpawnAmmoCrate(ropeCrate.x, ropeCrate.y, amRope) |
149 SpawnAmmoCrate(pickHammerCrate.x, pickHammerCrate.y, amPickHammer) |
152 SpawnAmmoCrate(pickHammerCrate.x, pickHammerCrate.y, amPickHammer) |
157 -- add mines |
160 -- add mines |
158 AddGear(3520, 1650, gtMine, 0, 0, 0, 0) |
161 AddGear(3520, 1650, gtMine, 0, 0, 0, 0) |
159 AddGear(3480, 1680, gtMine, 0, 0, 0, 0) |
162 AddGear(3480, 1680, gtMine, 0, 0, 0, 0) |
160 AddGear(3440, 1690, gtMine, 0, 0, 0, 0) |
163 AddGear(3440, 1690, gtMine, 0, 0, 0, 0) |
161 AddGear(3400, 1710, gtMine, 0, 0, 0, 0) |
164 AddGear(3400, 1710, gtMine, 0, 0, 0, 0) |
|
165 AddGear(2100, 1730, gtMine, 0, 0, 0, 0) |
|
166 AddGear(2150, 1730, gtMine, 0, 0, 0, 0) |
|
167 AddGear(2200, 1750, gtMine, 0, 0, 0, 0) |
162 -- add girders |
168 -- add girders |
163 PlaceGirder(3770, 1370, 4) |
169 PlaceGirder(3770, 1370, 4) |
164 PlaceGirder(3700, 1460, 6) |
170 PlaceGirder(3700, 1460, 6) |
165 PlaceGirder(3840, 1460, 6) |
171 PlaceGirder(3840, 1460, 6) |
166 |
172 |
201 CheckEvents() |
207 CheckEvents() |
202 end |
208 end |
203 |
209 |
204 function onAmmoStoreInit() |
210 function onAmmoStoreInit() |
205 SetAmmo(amCake, 0, 0, 0, 1) |
211 SetAmmo(amCake, 0, 0, 0, 1) |
206 SetAmmo(amPortalGun, 0, 0, 0, 1) |
212 SetAmmo(amTeleport, 0, 0, 0, 1) |
207 SetAmmo(amBaseballBat, 0, 0, 0, 1) |
213 SetAmmo(amBaseballBat, 0, 0, 0, 4) |
208 SetAmmo(amBlowTorch, 0, 0, 0, 2) |
214 SetAmmo(amBlowTorch, 0, 0, 0, 1) |
209 SetAmmo(amRope, 0, 0, 0, 2) |
215 SetAmmo(amRope, 0, 0, 0, 2) |
210 SetAmmo(amPickHammer, 0, 0, 0, 1) |
216 SetAmmo(amPickHammer, 0, 0, 0, 1) |
|
217 SetAmmo(amDrill, 0, 0, 0, 1) |
211 end |
218 end |
212 |
219 |
213 function onGearDelete(gear) |
220 function onGearDelete(gear) |
214 if gear == hero.gear then |
221 if gear == hero.gear then |
215 hero.dead = true |
222 hero.dead = true |