Rename all commands containing the word 'group'

This commit is contained in:
Ryan Dwyer 2019-09-23 21:19:59 +10:00
parent 7a1863c3ef
commit 30e98a1629
50 changed files with 346 additions and 345 deletions

View File

@ -32154,7 +32154,7 @@ u8 func0007_alerted[] = {
unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1)
unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1)
say_quip(CHR_JOANNA, 0x04, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) // "Go to plan B","Get the hell out of here!","Retreat!"
try_target_chr_in_same_group(/*goto*/ 0x95)
try_set_target_chr_to_teammate(/*goto*/ 0x95)
if_self_flag_bankx_eq(CHRFLAG1_00000002, TRUE, BANK_1, /*goto*/ 0x16)
label(0x16)
if_self_flag_bankx_eq(CHRFLAG0_00200000, TRUE, BANK_0, /*goto*/ 0x16)
@ -32465,7 +32465,7 @@ u8 func000b_choose_target_chr[] = {
dprint 'S','C','A','N','\n',0,
if_self_flag_bankx_eq(CHRFLAG0_NOHEAR, TRUE, BANK_0, /*goto*/ 0x13)
cmd0127_try_find_chr_in_group(/*goto*/ 0x16)
try_find_chr_in_team(/*goto*/ 0x16)
goto_next(0x04)
// No hear - only see
@ -32489,7 +32489,7 @@ u8 func000b_choose_target_chr[] = {
dprint 'F','O','U','N','D','A','L','E','R','T','\n',0,
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x13)
if_self_flag_bankx_eq(CHRFLAG0_NOHEAR, TRUE, BANK_0, /*goto*/ 0x16)
cmd0127_try_find_chr_in_group(/*goto*/ 0x13)
try_find_chr_in_team(/*goto*/ 0x13)
label(0x16)
goto_first(0xd3)
@ -33307,8 +33307,8 @@ u8 func0016_show_objective_failed_msg[] = {
};
u8 func0017_rebuild_groups[] = {
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -34265,8 +34265,8 @@ u8 func0012_init_coop_100[] = {
set_alertness(100)
set_follow_chr(CHR_JOANNA)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
yield
yield
@ -34285,8 +34285,8 @@ u8 func0012_init_coop_100[] = {
endloop(0x03)
label(0x16)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_target_chr(-1)
// Set stage flag 00000080 for Air Force One and Skedar Ruins
@ -34357,8 +34357,8 @@ u8 func0013_init_coop_200[] = {
endloop(0x03)
label(0x16)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_chr_cloaked(CHR_SELF, FALSE, TRUE)
// Wait 2 seconds
@ -34515,7 +34515,7 @@ u8 func0014_coop_buddy[] = {
// Not G5 Building or Deep Sea
label(0x15)
cmd0127_try_find_chr_in_group(/*goto*/ 0x0b)
try_find_chr_in_team(/*goto*/ 0x0b)
// All stages
label(0x13)
@ -34836,8 +34836,8 @@ u8 func0026_init_psychosis[] = {
set_alertness(100)
set_follow_chr(CHR_JOANNA)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
yield
yield
@ -34856,8 +34856,8 @@ u8 func0026_init_psychosis[] = {
// Become ally
label(0x16)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
label(0x16)
set_target_chr(-1)
@ -34893,7 +34893,7 @@ u8 func0027_psychosised[] = {
// Healthy
label(0x16)
cmd0127_try_find_chr_in_group(/*goto*/ 0x03)
try_find_chr_in_team(/*goto*/ 0x03)
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x03)
set_target_chr(FOLLOW_CHR)
if_chr_distance_lt(200, /*goto*/ 0x16)
@ -34935,7 +34935,7 @@ u8 func0027_psychosised[] = {
label(0x06)
set_chr_flag_bank2(CHR_SELF, CHRFLAG2_DISGUISED)
label(0x07)
cmd0127_try_find_chr_in_group(/*goto*/ 0x03)
try_find_chr_in_team(/*goto*/ 0x03)
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x03)
set_target_chr(FOLLOW_CHR)
if_chr_distance_gt(300, /*goto*/ 0x16)

View File

@ -1087,10 +1087,10 @@
chr, \
label,
// Tries to find an chr in the group who meets certain criteria. For each
// chr, a score is calculated based on several fchrs, such as whether
// they've been shot. If any chr in the group has a score lower than the given
// value, the condition passes.
// Tries to find an chr in the team who meets certain criteria. For each chr, a
// score is calculated based on several factors, such as whether they've been
// shot. If any chr in the team has a score lower than the given value, the
// condition passes.
#define if_retreat_risk_lt(value, label) \
mkshort(0x0120), \
value, \
@ -1119,10 +1119,9 @@
mkshort(0x0126), \
label,
// Tries to find an chr in the group who meets some criteria, the stores them
// in the current chr's struct at 0x17e.
// globals.s only
#define cmd0127_try_find_chr_in_group(label) \
// Tries to find a chr in the team who meets some criteria and sets them as the
// current chr's target. This is different to the target chr.
#define try_find_chr_in_team(label) \
mkshort(0x0127), \
label,
@ -1230,7 +1229,7 @@
u1, \
bool,
#define try_target_chr_in_same_group(label) \
#define try_set_target_chr_to_teammate(label) \
mkshort(0x013a), \
0x00, \
0x00, \
@ -1277,21 +1276,23 @@
#define cmd0143 \
mkshort(0x0143),
#define cmd0145_rebuild_groups \
// Rebuild an array of teams containing chr IDs in that team
#define rebuild_teams \
mkshort(0x0145),
#define cmd0146_rebuild_groups \
// Rebuild an array of squadrons containing chr IDs in that squadron
#define rebuild_squadrons \
mkshort(0x0146),
#define if_all_chrs_in_group_are_dead(group, label) \
#define if_all_chrs_in_squadron_are_dead(squadron, label) \
mkshort(0x0147), \
group, \
squadron, \
label,
#define if_num_chrs_in_group_gt(value, group, label) \
#define if_num_chrs_in_squadron_gt(value, squadron, label) \
mkshort(0x0152), \
value, \
group, \
squadron, \
label,
#define set_tinted_glass_enabled(bool) \

View File

@ -135,8 +135,8 @@ u8 func1001_start_lift[] = {
u8 func1000_1b30[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -127,8 +127,8 @@ u8 func1001_start_lift[] = {
u8 func1000_14e0[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -124,8 +124,8 @@ u8 func1001_13d4[] = {
u8 func1000_13e0[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -123,8 +123,8 @@ u8 unregistered_func1[] = {
u8 func1000_1898[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -152,8 +152,8 @@ u8 func1001_start_lifts[] = {
u8 func1000_21d4[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -126,8 +126,8 @@ u8 func1001_start_lifts[] = {
u8 func1000_1680[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -136,8 +136,8 @@ struct aipaths paths[] = {
u8 func1000_26fc[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -195,8 +195,8 @@ u8 func1001_start_lifts[] = {
u8 func1000_3cc8[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -109,8 +109,8 @@ struct aipaths paths[] = {
u8 func1000_1368[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 unregistered_func1[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -147,8 +147,8 @@ u8 func1001_start_lift[] = {
u8 func1000_2400[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -34,8 +34,8 @@ struct aipaths paths[] = {
u8 unregistered_func1[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -41,8 +41,8 @@ u8 func1001_0038[] = {
u8 func1000_0044[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 func1000_0038[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 func1000_0038[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -42,8 +42,8 @@ u8 unregistered_func1[] = {
u8 unregistered_func2[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 func1000_0038[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -144,8 +144,8 @@ u8 func1001_27e0[] = {
u8 func1000_27ec[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -118,8 +118,8 @@ u8 func1001_1590[] = {
u8 func1000_159c[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -128,8 +128,8 @@ u8 func1001_1dc0[] = {
u8 func1000_1dcc[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -34,8 +34,8 @@ struct aipaths paths[] = {
u8 unregistered_func1[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 func1000_0038[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -35,8 +35,8 @@ struct aipaths paths[] = {
u8 func1000_0038[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -123,8 +123,8 @@ struct aipaths paths[] = {
u8 func1000_1cf8[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -132,8 +132,8 @@ u8 unregistered_func1[] = {
u8 func1000_1c08[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -130,8 +130,8 @@ u8 unregistered_func1[] = {
u8 func1000_1598[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -40,8 +40,8 @@ u8 unregistered_func1[] = {
u8 unregistered_func2[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -1734,7 +1734,7 @@ u8 func0414_programmer[] = {
label(0xa1)
restart_timer
set_stage_flag(STAGEFLAG_PROGRAMMER_RAN_TO_GUARD)
try_target_chr_in_same_group(/*goto*/ LABEL_RUN_TO_GUARD)
try_set_target_chr_to_teammate(/*goto*/ LABEL_RUN_TO_GUARD)
unset_object_flag_bank1(OBJ_LAPTOPGUNDOOR, OBJECTFLAG1_20000000)
jog_to_pad(0x0086)
@ -1960,8 +1960,8 @@ u8 func0413_c318[] = {
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(255)
set_self_flag_bank3(CHRFLAG3_00000200)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_UNALERTED_0001)
endfunction
};
@ -3746,7 +3746,7 @@ u8 func042f_surrendering_guard[] = {
endloop(0x08)
label(0x2c)
try_target_chr_in_same_group(/*goto*/ 0x54)
try_set_target_chr_to_teammate(/*goto*/ 0x54)
goto_next(0x55)
label(0x54)

View File

@ -1647,8 +1647,8 @@ u8 func0409_tech_conversation[] = {
set_chr_team(CHR_TECH1, TEAM_ENEMY)
set_chr_team(CHR_TECH2, TEAM_ENEMY)
set_chr_team(CHR_RLSHOCK, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
unset_chr_flag_bank3(CHR_TECH1, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
unset_chr_flag_bank3(CHR_TECH2, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
unset_chr_flag_bank3(CHR_RLSHOCK, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)

View File

@ -923,7 +923,7 @@ u8 unregistered_function1[] = {
if_timer_lt(1800, /*goto*/ 0x98)
label(0x31)
dprint 'S','Q','U','A','D','\n',0,
if_num_chrs_in_group_gt(1, 0x0f, /*goto*/ 0x98)
if_num_chrs_in_squadron_gt(1, 0x0f, /*goto*/ 0x98)
call_rng
if_rand_gt(64, /*goto*/ 0x69)
if_rand_gt(128, /*goto*/ 0x6a)
@ -933,8 +933,8 @@ u8 unregistered_function1[] = {
label(0x68)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
goto_first(0x66)
endfunction
@ -953,8 +953,8 @@ u8 func0415_unused[] = {
set_chr_team(CHR_SELF, TEAM_ENEMY)
set_self_flag_bankx(CHRFLAG0_00002000, BANK_0)
set_squadron(SQUADRON_0F)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER)
endfunction
};
@ -978,7 +978,7 @@ u8 func100c_spawn_dd_guards[] = {
if_timer_lt(3600, /*goto*/ 0x98)
label(0x31)
dprint 'S','Q','U','A','D','\n',0,
if_num_chrs_in_group_gt(1, 0x0e, /*goto*/ 0x98)
if_num_chrs_in_squadron_gt(1, 0x0e, /*goto*/ 0x98)
call_rng
if_rand_gt(64, /*goto*/ 0x69)
if_rand_gt(128, /*goto*/ 0x6a)
@ -1015,8 +1015,8 @@ u8 func100c_spawn_dd_guards[] = {
label(0x68)
if_stage_flag_eq(STAGEFLAG_OUTRO_STARTED, TRUE, /*goto*/ 0x0f)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
goto_first(0x66)
label(0x0f)
@ -1038,8 +1038,8 @@ u8 func0416_spawned_guard[] = {
set_self_flag_bankx(CHRFLAG0_00002000, BANK_0)
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_squadron(SQUADRON_0E)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// Pad is next to UFO
run_to_pad(0x0105)
set_return_function(CHR_SELF, GFUNC_UNALERTED)
@ -1635,8 +1635,8 @@ u8 func041d_president_running[] = {
label(0x08)
stop_chr
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
if_stage_flag_eq(STAGEFLAG_PRESIDENT_RESCUED, TRUE, /*goto*/ 0x31)
message(TARGET_CHR, 0x0a19) // "President has been rescued."
set_stage_flag(STAGEFLAG_PRESIDENT_RESCUED)

View File

@ -1440,8 +1440,8 @@ u8 func0422_start_path13[] = {
set_armor(40)
set_recovery_speed(30)
set_shield(0)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
assign_path(13)
start_path
set_function(CHR_SELF, GFUNC_UNALERTED)
@ -1456,8 +1456,8 @@ u8 func0423_start_path14[] = {
set_armor(40)
set_recovery_speed(30)
set_shield(0)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
assign_path(14)
start_path
set_function(CHR_SELF, GFUNC_UNALERTED)
@ -3072,8 +3072,8 @@ u8 func0427_init_posttakeover_guard[] = {
set_armor(40)
set_recovery_speed(30)
set_shield(0)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_POSTTAKEOVER_GUARD)
endfunction
};
@ -3153,8 +3153,8 @@ u8 func042a_foyer_spawner[] = {
// Security shut down
label(0x02)
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
dprint 'O','B','J','E','C','T','I','V','E',' ','D','O','N','E','\n',0,
if_never_been_onscreen(/*goto*/ 0x6a)
if_chr_sees_player(/*goto*/ 0x04)
@ -3183,8 +3183,8 @@ u8 func042a_foyer_spawner[] = {
u8 func042b_init_foyer_clone[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x00)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x42, /*goto*/ 0x02)
label(0x02)
set_function(CHR_SELF, FUNC_FOYER_CLONE)
@ -3436,7 +3436,7 @@ u8 func0419_ba8c[] = {
goto_first(0x09)
label(0x0b)
try_target_chr_in_same_group(/*goto*/ 0x02)
try_set_target_chr_to_teammate(/*goto*/ 0x02)
goto_next(0x0e)
label(0x31)
goto_first(0x04)
@ -3471,8 +3471,8 @@ u8 func041a_draw_magnum[] = {
unset_self_flag_bankx(CHRFLAG1_00000001, BANK_1)
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_self_flag_bankx(CHRFLAG1_WARNED, BANK_1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_UNALERTED)
endfunction
};

View File

@ -1588,7 +1588,7 @@ u8 func0411_labtech_alerted[] = {
// Already alert (eg. by gunfire)
label(0x04)
try_target_chr_in_same_group(/*goto*/ 0x3f)
try_set_target_chr_to_teammate(/*goto*/ 0x3f)
goto_next(0x42)
label(0x3f)
@ -1739,8 +1739,8 @@ u8 func1010_alarm_responders[] = {
set_chr_team(0x5c, TEAM_ENEMY)
set_chr_team(0x5d, TEAM_ENEMY)
set_chr_team(0x5e, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
show_chr(0x04)
show_chr(0x25)
@ -1776,8 +1776,8 @@ u8 func1010_alarm_responders[] = {
set_chr_team(0x1e, TEAM_ENEMY)
set_chr_team(0x20, TEAM_ENEMY)
set_chr_team(0x22, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
set_function(0x57, 0x0409)
set_function(0x58, 0x0409)
@ -2122,8 +2122,8 @@ u8 func0404_angry_pilot[] = {
set_accuracy(90)
set_reaction_speed(100)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
unset_self_flag_bankx(CHRFLAG0_00100000, BANK_0)
set_self_flag_bank3(CHRFLAG3_00000040)
set_onshot_function(FUNC_ANGRY_PILOT)

View File

@ -995,19 +995,19 @@ u8 func1009_spawner_during_decode[] = {
label(0x06)
if_difficulty_lt(DIFF_SA, /*goto*/ 0x55)
if_difficulty_lt(DIFF_PA, /*goto*/ 0x56)
if_num_chrs_in_group_gt(5, 0x09, /*goto*/ 0x2c)
if_num_chrs_in_squadron_gt(5, 0x09, /*goto*/ 0x2c)
if_kill_count_gt(50, /*goto*/ 0x2c)
goto_next(0x57)
// Agent
label(0x55)
if_num_chrs_in_group_gt(3, 0x09, /*goto*/ 0x2c)
if_num_chrs_in_squadron_gt(3, 0x09, /*goto*/ 0x2c)
if_kill_count_gt(50, /*goto*/ 0x2c)
goto_next(0x57)
// Special Agent
label(0x56)
if_num_chrs_in_group_gt(4, 0x09, /*goto*/ 0x2c)
if_num_chrs_in_squadron_gt(4, 0x09, /*goto*/ 0x2c)
if_kill_count_gt(50, /*goto*/ 0x2c)
goto_next(0x57)
@ -1059,8 +1059,8 @@ u8 func1009_spawner_during_decode[] = {
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0) \
set_alertness(90) \
set_self_flag_bank3(CHRFLAG3_00000200) \
cmd0145_rebuild_groups \
cmd0146_rebuild_groups \
rebuild_teams \
rebuild_squadrons \
run_to_pad(0x004e)
@ -3066,8 +3066,8 @@ u8 func102b_81bc[] = {
set_chr_team(0x15, TEAM_ENEMY)
set_chr_team(0x16, TEAM_ENEMY)
set_chr_team(0x17, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -3089,8 +3089,8 @@ u8 func102c_set_lightswitch_guard_team[] = {
label(0x06)
set_chr_team(CHR_LIGHTSWITCH_GUARD, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -5065,8 +5065,8 @@ u8 func0415_holo_guard_unarmed_unalert[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
yield
yield
@ -5496,8 +5496,8 @@ u8 func0418_holo_guard_armed_unalert[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_action(ACTION_SCAN, FALSE)
set_onshot_function(FUNC_HOLO_GUARD_UNARMED_ALERT)
restart_timer

View File

@ -2033,8 +2033,8 @@ u8 func0408_alarm_responder[] = {
goto_next(0x06)
label(0x06)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_UNALERTED_0001)
endfunction
};
@ -2695,8 +2695,8 @@ u8 func0409_uplink_responder[] = {
set_alertness(110)
set_self_flag_bank3(CHRFLAG3_00000200)
label(0x06)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_UNALERTED)
endfunction
};

View File

@ -1752,8 +1752,8 @@ u8 func1005_toggle_snipers[] = {
show_chr(CHR_SNIPER5)
yield
show_chr(CHR_SNIPER8)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// All difficulties
label(0x06)
@ -2177,8 +2177,8 @@ u8 func100b_invoke_hackers[] = {
unset_chr_flag_bank3(CHR_HACKER1, CHRFLAG3_HIDDEN)
unset_chr_flag_bank3(CHR_HACKER2, CHRFLAG3_HIDDEN)
unset_chr_flag_bank3(CHR_HACKER3, CHRFLAG3_HIDDEN)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
play_x_music(CHANNEL_10, 60)
set_countdown_timer(60)
show_countdown_timer
@ -2661,8 +2661,8 @@ u8 func101b_toggle_basement_chrs[] = {
yield
show_chr(CHR_CARRINGTON)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// Every 5 frames, check if the wine bottles are destroyed.
// There's a lot of stuff going on here without yielding. If you destroyed
@ -2904,8 +2904,8 @@ u8 func101c_toggle_villa_guards[] = {
show_chr(0x41)
yield
show_chr(0x42)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -623,8 +623,8 @@ u8 func1400_setup_counterop[] = {
try_inherit_properties(templatechr, /*goto*/ 0x08) \
label(0x08) \
set_chr_team(CHR_SELF, TEAM_ENEMY) \
cmd0145_rebuild_groups \
cmd0146_rebuild_groups \
rebuild_teams \
rebuild_squadrons \
set_function(CHR_SELF, clonefunc)
@ -1812,8 +1812,8 @@ u8 func041a_hostage_holo[] = {
u8 func041c_init_holoclone1[] = {
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
play_sound(0x05bc, CHANNEL_9)
set_onshot_function(FUNC_HOLOCLONE_ONSHOT)
set_chr_health(CHR_SELF, 1)
@ -1825,8 +1825,8 @@ u8 func041c_init_holoclone1[] = {
u8 func041d_init_holoclone2[] = {
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
play_sound(0x05bc, CHANNEL_5)
set_onshot_function(FUNC_HOLOCLONE_ONSHOT)
set_chr_health(CHR_SELF, 1)
@ -1838,8 +1838,8 @@ u8 func041d_init_holoclone2[] = {
u8 func041e_init_holoclone3[] = {
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
play_sound(0x05bc, CHANNEL_6)
set_onshot_function(FUNC_HOLOCLONE_ONSHOT)
set_chr_health(CHR_SELF, 1)
@ -1950,8 +1950,8 @@ u8 func0426_init_saved_hostage[] = {
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
set_armor(80)
set_chr_health(CHR_SELF, 1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_HOSTAGE_THANK_AND_RUN)
label(0x2e)
@ -2037,8 +2037,8 @@ u8 func0428_init_drop_devastator[] = {
set_onshot_function(FUNC_HOSTAGE_THANK_AND_RUN)
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
set_chr_health(CHR_SELF, 40)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_DROP_DEVASTATOR)
endfunction
};
@ -3009,8 +3009,8 @@ u8 func1015_firingrange_pc[] = {
try_inherit_properties(templatechr, /*goto*/ 0x08) \
label(0x08) \
set_chr_team(CHR_SELF, TEAM_ENEMY) \
cmd0145_rebuild_groups \
cmd0146_rebuild_groups \
rebuild_teams \
rebuild_squadrons \
set_function(CHR_SELF, clonefunc)

View File

@ -744,8 +744,8 @@ u8 func040e_elvis_give_ar34[] = {
// Talk
label(0x06)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_stage_flag(STAGEFLAG_MET_ELVIS)
speak(CHR_P1P2, 0x2613, 0x12e1, CHANNEL_6, COLOR_04_ORANGE) // "Good to see you, Joanna."
animation(ANIM_TALKING_0231, 0, -1, 0x1010, CHR_SELF, 2)
@ -1174,8 +1174,8 @@ u8 func1006_wake_slayer_skedar[] = {
unlock_door(0x10, 0x02)
open_door(0x0f)
set_chr_team(CHR_SUSPENDEDANIM1, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SUSPENDEDANIM1, FUNC_WAKE_SUSPENDEDANIM_SKEDAR)
restart_timer
@ -1195,8 +1195,8 @@ u8 func1006_wake_slayer_skedar[] = {
set_function(CHR_SUSPENDEDANIM3, FUNC_WAKE_SUSPENDEDANIM_SKEDAR)
set_chr_team(CHR_SUSPENDEDANIM3, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// Wait until player coming back from Slayer area
label(0x2c)
@ -1220,14 +1220,14 @@ u8 func1006_wake_slayer_skedar[] = {
open_door(0x15)
set_function(CHR_SUSPENDEDANIM2, FUNC_WAKE_SUSPENDEDANIM_SKEDAR)
set_chr_team(CHR_SUSPENDEDANIM2, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// 4
set_function(CHR_SUSPENDEDANIM4, FUNC_WAKE_SUSPENDEDANIM_SKEDAR)
set_chr_team(CHR_SUSPENDEDANIM4, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -1698,8 +1698,8 @@ u8 func0413_init_hangarclone[] = {
set_chr_flag_bank2(CHR_SELF, CHRFLAG2_00400000)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x07, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_HANGARCLONE)
@ -2219,8 +2219,8 @@ u8 func0416_init_bridgeclone[] = {
set_chr_flag_bank3(CHR_SELF, CHRFLAG3_KILLCOUNTABLE)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
if_self_flag_bankx_eq(CHRFLAG0_00000004, TRUE, BANK_0, /*goto*/ 0x2c)
try_inherit_properties(CHR_BRIDGESPAWNER1, /*goto*/ 0x06)
@ -3720,8 +3720,8 @@ u8 func1025_toggle_chrs[] = {
set_function(0x08, FUNC_CLOAK_AND_REMOVE)
set_function(0x09, FUNC_CLOAK_AND_REMOVE)
set_function(0x0a, FUNC_CLOAK_AND_REMOVE)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
beginloop(0x09)
consider_coop_for_p1p2_chr(CHR_SELF)

View File

@ -1487,7 +1487,7 @@ u8 func0410_labtech_showers_sa_pa[] = {
label(0x06)
restart_timer
speak(TARGET_CHR, 0x2a27, 0x1b2f, CHANNEL_4, COLOR_08_RED) // "Help - help!"
try_target_chr_in_same_group(/*goto*/ 0x06)
try_set_target_chr_to_teammate(/*goto*/ 0x06)
// No chr in same group - run to pad instead
run_to_pad(0x0121)
@ -4074,8 +4074,8 @@ u8 func0429_spawn_while_xraying[] = {
u8 func042a_init_xray_clone[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x47, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, 0x042b)

View File

@ -1580,8 +1580,8 @@ u8 func0416_mechanic[] = {
label(0x2e)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
beginloop(0x6a)
if_chr_stopped(/*goto*/ 0x2e)
@ -1638,8 +1638,8 @@ u8 func0416_mechanic[] = {
label(0x0f)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
play_sound(0x80f7, CHANNEL_7)
label(0x06)
set_return_function(CHR_SELF, GFUNC_ALERTED)
@ -2659,8 +2659,8 @@ u8 func0419_clone_spawner[] = {
u8 func041a_init_alerted_spawned_guard[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x25, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_ALERTED_SPAWNED_GUARD)
@ -2727,8 +2727,8 @@ u8 func1019_spawn_guards_at_antenna[] = {
unset_chr_flag_bank3(0x35, CHRFLAG3_HIDDEN)
unset_chr_flag_bank3(0x35, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
set_function(0x35, GFUNC_SEARCH_FOR_PLAYER)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -3093,8 +3093,8 @@ u8 func0423_a5e8[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_TROOPER_ALERTED)
endfunction
};

View File

@ -72,8 +72,8 @@ u8 func0404_spawn_enemies[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC0401_INIT_ENEMY)
endfunction
};
@ -107,8 +107,8 @@ u8 func0405_spawn_maians[] = {
goto_first(0x04)
label(0x01)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
yield
yield
yield
@ -133,8 +133,8 @@ u8 func0402_init_maian[] = {
u8 func1001_01a4[] = {
noop016c
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -3258,8 +3258,8 @@ u8 func040c_blonde[] = {
label(0x06)
unset_self_flag_bank3(CHRFLAG3_UNEXPLODABLE)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_onshot_function(GFUNC_ALERTED)
beginloop(0x08)
@ -3397,8 +3397,8 @@ u8 func040e_init_miniskedar[] = {
set_shield(0)
set_self_flag_bank3(CHRFLAG3_00080000)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_MINISKEDAR)
endfunction
};
@ -3602,7 +3602,7 @@ u8 func1012_sa_megaweapon_spawner[] = {
// Consider spawn
label(0x2e)
dprint 'S','Q','U','A','D','\n',0,
if_num_chrs_in_group_gt(5, 0x0e, /*goto*/ 0x21)
if_num_chrs_in_squadron_gt(5, 0x0e, /*goto*/ 0x21)
call_rng
if_rand_gt(86, /*goto*/ 0x63)
if_rand_gt(172, /*goto*/ 0x64)
@ -3622,8 +3622,8 @@ u8 func1012_sa_megaweapon_spawner[] = {
label(0x22)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
goto_first(0x1f)
endfunction
@ -3632,8 +3632,8 @@ u8 func1012_sa_megaweapon_spawner[] = {
// SA megaweapon miniskedar
u8 func041e_init_sa_megaweapon_miniskedar[] = {
set_squadron(SQUADRON_0E)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_INIT_MINISKEDAR)
endfunction
};
@ -4013,7 +4013,7 @@ u8 func101f_pa_circleroom_spawner[] = {
if_timer_lt(300, /*goto*/ 0x21)
label(0x2e)
dprint 'S','Q','U','A','D','\n',0,
if_num_chrs_in_group_gt(3, 0x0d, /*goto*/ 0x21)
if_num_chrs_in_squadron_gt(3, 0x0d, /*goto*/ 0x21)
call_rng
if_rand_gt(128, /*goto*/ 0x63)
try_spawn_chr(BODY_MINISKEDAR, HEAD_RANDOM, 0x00dd, FUNC_INIT_PA_CIRCLEROOM_MINISKEDAR, 0x00000000, /*goto*/ 0x22)
@ -4026,8 +4026,8 @@ u8 func101f_pa_circleroom_spawner[] = {
label(0x22)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
goto_first(0x1f)
label(0x58)
@ -4037,8 +4037,8 @@ u8 func101f_pa_circleroom_spawner[] = {
u8 func041f_init_pa_circleroom_miniskedar[] = {
set_squadron(SQUADRON_0D)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_INIT_MINISKEDAR)
endfunction
};
@ -4063,7 +4063,7 @@ u8 func1020_pa_deadendroom_spawner[] = {
if_timer_lt(300, /*goto*/ 0x21)
label(0x2e)
dprint 'S','Q','U','A','D','\n',0,
if_num_chrs_in_group_gt(3, 0x0b, /*goto*/ 0x21)
if_num_chrs_in_squadron_gt(3, 0x0b, /*goto*/ 0x21)
call_rng
if_rand_gt(64, /*goto*/ 0x63)
if_rand_gt(128, /*goto*/ 0x64)
@ -4084,8 +4084,8 @@ u8 func1020_pa_deadendroom_spawner[] = {
label(0x22)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
goto_first(0x1f)
endfunction
@ -4093,8 +4093,8 @@ u8 func1020_pa_deadendroom_spawner[] = {
u8 func0420_init_pa_deadendroom_miniskedar[] = {
set_squadron(SQUADRON_0B)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_INIT_MINISKEDAR)
endfunction
};
@ -4512,8 +4512,8 @@ u8 func040f_miniskedar_unalerted[] = {
set_shield(0)
set_self_flag_bank3(CHRFLAG3_00080000)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
beginloop(0x04)
consider_coop_for_p1p2_chr(CHR_SELF)
@ -4740,8 +4740,8 @@ u8 func102d_check_farsight_ammo_wasted[] = {
u8 unregistered_function4[] = {
cmd0185_mponly
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};

View File

@ -1475,8 +1475,8 @@ u8 func0412_cia[] = {
endloop(0x38)
label(0x03)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_action(ACTION_COWER, FALSE)
say_quip(CHR_JOANNA, 0x18, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00)
animation(ANIM_SURRENDER_002E, 0, 193, 0x1010, CHR_SELF, 2)
@ -1490,13 +1490,13 @@ u8 func0412_cia[] = {
set_action(ACTION_SCAN, FALSE)
if_self_flag_bankx_eq(CHRFLAG0_00000080, FALSE, BANK_0, /*goto*/ 0x03)
set_squadron(SQUADRON_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
label(0x03)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
try_target_chr_in_same_group(/*goto*/ 0x04)
rebuild_teams
rebuild_squadrons
try_set_target_chr_to_teammate(/*goto*/ 0x04)
goto_next(0x0b)
label(0x03)
@ -1504,8 +1504,8 @@ u8 func0412_cia[] = {
label(0x04)
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_run_to_chr(FOLLOW_CHR, /*goto*/ 0x06)
beginloop(0x06)
@ -1521,8 +1521,8 @@ u8 func0412_cia[] = {
say_quip(CHR_JOANNA, 0x19, 0xff, 0x00, 0xff, 0x81, 0x00, 0x00)
label(0x0b)
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x2d)
if_self_flag_bankx_eq(CHRFLAG0_00004000, TRUE, BANK_0, /*goto*/ 0x2f)
run_to_pad(0x00c8)
@ -1651,7 +1651,7 @@ u8 func0413_bugspotter[] = {
// Find another guard and run to them
label(0x04)
try_target_chr_in_same_group(/*goto*/ 0x04)
try_set_target_chr_to_teammate(/*goto*/ 0x04)
goto_next(0x0b)
label(0x04)
@ -2317,7 +2317,7 @@ u8 func100d_spawn_alarm_responders[] = {
// Wait until group is dead
beginloop(0x06)
if_all_chrs_in_group_are_dead(GROUP_ALARM_RESPONDER, /*goto*/ 0x04)
if_all_chrs_in_squadron_are_dead(GROUP_ALARM_RESPONDER, /*goto*/ 0x04)
endloop(0x06)
// Set this group as dead
@ -2372,8 +2372,8 @@ u8 func041f_alarm_responder[] = {
set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
set_alertness(90)
set_self_flag_bank3(CHRFLAG3_00000200)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_SEARCH_FOR_PLAYER)
endfunction
};

View File

@ -823,8 +823,8 @@ u8 func1006_hijack[] = {
unset_chr_flag_bank2(CHR_BLONDE1, CHRFLAG2_40000000)
unset_chr_flag_bank2(CHR_BLONDE2, CHRFLAG2_40000000)
unlock_door(OBJ_COCKPITDOOR, 0x40)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
unset_chr_flag_bank2(CHR_JOANNA, CHRFLAG2_DISGUISED)
unset_chr_flag_bank2(CHR_VELVET, CHRFLAG2_DISGUISED)
set_function(CHR_SELF, GFUNC_IDLE)
@ -1375,8 +1375,8 @@ u8 func0405_president_in_room[] = {
label(0x06)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
hide_object(OBJ_EXTERIOR_DOOR)
hide_object(OBJ_FLOORHATCH)
set_object_flag_bank0(OBJ_FLOOR_HATCH_DETACHED, OBJECTFLAG0_00000100)
@ -1583,8 +1583,8 @@ u8 func0404_president_running[] = {
stop_chr
set_stage_flag(STAGEFLAG_PRESIDENT_AT_POD)
set_chr_team(CHR_SELF, TEAM_NONCOMBAT)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
// Player is in the entrace to Trent's room and both blondes are dead.
@ -1666,8 +1666,8 @@ u8 func0409_unused[] = {
u8 func100c_cockpit_stripes[] = {
set_onshot_function(GFUNC_ALERTED)
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_chr_dodge_rating(2, 0x00)
set_accuracy(14)
set_reaction_speed(50)
@ -1704,8 +1704,8 @@ u8 func100c_cockpit_stripes[] = {
u8 func0413_taker1[] = {
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_self_flag_bank3(CHRFLAG3_00000020)
set_chr_dodge_rating(2, 0x00)
set_reaction_speed(50)
@ -1720,8 +1720,8 @@ u8 func0413_taker1[] = {
u8 func0413_taker2[] = {
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_self_flag_bank3(CHRFLAG3_00000020)
set_chr_dodge_rating(2, 0x00)
set_reaction_speed(50)
@ -1738,8 +1738,8 @@ u8 func0413_taker[] = {
set_onshot_function(GFUNC_ALERTED)
unset_self_flag_bank3(CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_accuracy(50)
set_self_flag_bank3(CHRFLAG3_00000040)
restart_timer
@ -2490,8 +2490,8 @@ u8 func0416_init_clone1[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
try_draw_weapon(MODEL_CHRAVENGER, WEAPON_K7AVENGER, 0x10000000, /*goto*/ 0x04)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x35, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_CLONE1)
@ -2586,8 +2586,8 @@ u8 func0419_init_clone2[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
try_draw_weapon(MODEL_CHRAVENGER, WEAPON_K7AVENGER, 0x10000000, /*goto*/ 0x04)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x36, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_CLONE2)
@ -2678,8 +2678,8 @@ u8 func041c_init_clone3[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
try_draw_weapon(MODEL_CHRAVENGER, WEAPON_K7AVENGER, 0x10000000, /*goto*/ 0x04)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x37, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_CLONE3)
@ -2698,8 +2698,8 @@ u8 func041d_clone3[] = {
u8 func041f_init_blonde[] = {
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_chr_dodge_rating(2, 0x00)
set_accuracy(24)
set_reaction_speed(50)
@ -2713,8 +2713,8 @@ u8 func041f_init_blonde[] = {
u8 func041e_blonde[] = {
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_accuracy(30)
set_onshot_function(FUNC_BLONDE)
if_chr_dying(CHR_SELF, /*goto*/ 0x06)
@ -2858,8 +2858,8 @@ u8 func041e_blonde[] = {
u8 func0421_trent_waiting[] = {
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_self_flag_bank3(CHRFLAG3_00000040)
set_shield(500)
set_chr_flag_bank3(CHR_TRENT, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
@ -3103,8 +3103,8 @@ u8 func042a_init_neutral[] = {
set_armor(0)
set_recovery_speed(0)
set_shield(0)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_UNALERTED)
endfunction
};
@ -3118,8 +3118,8 @@ u8 func042b_reinit_stripes[] = {
set_recovery_speed(30)
set_shield(0)
set_chr_team(CHR_SELF, TEAM_04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_STRIPES)
endfunction
};
@ -3303,7 +3303,7 @@ u8 func0407_stewardess[] = {
endloop(0x08)
label(0x06)
try_target_chr_in_same_group(/*goto*/ 0x2d)
try_set_target_chr_to_teammate(/*goto*/ 0x2d)
goto_next(0x0a)
label(0x2d)
@ -3747,8 +3747,8 @@ u8 func101c_check_equipment_switch_destroyed[] = {
u8 func040c_init_defend_pad[] = {
unset_chr_flag_bank2(CHR_SELF, CHRFLAG2_40000000)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_target_chr(-1)
label(0x04)
try_draw_weapon(MODEL_CHRCYCLONE, WEAPON_CYCLONE, 0x00000000, /*goto*/ 0x2d)
@ -3779,8 +3779,8 @@ u8 func040d_init_defend_president[] = {
u8 func042c_remove_if_offscreen[] = {
unset_chr_flag_bank2(CHR_SELF, CHRFLAG2_40000000)
set_chr_team(CHR_SELF, TEAM_ALLY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_chr_health(CHR_SELF, 0)
label(0x04)

View File

@ -1236,8 +1236,8 @@ u8 func0411_init_clone[] = {
try_inherit_properties(0x4e, /*goto*/ 0x06)
label(0x06)
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_CLONE)
endfunction
};

View File

@ -874,8 +874,8 @@ u8 func0407_init_cloaked_skedar[] = {
u8 func0408_cloaked_skedar[] = {
set_chr_team(CHR_SELF, TEAM_ENEMY)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_self_flag_bank3(CHRFLAG3_00040000)
set_self_flag_bank3(CHRFLAG3_HIDDEN)
set_chr_flag_bank2(CHR_SELF, CHRFLAG2_CLOAKED)

View File

@ -451,9 +451,9 @@ u8 func1003_spawn_maians[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
if_num_chrs_in_group_gt(7, GROUP_MAIANS, /*goto*/ 0x2d)
rebuild_teams
rebuild_squadrons
if_num_chrs_in_squadron_gt(7, GROUP_MAIANS, /*goto*/ 0x2d)
reloop(0x8d)
// Wait 5 seconds
@ -467,7 +467,7 @@ u8 func1003_spawn_maians[] = {
// If a spot has freed up, go back to the spawning part to spawn another
label(0x2d)
if_num_chrs_in_group_gt(7, GROUP_MAIANS, /*goto*/ 0x2d)
if_num_chrs_in_squadron_gt(7, GROUP_MAIANS, /*goto*/ 0x2d)
endloop(0x8d)
// Still no free spot, so go back to the 5 second wait
@ -481,8 +481,8 @@ u8 func1003_spawn_maians[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -492,8 +492,8 @@ u8 func0405_init_maian[] = {
set_self_flag_bank3(CHRFLAG3_00080000)
set_chr_team(CHR_SELF, TEAM_ALLY)
set_squadron(GROUP_MAIANS)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_draw_weapon(MODEL_CHRMAIANSMG, WEAPON_CALLISTONTG, 0x00000000, /*goto*/ 0x06)
label(0x06)
try_inherit_properties(CHR_MAIAN_TEMPLATE, /*goto*/ 0x2d)
@ -505,8 +505,8 @@ u8 func0405_init_maian[] = {
set_recovery_speed(100)
set_shield(0)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_MAIAN)
endfunction
};
@ -614,9 +614,9 @@ u8 func1004_spawn_king1_skedar[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
if_num_chrs_in_group_gt(5, 0x02, /*goto*/ 0x2d)
rebuild_teams
rebuild_squadrons
if_num_chrs_in_squadron_gt(5, 0x02, /*goto*/ 0x2d)
reloop(0x8d)
// Wait for 10 seconds if Maian squad is somewhat full,
@ -627,7 +627,7 @@ u8 func1004_spawn_king1_skedar[] = {
beginloop(0x08)
if_stage_flag_eq(STAGEFLAG_KING1_DEAD, TRUE, /*goto*/ 0x0e)
dprint 'S','Q','U','A','D',' ','F','U','L','L','\n',0,
if_num_chrs_in_group_gt(3, GROUP_MAIANS, /*goto*/ 0x2e)
if_num_chrs_in_squadron_gt(3, GROUP_MAIANS, /*goto*/ 0x2e)
if_timer_gt(60, /*goto*/ 0x2d)
label(0x2e)
if_timer_gt(600, /*goto*/ 0x2d)
@ -635,7 +635,7 @@ u8 func1004_spawn_king1_skedar[] = {
// If squad is still full, wait another 1 or 10 seconds
label(0x2d)
if_num_chrs_in_group_gt(5, GROUP_KING1_SKEDAR, /*goto*/ 0x2d)
if_num_chrs_in_squadron_gt(5, GROUP_KING1_SKEDAR, /*goto*/ 0x2d)
goto_first(0x8d)
// Spawn more
@ -652,8 +652,8 @@ u8 func1004_spawn_king1_skedar[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -706,9 +706,9 @@ u8 func1008_spawn_king2_skedar[] = {
yield
yield
subtract_morale(1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
if_num_chrs_in_group_gt(3, GROUP_KING2_SKEDAR, /*goto*/ 0x2d)
rebuild_teams
rebuild_squadrons
if_num_chrs_in_squadron_gt(3, GROUP_KING2_SKEDAR, /*goto*/ 0x2d)
reloop(0x8d)
// Wait 15 seconds or until king 2 dead
@ -723,7 +723,7 @@ u8 func1008_spawn_king2_skedar[] = {
// If squad still full, wait another 15 seconds, otherwise loop back to
// the spawning code.
label(0x2d)
if_num_chrs_in_group_gt(3, GROUP_KING2_SKEDAR, /*goto*/ 0x2d)
if_num_chrs_in_squadron_gt(3, GROUP_KING2_SKEDAR, /*goto*/ 0x2d)
endloop(0x8d)
label(0x2d)
@ -736,8 +736,8 @@ u8 func1008_spawn_king2_skedar[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
label(0x0e)
set_function(CHR_SELF, GFUNC_IDLE)
@ -777,9 +777,9 @@ u8 func100c_spawn_king3_skedar[] = {
label(0x8e)
yield
subtract_morale(1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
if_num_chrs_in_group_gt(5, 0x04, /*goto*/ 0x2d)
rebuild_teams
rebuild_squadrons
if_num_chrs_in_squadron_gt(5, 0x04, /*goto*/ 0x2d)
reloop(0x8d)
// Squad full - wait 15 seconds or for king 3 to die
@ -793,7 +793,7 @@ u8 func100c_spawn_king3_skedar[] = {
// Spawn more or wait another 15 seconds
label(0x2d)
if_num_chrs_in_group_gt(5, GROUP_KING3_SKEDAR, /*goto*/ 0x2d)
if_num_chrs_in_squadron_gt(5, GROUP_KING3_SKEDAR, /*goto*/ 0x2d)
endloop(0x8d)
label(0x2d)
@ -806,8 +806,8 @@ u8 func100c_spawn_king3_skedar[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
label(0x0e)
set_function(CHR_SELF, GFUNC_IDLE)
@ -829,8 +829,8 @@ u8 func0407_king1_skedar[] = {
set_recovery_speed(100)
set_shield(0)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_SKEDAR)
endfunction
};
@ -850,8 +850,8 @@ u8 func0408_king2_skedar[] = {
set_recovery_speed(100)
set_shield(0)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_SKEDAR)
endfunction
};
@ -871,8 +871,8 @@ u8 func0409_king3_skedar[] = {
set_recovery_speed(100)
set_shield(0)
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, FUNC_SKEDAR)
endfunction
};

View File

@ -870,8 +870,8 @@ u8 func0404_jonathan_following_and_mine[] = {
set_chr_team(CHR_SELF, TEAM_ALLY)
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_return_function(CHR_SELF, FUNC_JONATHAN_FOLLOWING_AND_MINE)
set_onshot_function(FUNC_JONATHAN_FOLLOWING_AND_MINE)
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32)
@ -1519,7 +1519,7 @@ u8 func1008_spawngroup1[] = {
yield
if_stage_flag_eq(STAGEFLAG_JON_FINISHED_EXPLOSIVES, TRUE, /*goto*/ 0x06)
subtract_morale(1)
if_num_chrs_in_group_gt(3, SPAWNGROUP1, /*goto*/ 0x32)
if_num_chrs_in_squadron_gt(3, SPAWNGROUP1, /*goto*/ 0x32)
reloop(0x5f)
label(0x32)
@ -1538,8 +1538,8 @@ u8 func1008_spawngroup1[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -1559,8 +1559,8 @@ u8 func1008_spawngroup1_guard[] = {
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_squadron(SPAWNGROUP1)
run_to_pad(0x013e)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_CHOOSE_TARGET_CHR)
endfunction
};
@ -1594,12 +1594,12 @@ u8 func1013_spawngroup2[] = {
yield
if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x06)
subtract_morale(1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
label(0x08)
yield
if_stage_flag_eq(STAGEFLAG_WALL_EXPLODED, TRUE, /*goto*/ 0x06)
if_num_chrs_in_group_gt(4, SPAWNGROUP2, /*goto*/ 0x32)
if_num_chrs_in_squadron_gt(4, SPAWNGROUP2, /*goto*/ 0x32)
call_rng
if_rand_gt(5, /*goto*/ 0x32)
endloop(0x5f)
@ -1613,8 +1613,8 @@ u8 func1013_spawngroup2[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -1633,8 +1633,8 @@ u8 func1013_spawngroup2_guard[] = {
set_self_flag_bankx(CHRFLAG0_00002000, BANK_0)
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_squadron(SPAWNGROUP2)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_target_chr(CHR_JOANNA)
set_function(CHR_SELF, GFUNC_ALERTED)
endfunction
@ -1687,15 +1687,15 @@ u8 func1014_spawngroup3[] = {
yield
if_stage_flag_eq(STAGEFLAG_ELVIS_REVIVED, TRUE, /*goto*/ 0x06)
subtract_morale(1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
// Wait for Elvis to be revived, for someone to die, or 5 in 256 chance
// of spawning another guard anyway.
label(0x08)
yield
if_stage_flag_eq(STAGEFLAG_ELVIS_REVIVED, TRUE, /*goto*/ 0x06)
if_num_chrs_in_group_gt(6, SPAWNGROUP3, /*goto*/ 0x32)
if_num_chrs_in_squadron_gt(6, SPAWNGROUP3, /*goto*/ 0x32)
call_rng
if_rand_gt(5, /*goto*/ 0x32)
endloop(0x5f)
@ -1709,11 +1709,11 @@ u8 func1014_spawngroup3[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
beginloop(0x0d)
if_all_chrs_in_group_are_dead(SPAWNGROUP3, /*goto*/ 0x06)
if_all_chrs_in_squadron_are_dead(SPAWNGROUP3, /*goto*/ 0x06)
endloop(0x0d)
label(0x06)
@ -1736,8 +1736,8 @@ u8 func1014_spawngroup3_guard[] = {
set_self_flag_bankx(CHRFLAG0_00002000, BANK_0)
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_squadron(SPAWNGROUP3)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_target_chr(CHR_JOANNA)
set_function(CHR_SELF, GFUNC_ALERTED)
endfunction
@ -1762,7 +1762,7 @@ u8 func1015_spawngroup4[] = {
// @bug: This is spawning guards using the same function as the previous
// spawn group. This causes the guards to set their group to spawngroup3
// which causes the if_num_chrs_in_group_gt check further below to
// which causes the if_num_chrs_in_squadron_gt check further below to
// never pass.
try_spawn_chr(BODY_AREA51GUARD, HEAD_RANDOM, 0x0140, FUNC_SPAWNGROUP3_GUARD, 0x00000200, /*goto*/ 0x60)
goto_next(0x06)
@ -1775,13 +1775,13 @@ u8 func1015_spawngroup4[] = {
yield
if_stage_flag_eq(STAGEFLAG_BOTH_HANGAR_DOORS_OPEN, TRUE, /*goto*/ 0x06)
subtract_morale(1)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
label(0x08)
yield
if_morale_lt(1, /*goto*/ 0x06)
if_num_chrs_in_group_gt(6, SPAWNGROUP4, /*goto*/ 0x32)
if_num_chrs_in_squadron_gt(6, SPAWNGROUP4, /*goto*/ 0x32)
call_rng
if_rand_gt(2, /*goto*/ 0x32)
endloop(0x5f)
@ -1795,8 +1795,8 @@ u8 func1015_spawngroup4[] = {
yield
yield
yield
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -1818,8 +1818,8 @@ u8 func1015_spawngroup4_guard[] = {
set_self_flag_bankx(CHRFLAG0_00002000, BANK_0)
set_self_flag_bankx(CHRFLAG0_AIVSAI, BANK_0)
set_squadron(SPAWNGROUP4)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
run_to_pad(0x0168)
set_function(CHR_SELF, GFUNC_CHOOSE_TARGET_CHR)
endfunction
@ -2343,8 +2343,8 @@ u8 func1016_enable_guards_after_meetup[] = {
unset_chr_flag_bank3(0x16, CHRFLAG3_HIDDEN)
unset_chr_flag_bank3(0x16, CHRFLAG3_INVINCIBLE_TO_GUNFIRE)
set_function(0x16, FUNC_INIT_SUPERDRAGON_GUARD)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
set_function(CHR_SELF, GFUNC_IDLE)
endfunction
};
@ -3239,8 +3239,8 @@ u8 func0416_spawn_during_follow[] = {
u8 func0417_init_follower_clone[] = {
set_self_flag_bankx(CHRFLAG1_00080000, BANK_1)
label(0x04)
cmd0145_rebuild_groups
cmd0146_rebuild_groups
rebuild_teams
rebuild_squadrons
try_inherit_properties(0x09, /*goto*/ 0x06)
label(0x06)
set_function(CHR_SELF, FUNC_FOLLOWER_CLONE)