159 |
180 |
160 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, RestoreWave, {2}}, swh = false}) |
181 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, RestoreWave, {2}}, swh = false}) |
161 for i = 5, 8 do |
182 for i = 5, 8 do |
162 table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
183 table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
163 end |
184 end |
|
185 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, Wave2Reaction, {}}, swh = false}) |
164 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {2}}, swh = false}) |
186 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {2}}, swh = false}) |
165 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {2}}, swh = false}) |
187 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {2}}, swh = false}) |
166 AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
188 AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
|
189 end |
|
190 |
|
191 function SetupHogDeadAnim(gear) |
|
192 hogDeadAnim = {} |
|
193 if nativesNum == 0 then |
|
194 return |
|
195 end |
|
196 local hogDeadStrings = {"They killed " .. gear .."! You bastards!", |
|
197 gear .. "! Why?!", |
|
198 "That was just mean!", |
|
199 "Oh no, not " .. gear .. "!"} |
|
200 table.insert(hogDeadAnim, {func = AnimSay, args = {CurrentHedgehog, hogDeadStrings[nativesNum], SAY_SHOUT, 4000}}) |
167 end |
201 end |
168 |
202 |
169 function SetupFinalAnim() |
203 function SetupFinalAnim() |
170 local found = 0 |
204 local found = 0 |
171 local hogs = {} |
205 local hogs = {} |
257 cannibals[i] = AddHog(HogNames[i], 3, 70, "Zombi") |
291 cannibals[i] = AddHog(HogNames[i], 3, 70, "Zombi") |
258 end |
292 end |
259 |
293 |
260 AddTeam(loc("Heavy Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
294 AddTeam(loc("Heavy Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
261 for i = 5, 8 do |
295 for i = 5, 8 do |
262 cannibals[i] = AddHog(HogNames[i], 2, 100, "vampirichog") |
296 cannibals[i] = AddHog(HogNames[i], 2, 70, "vampirichog") |
263 end |
297 end |
264 |
298 |
265 AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star") |
299 AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star") |
266 cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
300 cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
267 |
301 |
381 function onGearDelete(gear) |
415 function onGearDelete(gear) |
382 if gear == dense then |
416 if gear == dense then |
383 denseDead = true |
417 denseDead = true |
384 nativesNum = nativesNum - 1 |
418 nativesNum = nativesNum - 1 |
385 nativesDead[2] = true |
419 nativesDead[2] = true |
|
420 freshDead = loc("Dense Cloud") |
386 elseif gear == leaks then |
421 elseif gear == leaks then |
387 leaksDead = true |
422 leaksDead = true |
388 nativesNum = nativesNum - 1 |
423 nativesNum = nativesNum - 1 |
389 nativesDead[1] = true |
424 nativesDead[1] = true |
|
425 freshDead = loc("Leaks A Lot") |
390 elseif gear == chief then |
426 elseif gear == chief then |
391 chiefDead = true |
427 chiefDead = true |
392 nativesNum = nativesNum - 1 |
428 nativesNum = nativesNum - 1 |
393 nativesDead[5] = true |
429 nativesDead[5] = true |
|
430 freshDead = loc("Righteous Beard") |
394 elseif gear == water then |
431 elseif gear == water then |
395 waterDead = true |
432 waterDead = true |
396 nativesNum = nativesNum - 1 |
433 nativesNum = nativesNum - 1 |
397 nativesDead[3] = true |
434 nativesDead[3] = true |
|
435 freshDead = loc("Fiery Water") |
398 elseif gear == buffalo then |
436 elseif gear == buffalo then |
399 buffaloDead = true |
437 buffaloDead = true |
400 nativesNum = nativesNum - 1 |
438 nativesNum = nativesNum - 1 |
401 nativesDead[4] = true |
439 nativesDead[4] = true |
|
440 freshDead = loc("Raging Buffalo") |
402 else |
441 else |
403 for i = 1, 8 do |
442 for i = 1, 8 do |
404 if gear == cannibals[i] then |
443 if gear == cannibals[i] then |
405 cannibalDead[i] = true |
444 cannibalDead[i] = true |
406 end |
445 end |
411 function onGearAdd(gear) |
450 function onGearAdd(gear) |
412 end |
451 end |
413 |
452 |
414 function onAmmoStoreInit() |
453 function onAmmoStoreInit() |
415 SetAmmo(amDEagle, 9, 0, 0, 0) |
454 SetAmmo(amDEagle, 9, 0, 0, 0) |
416 SetAmmo(amSniperRifle, 9, 0, 0, 0) |
455 SetAmmo(amSniperRifle, 4, 0, 0, 0) |
417 SetAmmo(amFirePunch, 9, 0, 0, 0) |
456 SetAmmo(amFirePunch, 9, 0, 0, 0) |
418 SetAmmo(amWhip, 9, 0, 0, 0) |
457 SetAmmo(amWhip, 9, 0, 0, 0) |
419 SetAmmo(amBaseballBat, 9, 0, 0, 0) |
458 SetAmmo(amBaseballBat, 9, 0, 0, 0) |
420 SetAmmo(amHammer, 9, 0, 0, 0) |
459 SetAmmo(amHammer, 9, 0, 0, 0) |
421 SetAmmo(amLandGun, 9, 0, 0, 0) |
460 SetAmmo(amLandGun, 9, 0, 0, 0) |
422 SetAmmo(amSnowball, 9, 0, 0, 0) |
461 SetAmmo(amSnowball, 8, 0, 0, 0) |
423 SetAmmo(amGirder, 4, 0, 0, 2) |
462 SetAmmo(amGirder, 4, 0, 0, 2) |
424 SetAmmo(amParachute, 4, 0, 0, 2) |
463 SetAmmo(amParachute, 4, 0, 0, 2) |
425 SetAmmo(amSwitch, 8, 0, 0, 2) |
464 SetAmmo(amSwitch, 8, 0, 0, 2) |
426 SetAmmo(amSkip, 9, 0, 0, 0) |
465 SetAmmo(amSkip, 8, 0, 0, 0) |
427 SetAmmo(amRope, 5, 0, 0, 3) |
466 SetAmmo(amRope, 5, 0, 0, 3) |
428 SetAmmo(amBlowTorch, 3, 0, 0, 3) |
467 SetAmmo(amBlowTorch, 3, 0, 0, 3) |
429 SetAmmo(amPickHammer, 0, 0, 0, 3) |
468 SetAmmo(amPickHammer, 0, 0, 0, 3) |
430 SetAmmo(amLowGravity, 0, 0, 0, 2) |
469 SetAmmo(amLowGravity, 0, 0, 0, 2) |
431 SetAmmo(amDynamite, 0, 0, 0, 3) |
470 SetAmmo(amDynamite, 0, 0, 0, 3) |
432 SetAmmo(amBazooka, 0, 0, 0, 4) |
471 SetAmmo(amBazooka, 0, 0, 0, 4) |
433 SetAmmo(amGrenade, 0, 0, 0, 5) |
472 SetAmmo(amGrenade, 0, 0, 0, 5) |
434 SetAmmo(amMine, 0, 0, 0, 2) |
473 SetAmmo(amMine, 0, 0, 0, 2) |
435 SetAmmo(amMolotov, 0, 0, 0, 3) |
474 SetAmmo(amMolotov, 0, 0, 0, 3) |
436 SetAmmo(amFlamethrower, 0, 0, 0, 3) |
475 SetAmmo(amFlamethrower, 0, 0, 0, 3) |
|
476 SetAmmo(amShotgun, 0, 0, 0, 3) |
|
477 SetAmmo(amTeleport, 0, 0, 0, 2) |
|
478 SetAmmo(amFlamethrower, 0, 0, 0, 3) |
437 end |
479 end |
438 |
480 |
439 function onNewTurn() |
481 function onNewTurn() |
440 if AnimInProgress() then |
482 if AnimInProgress() then |
441 TurnTimeLeft = -1 |
483 TurnTimeLeft = -1 |
|
484 return |
|
485 end |
|
486 if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == loc("Natives") then |
|
487 SetupHogDeadAnim(freshDead) |
|
488 AddAnim(hogDeadAnim) |
|
489 AddFunction({func = AfterHogDeadAnim, args = {}}) |
442 end |
490 end |
443 end |
491 end |
444 |
492 |
445 function onGearDamage(gear, damage) |
493 function onGearDamage(gear, damage) |
446 end |
494 end |