pokeemerald/asm/macros/battle_frontier/battle_dome.inc

145 lines
4.8 KiB
PHP
Raw Normal View History

2019-11-29 04:46:39 +01:00
@ Initialize the Battle Dome challenge
.macro dome_init
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT
special CallBattleDomeFunction
.endm
@ Get the value of some DOME_DATA_*. See GetDomeData for the data types that can be retrieved
.macro dome_get data:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_DATA
setvar VAR_0x8005, \data
special CallBattleDomeFunction
.endm
@ Set some DOME_DATA_* to val. See SetDomeData for the data types that can be set
.macro dome_set data:req, val=0xFFFF
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_DATA
setvar VAR_0x8005, \data
.if \val != 0xFFFF
setvar VAR_0x8006, \val
.endif
special CallBattleDomeFunction
.endm
@ Buffer the name of the current round to gStringVar1
2019-11-29 04:46:39 +01:00
.macro dome_getroundtext
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_ROUND_TEXT
special CallBattleDomeFunction
.endm
@ Buffer the name of the opponent to gStringVar2 and the name of the round to gStringVar1
2019-11-29 04:46:39 +01:00
.macro dome_getopponentname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_OPPONENT_NAME
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Choose which of the opponents mons to use in battle and load them into the enemy party
2019-11-29 04:46:39 +01:00
.macro dome_initopponentparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_OPPONENT_PARTY
special CallBattleDomeFunction
.endm
@ Show the page that gives information on the next opponent
2019-11-29 04:46:39 +01:00
.macro dome_showopponentinfo
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_OPPONENT_INFO
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Displays the tourney tree for the current tourney
2019-11-29 04:46:39 +01:00
.macro dome_showtourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_TOURNEY_TREE
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Displays the tourney tree for the results of the previous tourney. Before the player enters their first tourney this is a random tourney generated by dome_initresultstree
.macro dome_showprevtourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_PREV_TOURNEY_TREE
2019-11-29 04:46:39 +01:00
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Sets gTrainerBattleOpponent_A to the trainer ID of the next opponent
2019-11-29 04:46:39 +01:00
.macro dome_setopponent
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_ID
special CallBattleDomeFunction
.endm
@ Set the object event gfx id for the opponent
2019-11-29 04:46:39 +01:00
.macro dome_setopponentgfx
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_OPPONENT_GFX
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ A non-interactive version of the tourney tree shown when a round is completed
2019-11-29 04:46:39 +01:00
.macro dome_showstatictourneytree
setvar VAR_0x8004, BATTLE_DOME_FUNC_SHOW_STATIC_TOURNEY_TREE
special CallBattleDomeFunction
.endm
@ Decides the winners of NPC vs NPC matches, and eliminates either the player or their opponent depending on the playerStatus (DOME_PLAYER_*)
.macro dome_resolvewinners playerStatus:req
2019-11-29 04:46:39 +01:00
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESOLVE_WINNERS
setvar VAR_0x8005, \playerStatus
2019-11-29 04:46:39 +01:00
special CallBattleDomeFunction
.endm
@ Save the game and set the challenge status
.macro dome_save challengeStatus:req
setvar VAR_0x8004, BATTLE_DOME_FUNC_SAVE
setvar VAR_0x8005, \challengeStatus
special CallBattleDomeFunction
.endm
@ Unused. Increment the win streaks for the current challenge by one
.macro dome_incrementstreaks
setvar VAR_0x8004, BATTLE_DOME_FUNC_INCREMENT_STREAK
special CallBattleDomeFunction
.endm
2019-12-21 10:27:12 +01:00
@ Sets the facility trainer/mon set pointers
2019-11-29 04:46:39 +01:00
.macro dome_settrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_SET_TRAINERS
special CallBattleDomeFunction
.endm
@ If any moves were copied using Sketch during the challenge then restore them to Sketch
.macro dome_resetsketch
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESET_SKETCH
special CallBattleDomeFunction
.endm
@ Reset the held items of the mons that just battled to what they were prior to battling
2019-11-29 04:46:39 +01:00
.macro dome_restorehelditems
setvar VAR_0x8004, BATTLE_DOME_FUNC_RESTORE_HELD_ITEMS
special CallBattleDomeFunction
.endm
@ Reduce the players party to the selected mons, used to reduce down to the 2 selected for battle
2019-11-29 04:46:39 +01:00
.macro dome_reduceparty
setvar VAR_0x8004, BATTLE_DOME_FUNC_REDUCE_PARTY
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Compares the initial tournament ranking (seed) of the player to opponent A. Returns 1 if the player's seed is better, 2 if the opponent's seed is better.
2019-11-29 04:46:39 +01:00
.macro dome_compareseeds
setvar VAR_0x8004, BATTLE_DOME_FUNC_COMPARE_SEEDS
special CallBattleDomeFunction
.endm
@ Buffer the name of the winner for the last Dome challenge to STR_VAR_1
.macro dome_getwinnersname
setvar VAR_0x8004, BATTLE_DOME_FUNC_GET_WINNER_NAME
special CallBattleDomeFunction
.endm
@ Performs a random tourney to initialize the results board before the player has entered a challenge
.macro dome_initresultstree
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_RESULTS_TREE
2019-12-02 21:26:56 +01:00
special CallBattleDomeFunction
.endm
2020-01-05 16:50:32 +01:00
@ Generates the tourney trainers and their parties, and seeds them in the tourney tree
2019-11-29 04:46:39 +01:00
.macro dome_inittrainers
setvar VAR_0x8004, BATTLE_DOME_FUNC_INIT_TRAINERS
special CallBattleDomeFunction
.endm