Label battle script macro arguments
This commit is contained in:
+222
-215
@@ -3,10 +3,10 @@
|
|||||||
.byte 0x0
|
.byte 0x0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro accuracycheck param0:req, param1:req
|
.macro accuracycheck failPtr:req, move:req
|
||||||
.byte 0x1
|
.byte 0x1
|
||||||
.4byte \param0
|
.4byte \failPtr
|
||||||
.2byte \param1
|
.2byte \move
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro attackstring
|
.macro attackstring
|
||||||
@@ -77,9 +77,9 @@
|
|||||||
.2byte \id
|
.2byte \id
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro waitmessage param0:req
|
.macro waitmessage time:req
|
||||||
.byte 0x12
|
.byte 0x12
|
||||||
.2byte \param0
|
.2byte \time
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro printfromtable ptr:req
|
.macro printfromtable ptr:req
|
||||||
@@ -109,10 +109,17 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryfaintmon battler:req, param1:req, ptr:req
|
.macro tryfaintmon battler:req
|
||||||
.byte 0x19
|
.byte 0x19
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.byte \param1
|
.byte FALSE
|
||||||
|
.4byte NULL
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro tryfaintmon_spikes battler:req, ptr:req
|
||||||
|
.byte 0x19
|
||||||
|
.byte \battler
|
||||||
|
.byte TRUE
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -140,9 +147,9 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifability param0:req, ability:req, ptr:req
|
.macro jumpifability battler:req, ability:req, ptr:req
|
||||||
.byte 0x1e
|
.byte 0x1e
|
||||||
.byte \param0
|
.byte \battler
|
||||||
.byte \ability
|
.byte \ability
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
@@ -163,11 +170,11 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifstatus3condition battler:req, status3:req, param2:req, ptr:req
|
.macro jumpifstatus3condition battler:req, status3:req, condition:req, ptr:req
|
||||||
.byte 0x21
|
.byte 0x21
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.4byte \status3
|
.4byte \status3
|
||||||
.byte \param2
|
.byte \condition
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -207,118 +214,118 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifbyte ifflag:req, param1:req, param2:req, param3:req
|
.macro jumpifbyte ifflag:req, val:req, byte:req, ptr:req
|
||||||
.byte 0x29
|
.byte 0x29
|
||||||
.byte \ifflag
|
.byte \ifflag
|
||||||
.4byte \param1
|
.4byte \val
|
||||||
.byte \param2
|
.byte \byte
|
||||||
.4byte \param3
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifhalfword ifflag:req, param1:req, param2:req, param3:req
|
.macro jumpifhalfword ifflag:req, val:req, hword:req, ptr:req
|
||||||
.byte 0x2a
|
.byte 0x2a
|
||||||
.byte \ifflag
|
.byte \ifflag
|
||||||
.4byte \param1
|
.4byte \val
|
||||||
.2byte \param2
|
.2byte \hword
|
||||||
.4byte \param3
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifword ifflag:req, param1:req, param2:req, param3:req
|
.macro jumpifword ifflag:req, val:req, word:req, ptr:req
|
||||||
.byte 0x2b
|
.byte 0x2b
|
||||||
.byte \ifflag
|
.byte \ifflag
|
||||||
.4byte \param1
|
.4byte \val
|
||||||
.4byte \param2
|
.4byte \word
|
||||||
.4byte \param3
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifarrayequal param0:req, param1:req, param2:req, param3:req
|
.macro jumpifarrayequal val1:req, val2:req, size:req, ptr:req
|
||||||
.byte 0x2c
|
.byte 0x2c
|
||||||
.4byte \param0
|
.4byte \val1
|
||||||
.4byte \param1
|
.4byte \val2
|
||||||
.byte \param2
|
.byte \size
|
||||||
.4byte \param3
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifarraynotequal param0:req, param1:req, param2:req, param3:req
|
.macro jumpifarraynotequal val1:req, val2:req, size:req, ptr:req
|
||||||
.byte 0x2d
|
.byte 0x2d
|
||||||
.4byte \param0
|
.4byte \val1
|
||||||
.4byte \param1
|
.4byte \val2
|
||||||
.byte \param2
|
.byte \size
|
||||||
.4byte \param3
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setbyte ptr:req, param1:req
|
.macro setbyte ptr:req, byte:req
|
||||||
.byte 0x2e
|
.byte 0x2e
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.byte \param1
|
.byte \byte
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro addbyte ptr:req, param1:req
|
.macro addbyte ptr:req, byte:req
|
||||||
.byte 0x2f
|
.byte 0x2f
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.byte \param1
|
.byte \byte
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro subbyte ptr:req, param1:req
|
.macro subbyte ptr:req, byte:req
|
||||||
.byte 0x30
|
.byte 0x30
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.byte \param1
|
.byte \byte
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copyarray param0:req, param1:req, param2:req
|
.macro copyarray dest:req, src:req, size:req
|
||||||
.byte 0x31
|
.byte 0x31
|
||||||
.4byte \param0
|
.4byte \dest
|
||||||
.4byte \param1
|
.4byte \src
|
||||||
.byte \param2
|
.byte \size
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copyarraywithindex param0:req, param1:req, param2:req, param3:req
|
.macro copyarraywithindex dest:req, src:req, index:req, size:req
|
||||||
.byte 0x32
|
.byte 0x32
|
||||||
.4byte \param0
|
.4byte \dest
|
||||||
.4byte \param1
|
.4byte \src
|
||||||
.4byte \param2
|
.4byte \index
|
||||||
.byte \param3
|
.byte \size
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro orbyte ptr:req, param1:req
|
.macro orbyte ptr:req, byte:req
|
||||||
.byte 0x33
|
.byte 0x33
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.byte \param1
|
.byte \byte
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro orhalfword ptr:req, param1:req
|
.macro orhalfword ptr:req, hword:req
|
||||||
.byte 0x34
|
.byte 0x34
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.2byte \param1
|
.2byte \hword
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro orword ptr:req, param1:req
|
.macro orword ptr:req, word:req
|
||||||
.byte 0x35
|
.byte 0x35
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.4byte \param1
|
.4byte \word
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro bicbyte ptr:req, param1:req
|
.macro bicbyte ptr:req, byte:req
|
||||||
.byte 0x36
|
.byte 0x36
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.byte \param1
|
.byte \byte
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro bichalfword ptr:req, param1:req
|
.macro bichalfword ptr:req, hword:req
|
||||||
.byte 0x37
|
.byte 0x37
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.2byte \param1
|
.2byte \hword
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro bicword ptr:req, param1:req
|
.macro bicword ptr:req, word:req
|
||||||
.byte 0x38
|
.byte 0x38
|
||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.4byte \param1
|
.4byte \word
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro pause param0:req
|
.macro pause time:req
|
||||||
.byte 0x39
|
.byte 0x39
|
||||||
.2byte \param0
|
.2byte \time
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro waitstate
|
.macro waitstate
|
||||||
@@ -373,18 +380,18 @@
|
|||||||
.byte 0x44
|
.byte 0x44
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro playanimation battler:req, param1:req, param2:req
|
.macro playanimation battler:req, animType:req, arg=NULL
|
||||||
.byte 0x45
|
.byte 0x45
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.byte \param1
|
.byte \animType
|
||||||
.4byte \param2
|
.4byte \arg
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro playanimation2 battler:req, param1:req, param2:req
|
.macro playanimation_var battler:req, animType:req, arg=NULL
|
||||||
.byte 0x46
|
.byte 0x46
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.4byte \param1
|
.4byte \animType
|
||||||
.4byte \param2
|
.4byte \arg
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setgraphicalstatchangevalues
|
.macro setgraphicalstatchangevalues
|
||||||
@@ -398,10 +405,10 @@
|
|||||||
.byte \statchange
|
.byte \statchange
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro moveend param0:req, param1:req
|
.macro moveend endMode:req, endState:req
|
||||||
.byte 0x49
|
.byte 0x49
|
||||||
.byte \param0
|
.byte \endMode
|
||||||
.byte \param1
|
.byte \endState
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Help macros for 5 uses of moveend command
|
@ Help macros for 5 uses of moveend command
|
||||||
@@ -466,16 +473,16 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro openpartyscreen param0:req, param1:req
|
.macro openpartyscreen battler:req, ptr:req
|
||||||
.byte 0x50
|
.byte 0x50
|
||||||
.byte \param0
|
.byte \battler
|
||||||
.4byte \param1
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro switchhandleorder battler:req, param1:req
|
.macro switchhandleorder battler:req, state:req
|
||||||
.byte 0x51
|
.byte 0x51
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.byte \param1
|
.byte \state
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro switchineffects battler:req
|
.macro switchineffects battler:req
|
||||||
@@ -488,14 +495,14 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro playse param0:req
|
.macro playse song:req
|
||||||
.byte 0x54
|
.byte 0x54
|
||||||
.2byte \param0
|
.2byte \song
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro fanfare param0:req
|
.macro fanfare song:req
|
||||||
.byte 0x55
|
.byte 0x55
|
||||||
.2byte \param0
|
.2byte \song
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro playfaintcry battler:req
|
.macro playfaintcry battler:req
|
||||||
@@ -512,21 +519,21 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro handlelearnnewmove param0:req, param1:req, param2:req
|
.macro handlelearnnewmove learnedMovePtr:req, nothingToLearnPtr:req, isFirstMove:req
|
||||||
.byte 0x59
|
.byte 0x59
|
||||||
.4byte \param0
|
.4byte \learnedMovePtr
|
||||||
.4byte \param1
|
.4byte \nothingToLearnPtr
|
||||||
.byte \param2
|
.byte \isFirstMove
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro yesnoboxlearnmove param0:req
|
.macro yesnoboxlearnmove forgotMovePtr:req
|
||||||
.byte 0x5a
|
.byte 0x5a
|
||||||
.4byte \param0
|
.4byte \forgotMovePtr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro yesnoboxstoplearningmove param0:req
|
.macro yesnoboxstoplearningmove noPtr:req
|
||||||
.byte 0x5b
|
.byte 0x5b
|
||||||
.4byte \param0
|
.4byte \noPtr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro hitanimation battler:req
|
.macro hitanimation battler:req
|
||||||
@@ -547,9 +554,9 @@
|
|||||||
.byte 0x5f
|
.byte 0x5f
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro incrementgamestat param0:req
|
.macro incrementgamestat stat:req
|
||||||
.byte 0x60
|
.byte 0x60
|
||||||
.byte \param0
|
.byte \stat
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro drawpartystatussummary battler:req
|
.macro drawpartystatussummary battler:req
|
||||||
@@ -562,9 +569,9 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumptocalledmove param0:req
|
.macro jumptocalledmove notChosenMove:req
|
||||||
.byte 0x63
|
.byte 0x63
|
||||||
.byte \param0
|
.byte \notChosenMove
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro statusanimation battler:req
|
.macro statusanimation battler:req
|
||||||
@@ -578,11 +585,11 @@
|
|||||||
.4byte \status2
|
.4byte \status2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro chosenstatusanimation battler:req, param1:req, param2:req
|
.macro chosenstatusanimation battler:req, isStatus2:req, status:req
|
||||||
.byte 0x66
|
.byte 0x66
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.byte \param1
|
.byte \isStatus2
|
||||||
.4byte \param2
|
.4byte \status
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro yesnobox
|
.macro yesnobox
|
||||||
@@ -651,10 +658,10 @@
|
|||||||
.byte 0x75
|
.byte 0x75
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro various battler:req, param1:req
|
.macro various battler:req, id:req
|
||||||
.byte 0x76
|
.byte 0x76
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.byte \param1
|
.byte \id
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setprotectlike
|
.macro setprotectlike
|
||||||
@@ -674,9 +681,9 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryhealhalfhealth param0:req, battler:req
|
.macro tryhealhalfhealth ptr:req, battler:req
|
||||||
.byte 0x7b
|
.byte 0x7b
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -696,14 +703,14 @@
|
|||||||
.byte 0x7f
|
.byte 0x7f
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro manipulatedamage param0:req
|
.macro manipulatedamage mode:req
|
||||||
.byte 0x80
|
.byte 0x80
|
||||||
.byte \param0
|
.byte \mode
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetrest param0:req
|
.macro trysetrest ptr:req
|
||||||
.byte 0x81
|
.byte 0x81
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnotfirstturn ptr:req
|
.macro jumpifnotfirstturn ptr:req
|
||||||
@@ -715,23 +722,23 @@
|
|||||||
.byte 0x83
|
.byte 0x83
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifcantmakeasleep param0:req
|
.macro jumpifcantmakeasleep ptr:req
|
||||||
.byte 0x84
|
.byte 0x84
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stockpile
|
.macro stockpile
|
||||||
.byte 0x85
|
.byte 0x85
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stockpiletobasedamage param0:req
|
.macro stockpiletobasedamage ptr:req
|
||||||
.byte 0x86
|
.byte 0x86
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro stockpiletohpheal param0:req
|
.macro stockpiletohpheal ptr:req
|
||||||
.byte 0x87
|
.byte 0x87
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro negativedamage
|
.macro negativedamage
|
||||||
@@ -756,23 +763,23 @@
|
|||||||
.byte 0x8c
|
.byte 0x8c
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setmultihitcounter param0:req
|
.macro setmultihitcounter val:req
|
||||||
.byte 0x8d
|
.byte 0x8d
|
||||||
.byte \param0
|
.byte \val
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro initmultihitstring
|
.macro initmultihitstring
|
||||||
.byte 0x8e
|
.byte 0x8e
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro forcerandomswitch param0:req
|
.macro forcerandomswitch ptr:req
|
||||||
.byte 0x8f
|
.byte 0x8f
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryconversiontypechange param0:req
|
.macro tryconversiontypechange ptr:req
|
||||||
.byte 0x90
|
.byte 0x90
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro givepaydaymoney
|
.macro givepaydaymoney
|
||||||
@@ -783,9 +790,9 @@
|
|||||||
.byte 0x92
|
.byte 0x92
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryKO param0:req
|
.macro tryKO ptr:req
|
||||||
.byte 0x93
|
.byte 0x93
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro damagetohalftargethp
|
.macro damagetohalftargethp
|
||||||
@@ -800,9 +807,9 @@
|
|||||||
.byte 0x96
|
.byte 0x96
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryinfatuating param0:req
|
.macro tryinfatuating ptr:req
|
||||||
.byte 0x97
|
.byte 0x97
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro updatestatusicon battler:req
|
.macro updatestatusicon battler:req
|
||||||
@@ -826,9 +833,9 @@
|
|||||||
.byte 0x9c
|
.byte 0x9c
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro mimicattackcopy param0:req
|
.macro mimicattackcopy ptr:req
|
||||||
.byte 0x9d
|
.byte 0x9d
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro metronome
|
.macro metronome
|
||||||
@@ -843,48 +850,48 @@
|
|||||||
.byte 0xa0
|
.byte 0xa0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro counterdamagecalculator param0:req
|
.macro counterdamagecalculator ptr:req
|
||||||
.byte 0xa1
|
.byte 0xa1
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro mirrorcoatdamagecalculator param0:req
|
.macro mirrorcoatdamagecalculator ptr:req
|
||||||
.byte 0xa2
|
.byte 0xa2
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro disablelastusedattack param0:req
|
.macro disablelastusedattack ptr:req
|
||||||
.byte 0xa3
|
.byte 0xa3
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetencore param0:req
|
.macro trysetencore ptr:req
|
||||||
.byte 0xa4
|
.byte 0xa4
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro painsplitdmgcalc param0:req
|
.macro painsplitdmgcalc ptr:req
|
||||||
.byte 0xa5
|
.byte 0xa5
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro settypetorandomresistance param0:req
|
.macro settypetorandomresistance ptr:req
|
||||||
.byte 0xa6
|
.byte 0xa6
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setalwayshitflag
|
.macro setalwayshitflag
|
||||||
.byte 0xa7
|
.byte 0xa7
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copymovepermanently param0:req
|
.macro copymovepermanently ptr:req
|
||||||
.byte 0xa8
|
.byte 0xa8
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trychoosesleeptalkmove param0:req
|
.macro trychoosesleeptalkmove ptr:req
|
||||||
.byte 0xa9
|
.byte 0xa9
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setdestinybond
|
.macro setdestinybond
|
||||||
@@ -899,32 +906,32 @@
|
|||||||
.byte 0xac
|
.byte 0xac
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryspiteppreduce param0:req
|
.macro tryspiteppreduce ptr:req
|
||||||
.byte 0xad
|
.byte 0xad
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro healpartystatus
|
.macro healpartystatus
|
||||||
.byte 0xae
|
.byte 0xae
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro cursetarget param0:req
|
.macro cursetarget ptr:req
|
||||||
.byte 0xaf
|
.byte 0xaf
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetspikes param0:req
|
.macro trysetspikes ptr:req
|
||||||
.byte 0xb0
|
.byte 0xb0
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setforesight
|
.macro setforesight
|
||||||
.byte 0xb1
|
.byte 0xb1
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetperishsong param0:req
|
.macro trysetperishsong ptr:req
|
||||||
.byte 0xb2
|
.byte 0xb2
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro rolloutdamagecalculation
|
.macro rolloutdamagecalculation
|
||||||
@@ -957,23 +964,23 @@
|
|||||||
.byte 0xb9
|
.byte 0xb9
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnopursuitswitchdmg param0:req
|
.macro jumpifnopursuitswitchdmg ptr:req
|
||||||
.byte 0xba
|
.byte 0xba
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setsunny
|
.macro setsunny
|
||||||
.byte 0xbb
|
.byte 0xbb
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro maxattackhalvehp param0:req
|
.macro maxattackhalvehp ptr:req
|
||||||
.byte 0xbc
|
.byte 0xbc
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro copyfoestats param0:req
|
.macro copyfoestats ptr:req
|
||||||
.byte 0xbd
|
.byte 0xbd
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro rapidspinfree
|
.macro rapidspinfree
|
||||||
@@ -984,9 +991,9 @@
|
|||||||
.byte 0xbf
|
.byte 0xbf
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro recoverbasedonsunlight param0:req
|
.macro recoverbasedonsunlight ptr:req
|
||||||
.byte 0xc0
|
.byte 0xc0
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro hiddenpowercalc
|
.macro hiddenpowercalc
|
||||||
@@ -997,15 +1004,15 @@
|
|||||||
.byte 0xc2
|
.byte 0xc2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetfutureattack param0:req
|
.macro trysetfutureattack ptr:req
|
||||||
.byte 0xc3
|
.byte 0xc3
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trydobeatup param0:req, param1:req
|
.macro trydobeatup endPtr:req, failPtr:req
|
||||||
.byte 0xc4
|
.byte 0xc4
|
||||||
.4byte \param0
|
.4byte \endPtr
|
||||||
.4byte \param1
|
.4byte \failPtr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setsemiinvulnerablebit
|
.macro setsemiinvulnerablebit
|
||||||
@@ -1041,107 +1048,107 @@
|
|||||||
.byte 0xcc
|
.byte 0xcc
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro cureifburnedparalysedorpoisoned param0:req
|
.macro cureifburnedparalysedorpoisoned ptr:req
|
||||||
.byte 0xcd
|
.byte 0xcd
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro settorment param0:req
|
.macro settorment ptr:req
|
||||||
.byte 0xce
|
.byte 0xce
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnodamage param0:req
|
.macro jumpifnodamage ptr:req
|
||||||
.byte 0xcf
|
.byte 0xcf
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro settaunt param0:req
|
.macro settaunt ptr:req
|
||||||
.byte 0xd0
|
.byte 0xd0
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysethelpinghand param0:req
|
.macro trysethelpinghand ptr:req
|
||||||
.byte 0xd1
|
.byte 0xd1
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryswapitems param0:req
|
.macro tryswapitems ptr:req
|
||||||
.byte 0xd2
|
.byte 0xd2
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trycopyability param0:req
|
.macro trycopyability ptr:req
|
||||||
.byte 0xd3
|
.byte 0xd3
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trywish param0:req, param1:req
|
.macro trywish turnNumber:req, ptr:req
|
||||||
.byte 0xd4
|
.byte 0xd4
|
||||||
.byte \param0
|
.byte \turnNumber
|
||||||
.4byte \param1
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetroots param0:req
|
.macro trysetroots ptr:req
|
||||||
.byte 0xd5
|
.byte 0xd5
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro doubledamagedealtifdamaged
|
.macro doubledamagedealtifdamaged
|
||||||
.byte 0xd6
|
.byte 0xd6
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setyawn param0:req
|
.macro setyawn ptr:req
|
||||||
.byte 0xd7
|
.byte 0xd7
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setdamagetohealthdifference param0:req
|
.macro setdamagetohealthdifference ptr:req
|
||||||
.byte 0xd8
|
.byte 0xd8
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro scaledamagebyhealthratio
|
.macro scaledamagebyhealthratio
|
||||||
.byte 0xd9
|
.byte 0xd9
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryswapabilities param0:req
|
.macro tryswapabilities ptr:req
|
||||||
.byte 0xda
|
.byte 0xda
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryimprison param0:req
|
.macro tryimprison ptr:req
|
||||||
.byte 0xdb
|
.byte 0xdb
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetgrudge param0:req
|
.macro trysetgrudge ptr:req
|
||||||
.byte 0xdc
|
.byte 0xdc
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro weightdamagecalculation
|
.macro weightdamagecalculation
|
||||||
.byte 0xdd
|
.byte 0xdd
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro assistattackselect param0:req
|
.macro assistattackselect ptr:req
|
||||||
.byte 0xde
|
.byte 0xde
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetmagiccoat param0:req
|
.macro trysetmagiccoat ptr:req
|
||||||
.byte 0xdf
|
.byte 0xdf
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetsnatch param0:req
|
.macro trysetsnatch ptr:req
|
||||||
.byte 0xe0
|
.byte 0xe0
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trygetintimidatetarget param0:req
|
.macro trygetintimidatetarget ptr:req
|
||||||
.byte 0xe1
|
.byte 0xe1
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro switchoutabilities battler:req
|
.macro switchoutabilities battler:req
|
||||||
@@ -1149,10 +1156,10 @@
|
|||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifhasnohp battler:req, param1:req
|
.macro jumpifhasnohp battler:req, ptr:req
|
||||||
.byte 0xe3
|
.byte 0xe3
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.4byte \param1
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro getsecretpowereffect
|
.macro getsecretpowereffect
|
||||||
@@ -1171,28 +1178,28 @@
|
|||||||
.byte 0xe7
|
.byte 0xe7
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro settypebasedhalvers param0:req
|
.macro settypebasedhalvers ptr:req
|
||||||
.byte 0xe8
|
.byte 0xe8
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setweatherballtype
|
.macro setweatherballtype
|
||||||
.byte 0xe9
|
.byte 0xe9
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro tryrecycleitem param0:req
|
.macro tryrecycleitem ptr:req
|
||||||
.byte 0xea
|
.byte 0xea
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro settypetoterrain param0:req
|
.macro settypetoterrain ptr:req
|
||||||
.byte 0xeb
|
.byte 0xeb
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro pursuitrelated param0:req
|
.macro pursuitdoubles ptr:req
|
||||||
.byte 0xec
|
.byte 0xec
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro snatchsetbattlers
|
.macro snatchsetbattlers
|
||||||
@@ -1211,18 +1218,18 @@
|
|||||||
.byte 0xf0
|
.byte 0xf0
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trysetcaughtmondexflags param0:req
|
.macro trysetcaughtmondexflags ptr:req
|
||||||
.byte 0xf1
|
.byte 0xf1
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro displaydexinfo
|
.macro displaydexinfo
|
||||||
.byte 0xf2
|
.byte 0xf2
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trygivecaughtmonnick param0:req
|
.macro trygivecaughtmonnick ptr:req
|
||||||
.byte 0xf3
|
.byte 0xf3
|
||||||
.4byte \param0
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro subattackerhpbydmg
|
.macro subattackerhpbydmg
|
||||||
@@ -1241,9 +1248,9 @@
|
|||||||
.byte 0xf7
|
.byte 0xf7
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro trainerslideout param0:req
|
.macro trainerslideout position:req
|
||||||
.byte 0xf8
|
.byte 0xf8
|
||||||
.byte \param0
|
.byte \position
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ various command changed to more readable macros
|
@ various command changed to more readable macros
|
||||||
@@ -1357,11 +1364,11 @@
|
|||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7
|
setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setmoveeffect effect:req
|
.macro setmoveeffect effect:req
|
||||||
setbyte cEFFECT_CHOOSER \effect
|
setbyte cEFFECT_CHOOSER, \effect
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro chosenstatus1animation battler:req, status:req
|
.macro chosenstatus1animation battler:req, status:req
|
||||||
@@ -1413,11 +1420,11 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
|
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
|
||||||
jumpifstatus3condition \battler, \status, 0x0, \jumpptr
|
jumpifstatus3condition \battler, \status, FALSE, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifnostatus3 battler:req, status:req, jumpptr:req
|
.macro jumpifnostatus3 battler:req, status:req, jumpptr:req
|
||||||
jumpifstatus3condition \battler, \status, 0x1, \jumpptr
|
jumpifstatus3condition \battler, \status, TRUE, \jumpptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro jumpifmovehadnoeffect jumpptr:req
|
.macro jumpifmovehadnoeffect jumpptr:req
|
||||||
|
|||||||
+66
-66
@@ -262,7 +262,7 @@ BattleScript_HitFromAtkAnimation::
|
|||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
seteffectwithchance
|
seteffectwithchance
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
BattleScript_MoveEnd::
|
BattleScript_MoveEnd::
|
||||||
moveendall
|
moveendall
|
||||||
end
|
end
|
||||||
@@ -354,8 +354,8 @@ BattleScript_AbsorbUpdateHp::
|
|||||||
printfromtable gAbsorbDrainStringIds
|
printfromtable gAbsorbDrainStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AbsorbTryFainting::
|
BattleScript_AbsorbTryFainting::
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectBurnHit::
|
BattleScript_EffectBurnHit::
|
||||||
@@ -399,10 +399,10 @@ BattleScript_ExplosionLoop:
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendto MOVEEND_NEXT_TARGET
|
moveendto MOVEEND_NEXT_TARGET
|
||||||
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
end
|
end
|
||||||
BattleScript_ExplosionMissed:
|
BattleScript_ExplosionMissed:
|
||||||
effectivenesssound
|
effectivenesssound
|
||||||
@@ -410,7 +410,7 @@ BattleScript_ExplosionMissed:
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
moveendto MOVEEND_NEXT_TARGET
|
moveendto MOVEEND_NEXT_TARGET
|
||||||
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
jumpifnexttargetvalid BattleScript_ExplosionLoop
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
end
|
end
|
||||||
|
|
||||||
BattleScript_PreserveMissedBitDoMoveAnim:
|
BattleScript_PreserveMissedBitDoMoveAnim:
|
||||||
@@ -456,7 +456,7 @@ BattleScript_DreamEaterWorked:
|
|||||||
printstring STRINGID_PKMNDREAMEATEN
|
printstring STRINGID_PKMNDREAMEATEN
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_DreamEaterTryFaintEnd:
|
BattleScript_DreamEaterTryFaintEnd:
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectMirrorMove::
|
BattleScript_EffectMirrorMove::
|
||||||
@@ -647,7 +647,7 @@ BattleScript_MultiHitPrintStrings::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_MultiHitEnd::
|
BattleScript_MultiHitEnd::
|
||||||
seteffectwithchance
|
seteffectwithchance
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
||||||
moveendfrom MOVEEND_IMMUNITY_ABILITIES
|
moveendfrom MOVEEND_IMMUNITY_ABILITIES
|
||||||
end
|
end
|
||||||
@@ -865,7 +865,7 @@ BattleScript_MoveMissedDoDamage::
|
|||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
|
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
@@ -1431,7 +1431,7 @@ BattleScript_TripleKickPrintStrings::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_TripleKickEnd::
|
BattleScript_TripleKickEnd::
|
||||||
seteffectwithchance
|
seteffectwithchance
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendfrom MOVEEND_UPDATE_LAST_MOVES
|
moveendfrom MOVEEND_UPDATE_LAST_MOVES
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1524,7 +1524,7 @@ BattleScript_DoGhostCurse::
|
|||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
printstring STRINGID_PKMNLAIDCURSE
|
printstring STRINGID_PKMNLAIDCURSE
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectProtect::
|
BattleScript_EffectProtect::
|
||||||
@@ -1862,7 +1862,7 @@ BattleScript_DoHitAllWithUndergroundBonus::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
printstring STRINGID_EMPTYSTRING3
|
printstring STRINGID_EMPTYSTRING3
|
||||||
waitmessage 1
|
waitmessage 1
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendto MOVEEND_NEXT_TARGET
|
moveendto MOVEEND_NEXT_TARGET
|
||||||
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
|
jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop
|
||||||
end
|
end
|
||||||
@@ -1962,7 +1962,7 @@ BattleScript_BeatUpAttack::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendto MOVEEND_NEXT_TARGET
|
moveendto MOVEEND_NEXT_TARGET
|
||||||
goto BattleScript_BeatUpLoop
|
goto BattleScript_BeatUpLoop
|
||||||
BattleScript_BeatUpEnd::
|
BattleScript_BeatUpEnd::
|
||||||
@@ -2227,7 +2227,7 @@ BattleScript_EffectMementoTrySpAtk:
|
|||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_EffectMementoTryFaint:
|
BattleScript_EffectMementoTryFaint:
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
BattleScript_EffectMementoPrintNoEffect:
|
BattleScript_EffectMementoPrintNoEffect:
|
||||||
printstring STRINGID_BUTNOEFFECT
|
printstring STRINGID_BUTNOEFFECT
|
||||||
@@ -2243,7 +2243,7 @@ BattleScript_MementoFailEnd:
|
|||||||
effectivenesssound
|
effectivenesssound
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectFacade::
|
BattleScript_EffectFacade::
|
||||||
@@ -2442,7 +2442,7 @@ BattleScript_BrickBreakDoHit::
|
|||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
seteffectwithchance
|
seteffectwithchance
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectYawn::
|
BattleScript_EffectYawn::
|
||||||
@@ -3045,7 +3045,7 @@ BattleScript_FrontierTrainerBattleWon_End:
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_SmokeBallEscape::
|
BattleScript_SmokeBallEscape::
|
||||||
playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE, NULL
|
playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE
|
||||||
printstring STRINGID_PKMNFLEDUSINGITS
|
printstring STRINGID_PKMNFLEDUSINGITS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
end2
|
end2
|
||||||
@@ -3136,7 +3136,7 @@ BattleScript_PursuitDmgOnSwitchOut::
|
|||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE
|
moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE
|
||||||
getbattlerfainted BS_TARGET
|
getbattlerfainted BS_TARGET
|
||||||
jumpifbyte CMP_EQUAL, gBattleCommunication, FALSE, BattleScript_PursuitDmgOnSwitchOutRet
|
jumpifbyte CMP_EQUAL, gBattleCommunication, FALSE, BattleScript_PursuitDmgOnSwitchOutRet
|
||||||
@@ -3190,14 +3190,14 @@ BattleScript_RainContinuesOrEnds::
|
|||||||
printfromtable gRainContinuesStringIds
|
printfromtable gRainContinuesStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd
|
||||||
playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES, NULL
|
playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES
|
||||||
BattleScript_RainContinuesOrEndsEnd::
|
BattleScript_RainContinuesOrEndsEnd::
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_DamagingWeatherContinues::
|
BattleScript_DamagingWeatherContinues::
|
||||||
printfromtable gSandStormHailContinuesStringIds
|
printfromtable gSandStormHailContinuesStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL
|
playanimation_var BS_ATTACKER, sB_ANIM_ARG1
|
||||||
setbyte gBattleCommunication, 0
|
setbyte gBattleCommunication, 0
|
||||||
BattleScript_DamagingWeatherLoop::
|
BattleScript_DamagingWeatherLoop::
|
||||||
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
|
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
|
||||||
@@ -3210,7 +3210,7 @@ BattleScript_DamagingWeatherLoop::
|
|||||||
hitanimation BS_ATTACKER
|
hitanimation BS_ATTACKER
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
checkteamslost BattleScript_DamagingWeatherLoopIncrement
|
checkteamslost BattleScript_DamagingWeatherLoopIncrement
|
||||||
BattleScript_DamagingWeatherLoopIncrement::
|
BattleScript_DamagingWeatherLoopIncrement::
|
||||||
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd
|
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd
|
||||||
@@ -3228,7 +3228,7 @@ BattleScript_SandStormHailEnds::
|
|||||||
BattleScript_SunlightContinues::
|
BattleScript_SunlightContinues::
|
||||||
printstring STRINGID_SUNLIGHTSTRONG
|
printstring STRINGID_SUNLIGHTSTRONG
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES, NULL
|
playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_SunlightFaded::
|
BattleScript_SunlightFaded::
|
||||||
@@ -3239,7 +3239,7 @@ BattleScript_SunlightFaded::
|
|||||||
BattleScript_OverworldWeatherStarts::
|
BattleScript_OverworldWeatherStarts::
|
||||||
printfromtable gWeatherStartsStringIds
|
printfromtable gWeatherStartsStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL
|
playanimation_var BS_ATTACKER, sB_ANIM_ARG1
|
||||||
end3
|
end3
|
||||||
|
|
||||||
BattleScript_SideStatusWoreOff::
|
BattleScript_SideStatusWoreOff::
|
||||||
@@ -3277,8 +3277,8 @@ BattleScript_LeechSeedTurnPrintAndUpdateHp::
|
|||||||
datahpupdate BS_TARGET
|
datahpupdate BS_TARGET
|
||||||
printfromtable gLeechSeedStringIds
|
printfromtable gLeechSeedStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BideStoringEnergy::
|
BattleScript_BideStoringEnergy::
|
||||||
@@ -3307,7 +3307,7 @@ BattleScript_BideAttack::
|
|||||||
datahpupdate BS_TARGET
|
datahpupdate BS_TARGET
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_BideNoEnergyToAttack::
|
BattleScript_BideNoEnergyToAttack::
|
||||||
@@ -3379,7 +3379,7 @@ BattleScript_DestinyBondTakesLife::
|
|||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_SpikesOnAttacker::
|
BattleScript_SpikesOnAttacker::
|
||||||
@@ -3387,8 +3387,8 @@ BattleScript_SpikesOnAttacker::
|
|||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
call BattleScript_PrintHurtBySpikes
|
call BattleScript_PrintHurtBySpikes
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, TRUE, BattleScript_SpikesOnAttackerFainted
|
tryfaintmon_spikes BS_ATTACKER, BattleScript_SpikesOnAttackerFainted
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_SpikesOnAttackerFainted::
|
BattleScript_SpikesOnAttackerFainted::
|
||||||
@@ -3402,8 +3402,8 @@ BattleScript_SpikesOnTarget::
|
|||||||
healthbarupdate BS_TARGET
|
healthbarupdate BS_TARGET
|
||||||
datahpupdate BS_TARGET
|
datahpupdate BS_TARGET
|
||||||
call BattleScript_PrintHurtBySpikes
|
call BattleScript_PrintHurtBySpikes
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
tryfaintmon BS_TARGET, TRUE, BattleScript_SpikesOnTargetFainted
|
tryfaintmon_spikes BS_TARGET, BattleScript_SpikesOnTargetFainted
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_SpikesOnTargetFainted::
|
BattleScript_SpikesOnTargetFainted::
|
||||||
@@ -3417,8 +3417,8 @@ BattleScript_SpikesOnFaintedBattler::
|
|||||||
healthbarupdate BS_FAINTED
|
healthbarupdate BS_FAINTED
|
||||||
datahpupdate BS_FAINTED
|
datahpupdate BS_FAINTED
|
||||||
call BattleScript_PrintHurtBySpikes
|
call BattleScript_PrintHurtBySpikes
|
||||||
tryfaintmon BS_FAINTED, FALSE, NULL
|
tryfaintmon BS_FAINTED
|
||||||
tryfaintmon BS_FAINTED, TRUE, BattleScript_SpikesOnFaintedBattlerFainted
|
tryfaintmon_spikes BS_FAINTED, BattleScript_SpikesOnFaintedBattlerFainted
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_SpikesOnFaintedBattlerFainted::
|
BattleScript_SpikesOnFaintedBattlerFainted::
|
||||||
@@ -3438,7 +3438,7 @@ BattleScript_PerishSongTakesLife::
|
|||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_PerishSongCountGoesDown::
|
BattleScript_PerishSongCountGoesDown::
|
||||||
@@ -3513,10 +3513,10 @@ BattleScript_CheckDoomDesireMiss::
|
|||||||
BattleScript_FutureAttackAnimate::
|
BattleScript_FutureAttackAnimate::
|
||||||
adjustnormaldamage2
|
adjustnormaldamage2
|
||||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_FutureHitAnimDoomDesire
|
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_FutureHitAnimDoomDesire
|
||||||
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL
|
playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT
|
||||||
goto BattleScript_DoFutureAttackHit
|
goto BattleScript_DoFutureAttackHit
|
||||||
BattleScript_FutureHitAnimDoomDesire::
|
BattleScript_FutureHitAnimDoomDesire::
|
||||||
playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT, NULL
|
playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT
|
||||||
BattleScript_DoFutureAttackHit::
|
BattleScript_DoFutureAttackHit::
|
||||||
effectivenesssound
|
effectivenesssound
|
||||||
hitanimation BS_TARGET
|
hitanimation BS_TARGET
|
||||||
@@ -3525,7 +3525,7 @@ BattleScript_DoFutureAttackHit::
|
|||||||
datahpupdate BS_TARGET
|
datahpupdate BS_TARGET
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET
|
||||||
checkteamslost BattleScript_FutureAttackEnd
|
checkteamslost BattleScript_FutureAttackEnd
|
||||||
BattleScript_FutureAttackEnd::
|
BattleScript_FutureAttackEnd::
|
||||||
moveendcase MOVEEND_RAGE
|
moveendcase MOVEEND_RAGE
|
||||||
@@ -3585,7 +3585,7 @@ BattleScript_SelectingNotAllowedMoveTauntInPalace::
|
|||||||
|
|
||||||
BattleScript_WishComesTrue::
|
BattleScript_WishComesTrue::
|
||||||
trywish 1, BattleScript_WishButFullHp
|
trywish 1, BattleScript_WishButFullHp
|
||||||
playanimation BS_TARGET, B_ANIM_WISH_HEAL, NULL
|
playanimation BS_TARGET, B_ANIM_WISH_HEAL
|
||||||
printstring STRINGID_PKMNWISHCAMETRUE
|
printstring STRINGID_PKMNWISHCAMETRUE
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
@@ -3604,7 +3604,7 @@ BattleScript_WishButFullHp::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_IngrainTurnHeal::
|
BattleScript_IngrainTurnHeal::
|
||||||
playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL
|
playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL
|
||||||
printstring STRINGID_PKMNABSORBEDNUTRIENTS
|
printstring STRINGID_PKMNABSORBEDNUTRIENTS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
@@ -3638,7 +3638,7 @@ BattleScript_AtkDefDown_End::
|
|||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_KnockedOff::
|
BattleScript_KnockedOff::
|
||||||
playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL
|
playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF
|
||||||
printstring STRINGID_PKMNKNOCKEDOFF
|
printstring STRINGID_PKMNKNOCKEDOFF
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
return
|
return
|
||||||
@@ -3675,7 +3675,7 @@ BattleScript_SnatchedMove::
|
|||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
snatchsetbattlers
|
snatchsetbattlers
|
||||||
playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL
|
playanimation BS_TARGET, B_ANIM_SNATCH_MOVE
|
||||||
printstring STRINGID_PKMNSNATCHEDMOVE
|
printstring STRINGID_PKMNSNATCHEDMOVE
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP
|
||||||
@@ -3706,7 +3706,7 @@ BattleScript_SAtkDown2End::
|
|||||||
BattleScript_FocusPunchSetUp::
|
BattleScript_FocusPunchSetUp::
|
||||||
printstring STRINGID_EMPTYSTRING3
|
printstring STRINGID_EMPTYSTRING3
|
||||||
waitmessage 1
|
waitmessage 1
|
||||||
playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP, NULL
|
playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP
|
||||||
printstring STRINGID_PKMNTIGHTENINGFOCUS
|
printstring STRINGID_PKMNTIGHTENINGFOCUS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
end2
|
end2
|
||||||
@@ -3739,7 +3739,7 @@ BattleScript_DoTurnDmg::
|
|||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||||
healthbarupdate BS_ATTACKER
|
healthbarupdate BS_ATTACKER
|
||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
checkteamslost BattleScript_DoTurnDmgEnd
|
checkteamslost BattleScript_DoTurnDmgEnd
|
||||||
BattleScript_DoTurnDmgEnd::
|
BattleScript_DoTurnDmgEnd::
|
||||||
end2
|
end2
|
||||||
@@ -3808,7 +3808,7 @@ BattleScript_DoSelfConfusionDmg::
|
|||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
BattleScript_MoveUsedIsConfusedRet::
|
BattleScript_MoveUsedIsConfusedRet::
|
||||||
return
|
return
|
||||||
@@ -3941,12 +3941,12 @@ BattleScript_DoRecoil::
|
|||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
printstring STRINGID_PKMNHITWITHRECOIL
|
printstring STRINGID_PKMNHITWITHRECOIL
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
BattleScript_RecoilEnd::
|
BattleScript_RecoilEnd::
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_ItemSteal::
|
BattleScript_ItemSteal::
|
||||||
playanimation BS_TARGET, B_ANIM_ITEM_STEAL, NULL
|
playanimation BS_TARGET, B_ANIM_ITEM_STEAL
|
||||||
printstring STRINGID_PKMNSTOLEITEM
|
printstring STRINGID_PKMNSTOLEITEM
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
return
|
return
|
||||||
@@ -3955,7 +3955,7 @@ BattleScript_DrizzleActivates::
|
|||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
printstring STRINGID_PKMNMADEITRAIN
|
printstring STRINGID_PKMNMADEITRAIN
|
||||||
waitstate
|
waitstate
|
||||||
playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL
|
playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES
|
||||||
call BattleScript_WeatherFormChanges
|
call BattleScript_WeatherFormChanges
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@@ -3983,7 +3983,7 @@ BattleScript_SandstreamActivates::
|
|||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM
|
printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM
|
||||||
waitstate
|
waitstate
|
||||||
playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL
|
playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES
|
||||||
call BattleScript_WeatherFormChanges
|
call BattleScript_WeatherFormChanges
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@@ -4048,7 +4048,7 @@ BattleScript_DroughtActivates::
|
|||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
printstring STRINGID_PKMNSXINTENSIFIEDSUN
|
printstring STRINGID_PKMNSXINTENSIFIEDSUN
|
||||||
waitstate
|
waitstate
|
||||||
playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL
|
playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES
|
||||||
call BattleScript_WeatherFormChanges
|
call BattleScript_WeatherFormChanges
|
||||||
end3
|
end3
|
||||||
|
|
||||||
@@ -4184,7 +4184,7 @@ BattleScript_RoughSkinActivates::
|
|||||||
datahpupdate BS_ATTACKER
|
datahpupdate BS_ATTACKER
|
||||||
printstring STRINGID_PKMNHURTSWITH
|
printstring STRINGID_PKMNHURTSWITH
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
tryfaintmon BS_ATTACKER
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_CuteCharmActivates::
|
BattleScript_CuteCharmActivates::
|
||||||
@@ -4252,7 +4252,7 @@ BattleScript_IgnoresAndHitsItself::
|
|||||||
goto BattleScript_DoSelfConfusionDmg
|
goto BattleScript_DoSelfConfusionDmg
|
||||||
|
|
||||||
BattleScript_SubstituteFade::
|
BattleScript_SubstituteFade::
|
||||||
playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE, NULL
|
playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE
|
||||||
printstring STRINGID_PKMNSUBSTITUTEFADED
|
printstring STRINGID_PKMNSUBSTITUTEFADED
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -4261,7 +4261,7 @@ BattleScript_BerryCurePrlzEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureParRet::
|
BattleScript_BerryCureParRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMCUREDPARALYSIS
|
printstring STRINGID_PKMNSITEMCUREDPARALYSIS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4273,7 +4273,7 @@ BattleScript_BerryCurePsnEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCurePsnRet::
|
BattleScript_BerryCurePsnRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMCUREDPOISON
|
printstring STRINGID_PKMNSITEMCUREDPOISON
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4285,7 +4285,7 @@ BattleScript_BerryCureBrnEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureBrnRet::
|
BattleScript_BerryCureBrnRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMHEALEDBURN
|
printstring STRINGID_PKMNSITEMHEALEDBURN
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4297,7 +4297,7 @@ BattleScript_BerryCureFrzEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureFrzRet::
|
BattleScript_BerryCureFrzRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMDEFROSTEDIT
|
printstring STRINGID_PKMNSITEMDEFROSTEDIT
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4309,7 +4309,7 @@ BattleScript_BerryCureSlpEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureSlpRet::
|
BattleScript_BerryCureSlpRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMWOKEIT
|
printstring STRINGID_PKMNSITEMWOKEIT
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4321,7 +4321,7 @@ BattleScript_BerryCureConfusionEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureConfusionRet::
|
BattleScript_BerryCureConfusionRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMSNAPPEDOUT
|
printstring STRINGID_PKMNSITEMSNAPPEDOUT
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
removeitem BS_SCRIPTING
|
removeitem BS_SCRIPTING
|
||||||
@@ -4332,7 +4332,7 @@ BattleScript_BerryCureChosenStatusEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryCureChosenStatusRet::
|
BattleScript_BerryCureChosenStatusRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printfromtable gBerryEffectStringIds
|
printfromtable gBerryEffectStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
updatestatusicon BS_SCRIPTING
|
updatestatusicon BS_SCRIPTING
|
||||||
@@ -4344,14 +4344,14 @@ BattleScript_WhiteHerbEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_WhiteHerbRet::
|
BattleScript_WhiteHerbRet::
|
||||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMRESTOREDSTATUS
|
printstring STRINGID_PKMNSITEMRESTOREDSTATUS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
removeitem BS_SCRIPTING
|
removeitem BS_SCRIPTING
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_ItemHealHP_RemoveItem::
|
BattleScript_ItemHealHP_RemoveItem::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
@@ -4361,7 +4361,7 @@ BattleScript_ItemHealHP_RemoveItem::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryPPHealEnd2::
|
BattleScript_BerryPPHealEnd2::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMRESTOREDPP
|
printstring STRINGID_PKMNSITEMRESTOREDPP
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
removeitem BS_ATTACKER
|
removeitem BS_ATTACKER
|
||||||
@@ -4372,7 +4372,7 @@ BattleScript_ItemHealHP_End2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_ItemHealHP_Ret::
|
BattleScript_ItemHealHP_Ret::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE
|
printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
@@ -4385,13 +4385,13 @@ BattleScript_SelectingNotAllowedMoveChoiceItem::
|
|||||||
endselectionscript
|
endselectionscript
|
||||||
|
|
||||||
BattleScript_FocusBandActivates::
|
BattleScript_FocusBandActivates::
|
||||||
playanimation BS_TARGET, B_ANIM_FOCUS_BAND, NULL
|
playanimation BS_TARGET, B_ANIM_FOCUS_BAND
|
||||||
printstring STRINGID_PKMNHUNGONWITHX
|
printstring STRINGID_PKMNHUNGONWITHX
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_BerryConfuseHealEnd2::
|
BattleScript_BerryConfuseHealEnd2::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||||
@@ -4405,7 +4405,7 @@ BattleScript_BerryConfuseHealEnd2::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryStatRaiseEnd2::
|
BattleScript_BerryStatRaiseEnd2::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
||||||
BattleScript_BerryStatRaiseDoStatUp::
|
BattleScript_BerryStatRaiseDoStatUp::
|
||||||
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
||||||
@@ -4414,7 +4414,7 @@ BattleScript_BerryStatRaiseDoStatUp::
|
|||||||
end2
|
end2
|
||||||
|
|
||||||
BattleScript_BerryFocusEnergyEnd2::
|
BattleScript_BerryFocusEnergyEnd2::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
printstring STRINGID_PKMNUSEDXTOGETPUMPED
|
printstring STRINGID_PKMNUSEDXTOGETPUMPED
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
removeitem BS_ATTACKER
|
removeitem BS_ATTACKER
|
||||||
|
|||||||
+3
-17
@@ -41,19 +41,6 @@
|
|||||||
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
||||||
#define B_ACTION_NONE 0xFF
|
#define B_ACTION_NONE 0xFF
|
||||||
|
|
||||||
// array entries for battle communication
|
|
||||||
#define MULTIUSE_STATE 0
|
|
||||||
#define CURSOR_POSITION 1
|
|
||||||
#define TASK_ID 1 // task Id and cursor position share the same field
|
|
||||||
#define SPRITES_INIT_STATE1 1 // shares the Id as well
|
|
||||||
#define SPRITES_INIT_STATE2 2
|
|
||||||
#define MOVE_EFFECT_BYTE 3
|
|
||||||
#define ACTIONS_CONFIRMED_COUNT 4
|
|
||||||
#define MULTISTRING_CHOOSER 5
|
|
||||||
#define MISS_TYPE 6
|
|
||||||
#define MSG_DISPLAY 7
|
|
||||||
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8
|
|
||||||
|
|
||||||
#define MOVE_TARGET_SELECTED 0
|
#define MOVE_TARGET_SELECTED 0
|
||||||
#define MOVE_TARGET_DEPENDS (1 << 0)
|
#define MOVE_TARGET_DEPENDS (1 << 0)
|
||||||
#define MOVE_TARGET_USER_OR_SELECTED (1 << 1)
|
#define MOVE_TARGET_USER_OR_SELECTED (1 << 1)
|
||||||
@@ -487,6 +474,8 @@ struct BattleStruct
|
|||||||
|
|
||||||
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
||||||
|
|
||||||
|
// NOTE: The members of this struct have hard-coded offsets
|
||||||
|
// in include/constants/battle_script_commands.h
|
||||||
struct BattleScripting
|
struct BattleScripting
|
||||||
{
|
{
|
||||||
s32 painSplitHp;
|
s32 painSplitHp;
|
||||||
@@ -509,7 +498,7 @@ struct BattleScripting
|
|||||||
u8 battleStyle;
|
u8 battleStyle;
|
||||||
u8 drawlvlupboxState;
|
u8 drawlvlupboxState;
|
||||||
u8 learnMoveState;
|
u8 learnMoveState;
|
||||||
u8 field_20;
|
u8 pursuitDoublesAttacker;
|
||||||
u8 reshowMainState;
|
u8 reshowMainState;
|
||||||
u8 reshowHelperState;
|
u8 reshowHelperState;
|
||||||
u8 levelUpHP;
|
u8 levelUpHP;
|
||||||
@@ -518,9 +507,6 @@ struct BattleScripting
|
|||||||
u8 specialTrainerBattleType;
|
u8 specialTrainerBattleType;
|
||||||
};
|
};
|
||||||
|
|
||||||
// rom_80A5C6C
|
|
||||||
|
|
||||||
|
|
||||||
struct BattleSpriteInfo
|
struct BattleSpriteInfo
|
||||||
{
|
{
|
||||||
u16 invisible:1; // 0x1
|
u16 invisible:1; // 0x1
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
|
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
|
||||||
|
|
||||||
#include "constants/pokemon.h"
|
#include "constants/pokemon.h"
|
||||||
|
#include "constants/battle_script_commands.h"
|
||||||
|
|
||||||
// Arguments for 'flags' in HandleBattleWindow
|
// Arguments for 'flags' in HandleBattleWindow
|
||||||
#define WINDOW_CLEAR (1 << 0)
|
#define WINDOW_CLEAR (1 << 0)
|
||||||
|
|||||||
@@ -1,38 +1,51 @@
|
|||||||
#ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
#ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||||
#define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
#define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||||
|
|
||||||
// Battle Scripting and BattleCommunication addresses
|
// The following correspond to the struct members of BattleScripting by adding their offset
|
||||||
#define sPAINSPLIT_HP gBattleScripting
|
#define sPAINSPLIT_HP (gBattleScripting + 0x00) // painSplitHp
|
||||||
#define sBIDE_DMG gBattleScripting + 4
|
#define sBIDE_DMG (gBattleScripting + 0x04) // bideDmg
|
||||||
#define sMULTIHIT_STRING gBattleScripting + 8
|
#define sMULTIHIT_STRING (gBattleScripting + 0x08) // multihitString
|
||||||
#define sDMG_MULTIPLIER gBattleScripting + 0xE
|
#define sDMG_MULTIPLIER (gBattleScripting + 0x0E) // dmgMultiplier
|
||||||
#define sTWOTURN_STRINGID gBattleScripting + 0xF
|
#define sTWOTURN_STRINGID (gBattleScripting + 0x0F) // twoTurnsMoveStringId
|
||||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10
|
#define sB_ANIM_ARG1 (gBattleScripting + 0x10) // animArg1
|
||||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11
|
#define sB_ANIM_ARG2 (gBattleScripting + 0x11) // animArg2
|
||||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12
|
#define sTRIPLE_KICK_POWER (gBattleScripting + 0x12) // tripleKickPower
|
||||||
#define sMOVEEND_STATE gBattleScripting + 0x14
|
#define sMOVEEND_STATE (gBattleScripting + 0x14) // moveendState
|
||||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15
|
#define sBATTLER_WITH_ABILITY (gBattleScripting + 0x15) // battlerWithAbility
|
||||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16
|
#define sMULTIHIT_EFFECT (gBattleScripting + 0x16) // multihitMoveEffect
|
||||||
#define sBATTLER gBattleScripting + 0x17
|
#define sBATTLER (gBattleScripting + 0x17) // battler
|
||||||
#define sB_ANIM_TURN gBattleScripting + 0x18
|
#define sB_ANIM_TURN (gBattleScripting + 0x18) // animTurn
|
||||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19
|
#define sB_ANIM_TARGETS_HIT (gBattleScripting + 0x19) // animTargetsHit
|
||||||
#define sSTATCHANGER gBattleScripting + 0x1A
|
#define sSTATCHANGER (gBattleScripting + 0x1A) // statChanger
|
||||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B
|
#define sSTAT_ANIM_PLAYED (gBattleScripting + 0x1B) // statAnimPlayed
|
||||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C
|
#define sGIVEEXP_STATE (gBattleScripting + 0x1C) // getexpState
|
||||||
#define sBATTLE_STYLE gBattleScripting + 0x1D
|
#define sBATTLE_STYLE (gBattleScripting + 0x1D) // battleStyle
|
||||||
#define sLVLBOX_STATE gBattleScripting + 0x1E
|
#define sLVLBOX_STATE (gBattleScripting + 0x1E) // drawlvlupboxState
|
||||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F
|
#define sLEARNMOVE_STATE (gBattleScripting + 0x1F) // learnMoveState
|
||||||
#define sFIELD_20 gBattleScripting + 0x20
|
#define sPURSUIT_DOUBLES_ATTACKER (gBattleScripting + 0x20) // pursuitDoublesAttacker
|
||||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21
|
#define sRESHOW_MAIN_STATE (gBattleScripting + 0x21) // reshowMainState
|
||||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22
|
#define sRESHOW_HELPER_STATE (gBattleScripting + 0x22) // reshowHelperState
|
||||||
#define sFIELD_23 gBattleScripting + 0x23
|
#define sLVLUP_HP (gBattleScripting + 0x23) // levelUpHP
|
||||||
#define sWINDOWS_TYPE gBattleScripting + 0x24
|
#define sWINDOWS_TYPE (gBattleScripting + 0x24) // windowsType
|
||||||
#define sMULTIPLAYER_ID gBattleScripting + 0x25
|
#define sMULTIPLAYER_ID (gBattleScripting + 0x25) // multiplayerId
|
||||||
#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26
|
#define sSPECIAL_TRAINER_BATTLE_TYPE (gBattleScripting + 0x26) // specialTrainerBattleType
|
||||||
|
|
||||||
#define cEFFECT_CHOOSER gBattleCommunication + 3
|
// Array entries for battle communication
|
||||||
#define cMULTISTRING_CHOOSER gBattleCommunication + 5
|
#define MULTIUSE_STATE 0
|
||||||
#define cMISS_TYPE gBattleCommunication + 6
|
#define CURSOR_POSITION 1
|
||||||
|
#define TASK_ID 1 // task Id and cursor position share the same field
|
||||||
|
#define SPRITES_INIT_STATE1 1 // shares the Id as well
|
||||||
|
#define SPRITES_INIT_STATE2 2
|
||||||
|
#define MOVE_EFFECT_BYTE 3
|
||||||
|
#define ACTIONS_CONFIRMED_COUNT 4
|
||||||
|
#define MULTISTRING_CHOOSER 5
|
||||||
|
#define MISS_TYPE 6
|
||||||
|
#define MSG_DISPLAY 7
|
||||||
|
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8
|
||||||
|
|
||||||
|
#define cEFFECT_CHOOSER (gBattleCommunication + MOVE_EFFECT_BYTE)
|
||||||
|
#define cMULTISTRING_CHOOSER (gBattleCommunication + MULTISTRING_CHOOSER)
|
||||||
|
#define cMISS_TYPE (gBattleCommunication + MISS_TYPE)
|
||||||
|
|
||||||
// Battle Script defines for getting the wanted battler
|
// Battle Script defines for getting the wanted battler
|
||||||
#define BS_TARGET 0
|
#define BS_TARGET 0
|
||||||
|
|||||||
@@ -1,25 +1,15 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
#include "constants/battle_move_effects.h"
|
|
||||||
#include "constants/battle_script_commands.h"
|
|
||||||
#include "battle_message.h"
|
#include "battle_message.h"
|
||||||
#include "battle_anim.h"
|
#include "battle_anim.h"
|
||||||
#include "battle_ai_script_commands.h"
|
#include "battle_ai_script_commands.h"
|
||||||
#include "battle_scripts.h"
|
#include "battle_scripts.h"
|
||||||
#include "constants/moves.h"
|
|
||||||
#include "constants/abilities.h"
|
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "constants/items.h"
|
|
||||||
#include "constants/hold_effects.h"
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "pokemon.h"
|
#include "pokemon.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "battle_controllers.h"
|
#include "battle_controllers.h"
|
||||||
#include "battle_interface.h"
|
#include "battle_interface.h"
|
||||||
#include "constants/songs.h"
|
|
||||||
#include "constants/trainers.h"
|
|
||||||
#include "constants/battle_anim.h"
|
|
||||||
#include "constants/map_types.h"
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "pokedex.h"
|
#include "pokedex.h"
|
||||||
@@ -38,7 +28,6 @@
|
|||||||
#include "pokemon_storage_system.h"
|
#include "pokemon_storage_system.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "naming_screen.h"
|
#include "naming_screen.h"
|
||||||
#include "constants/battle_string_ids.h"
|
|
||||||
#include "battle_setup.h"
|
#include "battle_setup.h"
|
||||||
#include "overworld.h"
|
#include "overworld.h"
|
||||||
#include "party_menu.h"
|
#include "party_menu.h"
|
||||||
@@ -49,9 +38,19 @@
|
|||||||
#include "pokemon_summary_screen.h"
|
#include "pokemon_summary_screen.h"
|
||||||
#include "pokenav.h"
|
#include "pokenav.h"
|
||||||
#include "menu_specialized.h"
|
#include "menu_specialized.h"
|
||||||
#include "constants/rgb.h"
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
#include "constants/abilities.h"
|
||||||
|
#include "constants/battle_anim.h"
|
||||||
|
#include "constants/battle_move_effects.h"
|
||||||
|
#include "constants/battle_string_ids.h"
|
||||||
|
#include "constants/hold_effects.h"
|
||||||
|
#include "constants/items.h"
|
||||||
|
#include "constants/map_types.h"
|
||||||
|
#include "constants/moves.h"
|
||||||
#include "constants/party_menu.h"
|
#include "constants/party_menu.h"
|
||||||
|
#include "constants/rgb.h"
|
||||||
|
#include "constants/songs.h"
|
||||||
|
#include "constants/trainers.h"
|
||||||
|
|
||||||
extern const u8* const gBattleScriptsForMoveEffects[];
|
extern const u8* const gBattleScriptsForMoveEffects[];
|
||||||
|
|
||||||
@@ -147,7 +146,7 @@ static void Cmd_jumpiftype2(void);
|
|||||||
static void Cmd_jumpifabilitypresent(void);
|
static void Cmd_jumpifabilitypresent(void);
|
||||||
static void Cmd_endselectionscript(void);
|
static void Cmd_endselectionscript(void);
|
||||||
static void Cmd_playanimation(void);
|
static void Cmd_playanimation(void);
|
||||||
static void Cmd_playanimation2(void);
|
static void Cmd_playanimation_var(void);
|
||||||
static void Cmd_setgraphicalstatchangevalues(void);
|
static void Cmd_setgraphicalstatchangevalues(void);
|
||||||
static void Cmd_playstatchangeanimation(void);
|
static void Cmd_playstatchangeanimation(void);
|
||||||
static void Cmd_moveend(void);
|
static void Cmd_moveend(void);
|
||||||
@@ -313,7 +312,7 @@ static void Cmd_settypebasedhalvers(void);
|
|||||||
static void Cmd_setweatherballtype(void);
|
static void Cmd_setweatherballtype(void);
|
||||||
static void Cmd_tryrecycleitem(void);
|
static void Cmd_tryrecycleitem(void);
|
||||||
static void Cmd_settypetoterrain(void);
|
static void Cmd_settypetoterrain(void);
|
||||||
static void Cmd_pursuitrelated(void);
|
static void Cmd_pursuitdoubles(void);
|
||||||
static void Cmd_snatchsetbattlers(void);
|
static void Cmd_snatchsetbattlers(void);
|
||||||
static void Cmd_removelightscreenreflect(void);
|
static void Cmd_removelightscreenreflect(void);
|
||||||
static void Cmd_handleballthrow(void);
|
static void Cmd_handleballthrow(void);
|
||||||
@@ -399,7 +398,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
Cmd_jumpifabilitypresent, //0x43
|
Cmd_jumpifabilitypresent, //0x43
|
||||||
Cmd_endselectionscript, //0x44
|
Cmd_endselectionscript, //0x44
|
||||||
Cmd_playanimation, //0x45
|
Cmd_playanimation, //0x45
|
||||||
Cmd_playanimation2, //0x46
|
Cmd_playanimation_var, //0x46
|
||||||
Cmd_setgraphicalstatchangevalues, //0x47
|
Cmd_setgraphicalstatchangevalues, //0x47
|
||||||
Cmd_playstatchangeanimation, //0x48
|
Cmd_playstatchangeanimation, //0x48
|
||||||
Cmd_moveend, //0x49
|
Cmd_moveend, //0x49
|
||||||
@@ -565,7 +564,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
|||||||
Cmd_setweatherballtype, //0xE9
|
Cmd_setweatherballtype, //0xE9
|
||||||
Cmd_tryrecycleitem, //0xEA
|
Cmd_tryrecycleitem, //0xEA
|
||||||
Cmd_settypetoterrain, //0xEB
|
Cmd_settypetoterrain, //0xEB
|
||||||
Cmd_pursuitrelated, //0xEC
|
Cmd_pursuitdoubles, //0xEC
|
||||||
Cmd_snatchsetbattlers, //0xED
|
Cmd_snatchsetbattlers, //0xED
|
||||||
Cmd_removelightscreenreflect, //0xEE
|
Cmd_removelightscreenreflect, //0xEE
|
||||||
Cmd_handleballthrow, //0xEF
|
Cmd_handleballthrow, //0xEF
|
||||||
@@ -1115,7 +1114,7 @@ static void Cmd_accuracycheck(void)
|
|||||||
s8 buff;
|
s8 buff;
|
||||||
u16 calc;
|
u16 calc;
|
||||||
|
|
||||||
if (move == 0)
|
if (move == ACC_CURR_MOVE)
|
||||||
move = gCurrentMove;
|
move = gCurrentMove;
|
||||||
|
|
||||||
GET_MOVE_TYPE(move, type);
|
GET_MOVE_TYPE(move, type);
|
||||||
@@ -3183,23 +3182,23 @@ static void Cmd_jumpifstat(void)
|
|||||||
|
|
||||||
static void Cmd_jumpifstatus3condition(void)
|
static void Cmd_jumpifstatus3condition(void)
|
||||||
{
|
{
|
||||||
u32 flags;
|
u32 status;
|
||||||
const u8 *jumpPtr;
|
const u8 *jumpPtr;
|
||||||
|
|
||||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||||
flags = T2_READ_32(gBattlescriptCurrInstr + 2);
|
status = T2_READ_32(gBattlescriptCurrInstr + 2);
|
||||||
jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 7);
|
jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 7);
|
||||||
|
|
||||||
if (gBattlescriptCurrInstr[6])
|
if (gBattlescriptCurrInstr[6])
|
||||||
{
|
{
|
||||||
if ((gStatuses3[gActiveBattler] & flags) != 0)
|
if ((gStatuses3[gActiveBattler] & status) != 0)
|
||||||
gBattlescriptCurrInstr += 11;
|
gBattlescriptCurrInstr += 11;
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr = jumpPtr;
|
gBattlescriptCurrInstr = jumpPtr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((gStatuses3[gActiveBattler] & flags) != 0)
|
if ((gStatuses3[gActiveBattler] & status) != 0)
|
||||||
gBattlescriptCurrInstr = jumpPtr;
|
gBattlescriptCurrInstr = jumpPtr;
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 11;
|
gBattlescriptCurrInstr += 11;
|
||||||
@@ -3514,8 +3513,7 @@ static void Cmd_checkteamslost(void)
|
|||||||
// In multi battle with Steven, skip his Pokémon
|
// In multi battle with Steven, skip his Pokémon
|
||||||
for (i = 0; i < MULTI_PARTY_SIZE; i++)
|
for (i = 0; i < MULTI_PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES)
|
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||||
&& !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
|
||||||
HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP);
|
HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3523,10 +3521,8 @@ static void Cmd_checkteamslost(void)
|
|||||||
{
|
{
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES)
|
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)
|
||||||
&& !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)
|
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostPlayerMons & gBitTable[i])))
|
||||||
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
|
||||||
|| !(gBattleStruct->arenaLostPlayerMons & gBitTable[i])))
|
|
||||||
{
|
{
|
||||||
HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP);
|
HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP);
|
||||||
}
|
}
|
||||||
@@ -3539,10 +3535,8 @@ static void Cmd_checkteamslost(void)
|
|||||||
// Get total HP for the enemy's party to determine if the player has won
|
// Get total HP for the enemy's party to determine if the player has won
|
||||||
for (i = 0; i < PARTY_SIZE; i++)
|
for (i = 0; i < PARTY_SIZE; i++)
|
||||||
{
|
{
|
||||||
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES)
|
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG)
|
||||||
&& !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG)
|
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->arenaLostOpponentMons & gBitTable[i])))
|
||||||
&& (!(gBattleTypeFlags & BATTLE_TYPE_ARENA)
|
|
||||||
|| !(gBattleStruct->arenaLostOpponentMons & gBitTable[i])))
|
|
||||||
{
|
{
|
||||||
HP_count += GetMonData(&gEnemyParty[i], MON_DATA_HP);
|
HP_count += GetMonData(&gEnemyParty[i], MON_DATA_HP);
|
||||||
}
|
}
|
||||||
@@ -3982,8 +3976,8 @@ static void Cmd_playanimation(void)
|
|||||||
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3);
|
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||||
|
|
||||||
if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE
|
if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE
|
|| gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE)
|
|| gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE)
|
||||||
{
|
{
|
||||||
BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr);
|
BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
@@ -3995,9 +3989,9 @@ static void Cmd_playanimation(void)
|
|||||||
gBattlescriptCurrInstr = BattleScript_Pausex20;
|
gBattlescriptCurrInstr = BattleScript_Pausex20;
|
||||||
}
|
}
|
||||||
else if (gBattlescriptCurrInstr[2] == B_ANIM_RAIN_CONTINUES
|
else if (gBattlescriptCurrInstr[2] == B_ANIM_RAIN_CONTINUES
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_SUN_CONTINUES
|
|| gBattlescriptCurrInstr[2] == B_ANIM_SUN_CONTINUES
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES
|
|| gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES
|
||||||
|| gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES)
|
|| gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES)
|
||||||
{
|
{
|
||||||
BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr);
|
BtlController_EmitBattleAnimation(BUFFER_A, gBattlescriptCurrInstr[2], *argumentPtr);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
@@ -4015,7 +4009,8 @@ static void Cmd_playanimation(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_playanimation2(void) // animation Id is stored in the first pointer
|
// Same as playanimation, expect it takes a pointer to some animation id, instead of taking the value directly
|
||||||
|
static void Cmd_playanimation_var(void)
|
||||||
{
|
{
|
||||||
const u16* argumentPtr;
|
const u16* argumentPtr;
|
||||||
const u8* animationIdPtr;
|
const u8* animationIdPtr;
|
||||||
@@ -4025,8 +4020,8 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin
|
|||||||
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
argumentPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
||||||
|
|
||||||
if (*animationIdPtr == B_ANIM_STATS_CHANGE
|
if (*animationIdPtr == B_ANIM_STATS_CHANGE
|
||||||
|| *animationIdPtr == B_ANIM_SNATCH_MOVE
|
|| *animationIdPtr == B_ANIM_SNATCH_MOVE
|
||||||
|| *animationIdPtr == B_ANIM_SUBSTITUTE_FADE)
|
|| *animationIdPtr == B_ANIM_SUBSTITUTE_FADE)
|
||||||
{
|
{
|
||||||
BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr);
|
BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
@@ -4037,9 +4032,9 @@ static void Cmd_playanimation2(void) // animation Id is stored in the first poin
|
|||||||
gBattlescriptCurrInstr += 10;
|
gBattlescriptCurrInstr += 10;
|
||||||
}
|
}
|
||||||
else if (*animationIdPtr == B_ANIM_RAIN_CONTINUES
|
else if (*animationIdPtr == B_ANIM_RAIN_CONTINUES
|
||||||
|| *animationIdPtr == B_ANIM_SUN_CONTINUES
|
|| *animationIdPtr == B_ANIM_SUN_CONTINUES
|
||||||
|| *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES
|
|| *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES
|
||||||
|| *animationIdPtr == B_ANIM_HAIL_CONTINUES)
|
|| *animationIdPtr == B_ANIM_HAIL_CONTINUES)
|
||||||
{
|
{
|
||||||
BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr);
|
BtlController_EmitBattleAnimation(BUFFER_A, *animationIdPtr, *argumentPtr);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
@@ -4186,7 +4181,7 @@ static void Cmd_moveend(void)
|
|||||||
u8 moveType = 0;
|
u8 moveType = 0;
|
||||||
u8 holdEffectAtk = 0;
|
u8 holdEffectAtk = 0;
|
||||||
u16 *choicedMoveAtk = NULL;
|
u16 *choicedMoveAtk = NULL;
|
||||||
u8 arg1, arg2;
|
u8 endMode, endState;
|
||||||
u16 originallyUsedMove;
|
u16 originallyUsedMove;
|
||||||
|
|
||||||
if (gChosenMove == 0xFFFF)
|
if (gChosenMove == 0xFFFF)
|
||||||
@@ -4194,8 +4189,8 @@ static void Cmd_moveend(void)
|
|||||||
else
|
else
|
||||||
originallyUsedMove = gChosenMove;
|
originallyUsedMove = gChosenMove;
|
||||||
|
|
||||||
arg1 = gBattlescriptCurrInstr[1];
|
endMode = gBattlescriptCurrInstr[1];
|
||||||
arg2 = gBattlescriptCurrInstr[2];
|
endState = gBattlescriptCurrInstr[2];
|
||||||
|
|
||||||
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY)
|
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY)
|
||||||
holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect;
|
holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect;
|
||||||
@@ -4450,9 +4445,9 @@ static void Cmd_moveend(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg1 == 1 && effect == FALSE)
|
if (endMode == 1 && effect == FALSE)
|
||||||
gBattleScripting.moveendState = MOVEEND_COUNT;
|
gBattleScripting.moveendState = MOVEEND_COUNT;
|
||||||
if (arg1 == 2 && arg2 == gBattleScripting.moveendState)
|
if (endMode == 2 && endState == gBattleScripting.moveendState)
|
||||||
gBattleScripting.moveendState = MOVEEND_COUNT;
|
gBattleScripting.moveendState = MOVEEND_COUNT;
|
||||||
|
|
||||||
} while (gBattleScripting.moveendState != MOVEEND_COUNT && effect == FALSE);
|
} while (gBattleScripting.moveendState != MOVEEND_COUNT && effect == FALSE);
|
||||||
@@ -5318,16 +5313,16 @@ static void Cmd_returntoball(void)
|
|||||||
|
|
||||||
static void Cmd_handlelearnnewmove(void)
|
static void Cmd_handlelearnnewmove(void)
|
||||||
{
|
{
|
||||||
const u8 *jumpPtr1 = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
const u8 *learnedMovePtr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||||
const u8 *jumpPtr2 = T1_READ_PTR(gBattlescriptCurrInstr + 5);
|
const u8 *nothingToLearnPtr = T1_READ_PTR(gBattlescriptCurrInstr + 5);
|
||||||
|
|
||||||
u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]);
|
u16 learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], gBattlescriptCurrInstr[9]);
|
||||||
while (learnMove == MON_ALREADY_KNOWS_MOVE)
|
while (learnMove == MON_ALREADY_KNOWS_MOVE)
|
||||||
learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], FALSE);
|
learnMove = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterMonId], FALSE);
|
||||||
|
|
||||||
if (learnMove == 0)
|
if (learnMove == MOVE_NONE)
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = jumpPtr2;
|
gBattlescriptCurrInstr = nothingToLearnPtr;
|
||||||
}
|
}
|
||||||
else if (learnMove == MON_HAS_MAX_MOVES)
|
else if (learnMove == MON_HAS_MAX_MOVES)
|
||||||
{
|
{
|
||||||
@@ -5352,7 +5347,7 @@ static void Cmd_handlelearnnewmove(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gBattlescriptCurrInstr = jumpPtr1;
|
gBattlescriptCurrInstr = learnedMovePtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9718,7 +9713,8 @@ static void Cmd_settypetoterrain(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_pursuitrelated(void)
|
// Unused
|
||||||
|
static void Cmd_pursuitdoubles(void)
|
||||||
{
|
{
|
||||||
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||||
|
|
||||||
@@ -9731,7 +9727,7 @@ static void Cmd_pursuitrelated(void)
|
|||||||
gCurrentMove = MOVE_PURSUIT;
|
gCurrentMove = MOVE_PURSUIT;
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
gBattleScripting.animTurn = 1;
|
gBattleScripting.animTurn = 1;
|
||||||
gBattleScripting.field_20 = gBattlerAttacker;
|
gBattleScripting.pursuitDoublesAttacker = gBattlerAttacker;
|
||||||
gBattlerAttacker = gActiveBattler;
|
gBattlerAttacker = gActiveBattler;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user