author | Wuzzy <Wuzzy2@mail.ru> |
Fri, 09 Mar 2018 12:55:54 +0100 | |
changeset 13146 | 8f2260eeb726 |
parent 13144 | 674b76f2d64a |
child 13149 | 9a0b1288315e |
permissions | -rw-r--r-- |
12799
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
1 |
--[[ |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
2 |
A Classic Fairytale: The enemy of my enemy |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
3 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
4 |
= SUMMARY = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
5 |
Simple deathmatch on the Islands map. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
6 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
7 |
= GOAL = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
8 |
Wipe out the Hedge-cogs and Leader teams |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
9 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
10 |
= FLOW CHART = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
11 |
- Cut scene: startAnim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
12 |
- TBS |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
13 |
- Goal completed |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
14 |
- Cut scene: finalAnim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
15 |
> Victory |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
16 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
17 |
]] |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12369
diff
changeset
|
18 |
|
8043 | 19 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
20 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7460 | 21 |
|
22 |
||
23 |
--------------------------------------------Constants------------------------------------ |
|
24 |
choiceAccepted = 1 |
|
25 |
choiceRefused = 2 |
|
26 |
choiceAttacked = 3 |
|
27 |
||
28 |
choiceEliminate = 1 |
|
29 |
choiceSpare = 2 |
|
30 |
||
31 |
leaksNum = 1 |
|
32 |
denseNum = 2 |
|
33 |
waterNum = 3 |
|
34 |
buffaloNum = 4 |
|
35 |
chiefNum = 5 |
|
36 |
girlNum = 6 |
|
37 |
wiseNum = 7 |
|
38 |
ramonNum = 8 |
|
39 |
spikyNum = 9 |
|
40 |
||
41 |
denseScene = 1 |
|
42 |
princessScene = 2 |
|
43 |
waterScene = 3 |
|
44 |
cyborgScene = 4 |
|
45 |
||
46 |
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), |
|
47 |
loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"), |
|
48 |
loc("Wise Oak"), loc("Ramon"), loc("Spiky Cheese") |
|
49 |
} |
|
50 |
||
51 |
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief", |
|
52 |
"tiara", "AkuAku", "rasta", "hair_yellow"} |
|
53 |
||
54 |
nativePos = {{1259, 120}, {2378, 796}, {424, 1299}, {3322, 260}, {1022, 1550}} |
|
55 |
nativeDir = {"Right", "Left", "Right", "Left", "Right"} |
|
56 |
||
57 |
cannibalNames = {loc("Honest Lee"), loc("Vegan Jack"), loc("Sirius Lee"), |
|
58 |
loc("Brutal Lily")} |
|
59 |
cannibalPos = {{162, 266}, {2159, 1517}, {3311, 1621}, {1180, 1560}} |
|
60 |
cannibalDir = {"Right", "Left", "Left", "Right"} |
|
61 |
cannibalsNum = 4 |
|
62 |
||
63 |
playersDir = {"Right", "Left", "Right", "Left", "Right", "Right", "Left", "Left", "Right"} |
|
64 |
playersAntiDir = {"Left", "Right", "Left", "Right", "Left", "Left", "Right", "Right", "Left"} |
|
65 |
||
66 |
cyborgNames = {loc("Smith 0.97"), loc("Smith 0.98"), loc("Smith 0.99a"), |
|
67 |
loc("Smith 0.99b"), loc("Smith 0.99f"), loc("Smith 1.0")} |
|
68 |
cyborgPos = {{2162, 20}, {2458, 564}, {542, 1133}, {3334, 1427}} |
|
69 |
cyborgDir = "Right" |
|
70 |
cyborgsNum = 6 |
|
71 |
cyborgsPos = {{1490, 330}, {1737, 1005}, {2972, 922}, {1341, 1571}, |
|
72 |
{751, 543}, {3889, 907}} |
|
73 |
cyborgsDir = {"Right", "Right", "Left", "Right", "Right", "Left"} |
|
74 |
||
75 |
leaderPos = {3474, 151} |
|
76 |
leaderDir = "Left" |
|
77 |
||
78 |
-----------------------------Variables--------------------------------- |
|
79 |
natives = {} |
|
80 |
origNatives = {} |
|
81 |
||
82 |
cyborgs = {} |
|
83 |
cyborg = nil |
|
84 |
||
85 |
cannibals = {} |
|
86 |
players = {} |
|
87 |
leader = nil |
|
88 |
||
89 |
gearDead = {} |
|
90 |
hedgeHidden = {} |
|
91 |
||
92 |
startAnim = {} |
|
93 |
finalAnim = {} |
|
94 |
-----------------------------Animations-------------------------------- |
|
95 |
function CondNeedToTurn(hog1, hog2) |
|
96 |
xl, xd = GetX(hog1), GetX(hog2) |
|
97 |
if xl > xd then |
|
98 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
|
99 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
|
100 |
elseif xl < xd then |
|
101 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}}) |
|
102 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}}) |
|
103 |
end |
|
104 |
end |
|
105 |
||
106 |
function CondNeedToTurn2(hog1, hog2) |
|
107 |
xl, xd = GetX(hog1), GetX(hog2) |
|
108 |
if xl > xd then |
|
109 |
AnimTurn(hog1, "Left") |
|
110 |
AnimTurn(hog2, "Right") |
|
111 |
elseif xl < xd then |
|
112 |
AnimTurn(hog2, "Left") |
|
113 |
AnimTurn(hog1, "Right") |
|
114 |
end |
|
115 |
end |
|
116 |
||
117 |
function EmitDenseClouds(dir) |
|
118 |
local dif |
|
119 |
if dir == "Left" then |
|
120 |
dif = 10 |
|
121 |
else |
|
122 |
dif = -10 |
|
123 |
end |
|
124 |
if dir == nil then |
|
125 |
dx, dy = GetGearVelocity(dense) |
|
126 |
if dx < 0 then |
|
127 |
dif = 10 |
|
128 |
else |
|
129 |
dif = -10 |
|
130 |
end |
|
131 |
end |
|
132 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
133 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
134 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
135 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
|
136 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
137 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
138 |
AnimInsertStepNext({func = AnimWait, args = {dense, 800}}) |
|
139 |
AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
|
140 |
end |
|
141 |
||
142 |
function RestoreNatives(cgi) |
|
143 |
for i = 1, playersNum do |
|
144 |
RestoreHedge(players[i]) |
|
145 |
AnimOutOfNowhere(players[i], GetGearPosition(players[i])) |
|
146 |
end |
|
147 |
end |
|
148 |
||
149 |
function AnimationSetup() |
|
150 |
SetupCyborgStartAnim() |
|
151 |
SetupPeopleStartAnim() |
|
152 |
SetupEnemyStartAnim() |
|
153 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
|
154 |
end |
|
155 |
||
156 |
function SetupCyborgStartAnim() |
|
157 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 3000}}) |
|
158 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
|
159 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
160 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Right"}}) |
|
161 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
162 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
|
163 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
164 |
table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[2])}}) |
|
165 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
166 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Right"}}) |
|
167 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
168 |
table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
|
169 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
170 |
table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[3])}}) |
|
171 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 1800}}) |
|
172 |
table.insert(startAnim, {func = AnimTeleportGear, args = {cyborg, unpack(cyborgPos[4])}}) |
|
173 |
table.insert(startAnim, {func = AnimWait, args = {cyborg, 800}}) |
|
174 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Everything looks OK..."), SAY_THINK, 2500}}) |
|
175 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("This will be fun!"), SAY_THINK, 2500}}) |
|
176 |
table.insert(startAnim, {func = AnimJump, args = {cyborg, "high"}}) |
|
177 |
table.insert(startAnim, {func = AnimCustomFunction, args = {cyborg, RestoreNatives, {true}}}) |
|
178 |
table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("HAHA!"), SAY_SHOUT, 2000}}) |
|
179 |
table.insert(startAnim, {func = AnimSwitchHog, args = {players[1]}}) |
|
180 |
table.insert(startAnim, {func = AnimDisappear, swh = false, args = {cyborg, unpack(cyborgPos[4])}}) |
|
181 |
table.insert(startAnim, {func = HideHedge, swh = false, args = {cyborg}}) |
|
182 |
end |
|
183 |
||
184 |
function SetupPeopleStartAnim() |
|
185 |
for i = 1, playersNum do |
|
186 |
table.insert(startAnim, {func = AnimTurn, swh = false, args = {players[i], playersAntiDir[i]}}) |
|
187 |
end |
|
188 |
table.insert(startAnim, {func = AnimWait, args = {players[1], 800}}) |
|
189 |
for i = 1, playersNum do |
|
190 |
table.insert(startAnim, {func = AnimTurn, swh = false, args = {players[i], playersDir[i]}}) |
|
191 |
end |
|
192 |
table.insert(startAnim, {func = AnimWait, args = {players[1], 800}}) |
|
193 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("What is this place?"), SAY_SHOUT, 2500}}) |
|
194 |
if m5LeaksDead == 1 then |
|
195 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("And how am I alive?!"), SAY_SAY, 3000}}) |
|
196 |
end |
|
197 |
table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[1], players[2]}}}) |
|
198 |
table.insert(startAnim, {func = AnimSay, args = {players[2], loc("It must be the cyborgs again!"), SAY_SAY, 4000}}) |
|
199 |
table.insert(startAnim, {func = AnimSay, args = {players[3], loc("Looks like the whole world is falling apart!"), SAY_SAY, 6000}}) |
|
200 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Look out! We're surrounded by cannibals!"), SAY_SHOUT, 6000}}) |
|
201 |
table.insert(startAnim, {func = AnimCustomFunction, args = {players[4], CondNeedToTurn, {players[4], cannibals[1]}}}) |
|
202 |
table.insert(startAnim, {func = AnimCustomFunction, args = {players[4], CondNeedToTurn, {players[1], cannibals[1]}}}) |
|
203 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Cannibals?! You're the cannibals!"), SAY_SHOUT, 4000}}) |
|
204 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("WHAT?! You're the ones attacking us!"), SAY_SHOUT, 5000}}) |
|
205 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("You have kidnapped our whole tribe!"), SAY_SHOUT, 4000}}) |
|
206 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("You've been assaulting us, we have been just defending ourselves!"), SAY_SHOUT, 8000}}) |
|
207 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("I can't believe this!"), SAY_SHOUT, 3000}}) |
|
208 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Have we ever attacked you first?"), SAY_SHOUT, 5000}}) |
|
209 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Yes!"), SAY_SHOUT, 2000}}) |
|
210 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("When?"), SAY_SHOUT, 2000}}) |
|
211 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Uhmm...ok no."), SAY_SHOUT, 2000}}) |
|
212 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("But you're cannibals. It's what you do."), SAY_SHOUT, 5000}}) |
|
213 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Again with the 'cannibals' thing!"), SAY_SHOUT, 4000}}) |
|
214 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Where do you get that?!"), SAY_SHOUT, 3000}}) |
|
215 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Everyone knows this."), SAY_SHOUT, 2500}}) |
|
216 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("I didn't until about a month ago."), SAY_SHOUT, 4000}}) |
|
217 |
table.insert(startAnim, {func = AnimSay, args = {players[4], loc("Hmmm...actually...I didn't either."), SAY_SHOUT, 4000}}) |
|
218 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("About a month ago, a cyborg came and told us that you're the cannibals!"), SAY_SHOUT, 8000}}) |
|
219 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("A cy-what?"), SAY_SHOUT, 2000}}) |
|
220 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("Cyborg. It's what the aliens call themselves."), SAY_SHOUT, 5000}}) |
|
221 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("They told us to wear these clothes. They said that this is the newest trend."), SAY_SHOUT, 8000}}) |
|
222 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("They've been manipulating us all this time!"), SAY_SHOUT, 5000}}) |
|
223 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("They must be trying to weaken us!"), SAY_SHOUT, 5000}}) |
|
224 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We have to unite and defeat those cylergs!"), SAY_SHOUT, 5000}}) |
|
225 |
table.insert(startAnim, {func = AnimSay, args = {cannibals[1], loc("We can't let them take over our little island!"), SAY_SHOUT, 5000}}) |
|
226 |
end |
|
227 |
||
228 |
function RestoreCyborgs(cgi) |
|
229 |
if cyborgsRestored == true then |
|
230 |
return |
|
231 |
end |
|
232 |
for i = 1, cyborgsNum do |
|
233 |
RestoreHedge(cyborgs[i]) |
|
234 |
if cgi == true then |
|
235 |
AnimOutOfNowhere(cyborgs[i], unpack(cyborgsPos[i])) |
|
236 |
end |
|
237 |
end |
|
238 |
RestoreHedge(leader) |
|
239 |
AnimOutOfNowhere(leader, unpack(leaderPos)) |
|
240 |
cyborgsRestored = true |
|
241 |
end |
|
242 |
||
243 |
function SetupEnemyStartAnim() |
|
244 |
local gear |
|
245 |
table.insert(startAnim, {func = AnimCustomFunction, args = {cannibals[1], RestoreCyborgs, {true}}}) |
|
246 |
if m8EnemyFled == 1 then |
|
247 |
gear = leader |
|
248 |
else |
|
249 |
gear = cyborgs[2] |
|
250 |
end |
|
251 |
table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[4], gear}}}) |
|
252 |
table.insert(startAnim, {func = AnimCustomFunction, args = {players[1], CondNeedToTurn, {players[1], gear}}}) |
|
253 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("You have finally figured it out!"), SAY_SHOUT, 4500}}) |
|
7527
35d154745d7a
All missions: switched blood needers with meatbags in dialogues
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
254 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("You meatbags are pretty slow, you know!"), SAY_SHOUT, 5500}}) |
7460 | 255 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("Why do you want to take over our island?"), SAY_SHOUT, 5500}}) |
256 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("Do you have any idea how valuable grass is?"), SAY_SHOUT, 5500}}) |
|
257 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("This island is the only place left on Earth with grass on it!"), SAY_SHOUT, 7000}}) |
|
258 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("It's worth more than wood!"), SAY_SHOUT, 4000}}) |
|
259 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("That makes it almost invaluable!"), SAY_SHOUT, 4500}}) |
|
260 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We have nowhere else to live!"), SAY_SHOUT, 4500}}) |
|
261 |
table.insert(startAnim, {func = AnimSay, args = {gear, loc("That's not our problem!"), SAY_SHOUT, 4500}}) |
|
262 |
table.insert(startAnim, {func = AnimSay, args = {players[1], loc("We'll give you a problem then!"), SAY_SHOUT, 5000}}) |
|
263 |
table.insert(startAnim, {func = AnimSwitchHog, args = {gear}}) |
|
264 |
end |
|
265 |
||
266 |
function SetupFinalAnim() |
|
267 |
finalAnim = { |
|
268 |
{func = AnimGearWait, args = {cyborg, 1000}}, |
|
7530 | 269 |
{func = AnimSay, args = {cyborg, loc("Nicely done, meatbags!"), SAY_SAY, 3000}}, |
7460 | 270 |
{func = AnimSay, args = {cyborg, loc("You have won the game by proving true cooperative skills!"), SAY_SAY, 7000}}, |
271 |
{func = AnimSay, args = {cyborg, loc("You have proven yourselves worthy!"), SAY_SAY, 4000}}, |
|
272 |
{func = AnimSay, args = {players[1], loc("Game? Was this a game to you?!"), SAY_SAY, 4000}}, |
|
273 |
{func = AnimSay, args = {cyborg, loc("Well, yes. This was a cyborg television show."), SAY_SAY, 5500}}, |
|
274 |
{func = AnimSay, args = {cyborg, loc("It is called 'Hogs of Steel'."), SAY_SAY, 4000}}, |
|
275 |
{func = AnimSay, args = {players[1], loc("Are you saying that many of us have died for your entertainment?"), SAY_SAY, 8000}}, |
|
276 |
{func = AnimSay, args = {players[1], loc("Our tribe, our beautiful island!"), SAY_SAY, 4000}}, |
|
277 |
{func = AnimSay, args = {players[1], loc("All gone...everything!"), SAY_SAY, 3000}}, |
|
278 |
{func = AnimSay, args = {cyborg, loc("But the ones alive are stronger in their heart!"), SAY_SAY, 6000}}, |
|
279 |
{func = AnimSay, args = {cyborg, loc("Just kidding, none of you have died!"), SAY_SAY, 5000}}, |
|
280 |
{func = AnimSay, args = {cyborg, loc("I mean, none of you ceased to live."), SAY_SAY, 5000}}, |
|
281 |
{func = AnimSay, args = {cyborg, loc("You'll see what I mean!"), SAY_SAY, 4000}}, |
|
282 |
{func = AnimSay, args = {cyborg, loc("They are all waiting back in the village, haha."), SAY_SAY, 7000}}, |
|
283 |
{func = AnimSay, args = {players[1], loc("You are playing with our lives here!"), SAY_SAY, 6000}}, |
|
284 |
{func = AnimSay, args = {players[1], loc("Do you think you're some kind of god?"), SAY_SAY, 6000}}, |
|
285 |
{func = AnimSay, args = {cyborg, loc("Interesting idea, haha!"), SAY_SAY, 2000}}, |
|
286 |
{func = AnimSwitchHog, args = {players[1]}}, |
|
287 |
{func = AnimWait, args = {players[1], 1}}, |
|
288 |
{func = AnimDisappear, swh = false, args = {cyborg, unpack(cyborgPos[4])}}, |
|
289 |
{func = HideHedge, swh = false, args = {cyborg}}, |
|
290 |
{func = AnimSay, args = {players[1], loc("What a douche!"), SAY_SAY, 2000}}, |
|
291 |
} |
|
292 |
end |
|
293 |
--------------------------Anim skip functions-------------------------- |
|
294 |
function SkipStartAnim() |
|
295 |
RestoreNatives() |
|
296 |
RestoreCyborgs() |
|
297 |
SetGearMessage(CurrentHedgehog, 0) |
|
298 |
AnimSwitchHog(cyborgs[1]) |
|
299 |
AnimWait(cyborg, 1) |
|
300 |
AddFunction({func = HideHedge, args = {cyborg}}) |
|
301 |
end |
|
302 |
||
303 |
function AfterStartAnim() |
|
304 |
ShowMission(loc("The Enemy Of My Enemy"), loc("The Union"), loc("Defeat the cyborgs!"), 1, 0) |
|
305 |
PutWeaponCrates() |
|
306 |
PutHealthCrates() |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
307 |
EndTurn(true) |
7460 | 308 |
end |
309 |
||
310 |
function PutHealthCrates() |
|
311 |
for i = 1, 10 do |
|
312 |
SpawnHealthCrate(0, 0) |
|
313 |
end |
|
314 |
end |
|
315 |
||
316 |
function PutWeaponCrates() |
|
12938
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
317 |
SpawnSupplyCrate(2399, 622, amNapalm, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
318 |
SpawnSupplyCrate(2199, -18, amBee, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
319 |
SpawnSupplyCrate(2088, 430, amBee, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
320 |
SpawnSupplyCrate(237, 20, amMortar, 4) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
321 |
SpawnSupplyCrate(312, 1107, amMolotov, 3) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
322 |
SpawnSupplyCrate(531, 1123, amWatermelon, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
323 |
SpawnSupplyCrate(1253, 1444, amFlamethrower, 5) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
324 |
SpawnSupplyCrate(994, 1364, amBaseballBat, 3) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
325 |
SpawnSupplyCrate(1104, 1553, amMine, 6) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
326 |
SpawnSupplyCrate(2277, 803, amDynamite, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
327 |
SpawnSupplyCrate(1106, 184, amRCPlane, 3) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
328 |
SpawnSupplyCrate(1333, 28, amSMine, 4) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
329 |
SpawnSupplyCrate(90, 279, amAirAttack, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
330 |
SpawnSupplyCrate(288, 269, amBee, 2) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
331 |
SpawnSupplyCrate(818, 1633, amBaseballBat, 2) |
7460 | 332 |
end |
333 |
-----------------------------Events------------------------------------ |
|
334 |
function CheckNativesDead() |
|
335 |
return nativesLeft == 0 |
|
336 |
end |
|
337 |
||
338 |
function CheckCannibalsDead() |
|
339 |
return cannibalsLeft == 0 |
|
340 |
end |
|
341 |
||
342 |
function CheckPlayersDead() |
|
343 |
return playersLeft == 0 |
|
344 |
end |
|
345 |
||
346 |
function CheckCyborgsDead() |
|
347 |
return (cyborgsLeft == 0 and (leader == nil or gearDead[leader] == true)) |
|
348 |
end |
|
349 |
||
350 |
function DoNativesDead() |
|
351 |
nativesDeadFresh = true |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
352 |
EndTurn(true) |
7460 | 353 |
end |
354 |
||
355 |
function DoCannibalsDead() |
|
356 |
cannibalsDeadFresh = true |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
357 |
EndTurn(true) |
7460 | 358 |
end |
359 |
||
360 |
function DoPlayersDead() |
|
361 |
RemoveEventFunc(CheckNativesDead) |
|
362 |
RemoveEventFunc(CheckCannibalsDead) |
|
363 |
RemoveEventFunc(CheckCyborgsDead) |
|
364 |
playersDeadFresh = true |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
365 |
EndTurn(true) |
7460 | 366 |
end |
367 |
||
368 |
function DoCyborgsDead() |
|
369 |
-- RemoveEventFunc(CheckNativesDead) |
|
370 |
-- RemoveEventFunc(CheckCannibalsDead) |
|
371 |
cyborgsDeadFresh= true |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
372 |
EndTurn(true) |
7460 | 373 |
end |
374 |
||
375 |
function CheckGearsDead(gearList) |
|
376 |
for i = 1, # gearList do |
|
377 |
if gearDead[gearList[i]] ~= true then |
|
378 |
return false |
|
379 |
end |
|
380 |
end |
|
381 |
return true |
|
382 |
end |
|
383 |
||
384 |
function CheckGearDead(gear) |
|
385 |
return gearDead[gear] |
|
386 |
end |
|
387 |
||
388 |
function FailedMission() |
|
389 |
RestoreHedge(cyborg) |
|
390 |
AnimOutOfNowhere(cyborg, unpack(cyborgPos[1])) |
|
391 |
if CheckCyborgsDead() then |
|
392 |
AnimSay(cyborg, loc("Hmmm...it's a draw. How unfortunate!"), SAY_THINK, 6000) |
|
393 |
elseif leader ~= nil then |
|
394 |
CondNeedToTurn2(cyborg, leader) |
|
395 |
AddAnim({{func = AnimSay, args = {leader, loc("Yay, we won!"), SAY_SAY, 2000}}, |
|
396 |
{func = AnimSay, args = {cyborg, loc("Nice work!"), SAY_SAY, 2000}}}) |
|
397 |
else |
|
398 |
CondNeedToTurn2(cyborg, cyborgs[1]) |
|
399 |
AddAnim({{func = AnimSay, args = {cyborgs[1], loc("Yay, we won!"), SAY_SAY, 2000}}, |
|
400 |
{func = AnimSay, args = {cyborg, loc("Nice work!"), SAY_SAY, 2000}}}) |
|
401 |
end |
|
402 |
AddFunction({func = LoseMission, args = {}}) |
|
403 |
end |
|
404 |
||
405 |
function LoseMission() |
|
10290 | 406 |
DismissTeam(loc("Natives")) |
407 |
DismissTeam(loc("Cannibals")) |
|
408 |
DismissTeam(loc("011101001")) |
|
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
409 |
EndTurn(true) |
7460 | 410 |
end |
411 |
||
412 |
function WonMission() |
|
413 |
RestoreHedge(cyborg) |
|
414 |
CondNeedToTurn2(cyborg, players[1]) |
|
415 |
SetupFinalAnim() |
|
416 |
AddAnim(finalAnim) |
|
417 |
AddFunction({func = WinMission, args = {}}) |
|
418 |
end |
|
419 |
||
420 |
function WinMission() |
|
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
421 |
if progress and progress<9 then |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
422 |
SaveCampaignVar("Progress", "9") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
423 |
end |
10290 | 424 |
DismissTeam(loc("011101001")) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
425 |
EndTurn(true) |
7460 | 426 |
end |
427 |
-----------------------------Misc-------------------------------------- |
|
428 |
function HideHedge(hedge) |
|
429 |
if hedgeHidden[hedge] ~= true then |
|
430 |
HideHog(hedge) |
|
431 |
hedgeHidden[hedge] = true |
|
432 |
end |
|
433 |
end |
|
434 |
||
435 |
function RestoreHedge(hedge) |
|
436 |
if hedgeHidden[hedge] == true then |
|
437 |
RestoreHog(hedge) |
|
438 |
hedgeHidden[hedge] = false |
|
439 |
end |
|
440 |
end |
|
441 |
||
442 |
function GetVariables() |
|
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
443 |
progress = tonumber(GetCampaignVar("Progress")) |
7460 | 444 |
m5DeployedNum = tonumber(GetCampaignVar("M5DeployedNum")) |
445 |
m2Choice = tonumber(GetCampaignVar("M2Choice")) |
|
446 |
m5Choice = tonumber(GetCampaignVar("M5Choice")) |
|
447 |
m2DenseDead = tonumber(GetCampaignVar("M2DenseDead")) |
|
448 |
m4DenseDead = tonumber(GetCampaignVar("M4DenseDead")) |
|
449 |
m5DenseDead = tonumber(GetCampaignVar("M5DenseDead")) |
|
450 |
m4LeaksDead = tonumber(GetCampaignVar("M4LeaksDead")) |
|
451 |
m5LeaksDead = tonumber(GetCampaignVar("M5LeaksDead")) |
|
452 |
m4ChiefDead = tonumber(GetCampaignVar("M4ChiefDead")) |
|
453 |
m5ChiefDead = tonumber(GetCampaignVar("M5ChiefDead")) |
|
454 |
m4WaterDead = tonumber(GetCampaignVar("M4WaterDead")) |
|
455 |
m5WaterDead = tonumber(GetCampaignVar("M5WaterDead")) |
|
456 |
m4BuffaloDead = tonumber(GetCampaignVar("M4BuffaloDead")) |
|
457 |
m5BuffaloDead = tonumber(GetCampaignVar("M5BuffaloDead")) |
|
458 |
m5WiseDead = tonumber(GetCampaignVar("M5WiseDead")) |
|
459 |
m5GirlDead = tonumber(GetCampaignVar("M5GirlDead")) |
|
460 |
m8DeployedDead = tonumber(GetCampaignVar("M8DeployedDead")) |
|
461 |
m8PrincessDead = tonumber(GetCampaignVar("M8PrincessDead")) |
|
462 |
m8RamonDead = tonumber(GetCampaignVar("M8RamonDead")) |
|
463 |
m8SpikyDead = tonumber(GetCampaignVar("M8SpikyDead")) |
|
464 |
m8DeployedLeader = tonumber(GetCampaignVar("M8DeployedLeader")) |
|
465 |
m8PrincessLeader = tonumber(GetCampaignVar("M8PrincessLeader")) |
|
466 |
m8EnemyFled = tonumber(GetCampaignVar("M8EnemyFled")) |
|
467 |
m8Scene = tonumber(GetCampaignVar("M8Scene")) |
|
468 |
end |
|
469 |
||
470 |
function SetupPlace() |
|
471 |
for i = 1, playersNum do |
|
472 |
HideHedge(players[i]) |
|
473 |
end |
|
474 |
for i = 1, cyborgsNum do |
|
475 |
HideHedge(cyborgs[i]) |
|
476 |
end |
|
477 |
if leader ~= nil then |
|
478 |
HideHedge(leader) |
|
479 |
end |
|
480 |
end |
|
481 |
||
482 |
function SetupEvents() |
|
483 |
AddNewEvent(CheckPlayersDead, {}, DoPlayersDead, {}, 0) |
|
484 |
AddNewEvent(CheckNativesDead, {}, DoNativesDead, {}, 0) |
|
485 |
AddNewEvent(CheckCannibalsDead, {}, DoCannibalsDead, {}, 0) |
|
486 |
AddNewEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0) |
|
487 |
end |
|
488 |
||
489 |
function SetupAmmo() |
|
490 |
AddAmmo(cyborgs[1], amClusterBomb, 100) |
|
491 |
AddAmmo(cyborgs[1], amMortar, 100) |
|
492 |
AddAmmo(cyborgs[1], amDynamite, 2) |
|
493 |
AddAmmo(cyborgs[1], amAirAttack, 2) |
|
494 |
AddAmmo(cyborgs[1], amTeleport, 100) |
|
495 |
||
496 |
if leader ~= nil then |
|
497 |
AddAmmo(leader, amClusterBomb, 100) |
|
498 |
AddAmmo(leader, amMortar, 100) |
|
499 |
AddAmmo(leader, amDynamite, 100) |
|
500 |
AddAmmo(leader, amAirAttack, 3) |
|
501 |
AddAmmo(leader, amTeleport, 100) |
|
502 |
end |
|
503 |
end |
|
504 |
||
505 |
function AddHogs() |
|
13144
674b76f2d64a
ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
506 |
AddTeam(loc("011101001"), 0xFF0204, "ring", "UFO", "Robot", "cm_binary") |
7460 | 507 |
cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
508 |
||
13144
674b76f2d64a
ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
509 |
AddTeam(loc("Natives"), 0x4980C1, "Bone", "Island", "HillBilly", "cm_birdy") |
7460 | 510 |
natives[1] = AddHog(nativeNames[leaksNum], 0, 100, nativeHats[leaksNum]) |
511 |
if m5DeployedNum ~= leaksNum and m8DeployedLeader == 0 then |
|
512 |
natives[2] = AddHog(nativeNames[m5DeployedNum], 0, 100, nativeHats[m5DeployedNum]) |
|
513 |
end |
|
514 |
table.insert(natives, AddHog(nativeNames[ramonNum], 0, 100, nativeHats[ramonNum])) |
|
515 |
table.insert(natives, AddHog(nativeNames[spikyNum], 0, 100, nativeHats[spikyNum])) |
|
516 |
if m8PrincessLeader == 0 then |
|
517 |
table.insert(natives, AddHog(loc("Fell From Heaven"), 0, 100, "tiara")) |
|
518 |
end |
|
519 |
nativesNum = #natives |
|
520 |
nativesLeft = nativesNum |
|
521 |
cannibalsLeft = cannibalsNum |
|
522 |
for i = 1, nativesNum do |
|
523 |
table.insert(players, natives[i]) |
|
524 |
end |
|
525 |
||
13144
674b76f2d64a
ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
526 |
AddTeam(loc("Cannibals"), 0x4980C1, "Bone", "Island", "HillBilly", "cm_birdy") |
7460 | 527 |
for i = 1, cannibalsNum do |
528 |
cannibals[i] = AddHog(cannibalNames[i], 0, 100, "Zombi") |
|
529 |
table.insert(players, cannibals[i]) |
|
530 |
end |
|
531 |
playersNum = #players |
|
532 |
playersLeft = playersNum |
|
533 |
||
13144
674b76f2d64a
ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
534 |
AddTeam(loc("Hedge-cogs"), 0xFFFF01, "ring", "UFO", "Robot", "cm_cyborg") |
7460 | 535 |
for i = 1, cyborgsNum do |
536 |
cyborgs[i] = AddHog(cyborgNames[i], 2, 80, "cyborg2") |
|
537 |
end |
|
538 |
||
539 |
if m8EnemyFled == 1 then |
|
13144
674b76f2d64a
ACF: Only use standard team colors
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
540 |
AddTeam(loc("Leader"), 0xFFFF01, "ring", "UFO", "Robot", "cm_cyborg") |
7460 | 541 |
if m8Scene == denseScene then |
542 |
leader = AddHog(loc("Dense Cloud"), 2, 200, nativeHats[denseNum]) |
|
543 |
elseif m8Scene == waterScene then |
|
544 |
leader = AddHog(loc("Fiery Water"), 2, 200, nativeHats[waterNum]) |
|
545 |
elseif m8Scene == princessScene then |
|
546 |
leader = AddHog(loc("Fell From Heaven"), 2, 200, "tiara") |
|
547 |
else |
|
548 |
leader = AddHog(loc("Nancy Screw"), 2, 200, "cyborg2") |
|
549 |
end |
|
550 |
end |
|
551 |
||
552 |
cyborgsLeft = cyborgsNum |
|
553 |
||
554 |
for i = 1, nativesNum do |
|
555 |
AnimSetGearPosition(natives[i], unpack(nativePos[i])) |
|
556 |
AnimTurn(natives[i], nativeDir[i]) |
|
557 |
end |
|
558 |
for i = 1, cannibalsNum do |
|
559 |
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
|
560 |
AnimTurn(cannibals[i], cannibalDir[i]) |
|
561 |
end |
|
562 |
for i = 1, cyborgsNum do |
|
563 |
AnimSetGearPosition(cyborgs[i], unpack(cyborgsPos[i])) |
|
564 |
AnimTurn(cyborgs[i], cyborgsDir[i]) |
|
565 |
end |
|
566 |
AnimSetGearPosition(cyborg, unpack(cyborgPos[1])) |
|
567 |
AnimTurn(cyborg, cyborgDir) |
|
568 |
if leader ~= nil then |
|
569 |
AnimSetGearPosition(leader, unpack(leaderPos)) |
|
570 |
AnimTurn(leader, leaderDir[i]) |
|
571 |
end |
|
572 |
end |
|
573 |
||
574 |
-----------------------------Main Functions---------------------------- |
|
575 |
||
576 |
function onGameInit() |
|
577 |
Seed = 0 |
|
578 |
GameFlags = gfSolidLand |
|
579 |
TurnTime = 60000 |
|
580 |
CaseFreq = 0 |
|
581 |
MinesNum = 0 |
|
582 |
MinesTime = 3000 |
|
583 |
Explosives = 0 |
|
584 |
Delay = 10 |
|
585 |
Map = "Islands" |
|
586 |
Theme = "EarthRise" |
|
587 |
SuddenDeathTurns = 20 |
|
588 |
||
589 |
GetVariables() |
|
590 |
AnimInit() |
|
591 |
AddHogs() |
|
592 |
end |
|
593 |
||
594 |
function onGameStart() |
|
595 |
SetupAmmo() |
|
596 |
SetupPlace() |
|
597 |
AnimationSetup() |
|
598 |
SetupEvents() |
|
599 |
AddAnim(startAnim) |
|
600 |
AddFunction({func = AfterStartAnim, args = {}}) |
|
601 |
end |
|
602 |
||
603 |
function onGameTick() |
|
604 |
AnimUnWait() |
|
605 |
if ShowAnimation() == false then |
|
606 |
return |
|
607 |
end |
|
608 |
ExecuteAfterAnimations() |
|
609 |
CheckEvents() |
|
610 |
end |
|
611 |
||
612 |
function onGearDelete(gear) |
|
613 |
gearDead[gear] = true |
|
614 |
if GetGearType(gear) == gtHedgehog then |
|
615 |
if GetHogTeamName(gear) == loc("Natives") then |
|
616 |
for i = 1, nativesLeft do |
|
617 |
if natives[i] == gear then |
|
618 |
table.remove(natives, i) |
|
619 |
table.remove(players, i) |
|
620 |
nativesLeft = nativesLeft - 1 |
|
621 |
playersLeft = playersLeft - 1 |
|
622 |
end |
|
623 |
end |
|
624 |
elseif GetHogTeamName(gear) == loc("Cannibals") then |
|
625 |
for i = 1, cannibalsLeft do |
|
626 |
if cannibals[i] == gear then |
|
627 |
table.remove(cannibals, i) |
|
628 |
table.remove(players, nativesLeft + i) |
|
629 |
cannibalsLeft = cannibalsLeft - 1 |
|
630 |
playersLeft = playersLeft - 1 |
|
631 |
end |
|
632 |
end |
|
633 |
elseif GetHogTeamName(gear) == loc("Hedge-cogs") then |
|
634 |
for i = 1, cyborgsLeft do |
|
635 |
if cyborgs[i] == gear then |
|
636 |
table.remove(cyborgs, i) |
|
637 |
end |
|
638 |
end |
|
639 |
cyborgsLeft = cyborgsLeft - 1 |
|
640 |
end |
|
641 |
end |
|
642 |
end |
|
643 |
||
644 |
function onAmmoStoreInit() |
|
645 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
646 |
SetAmmo(amSwitch, 9, 0, 0, 0) |
|
647 |
SetAmmo(amDEagle, 9, 0, 0, 0) |
|
648 |
SetAmmo(amSniperRifle, 9, 0, 0, 0) |
|
649 |
SetAmmo(amBazooka, 8, 0, 0, 0) |
|
650 |
SetAmmo(amGrenade, 7, 0, 0, 0) |
|
651 |
SetAmmo(amFirePunch, 9, 0, 0, 0) |
|
652 |
SetAmmo(amShotgun, 9, 0, 0, 0) |
|
653 |
||
654 |
SetAmmo(amParachute, 9, 0, 0, 0) |
|
655 |
SetAmmo(amRope, 9, 0, 0, 0) |
|
656 |
SetAmmo(amPickHammer, 9, 0, 0, 0) |
|
657 |
SetAmmo(amBlowTorch, 9, 0, 0, 0) |
|
658 |
end |
|
659 |
||
660 |
function onNewTurn() |
|
661 |
if AnimInProgress() then |
|
662 |
TurnTimeLeft = -1 |
|
663 |
return |
|
664 |
end |
|
665 |
if playersDeadFresh then |
|
666 |
playersDeadFresh = false |
|
667 |
FailedMission() |
|
668 |
elseif cyborgsDeadFresh then |
|
669 |
cyborgsDeadFresh = false |
|
670 |
WonMission() |
|
671 |
elseif nativesDeadFresh and GetHogTeamName(CurrentHedgehog) == loc("Cannibals") then |
|
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
672 |
AnimSay(CurrentHedgehog, loc("Your deaths will be avenged, Natives!"), SAY_SHOUT, 0) |
7460 | 673 |
nativesDeadFresh = false |
674 |
elseif cannibalsDeadFresh and GetHogTeamName(CurrentHedgehog) == loc("Natives") then |
|
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
675 |
AnimSay(CurrentHedgehog, loc("Your deaths will be avenged, Cannibals!"), SAY_SHOUT, 0) |
7460 | 676 |
cannibalsDeadFresh = false |
677 |
end |
|
678 |
end |
|
679 |
||
680 |
function onPrecise() |
|
681 |
if GameTime > 3000 and AnimInProgress() then |
|
682 |
SetAnimSkip(true) |
|
683 |
end |
|
684 |
end |