1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 07:08:06 -05:00

Denizen: change player melee damage properly

This commit is contained in:
Jbleezy
2023-03-27 23:26:56 -07:00
parent 84eb491bc2
commit e7fe73e215
3 changed files with 47 additions and 15 deletions

View File

@ -78,9 +78,9 @@
### Denizens
* Decreased maximum amount that can be spawned at once from 2 to 1
* Decreased minimum number of melees to kill from 5 to 3
* Decreased minimum number of melees to kill with Bowie Knife from 3 to 2
* Decreased minimum number of melees to kill with Galvaknuckles from 2 to 1
* Decreased number of melees to kill from 5 to 3
* Decreased number of melees to kill with Bowie Knife from 3 to 2
* Decreased number of melees to kill with Galvaknuckles from 2 to 1
* No longer automatically runs away when player is first attacked in solo
* Removed hint when player is first attacked in solo

View File

@ -10,6 +10,49 @@
#include maps\mp\zombies\_zm_audio;
#include maps\mp\zombies\_zm_stats;
screecher_melee_damage( player )
{
melee_score = 0;
if ( player hasweapon( "tazer_knuckles_zm" ) )
{
melee_score = 30;
}
else if ( player hasweapon( "bowie_knife_zm" ) )
{
melee_score = 15;
}
else
{
melee_score = 10;
}
if ( self.screecher_score > 0 )
{
if ( melee_score > self.screecher_score )
{
self.screecher_score = 0;
}
else
{
self.screecher_score -= melee_score;
}
}
if ( self.screecher_score <= 0 )
{
self.player_score += melee_score;
}
self playsound( "zmb_vocals_screecher_pain" );
if ( level.zombie_vars[player.team]["zombie_insta_kill"] )
self.player_score = 30;
else
player thread do_player_general_vox( "general", "screecher_cut" );
self screecher_check_score();
}
screecher_detach( player )
{
self endon( "death" );

View File

@ -23,6 +23,7 @@ main()
replaceFunc(maps\mp\zm_transit_utility::solo_tombstone_removal, scripts\zm\replaced\zm_transit_utility::solo_tombstone_removal);
replaceFunc(maps\mp\zm_transit_bus::bussetup, scripts\zm\replaced\zm_transit_bus::bussetup);
replaceFunc(maps\mp\zm_transit_bus::busscheduleadd, scripts\zm\replaced\zm_transit_bus::busscheduleadd);
replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_melee_damage, scripts\zm\replaced\_zm_ai_screecher::screecher_melee_damage);
replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_detach, scripts\zm\replaced\_zm_ai_screecher::screecher_detach);
replaceFunc(maps\mp\zombies\_zm_ai_screecher::screecher_cleanup, scripts\zm\replaced\_zm_ai_screecher::screecher_cleanup);
replaceFunc(maps\mp\zombies\_zm_riotshield::doriotshielddeploy, scripts\zm\replaced\_zm_riotshield::doriotshielddeploy);
@ -57,7 +58,6 @@ init()
level.grenade_safe_to_bounce = ::grenade_safe_to_bounce;
level.object_touching_lava = maps\mp\zm_transit_lava::object_touching_lava;
screecher_spawner_changes();
zombie_spawn_location_changes();
cornfield_add_collision();
cornfield_spawn_path_nodes();
@ -111,17 +111,6 @@ transit_special_weapon_magicbox_check(weapon)
return 1;
}
screecher_spawner_changes()
{
level.screecher_spawners = getentarray( "screecher_zombie_spawner", "script_noteworthy" );
array_thread( level.screecher_spawners, ::add_spawn_function, ::screecher_prespawn_decrease_health );
}
screecher_prespawn_decrease_health()
{
self.player_score = 12;
}
electric_door_changes()
{
if( is_classic() && level.scr_zm_map_start_location == "transit" )