1 #using scripts\codescripts\struct;
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\killstreaks_shared;
5 #using scripts\shared\popups_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
9 #using scripts\mp\_util;
10 #using scripts\mp\killstreaks\_killstreaks;
12 #insert scripts\mp\_hacker_tool.gsh;
13 #insert scripts\mp\killstreaks\_killstreaks.gsh;
14 #insert scripts\shared\shared.gsh;
15 #insert scripts\shared\version.gsh;
16 #insert scripts\shared\weapons\_hive_gun.gsh;
18 #namespace killstreak_bundles;
23 level.killstreakBundle[
"inventory_" + killstreakType] = level.killstreakBundle[killstreakType];
25 assert( isdefined( level.killstreakBundle[killstreakType] ) );
30 if( killstreak.archetype ===
"raps" )
33 return level.killstreakBundle[killstreak.killstreakType];
41 return bundle.ksHackTimeout;
47 hackedProtection =
false;
50 if ( isdefined( bundle.ksHackProtection ) )
52 hackedProtection = bundle.ksHackProtection;
55 return hackedProtection;
61 hackToolInnerTime = 10000;
64 if ( isdefined( bundle.ksHackToolInnerTime ) )
66 hackToolInnerTime = bundle.ksHackToolInnerTime;
69 return hackToolInnerTime;
75 hackToolOuterTime = 10000;
78 if ( isdefined( bundle.ksHackToolOuterTime ) )
80 hackToolOuterTime = bundle.ksHackToolOuterTime;
83 return hackToolOuterTime;
89 hackedToolInnerRadius = 10000;
92 if ( isdefined( bundle.ksHackToolInnerRadius ) )
94 hackedToolInnerRadius = bundle.ksHackToolInnerRadius;
97 return hackedToolInnerRadius;
104 hackedToolOuterRadius = 10000;
107 if ( isdefined( bundle.ksHackToolOuterRadius ) )
109 hackedToolOuterRadius = bundle.ksHackToolOuterRadius;
112 return hackedToolOuterRadius;
119 hackedToolLostLineOfSightLimitMs = 1000;
122 if ( isdefined( bundle.ksHackToolLostLineOfSightLimitMs ) )
124 hackedToolLostLineOfSightLimitMs = bundle.ksHackToolLostLineOfSightLimitMs;
127 return hackedToolLostLineOfSightLimitMs;
134 hackToolNoLineOfSightTime = 1000;
137 if ( isdefined( bundle.ksHackToolNoLineOfSightTime ) )
139 hackToolNoLineOfSightTime = bundle.ksHackToolNoLineOfSightTime;
142 return hackToolNoLineOfSightTime;
150 hackedScoreEvent = undefined;
152 if ( isdefined( bundle.ksHackScoreEvent ) )
154 hackedScoreEvent = bundle.ksHackScoreEvent;
157 return hackedScoreEvent;
166 if ( isdefined( bundle.ksHackFX ) )
168 hackFX = bundle.ksHackFX;
180 if ( isdefined( bundle.ksHackLoopFX ) )
182 hackLoopFX = bundle.ksHackLoopFX;
190 bundle = level.killstreakBundle[killstreakType];
192 return bundle.ksHealth;
197 bundle = level.killstreakBundle[killstreakType];
199 return bundle.ksLowHealth;
204 bundle = level.killstreakBundle[killstreakType];
206 return bundle.ksHackedHealth;
211 shotsToKill = undefined;
213 switch( weapon.rootweapon.name )
215 case "remote_missile_missile":
216 shotsToKill = bundle.ksRemote_missile_missile;
218 case "hero_annihilator":
219 shotsToKill = bundle.ksHero_annihilator;
221 case "hero_armblade":
222 shotsToKill = bundle.ksHero_armblade;
224 case "hero_bowlauncher":
225 case "hero_bowlauncher2":
226 case "hero_bowlauncher3":
227 case "hero_bowlauncher4":
228 if ( meansOfDeath ==
"MOD_PROJECTILE_SPLASH" || meansOfDeath ==
"MOD_PROJECTILE" )
230 shotsToKill = bundle.ksHero_bowlauncher;
237 case "hero_gravityspikes":
238 shotsToKill = bundle.ksHero_gravityspikes;
240 case "hero_lightninggun":
241 shotsToKill = bundle.ksHero_lightninggun;
244 case "hero_minigun_body3":
245 shotsToKill = bundle.ksHero_minigun;
247 case "hero_pineapplegun":
248 shotsToKill = bundle.ksHero_pineapplegun;
250 case "hero_firefly_swarm":
255 shotsToKill = bundle.ksDartsToKill;
257 case "gadget_heat_wave":
258 shotsToKill = bundle.ksHero_heatwave;
262 return VAL( shotsToKill, 0 );
269 emp_weapon_damage = undefined;
271 if ( isdefined( level.killstreakBundle[killstreakType] ) )
273 bundle = level.killstreakBundle[killstreakType];
275 empGrenadesToKill =
VAL( bundle.ksEmpGrenadesToKill, 0 );
277 if ( empGrenadesToKill == 0 )
281 else if ( empGrenadesToKill > 0 )
283 emp_weapon_damage = maxhealth / empGrenadesToKill + 1;
288 emp_weapon_damage = 0;
292 return emp_weapon_damage;
299 weapon_damage = undefined;
301 if ( isdefined( level.killstreakBundle[killstreakType] ) )
303 bundle = level.killstreakBundle[killstreakType];
305 if ( isdefined( weapon ) )
309 if ( shotsToKill == 0 )
313 else if ( shotsToKill > 0 )
315 if ( isdefined( chargeShotLevel ) && chargeShotLevel > 0 )
320 shotsToKill = shotsToKill / chargeShotLevel;
323 weapon_damage = maxhealth / shotsToKill + 1;
333 if ( !isdefined( weapon_damage ) )
335 if ( type ==
"MOD_RIFLE_BULLET" || type ==
"MOD_PISTOL_BULLET" || type ==
"MOD_HEAD_SHOT" )
337 hasArmorPiercing = isdefined( attacker ) && isPlayer( attacker ) && attacker HasPerk(
"specialty_armorpiercing" );
339 clipsToKill =
VAL( bundle.ksClipsToKill, 0 );
340 if( clipsToKill == -1 )
345 else if ( hasArmorPiercing &&
self.aitype !==
"spawner_bo3_robot_grunt_assault_mp_escort" )
347 weapon_damage =
damage + int(
damage * level.cac_armorpiercing_data);
350 if ( weapon.weapClass ==
"spread" )
352 ksShotgunMultiplier =
VAL( bundle.ksShotgunMultiplier, 1);
354 if ( ksShotgunMultiplier == 0 )
358 else if ( ksShotgunMultiplier > 0 )
360 weapon_damage =
VAL( weapon_damage,
damage ) * ksShotgunMultiplier;
364 else if ( ( type ==
"MOD_PROJECTILE" || type ==
"MOD_EXPLOSIVE" )
365 && ( !isdefined( weapon.isEmpKillstreak ) || !weapon.isEmpKillstreak )
366 && ( weapon.statIndex != level.weaponPistolEnergy.statIndex )
367 && ( weapon.statIndex != level.weaponSpecialCrossbow.statIndex )
368 && ( weapon.statIndex != level.weaponSmgNailGun.statIndex )
369 && ( weapon.statIndex != level.weaponBouncingBetty.statIndex ) )
371 if ( weapon.statIndex == level.weaponShotgunEnergy.statIndex )
373 shotgunEnergyToKill =
VAL( bundle.ksShotgunEnergyToKill, 0 );
375 if ( shotgunEnergyToKill == 0 )
379 else if ( shotgunEnergyToKill > 0 )
381 weapon_damage = maxhealth / shotgunEnergyToKill + 1;
391 rocketsToKill =
VAL( bundle.ksRocketsToKill, 0 );
393 if ( rocketsToKill == 0 )
397 else if ( rocketsToKill > 0 )
399 if ( weapon.rootweapon.name ==
"launcher_multi" )
404 weapon_damage = maxhealth / rocketsToKill + 1;
413 else if (( type ==
"MOD_GRENADE" || type ==
"MOD_GRENADE_SPLASH" ) && ( !isdefined( weapon.isEmpKillstreak ) || !weapon.isEmpKillstreak ) )
415 grenadeDamageMultiplier =
VAL( bundle.ksGrenadeDamageMultiplier, 0 );
417 if ( grenadeDamageMultiplier == 0 )
421 else if ( grenadeDamageMultiplier > 0 )
423 weapon_damage =
damage * grenadeDamageMultiplier;
431 else if ( type ==
"MOD_MELEE_WEAPON_BUTT" || type ==
"MOD_MELEE" )
433 ksMeleeDamageMultiplier =
VAL( bundle.ksMeleeDamageMultiplier, 0 );
435 if ( ksMeleeDamageMultiplier == 0 )
439 else if ( ksMeleeDamageMultiplier > 0 )
441 weapon_damage =
damage * ksMeleeDamageMultiplier;
449 else if ( type ==
"MOD_PROJECTILE_SPLASH" )
451 ksProjectileSpashMultiplier =
VAL( bundle.ksProjectileSpashMultiplier, 0 );
453 if ( ksProjectileSpashMultiplier == 0 )
457 else if ( ksProjectileSpashMultiplier > 0 )
459 weapon_damage =
damage * ksProjectileSpashMultiplier;
470 return weapon_damage;