pokeemerald/data/scripts/trainer_hill.inc

69 lines
1.9 KiB
PHP
Raw Normal View History

2021-07-20 21:18:31 +02:00
TrainerHill_OnResume:
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
goto_if_eq VAR_RESULT, B_OUTCOME_LOST, TrainerHill_1F_EventScript_Lost
goto_if_eq VAR_RESULT, B_OUTCOME_DREW, TrainerHill_1F_EventScript_Lost
goto_if_eq VAR_RESULT, B_OUTCOME_FORFEITED, TrainerHill_1F_EventScript_Lost
2019-10-05 16:52:48 +02:00
end
2019-09-27 18:22:58 +02:00
2021-07-20 21:18:31 +02:00
TrainerHill_OnWarp:
2019-11-13 22:10:05 +01:00
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
2021-07-20 21:18:31 +02:00
TrainerHill_1F_EventScript_DummyOnWarp::
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
2021-07-20 21:18:31 +02:00
TrainerHill_OnFrame:
2019-11-13 22:10:05 +01:00
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
2021-07-20 21:18:31 +02:00
EventScript_TrainerHillTimer::
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
2021-07-20 21:18:31 +02:00
TrainerHill_1F_EventScript_DummyWarpToEntranceCounter::
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_2, 1
trainerhill_getusingereader
goto_if_eq VAR_RESULT, TRUE, TrainerHill_1F_EventScript_WarpSilentToEntranceCounter @ VAR_RESULT always FALSE here
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
2021-07-20 21:18:31 +02:00
TrainerHill_1F_EventScript_WarpSilentToEntranceCounter::
warpsilent MAP_TRAINER_HILL_ENTRANCE, 9, 6
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
2021-07-20 21:18:31 +02:00
TrainerHill_1F_EventScript_Lost::
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
2021-07-20 21:18:31 +02:00
TrainerHill_EventScript_WarpToEntranceCounter::
2019-10-05 16:52:48 +02:00
setvar VAR_TEMP_1, 0
warp MAP_TRAINER_HILL_ENTRANCE, 9, 6
2019-10-05 16:52:48 +02:00
waitstate
end
2019-09-27 18:22:58 +02:00
2019-11-13 22:10:05 +01:00
@ Unused
2021-07-20 21:18:31 +02:00
TrainerHill_1F_Movement_SetInvisible::
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
2021-07-20 21:18:31 +02:00
TrainerHill_EventScript_TrainerBattle::
2019-11-13 22:10:05 +01:00
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