Skip to content

Commit

Permalink
Added a fail-safe for the player getting stuck in Navarro
Browse files Browse the repository at this point in the history
* if they killed the landing pad guards before boarding the vertibird
during the secret transaction in New Reno.

Added a check for the commander to the surrender dialog option, as
there's no point in taking the player to an empty room.
  • Loading branch information
NovaRain committed Oct 16, 2024
1 parent d8b21dc commit d61d2f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions scripts_src/maps/navarro.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

procedure start;
procedure map_enter_p_proc;
procedure timed_event_p_proc;
procedure map_update_p_proc;

export variable quincy_ptr;
Expand Down Expand Up @@ -68,6 +69,7 @@ procedure map_enter_p_proc begin
if (global_var(GVAR_CAME_ON_VERTIBIRD) == 1) then begin
game_ui_disable;
override_map_start_hex( 19519, 2, 0 );
add_timer_event(self_obj, 5, 0);
end

if ( (map_first_run) and (global_var(GVAR_LOAD_MAP_INDEX) != 10) ) then begin
Expand Down Expand Up @@ -108,6 +110,17 @@ procedure map_enter_p_proc begin
set_global_var(GVAR_LOAD_MAP_INDEX,0);
end

procedure timed_event_p_proc begin
if (fixed_param == 0) then begin
if (guard1_obj == 0 or guard2_obj == 0 or guard3_obj == 0) then begin
ndebug("Vertibird fail-safe for missing guards");
game_ui_enable;
set_global_var(GVAR_CAME_ON_VERTIBIRD, 3);
set_global_var(GVAR_NAVARRO_BASE_ALERT, 1);
end
end
end

procedure map_update_p_proc begin
if ( (map_var(MVAR_Xarn_In_Party) == 1) and (elevation(xarn_ptr) != dude_elevation) ) then begin
levtile:=tile_num_in_direction(dude_tile,random(0,5),1);
Expand Down
4 changes: 3 additions & 1 deletion scripts_src/navarro/ccgrdpa.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ variable i_am_a_warrior:=1;
import variable guard1_obj; //added by killap - expansion
import variable guard2_obj; //added by killap - expansion
import variable guard3_obj; //added by killap - expansion
import variable commander_ptr; //added by killap - expansion

procedure start begin
end
Expand Down Expand Up @@ -356,7 +357,8 @@ end
procedure Node015 begin
Reply(400 + not_alone);
NOption(402,Node998,004);
NOption(403,Node016,004);
if (commander_ptr != 0) then
NOption(403,Node016,004);
end

procedure Node016 begin
Expand Down

0 comments on commit d61d2f5

Please sign in to comment.