author | alfadur |
Sat, 13 Oct 2018 22:44:21 +0300 | |
changeset 13897 | 57bac0456b86 |
parent 13759 | 5525f69bf76b |
child 13982 | e340ce5500d7 |
permissions | -rw-r--r-- |
8043 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
7889 | 2 |
|
3 |
local hhs = {} |
|
4 |
local missionWon = nil |
|
5 |
local endTimer = 1000 |
|
6 |
local hogsKilled = 0 |
|
11692 | 7 |
local finishTime |
12744
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
8 |
local ouchies = false |
7889 | 9 |
|
10 |
local HogData = { |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
11 |
{"amn", "NinjaFull",false}, |
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
12 |
{"alfadur", "NoHat",false}, |
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
13 |
{"Anachron", "war_americanww2helmet",false}, |
7889 | 14 |
{"Bufon", "ShaggyYeti",false}, |
15 |
{"burp", "lambda",false}, |
|
16 |
{"Blue", "cap_blue",false}, |
|
17 |
{"bender", "NoHat",false}, |
|
18 |
{"Castell", "NoHat",false}, |
|
19 |
{"cekoto", "NoHat",false}, |
|
20 |
{"CheezeMonkey", "NoHat",false}, |
|
21 |
{"claymore", "NoHat",false}, |
|
22 |
{"CIA-144", "cyborg1",false}, |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
23 |
{"cri.the.grinch", "sf_blanka",false}, |
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
24 |
{"eldiablo", "Evil",false}, |
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
25 |
{"Displacer", "fr_lemon",false}, |
13098
403dbadfc8fb
Rope Knock Challenge: Remove trailing space of name "doomy "
Wuzzy <Wuzzy2@mail.ru>
parents:
13072
diff
changeset
|
26 |
{"doomy", "NoHat",false}, |
7889 | 27 |
{"Falkenauge", "NoHat",false}, |
28 |
{"FadeOne", "NoHat",false}, |
|
29 |
{"hayaa", "NoHat",false}, |
|
30 |
{"Hermes", "laurel",false}, |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
31 |
{"Henek", "WizardHat",false}, |
7889 | 32 |
{"HedgeKing", "NoHat",false}, |
33 |
{"Izack1535", "NoHat",false}, |
|
34 |
{"Kiofspa", "NoHat",false}, |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
35 |
{"KoBeWi", "NoHat",false}, |
7889 | 36 |
{"Komplex", "NoHat",false}, |
37 |
{"koda", "poke_mudkip",false}, |
|
38 |
{"Lalo", "NoHat",false}, |
|
39 |
{"Logan", "NoHat",false}, |
|
40 |
{"lollkiller", "NoHat",false}, |
|
41 |
{"Luelle", "NoHat",false}, |
|
42 |
{"mikade", "Skull",false}, |
|
43 |
{"Mushi", "sm_daisy",false}, |
|
44 |
{"Naboo", "NoHat",false}, |
|
45 |
{"nemo", "bb_bub",false}, |
|
46 |
{"practice", "NoHat",false}, |
|
47 |
{"Prof. Panic", "NoHat",false}, |
|
48 |
{"Randy", "zoo_Sheep",false}, |
|
49 |
{"rhino", "NinjaTriangle",false}, |
|
50 |
{"Radissthor", "NoHat",false}, |
|
51 |
{"Sami", "sm_peach",false}, |
|
52 |
{"soreau", "NoHat",false}, |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
53 |
{"Solar", "pinksunhat",false}, |
12775
cf1377ab2f89
Add sparkle's name to Rope Knock Challenge
Wuzzy <Wuzzy2@mail.ru>
parents:
12744
diff
changeset
|
54 |
{"sparkle", "NoHat",false}, |
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
55 |
{"szczur", "mp3",false}, |
7889 | 56 |
{"sdw195", "NoHat",false}, |
57 |
{"sphrix", "TeamTopHat",false}, |
|
58 |
{"sheepluva", "zoo_Sheep",false}, |
|
59 |
{"Smaxx", "NoHat",false}, |
|
60 |
{"shadowzero", "NoHat",false}, |
|
61 |
{"Star and Moon", "SparkleSuperFun",false}, |
|
62 |
{"The 24", "NoHat",false}, |
|
63 |
{"TLD", "NoHat",false}, |
|
64 |
{"Tiyuri", "sf_ryu",false}, |
|
65 |
{"unC0Rr", "cyborg1",false}, |
|
66 |
{"Waldsau", "cyborg1",false}, |
|
67 |
{"wolfmarc", "knight",false}, |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
68 |
{"Wuzzy", "fr_orange",false}, |
7889 | 69 |
{"Xeli", "android",false} |
70 |
||
71 |
} |
|
72 |
||
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
73 |
local playerTeamName = loc("Wannabe Shoppsta") |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
74 |
|
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
75 |
function GetKillScore() |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
76 |
return math.ceil((hogsKilled / 16)*6000) |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
77 |
end |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
78 |
|
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
79 |
function ProtectEnemies() |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
80 |
for i=1, 16 do |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
81 |
if hhs[i] and GetHealth(hhs[i]) then |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
82 |
SetEffect(hhs[i], heInvulnerable, 1) |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
83 |
end |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
84 |
end |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
85 |
end |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
86 |
|
7889 | 87 |
function GameOverMan() |
88 |
missionWon = false |
|
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
89 |
ProtectEnemies() |
11692 | 90 |
ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0) |
91 |
SendStat(siGameResult, loc("Challenge over!")) |
|
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
92 |
local score = GetKillScore() |
11692 | 93 |
SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score)) |
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
94 |
SendStat(siPointType, loc("points")) |
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
95 |
SendStat(siPlayerKills, tostring(score), playerTeamName) |
7889 | 96 |
PlaySound(sndHellish) |
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
97 |
EndGame() |
7889 | 98 |
end |
99 |
||
100 |
function GG() |
|
101 |
missionWon = true |
|
11692 | 102 |
local completeTime = (TurnTime - finishTime) / 1000 |
103 |
ShowMission(loc("Rope-knocking Challenge"), loc("Challenge completed!"), loc("Congratulations!") .. "|" .. string.format(loc("Completion time: %.2fs"), completeTime), 0, 0) |
|
7889 | 104 |
PlaySound(sndHomerun) |
11692 | 105 |
SendStat(siGameResult, loc("Challenge completed!")) |
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
106 |
local hogScore = GetKillScore() |
11692 | 107 |
local timeScore = math.ceil((finishTime/TurnTime)*6000) |
108 |
local score = hogScore + timeScore |
|
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
109 |
|
11692 | 110 |
SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore)) |
111 |
SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore)) |
|
12743
49c45424a333
Rope knock challenge: Add names of developers and Shoppa tournament players who ranked 1st/2nd/3rd
Wuzzy <Wuzzy2@mail.ru>
parents:
12591
diff
changeset
|
112 |
SendStat(siPointType, loc("points")) |
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
113 |
SendStat(siPlayerKills, tostring(score), playerTeamName) |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
114 |
SetTeamLabel(playerTeamName, tostring(score)) |
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
115 |
|
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
116 |
if hhs[0] and GetHealth(hhs[0]) then |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
117 |
SetEffect(hhs[0], heInvulnerable, 1) |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
118 |
end |
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
119 |
SetTurnTimeLeft(MAX_TURN_TIME) |
7889 | 120 |
end |
121 |
||
122 |
function AssignCharacter(p) |
|
123 |
||
124 |
done = false |
|
125 |
sanityCheck = 0 |
|
126 |
||
127 |
while(done == false) do |
|
128 |
||
129 |
i = 1+ GetRandom(#HogData) |
|
130 |
if HogData[i][3] == false then |
|
131 |
HogData[i][3] = true |
|
132 |
done = true |
|
133 |
SetHogName(hhs[p], HogData[i][1]) |
|
134 |
SetHogHat(hhs[p], HogData[i][2]) |
|
135 |
elseif HogData[i][3] == true then |
|
136 |
sanityCheck = sanityCheck +1 |
|
137 |
if sanityCheck == 100 then |
|
138 |
done = true |
|
139 |
SetHogName(hhs[p], "Newbie") |
|
140 |
SetHogHat(hhs[p], "NoHat") |
|
141 |
end |
|
142 |
end |
|
143 |
||
144 |
end |
|
145 |
||
146 |
end |
|
147 |
||
148 |
function onGameInit() |
|
149 |
||
150 |
--Seed = 1 |
|
151 |
GameFlags = gfBorder + gfSolidLand |
|
152 |
||
153 |
TurnTime = 180 * 1000 |
|
154 |
Delay = 500 |
|
155 |
Map = "Ropes" |
|
156 |
Theme = "Eyes" |
|
157 |
||
12229
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
11973
diff
changeset
|
158 |
-- Disable Sudden Death |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
11973
diff
changeset
|
159 |
WaterRise = 0 |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
11973
diff
changeset
|
160 |
HealthDecrease = 0 |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
11973
diff
changeset
|
161 |
|
7889 | 162 |
CaseFreq = 0 |
163 |
MinesNum = 0 |
|
164 |
Explosives = 0 |
|
165 |
||
13588
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
166 |
AddTeam(playerTeamName, -1, "money", "Island", "Default", "cm_shoppa") |
7889 | 167 |
hhs[0] = AddHog(loc("Ace"), 0, 1, "Gasmask") |
168 |
SetGearPosition(player, 1380, 1500) |
|
169 |
||
13588
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
170 |
AddTeam(loc("Unsuspecting Louts"), -2, "Simple", "Island", "Default", "cm_face") |
7889 | 171 |
for i = 1, 8 do |
13072
64aba90811a2
Change team colors in rope knock challenge to standard color scheme
Wuzzy <Wuzzy2@mail.ru>
parents:
13070
diff
changeset
|
172 |
-- The name "generic" is a placeholder and will be replaced in AssignCharacter |
7889 | 173 |
hhs[i] = AddHog("generic", 0, 1, "NoHat") |
174 |
end |
|
175 |
||
13588
141cdfe0f3ca
Switch almost all Lua calls of AddTeam to using default clan colors instead of hardcoded color
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
176 |
AddTeam(loc("Unlucky Sods"), -2, "Simple", "Island", "Default", "cm_balrog") |
7889 | 177 |
for i = 9, 16 do |
178 |
hhs[i] = AddHog("generic", 0, 1, "NoHat") |
|
179 |
end |
|
180 |
||
181 |
end |
|
182 |
||
183 |
||
184 |
||
185 |
function onGameStart() |
|
11692 | 186 |
SendHealthStatsOff() |
7889 | 187 |
|
188 |
ShowMission ( |
|
11692 | 189 |
loc("Rope-knocking Challenge"), |
190 |
loc("Challenge"), |
|
7889 | 191 |
loc("Use the rope to knock your enemies to their doom.") .. "|" .. |
11692 | 192 |
loc("Finish this challenge as fast as possible to earn bonus points."), |
193 |
-amRope, 4000) |
|
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
194 |
SetTeamLabel(playerTeamName, "0") |
7889 | 195 |
|
11692 | 196 |
PlaceGirder(46,1783, 0) |
7889 | 197 |
|
198 |
SetGearPosition(hhs[0], 2419, 1769) |
|
199 |
SetGearPosition(hhs[1], 3350, 570) |
|
200 |
SetGearPosition(hhs[2], 3039, 1300) |
|
201 |
SetGearPosition(hhs[3], 2909, 430) |
|
202 |
SetGearPosition(hhs[4], 2150, 879) |
|
203 |
SetGearPosition(hhs[5], 1735, 1136) |
|
204 |
SetGearPosition(hhs[6], 1563, 553) |
|
205 |
SetGearPosition(hhs[7], 679, 859) |
|
206 |
SetGearPosition(hhs[8], 1034, 251) |
|
207 |
SetGearPosition(hhs[9], 255, 67) |
|
208 |
SetGearPosition(hhs[10], 2671, 7) |
|
209 |
SetGearPosition(hhs[11], 2929, 244) |
|
210 |
SetGearPosition(hhs[12], 1946, 221) |
|
211 |
SetGearPosition(hhs[13], 3849, 1067) |
|
212 |
SetGearPosition(hhs[14], 3360, 659) |
|
213 |
SetGearPosition(hhs[15], 3885, 285) |
|
214 |
SetGearPosition(hhs[16], 935, 1160) |
|
215 |
||
216 |
for i = 1, 16 do |
|
217 |
AssignCharacter(i) |
|
218 |
end |
|
219 |
||
220 |
end |
|
221 |
||
222 |
function onGameTick() |
|
223 |
||
224 |
if (TurnTimeLeft == 1) and (missionWon == nil) then |
|
225 |
GameOverMan() |
|
226 |
end |
|
227 |
||
228 |
if missionWon ~= nil then |
|
229 |
||
230 |
endTimer = endTimer - 1 |
|
231 |
if endTimer == 1 then |
|
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
232 |
EndGame() |
7889 | 233 |
end |
234 |
||
235 |
if missionWon == true then |
|
13648 | 236 |
AddCaption(loc("Victory!"), capcolDefault, capgrpGameState) |
7889 | 237 |
else |
13648 | 238 |
AddCaption(loc("Challenge over!"), capcolDefault, capgrpGameState) |
7889 | 239 |
end |
240 |
||
241 |
end |
|
242 |
||
243 |
end |
|
244 |
||
245 |
function onGearDamage(gear, damage) |
|
246 |
||
12744
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
247 |
if gear == hhs[0] then |
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
248 |
ouchies = true |
13759
5525f69bf76b
Fix stats screwing up in Rope Knock Challenge if you lose
Wuzzy <Wuzzy2@mail.ru>
parents:
13648
diff
changeset
|
249 |
ProtectEnemies() |
12744
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
250 |
end |
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
251 |
|
2f873afda0e2
Rope Knock Challenge: Don't count hog kills after hero hurt itself
Wuzzy <Wuzzy2@mail.ru>
parents:
12743
diff
changeset
|
252 |
if gear ~= hhs[0] and GetGearType(gear) == gtHedgehog and missionWon == nil and ouchies == false then |
7889 | 253 |
|
254 |
AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
|
255 |
DeleteGear(gear) |
|
256 |
PlaySound(sndExplosion) |
|
13648 | 257 |
AddCaption(string.format(knockTaunt(), GetHogName(gear)), capcolDefault, capgrpMessage) |
7889 | 258 |
|
259 |
hogsKilled = hogsKilled +1 |
|
13070
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
260 |
SetTeamLabel(playerTeamName, tostring(GetKillScore())) |
a297e06d1607
Display score next to team bar in singleplayer challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
12775
diff
changeset
|
261 |
|
7889 | 262 |
if hogsKilled == 15 then |
263 |
PlaySound(sndRideOfTheValkyries) |
|
264 |
elseif hogsKilled == 16 then |
|
11692 | 265 |
finishTime = TurnTimeLeft |
7889 | 266 |
GG() |
267 |
end |
|
268 |
||
269 |
end |
|
270 |
||
271 |
end |
|
272 |
||
11692 | 273 |
function knockTaunt() |
274 |
local r = math.random(0,23) |
|
275 |
local taunt |
|
276 |
if r == 0 then taunt = loc("%s has been knocked out.") |
|
277 |
elseif r == 1 then taunt = loc("%s hit the ground.") |
|
278 |
elseif r == 2 then taunt = loc("%s splatted.") |
|
279 |
elseif r == 3 then taunt = loc("%s was smashed.") |
|
280 |
elseif r == 4 then taunt = loc("%s felt unstable.") |
|
281 |
elseif r == 5 then taunt = loc("%s exploded.") |
|
282 |
elseif r == 6 then taunt = loc("%s fell from a high cliff.") |
|
283 |
elseif r == 7 then taunt = loc("%s goes the way of the lemming.") |
|
284 |
elseif r == 8 then taunt = loc("%s was knocked away.") |
|
285 |
elseif r == 9 then taunt = loc("%s was really unlucky.") |
|
286 |
elseif r == 10 then taunt = loc("%s felt victim to rope-knocking.") |
|
287 |
elseif r == 11 then taunt = loc("%s had no chance.") |
|
288 |
elseif r == 12 then taunt = loc("%s was a good target.") |
|
289 |
elseif r == 13 then taunt = loc("%s spawned at a really bad position.") |
|
290 |
elseif r == 14 then taunt = loc("%s was doomed from the beginning.") |
|
291 |
elseif r == 15 then taunt = loc("%s has fallen victim to gravity.") |
|
292 |
elseif r == 16 then taunt = loc("%s hates Newton.") -- Isaac Newton |
|
293 |
elseif r == 17 then taunt = loc("%s had it coming.") |
|
294 |
elseif r == 18 then taunt = loc("%s is eliminated!") |
|
295 |
elseif r == 19 then taunt = loc("%s fell too fast.") |
|
296 |
elseif r == 20 then taunt = loc("%s flew like a rock.") |
|
13359 | 297 |
elseif r == 21 then taunt = loc("%s stumbled.") |
11692 | 298 |
elseif r == 22 then taunt = loc("%s was shoved away.") |
299 |
elseif r == 23 then taunt = loc("%s didn't expect that.") |
|
300 |
end |
|
301 |
return taunt |
|
302 |
end |
|
303 |
||
7889 | 304 |
function onGearDelete(gear) |
305 |
||
306 |
if (gear == hhs[0]) and (missionWon == nil) then |
|
307 |
GameOverMan() |
|
308 |
end |
|
309 |
||
310 |
end |
|
311 |
||
312 |
function onAmmoStoreInit() |
|
313 |
SetAmmo(amRope, 9, 0, 0, 0) |
|
314 |
end |
|
11694 | 315 |
|
316 |
function onNewTurn() |
|
317 |
SetWeapon(amRope) |
|
318 |
end |