author | Wuzzy <Wuzzy2@mail.ru> |
Sat, 05 Jan 2019 20:32:48 +0100 | |
changeset 14538 | 2fd8f4cd3aa4 |
parent 14537 | f5487302d53b |
child 14539 | a97216ff1c51 |
permissions | -rw-r--r-- |
5277 | 1 |
---------------------------------- |
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
2 |
-- THE SPECIALISTS |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
3 |
-- original style by mikade |
5277 | 4 |
---------------------------------- |
5 |
||
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
6 |
-------------------- |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
7 |
-- TODO |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
8 |
-------------------- |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
9 |
-- add proper gameflag checking, maybe (so that we can throw in a .cfg and let the users break everything) |
5362
5f0c46e78e50
Enable autoswitch on turn start for The Specialists Mode.
mikade
parents:
5277
diff
changeset
|
10 |
|
5277 | 11 |
|
8043 | 12 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
13 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
14537 | 14 |
HedgewarsScriptLoad("/Scripts/Params.lua") |
15 |
||
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
16 |
--[[ |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
17 |
Specialist letters: |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
18 |
|
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
19 |
S=[S]oldier |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
20 |
E=[E]ngineer |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
21 |
N=[N]inja |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
22 |
D=[D]emo |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
23 |
X=Sniper |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
24 |
H=Saint ([H]oly) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
25 |
P=[P]yro |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
26 |
C=Loon ([C]lown) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
27 |
]] |
14537 | 28 |
-- default team values |
29 |
local currTeamIdx = 0; |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
30 |
local teamRoles = { |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
31 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
32 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
33 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
34 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
35 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
36 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
37 |
{'S','E','N','D','X','H','P','C'}, |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
38 |
{'S','E','N','D','X','H','P','C'} |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
39 |
}; |
5277 | 40 |
|
5382 | 41 |
local numhhs = 0 |
42 |
local hhs = {} |
|
5277 | 43 |
|
5362
5f0c46e78e50
Enable autoswitch on turn start for The Specialists Mode.
mikade
parents:
5277
diff
changeset
|
44 |
local started = false |
5457 | 45 |
|
14537 | 46 |
function onParameters() |
47 |
parseParams() |
|
48 |
for i = 1, 8 do |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
49 |
if params['t'..i] ~= nil then |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
50 |
for j = 1, 8 do |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
51 |
if string.len(params['t'..i]) >= j then |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
52 |
teamRoles[i][j] = string.upper(string.sub(params['t'..i],j,j)); |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
53 |
end |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
54 |
end |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
55 |
end |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
56 |
end |
14537 | 57 |
end |
58 |
||
6747 | 59 |
function onNewAmmoStore(groupIndex, hogIndex) |
5277 | 60 |
|
6747 | 61 |
SetAmmo(amSkip, 9, 0, 0, 0) |
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
62 |
groupIndex = groupIndex + 1 |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
63 |
hogIndex = hogIndex + 1 |
5277 | 64 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
65 |
if teamRoles[groupIndex][hogIndex] == 'S' then |
6747 | 66 |
SetAmmo(amBazooka, 1, 0, 0, 0) |
67 |
SetAmmo(amGrenade, 1, 0, 0, 0) |
|
68 |
SetAmmo(amShotgun, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
69 |
elseif teamRoles[groupIndex][hogIndex] == 'E' then |
6747 | 70 |
SetAmmo(amGirder, 2, 0, 0, 0) |
71 |
SetAmmo(amBlowTorch, 1, 0, 0, 0) |
|
72 |
SetAmmo(amPickHammer, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
73 |
elseif teamRoles[groupIndex][hogIndex] == 'N' then |
6747 | 74 |
SetAmmo(amRope, 9, 0, 0, 0) |
75 |
SetAmmo(amParachute, 9, 0, 0, 0) |
|
76 |
SetAmmo(amFirePunch, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
77 |
elseif teamRoles[groupIndex][hogIndex] == 'D' then |
6747 | 78 |
SetAmmo(amDynamite, 1, 0, 0, 0) |
79 |
SetAmmo(amMine, 1, 0, 0, 0) |
|
80 |
SetAmmo(amDrill, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
81 |
elseif teamRoles[groupIndex][hogIndex] == 'X' then |
6747 | 82 |
SetAmmo(amSniperRifle, 1, 0, 0, 0) |
83 |
SetAmmo(amDEagle, 1, 0, 0, 0) |
|
84 |
SetAmmo(amPortalGun, 2, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
85 |
elseif teamRoles[groupIndex][hogIndex] == 'H' then |
6747 | 86 |
SetAmmo(amSeduction, 9, 0, 0, 0) |
87 |
SetAmmo(amResurrector, 1, 0, 0, 0) |
|
88 |
SetAmmo(amInvulnerable, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
89 |
SetAmmo(amLowGravity, 1, 0, 0, 0) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
90 |
elseif teamRoles[groupIndex][hogIndex] == 'P' then |
6747 | 91 |
SetAmmo(amFlamethrower, 1, 0, 0, 0) |
92 |
SetAmmo(amMolotov, 1, 0, 0, 0) |
|
93 |
SetAmmo(amNapalm, 1, 0, 0, 0) |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
94 |
elseif teamRoles[groupIndex][hogIndex] == 'C' then |
6747 | 95 |
SetAmmo(amBaseballBat, 1, 0, 0, 0) |
96 |
SetAmmo(amGasBomb, 1, 0, 0, 0) |
|
97 |
SetAmmo(amKamikaze, 1, 0, 0, 0) |
|
98 |
end |
|
5277 | 99 |
|
100 |
end |
|
101 |
||
6747 | 102 |
function CreateTeam() |
5277 | 103 |
|
6747 | 104 |
currTeam = "" |
105 |
lastTeam = "" |
|
106 |
z = 0 |
|
107 |
||
108 |
for i = 0, (numhhs-1) do |
|
5277 | 109 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
110 |
currTeam = GetHogTeamName(hhs[i]) |
5382 | 111 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
112 |
if currTeam == lastTeam then |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
113 |
z = z + 1 |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
114 |
else |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
115 |
z = 1 |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
116 |
currTeamIdx = currTeamIdx + 1; |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
117 |
end |
5277 | 118 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
119 |
if teamRoles[currTeamIdx][z] == 'S' then |
5277 | 120 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
121 |
SetHogName(hhs[i],loc("Soldier")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
122 |
SetHogHat(hhs[i], "sf_vega") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
123 |
SetHealth(hhs[i],200) |
6747 | 124 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
125 |
elseif teamRoles[currTeamIdx][z] == 'E' then |
5382 | 126 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
127 |
SetHogHat(hhs[i], "Glasses") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
128 |
SetHogName(hhs[i],loc("Engineer")) |
5382 | 129 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
130 |
elseif teamRoles[currTeamIdx][z] == 'N' then |
5277 | 131 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
132 |
SetHogName(hhs[i],loc("Ninja")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
133 |
SetHogHat(hhs[i], "NinjaFull") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
134 |
SetHealth(hhs[i],80) |
5277 | 135 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
136 |
elseif teamRoles[currTeamIdx][z] == 'D' then |
6747 | 137 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
138 |
SetHogName(hhs[i],loc("Demo")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
139 |
SetHogHat(hhs[i], "Skull") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
140 |
SetHealth(hhs[i],200) |
6747 | 141 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
142 |
elseif teamRoles[currTeamIdx][z] == 'X' then |
5277 | 143 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
144 |
SetHogName(hhs[i],loc("Sniper")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
145 |
SetHogHat(hhs[i], "Sniper") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
146 |
SetHealth(hhs[i],120) |
6747 | 147 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
148 |
elseif teamRoles[currTeamIdx][z] == 'H' then |
6747 | 149 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
150 |
SetHogName(hhs[i],loc("Saint")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
151 |
SetHogHat(hhs[i], "angel") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
152 |
SetHealth(hhs[i],300) |
5277 | 153 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
154 |
elseif teamRoles[currTeamIdx][z] == 'P' then |
6747 | 155 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
156 |
SetHogName(hhs[i],loc("Pyro")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
157 |
SetHogHat(hhs[i], "Gasmask") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
158 |
SetHealth(hhs[i],150) |
6747 | 159 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
160 |
elseif teamRoles[currTeamIdx][z] == 'C' then |
6747 | 161 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
162 |
SetHogName(hhs[i],loc("Loon")) |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
163 |
SetHogHat(hhs[i], "clown") |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
164 |
SetHealth(hhs[i],100) |
6747 | 165 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
166 |
end |
6747 | 167 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
168 |
lastTeam = GetHogTeamName(hhs[i]) |
6747 | 169 |
|
170 |
end |
|
5277 | 171 |
|
172 |
end |
|
173 |
||
174 |
function onGameInit() |
|
10036 | 175 |
ClearGameFlags() |
14537 | 176 |
EnableGameFlags(gfResetWeps, gfInfAttack, gfPlaceHog, gfPerHogAmmo, gfSwitchHog) |
5817
70208e400a59
For now, don't spawn anything other than health crates.
mikade
parents:
5797
diff
changeset
|
177 |
HealthCaseProb = 100 |
5277 | 178 |
end |
179 |
||
180 |
function onGameStart() |
|
5382 | 181 |
|
6747 | 182 |
CreateTeam() |
5277 | 183 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
184 |
ShowMission( |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
185 |
loc("THE SPECIALISTS"), |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
186 |
loc("a Hedgewars mini-game"), |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
187 |
loc("Eliminate the enemy specialists.") .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
188 |
" " .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
189 |
loc("Game Modifiers: ") .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
190 |
loc("Per-Hog Ammo") .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
191 |
loc("Weapons Reset") .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
192 |
loc("Unlimited Attacks") .. "|" .. |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
193 |
"", 4, 4000 |
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
194 |
) |
5277 | 195 |
|
5457 | 196 |
trackTeams() |
197 |
||
5277 | 198 |
end |
199 |
||
200 |
||
201 |
function onNewTurn() |
|
13273
8f579173b161
The Specialits: Use gfSwitchHog for hog switching and delete the terrible Lua hacks
Wuzzy <Wuzzy2@mail.ru>
parents:
12350
diff
changeset
|
202 |
|
6747 | 203 |
started = true |
13273
8f579173b161
The Specialits: Use gfSwitchHog for hog switching and delete the terrible Lua hacks
Wuzzy <Wuzzy2@mail.ru>
parents:
12350
diff
changeset
|
204 |
AddCaption(loc("Prepare yourself") .. ", " .. GetHogName(CurrentHedgehog).. "!") |
5277 | 205 |
|
206 |
end |
|
207 |
||
208 |
function onGearAdd(gear) |
|
5382 | 209 |
|
14538
2fd8f4cd3aa4
Clean up indents and comments in The_Specialists.lua
Wuzzy <Wuzzy2@mail.ru>
parents:
14537
diff
changeset
|
210 |
if GetGearType(gear) == gtHedgehog then |
6747 | 211 |
hhs[numhhs] = gear |
212 |
numhhs = numhhs + 1 |
|
213 |
elseif (GetGearType(gear) == gtMine) and (started == true) then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5817
diff
changeset
|
214 |
SetTimer(gear,5000) |
5457 | 215 |
end |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5817
diff
changeset
|
216 |
|
5457 | 217 |
if (GetGearType(gear) == gtHedgehog) or (GetGearType(gear) == gtResurrector) then |
218 |
trackGear(gear) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5817
diff
changeset
|
219 |
end |
5457 | 220 |
|
5277 | 221 |
end |
222 |
||
223 |
function onGearDelete(gear) |
|
5457 | 224 |
if (GetGearType(gear) == gtHedgehog) or (GetGearType(gear) == gtResurrector) then |
225 |
trackDeletion(gear) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5817
diff
changeset
|
226 |
end |
5277 | 227 |
end |
228 |