pokeemerald/data/scripts/trainer_hill.inc

73 lines
2.1 KiB
PHP
Raw Normal View History

2019-11-13 22:10:05 +01:00
TrainerHill_OnResume: @ 82C8336
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_2, 0
2019-11-23 22:08:50 +01:00
trainerhill_resumetimer
2019-11-24 22:58:40 +01:00
frontier_get FRONTIER_DATA_BATTLE_OUTCOME
2019-10-05 16:52:48 +02:00
compare VAR_RESULT, B_OUTCOME_LOST
2019-10-07 02:04:30 +02:00
goto_if_eq TrainerHill_1F_EventScript_Lost
2019-10-05 16:52:48 +02:00
compare VAR_RESULT, B_OUTCOME_DREW
2019-10-07 02:04:30 +02:00
goto_if_eq TrainerHill_1F_EventScript_Lost
2019-10-05 16:52:48 +02:00
compare VAR_RESULT, B_OUTCOME_FORFEITED
2019-10-07 02:04:30 +02:00
goto_if_eq TrainerHill_1F_EventScript_Lost
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
TrainerHill_OnWarp: @ 82C8372
map_script_2 VAR_TEMP_3, 0, TrainerHill_1F_EventScript_DummyOnWarp
2019-10-05 16:52:48 +02:00
.2byte 0
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
TrainerHill_1F_EventScript_DummyOnWarp:: @ 82C837C
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_3, 1
2021-03-13 22:40:29 +01:00
.ifdef BUGFIX
end @ Missing end. By chance, the next byte (0x02 of VAR_TEMP_2) is also the id for the end cmd
.endif
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
TrainerHill_OnFrame: @ 82C8381
map_script_2 VAR_TEMP_2, 0, TrainerHill_1F_EventScript_DummyWarpToEntranceCounter
map_script_2 VAR_TEMP_1, 1, TrainerHill_EventScript_WarpToEntranceCounter
2019-10-05 16:52:48 +02:00
.2byte 0
2019-09-27 18:22:58 +02:00
EventScript_TrainerHillTimer:: @ 82C8393
2019-10-05 16:52:48 +02:00
lockall
2019-11-23 22:08:50 +01:00
trainerhill_gettime
2019-11-13 22:10:05 +01:00
msgbox TrainerHill_Entrance_Text_ChallengeTime, MSGBOX_DEFAULT
2019-10-05 16:52:48 +02:00
releaseall
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
TrainerHill_1F_EventScript_DummyWarpToEntranceCounter:: @ 82C83A6
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_2, 1
trainerhill_getusingereader
compare VAR_RESULT, TRUE @ VAR_RESULT always FALSE here
2019-11-13 22:10:05 +01:00
goto_if_eq TrainerHill_1F_EventScript_WarpSilentToEntranceCounter
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
@ Never reached
TrainerHill_1F_EventScript_WarpSilentToEntranceCounter:: @ 82C83BF
2019-10-05 16:52:48 +02:00
warpsilent MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6
waitstate
end
2019-09-27 18:22:58 +02:00
2019-10-07 02:04:30 +02:00
TrainerHill_1F_EventScript_Lost:: @ 82C83C9
2019-11-23 22:08:50 +01:00
trainerhill_settrainerflags
trainerhill_lost
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_1, 1
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
TrainerHill_EventScript_WarpToEntranceCounter:: @ 82C83DF
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_1, 0
warp MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6
waitstate
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
@ Unused
TrainerHill_1F_Movement_SetInvisible:: @ 82C83EE
2019-10-05 16:52:48 +02:00
set_invisible
step_end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
@ TRAINER_PHILLIP is an actual Trainer on the SS Tidal, but is used as a placeholder here
TrainerHill_EventScript_TrainerBattle:: @ 82C83F0
trainerbattle TRAINER_BATTLE_HILL, TRAINER_PHILLIP, 0, BattleFacility_TrainerBattle_PlaceholderText, BattleFacility_TrainerBattle_PlaceholderText
2019-11-23 22:08:50 +01:00
trainerhill_postbattletext
2019-10-05 16:52:48 +02:00
waitmessage
waitbuttonpress
closemessage
end