diff --git a/README.md b/README.md index 3a760b10..417d40a6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/zm/zm_buried/zm_buried_reimagined.gsc b/scripts/zm/zm_buried/zm_buried_reimagined.gsc index e39cc2f7..2628ffbb 100644 --- a/scripts/zm/zm_buried/zm_buried_reimagined.gsc +++ b/scripts/zm/zm_buried/zm_buried_reimagined.gsc @@ -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")) diff --git a/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc b/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc index 59c37e30..cde78fcd 100644 --- a/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc +++ b/scripts/zm/zm_highrise/zm_highrise_reimagined.gsc @@ -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")) diff --git a/scripts/zm/zm_nuked/zm_nuked_reimagined.gsc b/scripts/zm/zm_nuked/zm_nuked_reimagined.gsc new file mode 100644 index 00000000..58a41b60 --- /dev/null +++ b/scripts/zm/zm_nuked/zm_nuked_reimagined.gsc @@ -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; +} \ 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 3c6a3dcc..65746183 100644 --- a/scripts/zm/zm_prison/zm_prison_reimagined.gsc +++ b/scripts/zm/zm_prison/zm_prison_reimagined.gsc @@ -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(); diff --git a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc index 9081cc69..acfaab49 100644 --- a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc +++ b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc @@ -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")) diff --git a/scripts/zm/zm_transit/zm_transit_reimagined.gsc b/scripts/zm/zm_transit/zm_transit_reimagined.gsc index 0838e463..dfe17aa3 100644 --- a/scripts/zm/zm_transit/zm_transit_reimagined.gsc +++ b/scripts/zm/zm_transit/zm_transit_reimagined.gsc @@ -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" );