diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-12-11 03:28:55 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-12-14 08:38:26 -0600 |
commit | 75b0c9d7a9edabc742bc42f19d078fa2ae64870c (patch) | |
tree | 47e92cb4aebee9ea163a52f35fe47bf4ee98206f /asm/macros | |
parent | aa72c0ada32632f3dfa7641375a84fa8dc8e7e08 (diff) |
Document Battle Pyramid scripts
Diffstat (limited to 'asm/macros')
-rw-r--r-- | asm/macros/battle_frontier/battle_pyramid.inc | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/asm/macros/battle_frontier/battle_pyramid.inc b/asm/macros/battle_frontier/battle_pyramid.inc index 0468e5956..f8141e2dd 100644 --- a/asm/macros/battle_frontier/battle_pyramid.inc +++ b/asm/macros/battle_frontier/battle_pyramid.inc @@ -1,5 +1,3 @@ -@ TODO: Add explanatory comments to macros - @ Initialize the Battle Pyramid challenge .macro pyramid_init setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT @@ -28,37 +26,43 @@ special CallBattlePyramidFunction .endm - @ + @ Set the prize item to give from one of two lists of possible prizes, depending on streak. .macro pyramid_setprize setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_PRIZE special CallBattlePyramidFunction .endm - @ + @ 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 .macro pyramid_seedfloor setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SEED_FLOOR special CallBattlePyramidFunction .endm - @ + @ Set the item to pick up depending on the random seed and quantity (always 1) to the arguments for STD_FIND_ITEM .macro pyramid_setitem setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_ITEM special CallBattlePyramidFunction .endm - @ + @ Hide the picked-up item (technically it moves the item far offscreen) .macro pyramid_hideitem setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_HIDE_ITEM special CallBattlePyramidFunction .endm - @ - .macro pyramid_inittrainers - setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_INIT_TRAINERS + @ Set the facility trainers to gBattleFrontierTrainers + .macro pyramid_settrainers + setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_TRAINERS special CallBattlePyramidFunction .endm - @ + @ Show the post-battle hint text .macro pyramid_showhint setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SHOW_HINT_TEXT special CallBattlePyramidFunction @@ -70,28 +74,31 @@ special CallBattlePyramidFunction .endm - @ - .macro pyramid_updatelight radius:req, mode:req + @ 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 setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_UPDATE_LIGHT setvar VAR_0x8005, \radius setvar VAR_0x8006, \mode + .if \sound != 0xFFFF + setvar VAR_0x8007, \sound + .endif special CallBattlePyramidFunction .endm - @ + @ Reset the held items to what they were at the start of the challenge .macro pyramid_clearhelditems setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_CLEAR_HELD_ITEMS special CallBattlePyramidFunction .endm - @ + @ Set the palette depending on current floor number .macro pyramid_setfloorpal setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_SET_FLOOR_PALETTE special CallBattlePyramidFunction .endm - @ - .macro pyramid_healparty + @ Reset sketched moves and update the party order in the saveblock + .macro pyramid_resetparty setvar VAR_0x8004, BATTLE_PYRAMID_FUNC_RESTORE_PARTY special CallBattlePyramidFunction .endm |