summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-12-09 14:00:13 -0500
committerhuderlem <huderlem@gmail.com>2019-12-14 08:32:32 -0600
commitaa72c0ada32632f3dfa7641375a84fa8dc8e7e08 (patch)
tree84bf6b304cfbcc1e8d27b7ed3a75fe4f44ddac73 /asm/macros
parentea9a2c848a228d602a86ad8a64e57f56feb37357 (diff)
Document Battle Factory scripts
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/battle_frontier/battle_factory.inc24
1 files changed, 11 insertions, 13 deletions
diff --git a/asm/macros/battle_frontier/battle_factory.inc b/asm/macros/battle_frontier/battle_factory.inc
index 5a1eb33b7..684eeb98d 100644
--- a/asm/macros/battle_frontier/battle_factory.inc
+++ b/asm/macros/battle_frontier/battle_factory.inc
@@ -1,5 +1,3 @@
-@ TODO: Add explanatory comments to macros
-
@ Initialize the Battle Factory challenge
.macro factory_init
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_INIT
@@ -34,68 +32,68 @@
special CallBattleFactoryFunction
.endm
- @
+ @ Select the initial rental mons for the challenge
.macro factory_rentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SELECT_RENT_MONS
special CallBattleFactoryFunction
.endm
- @
+ @ Select a mon to swap for from the previously defeated team
.macro factory_swapmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SWAP_RENT_MONS
special CallBattleFactoryFunction
.endm
- @
+ @ Allows FACTORY_DATA_WIN_STREAK_SWAPS to be incremented once
.macro factory_setswapped
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_SWAPPED
special CallBattleFactoryFunction
.endm
- @
+ @ Update gEnemyParty with the next set of rental mons
.macro factory_setopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
- @
+ @ Populate gPlayerParty and gEnemyParty with the rental mons. Only needed when resuming a challenge, otherwise only factory_setopponentmons and factory_rentmons/factory_swapmons are needed
.macro factory_setparties arg:req
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_PARTIES
setvar VAR_0x8005, \arg
special CallBattleFactoryFunction
.endm
- @
+ @ Set the object event gfx for the opponent trainer
.macro factory_setopponentgfx
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_SET_OPPONENT_GFX
special CallBattleFactoryFunction
.endm
- @
+ @ Generate the mons for the opponents team
.macro factory_generateopponentmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_OPPONENT_MONS
special CallBattleFactoryFunction
.endm
- @
+ @ Generate the random 6 mons to choose from for the initial rental
.macro factory_generaterentalmons
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GENERATE_RENTAL_MONS
special CallBattleFactoryFunction
.endm
- @
+ @ Return the pokemon type most common in the opponents team, or NUMBER_OF_MON_TYPES if there is no standout type
.macro factory_getopponentmontype
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_MON_TYPE
special CallBattleFactoryFunction
.endm
- @
+ @ Return the FACTORY_STYLE_* dependent on what types of moves the opponents team has, or FACTORY_NUM_STYLES if multiple styles tie for the same amount of moves
.macro factory_getopponentstyle
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_GET_OPPONENT_STYLE
special CallBattleFactoryFunction
.endm
- @
+ @ Restore the held items for the players party to what they were pre-battle
.macro factory_resethelditems
setvar VAR_0x8004, BATTLE_FACTORY_FUNC_RESET_HELD_ITEMS
special CallBattleFactoryFunction