From 5bba42ff85a353ca027e12b41eac517416f05f08 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Wed, 5 Apr 2023 11:35:17 -0700 Subject: [PATCH] G-Strike Beacon: kills on any round --- README.md | 3 ++ scripts/zm/replaced/_zm_weap_beacon.gsc | 52 +++++++++++++++++++++++ scripts/zm/zm_tomb/zm_tomb_reimagined.gsc | 2 + 3 files changed, 57 insertions(+) create mode 100644 scripts/zm/replaced/_zm_weap_beacon.gsc diff --git a/README.md b/README.md index d0fb5f92..f67fdbe9 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,9 @@ * Unupgraded: changed damage to 2000 (normally does 1000-2000 damage based on number of charges) * Upgraded: kills on any round when not charged +### G-Strike Beacon +* Kills on any round + ### Claymore * Can be repurchased * Increased max amount that can be placed from 12 to 20 diff --git a/scripts/zm/replaced/_zm_weap_beacon.gsc b/scripts/zm/replaced/_zm_weap_beacon.gsc new file mode 100644 index 00000000..ab07838b --- /dev/null +++ b/scripts/zm/replaced/_zm_weap_beacon.gsc @@ -0,0 +1,52 @@ +#include common_scripts\utility; +#include maps\mp\_utility; +#include maps\mp\zombies\_zm_utility; +#include maps\mp\zm_tomb_utility; +#include maps\mp\zombies\_zm_laststand; +#include maps\mp\zombies\_zm_clone; +#include maps\mp\zombies\_zm_audio; +#include maps\mp\zombies\_zm_weap_beacon; + +wait_and_do_weapon_beacon_damage( index ) +{ + wait 3.0; + v_damage_origin = self.a_v_land_spots[index]; + level.n_weap_beacon_zombie_thrown_count = 0; + a_zombies_to_kill = []; + a_zombies = getaispeciesarray( "axis", "all" ); + + foreach ( zombie in a_zombies ) + { + n_distance = distance( zombie.origin, v_damage_origin ); + + if ( n_distance <= 200 ) + { + a_zombies_to_kill[a_zombies_to_kill.size] = zombie; + } + } + + if ( index == 0 ) + { + radiusdamage( self.origin + vectorscale( ( 0, 0, 1 ), 12.0 ), 10, 1, 1, self.owner, "MOD_GRENADE_SPLASH", "beacon_zm" ); + self ghost(); + self stopanimscripted( 0 ); + } + + level thread weap_beacon_zombie_death( self, a_zombies_to_kill ); + self thread weap_beacon_rumble(); +} + +weap_beacon_zombie_death( model, a_zombies_to_kill ) +{ + for ( i = 0; i < a_zombies_to_kill.size; i++ ) + { + zombie = a_zombies_to_kill[i]; + + if ( !isdefined( zombie ) || !isalive( zombie ) ) + continue; + + zombie thread set_beacon_damage(); + zombie dodamage( zombie.health, zombie.origin, model.owner, model.owner, "none", "MOD_GRENADE_SPLASH", 0, "beacon_zm" ); + zombie thread weapon_beacon_launch_ragdoll(); + } +} \ No newline at end of file diff --git a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc index b62ff7a2..2a2b3d70 100644 --- a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc +++ b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc @@ -26,6 +26,7 @@ #include scripts\zm\replaced\_zm_riotshield_tomb; #include scripts\zm\replaced\_zm_weap_riotshield_tomb; #include scripts\zm\replaced\_zm_weap_one_inch_punch; +#include scripts\zm\replaced\_zm_weap_beacon; #include scripts\zm\replaced\_zm_weap_staff_air; #include scripts\zm\replaced\_zm_weap_staff_fire; #include scripts\zm\replaced\_zm_weap_staff_lightning; @@ -71,6 +72,7 @@ main() 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_one_inch_punch::monitor_melee_swipe, scripts\zm\replaced\_zm_weap_one_inch_punch::monitor_melee_swipe); + replaceFunc(maps\mp\zombies\_zm_weap_beacon::wait_and_do_weapon_beacon_damage, scripts\zm\replaced\_zm_weap_beacon::wait_and_do_weapon_beacon_damage); replaceFunc(maps\mp\zombies\_zm_weap_staff_air::whirlwind_kill_zombies, scripts\zm\replaced\_zm_weap_staff_air::whirlwind_kill_zombies); 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_fire::get_impact_damage, scripts\zm\replaced\_zm_weap_staff_fire::get_impact_damage);