diff --git a/scripts/zm/replaced/_zm_ai_mechz.gsc b/scripts/zm/replaced/_zm_ai_mechz.gsc index 372aa072..4432d7eb 100644 --- a/scripts/zm/replaced/_zm_ai_mechz.gsc +++ b/scripts/zm/replaced/_zm_ai_mechz.gsc @@ -198,4 +198,84 @@ mechz_damage_override( inflictor, attacker, damage, flags, meansofdeath, weapon, } return final_damage; +} + +mechz_round_tracker() +{ + maps\mp\zombies\_zm_ai_mechz_ffotd::mechz_round_tracker_start(); + level.num_mechz_spawned = 0; + old_spawn_func = level.round_spawn_func; + old_wait_func = level.round_wait_func; + + while ( !isdefined( level.zombie_mechz_locations ) ) + wait 0.05; + + flag_wait( "activate_zone_nml" ); + mech_start_round_num = 8; + + if ( isdefined( level.is_forever_solo_game ) && level.is_forever_solo_game ) + mech_start_round_num = 8; + + while ( level.round_number < mech_start_round_num ) + level waittill( "between_round_over" ); + + level.next_mechz_round = level.round_number; + level thread debug_print_mechz_round(); + + while ( true ) + { + maps\mp\zombies\_zm_ai_mechz_ffotd::mechz_round_tracker_loop_start(); + + if ( level.num_mechz_spawned > 0 ) + level.mechz_should_drop_powerup = 1; + + if ( level.next_mechz_round <= level.round_number ) + { + a_zombies = getaispeciesarray( level.zombie_team, "all" ); + + foreach ( zombie in a_zombies ) + { + if ( isdefined( zombie.is_mechz ) && zombie.is_mechz && isalive( zombie ) ) + { + level.next_mechz_round++; + break; + } + } + } + + if ( level.mechz_left_to_spawn == 0 && level.next_mechz_round <= level.round_number ) + { + mechz_health_increases(); + + if ( get_players().size == 1 ) + level.mechz_zombie_per_round = 1; + else if ( level.mechz_round_count < 2 ) + level.mechz_zombie_per_round = 1; + else if ( level.mechz_round_count < 5 ) + level.mechz_zombie_per_round = 2; + else + level.mechz_zombie_per_round = 3; + + level.mechz_left_to_spawn = level.mechz_zombie_per_round; + mechz_spawning = level.mechz_left_to_spawn; + wait( randomfloatrange( 10.0, 15.0 ) ); + level notify( "spawn_mechz" ); + + if ( isdefined( level.is_forever_solo_game ) && level.is_forever_solo_game ) + n_round_gap = randomintrange( level.mechz_min_round_fq_solo, level.mechz_max_round_fq_solo ); + else + n_round_gap = randomintrange( level.mechz_min_round_fq, level.mechz_max_round_fq ); + + level.next_mechz_round = level.round_number + n_round_gap; + level.mechz_round_count++; + level thread debug_print_mechz_round(); + level.num_mechz_spawned += mechz_spawning; + } + + maps\mp\zombies\_zm_ai_mechz_ffotd::mechz_round_tracker_loop_end(); + + level waittill( "between_round_over" ); + + mechz_clear_spawns(); + } } \ No newline at end of file diff --git a/scripts/zm/replaced/zm_alcatraz_utility.gsc b/scripts/zm/replaced/zm_alcatraz_utility.gsc index d553a807..890086b4 100644 --- a/scripts/zm/replaced/zm_alcatraz_utility.gsc +++ b/scripts/zm/replaced/zm_alcatraz_utility.gsc @@ -115,4 +115,9 @@ blundergat_change_hintstring( hint_string, hint_string_cost ) { self sethintstring( hint_string ); } +} + +check_solo_status() +{ + level.is_forever_solo_game = 0; } \ No newline at end of file diff --git a/scripts/zm/replaced/zm_tomb_utility.gsc b/scripts/zm/replaced/zm_tomb_utility.gsc index ea4afd75..ed96062d 100644 --- a/scripts/zm/replaced/zm_tomb_utility.gsc +++ b/scripts/zm/replaced/zm_tomb_utility.gsc @@ -124,4 +124,9 @@ get_punch_element_from_index(ind) } return "upgraded"; +} + +check_solo_status() +{ + level.is_forever_solo_game = 0; } \ 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 9b4caac4..564fa06a 100644 --- a/scripts/zm/zm_prison/zm_prison_reimagined.gsc +++ b/scripts/zm/zm_prison/zm_prison_reimagined.gsc @@ -30,6 +30,7 @@ main() replaceFunc(maps\mp\zm_alcatraz_craftables::include_craftables, scripts\zm\replaced\zm_alcatraz_craftables::include_craftables); replaceFunc(maps\mp\zm_alcatraz_gamemodes::init, scripts\zm\replaced\zm_alcatraz_gamemodes::init); replaceFunc(maps\mp\zm_alcatraz_utility::blundergat_upgrade_station, scripts\zm\replaced\zm_alcatraz_utility::blundergat_upgrade_station); + replaceFunc(maps\mp\zm_alcatraz_utility::check_solo_status, scripts\zm\replaced\zm_alcatraz_utility::check_solo_status); replaceFunc(maps\mp\zm_alcatraz_sq::track_quest_status_thread, scripts\zm\replaced\zm_alcatraz_sq::track_quest_status_thread); replaceFunc(maps\mp\zm_alcatraz_sq::plane_boarding_thread, scripts\zm\replaced\zm_alcatraz_sq::plane_boarding_thread); replaceFunc(maps\mp\zm_alcatraz_sq::plane_flight_thread, scripts\zm\replaced\zm_alcatraz_sq::plane_flight_thread); diff --git a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc index dd7e8483..81025ec8 100644 --- a/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc +++ b/scripts/zm/zm_tomb/zm_tomb_reimagined.gsc @@ -64,7 +64,9 @@ main() replaceFunc(maps\mp\zm_tomb_tank::wait_for_tank_cooldown, scripts\zm\replaced\zm_tomb_tank::wait_for_tank_cooldown); replaceFunc(maps\mp\zm_tomb_teleporter::teleporter_init, scripts\zm\replaced\zm_tomb_teleporter::teleporter_init); replaceFunc(maps\mp\zm_tomb_utility::update_staff_accessories, scripts\zm\replaced\zm_tomb_utility::update_staff_accessories); + replaceFunc(maps\mp\zm_tomb_utility::check_solo_status, scripts\zm\replaced\zm_tomb_utility::check_solo_status); replaceFunc(maps\mp\zombies\_zm_ai_mechz::mechz_set_starting_health, scripts\zm\replaced\_zm_ai_mechz::mechz_set_starting_health); + replaceFunc(maps\mp\zombies\_zm_ai_mechz::mechz_round_tracker, scripts\zm\replaced\_zm_ai_mechz::mechz_round_tracker); replaceFunc(maps\mp\zombies\_zm_craftables::choose_open_craftable, scripts\zm\replaced\_zm_craftables::choose_open_craftable); replaceFunc(maps\mp\zombies\_zm_powerup_zombie_blood::zombie_blood_powerup, scripts\zm\replaced\_zm_powerup_zombie_blood::zombie_blood_powerup); replaceFunc(maps\mp\zombies\_zm_riotshield_tomb::doriotshielddeploy, scripts\zm\replaced\_zm_riotshield_tomb::doriotshielddeploy); @@ -88,7 +90,6 @@ init() change_stargate_teleport_return_player_angles(); - level thread increase_solo_door_prices(); level thread zombie_blood_dig_changes(); level thread updatecraftables(); } @@ -150,24 +151,6 @@ change_stargate_teleport_return_player_angles() } } -increase_solo_door_prices() -{ - if(!(is_classic() && level.scr_zm_map_start_location == "tomb")) - { - return; - } - - flag_wait( "initial_blackscreen_passed" ); - - if ( isDefined( level.is_forever_solo_game ) && level.is_forever_solo_game ) - { - a_door_buys = getentarray( "zombie_door", "targetname" ); - array_thread( a_door_buys, ::door_price_increase_for_solo ); - a_debris_buys = getentarray( "zombie_debris", "targetname" ); - array_thread( a_debris_buys, ::door_price_increase_for_solo ); - } -} - door_price_increase_for_solo() { self.zombie_cost += 250;