summaryrefslogtreecommitdiff
path: root/asm/macros/battle_script.inc
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
committerPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
commitd84d94e29a1424dd1d12ff821957bb6b1bc847d6 (patch)
treec5ba0778afca66a91f71815cd53fe9abef1bdac6 /asm/macros/battle_script.inc
parentad2a97935e1c1f4362f0dffa58ef437d191bab4e (diff)
parentc3cfd6065825ec8ddd5e1782998071518efaa322 (diff)
Merge branch 'master' into pokenav-decomp-again
Diffstat (limited to 'asm/macros/battle_script.inc')
-rw-r--r--asm/macros/battle_script.inc34
1 files changed, 33 insertions, 1 deletions
diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc
index ed32e4643..997af51cc 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
@@ -1092,7 +1124,7 @@
.byte 0xdd
.endm
- .macro asistattackselect param0:req
+ .macro assistattackselect param0:req
.byte 0xde
.4byte \param0
.endm