pokeemerald/asm/macros/battle_frontier/battle_pyramid.inc

105 lines
3.4 KiB
PHP
Raw Normal View History

2019-12-02 21:26:56 +01:00
@ Initialize the Battle Pyramid challenge
.macro pyramid_init
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-02 21:26:56 +01:00
@ Get the value of some PYRAMID_DATA_*. See GetBattlePyramidData for the data types that can be retrieved
.macro pyramid_get data:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-02 21:26:56 +01:00
@ Set some PYRAMID_DATA_* to val. See SetBattlePyramidData for the data types that can be set
.macro pyramid_set data:req, val:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_DATA
setvar VAR_0x8005, \data
setvar VAR_0x8006, \val
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-02 21:26:56 +01:00
@ Save the game and set the challenge status
.macro pyramid_save challengeStatus:req
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Set the prize item to give from one of two lists of possible prizes, depending on streak.
2019-12-02 21:26:56 +01:00
.macro pyramid_setprize
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_PRIZE
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Unused. Give the set prize item to the player. TRUE if room in Bag for prize, FALSE otherwise
.macro pyramid_giveprize
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_GIVE_PRIZE
special CallBattlePyramidFunction
.endm
@ Set the random values for the floor (used to determine object positions, e.g.), and clear trainer flags
2019-12-02 21:26:56 +01:00
.macro pyramid_seedfloor
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Set the item to pick up depending on the random seed and quantity (always 1) to the arguments for STD_FIND_ITEM
2019-12-02 21:26:56 +01:00
.macro pyramid_setitem
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Hide the picked-up item (technically it moves the item far offscreen)
2019-12-02 21:26:56 +01:00
.macro pyramid_hideitem
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Set the facility trainers to gBattleFrontierTrainers
.macro pyramid_settrainers
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS
2019-12-02 21:26:56 +01:00
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Show the post-battle hint text
2019-12-02 21:26:56 +01:00
.macro pyramid_showhint
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-02 21:26:56 +01:00
@ VAR_RESULT is 1 if player is on a Pyramid floor, 2 if on the Pyramid peak, 0 otherwise
.macro pyramid_inchallenge
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_IS_IN
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Update the light around the player. 2 different modes, for setting or incrementing light. See PYRAMID_LIGHT_*
.macro pyramid_updatelight radius:req, mode:req, sound=0xFFFF
2019-12-02 21:26:56 +01:00
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT
setvar VAR_0x8005, \radius
setvar VAR_0x8006, \mode
2019-12-11 09:28:55 +01:00
.if \sound != 0xFFFF
setvar VAR_0x8007, \sound
.endif
2019-12-02 21:26:56 +01:00
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Reset the held items to what they were at the start of the challenge
2019-12-02 21:26:56 +01:00
.macro pyramid_clearhelditems
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Set the palette depending on current floor number
2019-12-02 21:26:56 +01:00
.macro pyramid_setfloorpal
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE
special CallBattlePyramidFunction
.endm
2019-12-02 15:52:16 +01:00
2019-12-11 09:28:55 +01:00
@ Reset sketched moves and update the party order in the saveblock
.macro pyramid_resetparty
2019-12-02 21:26:56 +01:00
setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY
special CallBattlePyramidFunction
.endm