diff --git a/README.md b/README.md index d3627845..8b06b32b 100644 --- a/README.md +++ b/README.md @@ -379,6 +379,7 @@ ### Electric Cherry * Removed cooldown after being used multiple times in a row +* Downing kills all zombies around the player ### Vulture-Aid * Stink areas no longer activate while the player is standing diff --git a/scripts/zm/replaced/_zm_afterlife.gsc b/scripts/zm/replaced/_zm_afterlife.gsc index 0cf1e611..478e9f8c 100644 --- a/scripts/zm/replaced/_zm_afterlife.gsc +++ b/scripts/zm/replaced/_zm_afterlife.gsc @@ -152,7 +152,7 @@ afterlife_laststand( b_electric_chair = 0 ) if ( isdefined( b_has_electric_cherry ) && b_has_electric_cherry && ( isdefined( b_electric_chair ) && !b_electric_chair ) ) { - self maps\mp\zombies\_zm_perk_electric_cherry::electric_cherry_laststand(); + self scripts\zm\replaced\_zm_perk_electric_cherry::electric_cherry_laststand(); } self setclientfieldtoplayer( "clientfield_afterlife_audio", 1 ); diff --git a/scripts/zm/replaced/_zm_perk_electric_cherry.gsc b/scripts/zm/replaced/_zm_perk_electric_cherry.gsc new file mode 100644 index 00000000..9cfa921d --- /dev/null +++ b/scripts/zm/replaced/_zm_perk_electric_cherry.gsc @@ -0,0 +1,42 @@ +#include maps\mp\_utility; +#include common_scripts\utility; +#include maps\mp\zombies\_zm_utility; +#include maps\mp\zombies\_zm_net; +#include maps\mp\zombies\_zm_perks; +#include maps\mp\zombies\_zm_score; +#include maps\mp\animscripts\shared; +#include maps\mp\zombies\_zm_ai_basic; +#include maps\mp\zombies\_zm_perk_electric_cherry; + +electric_cherry_laststand() +{ + visionsetlaststand( "zombie_last_stand", 1 ); + + if ( isdefined( self ) ) + { + playfx( level._effect["electric_cherry_explode"], self.origin ); + self playsound( "zmb_cherry_explode" ); + self notify( "electric_cherry_start" ); + wait 0.05; + a_zombies = get_round_enemy_array(); + a_zombies = get_array_of_closest( self.origin, a_zombies, undefined, undefined, 500 ); + + for ( i = 0; i < a_zombies.size; i++ ) + { + if ( isalive( self ) ) + { + a_zombies[i] thread electric_cherry_death_fx(); + + if ( isdefined( self.cherry_kills ) ) + self.cherry_kills++; + + self maps\mp\zombies\_zm_score::add_to_player_score( 40 ); + + wait 0.1; + a_zombies[i] dodamage( a_zombies[i].health + 1000, self.origin, self, self, "none" ); + } + } + + self notify( "electric_cherry_end" ); + } +} \ No newline at end of file diff --git a/scripts/zm/zm_prison/zm_prison_reimagined.gsc b/scripts/zm/zm_prison/zm_prison_reimagined.gsc index 102452e5..ba1c7232 100644 --- a/scripts/zm/zm_prison/zm_prison_reimagined.gsc +++ b/scripts/zm/zm_prison/zm_prison_reimagined.gsc @@ -87,6 +87,7 @@ init() level.zombie_init_done = ::zombie_init_done; level.special_weapon_magicbox_check = ::check_for_special_weapon_limit_exist; + level.custom_laststand_func = scripts\zm\replaced\_zm_perk_electric_cherry::electric_cherry_laststand; level.zombie_vars["below_world_check"] = -15000; level.zombie_powerups["meat_stink"].model_name = "t6_wpn_zmb_severedhead_world"; diff --git a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc index bb3750c7..4d615c9f 100644 --- a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc +++ b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc @@ -98,6 +98,7 @@ init() level.zombie_init_done = ::zombie_init_done; level.special_weapon_magicbox_check = ::tomb_special_weapon_magicbox_check; level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn; + level.custom_laststand_func = scripts\zm\replaced\_zm_perk_electric_cherry::electric_cherry_laststand; level.zombie_vars["below_world_check"] = -3000;