2019-12-02 20:26:56 +00:00
|
|
|
@ Initialize the Trainer Hill challenge and start the timer
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_start
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_START
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ 0 if not spoken to yet, 1 if spoken to but not received prize, 2 if received prize
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_getownerstate
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_OWNER_STATE
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Try to give prize. 0 if given successfully, 1 if no room for prize, 2 if giving prize should be skipped
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_giveprize
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GIVE_PRIZE
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Check the final challenge time. 0 if new record, 1 if not, 2 if time has already been checked
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_finaltime
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_CHECK_FINAL_TIME
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Resume the timer. Wont resume if owner has been spoken to or max time has been reached
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_resumetimer
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_RESUME_TIMER
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Set player lost the challenge (trainerHill.hasLost) to TRUE
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_lost
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_LOST
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Get the current challenge status (TRAINER_HILL_PLAYER_STATUS_*)
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_getstatus
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_STATUS
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Buffer the current timer to string vars (mins to STR_VAR_1, secs to STR_VAR_2, fraction of sec to STR_VAR_3)
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_gettime
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_CHALLENGE_TIME
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ FALSE if fewer than all 4 floors used, TRUE otherwise. Only FALSE in JP-exclusive modes
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_allfloorsused
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_ALL_FLOORS_USED
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Unknown, dummied. Only side effect is setting VAR_RESULT to 0.
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_clearresult
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_RESULT
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ TRUE if currently in a Trainer Hill challenge
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_inchallenge
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_IN_CHALLENGE
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Show the post battle text for the spoken to Trainer Hill trainer
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_postbattletext
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_POST_BATTLE_TEXT
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Set all Trainer Hill trainers defeated
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_settrainerflags
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_ALL_TRAINER_FLAGS
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ TRUE if the game has been saved for the challenge, FALSE otherwise
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_getsaved
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_GAME_SAVED
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Set that the game has been saved for the challenge
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_setsaved
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_GAME_SAVED
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Clear that the game has been saved for the challenge
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_clearsaved
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_CLEAR_GAME_SAVED
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ FALSE if the Trainer Hill challenge was lost, TRUE otherwise
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_getwon
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_GET_WON
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|
|
|
|
|
2019-12-02 20:26:56 +00:00
|
|
|
@ Set the challenge mode to HILL_TAG_* (Normal, Variety, Unique, or Expert)
|
2019-11-25 19:19:17 +00:00
|
|
|
.macro trainerhill_settag tag:req
|
|
|
|
setvar VAR_0x8004, TRAINER_HILL_FUNC_SET_TAG
|
|
|
|
copyvar VAR_0x8005, \tag
|
|
|
|
special CallTrainerHillFunction
|
|
|
|
.endm
|