1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-07-03 02:20:07 -05:00

All quests give players all perks on completion

This commit is contained in:
Jbleezy
2023-04-07 09:56:26 -07:00
parent bcae68088f
commit 539e15d7f5
8 changed files with 77 additions and 25 deletions

View File

@ -469,6 +469,7 @@
## Maps ## Maps
* All quests can be completed with any amount of players * All quests can be completed with any amount of players
* All quests give players all perks on completion
### Tranzit ### Tranzit
* Any door that requires a Turbine to open is automatically open whenever the power is on * Any door that requires a Turbine to open is automatically open whenever the power is on
@ -488,7 +489,6 @@
* Zombies spawn in the Warehouse zone when in the Outside Power Station zone before the Warehouse door is opened * Zombies spawn in the Warehouse zone when in the Outside Power Station zone before the Warehouse door is opened
* Zombies spawn in the Outside Power Station zone when in the Fog After Power Station zone * Zombies spawn in the Outside Power Station zone when in the Fog After Power Station zone
* Zombies spawn in the Warehouse zone when in the Fog After Power Station zone * Zombies spawn in the Warehouse zone when in the Fog After Power Station zone
* Quest: players gain all perks on completion
* Quest (Maxis): Avogadro step only requires 1 Turbine under the pylon * Quest (Maxis): Avogadro step only requires 1 Turbine under the pylon
* Quest (Maxis): Turbine can get destroyed by the EMP during the Avogadro step and it will still count as completed * Quest (Maxis): Turbine can get destroyed by the EMP during the Avogadro step and it will still count as completed
* Quest (Maxis): lamp posts step requires all 8 lamp posts to get powered by a Turbine * Quest (Maxis): lamp posts step requires all 8 lamp posts to get powered by a Turbine
@ -609,6 +609,7 @@
* Added buildable table hint strings on buildable purchase * Added buildable table hint strings on buildable purchase
* Quest: all 5 signs must be meleed for wisp to spawn * Quest: all 5 signs must be meleed for wisp to spawn
* Quest: changed number of targets that need to be hit to 20 multiplied by the amount of player * Quest: changed number of targets that need to be hit to 20 multiplied by the amount of player
* Quest: perks given on completion are no longer permament
* Quest: completion button always activatable after completing the quest * Quest: completion button always activatable after completing the quest
* Quest (Maxis): no longer need to activate the Time Bomb to be able to spawn the 2nd wisp * Quest (Maxis): no longer need to activate the Time Bomb to be able to spawn the 2nd wisp
* Quest (Maxis): no longer need to activate the lever in the Mansion before activating the bells * Quest (Maxis): no longer need to activate the lever in the Mansion before activating the bells

View File

@ -41,3 +41,29 @@ navcomputer_waitfor_navcard()
} }
} }
} }
sq_give_player_all_perks()
{
machines = array_randomize( getentarray( "zombie_vending", "targetname" ) );
perks = [];
for ( i = 0; i < machines.size; i++ )
{
if ( machines[i].script_noteworthy == "specialty_weapupgrade" )
continue;
perks[perks.size] = machines[i].script_noteworthy;
}
foreach ( perk in perks )
{
if ( isdefined( self.perk_purchased ) && self.perk_purchased == perk )
continue;
if ( self hasperk( perk ) || self maps\mp\zombies\_zm_perks::has_perk_paused( perk ) )
continue;
self maps\mp\zombies\_zm_perks::give_perk( perk, 0 );
wait 0.25;
}
}

View File

@ -117,3 +117,21 @@ richtofen_zombie_deathfunction_override()
return self [[ self.deathfunction_old ]](); return self [[ self.deathfunction_old ]]();
} }
sq_give_player_rewards()
{
players = get_players();
foreach ( player in players )
{
if ( is_player_valid( player ) )
{
player thread scripts\zm\replaced\_zm_sq::sq_give_player_all_perks();
}
}
}
mule_kick_allows_4_weapons()
{
level.additionalprimaryweapon_limit = 4;
}

View File

@ -187,6 +187,8 @@ sq_give_all_perks()
sq_give_player_perks( perks, v_fireball_start_loc, n_fireball_exploder ) sq_give_player_perks( perks, v_fireball_start_loc, n_fireball_exploder )
{ {
self endon("disconnect");
exploder( n_fireball_exploder ); exploder( n_fireball_exploder );
m_fireball = spawn( "script_model", v_fireball_start_loc ); m_fireball = spawn( "script_model", v_fireball_start_loc );
m_fireball setmodel( "tag_origin" ); m_fireball setmodel( "tag_origin" );
@ -208,15 +210,8 @@ sq_give_player_perks( perks, v_fireball_start_loc, n_fireball_exploder )
m_fireball delete(); m_fireball delete();
level notify( "sq_fireball_hit_player" ); level notify( "sq_fireball_hit_player" );
foreach ( perk in perks ) if ( is_player_valid( self ) )
{ {
if ( isdefined( self.perk_purchased ) && self.perk_purchased == perk ) self thread scripts\zm\replaced\_zm_sq::sq_give_player_all_perks();
continue;
if ( self hasperk( perk ) || self maps\mp\zombies\_zm_perks::has_perk_paused( perk ) )
continue;
self maps\mp\zombies\_zm_perks::give_perk( perk, 0 );
wait 0.25;
} }
} }

View File

@ -75,6 +75,16 @@ stage_two()
t_plane_fly_afterlife = getent( "plane_fly_afterlife_trigger", "script_noteworthy" ); t_plane_fly_afterlife = getent( "plane_fly_afterlife_trigger", "script_noteworthy" );
t_plane_fly_afterlife playsound( "zmb_easteregg_laugh" ); t_plane_fly_afterlife playsound( "zmb_easteregg_laugh" );
t_plane_fly_afterlife trigger_on(); t_plane_fly_afterlife trigger_on();
players = get_players();
foreach ( player in players )
{
if ( is_player_valid( player ) )
{
player thread scripts\zm\replaced\_zm_sq::sq_give_player_all_perks();
}
}
} }
final_flight_trigger() final_flight_trigger()

View File

@ -52,6 +52,15 @@ stage_logic()
wait 1; wait 1;
level thread ee_samantha_say( "vox_sam_all_staff_freedom_0" ); level thread ee_samantha_say( "vox_sam_all_staff_freedom_0" );
players = get_players();
foreach ( player in players )
{
if ( is_player_valid( player ) )
{
player thread scripts\zm\replaced\_zm_sq::sq_give_player_all_perks();
}
}
t_portal = tomb_spawn_trigger_radius( s_pos.origin, 100, 1 ); t_portal = tomb_spawn_trigger_radius( s_pos.origin, 100, 1 );
t_portal.hint_string = &"ZM_TOMB_TELE"; t_portal.hint_string = &"ZM_TOMB_TELE";
t_portal thread waittill_player_activates(); t_portal thread waittill_player_activates();

View File

@ -277,23 +277,14 @@ set_screecher_zone_origin_and_notify( script_noteworthy, notify_str )
droppowerup( story ) droppowerup( story )
{ {
vending_triggers = getentarray( "zombie_vending", "targetname" );
perks = [];
for ( i = 0; i < vending_triggers.size; i++ )
{
perk = vending_triggers[i].script_noteworthy;
if ( perk == "specialty_weapupgrade" )
continue;
perks[perks.size] = perk;
}
players = get_players(); players = get_players();
foreach ( player in players ) foreach ( player in players )
{ {
player thread sq_give_player_perks( perks ); if ( is_player_valid( player ) )
{
player thread scripts\zm\replaced\_zm_sq::sq_give_player_all_perks();
}
} }
center_struct = getstruct( "sq_common_tower_fx", "targetname" ); center_struct = getstruct( "sq_common_tower_fx", "targetname" );

View File

@ -34,6 +34,8 @@ main()
replaceFunc(maps\mp\zm_buried_fountain::transport_player_to_start_zone, scripts\zm\replaced\zm_buried_fountain::transport_player_to_start_zone); replaceFunc(maps\mp\zm_buried_fountain::transport_player_to_start_zone, scripts\zm\replaced\zm_buried_fountain::transport_player_to_start_zone);
replaceFunc(maps\mp\zm_buried_sq::sq_metagame, scripts\zm\replaced\zm_buried_sq::sq_metagame); replaceFunc(maps\mp\zm_buried_sq::sq_metagame, scripts\zm\replaced\zm_buried_sq::sq_metagame);
replaceFunc(maps\mp\zm_buried_sq::make_richtofen_zombie, scripts\zm\replaced\zm_buried_sq::make_richtofen_zombie); replaceFunc(maps\mp\zm_buried_sq::make_richtofen_zombie, scripts\zm\replaced\zm_buried_sq::make_richtofen_zombie);
replaceFunc(maps\mp\zm_buried_sq::sq_give_player_rewards, scripts\zm\replaced\zm_buried_sq::sq_give_player_rewards);
replaceFunc(maps\mp\zm_buried_sq::mule_kick_allows_4_weapons, scripts\zm\replaced\zm_buried_sq::mule_kick_allows_4_weapons);
replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_gallows, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_gallows); replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_gallows, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_gallows);
replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_guillotine, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_guillotine); replaceFunc(maps\mp\zm_buried_sq_bt::stage_vo_watch_guillotine, scripts\zm\replaced\zm_buried_sq_bt::stage_vo_watch_guillotine);
replaceFunc(maps\mp\zm_buried_sq_ts::ts_sign_damage_watch, scripts\zm\replaced\zm_buried_sq_ts::ts_sign_damage_watch); replaceFunc(maps\mp\zm_buried_sq_ts::ts_sign_damage_watch, scripts\zm\replaced\zm_buried_sq_ts::ts_sign_damage_watch);