summaryrefslogtreecommitdiff
path: root/asm/macros/battle_script.inc
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-03-31 20:22:47 -0400
committerPhlosioneer <mattmdrr2@gmail.com>2019-03-31 20:22:47 -0400
commit37c7441a158f1c7046034a32eab8e1cbd79c69b9 (patch)
treeabb77f18cf12ba633407e20bbcadf65773a21c74 /asm/macros/battle_script.inc
parent23ac2cc94e2914a427e97467103c0160af6f1be0 (diff)
parent93c4e35d844046d12c7d8bcc64e8fc3e03e85e0d (diff)
Merge branch 'master' into contest-data
Diffstat (limited to 'asm/macros/battle_script.inc')
-rw-r--r--asm/macros/battle_script.inc32
1 files changed, 32 insertions, 0 deletions
diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc
index ed32e4643..7a1af4c17 100644
--- a/asm/macros/battle_script.inc
+++ b/asm/macros/battle_script.inc
@@ -403,6 +403,38 @@
.byte \param0
.byte \param1
.endm
+
+ @ Help macros for 5 uses of moveend command
+
+ @ All cases
+ .macro moveendall
+ setbyte sMOVEEND_STATE, 0
+ moveend 0, 0
+ .endm
+
+ @ Chosen case
+ .macro moveendcase case:req
+ setbyte sMOVEEND_STATE, \case
+ moveend 1, 0
+ .endm
+
+ @ All cases from (inclusive)
+ .macro moveendfrom from:req
+ setbyte sMOVEEND_STATE, \from
+ moveend 0, 0
+ .endm
+
+ @ All cases from 0 to (not inclusive)
+ .macro moveendto to:req
+ setbyte sMOVEEND_STATE, 0
+ moveend 2, \to
+ .endm
+
+ @ Cases from (inclusive) to (not inclusive)
+ .macro moveendfromto from:req, to:req
+ setbyte sMOVEEND_STATE, \from
+ moveend 2, \to
+ .endm
.macro typecalc2
.byte 0x4a