38 |
46 |
39 local teams_ok = {} |
47 local teams_ok = {} |
40 local wepcode_teams={} |
48 local wepcode_teams={} |
41 local swapweps=false |
49 local swapweps=false |
42 |
50 |
43 --run when game starts on real |
51 --variables for seeing if you have swaped around on a weapon |
44 local australianSpecial=false |
52 local australianSpecial=false |
45 local africanSpecial=0 |
53 local africanSpecial=0 |
46 local africaspecial2=0 |
54 local africaspecial2=0 |
47 local asianSpecial=false |
55 local asianSpecial=false |
48 local samericanSpecial=false |
56 local samericanSpecial=false |
49 local namericanSpecial=1 |
57 local namericanSpecial=1 |
50 local sniper_s_in_use=false |
58 local sniper_s_in_use=false |
51 local kergulenSpecial=1 |
59 local kergulenSpecial=1 |
52 local shotgun_s=false |
60 local shotgun_s=false |
53 local europe_s=0 |
61 local europe_s=0 |
|
62 local VampOn=0 |
54 |
63 |
55 local austmine=nil |
64 local austmine=nil |
56 local inpara=false |
65 local inpara=false |
57 local asianflame=0 |
66 local asianflame=0 |
58 |
67 |
|
68 local visualcircle=nil |
|
69 |
59 local temp_val=0 |
70 local temp_val=0 |
60 |
71 |
61 --f?r sabotage |
72 --for sabotage |
62 local disallowattack=0 |
73 local disallowattack=0 |
63 local disallowleft=true |
|
64 local disable_moving={} |
74 local disable_moving={} |
65 |
75 local disableoffsetai=0 |
66 --skall bytas till f?r alla teams |
76 local onsabotageai=false |
|
77 |
67 local continent = {} |
78 local continent = {} |
|
79 |
|
80 local generalinfo=loc("- Per team weapons|- 9 weaponschemes|- Unique new weapons| |Select continent first round with the Weapon Menu or by ([switch/tab]=Increase,[presice/left shift]=Decrease) on Skip|Some weapons have a second option. Find them with [switch/tab]") |
68 |
81 |
69 local weapontexts = { |
82 local weapontexts = { |
70 loc("Green lipstick bullet: [Is poisonous]"), |
83 loc("Green lipstick bullet: [Is poisonous]"), |
71 loc("Piñata bullet: [Contains some sweet candy!]"), |
84 loc("Piñata bullet: [Contains some sweet candy!]"), |
72 loc("Anno 1032: [The explosion will make a strong push ~ wide range, wont affect hogs close to the target]"), |
85 loc("Anno 1032: [The explosion will make a strong push ~ wide range, wont affect hogs close to the target]"), |
73 loc("Dust storm: [Deals 20 damage to all enemies in the circle]"), |
86 loc("Dust storm: [Deals 15 damage to all enemies in the circle]"), |
74 loc("Fire a mine: [Does what it says ~ Cant be dropped close to an enemy ~ 1 sec]"), |
87 loc("Fire a mine: [Does what it says ~ Cant be dropped close to an enemy ~ 1 sec]"), |
75 loc("Drop a bomb: [drop some heroic wind that will turn into a bomb on impact]"), |
88 loc("Drop a bomb: [drop some heroic wind that will turn into a bomb on impact ~ once per turn]"), |
76 loc("Scream from a Walrus: [Deal 20 damage + 10% of your hogs health to all hogs around you and get half back]"), |
89 loc("Scream from a Walrus: [Deal 20 damage + 10% of your hogs health to all hogs around you and get half back]"), |
77 loc("Disguise as a Rockhopper Penguin: [Swap place with a random enemy hog in the circle]"), |
90 loc("Disguise as a Rockhopper Penguin: [Swap place with a random enemy hog in the circle]"), |
78 loc("Flare: [fire up some bombs depending on hogs depending on hogs in the circle"), |
91 loc("Flare: [fire up some bombs depending on hogs depending on hogs in the circle"), |
79 loc("Lonely Cries: [Rise the water if no hog is in the circle and deal 1 damage to all hogs]"), |
92 loc("Lonely Cries: [Rise the water if no hog is in the circle and deal 7 damage to all enemy hogs]"), |
80 loc("Hedgehog projectile: [fire your hog like a Sticky Bomb]"), |
93 loc("Hedgehog projectile: [fire your hog like a Sticky Bomb]"), |
81 loc("Napalm rocket: [Fire a bomb with napalm!]"), |
94 loc("Napalm rocket: [Fire a bomb with napalm!]"), |
82 loc("Eagle Eye: [Blink to the impact ~ one shot]"), |
95 loc("Eagle Eye: [Blink to the impact ~ one shot]"), |
83 loc("Medicine: [Fire some exploding medicine that will heal all hogs effected by the explosion]"), |
96 loc("Medicine: [Fire some exploding medicine that will heal all hogs effected by the explosion]"), |
84 loc("Sabotage: [Sabotage all hogs in the circle and deal ~10 dmg]") |
97 loc("Sabotage: [Sabotage all hogs in the circle and deal ~10 dmg]") |
88 { |
101 { |
89 {loc("North America"),"Area: 24,709,000 km2, Population: 528,720,588",loc("Special Weapons:").."|"..loc("Shotgun")..": "..weapontexts[13].."|"..loc("Sniper Rifle")..": "..weapontexts[1].."|"..loc("Sniper Rifle")..": "..weapontexts[2],amSniperRifle, |
102 {loc("North America"),"Area: 24,709,000 km2, Population: 528,720,588",loc("Special Weapons:").."|"..loc("Shotgun")..": "..weapontexts[13].."|"..loc("Sniper Rifle")..": "..weapontexts[1].."|"..loc("Sniper Rifle")..": "..weapontexts[2],amSniperRifle, |
90 {{amShotgun,100},{amDEagle,100},{amLaserSight,4},{amSniperRifle,100},{amCake,1},{amAirAttack,2},{amSwitch,6}}}, |
103 {{amShotgun,100},{amDEagle,100},{amLaserSight,4},{amSniperRifle,100},{amCake,1},{amAirAttack,2},{amSwitch,6}}}, |
91 |
104 |
92 {loc("South America"),"Area: 17,840,000 km2, Population: 387,489,196 ",loc("Special Weapons:").."|"..loc("GasBomb")..": "..weapontexts[3],amGasBomb, |
105 {loc("South America"),"Area: 17,840,000 km2, Population: 387,489,196 ",loc("Special Weapons:").."|"..loc("GasBomb")..": "..weapontexts[3],amGasBomb, |
93 {{amBirdy,5},{amHellishBomb,1},{amBee,100},{amWhip,100},{amGasBomb,100},{amFlamethrower,100},{amNapalm,1},{amExtraDamage,2}}}, |
106 {{amBirdy,6},{amHellishBomb,1},{amBee,100},{amWhip,100},{amGasBomb,100},{amFlamethrower,100},{amNapalm,1},{amExtraDamage,2}}}, |
94 |
107 |
95 {loc("Europe"),"Area: 10,180,000 km2, Population: 739,165,030",loc("Special Weapons:").."|"..loc("Molotov")..": "..weapontexts[14],amBazooka, |
108 {loc("Europe"),"Area: 10,180,000 km2, Population: 739,165,030",loc("Special Weapons:").."|"..loc("Molotov")..": "..weapontexts[14],amBazooka, |
96 {{amBazooka,100},{amGrenade,100},{amMortar,100},{amClusterBomb,5},{amMolotov,5},{amVampiric,4},{amPiano,1},{amResurrector,2},{amJetpack,2}}}, |
109 {{amBazooka,100},{amGrenade,100},{amMortar,100},{amClusterBomb,5},{amMolotov,5},{amVampiric,4},{amPiano,1},{amResurrector,2},{amJetpack,2}}}, |
97 |
110 |
98 {loc("Africa"),"Area: 30,221,532 km2, Population: 1,032,532,974",loc("Special Weapons:").."|"..loc("Seduction")..": "..weapontexts[4].."|"..loc("Sticky Mine")..": "..weapontexts[11].."|"..loc("Sticky Mine")..": "..weapontexts[12],amSMine, |
111 {loc("Africa"),"Area: 30,221,532 km2, Population: 1,032,532,974",loc("Special Weapons:").."|"..loc("Seduction")..": "..weapontexts[4].."|"..loc("Sticky Mine")..": "..weapontexts[11].."|"..loc("Sticky Mine")..": "..weapontexts[12],amSMine, |
99 {{amSMine,6},{amWatermelon,1},{amDrillStrike,1},{amExtraTime,2},{amDrill,100},{amLandGun,3},{amSeduction,100}}}, |
112 {{amSMine,100},{amWatermelon,1},{amDrillStrike,1},{amExtraTime,2},{amDrill,100},{amLandGun,3},{amSeduction,100}}}, |
100 |
113 |
101 {loc("Asia"),"Area: 44,579,000 km2, Population: 3,879,000,000",loc("- Will refresh Parachute each turn.").."|"..loc("Special Weapons:").."|"..loc("Parachute")..": "..weapontexts[6],amRope, |
114 {loc("Asia"),"Area: 44,579,000 km2, Population: 3,879,000,000",loc("- Will give you a parachute each turn.").."|"..loc("Special Weapons:").."|"..loc("Parachute")..": "..weapontexts[6],amRope, |
102 {{amKamikaze,4},{amRope,100},{amFirePunch,100},{amParachute,1},{amKnife,4},{amDynamite,1}}}, |
115 {{amKamikaze,4},{amRope,100},{amFirePunch,100},{amParachute,1},{amKnife,2},{amDynamite,1}}}, |
103 |
116 |
104 {loc("Australia"),"Area: 8,468,300 km2, Population: 31,260,000",loc("Special Weapons:").."|"..loc("Baseballbat")..": "..weapontexts[5],amBaseballBat, |
117 {loc("Australia"),"Area: 8,468,300 km2, Population: 31,260,000",loc("Special Weapons:").."|"..loc("Baseballbat")..": "..weapontexts[5],amBaseballBat, |
105 {{amBaseballBat,100},{amMine,100},{amLowGravity,6},{amBlowTorch,100},{amRCPlane,2},{amTardis,100}}}, |
118 {{amBaseballBat,100},{amMine,100},{amLowGravity,6},{amBlowTorch,100},{amRCPlane,2},{amTardis,100}}}, |
106 |
119 |
107 {loc("Antarctica"),"Area: 14,000,000 km2, Population: ~1,000",loc("- Will refresh portalgun each turn."),amTeleport, |
120 {loc("Antarctica"),"Area: 14,000,000 km2, Population: ~1,000",loc("- Will give you a portalgun every second turn."),amTeleport, |
108 {{amSnowball,4},{amTeleport,2},{amInvulnerable,6},{amPickHammer,100},{amSineGun,100},{amGirder,4},{amPortalGun,1}}}, |
121 {{amSnowball,4},{amTeleport,2},{amInvulnerable,6},{amPickHammer,100},{amSineGun,100},{amGirder,3},{amPortalGun,2}}}, |
109 |
122 |
110 {loc("Kerguelen"),"Area: 1,100,000 km2, Population: ~70",loc("Special Weapons:").."|"..loc("Structure")..": "..weapontexts[7].."|"..loc("Structure")..": "..weapontexts[8].." ("..loc("Duration")..": 2)|"..loc("Structure")..": "..weapontexts[9].."|"..loc("Structure")..": "..weapontexts[10],amStructure, |
123 {loc("Kerguelen"),"Area: 1,100,000 km2, Population: ~70",loc("Special Weapons:").."|"..loc("Hammer")..": "..weapontexts[7].."|"..loc("Hammer")..": "..weapontexts[8].." ("..loc("Duration")..": 2)|"..loc("Hammer")..": "..weapontexts[9].."|"..loc("Hammer")..": "..weapontexts[10].."|"..loc("Hammer")..": "..weapontexts[15],amHammer, |
111 {{amHammer,100},{amMineStrike,2},{amBallgun,1},{amStructure,100}}}, |
124 {{amHammer,100},{amMineStrike,2},{amBallgun,1},{amIceGun,2}}}, |
112 --no ,{amIceGun,4} for 0.9.18 |
|
113 |
125 |
114 {loc("Zealandia"),"Area: 3,500,000 km2, Population: 4,650,000",loc("- Will Get 1-3 random weapons"),amInvulnerable, |
126 {loc("Zealandia"),"Area: 3,500,000 km2, Population: 4,650,000",loc("- Will Get 1-3 random weapons"),amInvulnerable, |
115 {{amBazooka,1},{amBlowTorch,1},{amSwitch,1}}} |
127 {{amBazooka,1},{amBlowTorch,1},{amSwitch,1}}} |
|
128 } |
|
129 |
|
130 local weaponsetssounds= |
|
131 { |
|
132 {sndShotgunFire,sndCover}, |
|
133 {sndEggBreak,sndLaugh}, |
|
134 {sndExplosion,sndEnemyDown}, |
|
135 {sndMelonImpact,sndHello}, |
|
136 {sndRopeAttach,sndComeonthen}, |
|
137 {sndBaseballBat,sndNooo}, |
|
138 {sndSineGun,sndOops}, |
|
139 {sndPiano5,sndStupid}, |
|
140 {sndSplash,sndFirstBlood} |
116 } |
141 } |
117 |
142 |
118 --weapontype,ammo,?,duration,*times your choice,affect on random team (should be placed with 1,0,1,0,1 on the 6th option for better randomness) |
143 --weapontype,ammo,?,duration,*times your choice,affect on random team (should be placed with 1,0,1,0,1 on the 6th option for better randomness) |
119 local weapons_dmg = { |
144 local weapons_dmg = { |
120 {amKamikaze, 0, 1, 0, 1, 0}, |
145 {amKamikaze, 0, 1, 0, 1, 0}, |
150 {amAirAttack, 0, 1, 4, 1, 1}, |
175 {amAirAttack, 0, 1, 4, 1, 1}, |
151 {amFlamethrower, 0, 1, 0, 1, 0}, |
176 {amFlamethrower, 0, 1, 0, 1, 0}, |
152 {amSMine, 0, 1, 0, 1, 1}, |
177 {amSMine, 0, 1, 0, 1, 1}, |
153 {amHammer, 0, 1, 0, 1, 0}, |
178 {amHammer, 0, 1, 0, 1, 0}, |
154 {amDrillStrike, 0, 1, 4, 1, 2}, |
179 {amDrillStrike, 0, 1, 4, 1, 2}, |
155 {amSnowball, 0, 1, 0, 1, 0}, |
180 {amSnowball, 0, 1, 0, 1, 0} |
156 {amStructure, 0, 0, 0, 1, 1} |
181 --{amStructure, 0, 0, 0, 1, 1} |
157 } |
182 } |
158 local weapons_supp = { |
183 local weapons_supp = { |
159 {amParachute, 0, 1, 0, 1, 0}, |
184 {amParachute, 0, 1, 0, 1, 0}, |
160 {amGirder, 0, 1, 0, 1, 0}, |
185 {amGirder, 0, 1, 0, 1, 0}, |
161 {amSwitch, 0, 1, 0, 1, 0}, |
186 {amSwitch, 0, 1, 0, 1, 0}, |
243 lap=lap+30 |
278 lap=lap+30 |
244 degr=degr-6.2831 |
279 degr=degr-6.2831 |
245 end |
280 end |
246 end |
281 end |
247 |
282 |
248 --zealandia |
283 --zealandia (generates weapons from the weaponinfo above |
249 function get_random_weapon(hog) |
284 function get_random_weapon(hog) |
250 if(GetGearType(hog) == gtHedgehog) |
285 if(GetGearType(hog) == gtHedgehog and continent[GetHogTeamName(hog)]==9 and getTeamValue(GetHogTeamName(hog), "rand-done-turn")==nil) |
251 then |
286 then |
|
287 cleanweps(hog) |
|
288 |
252 local random_weapon = 0 |
289 local random_weapon = 0 |
253 local old_rand_weap = 0 |
290 local old_rand_weap = 0 |
254 local rand_weaponset_power = 0 |
291 local rand_weaponset_power = 0 |
255 |
292 |
256 if(continent[GetHogTeamName(hog)]==9 and (getTeamValue(GetHogTeamName(hog), "rand-done-turn")==false or getTeamValue(GetHogTeamName(hog), "rand-done-turn")==nil)) |
293 local numberof_weapons_supp=table.maxn(weapons_supp) |
257 then |
294 local numberof_weapons_dmg=table.maxn(weapons_dmg) |
258 cleanweps(hog) |
295 |
259 |
296 local rand1=GetRandom(table.maxn(weapons_supp))+1 |
260 random_weapon = GetRandom(table.getn(weapons_dmg))+1 |
297 local rand2=GetRandom(table.maxn(weapons_dmg))+1 |
261 while(weapons_dmg[random_weapon][4]>TotalRounds) |
298 |
|
299 random_weapon = GetRandom(table.maxn(weapons_dmg))+1 |
|
300 |
|
301 while(weapons_dmg[random_weapon][4]>TotalRounds) |
|
302 do |
|
303 if(random_weapon>=numberof_weapons_dmg) |
|
304 then |
|
305 random_weapon=0 |
|
306 end |
|
307 random_weapon = random_weapon+1 |
|
308 end |
|
309 validate_weapon(hog, weapons_dmg[random_weapon][1],1) |
|
310 rand_weaponset_power=weapons_dmg[random_weapon][6] |
|
311 old_rand_weap = random_weapon |
|
312 |
|
313 if(rand_weaponset_power <2) |
|
314 then |
|
315 random_weapon = rand1 |
|
316 while(weapons_supp[random_weapon][4]>TotalRounds or rand_weaponset_power+weapons_supp[random_weapon][6]>2) |
262 do |
317 do |
263 if(random_weapon>=table.getn(weapons_dmg)) |
318 if(random_weapon>=numberof_weapons_supp) |
|
319 then |
|
320 random_weapon=0 |
|
321 end |
|
322 random_weapon = random_weapon+1 |
|
323 end |
|
324 validate_weapon(hog, weapons_supp[random_weapon][1],1) |
|
325 rand_weaponset_power=rand_weaponset_power+weapons_supp[random_weapon][6] |
|
326 end |
|
327 --check again if the power is enough |
|
328 if(rand_weaponset_power <1) |
|
329 then |
|
330 random_weapon = rand2 |
|
331 while(weapons_dmg[random_weapon][4]>TotalRounds or old_rand_weap == random_weapon or weapons_dmg[random_weapon][6]>0) |
|
332 do |
|
333 if(random_weapon>=numberof_weapons_dmg) |
264 then |
334 then |
265 random_weapon=0 |
335 random_weapon=0 |
266 end |
336 end |
267 random_weapon = random_weapon+1 |
337 random_weapon = random_weapon+1 |
268 end |
338 end |
269 validate_weapon(hog, weapons_dmg[random_weapon][1],1) |
339 validate_weapon(hog, weapons_dmg[random_weapon][1],1) |
270 rand_weaponset_power=weapons_dmg[random_weapon][6] |
340 end |
271 old_rand_weap = random_weapon |
|
272 |
341 |
273 if(rand_weaponset_power <2) |
342 setTeamValue(GetHogTeamName(hog), "rand-done-turn", true) |
274 then |
343 end |
275 random_weapon = GetRandom(table.getn(weapons_supp))+1 |
344 end |
276 while(weapons_supp[random_weapon][4]>TotalRounds or rand_weaponset_power+weapons_supp[random_weapon][6]>2) |
345 |
277 do |
346 --this will take that hogs settings for the weapons and add them |
278 if(random_weapon>=table.getn(weapons_supp)) |
347 function setweapons() |
279 then |
|
280 random_weapon=0 |
|
281 end |
|
282 random_weapon = random_weapon+1 |
|
283 end |
|
284 validate_weapon(hog, weapons_supp[random_weapon][1],1) |
|
285 rand_weaponset_power=rand_weaponset_power+weapons_supp[random_weapon][6] |
|
286 end |
|
287 --check again if the power is enough |
|
288 if(rand_weaponset_power <1) |
|
289 then |
|
290 random_weapon = GetRandom(table.getn(weapons_dmg))+1 |
|
291 while(weapons_dmg[random_weapon][4]>TotalRounds or old_rand_weap == random_weapon or weapons_dmg[random_weapon][6]>0) |
|
292 do |
|
293 if(random_weapon>=table.getn(weapons_dmg)) |
|
294 then |
|
295 random_weapon=0 |
|
296 end |
|
297 random_weapon = random_weapon+1 |
|
298 end |
|
299 validate_weapon(hog, weapons_dmg[random_weapon][1],1) |
|
300 end |
|
301 |
|
302 setTeamValue(GetHogTeamName(hog), "rand-done-turn", true) |
|
303 |
|
304 if(GetHogTeamName(hog)==GetHogTeamName(CurrentHedgehog)) |
|
305 then |
|
306 temp_val=false |
|
307 end |
|
308 end |
|
309 end |
|
310 end |
|
311 |
|
312 |
|
313 function setweapons(skipafter) |
|
314 |
348 |
315 cleanweps(CurrentHedgehog) |
349 cleanweps(CurrentHedgehog) |
316 load_weaponset(CurrentHedgehog,continent[GetHogTeamName(CurrentHedgehog)]) |
350 load_weaponset(CurrentHedgehog,continent[GetHogTeamName(CurrentHedgehog)]) |
317 if(skipafter==true) |
351 |
318 then |
352 visualstuff=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-5, vgtDust,0, false) |
319 ParseCommand("setweap " .. string.char(amSkip)) |
353 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(visualstuff) |
320 end |
354 SetVisualGearValues(visualstuff, v1, v2, v3, v4, v5, v6, v7, 2, v9, GetClanColor(GetHogClan(CurrentHedgehog))) |
321 |
355 |
322 show_continent_info(continent[GetHogTeamName(CurrentHedgehog)],0) |
356 show_continent_info(continent[GetHogTeamName(CurrentHedgehog)],0,false) |
323 end |
357 end |
324 |
358 |
|
359 --show health tag (will mostly be used when a hog is damaged) |
325 function show_damage_tag(hog,damage) |
360 function show_damage_tag(hog,damage) |
326 healthtag=AddVisualGear(GetX(hog), GetY(hog), vgtHealthTag, damage, false) |
361 healthtag=AddVisualGear(GetX(hog), GetY(hog), vgtHealthTag, damage, false) |
327 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(healthtag) |
362 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10 = GetVisualGearValues(healthtag) |
328 SetVisualGearValues(healthtag, v1, v2, v3, v4, v5, v6, v7, v8, v9, GetClanColor(GetHogClan(hog))) |
363 SetVisualGearValues(healthtag, v1, v2, v3, v4, v5, v6, v7, v8, v9, GetClanColor(GetHogClan(hog))) |
329 end |
364 end |
330 |
365 |
|
366 --will use int_sqrt |
331 function fire_gear(hedgehog,geartype,vx,vy,timer) |
367 function fire_gear(hedgehog,geartype,vx,vy,timer) |
332 return AddGear(div((GetGearRadius(hedgehog)*2*vx),norm(vx,vy))+GetX(hedgehog), div((GetGearRadius(hedgehog)*2*vy),norm(vx,vy))+GetY(hedgehog), geartype, 0, vx, vy, timer) |
368 local hypo=norm(vx,vy) |
|
369 return AddGear(div((GetGearRadius(hedgehog)*2*vx),hypo)+GetX(hedgehog), div((GetGearRadius(hedgehog)*2*vy),hypo)+GetY(hedgehog), geartype, 0, vx, vy, timer) |
333 end |
370 end |
334 |
371 |
335 --==========================run throw all hog/gear weapons ========================== |
372 --==========================run throw all hog/gear weapons ========================== |
|
373 --will check if the mine is nicely placed |
336 function weapon_aust_check(hog) |
374 function weapon_aust_check(hog) |
337 if(GetGearType(hog) == gtHedgehog) |
375 if(GetGearType(hog) == gtHedgehog) |
338 then |
376 then |
339 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 50, false)==true and hog ~= CurrentHedgehog) |
377 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 50, false)==true and hog ~= CurrentHedgehog) |
340 then |
378 then |
341 temp_val=1 |
379 temp_val=1 |
342 end |
380 end |
343 end |
381 end |
344 end |
382 end |
345 |
383 |
|
384 --african special on sedunction |
346 function weapon_duststorm(hog) |
385 function weapon_duststorm(hog) |
347 if(GetGearType(hog) == gtHedgehog) |
386 if(GetGearType(hog) == gtHedgehog) |
348 then |
387 then |
349 local dmg=20 |
388 local dmg=15 |
350 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 250, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
389 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 250, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
351 then |
390 then |
352 if(GetHealth(hog) > dmg) |
391 if(GetHealth(hog) > dmg) |
353 then |
392 then |
|
393 temp_val=temp_val+div(dmg*VampOn,100) |
354 SetHealth(hog, GetHealth(hog)-dmg) |
394 SetHealth(hog, GetHealth(hog)-dmg) |
355 else |
395 else |
|
396 temp_val=temp_val+div(GetHealth(hog)*VampOn,100) |
356 SetHealth(hog, 0) |
397 SetHealth(hog, 0) |
357 end |
398 end |
358 show_damage_tag(hog,dmg) |
399 show_damage_tag(hog,dmg) |
359 end |
400 end |
360 end |
401 end |
361 end |
402 end |
362 |
403 |
|
404 --kerguelen special on structure |
363 function weapon_scream_walrus(hog) |
405 function weapon_scream_walrus(hog) |
364 if(GetGearType(hog) == gtHedgehog) |
406 if(GetGearType(hog) == gtHedgehog) |
365 then |
407 then |
366 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 120, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
408 if(gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 120, false)==true and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
367 then |
409 then |
368 if(GetHealth(hog)>(20+GetHealth(CurrentHedgehog)*0.1)) |
410 if(GetHealth(hog)>(20+GetHealth(CurrentHedgehog)*0.1)) |
369 then |
411 then |
|
412 temp_val=temp_val+10+(GetHealth(CurrentHedgehog)*0.05)+div((20+GetHealth(CurrentHedgehog)*0.1)*VampOn,100) |
370 SetHealth(hog, GetHealth(hog)-(20+GetHealth(CurrentHedgehog)*0.1)) |
413 SetHealth(hog, GetHealth(hog)-(20+GetHealth(CurrentHedgehog)*0.1)) |
371 temp_val=temp_val+10+GetHealth(CurrentHedgehog)*0.05 |
|
372 else |
414 else |
|
415 temp_val=temp_val+(GetHealth(hog)*0.5)+(GetHealth(CurrentHedgehog)*0.05)+div((GetHealth(hog)+(GetHealth(CurrentHedgehog)*0.1))*VampOn,100) |
373 SetHealth(hog, 0) |
416 SetHealth(hog, 0) |
374 temp_val=temp_val+(GetHealth(hog)*0.5)+(GetHealth(CurrentHedgehog)*0.05) |
|
375 end |
417 end |
376 show_damage_tag(hog,(20+GetHealth(CurrentHedgehog)*0.1)) |
418 show_damage_tag(hog,(20+GetHealth(CurrentHedgehog)*0.1)) |
377 AddVisualGear(GetX(hog), GetY(hog), vgtExplosion, 0, false) |
419 AddVisualGear(GetX(hog), GetY(hog), vgtExplosion, 0, false) |
378 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
420 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
379 end |
421 end |
380 end |
422 end |
381 end |
423 end |
382 |
424 |
|
425 --kerguelen special swap hog |
383 function weapon_swap_kerg(hog) |
426 function weapon_swap_kerg(hog) |
384 if(GetGearType(hog) == gtHedgehog) |
427 if(GetGearType(hog) == gtHedgehog) |
385 then |
428 then |
386 if(kergulenSpecial ~= -1 and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 450, false)) |
429 if(kergulenSpecial ~= -1 and GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 450, false)) |
387 then |
430 then |
424 PlaySound(sndNooo,hog) |
469 PlaySound(sndNooo,hog) |
425 end |
470 end |
426 end |
471 end |
427 end |
472 end |
428 |
473 |
|
474 --south american special (used fire gear) |
429 function weapon_anno_south(hog) |
475 function weapon_anno_south(hog) |
430 local power_radius_outer=250 |
476 local power_radius_outer=230 |
431 local power_radius_inner=40 |
477 local power_radius_inner=45 |
432 local power_sa=500000 |
478 local power_sa=500000 |
|
479 local hypo=0 |
433 if(gearIsInCircle(hog,GetX(temp_val), GetY(temp_val), power_radius_outer, false) and gearIsInCircle(hog,GetX(temp_val), GetY(temp_val), power_radius_inner, false)==false) |
480 if(gearIsInCircle(hog,GetX(temp_val), GetY(temp_val), power_radius_outer, false) and gearIsInCircle(hog,GetX(temp_val), GetY(temp_val), power_radius_inner, false)==false) |
434 then |
481 then |
435 if(hog == CurrentHedgehog) |
482 if(hog == CurrentHedgehog) |
436 then |
483 then |
437 SetState(CurrentHedgehog, gstMoving) |
484 SetState(CurrentHedgehog, gstMoving) |
438 end |
485 end |
439 SetGearPosition(hog, GetX(hog),GetY(hog)-3) |
486 SetGearPosition(hog, GetX(hog),GetY(hog)-3) |
440 SetGearVelocity(hog, div((power_radius_outer-norm(math.abs(GetX(hog)-GetX(temp_val)),math.abs(GetY(hog)-GetY(temp_val))))*power_sa*positive(GetX(hog)-GetX(temp_val)),power_radius_outer), div((power_radius_outer-norm(math.abs(GetX(hog)-GetX(temp_val)),math.abs(GetY(hog)-GetY(temp_val))))*power_sa*positive(GetY(hog)-GetY(temp_val)),power_radius_outer)) |
487 hypo=norm(math.abs(GetX(hog)-GetX(temp_val)),math.abs(GetY(hog)-GetY(temp_val))) |
441 end |
488 SetGearVelocity(hog, div((power_radius_outer-hypo)*power_sa*positive(GetX(hog)-GetX(temp_val)),power_radius_outer), div((power_radius_outer-hypo)*power_sa*positive(GetY(hog)-GetY(temp_val)),power_radius_outer)) |
442 end |
489 end |
443 |
490 end |
|
491 |
|
492 --first part on kerguelen special (lonely cries) |
444 function weapon_cries_a(hog) |
493 function weapon_cries_a(hog) |
445 if(GetGearType(hog) == gtHedgehog) |
494 if(GetGearType(hog) == gtHedgehog and hog ~= CurrentHedgehog and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 500, false)) |
446 then |
495 then |
447 if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog) and gearIsInCircle(hog,GetX(CurrentHedgehog), GetY(CurrentHedgehog), 500, false)) |
496 kergulenSpecial=-1 |
448 then |
497 end |
449 kergulenSpecial=-1 |
498 end |
450 end |
499 |
451 end |
500 --second part on kerguelen special (lonely cries) |
452 end |
|
453 |
|
454 function weapon_cries_b(hog) |
501 function weapon_cries_b(hog) |
455 if(GetGearType(hog) == gtHedgehog) |
502 if(GetGearType(hog) == gtHedgehog) |
456 then |
503 then |
|
504 local dmg=7 |
457 if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
505 if(GetHogClan(hog) ~= GetHogClan(CurrentHedgehog)) |
458 then |
506 then |
459 SetHealth(hog, GetHealth(hog)-1) |
507 if(GetHealth(hog) > dmg) |
460 show_damage_tag(hog,1) |
508 then |
|
509 temp_val=temp_val+div(dmg*VampOn,100) |
|
510 SetHealth(hog, GetHealth(hog)-dmg) |
|
511 else |
|
512 temp_val=temp_val+div(GetHealth(hog)*VampOn,100) |
|
513 SetHealth(hog, 0) |
|
514 end |
|
515 show_damage_tag(hog,dmg) |
461 AddVisualGear(GetX(hog), GetY(hog)-30, vgtEvilTrace, 0, false) |
516 AddVisualGear(GetX(hog), GetY(hog)-30, vgtEvilTrace, 0, false) |
462 end |
517 end |
463 end |
518 end |
464 end |
519 end |
465 |
520 |
|
521 --north american special on sniper |
466 function weapon_lipstick(hog) |
522 function weapon_lipstick(hog) |
467 if(GetGearType(hog) == gtHedgehog) |
523 if(GetGearType(hog) == gtHedgehog) |
468 then |
524 then |
469 if(gearIsInCircle(temp_val,GetX(hog), GetY(hog), 20, false)) |
525 if(gearIsInCircle(temp_val,GetX(hog), GetY(hog), 20, false)) |
470 then |
526 then |
685 europe_s = 0 |
758 europe_s = 0 |
686 AddCaption(loc("NORMAL")) |
759 AddCaption(loc("NORMAL")) |
687 end |
760 end |
688 end |
761 end |
689 |
762 |
690 if(swapweps==true and GetCurAmmoType() == amSkip) |
763 --swap forward in the weaponmenu (1.0 style) |
|
764 if(swapweps==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
691 then |
765 then |
692 continent[GetHogTeamName(CurrentHedgehog)]=continent[GetHogTeamName(CurrentHedgehog)]+1 |
766 continent[GetHogTeamName(CurrentHedgehog)]=continent[GetHogTeamName(CurrentHedgehog)]+1 |
693 |
767 |
694 if(continent[GetHogTeamName(CurrentHedgehog)]> table.getn(weaponsets)) |
768 if(continent[GetHogTeamName(CurrentHedgehog)]> table.maxn(weaponsets)) |
695 then |
769 then |
696 continent[GetHogTeamName(CurrentHedgehog)]=1 |
770 continent[GetHogTeamName(CurrentHedgehog)]=1 |
697 end |
771 end |
698 setweapons(true) |
772 setweapons() |
699 end |
773 end |
700 |
774 |
701 if(GetCurAmmoType() == amStructure) |
775 --kerguelen |
702 then |
776 if(GetCurAmmoType() == amHammer) |
703 if(kergulenSpecial==5) |
777 then |
|
778 if(kergulenSpecial==6) |
704 then |
779 then |
705 kergulenSpecial = 1 |
780 kergulenSpecial = 1 |
|
781 AddCaption("Normal") |
|
782 elseif(kergulenSpecial==1) |
|
783 then |
|
784 kergulenSpecial = 2 |
706 AddCaption("#"..weapontexts[7]) |
785 AddCaption("#"..weapontexts[7]) |
707 elseif(kergulenSpecial==1 and TotalRounds>=1) |
786 elseif(kergulenSpecial==2 and TotalRounds>=1) |
708 then |
787 then |
709 kergulenSpecial = 2 |
788 kergulenSpecial = 3 |
710 AddCaption("##"..weapontexts[8]) |
789 AddCaption("##"..weapontexts[8]) |
711 elseif(kergulenSpecial==2 or (kergulenSpecial==1 and TotalRounds<1)) |
790 elseif(kergulenSpecial==3 or (kergulenSpecial==2 and TotalRounds<1)) |
712 then |
791 then |
713 kergulenSpecial = 3 |
792 kergulenSpecial = 4 |
714 AddCaption("###"..weapontexts[9]) |
793 AddCaption("###"..weapontexts[9]) |
715 elseif(kergulenSpecial==3) |
794 elseif(kergulenSpecial==4) |
716 then |
795 then |
717 kergulenSpecial = 4 |
796 kergulenSpecial = 5 |
718 AddCaption("####"..weapontexts[10]) |
797 AddCaption("####"..weapontexts[10]) |
719 elseif(kergulenSpecial==4) |
798 elseif(kergulenSpecial==5) |
720 then |
799 then |
721 kergulenSpecial = 5 |
800 kergulenSpecial = 6 |
722 AddCaption("#####"..weapontexts[15]) |
801 AddCaption("#####"..weapontexts[15]) |
723 end |
802 end |
724 end |
803 end |
725 end |
804 end |
726 |
805 |
727 function onPrecise() |
806 function onPrecise() |
728 if(swapweps==true and GetCurAmmoType() == amSkip) |
807 --swap backwards in the weaponmenu (1.0 style) |
|
808 if(swapweps==true and (GetCurAmmoType() == amSkip or GetCurAmmoType() == amNothing)) |
729 then |
809 then |
730 continent[GetHogTeamName(CurrentHedgehog)]=continent[GetHogTeamName(CurrentHedgehog)]-1 |
810 continent[GetHogTeamName(CurrentHedgehog)]=continent[GetHogTeamName(CurrentHedgehog)]-1 |
731 |
811 |
732 if(continent[GetHogTeamName(CurrentHedgehog)]<=0) |
812 if(continent[GetHogTeamName(CurrentHedgehog)]<=0) |
733 then |
813 then |
734 continent[GetHogTeamName(CurrentHedgehog)]=9 |
814 continent[GetHogTeamName(CurrentHedgehog)]=9 |
735 end |
815 end |
736 setweapons(true) |
816 setweapons() |
737 end |
|
738 end |
|
739 |
|
740 function onSlot() |
|
741 if(continent[GetHogTeamName(CurrentHedgehog)]==0) then |
|
742 ParseCommand("setweap " .. string.char(amSkip)) |
|
743 end |
817 end |
744 end |
818 end |
745 |
819 |
746 function onGameTick20() |
820 function onGameTick20() |
747 |
821 --if you picked a weaponset from the weaponmenu (icon) |
748 if(teams_ok[GetHogTeamName(CurrentHedgehog)] == 2) |
|
749 then |
|
750 if(GetCurAmmoType()~=amTeleport and swapweps==true and TurnTime-TurnTimeLeft>=100) |
|
751 then |
|
752 teams_ok[GetHogTeamName(CurrentHedgehog)] = true |
|
753 ParseCommand("setweap " .. string.char(amSkip)) |
|
754 end |
|
755 end |
|
756 |
|
757 if(continent[GetHogTeamName(CurrentHedgehog)]==0) |
822 if(continent[GetHogTeamName(CurrentHedgehog)]==0) |
758 then |
823 then |
759 if(GetCurAmmoType()==amSniperRifle) then |
824 if(GetCurAmmoType()==amSwitch) |
760 continent[GetHogTeamName(CurrentHedgehog)]=1 |
825 then |
761 setweapons(false) |
826 continent[GetHogTeamName(CurrentHedgehog)]=GetRandom(table.maxn(weaponsets))+1 |
762 elseif(GetCurAmmoType()==amGasBomb) then |
827 setweapons() |
763 continent[GetHogTeamName(CurrentHedgehog)]=2 |
828 PlaySound(sndMineTick) |
764 setweapons(false) |
829 else |
765 elseif(GetCurAmmoType()==amBazooka) then |
830 for v,w in pairs(weaponsets) |
766 continent[GetHogTeamName(CurrentHedgehog)]=3 |
831 do |
767 setweapons(false) |
832 if(GetCurAmmoType()==weaponsets[v][4]) |
768 elseif(GetCurAmmoType()==amSMine) then |
833 then |
769 continent[GetHogTeamName(CurrentHedgehog)]=4 |
834 continent[GetHogTeamName(CurrentHedgehog)]=v |
770 setweapons(false) |
835 setweapons() |
771 elseif(GetCurAmmoType()==amRope) then |
836 PlaySound(weaponsetssounds[v][1]) |
772 continent[GetHogTeamName(CurrentHedgehog)]=5 |
837 PlaySound(weaponsetssounds[v][2],CurrentHedgehog) |
773 setweapons(false) |
838 end |
774 elseif(GetCurAmmoType()==amBaseballBat) then |
|
775 continent[GetHogTeamName(CurrentHedgehog)]=6 |
|
776 setweapons(false) |
|
777 elseif(GetCurAmmoType()==amTeleport) then |
|
778 continent[GetHogTeamName(CurrentHedgehog)]=7 |
|
779 setweapons(false) |
|
780 elseif(GetCurAmmoType()==amStructure) then |
|
781 continent[GetHogTeamName(CurrentHedgehog)]=8 |
|
782 setweapons(false) |
|
783 elseif(GetCurAmmoType()==amInvulnerable) then |
|
784 continent[GetHogTeamName(CurrentHedgehog)]=9 |
|
785 setweapons(false) |
|
786 elseif(GetCurAmmoType()==amSwitch) then |
|
787 continent[GetHogTeamName(CurrentHedgehog)]=GetRandom(table.getn(weaponsets))+1 |
|
788 setweapons(false) |
|
789 end |
|
790 end |
|
791 |
|
792 if(kergulenSpecial ~= 0 and GetCurAmmoType() == amStructure) |
|
793 then |
|
794 if(kergulenSpecial == 1) |
|
795 then |
|
796 if(visualcircle==nil) |
|
797 then |
|
798 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 120, false) |
|
799 end |
839 end |
|
840 end |
|
841 end |
|
842 |
|
843 --show the kerguelen ring |
|
844 if(kergulenSpecial > 1 and GetCurAmmoType() == amHammer) |
|
845 then |
|
846 if(visualcircle==nil) |
|
847 then |
|
848 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 0, false) |
|
849 end |
|
850 |
|
851 if(kergulenSpecial == 2) --walrus scream |
|
852 then |
800 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 120, 4, 0xff0000ee) |
853 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 120, 4, 0xff0000ee) |
801 elseif(kergulenSpecial == 2) |
854 elseif(kergulenSpecial == 3) --swap hog |
802 then |
855 then |
803 if(visualcircle==nil) |
|
804 then |
|
805 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 450, false) |
|
806 end |
|
807 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 450, 3, 0xffff00ee) |
856 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 450, 3, 0xffff00ee) |
808 elseif(kergulenSpecial == 3) |
857 elseif(kergulenSpecial == 4) --flare |
809 then |
858 then |
810 if(visualcircle==nil) |
|
811 then |
|
812 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 45, false) |
|
813 end |
|
814 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 45, 6, 0x00ff00ee) |
859 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 45, 6, 0x00ff00ee) |
815 elseif(kergulenSpecial == 4) |
860 elseif(kergulenSpecial == 5) --cries |
816 then |
861 then |
817 if(visualcircle==nil) |
|
818 then |
|
819 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 500, false) |
|
820 end |
|
821 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 500, 1, 0x0000ffee) |
862 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 500, 1, 0x0000ffee) |
822 elseif(kergulenSpecial == 5) |
863 elseif(kergulenSpecial == 6) --sabotage |
823 then |
864 then |
824 if(visualcircle==nil) |
|
825 then |
|
826 visualcircle=AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtCircle, 100, false) |
|
827 end |
|
828 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 100, 10, 0xeeeeeeee) |
865 SetVisualGearValues(visualcircle, GetX(CurrentHedgehog), GetY(CurrentHedgehog),20, 200, 0, 0, 100, 100, 10, 0xeeeeeeee) |
829 end |
866 end |
830 |
867 |
831 elseif(visualcircle~=nil) |
868 elseif(visualcircle~=nil) |
832 then |
869 then |
833 DeleteVisualGear(visualcircle) |
870 DeleteVisualGear(visualcircle) |
834 visualcircle=nil |
871 visualcircle=nil |
835 end |
872 end |
836 |
873 |
|
874 --sabotage |
837 if(disable_moving[CurrentHedgehog]==true) |
875 if(disable_moving[CurrentHedgehog]==true) |
838 then |
876 then |
839 |
877 |
840 if(TurnTimeLeft<=150) |
878 if(TurnTimeLeft<=150) |
841 then |
879 then |
842 disable_moving[CurrentHedgehog]=false |
880 disable_moving[CurrentHedgehog]=false |
843 SetHogLevel(CurrentHedgehog,0) |
881 SetHogLevel(CurrentHedgehog,disableoffsetai) |
|
882 onsabotageai=false |
844 elseif(disallowattack>=15 and disallowattack >= 20) |
883 elseif(disallowattack>=15 and disallowattack >= 20) |
845 then |
884 then |
846 disallowattack=0 |
885 disallowattack=0 |
|
886 onsabotageai=true |
847 SetHogLevel(CurrentHedgehog,1) |
887 SetHogLevel(CurrentHedgehog,1) |
848 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
888 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
849 elseif(GetHogLevel(CurrentHedgehog)==1) |
889 elseif(onsabotageai==true) |
850 then |
890 then |
851 SetHogLevel(CurrentHedgehog,0) |
891 SetHogLevel(CurrentHedgehog,disableoffsetai) |
|
892 onsabotageai=false |
852 else |
893 else |
853 disallowattack=disallowattack+1 |
894 disallowattack=disallowattack+1 |
854 end |
895 end |
855 |
896 |
856 end |
897 end |
858 end |
899 end |
859 |
900 |
860 --if you used hogswitch or any similar weapon, dont enable any weaponchange |
901 --if you used hogswitch or any similar weapon, dont enable any weaponchange |
861 function onAttack() |
902 function onAttack() |
862 swapweps=false |
903 swapweps=false |
863 local around=false |
|
864 |
904 |
865 --african special |
905 --african special |
866 if(africanSpecial == 1 and GetCurAmmoType() == amSeduction) |
906 if(africanSpecial == 1 and GetCurAmmoType() == amSeduction) |
867 then |
907 then |
868 SetState(CurrentHedgehog, gstAttacked) |
908 SetState(CurrentHedgehog, gstAttacked) |
869 |
909 |
|
910 temp_val=0 |
870 runOnGears(weapon_duststorm) |
911 runOnGears(weapon_duststorm) |
|
912 SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val) |
871 |
913 |
872 --visual stuff |
914 --visual stuff |
873 visual_gear_explosion(250,GetX(CurrentHedgehog), GetY(CurrentHedgehog),vgtSmoke,vgtSmokeWhite) |
915 visual_gear_explosion(250,GetX(CurrentHedgehog), GetY(CurrentHedgehog),vgtSmoke,vgtSmokeWhite) |
874 PlaySound(sndParachute) |
916 PlaySound(sndParachute) |
875 end |
917 |
876 |
|
877 --Kerguelen specials |
918 --Kerguelen specials |
878 if(GetCurAmmoType() == amStructure) |
919 elseif(GetCurAmmoType() == amHammer and kergulenSpecial > 1) |
879 then |
920 then |
880 SetState(CurrentHedgehog, gstAttacked) |
921 SetState(CurrentHedgehog, gstAttacked) |
881 if(kergulenSpecial == 1) |
922 --scream |
|
923 if(kergulenSpecial == 2) |
882 then |
924 then |
883 temp_val=0 |
925 temp_val=0 |
884 runOnGears(weapon_scream_walrus) |
926 runOnGears(weapon_scream_walrus) |
885 SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val) |
927 SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val) |
886 PlaySound(sndHellish) |
928 PlaySound(sndHellish) |
887 |
929 |
888 elseif(kergulenSpecial == 2 and TotalRounds>=1) |
930 --swap |
|
931 elseif(kergulenSpecial == 3 and TotalRounds>=1) |
889 then |
932 then |
890 runOnGears(weapon_swap_kerg) |
933 runOnGears(weapon_swap_kerg) |
891 PlaySound(sndPiano3) |
934 PlaySound(sndPiano3) |
892 elseif(kergulenSpecial == 3) |
935 |
|
936 --flare |
|
937 elseif(kergulenSpecial == 4) |
893 then |
938 then |
894 runOnGears(weapon_flare) |
939 runOnGears(weapon_flare) |
895 PlaySound(sndThrowRelease) |
940 PlaySound(sndThrowRelease) |
896 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
941 AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmokeWhite, 0, false) |
897 AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 30) |
942 AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 34) |
898 |
943 |
899 elseif(kergulenSpecial == 4) |
944 --cries |
|
945 elseif(kergulenSpecial == 5) |
900 then |
946 then |
901 runOnGears(weapon_cries_a) |
947 runOnGears(weapon_cries_a) |
902 if(kergulenSpecial~=-1) |
948 if(kergulenSpecial~=-1) |
903 then |
949 then |
904 AddGear(0, 0, gtWaterUp, 0, 0,0,0) |
950 AddGear(0, 0, gtWaterUp, 0, 0,0,0) |
905 PlaySound(sndWarp) |
951 PlaySound(sndWarp) |
906 PlaySound(sndMolotov) |
952 PlaySound(sndMolotov) |
907 |
953 |
|
954 temp_val=0 |
908 runOnGears(weapon_cries_b) |
955 runOnGears(weapon_cries_b) |
|
956 SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val) |
909 else |
957 else |
910 HogSay(CurrentHedgehog, loc("Hogs in sight!"), SAY_SAY) |
958 HogSay(CurrentHedgehog, loc("Hogs in sight!"), SAY_SAY) |
911 end |
959 end |
912 elseif(kergulenSpecial == 5) |
960 |
|
961 --sabotage |
|
962 elseif(kergulenSpecial == 6) |
913 then |
963 then |
914 runOnGears(weapon_sabotage) |
964 runOnGears(weapon_sabotage) |
915 end |
965 end |
916 DeleteVisualGear(visualcircle) |
966 DeleteVisualGear(visualcircle) |
917 visualcircle=nil |
967 visualcircle=nil |
918 end |
968 |
919 |
969 elseif(GetCurAmmoType() == amVampiric) |
|
970 then |
|
971 VampOn=75 |
|
972 end |
920 --Australian special |
973 --Australian special |
921 if(GetGearType(austmine) == gtMine and austmine ~= nil) |
974 if(GetGearType(austmine) == gtMine and austmine ~= nil) |
922 then |
975 then |
923 temp_val=0 |
976 temp_val=0 |
924 runOnGears(weapon_aust_check) |
977 runOnGears(weapon_aust_check) |