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

Ray Gun Mark 2: remove decreased probability

Ray Gun and Ray Gun Mark 2 can be obtained at same time
This commit is contained in:
Jbleezy
2022-01-27 15:50:21 -08:00
parent b50358a8e0
commit 48e4cb7260
7 changed files with 129 additions and 0 deletions

View File

@ -154,6 +154,8 @@
* No longer limited to 4 players
### Ray Gun Mark 2
* Same probability to obtain as other weapons
* Can be obtained if player has Ray Gun
* Limited to 1 player on all maps
### Jet Gun

View File

@ -25,6 +25,7 @@ main()
init()
{
level.special_weapon_magicbox_check = ::buried_special_weapon_magicbox_check;
level._is_player_in_zombie_stink = maps/mp/zombies/_zm_perk_vulture::_is_player_in_zombie_stink;
turn_power_on();
@ -36,6 +37,24 @@ init()
level thread disable_ghost_free_perk_on_damage();
}
buried_special_weapon_magicbox_check(weapon)
{
if ( weapon == "time_bomb_zm" )
{
players = get_players();
i = 0;
while ( i < players.size )
{
if ( is_player_valid( players[ i ], undefined, 1 ) && players[ i ] is_player_tactical_grenade( weapon ) )
{
return 0;
}
i++;
}
}
return 1;
}
turn_power_on()
{
if(!(is_classic() && level.scr_zm_map_start_location == "processing"))

View File

@ -18,9 +18,16 @@ main()
init()
{
level.special_weapon_magicbox_check = ::highrise_special_weapon_magicbox_check;
level thread elevator_solo_revive_fix();
}
highrise_special_weapon_magicbox_check(weapon)
{
return 1;
}
elevator_solo_revive_fix()
{
if (!(is_classic() && level.scr_zm_map_start_location == "rooftop"))

View File

@ -0,0 +1,13 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
init()
{
level.special_weapon_magicbox_check = ::nuked_special_weapon_magicbox_check;
}
nuked_special_weapon_magicbox_check(weapon)
{
return 1;
}

View File

@ -1,6 +1,7 @@
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\zombies\_zm_utility;
#include maps/mp/zm_alcatraz_utility;
#include scripts/zm/replaced/zm_alcatraz_classic;
#include scripts/zm/replaced/_zm_afterlife;
@ -17,6 +18,7 @@ main()
init()
{
level.special_weapon_magicbox_check = ::check_for_special_weapon_limit_exist;
level.round_prestart_func = scripts/zm/replaced/_zm_afterlife::afterlife_start_zombie_logic;
remove_acid_trap_player_spawn();
@ -29,6 +31,62 @@ init()
level thread plane_auto_refuel();
}
check_for_special_weapon_limit_exist(weapon)
{
if ( weapon != "blundergat_zm" && weapon != "minigun_alcatraz_zm" )
{
return 1;
}
players = get_players();
count = 0;
if ( weapon == "blundergat_zm" )
{
if ( self maps/mp/zombies/_zm_weapons::has_weapon_or_upgrade( "blundersplat_zm" ) )
{
return 0;
}
if ( self afterlife_weapon_limit_check( "blundergat_zm" ) )
{
return 0;
}
limit = level.limited_weapons[ "blundergat_zm" ];
}
else
{
if ( self afterlife_weapon_limit_check( "minigun_alcatraz_zm" ) )
{
return 0;
}
limit = level.limited_weapons[ "minigun_alcatraz_zm" ];
}
i = 0;
while ( i < players.size )
{
if ( weapon == "blundergat_zm" )
{
if ( players[ i ] maps/mp/zombies/_zm_weapons::has_weapon_or_upgrade( "blundersplat_zm" ) || isDefined( players[ i ].is_pack_splatting ) && players[ i ].is_pack_splatting )
{
count++;
i++;
continue;
}
}
else
{
if ( players[ i ] afterlife_weapon_limit_check( weapon ) )
{
count++;
}
}
i++;
}
if ( count >= limit )
{
return 0;
}
return 1;
}
remove_acid_trap_player_spawn()
{
spawn_points = maps/mp/gametypes_zm/_zm_gametype::get_player_spawns_for_gametype();

View File

@ -15,6 +15,7 @@ main()
init()
{
level.map_on_player_connect = ::on_player_connect;
level.special_weapon_magicbox_check = ::tomb_special_weapon_magicbox_check;
level.custom_magic_box_timer_til_despawn = ::custom_magic_box_timer_til_despawn;
challenges_changes();
@ -30,6 +31,29 @@ on_player_connect()
self thread give_shovel();
}
tomb_special_weapon_magicbox_check(weapon)
{
if ( weapon == "beacon_zm" )
{
if ( isDefined( self.beacon_ready ) && self.beacon_ready )
{
return 1;
}
else
{
return 0;
}
}
if ( isDefined( level.zombie_weapons[ weapon ].shared_ammo_weapon ) )
{
if ( self has_weapon_or_upgrade( level.zombie_weapons[ weapon ].shared_ammo_weapon ) )
{
return 0;
}
}
return 1;
}
increase_solo_door_prices()
{
if(!(is_classic() && level.scr_zm_map_start_location == "tomb"))

View File

@ -36,6 +36,7 @@ main()
init()
{
level.special_weapon_magicbox_check = ::transit_special_weapon_magicbox_check;
level.grenade_safe_to_bounce = ::grenade_safe_to_bounce;
screecher_spawner_changes();
@ -79,6 +80,11 @@ include_weapons_grief()
maps/mp/zombies/_zm_weapons::add_limited_weapon( "raygun_mark2_upgraded_zm", 1 );
}
transit_special_weapon_magicbox_check(weapon)
{
return 1;
}
screecher_spawner_changes()
{
level.screecher_spawners = getentarray( "screecher_zombie_spawner", "script_noteworthy" );