diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-11-23 08:09:25 -0500 |
---|---|---|
committer | GriffinR <griffin.richards@comcast.net> | 2019-11-23 08:09:25 -0500 |
commit | 2bf1e0600ee341970c4731640a351ded047a55c5 (patch) | |
tree | cbf503b9b428953be57d6399eff3f77c9187f93c | |
parent | 81507fc8b7ed565f5df3a2df6c41959920516bf6 (diff) |
Consolidate apprentice_buff macros
-rw-r--r-- | asm/macros/battle_frontier.inc | 11 | ||||
-rw-r--r-- | data/scripts/apprentice.inc | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/asm/macros/battle_frontier.inc b/asm/macros/battle_frontier.inc index 337238cd3..2a6ee7d74 100644 --- a/asm/macros/battle_frontier.inc +++ b/asm/macros/battle_frontier.inc @@ -118,14 +118,11 @@ special CallApprenticeFunction .macro apprentice_buff whichstringvar:req, tobuff:req setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING setvar VAR_0x8005, \whichstringvar -setvar VAR_0x8006, \tobuff -special CallApprenticeFunction -.endm - -.macro apprentice_buffv whichstringvar:req tobuff:req -setvar VAR_0x8004, APPRENTICE_FUNC_BUFFER_STRING -setvar VAR_0x8005, \whichstringvar +.if \tobuff >= VARS_START copyvar VAR_0x8006, \tobuff +.else +setvar VAR_0x8006, \tobuff +.endif special CallApprenticeFunction .endm diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index 30001af2d..53b43a1f9 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -67,7 +67,7 @@ Apprentice_EventScript_UseWhichMon: @ 82B69D3 apprentice_getnumpartymons compare VAR_RESULT, MULTI_PARTY_SIZE call_if_eq Apprentice_EventScript_LastMonSelected - apprentice_buffv 0, VAR_0x8007 + apprentice_buff 0, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MON call Apprentice_EventScript_SetHideFlags @@ -162,7 +162,7 @@ Apprentice_EventScript_UseWhichMove: @ 82B6C77 call_if_eq Apprentice_EventScript_ChoseMove2 apprentice_setmove apprentice_answeredquestion - apprentice_buffv 0, VAR_0x8007 + apprentice_buff 0, VAR_0x8007 apprentice_freequestion apprentice_msg TRUE, APPRENTICE_MSG_THANKS_MOVE call Apprentice_EventScript_SetHideFlags |