author | Wuzzy <almikes@aol.com> |
Wed, 04 May 2016 04:44:41 +0200 | |
changeset 11960 | d72a177dbaea |
parent 11959 | 62be63822a96 |
child 12054 | 030464f34d47 |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
7481 | 3 |
|
4 |
-----------------------------Constants--------------------------------- |
|
5 |
leaksNum = 1 |
|
6 |
denseNum = 2 |
|
7 |
waterNum = 3 |
|
8 |
buffaloNum = 4 |
|
9 |
chiefNum = 5 |
|
10 |
girlNum = 6 |
|
11 |
wiseNum = 7 |
|
12 |
ramonNum = 8 |
|
13 |
spikyNum = 9 |
|
14 |
princessNum = 10 |
|
15 |
||
16 |
denseScene = 1 |
|
17 |
princessScene = 2 |
|
18 |
waterScene = 3 |
|
19 |
cyborgScene = 4 |
|
20 |
||
21 |
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), |
|
22 |
loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"), |
|
23 |
loc("Wise Oak"), loc("Ramon"), loc("Spiky Cheese"), |
|
24 |
loc("Fell From Heaven") |
|
25 |
} |
|
26 |
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief", |
|
27 |
"tiara", "AkuAku", "rasta", "hair_yellow", "tiara"} |
|
28 |
||
29 |
nativePosCyborg = {{1900, 508}, {480, 1321}, {2927, 873}, |
|
30 |
{1325, 905}, {3190, 1424}, {1442, 857}, |
|
31 |
{1134, 1278}, {2881, 853}, {2974, 897}, |
|
32 |
{2033, 511}} |
|
33 |
nativeDirCyborg = {"Right", "Right", "Left", "Right", "Right", "Left", "Right", "Right", "Left", "Left"} |
|
34 |
||
35 |
nativePosPrincess = {{1930, 508}, {480, 1321}, {2927, 873}, |
|
36 |
{1325, 905}, {3190, 1424}, {2033, 511}, |
|
37 |
{1134, 1278}, {2881, 853}, {2974, 897}, |
|
38 |
{1900, 508}} |
|
39 |
nativeDirPrincess = {"Right", "Right", "Left", "Right", "Right", "Left", "Right", "Right", "Left", "Right"} |
|
40 |
||
41 |
nativePosDense = {{1930, 508}, {2285, 772}, {2927, 873}, |
|
42 |
{1325, 905}, {3190, 1424}, {1442, 857}, |
|
43 |
{1134, 1278}, {480, 1321}, {2974, 897}, |
|
44 |
{2033, 511}} |
|
45 |
nativeDirDense = {"Right", "Left", "Left", "Right", "Right", "Left", "Right", "Right", "Left", "Left"} |
|
46 |
||
47 |
nativePosWater = {{1900, 508}, {2033, 511}, {2285, 772}, |
|
48 |
{1325, 905}, {3190, 1424}, {1442, 857}, |
|
49 |
{1134, 1278}, {480, 1321}, {2974, 897}, |
|
50 |
{1980, 511}} |
|
51 |
nativeDirWater = {"Right", "Left", "Left", "Right", "Right", "Left", "Right", "Right", "Left", "Left"} |
|
52 |
||
53 |
prisonPos = {2285, 772} |
|
54 |
||
55 |
brainNum = 1 |
|
56 |
corpseNum = 2 |
|
57 |
brutalNum = 3 |
|
58 |
earNum = 4 |
|
59 |
hanniNum = 5 |
|
60 |
||
61 |
cannibalNames = {loc("Brainiac"), loc("Corpse Thrower"), loc("Brutal Lily"), loc("Ear Sniffer"), loc("Hannibal")} |
|
62 |
cannibalHats = {"Zombi", "AkuAku", "Zombi", "Zombi", "IndianChief"} |
|
63 |
cannibalPos = {{533, 1304}, {1184, 1282}, {1386, 883}, {2854, 834}, {3243, 1415}} |
|
64 |
cannibalDir = {"Left", "Left", "Left", "Right", "Left"} |
|
65 |
-----------------------------Variables--------------------------------- |
|
66 |
natives = {} |
|
67 |
cannibals = {} |
|
68 |
traitor = nil |
|
69 |
crate = nil |
|
70 |
||
71 |
startAnim = {} |
|
72 |
||
73 |
gearDead = {} |
|
74 |
--------------------------Anim skip functions-------------------------- |
|
75 |
function SkipStartAnim() |
|
76 |
SetGearMessage(CurrentHedgehog, 0) |
|
77 |
AnimSwitchHog(natives[1]) |
|
78 |
end |
|
79 |
||
80 |
function AfterStartAnim() |
|
81 |
crate = SpawnHealthCrate(0, 0) |
|
82 |
SetGearMessage(CurrentHedgehog, 0) |
|
83 |
AddNewEvent(CheckCrateTaken, {}, DoCrateTaken, {}, 1) |
|
84 |
TurnTimeLeft = 0 |
|
85 |
ShowMission("Epilogue", "That's all folks!", "You have successfully finished the campaign!|If you wish to replay, there are other possible endings, too!|You can practice moving around and using utilities in this mission.|However, it will never end!", 1, 0) |
|
11960
d72a177dbaea
Update campaign drop-down list after campaign victory
Wuzzy <almikes@aol.com>
parents:
11959
diff
changeset
|
86 |
SaveCampaignVar("Progress", "10") |
11959
62be63822a96
Fix final mission of Progress-based campaigns (like ACF) not being recognized as finished
Wuzzy <almikes@aol.com>
parents:
11038
diff
changeset
|
87 |
SaveCampaignVar("Won", "true") |
7481 | 88 |
end |
89 |
||
90 |
---------------------------Events------------------------------------- |
|
91 |
function CheckCrateTaken() |
|
92 |
return gearDead[crate] |
|
93 |
end |
|
94 |
||
95 |
function DoCrateTaken() |
|
96 |
crate = SpawnHealthCrate(0, 0) |
|
97 |
end |
|
98 |
-----------------------------Animations-------------------------------- |
|
99 |
function AnimationSetup() |
|
100 |
if m8Scene == cyborgScene then |
|
101 |
SetupAnimCyborg() |
|
102 |
elseif m8Scene == princessScene then |
|
103 |
SetupAnimPrincess() |
|
104 |
elseif m8Scene == waterScene then |
|
105 |
SetupAnimWater() |
|
106 |
else |
|
107 |
SetupAnimDense() |
|
108 |
end |
|
109 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
|
110 |
end |
|
111 |
||
112 |
function SetupAnimWater() |
|
113 |
startAnim = { |
|
114 |
{func = AnimWait, args = {natives[1], 3000}}, |
|
115 |
{func = AnimCaption, args = {natives[ramonNum], "Back in the village, the two tribes finally started to live in harmony.", 5000}}, |
|
116 |
{func = AnimSay, args = {natives[ramonNum], "You got a killer mask there, amigo!", SAY_SAY, 5500}}, |
|
117 |
{func = AnimSay, args = {cannibals[brainNum], "Thanks, man! It really means a lot to me.", SAY_SAY, 6000}}, |
|
118 |
{func = AnimSay, args = {natives[wiseNum], "So, uhmm, how did you manage to teleport them so far?", SAY_SAY, 8000}}, |
|
119 |
{func = AnimSay, args = {cannibals[corpseNum], "It's all about the right carrots, you know.", SAY_SAY, 7000}}, |
|
120 |
{func = AnimSay, args = {natives[wiseNum], "Of course! It's all obvious now!", SAY_SAY, 4500}}, |
|
121 |
{func = AnimSay, args = {natives[chiefNum], "I can't believe how blind we were...", SAY_SAY, 4500}}, |
|
122 |
{func = AnimSay, args = {natives[chiefNum], "Fighting instead of cultivating a beautiful friendship.", SAY_SAY, 8500}}, |
|
123 |
{func = AnimSay, args = {cannibals[hanniNum], "One shall not judge one by one's appearance!", SAY_SAY, 7000}}, |
|
124 |
{func = AnimSay, args = {natives[chiefNum], "You speak great truth, Hannibal. Here, take a sip!", SAY_SAY, 7500}}, |
|
125 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
126 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
127 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
128 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
129 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
130 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
131 |
{func = AnimSay, args = {natives[leaksNum], "It's amazing how quickly our lives can change...", SAY_SAY, 7000}}, |
|
132 |
{func = AnimSay, args = {natives[waterNum], "Aye! Fellow! Let me exit this chamber of doom!", SAY_SAY, 7000}}, |
|
133 |
{func = AnimTurn, args = {natives[princessNum], "Right"}}, |
|
134 |
{func = AnimSay, args = {natives[princessNum], "It's your fault you're there!", SAY_SAY, 5000}}, |
|
135 |
{func = AnimTurn, args = {natives[princessNum], "Left"}}, |
|
136 |
{func = AnimSay, args = {natives[leaksNum], "I always suspected him!", SAY_SAY, 3000}}, |
|
137 |
{func = AnimSay, args = {natives[leaksNum], "Nobody takes walks every day!", SAY_SAY, 4000}}, |
|
138 |
{func = AnimSay, args = {natives[princessNum], "I don't know who I can trust anymore.", SAY_SAY, 6000}}, |
|
139 |
{func = AnimSay, args = {natives[princessNum], "Everywhere I look, I see hogs walking around...", SAY_SAY, 7000}}, |
|
140 |
{func = AnimSay, args = {natives[princessNum], "...and I think they are up to something. Something bad!", SAY_SAY, 8000}}, |
|
141 |
{func = AnimMove, args = {natives[leaksNum], "Right", nativePosWater[princessNum][1] - 30, nativePosWater[princessNum][2]}}, |
|
142 |
{func = AnimSay, args = {natives[leaksNum], "You can always trust me! I love you!", SAY_SAY, 6000}}, |
|
143 |
{func = AnimSay, args = {natives[princessNum], "I know and I'm terribly sorry!", SAY_SAY, 5000}}, |
|
144 |
{func = AnimSay, args = {natives[princessNum], "I love Dense Cloud now!", SAY_SAY, 4000}}, |
|
145 |
{func = AnimTurn, args = {natives[princessNum], "Right"}}, |
|
146 |
{func = AnimMove, args = {natives[denseNum], "Left", nativePosWater[princessNum][1] + 20, nativePosWater[princessNum][2]}}, |
|
147 |
{func = AnimSay, args = {natives[denseNum], "Problems, dude? Chillax!", SAY_SAY, 4000}}, |
|
148 |
{func = AnimTurn, args = {natives[leaksNum], "Left"}}, |
|
149 |
{func = AnimSay, args = {natives[leaksNum], "(T_T)", SAY_SAY, 6000}}, |
|
150 |
{func = AnimSwitchHog, args = {natives[leaksNum]}}, |
|
151 |
} |
|
152 |
end |
|
153 |
||
154 |
function SetupAnimDense() |
|
155 |
startAnim = { |
|
156 |
{func = AnimWait, args = {natives[1], 3000}}, |
|
157 |
{func = AnimCaption, args = {natives[ramonNum], "Back in the village, the two tribes finally started to live in harmony.", 5000}}, |
|
158 |
{func = AnimSay, args = {natives[ramonNum], "You got a killer mask there, amigo!", SAY_SAY, 5500}}, |
|
159 |
{func = AnimSay, args = {cannibals[brainNum], "Thanks, man! It really means a lot to me.", SAY_SAY, 6000}}, |
|
160 |
{func = AnimSay, args = {natives[wiseNum], "So, uhmm, how did you manage to teleport them so far?", SAY_SAY, 8000}}, |
|
161 |
{func = AnimSay, args = {cannibals[corpseNum], "It's all about the right carrots, you know.", SAY_SAY, 7000}}, |
|
162 |
{func = AnimSay, args = {natives[wiseNum], "Of course! It's all obvious now!", SAY_SAY, 4500}}, |
|
163 |
{func = AnimSay, args = {natives[chiefNum], "I can't believe how blind we were...", SAY_SAY, 4500}}, |
|
164 |
{func = AnimSay, args = {natives[chiefNum], "Fighting instead of cultivating a beautiful friendship.", SAY_SAY, 8500}}, |
|
165 |
{func = AnimSay, args = {cannibals[hanniNum], "One shall not judge one by one's appearance!", SAY_SAY, 7000}}, |
|
166 |
{func = AnimSay, args = {natives[chiefNum], "You speak great truth, Hannibal. Here, take a sip!", SAY_SAY, 7500}}, |
|
167 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
168 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
169 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
170 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
171 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
172 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
173 |
{func = AnimSay, args = {natives[waterNum], "...And then I took a stroll...", SAY_SAY, 4000}}, |
|
174 |
{func = AnimSay, args = {natives[leaksNum], "It's amazing how quickly our lives can change...", SAY_SAY, 7000}}, |
|
175 |
{func = AnimSay, args = {natives[denseNum], "Dude, let me out!", SAY_SAY, 3000}}, |
|
176 |
{func = AnimSay, args = {natives[denseNum], "I already said I'm sorry!", SAY_SAY, 4000}}, |
|
177 |
{func = AnimTurn, args = {natives[princessNum], "Right"}}, |
|
178 |
{func = AnimSay, args = {natives[princessNum], "Traitors don't get to shout around here!", SAY_SAY, 7000}}, |
|
179 |
{func = AnimTurn, args = {natives[princessNum], "Left"}}, |
|
180 |
{func = AnimSay, args = {natives[leaksNum], "I still can't believe he sold us out like that.", SAY_SAY, 8000}}, |
|
181 |
{func = AnimSay, args = {natives[princessNum], "I don't know who I can trust anymore.", SAY_SAY, 6000}}, |
|
182 |
{func = AnimMove, args = {natives[leaksNum], "Right", nativePosDense[princessNum][1] - 30, nativePosDense[princessNum][2]}}, |
|
183 |
{func = AnimSay, args = {natives[leaksNum], "You can always trust me!", SAY_SAY, 4000}}, |
|
184 |
{func = AnimSay, args = {natives[princessNum], "I know, my hero!", SAY_SAY, 3000}}, |
|
185 |
{func = AnimSay, args = {natives[princessNum], "...xoxo...", SAY_SAY, 2000}}, |
|
186 |
{func = AnimSwitchHog, args = {natives[leaksNum]}}, |
|
187 |
} |
|
188 |
end |
|
189 |
||
190 |
function SetupAnimCyborg() |
|
191 |
startAnim = { |
|
192 |
{func = AnimWait, args = {natives[1], 3000}}, |
|
193 |
{func = AnimCaption, args = {natives[denseNum], "Back in the village, the two tribes finally started to live in harmony.", 5000}}, |
|
194 |
{func = AnimSay, args = {natives[denseNum], "Dude, that outfit is so kool!", SAY_SAY, 4500}}, |
|
195 |
{func = AnimSay, args = {cannibals[brainNum], "Thanks, dude! It really means a lot to me.", SAY_SAY, 6000}}, |
|
196 |
{func = AnimSay, args = {natives[wiseNum], "So, uhmm, how did you manage to teleport them so far?", SAY_SAY, 8000}}, |
|
197 |
{func = AnimSay, args = {cannibals[corpseNum], "It's all about the right carrots, you know.", SAY_SAY, 7000}}, |
|
198 |
{func = AnimSay, args = {natives[wiseNum], "Of course! It's all obvious now!", SAY_SAY, 4500}}, |
|
199 |
{func = AnimSay, args = {natives[chiefNum], "I can't believe how blind we were...", SAY_SAY, 4500}}, |
|
200 |
{func = AnimSay, args = {natives[chiefNum], "Fighting instead of cultivating a beautiful friendship.", SAY_SAY, 8500}}, |
|
201 |
{func = AnimSay, args = {cannibals[hanniNum], "One shall not judge one by one's appearance!", SAY_SAY, 7000}}, |
|
202 |
{func = AnimSay, args = {natives[chiefNum], "You speak great truth, Hannibal. Here, take a sip!", SAY_SAY, 7500}}, |
|
203 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
204 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
205 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
206 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
207 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
208 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
209 |
{func = AnimSay, args = {natives[waterNum], "...And then I took a stroll...", SAY_SAY, 4000}}, |
|
210 |
{func = AnimSay, args = {natives[leaksNum], "I'm glad this is over!", SAY_SAY, 4000}}, |
|
211 |
{func = AnimMove, args = {natives[princessNum], "Right", nativePosCyborg[princessNum][1] + 30, nativePosCyborg[princessNum][2]}}, |
|
212 |
{func = AnimSay, args = {natives[princessNum], "I was so scared.", SAY_SAY, 2500}}, |
|
213 |
{func = AnimMove, args = {natives[leaksNum], "Right", nativePosCyborg[princessNum][1], nativePosCyborg[princessNum][2]}}, |
|
214 |
{func = AnimSay, args = {natives[leaksNum], "You have nothing to be afraid of now.", SAY_SAY, 6000}}, |
|
215 |
{func = AnimSay, args = {natives[leaksNum], "I'll protect you!", SAY_SAY, 3000}}, |
|
216 |
{func = AnimTurn, args = {natives[princessNum], "Left"}}, |
|
217 |
{func = AnimSay, args = {natives[princessNum], "You're so brave...I feel safe with you.", SAY_SAY, 6500}}, |
|
218 |
{func = AnimSay, args = {natives[princessNum], "I think I love you!", SAY_SAY, 3500}}, |
|
219 |
{func = AnimSay, args = {natives[leaksNum], "I...like being with you too.", SAY_SAY, 4500}}, |
|
220 |
} |
|
221 |
end |
|
222 |
||
223 |
function SetupAnimPrincess() |
|
224 |
startAnim = { |
|
225 |
{func = AnimWait, args = {natives[1], 3000}}, |
|
226 |
{func = AnimCaption, args = {natives[denseNum], "Back in the village, the two tribes finally started to live in harmony.", 5000}}, |
|
227 |
{func = AnimSay, args = {natives[denseNum], "Dude, that outfit is so kool!", SAY_SAY, 4500}}, |
|
228 |
{func = AnimSay, args = {cannibals[brainNum], "Thanks, dude! It really means a lot to me.", SAY_SAY, 6000}}, |
|
229 |
{func = AnimSay, args = {natives[wiseNum], "So, uhmm, how did you manage to teleport them so far?", SAY_SAY, 8000}}, |
|
230 |
{func = AnimSay, args = {cannibals[corpseNum], "It's all about the right carrots, you know.", SAY_SAY, 7000}}, |
|
231 |
{func = AnimSay, args = {natives[wiseNum], "Of course! It's all obvious now!", SAY_SAY, 4500}}, |
|
232 |
{func = AnimSay, args = {natives[chiefNum], "I can't believe how blind we were...", SAY_SAY, 4500}}, |
|
233 |
{func = AnimSay, args = {natives[chiefNum], "Fighting instead of cultivating a beautiful friendship.", SAY_SAY, 8500}}, |
|
234 |
{func = AnimSay, args = {cannibals[hanniNum], "One shall not judge one by one's appearance!", SAY_SAY, 7000}}, |
|
235 |
{func = AnimSay, args = {natives[chiefNum], "You speak great truth, Hannibal. Here, take a sip!", SAY_SAY, 7500}}, |
|
236 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
237 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
238 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
239 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
240 |
{func = AnimVisualGear, args = {cannibals[hanniNum], cannibalPos[hanniNum][1], cannibalPos[hanniNum][2], vgtSmoke, 0, true}}, |
|
241 |
{func = AnimWait, args = {natives[1], 1000}}, |
|
242 |
{func = AnimSay, args = {natives[buffaloNum], "So I shook my fist in the air!", SAY_SAY, 5000}}, |
|
243 |
{func = AnimSay, args = {cannibals[brutalNum], "Well that was an unnecessary act of violence.", SAY_SAY, 7000}}, |
|
244 |
{func = AnimSay, args = {natives[waterNum], "...And then I took a stroll...", SAY_SAY, 4000}}, |
|
245 |
{func = AnimSay, args = {natives[leaksNum], "I'm glad this is over!", SAY_SAY, 4000}}, |
|
246 |
{func = AnimSay, args = {natives[girlNum], "I still can't believe you forgave her!", SAY_SAY, 6000}}, |
|
247 |
{func = AnimSay, args = {natives[girlNum], "She endangered the whole tribe!", SAY_SAY, 5000}}, |
|
248 |
{func = AnimSay, args = {natives[leaksNum], "It wasn't her fault!", SAY_SAY, 4000}}, |
|
249 |
{func = AnimSay, args = {natives[leaksNum], "We oppressed her, the only woman in the tribe!", SAY_SAY, 7000}}, |
|
250 |
{func = AnimSay, args = {natives[girlNum], "The only woman, huh?", SAY_SAY, 4000}}, |
|
251 |
{func = AnimSay, args = {natives[girlNum], "Then what am I?", SAY_SAY, 4000}}, |
|
252 |
{func = AnimSay, args = {natives[leaksNum], "Of course, but you're...special.", SAY_SAY, 5000}}, |
|
253 |
{func = AnimSay, args = {natives[girlNum], "Sure!", SAY_SAY, 2000}}, |
|
254 |
{func = AnimTurn, args = {natives[leaksNum], "Left"}}, |
|
255 |
{func = AnimSay, args = {natives[leaksNum], "We're terribly sorry!", SAY_SAY, 4000}}, |
|
256 |
{func = AnimSay, args = {natives[princessNum], "I don't know if I can forget what you've done!", SAY_SAY, 7000}}, |
|
257 |
{func = AnimTurn, args = {natives[princessNum], "Left"}}, |
|
258 |
{func = AnimMove, args = {natives[princessNum], "Left", nativePosPrincess[princessNum][1] - 10, nativePosPrincess[princessNum][2]}}, |
|
259 |
{func = AnimSwitchHog, args = {natives[leaksNum]}} |
|
260 |
} |
|
261 |
end |
|
262 |
-----------------------------Misc-------------------------------------- |
|
263 |
function GetVariables() |
|
264 |
m8Scene = tonumber(GetCampaignVar("M8Scene")) |
|
265 |
end |
|
266 |
||
267 |
function AddHogs() |
|
268 |
AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
|
269 |
for i = 1, 5 do |
|
270 |
natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i]) |
|
271 |
end |
|
272 |
||
273 |
AddTeam(loc("More Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
|
274 |
for i = 6, 10 do |
|
275 |
natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i]) |
|
276 |
end |
|
277 |
||
278 |
AddTeam(loc("Cannibals"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
|
279 |
for i = 1, 5 do |
|
280 |
cannibals[i] = AddHog(cannibalNames[i], 0, 100, cannibalHats[i]) |
|
281 |
end |
|
282 |
||
283 |
if m8Scene == denseScene or m8Scene == waterScene then |
|
284 |
AddTeam(loc("Traitors"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
|
285 |
if m8Scene == denseScene then |
|
286 |
DeleteGear(natives[2]) |
|
287 |
natives[2] = AddHog(nativeNames[2], 0, 100, nativeHats[2]) |
|
288 |
else |
|
289 |
DeleteGear(natives[3]) |
|
290 |
natives[3] = AddHog(nativeNames[3], 0, 100, nativeHats[3]) |
|
291 |
end |
|
292 |
end |
|
293 |
||
294 |
SetGearPositions() |
|
295 |
end |
|
296 |
||
297 |
function SetGearPositions() |
|
298 |
if m8Scene == cyborgScene then |
|
299 |
for i = 1, 10 do |
|
300 |
AnimSetGearPosition(natives[i], unpack(nativePosCyborg[i])) |
|
301 |
AnimTurn(natives[i], nativeDirCyborg[i]) |
|
302 |
end |
|
303 |
elseif m8Scene == waterScene then |
|
304 |
for i = 1, 10 do |
|
305 |
AnimSetGearPosition(natives[i], unpack(nativePosWater[i])) |
|
306 |
AnimTurn(natives[i], nativeDirWater[i]) |
|
307 |
end |
|
308 |
elseif m8Scene == denseScene then |
|
309 |
for i = 1, 10 do |
|
310 |
AnimSetGearPosition(natives[i], unpack(nativePosDense[i])) |
|
311 |
AnimTurn(natives[i], nativeDirDense[i]) |
|
312 |
end |
|
313 |
else |
|
314 |
for i = 1, 10 do |
|
315 |
AnimSetGearPosition(natives[i], unpack(nativePosPrincess[i])) |
|
316 |
AnimTurn(natives[i], nativeDirPrincess[i]) |
|
317 |
end |
|
318 |
end |
|
319 |
||
320 |
for i = 1, 5 do |
|
321 |
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
|
322 |
AnimTurn(cannibals[i], cannibalDir[i]) |
|
323 |
end |
|
324 |
end |
|
325 |
||
326 |
function SetupPlace() |
|
327 |
if m8Scene == denseScene or m8Scene == waterScene then |
|
328 |
PlaceGirder(2296, 798, 4) |
|
329 |
PlaceGirder(2296, 700, 4) |
|
330 |
PlaceGirder(2225, 750, 2) |
|
331 |
PlaceGirder(2245, 750, 2) |
|
332 |
PlaceGirder(2265, 750, 2) |
|
333 |
PlaceGirder(2305, 750, 2) |
|
334 |
PlaceGirder(2345, 750, 2) |
|
335 |
PlaceGirder(2365, 750, 2) |
|
336 |
end |
|
337 |
if m8Scene == denseScene then |
|
338 |
traitor = natives[denseNum] |
|
339 |
elseif m8Scene == waterScene then |
|
340 |
traitor = natives[waterNum] |
|
341 |
end |
|
342 |
end |
|
343 |
-----------------------------Main Functions---------------------------- |
|
344 |
function onGameInit() |
|
345 |
Seed = 1 |
|
346 |
GameFlags = gfOneClanMode |
|
347 |
TurnTime = 60000 |
|
348 |
CaseFreq = 0 |
|
349 |
MinesNum = 0 |
|
350 |
MinesTime = 3000 |
|
351 |
Explosives = 0 |
|
352 |
Delay = 10 |
|
353 |
Map = "Hogville" |
|
354 |
Theme = "Nature" |
|
355 |
SuddenDeathTurns = 3000 |
|
356 |
||
357 |
GetVariables() |
|
358 |
AddHogs() |
|
359 |
AnimInit() |
|
360 |
end |
|
361 |
||
362 |
function onGameStart() |
|
363 |
SetupPlace() |
|
364 |
AnimationSetup() |
|
365 |
AddAnim(startAnim) |
|
366 |
AddFunction({func = AfterStartAnim, args = {}}) |
|
367 |
end |
|
368 |
||
369 |
function onGameTick() |
|
370 |
AnimUnWait() |
|
371 |
if ShowAnimation() == false then |
|
372 |
return |
|
373 |
end |
|
374 |
ExecuteAfterAnimations() |
|
375 |
CheckEvents() |
|
376 |
end |
|
377 |
||
378 |
function onGearDelete(gear) |
|
379 |
gearDead[gear] = true |
|
380 |
end |
|
381 |
||
382 |
function onAmmoStoreInit() |
|
11038 | 383 |
SetAmmo(amAirAttack, 9, 0, 0, 0) |
7481 | 384 |
SetAmmo(amBaseballBat, 9, 0, 0, 0) |
385 |
SetAmmo(amBazooka, 9, 0, 0, 0) |
|
386 |
SetAmmo(amBlowTorch, 9, 0, 0, 0) |
|
387 |
SetAmmo(amClusterBomb,9, 0, 0, 0) |
|
388 |
SetAmmo(amDEagle, 9, 0, 0, 0) |
|
389 |
SetAmmo(amDrill, 9, 0, 0, 4) |
|
390 |
SetAmmo(amDynamite, 9, 0, 0, 3) |
|
391 |
SetAmmo(amFirePunch, 9, 0, 0, 0) |
|
392 |
SetAmmo(amFlamethrower, 9, 0, 0, 3) |
|
393 |
SetAmmo(amGirder, 9, 0, 0, 0) |
|
394 |
SetAmmo(amGrenade, 9, 0, 0, 0) |
|
395 |
SetAmmo(amHammer, 9, 0, 0, 0) |
|
396 |
SetAmmo(amJetpack, 9, 0, 0, 0) |
|
397 |
SetAmmo(amLandGun, 9, 0, 0, 0) |
|
398 |
SetAmmo(amLowGravity, 9, 0, 0, 2) |
|
399 |
SetAmmo(amMine, 9, 0, 0, 2) |
|
400 |
SetAmmo(amMolotov, 9, 0, 0, 3) |
|
401 |
SetAmmo(amMortar, 9, 0, 0, 4) |
|
402 |
SetAmmo(amNapalm, 9, 0, 0, 4) |
|
403 |
SetAmmo(amParachute, 9, 0, 0, 0) |
|
404 |
SetAmmo(amPickHammer, 9, 0, 0, 0) |
|
405 |
SetAmmo(amPortalGun, 9, 0, 0, 0) |
|
406 |
SetAmmo(amRope, 9, 0, 0, 0) |
|
407 |
SetAmmo(amRCPlane, 9, 0, 0, 0) |
|
408 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
409 |
SetAmmo(amShotgun, 9, 0, 0, 0) |
|
410 |
SetAmmo(amSMine, 9, 0, 0, 2) |
|
411 |
SetAmmo(amSniperRifle, 9, 0, 0, 0) |
|
412 |
SetAmmo(amSnowball, 9, 0, 0, 0) |
|
413 |
SetAmmo(amSwitch, 9, 0, 0, 0) |
|
414 |
SetAmmo(amTeleport, 9, 0, 0, 0) |
|
415 |
SetAmmo(amWatermelon, 9, 0, 0, 0) |
|
416 |
SetAmmo(amWhip, 9, 0, 0, 0) |
|
417 |
end |
|
418 |
||
419 |
function onNewTurn() |
|
420 |
if AnimInProgress() then |
|
421 |
TurnTimeLeft = -1 |
|
422 |
return |
|
423 |
end |
|
424 |
if CurrentHedgehog == traitor then |
|
425 |
TurnTimeLeft = 0 |
|
426 |
else |
|
427 |
TurnTimeLeft = -1 |
|
428 |
end |
|
429 |
end |
|
430 |
||
431 |
function onPrecise() |
|
432 |
if GameTime > 2500 then |
|
433 |
SetAnimSkip(true) |
|
434 |
end |
|
435 |
end |