1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-20 03:59:47 -05:00

Staffs: kill on any round when upgraded

This commit is contained in:
Jbleezy
2023-03-28 20:39:47 -07:00
parent 9cdc862c06
commit 8cb212c89f
4 changed files with 116 additions and 0 deletions

View File

@ -232,6 +232,7 @@
* Can collect souls in The Crazy Place after upgrading to fill 5% of max ammo per soul
* Get full ammo when initially picked up after upgrading (normally missing one clip)
* Max ammo no longer fills clip ammo
* Upgraded: kill on any round
## Wallbuys
* Purchasing ammo refills clip ammo

View File

@ -0,0 +1,49 @@
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_net;
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_craftables;
#include maps\mp\zombies\_zm_equipment;
#include maps\mp\zm_tomb_teleporter;
#include maps\mp\zm_tomb_vo;
#include maps\mp\zombies\_zm_ai_basic;
#include maps\mp\animscripts\zm_shared;
#include maps\mp\zombies\_zm_unitrigger;
#include maps\mp\zombies\_zm_zonemgr;
#include maps\mp\zm_tomb_chamber;
#include maps\mp\zombies\_zm_challenges;
#include maps\mp\zm_tomb_challenges;
#include maps\mp\zm_tomb_tank;
#include maps\mp\zm_tomb_craftables;
#include maps\mp\zm_tomb_utility;
#include maps\mp\zombies\_zm_weap_staff_fire;
flame_damage_fx( damageweapon, e_attacker, pct_damage = 1.0 )
{
was_on_fire = is_true( self.is_on_fire );
n_initial_dmg = get_impact_damage( damageweapon ) * pct_damage;
is_upgraded = damageweapon == "staff_fire_upgraded_zm" || damageweapon == "staff_fire_upgraded2_zm" || damageweapon == "staff_fire_upgraded3_zm";
if ( is_upgraded && pct_damage > 0.5 )
{
self do_damage_network_safe( e_attacker, self.health, damageweapon, "MOD_BURNED" );
self thread zombie_gib_guts();
return;
}
self endon( "death" );
if ( !is_upgraded && !was_on_fire )
{
self.is_on_fire = 1;
self thread zombie_set_and_restore_flame_state();
wait 0.5;
self thread flame_damage_over_time( e_attacker, damageweapon, pct_damage );
}
if ( n_initial_dmg > 0 )
self do_damage_network_safe( e_attacker, n_initial_dmg, damageweapon, "MOD_BURNED" );
}

View File

@ -0,0 +1,62 @@
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_net;
#include maps\mp\zm_tomb_utility;
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_audio;
#include maps\mp\zombies\_zm_powerups;
#include maps\mp\zombies\_zm_score;
#include maps\mp\animscripts\shared;
#include maps\mp\zombies\_zm_weap_staff_lightning;
staff_lightning_ball_damage_over_time( e_source, e_target, e_attacker )
{
e_attacker endon( "disconnect" );
e_target setclientfield( "lightning_impact_fx", 1 );
e_target thread maps\mp\zombies\_zm_audio::do_zombies_playvocals( "electrocute", e_target.animname );
n_range_sq = e_source.n_range * e_source.n_range;
e_target.is_being_zapped = 1;
e_target setclientfield( "lightning_arc_fx", 1 );
wait 0.5;
if ( isdefined( e_source ) )
{
if ( !isdefined( e_source.n_damage_per_sec ) )
e_source.n_damage_per_sec = get_lightning_ball_damage_per_sec( e_attacker.chargeshotlevel );
n_damage_per_pulse = e_source.n_damage_per_sec * 1.0;
}
while ( isdefined( e_source ) && isalive( e_target ) )
{
e_target thread stun_zombie();
wait 1.0;
if ( !isdefined( e_source ) || !isalive( e_target ) )
break;
n_dist_sq = distancesquared( e_source.origin, e_target.origin );
if ( n_dist_sq > n_range_sq )
break;
if ( isalive( e_target ) && isdefined( e_source ) )
{
e_target thread zombie_shock_eyes();
e_target thread staff_lightning_kill_zombie( e_attacker, e_source.str_weapon );
break;
}
}
if ( isdefined( e_target ) )
{
e_target.is_being_zapped = 0;
e_target setclientfield( "lightning_arc_fx", 0 );
}
}
get_lightning_ball_damage_per_sec( n_charge )
{
return 2500;
}

View File

@ -17,6 +17,8 @@
#include scripts\zm\replaced\_zm_powerup_zombie_blood;
#include scripts\zm\replaced\_zm_riotshield_tomb;
#include scripts\zm\replaced\_zm_weap_riotshield_tomb;
#include scripts\zm\replaced\_zm_weap_staff_fire;
#include scripts\zm\replaced\_zm_weap_staff_lightning;
main()
{
@ -45,6 +47,8 @@ main()
replaceFunc(maps\mp\zombies\_zm_riotshield_tomb::trackriotshield, scripts\zm\replaced\_zm_riotshield_tomb::trackriotshield);
replaceFunc(maps\mp\zombies\_zm_weap_riotshield_tomb::init, scripts\zm\replaced\_zm_weap_riotshield_tomb::init);
replaceFunc(maps\mp\zombies\_zm_weap_riotshield_tomb::player_damage_shield, scripts\zm\replaced\_zm_weap_riotshield_tomb::player_damage_shield);
replaceFunc(maps\mp\zombies\_zm_weap_staff_fire::flame_damage_fx, scripts\zm\replaced\_zm_weap_staff_fire::flame_damage_fx);
replaceFunc(maps\mp\zombies\_zm_weap_staff_lightning::staff_lightning_ball_damage_over_time, scripts\zm\replaced\_zm_weap_staff_lightning::staff_lightning_ball_damage_over_time);
}
init()