author | Periklis Ntanasis <pntanasis@gmail.com> |
Tue, 24 Dec 2013 01:10:38 +0200 | |
changeset 9831 | afa4e3e04cc5 |
parent 9810 | 54c0fdec4600 |
child 11692 | 68eddcdc9f26 |
permissions | -rw-r--r-- |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
1 |
------------------- ABOUT ---------------------- |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
2 |
-- |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
3 |
-- Hero has been surrounded my some space villains |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
4 |
-- He has to defeat them in order to escape |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
5 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
6 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
7 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
8 |
HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
9 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
10 |
----------------- VARIABLES -------------------- |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
11 |
-- globals |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
12 |
local missionName = loc("Killing the specialists") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
13 |
local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. |
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
14 |
loc("Each time you play this missions enemy hogs will play in a random order").."|".. |
9758 | 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").."|".. |
|
9831 | 17 |
loc("If you kill a hedgehog with the respective weapon your health points will be set to 100").."|".. |
9758 | 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").."|".. |
|
20 |
loc("Rope won't get reset") |
|
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
21 |
-- dialogs |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
22 |
local dialog01 = {} |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
23 |
-- mission objectives |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
24 |
local goals = { |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
25 |
[dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500}, |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
26 |
} |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
27 |
-- hogs |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
28 |
local hero = { |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
29 |
name = loc("Hog Solo"), |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
30 |
x = 850, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
31 |
y = 460, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
32 |
mortarAmmo = 2, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
33 |
firepunchAmmo = 1, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
34 |
deagleAmmo = 4, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
35 |
bazookaAmmo = 2, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
36 |
grenadeAmmo = 4, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
37 |
} |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
38 |
local enemies = { |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
39 |
{ name = loc("Mortar"), x = 1890, y = 520, weapon = amMortar, additionalWeapons = {}}, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
40 |
{ name = loc("Desert Eagle"), x = 1390, y = 790, weapon = amDEagle, additionalWeapons = {}}, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
41 |
{ name = loc("Grenade"), x = 186, y = 48, weapon = amGrenade, additionalWeapons = {}}, |
9644 | 42 |
{ name = loc("Shoryuken"), x = 330, y = 270, weapon = amFirePunch, additionalWeapons = {}}, |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
43 |
{ name = loc("Bazooka"), x = 1950, y = 150, weapon = amBazooka, additionalWeapons = {}}, |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
44 |
} |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
45 |
-- teams |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
46 |
local teamA = { |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
47 |
name = loc("Hog Solo"), |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
48 |
color = tonumber("38D61C",16) -- green |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
49 |
} |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
50 |
local teamB = { |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
51 |
name = loc("5 deadly hogs"), |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
52 |
color = tonumber("FF0000",16) -- red |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
53 |
} |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
54 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
55 |
-------------- LuaAPI EVENT HANDLERS ------------------ |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
56 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
57 |
function onGameInit() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
58 |
Seed = 1 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
59 |
TurnTime = 25000 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
60 |
CaseFreq = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
61 |
MinesNum = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
62 |
MinesTime = 1 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
63 |
Explosives = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
64 |
Map = "death02_map" |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
65 |
Theme = "Hell" |
9758 | 66 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
67 |
-- Hog Solo |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
68 |
AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
69 |
hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
70 |
AnimSetGearPosition(hero.gear, hero.x, hero.y) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
71 |
-- enemies |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
72 |
shuffleHogs(enemies) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
73 |
AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
74 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
75 |
enemies[i].gear = AddHog(enemies[i].name, 1, 100, "war_desertgrenadier1") |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
76 |
AnimSetGearPosition(enemies[i].gear, enemies[i].x, enemies[i].y) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
77 |
end |
9758 | 78 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
79 |
initCheckpoint("death02") |
9758 | 80 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
81 |
AnimInit() |
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
82 |
AnimationSetup() |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
83 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
84 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
85 |
function onGameStart() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
86 |
AnimWait(hero.gear, 3000) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
87 |
FollowGear(hero.gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
88 |
ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) |
9758 | 89 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
90 |
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
91 |
AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
92 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
93 |
--hero ammo |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
94 |
AddAmmo(hero.gear, amSkip, 100) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
95 |
AddAmmo(hero.gear, amRope, 2) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
96 |
refreshHeroAmmo() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
97 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
98 |
SendHealthStatsOff() |
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
99 |
AddAnim(dialog01) |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
100 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
101 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
102 |
function onNewTurn() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
103 |
if CurrentHedgehog ~= hero.gear then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
104 |
enemyWeapons() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
105 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
106 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
107 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
108 |
function onGearDelete(gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
109 |
if isHog(gear) then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
110 |
SetHealth(hero.gear, 100) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
111 |
local deadHog = getHog(gear) |
9603
47b8edc799f5
changed some left amDynamite to amMortar
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9602
diff
changeset
|
112 |
if deadHog.weapon == amMortar then |
47b8edc799f5
changed some left amDynamite to amMortar
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9602
diff
changeset
|
113 |
hero.mortarAmmo = 0 |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
114 |
elseif deadHog.weapon == amFirePunch then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
115 |
hero.firepunchAmmo = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
116 |
elseif deadHog.weapon == amDEagle then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
117 |
hero.deagleAmmo = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
118 |
elseif deadHog.weapon == amBazooka then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
119 |
hero.bazookaAmmo = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
120 |
elseif deadHog.weapon == amGrenade then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
121 |
hero.grenadeAmmo = 0 |
9758 | 122 |
end |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
123 |
local randomHog = GetRandom(table.getn(enemies))+1 |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
124 |
while not GetHealth(enemies[randomHog].gear) do |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
125 |
randomHog = GetRandom(table.getn(enemies))+1 |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
126 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
127 |
table.insert(enemies[randomHog].additionalWeapons, deadHog.weapon) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
128 |
for i=1,table.getn(deadHog.additionalWeapons) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
129 |
table.insert(enemies[randomHog].additionalWeapons, deadHog.additionalWeapons[i]) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
130 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
131 |
refreshHeroAmmo() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
132 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
133 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
134 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
135 |
function onGearDamage(gear, damage) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
136 |
if isHog(gear) and GetHealth(hero.gear) then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
137 |
SetHealth(hero.gear, GetHealth(hero.gear) + damage/3) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
138 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
139 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
140 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
141 |
function onGameTick() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
142 |
AnimUnWait() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
143 |
if ShowAnimation() == false then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
144 |
return |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
145 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
146 |
ExecuteAfterAnimations() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
147 |
CheckEvents() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
148 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
149 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
150 |
function onPrecise() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
151 |
if GameTime > 3000 then |
9758 | 152 |
SetAnimSkip(true) |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
153 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
154 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
155 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
156 |
-------------- EVENTS ------------------ |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
157 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
158 |
function onHeroDeath(gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
159 |
if not GetHealth(hero.gear) then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
160 |
return true |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
161 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
162 |
return false |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
163 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
164 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
165 |
function onHeroWin(gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
166 |
local allDead = true |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
167 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
168 |
if GetHealth(enemies[i].gear) then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
169 |
allDead = false |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
170 |
break |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
171 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
172 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
173 |
return allDead |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
174 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
175 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
176 |
-------------- ACTIONS ------------------ |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
177 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
178 |
function heroDeath(gear) |
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9631
diff
changeset
|
179 |
SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
9758 | 180 |
SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) |
181 |
SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) |
|
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9631
diff
changeset
|
182 |
SendStat(siPlayerKills,'1',teamB.name) |
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9631
diff
changeset
|
183 |
SendStat(siPlayerKills,'0',teamA.name) |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
184 |
EndGame() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
185 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
186 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
187 |
function heroWin(gear) |
9630 | 188 |
saveBonus(3, 4) |
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9631
diff
changeset
|
189 |
SendStat(siGameResult, loc("Congratulations, you won!")) |
9758 | 190 |
SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) |
191 |
SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) |
|
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9631
diff
changeset
|
192 |
SendStat(siPlayerKills,'1',teamA.name) |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
193 |
EndGame() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
194 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
195 |
|
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
196 |
-------------- ANIMATIONS ------------------ |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
197 |
|
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
198 |
function Skipanim(anim) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
199 |
if goals[anim] ~= nil then |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
200 |
ShowMission(unpack(goals[anim])) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
201 |
end |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
202 |
startBattle() |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
203 |
end |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
204 |
|
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
205 |
function AnimationSetup() |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
206 |
-- DIALOG 01 - Start, game instructions |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
207 |
AddSkipFunction(dialog01, Skipanim, {dialog01}) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
208 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
209 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}}) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
210 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}}) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
211 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) |
9758 | 212 |
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}}) |
213 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) |
|
9831 | 214 |
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}}) |
9758 | 215 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) |
216 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset"), 5000}}) |
|
217 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) |
|
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
218 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
9758 | 219 |
table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
220 |
end |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
221 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
222 |
------------ Other Functions ------------------- |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
223 |
|
9602
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
224 |
function startBattle() |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
225 |
AnimSwitchHog(hero.gear) |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
226 |
TurnTimeLeft = TurnTime |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
227 |
end |
a8ed4853963e
dialogs with objectives added
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9601
diff
changeset
|
228 |
|
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
229 |
function shuffleHogs(hogs) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
230 |
local hogsNumber = table.getn(hogs) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
231 |
for i=1,hogsNumber do |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9758
diff
changeset
|
232 |
local randomHog = GetRandom(hogsNumber) + 1 |
9601
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
233 |
hogs[i], hogs[randomHog] = hogs[randomHog], hogs[i] |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
234 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
235 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
236 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
237 |
function refreshHeroAmmo() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
238 |
local extraAmmo = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
239 |
if getAliveEnemiesCount() == 1 then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
240 |
extraAmmo = 2 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
241 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
242 |
AddAmmo(hero.gear, amMortar, hero.mortarAmmo + extraAmmo) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
243 |
AddAmmo(hero.gear, amFirePunch, hero.firepunchAmmo + extraAmmo) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
244 |
AddAmmo(hero.gear, amDEagle, hero.deagleAmmo + extraAmmo) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
245 |
AddAmmo(hero.gear, amBazooka, hero.bazookaAmmo + extraAmmo) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
246 |
AddAmmo(hero.gear, amGrenade, hero.grenadeAmmo + extraAmmo) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
247 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
248 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
249 |
function enemyWeapons() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
250 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
251 |
if GetHealth(enemies[i].gear) and enemies[i].gear == CurrentHedgehog then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
252 |
AddAmmo(enemies[i].gear, amMortar, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
253 |
AddAmmo(enemies[i].gear, amFirePunch, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
254 |
AddAmmo(enemies[i].gear, amDEagle, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
255 |
AddAmmo(enemies[i].gear, amBazooka, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
256 |
AddAmmo(enemies[i].gear, amGrenade, 0) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
257 |
AddAmmo(enemies[i].gear, enemies[i].weapon, 1) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
258 |
for w=1,table.getn(enemies[i].additionalWeapons) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
259 |
AddAmmo(enemies[i].gear, enemies[i].additionalWeapons[w], 1) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
260 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
261 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
262 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
263 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
264 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
265 |
function isHog(gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
266 |
local hog = false |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
267 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
268 |
if gear == enemies[i].gear then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
269 |
hog = true |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
270 |
break |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
271 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
272 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
273 |
return hog |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
274 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
275 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
276 |
function getHog(gear) |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
277 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
278 |
if gear == enemies[i].gear then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
279 |
return enemies[i] |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
280 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
281 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
282 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
283 |
|
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
284 |
function getAliveEnemiesCount() |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
285 |
local count = 0 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
286 |
for i=1,table.getn(enemies) do |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
287 |
if GetHealth(enemies[i].gear) then |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
288 |
count = count + 1 |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
289 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
290 |
end |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
291 |
return count |
6af4ca27421a
added death planet side mission
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
292 |
end |