mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-08 19:22:27 -04:00
Write docblocks for known AI commands
This commit is contained in:
@@ -1679,7 +1679,7 @@ u8 func0414_programmer[] = {
|
||||
// have stopped without being near the PC. This bug is repeated several
|
||||
// times in this function but only documented here.
|
||||
beginloop(0x93)
|
||||
if_target_chr_in_sight(/*goto*/ 0x96)
|
||||
if_target_in_sight(/*goto*/ 0x96)
|
||||
if_near_miss(/*goto*/ 0x96)
|
||||
if_saw_injury(0x00, /*goto*/ 0x96)
|
||||
if_saw_death(0x00, /*goto*/ 0x96)
|
||||
@@ -3158,8 +3158,8 @@ u8 func0416_outro[] = {
|
||||
chr_do_animation(0x00f3, -1, -1, 0x06, 0x00, CHR_P1P2, 4)
|
||||
restart_timer
|
||||
unset_stage_flag(STAGEFLAG_LAB_ELEVATOR_CLOSED)
|
||||
open_door2(OBJ_LABLIFTDOOR1)
|
||||
open_door2(OBJ_LABLIFTDOOR2)
|
||||
set_door_open(OBJ_LABLIFTDOOR1)
|
||||
set_door_open(OBJ_LABLIFTDOOR2)
|
||||
restart_timer
|
||||
set_cutscene_weapon(CHR_P1P2, WEAPON_NONE, WEAPON_NONE)
|
||||
yield
|
||||
@@ -3728,7 +3728,7 @@ u8 func042f_surrendering_guard[] = {
|
||||
beginloop(0xc4)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2c)
|
||||
if_target_in_sight(/*goto*/ 0x2c)
|
||||
if_enemy_distance_lt_and_los(500, /*goto*/ 0x2c)
|
||||
if_near_miss(/*goto*/ 0x2c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x2c)
|
||||
|
||||
+17
-17
@@ -542,7 +542,7 @@ u8 func0401_drcaroll_following[] = {
|
||||
set_self_chrflag(CHRCFLAG_00040000)
|
||||
stop_chr
|
||||
set_target_chr(CHR_BOND)
|
||||
try_jog_to_target_chr(/*goto*/ 0x00)
|
||||
try_jog_to_target(/*goto*/ 0x00)
|
||||
label(0x00)
|
||||
yield
|
||||
set_target_chr(CHR_BOND)
|
||||
@@ -615,12 +615,12 @@ u8 func0401_drcaroll_following[] = {
|
||||
label(0x04)
|
||||
restart_timer
|
||||
if_chr_y(CHR_DRCAROLL, -2100, OPERATOR_LESS_THAN, /*goto*/ 0x20)
|
||||
try_run_to_target_chr(/*goto*/ 0x05)
|
||||
try_run_to_target(/*goto*/ 0x05)
|
||||
label(0x20)
|
||||
if_chr_distance_lt(200, /*goto*/ 0x20)
|
||||
try_run_to_target_chr(/*goto*/ 0x05)
|
||||
try_run_to_target(/*goto*/ 0x05)
|
||||
label(0x20)
|
||||
try_jog_to_target_chr(/*goto*/ 0x05)
|
||||
try_jog_to_target(/*goto*/ 0x05)
|
||||
|
||||
beginloop(0x05)
|
||||
if_chr_in_room(CHR_TARGET, 0x00, 0x0094, /*goto*/ 0x00)
|
||||
@@ -646,7 +646,7 @@ u8 func0401_drcaroll_following[] = {
|
||||
goto_first(0x02)
|
||||
|
||||
label(0x07)
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
endloop(0x08)
|
||||
@@ -945,7 +945,7 @@ u8 func0406_general_combat[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
|
||||
if_target_chr_in_sight(/*goto*/ 0x15)
|
||||
if_target_in_sight(/*goto*/ 0x15)
|
||||
goto_next(0x20)
|
||||
|
||||
label(0x00)
|
||||
@@ -969,7 +969,7 @@ u8 func0406_general_combat[] = {
|
||||
reloop(0x10)
|
||||
|
||||
label(0x00)
|
||||
if_target_chr_in_sight(/*goto*/ 0x15)
|
||||
if_target_in_sight(/*goto*/ 0x15)
|
||||
if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
|
||||
if_enemy_distance_lt_and_los(500, /*goto*/ 0x20)
|
||||
goto_next(0x5e)
|
||||
@@ -1030,7 +1030,7 @@ u8 func0406_general_combat[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
call_rng
|
||||
if_target_chr_in_sight(/*goto*/ 0x19)
|
||||
if_target_in_sight(/*goto*/ 0x19)
|
||||
if_timer_gt(60, /*goto*/ 0x1e)
|
||||
if_rand_lt(4, /*goto*/ 0x1e)
|
||||
endloop(0x1c)
|
||||
@@ -1071,7 +1071,7 @@ u8 func0406_general_combat[] = {
|
||||
goto_first(0x13)
|
||||
|
||||
label(0x29)
|
||||
try_jog_to_target_chr(/*goto*/ 0x20)
|
||||
try_jog_to_target(/*goto*/ 0x20)
|
||||
label(0x20)
|
||||
dprint 'U','N',' ','E','N','T','R','Y','\n',0,
|
||||
set_returnlist(CHR_SELF, AILIST_GENERAL_COMBAT)
|
||||
@@ -1643,7 +1643,7 @@ u8 func0409_tech_conversation[] = {
|
||||
|
||||
// Player activated door or door is fully open
|
||||
label(0x00)
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
set_chr_team(CHR_TECH1, TEAM_ENEMY)
|
||||
set_chr_team(CHR_TECH2, TEAM_ENEMY)
|
||||
set_chr_team(CHR_RLSHOCK, TEAM_ENEMY)
|
||||
@@ -1674,7 +1674,7 @@ u8 func0409_tech_conversation[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
pause_timer
|
||||
if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
|
||||
reloop(0x21)
|
||||
@@ -1695,7 +1695,7 @@ u8 func0409_tech_conversation[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
pause_timer
|
||||
if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
|
||||
reloop(0x22)
|
||||
@@ -1716,7 +1716,7 @@ u8 func0409_tech_conversation[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
pause_timer
|
||||
if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
|
||||
reloop(0x23)
|
||||
@@ -1737,7 +1737,7 @@ u8 func0409_tech_conversation[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
pause_timer
|
||||
if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
|
||||
reloop(0x24)
|
||||
@@ -1759,7 +1759,7 @@ u8 func0409_tech_conversation[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
pause_timer
|
||||
if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
|
||||
reloop(0x25)
|
||||
@@ -1850,7 +1850,7 @@ u8 func040a_tech2[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_stage_flag_eq(STAGEFLAG_TECHS_FINISHED, TRUE, /*goto*/ 0x20)
|
||||
if_target_chr_in_sight(/*goto*/ 0x33)
|
||||
if_target_in_sight(/*goto*/ 0x33)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
endloop(0x1f)
|
||||
|
||||
@@ -2637,7 +2637,7 @@ u8 func0413_defend_pad[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_chr_sees_player(/*goto*/ 0x21)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x21)
|
||||
if_distance_from_target_to_pad_lt(200, TARGET_PAD, /*goto*/ 0x22)
|
||||
if_distance_from_target_to_pad_lt(200, PAD_PRESET, /*goto*/ 0x22)
|
||||
endloop(0x1f)
|
||||
|
||||
label(0x21)
|
||||
|
||||
@@ -456,7 +456,7 @@ u8 func0403_jon_combat[] = {
|
||||
endloop(0x04)
|
||||
|
||||
label(0x58)
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_distance_lt(250, /*goto*/ 0x0e)
|
||||
|
||||
+13
-13
@@ -1150,7 +1150,7 @@ u8 func0404_elvis[] = {
|
||||
label(0x31)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
set_target_chr(CHR_BOND)
|
||||
set_follow_chr(CHR_BOND)
|
||||
set_chrpreset(CHR_BOND)
|
||||
if_stage_flag_eq(STAGEFLAG_ELVIS_GAVE_PROXYMINE, TRUE, /*goto*/ 0x31)
|
||||
if_objective_complete(0, /*goto*/ 0x31)
|
||||
if_objective_complete(1, /*goto*/ 0x31)
|
||||
@@ -1159,7 +1159,7 @@ u8 func0404_elvis[] = {
|
||||
if_objective_complete(4, /*goto*/ 0x31)
|
||||
if_chr_sees_player(/*goto*/ 0xa5)
|
||||
set_target_chr(CHR_COOP)
|
||||
set_follow_chr(CHR_COOP)
|
||||
set_chrpreset(CHR_COOP)
|
||||
if_chr_sees_player(/*goto*/ 0xa5)
|
||||
label(0x31)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0a)
|
||||
@@ -1205,7 +1205,7 @@ u8 func0404_elvis[] = {
|
||||
// Sees player
|
||||
label(0xa5)
|
||||
set_target_chr(CHR_PRESET)
|
||||
try_run_to_target_chr(/*goto*/ 0x12)
|
||||
try_run_to_target(/*goto*/ 0x12)
|
||||
|
||||
beginloop(0x12)
|
||||
dprint 'G','O',' ','T','O','W','A','R','D','S','\n',0,
|
||||
@@ -1273,7 +1273,7 @@ u8 func0418_robot[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x0d)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0d)
|
||||
if_target_in_sight(/*goto*/ 0x0d)
|
||||
call_rng
|
||||
if_rand_gt(5, /*goto*/ 0x31)
|
||||
if_sound_finished(CHANNEL_5, /*goto*/ 0x08)
|
||||
@@ -1303,11 +1303,11 @@ u8 func0418_robot[] = {
|
||||
restart_timer
|
||||
if_chr_distance_lt(300, /*goto*/ 0x31)
|
||||
if_chr_distance_gt(1000, /*goto*/ 0x15)
|
||||
if_target_chr_in_sight(/*goto*/ 0x13)
|
||||
if_target_in_sight(/*goto*/ 0x13)
|
||||
|
||||
// Distance > 1000 or not in sight
|
||||
label(0x15)
|
||||
try_jog_to_target_chr(/*goto*/ 0x08)
|
||||
try_jog_to_target(/*goto*/ 0x08)
|
||||
|
||||
// Distance < 300
|
||||
label(0x31)
|
||||
@@ -1323,10 +1323,10 @@ u8 func0418_robot[] = {
|
||||
if_timer_gt(180, /*goto*/ 0x08)
|
||||
if_chr_distance_gt(1000, /*goto*/ 0x15)
|
||||
dprint 'P','A','R','T',' ','2','\n',0,
|
||||
if_target_chr_in_sight(/*goto*/ 0x13)
|
||||
if_target_in_sight(/*goto*/ 0x13)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x13)
|
||||
if_target_in_sight(/*goto*/ 0x13)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
label(0x15)
|
||||
@@ -1420,7 +1420,7 @@ u8 func041a_pres_clone[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x31)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x08)
|
||||
if_target_chr_in_sight(/*goto*/ 0x31)
|
||||
if_target_in_sight(/*goto*/ 0x31)
|
||||
label(0x08)
|
||||
endloop(0x06)
|
||||
|
||||
@@ -1578,9 +1578,9 @@ u8 func041d_president_running[] = {
|
||||
restart_timer
|
||||
label(0x31)
|
||||
if_chr_distance_gt(300, /*goto*/ 0x31)
|
||||
try_jog_to_target_chr(/*goto*/ 0xa1)
|
||||
try_jog_to_target(/*goto*/ 0xa1)
|
||||
label(0x31)
|
||||
try_run_to_target_chr(/*goto*/ 0xa1)
|
||||
try_run_to_target(/*goto*/ 0xa1)
|
||||
|
||||
beginloop(0xa1)
|
||||
dprint 'F','O','L','L','O','W','\n',0,
|
||||
@@ -1608,7 +1608,7 @@ u8 func041d_president_running[] = {
|
||||
|
||||
// Unreachable
|
||||
label(0xa3)
|
||||
try_run_to_target_chr(/*goto*/ 0xa4)
|
||||
try_run_to_target(/*goto*/ 0xa4)
|
||||
|
||||
// Unreachable
|
||||
beginloop(0xa4)
|
||||
@@ -1738,7 +1738,7 @@ u8 func041f_trent_shooting[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
try_unset_chr_flag_bank3_02000000(CHR_SELF, /*goto*/ 0x31)
|
||||
if_target_chr_in_sight(/*goto*/ 0x08)
|
||||
if_target_in_sight(/*goto*/ 0x08)
|
||||
endloop(0x06)
|
||||
|
||||
label(0x31)
|
||||
|
||||
+17
-17
@@ -1192,7 +1192,7 @@ u8 func0407_stewardess[] = {
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04)
|
||||
label(0x31)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x02)
|
||||
if_target_chr_in_sight(/*goto*/ 0x04)
|
||||
if_target_in_sight(/*goto*/ 0x04)
|
||||
label(0x02)
|
||||
if_timer_gt(120, /*goto*/ 0x16)
|
||||
endloop(0x11)
|
||||
@@ -1219,7 +1219,7 @@ u8 func0407_stewardess[] = {
|
||||
label(0x31)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x02)
|
||||
if_target_chr_in_sight(/*goto*/ 0x04)
|
||||
if_target_in_sight(/*goto*/ 0x04)
|
||||
label(0x02)
|
||||
if_chr_stopped(/*goto*/ 0x0b)
|
||||
endloop(0x00)
|
||||
@@ -1290,7 +1290,7 @@ u8 func0407_stewardess[] = {
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x4e)
|
||||
dprint 'W','A','L','K','I','N','G','\n',0,
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x31)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
label(0x31)
|
||||
if_self_distance_to_chr_lt(200, 0xfb, /*goto*/ 0x4a)
|
||||
if_chr_stopped(/*goto*/ 0x4a)
|
||||
@@ -1517,7 +1517,7 @@ u8 func0408_secretary[] = {
|
||||
if_saw_death(0x00, /*goto*/ LABEL_BECOME_ALERT1)
|
||||
set_view_distance(14)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ LABEL_BECOME_ALERT1)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
if_alarm_active2(/*goto*/ 0x67)
|
||||
endloop(LABEL_MAIN_LOOP)
|
||||
|
||||
@@ -2065,7 +2065,7 @@ u8 func0409_office1[] = {
|
||||
beginloop(0x00)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
if_saw_injury(0x00, /*goto*/ LABEL_RUN_TO_FOYER)
|
||||
if_stage_flag_eq(STAGEFLAG_OFFICE2_DEAD, TRUE, /*goto*/ LABEL_RUN_TO_FOYER)
|
||||
if_object_in_good_condition(0x45, /*goto*/ 0x33)
|
||||
@@ -2427,10 +2427,10 @@ u8 func040f_nsa[] = {
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
label(0x44)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 70, TARGET_PAD, /*goto*/ 0x02)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 70, PAD_PRESET, /*goto*/ 0x02)
|
||||
|
||||
// Return to pad
|
||||
walk_to_pad(TARGET_PAD)
|
||||
walk_to_pad(PAD_PRESET)
|
||||
|
||||
beginloop(0x06)
|
||||
dprint 'G','O',' ','F','O','R',' ','P','A','D','\n',0,
|
||||
@@ -2457,7 +2457,7 @@ u8 func040f_nsa[] = {
|
||||
|
||||
label(0x31)
|
||||
if_chr_sees_player(/*goto*/ 0x04)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 70, TARGET_PAD, /*goto*/ 0x02)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 70, PAD_PRESET, /*goto*/ 0x02)
|
||||
endloop(0x06)
|
||||
|
||||
// At pad
|
||||
@@ -2527,14 +2527,14 @@ u8 func040f_nsa[] = {
|
||||
// Unreachable
|
||||
restart_timer
|
||||
set_target_chr(CHR_P1P2)
|
||||
try_walk_to_target_chr(/*goto*/ 0x05)
|
||||
try_walk_to_target(/*goto*/ 0x05)
|
||||
|
||||
// Also unreachable
|
||||
label(0x31)
|
||||
dprint 'R','U','N',' ','S','T','A','R','T','\n',0,
|
||||
restart_timer
|
||||
set_target_chr(CHR_BOND)
|
||||
try_run_to_target_chr(/*goto*/ 0x05)
|
||||
try_run_to_target(/*goto*/ 0x05)
|
||||
|
||||
beginloop(0x05)
|
||||
set_returnlist(CHR_SELF, GAILIST_ALERTED)
|
||||
@@ -2619,14 +2619,14 @@ u8 func0411_takeover_lackey[] = {
|
||||
if_chr_dying(0x0c, /*goto*/ 0x7b)
|
||||
if_chr_death_animation_finished(0x0c, /*goto*/ 0x7b)
|
||||
if_chr_unloaded(0x0c, /*goto*/ 0x7b)
|
||||
if_target_chr_in_sight(/*goto*/ 0x31)
|
||||
if_target_in_sight(/*goto*/ 0x31)
|
||||
goto_next(0x02)
|
||||
|
||||
label(0x31)
|
||||
try_face_entity(0x0200, 0x0000, /*goto*/ 0x02)
|
||||
label(0x02)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_00002000, FALSE, BANK_0, /*goto*/ 0x31)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
label(0x31)
|
||||
endloop(0x00)
|
||||
|
||||
@@ -2693,7 +2693,7 @@ u8 func0414_officeworker[] = {
|
||||
goto_next(0x08)
|
||||
|
||||
label(0x02)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
label(0x33)
|
||||
endloop(0x00)
|
||||
|
||||
@@ -2732,7 +2732,7 @@ u8 func0414_officeworker[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
if_chr_idle(/*goto*/ 0x31)
|
||||
goto_first(0x77)
|
||||
|
||||
@@ -3348,7 +3348,7 @@ u8 func0419_ba8c[] = {
|
||||
|
||||
label(0x31)
|
||||
unset_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 100, TARGET_PAD, /*goto*/ 0x02)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 100, PAD_PRESET, /*goto*/ 0x02)
|
||||
goto_next(0x31)
|
||||
|
||||
label(0x02)
|
||||
@@ -3373,7 +3373,7 @@ u8 func0419_ba8c[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_saw_death(0x00, /*goto*/ 0x4f)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0f)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
if_chr_stopped(/*goto*/ 0x73)
|
||||
if_chr_idle(/*goto*/ 0x31)
|
||||
if_timer_gt(180, /*goto*/ 0x73)
|
||||
@@ -3386,7 +3386,7 @@ u8 func0419_ba8c[] = {
|
||||
label(0x6c)
|
||||
if_saw_death(0x00, /*goto*/ 0x4f)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0f)
|
||||
if_target_chr_in_sight(/*goto*/ 0x02)
|
||||
if_target_in_sight(/*goto*/ 0x02)
|
||||
goto_first(0x00)
|
||||
|
||||
label(0x02)
|
||||
|
||||
@@ -1887,7 +1887,7 @@ u8 func0401_pilot[] = {
|
||||
beginloop(0x00)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x07)
|
||||
if_target_in_sight(/*goto*/ 0x07)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04)
|
||||
endloop(0x00)
|
||||
|
||||
@@ -2201,7 +2201,7 @@ u8 func0404_angry_pilot[] = {
|
||||
|
||||
label(0x04)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x6d)
|
||||
try_run_to_target(/*goto*/ 0x6d)
|
||||
|
||||
beginloop(0x6d)
|
||||
if_in_disarm_range(/*goto*/ 0x07)
|
||||
@@ -2515,7 +2515,7 @@ u8 func0415_elvis_at_start[] = {
|
||||
label(0x07)
|
||||
unset_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1)
|
||||
if_chr_in_room(CHR_SELF, 0x00, 0x0029, /*goto*/ 0x04)
|
||||
set_target_pad(0x0040)
|
||||
set_padpreset(0x0040)
|
||||
goto_next(0x07)
|
||||
|
||||
label(0x04)
|
||||
@@ -2609,7 +2609,7 @@ u8 func0416_elvis_leading[] = {
|
||||
|
||||
label(0x04)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0b)
|
||||
set_target_pad(0x0096)
|
||||
set_padpreset(0x0096)
|
||||
label(0x12)
|
||||
label(0x04)
|
||||
run_to_pad(0x0096)
|
||||
|
||||
@@ -572,7 +572,7 @@ u8 func041e_colleague[] = {
|
||||
|
||||
beginloop(0x04)
|
||||
// Wait until player in sight and not doing idle animations already
|
||||
if_target_chr_in_sight(/*goto*/ 0x2f)
|
||||
if_target_in_sight(/*goto*/ 0x2f)
|
||||
if_chr_idle(/*goto*/ 0x06)
|
||||
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x7f)
|
||||
chr_do_animation(0x0227, 0, -1, 0x14, 0x00, CHR_SELF, 2)
|
||||
@@ -623,7 +623,7 @@ u8 func041e_colleague[] = {
|
||||
try_face_entity(0x0200, 0x0000, /*goto*/ 0x59)
|
||||
|
||||
beginloop(0x59)
|
||||
if_target_chr_in_sight(/*goto*/ 0x06)
|
||||
if_target_in_sight(/*goto*/ 0x06)
|
||||
endloop(0x59)
|
||||
|
||||
label(0x06)
|
||||
@@ -654,7 +654,7 @@ u8 func041e_colleague[] = {
|
||||
|
||||
beginloop(0x0a)
|
||||
if_timer_lt(600, /*goto*/ 0x2f)
|
||||
if_target_chr_in_sight(/*goto*/ 0x06)
|
||||
if_target_in_sight(/*goto*/ 0x06)
|
||||
goto_next(0x2f)
|
||||
|
||||
label(0x06)
|
||||
@@ -2450,7 +2450,7 @@ u8 func0429_grimshaw_disguise[] = {
|
||||
// Wait until Jo in sight
|
||||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x0d)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2f)
|
||||
if_target_in_sight(/*goto*/ 0x2f)
|
||||
if_chr_idle(/*goto*/ 0x06)
|
||||
label(0x7f)
|
||||
call_rng
|
||||
@@ -2639,7 +2639,7 @@ u8 func042a_carrington_cloak[] = {
|
||||
dprint 'I','n','i','t','i','a','l','i','s','e','a',0,
|
||||
|
||||
beginloop(0x04)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2f)
|
||||
if_target_in_sight(/*goto*/ 0x2f)
|
||||
if_chr_idle(/*goto*/ 0x06)
|
||||
label(0x7f)
|
||||
call_rng
|
||||
@@ -2940,7 +2940,7 @@ u8 func042c_carrington_tour[] = {
|
||||
|
||||
label(0x2f)
|
||||
if_chr_sees_player(/*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x08)
|
||||
try_jog_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_sees_player(/*goto*/ 0x06)
|
||||
@@ -4782,7 +4782,7 @@ u8 func0409_holo5_guard2[] = {
|
||||
if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f)
|
||||
if_chr_dying(CHR_SELF, /*goto*/ 0x2f)
|
||||
if_chr_unloaded(CHR_SELF, /*goto*/ 0x2f)
|
||||
if_target_chr_in_sight(/*goto*/ 0x09)
|
||||
if_target_in_sight(/*goto*/ 0x09)
|
||||
unset_self_chrflag(CHRCFLAG_INVINCIBLE_TO_GUNFIRE)
|
||||
set_alertness(0)
|
||||
goto_first(0x08)
|
||||
@@ -5098,7 +5098,7 @@ u8 func0416_holo_guard_unarmed_alert[] = {
|
||||
if_chr_injured_target(CHR_SELF, /*goto*/ 0x09)
|
||||
label(0x8f)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
@@ -5150,7 +5150,7 @@ u8 func0416_holo_guard_unarmed_alert2[] = {
|
||||
if_chr_distance_gt(400, /*goto*/ 0x10)
|
||||
if_chr_distance_lt(100, /*goto*/ 0x06)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0x57)
|
||||
|
||||
+10
-10
@@ -940,7 +940,7 @@ u8 func0404_scientist[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2f)
|
||||
if_target_in_sight(/*goto*/ 0x2f)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x2f)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -2314,8 +2314,8 @@ u8 func0416_intro[] = {
|
||||
endloop(0x08)
|
||||
|
||||
label(0x77)
|
||||
open_door2(0x24)
|
||||
open_door2(0x40)
|
||||
set_door_open(0x24)
|
||||
set_door_open(0x40)
|
||||
unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
|
||||
unset_chr_chrflag(CHR_BOND, CHRCFLAG_00010000)
|
||||
set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
|
||||
@@ -2825,7 +2825,7 @@ u8 func0402_k7_guard[] = {
|
||||
beginloop(0x0f)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
set_follow_chr(CHR_P1P2)
|
||||
set_chrpreset(CHR_P1P2)
|
||||
if_chr_in_room(CHR_TARGET, 0x00, 0x0036, /*goto*/ 0x03)
|
||||
if_chr_in_room(CHR_TARGET, 0x00, 0x0037, /*goto*/ 0x03)
|
||||
if_chr_in_room(CHR_TARGET, 0x00, 0x003a, /*goto*/ 0x03)
|
||||
@@ -2842,7 +2842,7 @@ u8 func0402_k7_guard[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
@@ -2860,7 +2860,7 @@ u8 func0402_k7_guard[] = {
|
||||
beginloop(0x08)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
@@ -2896,7 +2896,7 @@ u8 func0402_k7_guard[] = {
|
||||
beginloop(0x09)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
@@ -2910,7 +2910,7 @@ u8 func0402_k7_guard[] = {
|
||||
beginloop(0x0a)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
@@ -2943,7 +2943,7 @@ u8 func0403_k7_scientist[] = {
|
||||
beginloop(0x08)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
@@ -2973,7 +2973,7 @@ u8 func0403_k7_scientist[] = {
|
||||
beginloop(0x0f)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_near_miss(/*goto*/ 0x0c)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x0c)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0c)
|
||||
|
||||
@@ -1598,7 +1598,7 @@ u8 func0402_taker[] = {
|
||||
goto_first(0x03)
|
||||
|
||||
label(0x10)
|
||||
try_walk_to_target_chr(/*goto*/ 0x0d)
|
||||
try_walk_to_target(/*goto*/ 0x0d)
|
||||
|
||||
beginloop(0x0d)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_NOHEAR, FALSE, BANK_0, /*goto*/ 0x06)
|
||||
@@ -1794,7 +1794,7 @@ u8 func0404_sniper[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
dprint 'S','T','A','R','T','\n',0,
|
||||
if_target_chr_in_sight(/*goto*/ 0x58)
|
||||
if_target_in_sight(/*goto*/ 0x58)
|
||||
|
||||
// Choose a direction to face
|
||||
call_rng
|
||||
@@ -1825,7 +1825,7 @@ u8 func0404_sniper[] = {
|
||||
beginloop(0x0a)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x58)
|
||||
if_target_in_sight(/*goto*/ 0x58)
|
||||
if_saw_death(0x00, /*goto*/ 0x58)
|
||||
if_saw_injury(0x00, /*goto*/ 0x58)
|
||||
dprint 'F','A','C','E','\n',0,
|
||||
@@ -1860,7 +1860,7 @@ u8 func0404_sniper[] = {
|
||||
yield
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x58)
|
||||
if_target_in_sight(/*goto*/ 0x58)
|
||||
if_saw_death(0x00, /*goto*/ 0x58)
|
||||
if_saw_injury(0x00, /*goto*/ 0x58)
|
||||
dprint 'R','U','N','\n',0,
|
||||
|
||||
+13
-13
@@ -690,16 +690,16 @@ u8 func0408_clone3[] = {
|
||||
u8 func0413_defend_pad[] = {
|
||||
set_shotlist(AILIST_DEFEND_PAD)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0a)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x08)
|
||||
|
||||
// Distance to pad >= 200
|
||||
label(0x03)
|
||||
jog_to_pad(TARGET_PAD)
|
||||
jog_to_pad(PAD_PRESET)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0a)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x08)
|
||||
endloop(0x04)
|
||||
|
||||
// At pad
|
||||
@@ -709,7 +709,7 @@ u8 func0413_defend_pad[] = {
|
||||
beginloop(0x0b)
|
||||
dprint 'A','T',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x0a)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, TARGET_PAD, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x08)
|
||||
endloop(0x0b)
|
||||
|
||||
label(0x08)
|
||||
@@ -1609,7 +1609,7 @@ u8 func0414_firingrange_hostage[] = {
|
||||
goto_next(0x12)
|
||||
|
||||
label(0x03)
|
||||
jog_to_pad(TARGET_PAD)
|
||||
jog_to_pad(PAD_PRESET)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
@@ -1974,11 +1974,11 @@ u8 func0425_hostage_thank_and_run[] = {
|
||||
label(0x03)
|
||||
set_target_chr(CHR_COOP)
|
||||
if_chr_sees_player(/*goto*/ 0x2e)
|
||||
set_follow_chr(CHR_BOND)
|
||||
set_chrpreset(CHR_BOND)
|
||||
goto_next(0x08)
|
||||
|
||||
label(0x2e)
|
||||
set_follow_chr(CHR_COOP)
|
||||
set_chrpreset(CHR_COOP)
|
||||
|
||||
label(0x08)
|
||||
restart_timer
|
||||
@@ -2066,11 +2066,11 @@ u8 func0427_drop_devastator[] = {
|
||||
label(0x03)
|
||||
set_target_chr(CHR_COOP)
|
||||
if_chr_sees_player(/*goto*/ 0x2e)
|
||||
set_follow_chr(CHR_BOND)
|
||||
set_chrpreset(CHR_BOND)
|
||||
goto_next(0x08)
|
||||
|
||||
label(0x2e)
|
||||
set_follow_chr(CHR_COOP)
|
||||
set_chrpreset(CHR_COOP)
|
||||
|
||||
label(0x08)
|
||||
restart_timer
|
||||
@@ -2252,7 +2252,7 @@ u8 func042e_taker_device_m[] = {
|
||||
beginloop(0x0a)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x08)
|
||||
if_target_in_sight(/*goto*/ 0x08)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x08)
|
||||
endloop(0x0a)
|
||||
|
||||
@@ -2304,7 +2304,7 @@ u8 func0430_taker_device_f[] = {
|
||||
beginloop(0x0a)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x08)
|
||||
if_target_in_sight(/*goto*/ 0x08)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x08)
|
||||
endloop(0x0a)
|
||||
|
||||
@@ -3028,7 +3028,7 @@ u8 func040c_init_clone4[] = {
|
||||
|
||||
u8 func040b_clone4[] = {
|
||||
set_target_chr(CHR_BOND)
|
||||
try_run_to_target_chr(/*goto*/ 0x2e)
|
||||
try_run_to_target(/*goto*/ 0x2e)
|
||||
label(0x2e)
|
||||
set_ailist(CHR_SELF, GAILIST_ALERTED)
|
||||
endlist
|
||||
@@ -3147,7 +3147,7 @@ u8 func0412_init_clone6[] = {
|
||||
|
||||
u8 func0411_clone6[] = {
|
||||
set_target_chr(CHR_BOND)
|
||||
try_run_to_target_chr(/*goto*/ 0x2e)
|
||||
try_run_to_target(/*goto*/ 0x2e)
|
||||
label(0x2e)
|
||||
set_ailist(CHR_SELF, GAILIST_ALERTED)
|
||||
endlist
|
||||
|
||||
+22
-22
@@ -713,7 +713,7 @@ u8 func040e_elvis_give_ar34[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
set_follow_chr(CHR_P1P2)
|
||||
set_chrpreset(CHR_P1P2)
|
||||
if_chr_sees_player(/*goto*/ 0x2c)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -726,7 +726,7 @@ u8 func040e_elvis_give_ar34[] = {
|
||||
// Run towards player
|
||||
label(0x0a)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x09)
|
||||
try_run_to_target(/*goto*/ 0x09)
|
||||
|
||||
beginloop(0x09)
|
||||
set_target_chr(CHR_PRESET)
|
||||
@@ -825,11 +825,11 @@ u8 func0409_elvis_follow[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(500, /*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x04)
|
||||
try_jog_to_target(/*goto*/ 0x04)
|
||||
|
||||
// Distance < 200 or distance > 500
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_NAVIGATION_ROOM_DONE, TRUE, /*goto*/ 0x2c)
|
||||
@@ -875,7 +875,7 @@ u8 func0409_elvis_follow[] = {
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c)
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0x2c)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0x2c)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x06)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x06)
|
||||
label(0x2c)
|
||||
goto_first(0x03)
|
||||
|
||||
@@ -1001,7 +1001,7 @@ u8 func040a_elvis_go_to_hangar_lift[] = {
|
||||
goto_next(0xc3)
|
||||
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
if_timer_gt(60, /*goto*/ 0x2c)
|
||||
@@ -1147,7 +1147,7 @@ u8 func0410_wake_suspendedanim_skedar[] = {
|
||||
set_recovery_speed(0)
|
||||
set_shield(0)
|
||||
set_target_chr(CHR_BOND)
|
||||
try_walk_to_target_chr(/*goto*/ 0x2c)
|
||||
try_walk_to_target(/*goto*/ 0x2c)
|
||||
|
||||
label(0x2c)
|
||||
set_shotlist(GAILIST_RELATED_TO_SPAWNING)
|
||||
@@ -1486,7 +1486,7 @@ u8 func0408_knifeable_skedar[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_stage_flag_eq(STAGEFLAG_CASS_AT_PAD, TRUE, /*goto*/ 0x06)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
set_target_chr(CHR_CASS)
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x0c)
|
||||
endloop(0x04)
|
||||
@@ -1508,7 +1508,7 @@ u8 func0408_knifeable_skedar[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x0c)
|
||||
endloop(0x0a)
|
||||
|
||||
@@ -1522,7 +1522,7 @@ u8 func0408_knifeable_skedar[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_timer_gt(600, /*goto*/ 0x06)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x0c)
|
||||
set_target_chr(CHR_CASS)
|
||||
endloop(0x0b)
|
||||
@@ -1539,7 +1539,7 @@ u8 func0408_knifeable_skedar[] = {
|
||||
dprint 'W','A','I','T','I','N','G',' ','T','W','O','\n',0,
|
||||
if_chr_stopped(/*goto*/ 0x0d)
|
||||
label(0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0c)
|
||||
if_target_in_sight(/*goto*/ 0x0c)
|
||||
label(0x2c)
|
||||
endloop(0x0a)
|
||||
|
||||
@@ -1740,12 +1740,12 @@ u8 func0419_hangar_maian[] = {
|
||||
// to go to the label 0x06 just prior to "AT PAD", but that is not the next
|
||||
// label from here. Also, SPEED_RUN will always be used because SPEED_JOG
|
||||
// lacks a goto_next 0x04.
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
|
||||
// Distance to pad >= 200
|
||||
label(0x03)
|
||||
restart_timer
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 500, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 500, PAD_PRESET, /*goto*/ 0x06)
|
||||
go_to_target_pad(SPEED_JOG)
|
||||
|
||||
// Intended: Distance to pad > 500
|
||||
@@ -1756,7 +1756,7 @@ u8 func0419_hangar_maian[] = {
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
if_timer_gt(60, /*goto*/ 0x2c)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -1771,7 +1771,7 @@ u8 func0419_hangar_maian[] = {
|
||||
beginloop(0x09)
|
||||
dprint 'A','T',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x06)
|
||||
endloop(0x09)
|
||||
|
||||
label(0x06)
|
||||
@@ -2293,7 +2293,7 @@ u8 func041a_bridgeclone[] = {
|
||||
if_chr_distance_lt(150, /*goto*/ 0x2e)
|
||||
label(0xc5)
|
||||
restart_timer
|
||||
try_walk_to_target_chr(/*goto*/ 0x08)
|
||||
try_walk_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_dying(CHR_SELF, /*goto*/ 0xb8)
|
||||
@@ -2305,7 +2305,7 @@ u8 func041a_bridgeclone[] = {
|
||||
|
||||
label(0x09)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x0a)
|
||||
try_run_to_target(/*goto*/ 0x0a)
|
||||
|
||||
// Start running
|
||||
beginloop(0x0a)
|
||||
@@ -2990,7 +2990,7 @@ u8 func0421_bridge_skedar[] = {
|
||||
label(0x2c)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0xc8)
|
||||
if_target_in_sight(/*goto*/ 0xc8)
|
||||
label(0x06)
|
||||
if_saw_injury(0x00, /*goto*/ 0xc8)
|
||||
if_near_miss(/*goto*/ 0xc9)
|
||||
@@ -3000,7 +3000,7 @@ u8 func0421_bridge_skedar[] = {
|
||||
|
||||
label(0x06)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x2c)
|
||||
if_target_chr_in_sight(/*goto*/ 0xc8)
|
||||
if_target_in_sight(/*goto*/ 0xc8)
|
||||
label(0x2c)
|
||||
set_target_chr(CHR_BOND)
|
||||
endloop(0xc7)
|
||||
@@ -3045,7 +3045,7 @@ u8 func0421_bridge_skedar[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0xce)
|
||||
if_target_in_sight(/*goto*/ 0xce)
|
||||
label(0x06)
|
||||
if_timer_gt(60, /*goto*/ 0xcf)
|
||||
if_rand_lt(4, /*goto*/ 0xcf)
|
||||
@@ -3216,7 +3216,7 @@ u8 func0423_shy_skedar[] = {
|
||||
label(0x03)
|
||||
set_target_chr(CHR_CASS)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
@@ -3236,7 +3236,7 @@ u8 func0423_shy_skedar[] = {
|
||||
beginloop(0x09)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, 0x00da, /*goto*/ 0x2d)
|
||||
if_chr_stopped(/*goto*/ 0x2d)
|
||||
endloop(0x09)
|
||||
|
||||
+11
-11
@@ -1344,7 +1344,7 @@ u8 func0410_labtech_showers_sa_pa[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x03)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -1451,7 +1451,7 @@ u8 func0410_labtech_showers_sa_pa[] = {
|
||||
if_rand_gt(25, /*goto*/ 0x06)
|
||||
speak(CHR_TARGET, 0x2a2d, 0x1b34, CHANNEL_4, COLOR_08_RED) // "Give me my clothes."
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x6f)
|
||||
try_run_to_target(/*goto*/ 0x6f)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x6f)
|
||||
@@ -1718,7 +1718,7 @@ u8 func0418_doorman[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x03)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -1951,7 +1951,7 @@ u8 func041a_labtech_harrysmate[] = {
|
||||
|
||||
beginloop(0x08)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x2d)
|
||||
endloop(0x08)
|
||||
|
||||
@@ -2047,7 +2047,7 @@ u8 func041b_labtech_keycardguy[] = {
|
||||
beginloop(0x08)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d)
|
||||
endloop(0x08)
|
||||
|
||||
@@ -2436,7 +2436,7 @@ u8 func0415_warehouse_spawner[] = {
|
||||
u8 func0417_warehouse_clone[] = {
|
||||
set_target_chr(CHR_BOND)
|
||||
set_alertness(100)
|
||||
try_run_to_target_chr(/*goto*/ 0x2d)
|
||||
try_run_to_target(/*goto*/ 0x2d)
|
||||
label(0x2d)
|
||||
set_returnlist(CHR_SELF, GAILIST_UNALERTED)
|
||||
set_ailist(CHR_SELF, GAILIST_UNALERTED)
|
||||
@@ -2618,7 +2618,7 @@ u8 func041f_labtech_lights[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_00002000, TRUE, BANK_0, /*goto*/ 0x53)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
if_chr_idle(/*goto*/ 0x06)
|
||||
goto_first(0x5e)
|
||||
|
||||
@@ -2682,7 +2682,7 @@ u8 func041f_labtech_lights[] = {
|
||||
label(0x0a)
|
||||
set_target_chr(CHR_BOND)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x0b)
|
||||
try_run_to_target(/*goto*/ 0x0b)
|
||||
|
||||
beginloop(0x0b)
|
||||
if_timer_gt(60, /*goto*/ 0x06)
|
||||
@@ -2703,7 +2703,7 @@ u8 func041f_labtech_lights[] = {
|
||||
beginloop(0x0d)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0f)
|
||||
label(0x2d)
|
||||
if_chr_weapon_equipped(CHR_TARGET, WEAPON_NONE, /*goto*/ 0x2d)
|
||||
@@ -2741,7 +2741,7 @@ u8 func041f_labtech_lights[] = {
|
||||
beginloop(0x0e)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2d)
|
||||
if_target_in_sight(/*goto*/ 0x2d)
|
||||
if_saw_injury(0x00, /*goto*/ 0x0f)
|
||||
label(0x2d)
|
||||
if_chr_weapon_equipped(CHR_TARGET, WEAPON_NONE, /*goto*/ 0x2d)
|
||||
@@ -3065,7 +3065,7 @@ u8 func0422_labtech_records[] = {
|
||||
label(0x2d)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x03)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x03)
|
||||
goto_first(0x04)
|
||||
|
||||
@@ -1597,7 +1597,7 @@ u8 func0416_mechanic[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_stage_flag_eq(STAGEFLAG_TRIGGER_INTERCEPTOR, TRUE, /*goto*/ 0x2f)
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x2e)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2e)
|
||||
if_target_in_sight(/*goto*/ 0x2e)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
endloop(0x09)
|
||||
|
||||
@@ -1619,7 +1619,7 @@ u8 func0416_mechanic[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_heard_target_recently(/*goto*/ 0x2e)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2e)
|
||||
if_target_in_sight(/*goto*/ 0x2e)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
endloop(0x0d)
|
||||
|
||||
@@ -2887,7 +2887,7 @@ u8 func0421_activate_autogun[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2e)
|
||||
if_target_in_sight(/*goto*/ 0x2e)
|
||||
if_heard_target_recently(/*goto*/ 0x2e)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2e)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -169,16 +169,16 @@ u8 func0403_init_some_sound[] = {
|
||||
u8 func0407_defend_pad[] = {
|
||||
set_shotlist(0x0407)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0xa5)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x01)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x01)
|
||||
|
||||
// Go to target pad, but stop when seen player or when near pad
|
||||
label(0xdb)
|
||||
jog_to_pad(TARGET_PAD)
|
||||
jog_to_pad(PAD_PRESET)
|
||||
label(0xdc)
|
||||
yield
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0xa5)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x01)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x01)
|
||||
goto_first(0xdc)
|
||||
|
||||
// Near pad. Wait until detected player.
|
||||
@@ -188,7 +188,7 @@ u8 func0407_defend_pad[] = {
|
||||
yield
|
||||
dprint 'A','T',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0xa5)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, TARGET_PAD, /*goto*/ 0x01)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x01)
|
||||
goto_first(0xa6)
|
||||
|
||||
label(0x01)
|
||||
|
||||
+10
-10
@@ -801,11 +801,11 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x04)
|
||||
try_jog_to_target(/*goto*/ 0x04)
|
||||
|
||||
// Jo distance < 200 or distance > 300
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
if_self_flag_bankx_eq(CHRFLAG1_00000001, TRUE, BANK_1, /*goto*/ 0x2e)
|
||||
@@ -974,9 +974,9 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x04)
|
||||
try_jog_to_target(/*goto*/ 0x04)
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_AGENT_MEGAWEAPON_DISABLED, TRUE, /*goto*/ 0x2e)
|
||||
@@ -1111,9 +1111,9 @@ u8 func0405_elvis_follow_nocombat[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x04)
|
||||
try_jog_to_target(/*goto*/ 0x04)
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
label(0x2e)
|
||||
@@ -1367,9 +1367,9 @@ u8 func0403_elvis_give_farsight[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x06)
|
||||
try_jog_to_target_chr(/*goto*/ 0x04)
|
||||
try_jog_to_target(/*goto*/ 0x04)
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
@@ -3194,7 +3194,7 @@ u8 func041d_sniper[] = {
|
||||
|
||||
label(0x06)
|
||||
dprint '2','\n',0,
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
goto_next(0x06)
|
||||
|
||||
// Unreachable
|
||||
@@ -3441,7 +3441,7 @@ u8 func040f_miniskedar[] = {
|
||||
restart_timer
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06)
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x0a)
|
||||
try_run_to_target(/*goto*/ 0x0a)
|
||||
|
||||
beginloop(0x0a)
|
||||
if_chr_sees_player(/*goto*/ 0x2e)
|
||||
|
||||
+16
-16
@@ -976,7 +976,7 @@ u8 func040c_taxi[] = {
|
||||
};
|
||||
|
||||
#define tracerbug_logic(chr, chr2) \
|
||||
set_follow_chr(chr) \
|
||||
set_chrpreset(chr) \
|
||||
if_difficulty_lt(DIFF_PA, /*goto*/ 0x54) \
|
||||
goto_next(0x04) \
|
||||
\
|
||||
@@ -1374,7 +1374,7 @@ u8 func0412_cia[] = {
|
||||
label(0x03)
|
||||
unset_self_flag_bankx(CHRFLAG1_DONE_SEARCH_ANIM, BANK_1)
|
||||
cmd0049(0x003e, /*goto*/ 0x04)
|
||||
set_target_pad(0x00ba)
|
||||
set_padpreset(0x00ba)
|
||||
goto_next(0x03)
|
||||
|
||||
label(0x04)
|
||||
@@ -1399,7 +1399,7 @@ u8 func0412_cia[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_saw_death(0x00, /*goto*/ 0x1d)
|
||||
if_saw_injury(0x00, /*goto*/ 0x1e)
|
||||
if_target_chr_in_sight(/*goto*/ 0x04)
|
||||
if_target_in_sight(/*goto*/ 0x04)
|
||||
if_chr_stopped(/*goto*/ 0x35)
|
||||
endloop(0x36)
|
||||
|
||||
@@ -1409,7 +1409,7 @@ u8 func0412_cia[] = {
|
||||
label(0x37)
|
||||
if_saw_death(0x00, /*goto*/ 0x1d)
|
||||
if_saw_injury(0x00, /*goto*/ 0x1e)
|
||||
if_target_chr_in_sight(/*goto*/ 0x04)
|
||||
if_target_in_sight(/*goto*/ 0x04)
|
||||
goto_first(0x10)
|
||||
|
||||
label(0x04)
|
||||
@@ -1574,7 +1574,7 @@ u8 func0413_bugspotter[] = {
|
||||
beginloop(0x10)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x04)
|
||||
if_target_in_sight(/*goto*/ 0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_LIMO_READY_TO_LEAVE, TRUE, /*goto*/ LABEL_RUN_AWAY)
|
||||
if_stage_flag_eq(STAGEFLAG_TRACERBUG_PLACED, TRUE, /*goto*/ LABEL_RUN_AWAY)
|
||||
if_stage_flag_eq(STAGEFLAG_TAXI_READY_TO_CRASH, TRUE, /*goto*/ LABEL_RUN_AWAY)
|
||||
@@ -1615,10 +1615,10 @@ u8 func0413_bugspotter[] = {
|
||||
label(0x03)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
goto_next(0x0a)
|
||||
label(0x03)
|
||||
if_stage_flag_eq(STAGEFLAG_TRACERBUG_SAFE, TRUE, /*goto*/ 0x0a)
|
||||
@@ -1828,7 +1828,7 @@ u8 func041d_fbi[] = {
|
||||
goto_next(0x16)
|
||||
|
||||
label(0x04)
|
||||
if_target_chr_in_sight(/*goto*/ 0x18)
|
||||
if_target_in_sight(/*goto*/ 0x18)
|
||||
if_near_miss(/*goto*/ 0x18)
|
||||
if_num_times_shot_gt(0, /*goto*/ 0x18)
|
||||
if_hears_gunfire(/*goto*/ 0x16)
|
||||
@@ -1848,14 +1848,14 @@ u8 func041d_fbi[] = {
|
||||
|
||||
label(0x04)
|
||||
dprint 'T','R','A','C','K',' ','P','L','A','Y','E','R','\n',0,
|
||||
try_jog_to_target_chr(/*goto*/ 0x06)
|
||||
try_jog_to_target(/*goto*/ 0x06)
|
||||
|
||||
beginloop(0x06)
|
||||
if_chr_distance_lt(500, /*goto*/ 0x18)
|
||||
if_target_chr_in_sight(/*goto*/ 0x18)
|
||||
if_target_in_sight(/*goto*/ 0x18)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x18)
|
||||
if_target_in_sight(/*goto*/ 0x18)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
endloop(0x06)
|
||||
@@ -1977,7 +1977,7 @@ u8 func041a_robot[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_stage_flag_eq(STAGEFLAG_TRIGGER_CRASH, TRUE, /*goto*/ 0x01)
|
||||
if_target_chr_in_sight(/*goto*/ 0x08)
|
||||
if_target_in_sight(/*goto*/ 0x08)
|
||||
call_rng
|
||||
if_rand_gt(5, /*goto*/ 0x03)
|
||||
if_sound_finished(CHANNEL_5, /*goto*/ 0x04)
|
||||
@@ -2033,7 +2033,7 @@ u8 func041a_robot[] = {
|
||||
if_stage_flag_eq(STAGEFLAG_TRIGGER_CRASH, TRUE, /*goto*/ 0x01)
|
||||
if_timer_gt(120, /*goto*/ 0x04)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_00002000, FALSE, BANK_0, /*goto*/ 0x2a)
|
||||
if_target_chr_in_sight(/*goto*/ 0x03)
|
||||
if_target_in_sight(/*goto*/ 0x03)
|
||||
label(0x2a)
|
||||
endloop(0x05)
|
||||
|
||||
@@ -2103,7 +2103,7 @@ u8 func041e_sealer1[] = {
|
||||
goto_next(LABEL_ALERTED)
|
||||
|
||||
label(0x04)
|
||||
if_target_chr_in_sight(/*goto*/ LABEL_ALERTED)
|
||||
if_target_in_sight(/*goto*/ LABEL_ALERTED)
|
||||
if_near_miss(/*goto*/ LABEL_ALERTED)
|
||||
if_num_times_shot_gt(0, /*goto*/ LABEL_ALERTED)
|
||||
if_hears_gunfire(/*goto*/ LABEL_ALERTED)
|
||||
@@ -2678,8 +2678,8 @@ u8 func040b_outro[] = {
|
||||
set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
|
||||
set_chr_chrflag(0xf1, CHRCFLAG_HIDDEN)
|
||||
set_ailist(CHR_P1P2, GAILIST_IDLE)
|
||||
open_door2(0x10)
|
||||
open_door2(0x11)
|
||||
set_door_open(0x10)
|
||||
set_door_open(0x11)
|
||||
hide_object(OBJ_TAXI)
|
||||
hide_object(OBJ_LIMO)
|
||||
hide_chr(CHR_SEALER1)
|
||||
|
||||
+19
-19
@@ -1411,7 +1411,7 @@ u8 func0405_president_in_room[] = {
|
||||
endloop(0x0e)
|
||||
|
||||
label(0x06)
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
set_chr_maxdamage(CHR_SELF, 500)
|
||||
set_shotlist(AILIST_PRESIDENT_RUNNING)
|
||||
set_ailist(CHR_SELF, AILIST_PRESIDENT_RUNNING)
|
||||
@@ -1519,7 +1519,7 @@ u8 func0404_president_running[] = {
|
||||
label(0x58)
|
||||
restart_timer
|
||||
label(0x2d)
|
||||
try_jog_to_target_chr(/*goto*/ 0x59)
|
||||
try_jog_to_target(/*goto*/ 0x59)
|
||||
|
||||
beginloop(0x59)
|
||||
// @bug: This FALSE should be TRUE instead. This causes the president
|
||||
@@ -1556,7 +1556,7 @@ u8 func0404_president_running[] = {
|
||||
|
||||
// Unreachable
|
||||
label(0x5c)
|
||||
try_run_to_target_chr(/*goto*/ 0x5d)
|
||||
try_run_to_target(/*goto*/ 0x5d)
|
||||
|
||||
beginloop(0x5d)
|
||||
if_stage_flag_eq(STAGEFLAG_BOTH_BLONDES_DEAD, FALSE, /*goto*/ 0x2d)
|
||||
@@ -1780,7 +1780,7 @@ u8 func0413_taker[] = {
|
||||
|
||||
label(0x2d)
|
||||
if_target_is_player(/*goto*/ 0x11)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x2d)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x2d)
|
||||
goto_next(0x11)
|
||||
|
||||
label(0x2d)
|
||||
@@ -2336,15 +2336,15 @@ u8 func040a_defend_pad[] = {
|
||||
// Not injured
|
||||
label(0x06)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
|
||||
label(0x03)
|
||||
jog_to_pad(TARGET_PAD)
|
||||
jog_to_pad(PAD_PRESET)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
@@ -2353,7 +2353,7 @@ u8 func040a_defend_pad[] = {
|
||||
beginloop(0x09)
|
||||
dprint 'A','T',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x06)
|
||||
endloop(0x09)
|
||||
|
||||
label(0x06)
|
||||
@@ -2688,7 +2688,7 @@ u8 func041c_init_clone3[] = {
|
||||
|
||||
u8 func041d_clone3[] = {
|
||||
set_target_chr(CHR_BOND)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
label(0x04)
|
||||
yield
|
||||
set_returnlist(CHR_SELF, AILIST_CLONE3)
|
||||
@@ -2755,13 +2755,13 @@ u8 func041e_blonde[] = {
|
||||
label(0x2d)
|
||||
chr_toggle_p1p2(CHR_P1P2)
|
||||
set_target_chr(CHR_BOND)
|
||||
if_target_chr_in_sight(/*goto*/ 0x6a)
|
||||
if_target_in_sight(/*goto*/ 0x6a)
|
||||
if_near_miss(/*goto*/ 0x6b)
|
||||
label(0x2d)
|
||||
reloop(0x75)
|
||||
|
||||
label(0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x6a)
|
||||
if_target_in_sight(/*goto*/ 0x6a)
|
||||
label(0x2d)
|
||||
endloop(0x75)
|
||||
|
||||
@@ -2806,7 +2806,7 @@ u8 func041e_blonde[] = {
|
||||
|
||||
label(0x6f)
|
||||
call_rng
|
||||
if_target_chr_in_sight(/*goto*/ 0x70)
|
||||
if_target_in_sight(/*goto*/ 0x70)
|
||||
if_timer_gt(60, /*goto*/ 0x71)
|
||||
if_rand_lt(4, /*goto*/ 0x71)
|
||||
goto_first(0x6f)
|
||||
@@ -2893,7 +2893,7 @@ u8 func0420_trent_attacking[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
try_unset_chr_flag_bank3_02000000(CHR_SELF, /*goto*/ 0x2d)
|
||||
set_target_chr(CHR_PRESIDENT)
|
||||
if_target_chr_in_sight(/*goto*/ 0x06)
|
||||
if_target_in_sight(/*goto*/ 0x06)
|
||||
if_stage_flag_eq(STAGEFLAG_ONE_BLONDE_DEAD, TRUE, /*goto*/ 0x2d)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -3182,20 +3182,20 @@ u8 func0407_steward[] = {
|
||||
label(0x79)
|
||||
walk_to_pad(0x00c1)
|
||||
set_morale(1)
|
||||
set_target_pad(0x00c2)
|
||||
set_padpreset(0x00c2)
|
||||
goto_next(0x87)
|
||||
|
||||
label(0x60)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 50, 0x00c3, /*goto*/ 0x77)
|
||||
walk_to_pad(0x00c3)
|
||||
set_morale(2)
|
||||
set_target_pad(0x00c4)
|
||||
set_padpreset(0x00c4)
|
||||
goto_next(0x87)
|
||||
|
||||
label(0x77)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 50, 0x00c1, /*goto*/ 0x78)
|
||||
set_morale(3)
|
||||
set_target_pad(0x00c6)
|
||||
set_padpreset(0x00c6)
|
||||
walk_to_pad(0x00c5)
|
||||
goto_next(0x87)
|
||||
|
||||
@@ -3205,13 +3205,13 @@ u8 func0407_steward[] = {
|
||||
beginloop(0x87)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x89)
|
||||
if_target_in_sight(/*goto*/ 0x89)
|
||||
if_saw_injury(0x00, /*goto*/ 0x89)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
endloop(0x87)
|
||||
|
||||
label(0x06)
|
||||
try_face_entity(ENTITYTYPE_PAD, TARGET_PAD, /*goto*/ 0x88)
|
||||
try_face_entity(ENTITYTYPE_PAD, PAD_PRESET, /*goto*/ 0x88)
|
||||
|
||||
beginloop(0x88)
|
||||
if_chr_stopped(/*goto*/ 0x06)
|
||||
@@ -3222,7 +3222,7 @@ u8 func0407_steward[] = {
|
||||
|
||||
chr_do_animation(ANIM_OPERATE_0204, 0, -1, 0x10, 0x10, CHR_SELF, 2)
|
||||
label(0x2d)
|
||||
if_target_chr_in_sight(/*goto*/ 0x89)
|
||||
if_target_in_sight(/*goto*/ 0x89)
|
||||
if_saw_injury(0x00, /*goto*/ 0x89)
|
||||
endloop(0x03)
|
||||
|
||||
|
||||
+12
-12
@@ -527,7 +527,7 @@ u8 func0402_unarmed_skedar[] = {
|
||||
stop_chr
|
||||
if_self_flag_bankx_eq(CHRFLAG0_00000004, FALSE, BANK_0, /*goto*/ 0x03)
|
||||
set_action(MA_TRACKING, TRUE)
|
||||
try_run_to_target_chr(/*goto*/ 0x03)
|
||||
try_run_to_target(/*goto*/ 0x03)
|
||||
|
||||
beginloop(0x03)
|
||||
if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA)
|
||||
@@ -570,7 +570,7 @@ u8 func0402_unarmed_skedar[] = {
|
||||
restart_timer
|
||||
set_action(MA_WAITING, TRUE)
|
||||
say_quip(CHR_BOND, 0x03, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00)
|
||||
try_walk_to_target_chr(/*goto*/ 0x08)
|
||||
try_walk_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA)
|
||||
@@ -588,7 +588,7 @@ u8 func0402_unarmed_skedar[] = {
|
||||
label(0x2d)
|
||||
restart_timer
|
||||
set_action(MA_TRACKING, TRUE)
|
||||
try_run_to_target_chr(/*goto*/ 0x0b)
|
||||
try_run_to_target(/*goto*/ 0x0b)
|
||||
|
||||
beginloop(0x0b)
|
||||
if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ 0x10)
|
||||
@@ -780,7 +780,7 @@ u8 func0404_miniskedar[] = {
|
||||
|
||||
label(0x2d)
|
||||
label(0x06)
|
||||
try_run_to_target_chr(/*goto*/ 0x0b)
|
||||
try_run_to_target(/*goto*/ 0x0b)
|
||||
|
||||
beginloop(0x0b)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ 0x2e)
|
||||
@@ -887,7 +887,7 @@ u8 func0408_cloaked_skedar[] = {
|
||||
|
||||
// King is alive
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_chr_distance_to_pad_lt(CHR_P1P2, 300, TARGET_PAD, /*goto*/ 0x2d)
|
||||
if_chr_distance_to_pad_lt(CHR_P1P2, 300, PAD_PRESET, /*goto*/ 0x2d)
|
||||
|
||||
// 1 in 256 chance of making skedar roar sound
|
||||
call_rng
|
||||
@@ -920,7 +920,7 @@ u8 func0404_miniskedar_spawner[] = {
|
||||
// Wait until player near trigger pad
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_chr_distance_to_pad_lt(CHR_P1P2, 300, TARGET_PAD, /*goto*/ 0x4f)
|
||||
if_chr_distance_to_pad_lt(CHR_P1P2, 300, PAD_PRESET, /*goto*/ 0x4f)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x4f)
|
||||
@@ -1695,7 +1695,7 @@ u8 func0409_reaper_slayer_skedar[] = {
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x60)
|
||||
label(0x2e)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x60)
|
||||
if_target_in_sight(/*goto*/ 0x60)
|
||||
label(0x06)
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x58)
|
||||
label(0x2d)
|
||||
@@ -1707,7 +1707,7 @@ u8 func0409_reaper_slayer_skedar[] = {
|
||||
|
||||
label(0x06)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x2d)
|
||||
if_target_chr_in_sight(/*goto*/ 0x60)
|
||||
if_target_in_sight(/*goto*/ 0x60)
|
||||
label(0x2d)
|
||||
set_target_chr(CHR_BOND)
|
||||
goto_first(0x5f)
|
||||
@@ -1759,7 +1759,7 @@ u8 func0409_reaper_slayer_skedar[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x6b)
|
||||
if_target_in_sight(/*goto*/ 0x6b)
|
||||
label(0x06)
|
||||
if_timer_gt(60, /*goto*/ 0x6c)
|
||||
if_rand_lt(4, /*goto*/ 0x6c)
|
||||
@@ -1878,7 +1878,7 @@ u8 func040b_mauler_skedar[] = {
|
||||
label(0x2d)
|
||||
set_alertness(100)
|
||||
set_target_chr(CHR_BOND)
|
||||
try_jog_to_target_chr(/*goto*/ 0x2d)
|
||||
try_jog_to_target(/*goto*/ 0x2d)
|
||||
label(0x2d)
|
||||
set_shotlist(GAILIST_COMBAT_WITH_TARGET)
|
||||
set_returnlist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
|
||||
@@ -2112,7 +2112,7 @@ u8 func040d_king_combat[] = {
|
||||
goto_next(0x88)
|
||||
|
||||
label(0x2d)
|
||||
chr_move_to_pad(CHR_SELF, TARGET_PAD, 0x00, /*goto*/ 0x2d)
|
||||
chr_move_to_pad(CHR_SELF, PAD_PRESET, 0x00, /*goto*/ 0x2d)
|
||||
goto_next(0x88)
|
||||
|
||||
label(0x2d)
|
||||
@@ -2121,7 +2121,7 @@ u8 func040d_king_combat[] = {
|
||||
|
||||
label(0x8a)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x08)
|
||||
try_run_to_target(/*goto*/ 0x08)
|
||||
|
||||
beginloop(0x08)
|
||||
if_chr_death_animation_finished(CHR_P1P2, /*goto*/ 0x0b)
|
||||
|
||||
@@ -344,11 +344,11 @@ u8 func0401_defend[] = {
|
||||
// Not dying - go to pad
|
||||
label(0x06)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
|
||||
label(0x03)
|
||||
restart_timer
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 500, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 500, PAD_PRESET, /*goto*/ 0x06)
|
||||
go_to_target_pad(SPEED_JOG)
|
||||
|
||||
label(0x06)
|
||||
@@ -358,7 +358,7 @@ u8 func0401_defend[] = {
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
|
||||
if_timer_gt(60, /*goto*/ 0x2d)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -373,7 +373,7 @@ u8 func0401_defend[] = {
|
||||
// Wait for enemy to come into sight, or to be pushed away from pad
|
||||
beginloop(0x09)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, TARGET_PAD, /*goto*/ 0x06)
|
||||
if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x06)
|
||||
endloop(0x09)
|
||||
|
||||
// Pushed away from pad - return to it
|
||||
@@ -539,7 +539,7 @@ u8 func0404_maian[] = {
|
||||
|
||||
// Go to king
|
||||
label(0x2d)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
@@ -884,7 +884,7 @@ u8 func0406_skedar[] = {
|
||||
|
||||
// Go to Maian leader
|
||||
set_target_chr(CHR_MAIAN_LEADER)
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
|
||||
|
||||
@@ -923,11 +923,11 @@ u8 func0404_jonathan_following_and_mine[] = {
|
||||
if_chr_distance_lt(300, /*goto*/ 0x32)
|
||||
|
||||
// distance >= 300
|
||||
try_run_to_target_chr(/*goto*/ 0x5d)
|
||||
try_run_to_target(/*goto*/ 0x5d)
|
||||
|
||||
// distance > 200 and distance < 300
|
||||
label(0x32)
|
||||
try_walk_to_target_chr(/*goto*/ 0x5d)
|
||||
try_walk_to_target(/*goto*/ 0x5d)
|
||||
|
||||
// Moving towards Jo
|
||||
label(0x5d)
|
||||
@@ -1109,7 +1109,7 @@ u8 func0413_jonathan_hangar[] = {
|
||||
if_chr_distance_gt(400, /*goto*/ 0x32)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_chr_distance_gt(400, /*goto*/ 0x32)
|
||||
if_target_chr_in_sight(/*goto*/ 0x06)
|
||||
if_target_in_sight(/*goto*/ 0x06)
|
||||
label(0x32)
|
||||
endloop(0x14)
|
||||
|
||||
@@ -2002,7 +2002,7 @@ u8 func040b_elvis_follow[] = {
|
||||
|
||||
label(0x5c)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x5d)
|
||||
try_run_to_target(/*goto*/ 0x5d)
|
||||
|
||||
label(0x5d)
|
||||
restart_timer
|
||||
|
||||
@@ -1576,7 +1576,7 @@ u8 func0415_chief[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
|
||||
if_target_chr_in_sight(/*goto*/ 0x2c)
|
||||
if_target_in_sight(/*goto*/ 0x2c)
|
||||
label(0x06)
|
||||
reloop(0x03)
|
||||
|
||||
|
||||
+1
-1
@@ -27709,7 +27709,7 @@ void func0f036358(struct chrdata *chr, s32 arg1)
|
||||
chr->act_die.unk034 = -1;
|
||||
chr->act_die.unk038 = 0;
|
||||
|
||||
chr->ailist = ailistFindById(GFUNC_AI_BOT_DEAD);
|
||||
chr->ailist = ailistFindById(GAILIST_AI_BOT_DEAD);
|
||||
chr->aioffset = 0;
|
||||
|
||||
func0f0b09f4(arg1, mpPlayerGetIndex(chr));
|
||||
|
||||
@@ -749,7 +749,7 @@ bool aiIfChrUnloaded(void)
|
||||
/**
|
||||
* @cmd 0035
|
||||
*/
|
||||
bool aiIfPlayerInSight(void)
|
||||
bool aiIfTargetPropInSight(void)
|
||||
{
|
||||
if (func0f03978c(g_Vars.chrdata)) {
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
@@ -1304,7 +1304,7 @@ bool ai002a(void)
|
||||
/**
|
||||
* @cmd 002b
|
||||
*/
|
||||
bool aiTryJogToTargetChr(void)
|
||||
bool aiTryJogToTargetProp(void)
|
||||
{
|
||||
if (chrGoToTarget(g_Vars.chrdata, SPEED_JOG)) {
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
@@ -1319,7 +1319,7 @@ bool aiTryJogToTargetChr(void)
|
||||
/**
|
||||
* @cmd 002c
|
||||
*/
|
||||
bool aiTryWalkToTargetChr(void)
|
||||
bool aiTryWalkToTargetProp(void)
|
||||
{
|
||||
if (chrGoToTarget(g_Vars.chrdata, SPEED_WALK)) {
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
@@ -1334,7 +1334,7 @@ bool aiTryWalkToTargetChr(void)
|
||||
/**
|
||||
* @cmd 002d
|
||||
*/
|
||||
bool aiTryRunToTargetChr(void)
|
||||
bool aiTryRunToTargetProp(void)
|
||||
{
|
||||
if (chrGoToTarget(g_Vars.chrdata, SPEED_RUN)) {
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
|
||||
+1389
-97
File diff suppressed because it is too large
Load Diff
@@ -746,6 +746,8 @@
|
||||
#define OUTFIT_MAIAN 0x0d
|
||||
#define OUTFIT_NEGOTIATOR 0x0e // unused by scripts
|
||||
|
||||
#define PAD_PRESET 0x2328
|
||||
|
||||
#define PADEFFECT_SPARKS 0x00
|
||||
#define PADEFFECT_01 0x01 // used only in Escape on a pad containing nothing
|
||||
#define PADEFFECT_SPLASH 0x02
|
||||
@@ -961,8 +963,6 @@
|
||||
#define STAGEINDEX_TEST_MP19 0x3b
|
||||
#define STAGEINDEX_TEST_MP20 0x3c
|
||||
|
||||
#define TARGET_PAD 0x2328
|
||||
|
||||
#define TELEPORTSTATE_STARTING 1
|
||||
#define TELEPORTSTATE_3 3
|
||||
#define TELEPORTSTATE_4 4
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
/*0x0028*/ bool aiActivateAlarm(void);
|
||||
/*0x0029*/ bool aiDeactivateAlarm(void);
|
||||
/*0x002a*/ bool ai002a(void);
|
||||
/*0x002b*/ bool aiTryJogToTargetChr(void);
|
||||
/*0x002c*/ bool aiTryWalkToTargetChr(void);
|
||||
/*0x002d*/ bool aiTryRunToTargetChr(void);
|
||||
/*0x002b*/ bool aiTryJogToTargetProp(void);
|
||||
/*0x002c*/ bool aiTryWalkToTargetProp(void);
|
||||
/*0x002d*/ bool aiTryRunToTargetProp(void);
|
||||
/*0x002e*/ bool ai002e(void);
|
||||
/*0x002f*/ bool aiTryJogToChr(void);
|
||||
/*0x0030*/ bool aiTryWalkToChr(void);
|
||||
@@ -56,7 +56,7 @@
|
||||
/*0x0032*/ bool aiIfStopped(void);
|
||||
/*0x0033*/ bool aiIfChrDying(void);
|
||||
/*0x0034*/ bool aiIfChrDeathAnimationFinished(void);
|
||||
/*0x0035*/ bool aiIfPlayerInSight(void);
|
||||
/*0x0035*/ bool aiIfTargetPropInSight(void);
|
||||
/*0x0036*/ bool aiRandom(void);
|
||||
/*0x0037*/ bool aiIfRandomLessThan(void);
|
||||
/*0x0038*/ bool aiIfRandomGreaterThan(void);
|
||||
|
||||
+53
-53
@@ -162,7 +162,7 @@ u8 func0006_unalerted[] = {
|
||||
label(0x13)
|
||||
dprint 'A','1','\n',0,
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x16)
|
||||
if_target_chr_in_sight(/*goto*/ LABEL_SEE_DETECT)
|
||||
if_target_in_sight(/*goto*/ LABEL_SEE_DETECT)
|
||||
label(0x16)
|
||||
dprint 'B','4',' ','A','I','V','S','A','I','\n',0,
|
||||
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ LABEL_AIVSAIFAIL)
|
||||
@@ -543,7 +543,7 @@ u8 func0006_unalerted[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x13)
|
||||
if_target_chr_in_sight(/*goto*/ 0x16)
|
||||
if_target_in_sight(/*goto*/ 0x16)
|
||||
label(0x13)
|
||||
if_self_distance_to_chr_lt(150, CHR_SEEDIE, /*goto*/ 0x7f)
|
||||
if_chr_stopped(/*goto*/ 0x7f)
|
||||
@@ -566,7 +566,7 @@ u8 func0006_unalerted[] = {
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_hears_gunfire(/*goto*/ 0x16)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x13)
|
||||
if_target_chr_in_sight(/*goto*/ 0x17)
|
||||
if_target_in_sight(/*goto*/ 0x17)
|
||||
label(0x13)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_CAN_EXAMINE_BODY, FALSE, BANK_0, /*goto*/ 0x13)
|
||||
if_timer_lt(120, /*goto*/ 0x13)
|
||||
@@ -879,7 +879,7 @@ u8 func0007_alerted[] = {
|
||||
label(0x16)
|
||||
set_shotlist(GAILIST_ALERTED)
|
||||
set_aishootingatmelist(GAILIST_DODGE)
|
||||
set_darkroom_function(GAILIST_SEARCH_FOR_PLAYER)
|
||||
set_darkroomlist(GAILIST_SEARCH_FOR_PLAYER)
|
||||
|
||||
dprint 'S','T','A','R','T',' ','L','O','O','P','\n',0,
|
||||
if_chr_dying(CHR_SELF, /*goto*/ 0x16)
|
||||
@@ -1213,7 +1213,7 @@ u8 func0007_alerted[] = {
|
||||
dprint 'W','A','I','T',' ','F','O','R',' ','A','M','B','\n',0,
|
||||
if_in_disarm_range(/*goto*/ 0xa3)
|
||||
dprint 'A','M','B','1','\n',0,
|
||||
if_distance_from_target_to_pad_lt(200, TARGET_PAD, /*goto*/ 0x13)
|
||||
if_distance_from_target_to_pad_lt(200, PAD_PRESET, /*goto*/ 0x13)
|
||||
dprint 'A','M','B','2','\n',0,
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
@@ -1359,7 +1359,7 @@ u8 func0007_alerted[] = {
|
||||
|
||||
// Distance > 2500
|
||||
label(0x14)
|
||||
try_run_to_target_chr(/*goto*/ 0xe1)
|
||||
try_run_to_target(/*goto*/ 0xe1)
|
||||
|
||||
beginloop(0xe1)
|
||||
if_chr_distance_lt(2500, /*goto*/ 0x15)
|
||||
@@ -1521,7 +1521,7 @@ u8 func0007_alerted[] = {
|
||||
set_self_flag_bankx(CHRFLAG0_00000010, BANK_0)
|
||||
dprint 'U','N','D','E','R',' ','C','O','V','E','R','\n',0,
|
||||
label(0x58)
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
restart_timer
|
||||
set_action(MA_COVERWAIT, TRUE)
|
||||
unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1)
|
||||
@@ -1567,7 +1567,7 @@ u8 func0007_alerted[] = {
|
||||
label(0x16)
|
||||
cmd012f
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x62)
|
||||
try_run_to_target(/*goto*/ 0x62)
|
||||
|
||||
beginloop(0x62)
|
||||
cmd013d_if_grenade_thrown_nearby_maybe(MA_GRENADEWAIT, /*goto*/ LABEL_FLEE_GRENADE)
|
||||
@@ -1950,7 +1950,7 @@ u8 func0007_alerted[] = {
|
||||
dprint 'S','E','E','W','A','I','T','3','\n',0,
|
||||
if_in_disarm_range(/*goto*/ 0x8a)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x89)
|
||||
try_run_to_target(/*goto*/ 0x89)
|
||||
|
||||
beginloop(0x89)
|
||||
cmd013d_if_grenade_thrown_nearby_maybe(MA_GRENADEWAIT, /*goto*/ LABEL_FLEE_GRENADE)
|
||||
@@ -2148,14 +2148,14 @@ u8 func0007_alerted[] = {
|
||||
goto_first(0x1b)
|
||||
|
||||
label(LABEL_TRACK)
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
dprint 'T','R','A','C','K','\n',0,
|
||||
set_action(MA_TRACKING, FALSE)
|
||||
unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1)
|
||||
unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1)
|
||||
restart_timer
|
||||
label(0xf7)
|
||||
try_run_to_target_chr(/*goto*/ 0x35)
|
||||
try_run_to_target(/*goto*/ 0x35)
|
||||
|
||||
beginloop(0x35)
|
||||
if_chr_has_hiddenflag(CHR_SELF, CHRHFLAG_00002000, /*goto*/ 0x13)
|
||||
@@ -2265,7 +2265,7 @@ u8 func0007_alerted[] = {
|
||||
unset_self_flag_bankx(CHRFLAG1_00040000, BANK_1)
|
||||
unset_self_flag_bankx(CHRFLAG1_00020000, BANK_1)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x85)
|
||||
try_run_to_target(/*goto*/ 0x85)
|
||||
|
||||
beginloop(0x85)
|
||||
cmd013d_if_grenade_thrown_nearby_maybe(MA_GRENADEWAIT, /*goto*/ LABEL_FLEE_GRENADE)
|
||||
@@ -2669,7 +2669,7 @@ u8 func000a_do_idle_animation[] = {
|
||||
label(0x07)
|
||||
dprint 'N','A','T',' ','5','\n',0,
|
||||
restart_timer
|
||||
try_face_entity(ENTITYTYPE_PAD, TARGET_PAD, /*goto*/ 0xfa)
|
||||
try_face_entity(ENTITYTYPE_PAD, PAD_PRESET, /*goto*/ 0xfa)
|
||||
|
||||
beginloop(0xfa)
|
||||
if_timer_gt(60, /*goto*/ 0x06)
|
||||
@@ -2698,7 +2698,7 @@ u8 func000a_do_idle_animation[] = {
|
||||
beginloop(0x15)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x13)
|
||||
if_target_in_sight(/*goto*/ 0x13)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ 0x16)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x13)
|
||||
goto_next(0x16)
|
||||
@@ -2966,7 +2966,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
goto_next(0x16)
|
||||
|
||||
label(0x13)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0xb3)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0xb3)
|
||||
label(0x16)
|
||||
dprint 'N','O',' ','T','A','R','G','E','T','\n',0,
|
||||
set_target_chr(-1)
|
||||
@@ -3022,7 +3022,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0x16)
|
||||
|
||||
// Target's field 0x17e is different
|
||||
@@ -3040,7 +3040,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
set_ailist(CHR_SELF, GAILIST_HAND_COMBAT)
|
||||
|
||||
label(0x16)
|
||||
try_run_to_target_chr(/*goto*/ 0xb4)
|
||||
try_run_to_target(/*goto*/ 0xb4)
|
||||
dprint 'R','U','N',' ','F','A','I','L','\n',0,
|
||||
|
||||
beginloop(0xb4)
|
||||
@@ -3052,7 +3052,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xba)
|
||||
|
||||
label(0x13)
|
||||
@@ -3088,7 +3088,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xba)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xba)
|
||||
|
||||
label(0x13)
|
||||
@@ -3097,13 +3097,13 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
|
||||
label(0xb5)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0xbc)
|
||||
try_run_to_target(/*goto*/ 0xbc)
|
||||
|
||||
beginloop(0xbc)
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc0)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc0)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc0)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xc0)
|
||||
|
||||
label(0x13)
|
||||
@@ -3125,7 +3125,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xc1)
|
||||
|
||||
label(0x13)
|
||||
@@ -3221,7 +3221,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc1)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x16)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x16)
|
||||
goto_next(0xc1)
|
||||
|
||||
label(0x16)
|
||||
@@ -3263,7 +3263,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xc5)
|
||||
|
||||
label(0x13)
|
||||
@@ -3314,7 +3314,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xc5)
|
||||
|
||||
label(0x13)
|
||||
@@ -3356,7 +3356,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
if_chr_dying(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_chr_unloaded(CHR_TARGET, /*goto*/ 0xc5)
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
goto_next(0xc5)
|
||||
|
||||
label(0x13)
|
||||
@@ -3402,7 +3402,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
|
||||
// Unreachable - no label
|
||||
if_rand_gt(128, /*goto*/ 0xd1)
|
||||
try_jog_to_target_chr(/*goto*/ 0xd0)
|
||||
try_jog_to_target(/*goto*/ 0xd0)
|
||||
|
||||
beginloop(0xd0)
|
||||
if_timer_gt(120, /*goto*/ 0xd2)
|
||||
@@ -3444,7 +3444,7 @@ u8 func000c_combat_with_target_chr[] = {
|
||||
return
|
||||
|
||||
label(0x13)
|
||||
try_walk_to_target_chr(/*goto*/ 0xd6)
|
||||
try_walk_to_target(/*goto*/ 0xd6)
|
||||
|
||||
beginloop(0xd6)
|
||||
if_enemy_distance_lt_and_los(1200, /*goto*/ 0x13)
|
||||
@@ -3791,7 +3791,7 @@ u8 func000f_hand_combat[] = {
|
||||
|
||||
// This if-statement is effectively a no op
|
||||
dprint 'L','1','\n',0,
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x13)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x13)
|
||||
|
||||
dprint 'L','2','\n',0,
|
||||
label(0x13)
|
||||
@@ -3824,7 +3824,7 @@ u8 func000f_hand_combat[] = {
|
||||
label(0xe3)
|
||||
restart_timer
|
||||
dprint 'R','U','N',' ','T','O',' ','T','A','R','G','E','T','\n',0,
|
||||
try_run_to_target_chr(/*goto*/ 0x03)
|
||||
try_run_to_target(/*goto*/ 0x03)
|
||||
|
||||
beginloop(0x03)
|
||||
if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa)
|
||||
@@ -4139,7 +4139,7 @@ u8 func001b_observe_camspy[] = {
|
||||
set_shotlist(GAILIST_ALERTED)
|
||||
unset_self_flag_bankx(CHRFLAG1_DOINGIDLEANIMATION, BANK_1)
|
||||
set_chr_special_death_animation(CHR_SELF, 0)
|
||||
set_follow_chr(CHR_TARGET)
|
||||
set_chrpreset(CHR_TARGET)
|
||||
|
||||
if_just_injured(CHR_SELF, /*goto*/ 0x09)
|
||||
dprint 'E','Y','E',' ','S','P','Y','\n',0,
|
||||
@@ -4147,7 +4147,7 @@ u8 func001b_observe_camspy[] = {
|
||||
label(0x00)
|
||||
set_target_chr(CHR_PRESET)
|
||||
if_chr_distance_lt(300, /*goto*/ 0x13)
|
||||
try_jog_to_target_chr(/*goto*/ 0x0c)
|
||||
try_jog_to_target(/*goto*/ 0x0c)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0c)
|
||||
@@ -4156,7 +4156,7 @@ u8 func001b_observe_camspy[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x16)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0b)
|
||||
if_target_in_sight(/*goto*/ 0x0b)
|
||||
label(0x16)
|
||||
set_target_chr(CHR_PRESET)
|
||||
endloop(0x0c)
|
||||
@@ -4176,7 +4176,7 @@ u8 func001b_observe_camspy[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x16)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0b)
|
||||
if_target_in_sight(/*goto*/ 0x0b)
|
||||
label(0x16)
|
||||
set_target_chr(CHR_PRESET)
|
||||
endloop(0x03)
|
||||
@@ -4198,7 +4198,7 @@ u8 func001b_observe_camspy[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x16)
|
||||
if_target_chr_in_sight(/*goto*/ 0x0b)
|
||||
if_target_in_sight(/*goto*/ 0x0b)
|
||||
label(0x16)
|
||||
set_target_chr(CHR_PRESET)
|
||||
endloop(0x05)
|
||||
@@ -4243,7 +4243,7 @@ u8 func001b_observe_camspy[] = {
|
||||
|
||||
// Unreachable - no label
|
||||
dprint 'E','4','\n',0,
|
||||
if_target_chrs_target_is_different(/*goto*/ 0x16)
|
||||
if_chrpresets_target_is_different(/*goto*/ 0x16)
|
||||
dprint 'E','5','\n',0,
|
||||
goto_next(0x13)
|
||||
|
||||
@@ -4285,15 +4285,15 @@ u8 func001d_search_for_player[] = {
|
||||
if_self_flag_bankx_eq(CHRFLAG1_10000000, TRUE, BANK_1, /*goto*/ 0x16)
|
||||
set_chr_roomtosearch
|
||||
if_chr_distance_gt(1000, /*goto*/ 0x13)
|
||||
try_jog_to_target_chr(/*goto*/ 0x03)
|
||||
try_jog_to_target(/*goto*/ 0x03)
|
||||
label(0x13)
|
||||
try_run_to_target_chr(/*goto*/ 0x03)
|
||||
try_run_to_target(/*goto*/ 0x03)
|
||||
|
||||
beginloop(0x03)
|
||||
dprint 'S','E','A','R','C','H','I','N','I','T','\n',0,
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_target_chr_in_sight(/*goto*/ 0x12)
|
||||
if_target_in_sight(/*goto*/ 0x12)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ 0x13)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0xc3)
|
||||
label(0x13)
|
||||
@@ -4322,7 +4322,7 @@ u8 func001d_search_for_player[] = {
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x15)
|
||||
if_target_chr_in_sight(/*goto*/ 0x12)
|
||||
if_target_in_sight(/*goto*/ 0x12)
|
||||
label(0x15)
|
||||
if_timer_gt(30, /*goto*/ 0x05)
|
||||
endloop(0x0a)
|
||||
@@ -4402,7 +4402,7 @@ u8 func001d_search_for_player[] = {
|
||||
label(0x13)
|
||||
dprint 'C','H','E','K',' ','V','I','S','\n',0,
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x15)
|
||||
if_target_chr_in_sight(/*goto*/ 0x12)
|
||||
if_target_in_sight(/*goto*/ 0x12)
|
||||
label(0x15)
|
||||
if_saw_death(0x00, /*goto*/ 0x28)
|
||||
endloop(0x04)
|
||||
@@ -4480,7 +4480,7 @@ u8 func001f_related_to_spawning[] = {
|
||||
if_saw_death(0x01, /*goto*/ 0x1e)
|
||||
if_saw_injury(0x01, /*goto*/ 0x1e)
|
||||
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x16)
|
||||
if_target_chr_in_sight(/*goto*/ 0x1e)
|
||||
if_target_in_sight(/*goto*/ 0x1e)
|
||||
label(0x16)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ 0x16)
|
||||
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x13)
|
||||
@@ -4571,7 +4571,7 @@ u8 func0012_init_coop_100[] = {
|
||||
set_self_chrflag(CHRCFLAG_01000000)
|
||||
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PSYCHOSISED)
|
||||
set_alertness(100)
|
||||
set_follow_chr(CHR_BOND)
|
||||
set_chrpreset(CHR_BOND)
|
||||
yield
|
||||
rebuild_teams
|
||||
rebuild_squadrons
|
||||
@@ -4757,9 +4757,9 @@ u8 func0014_coop_buddy[] = {
|
||||
set_target_chr(CHR_BOND)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x16)
|
||||
try_jog_to_target_chr(/*goto*/ 0x0c)
|
||||
try_jog_to_target(/*goto*/ 0x0c)
|
||||
label(0x16)
|
||||
try_run_to_target_chr(/*goto*/ 0x0c)
|
||||
try_run_to_target(/*goto*/ 0x0c)
|
||||
|
||||
beginloop(0x0c)
|
||||
if_chr_has_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP, /*goto*/ 0x13)
|
||||
@@ -5076,7 +5076,7 @@ u8 func0024_follow_bond[] = {
|
||||
|
||||
label(0x03)
|
||||
restart_timer
|
||||
try_run_to_target_chr(/*goto*/ 0x04)
|
||||
try_run_to_target(/*goto*/ 0x04)
|
||||
|
||||
beginloop(0x04)
|
||||
set_action(MA_TRACKING, FALSE)
|
||||
@@ -5140,7 +5140,7 @@ u8 func0026_init_psychosis[] = {
|
||||
set_self_flag_bankx(CHRFLAG1_40000000, BANK_1)
|
||||
set_chr_hiddenflag(CHR_SELF, CHRHFLAG_PSYCHOSISED)
|
||||
set_alertness(100)
|
||||
set_follow_chr(CHR_BOND)
|
||||
set_chrpreset(CHR_BOND)
|
||||
yield
|
||||
rebuild_teams
|
||||
rebuild_squadrons
|
||||
@@ -5209,10 +5209,10 @@ u8 func0027_psychosised[] = {
|
||||
set_target_chr(CHR_PRESET)
|
||||
restart_timer
|
||||
if_chr_distance_gt(300, /*goto*/ 0x16)
|
||||
try_jog_to_target_chr(/*goto*/ 0x0c)
|
||||
try_jog_to_target(/*goto*/ 0x0c)
|
||||
label(0x16)
|
||||
if_chr_distance_lt(200, /*goto*/ 0x16)
|
||||
try_run_to_target_chr(/*goto*/ 0x0c)
|
||||
try_run_to_target(/*goto*/ 0x0c)
|
||||
|
||||
beginloop(0x0c)
|
||||
if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_DISGUISED, /*goto*/ 0x06)
|
||||
@@ -5308,25 +5308,25 @@ u8 func0020_place_coop_buddy[] = {
|
||||
goto_next(0xf3)
|
||||
|
||||
label(0xfa)
|
||||
chr_move_to_pad(CHR_SELF, TARGET_PAD, 0x01, /*goto*/ 0x13)
|
||||
chr_move_to_pad(CHR_SELF, PAD_PRESET, 0x01, /*goto*/ 0x13)
|
||||
label(0xf3)
|
||||
try_set_target_pad_to_something2(0x02, /*goto*/ 0xfa)
|
||||
goto_next(0xf3)
|
||||
|
||||
label(0xfa)
|
||||
chr_move_to_pad(CHR_SELF, TARGET_PAD, 0x01, /*goto*/ 0x13)
|
||||
chr_move_to_pad(CHR_SELF, PAD_PRESET, 0x01, /*goto*/ 0x13)
|
||||
label(0xf3)
|
||||
try_set_target_pad_to_something2(0x04, /*goto*/ 0xfa)
|
||||
goto_next(0xf3)
|
||||
|
||||
label(0xfa)
|
||||
chr_move_to_pad(CHR_SELF, TARGET_PAD, 0x01, /*goto*/ 0x13)
|
||||
chr_move_to_pad(CHR_SELF, PAD_PRESET, 0x01, /*goto*/ 0x13)
|
||||
label(0xf3)
|
||||
try_set_target_pad_to_something2(0x08, /*goto*/ 0xfa)
|
||||
goto_next(0xf3)
|
||||
|
||||
label(0xfa)
|
||||
chr_move_to_pad(CHR_SELF, TARGET_PAD, 0x01, /*goto*/ 0x13)
|
||||
chr_move_to_pad(CHR_SELF, PAD_PRESET, 0x01, /*goto*/ 0x13)
|
||||
label(0xf3)
|
||||
goto_first(0x03)
|
||||
|
||||
|
||||
@@ -14178,9 +14178,9 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x0028*/ aiActivateAlarm,
|
||||
/*0x0029*/ aiDeactivateAlarm,
|
||||
/*0x002a*/ ai002a,
|
||||
/*0x002b*/ aiTryJogToTargetChr,
|
||||
/*0x002c*/ aiTryWalkToTargetChr,
|
||||
/*0x002d*/ aiTryRunToTargetChr,
|
||||
/*0x002b*/ aiTryJogToTargetProp,
|
||||
/*0x002c*/ aiTryWalkToTargetProp,
|
||||
/*0x002d*/ aiTryRunToTargetProp,
|
||||
/*0x002e*/ ai002e,
|
||||
/*0x002f*/ aiTryJogToChr,
|
||||
/*0x0030*/ aiTryWalkToChr,
|
||||
@@ -14188,7 +14188,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x0032*/ aiIfStopped,
|
||||
/*0x0033*/ aiIfChrDying,
|
||||
/*0x0034*/ aiIfChrDeathAnimationFinished,
|
||||
/*0x0035*/ aiIfPlayerInSight,
|
||||
/*0x0035*/ aiIfTargetPropInSight,
|
||||
/*0x0036*/ aiRandom,
|
||||
/*0x0037*/ aiIfRandomLessThan,
|
||||
/*0x0038*/ aiIfRandomGreaterThan,
|
||||
|
||||
Reference in New Issue
Block a user