create setword macro

This commit is contained in:
DizzyEggg 2017-11-25 21:11:20 +01:00
parent 9151a6d094
commit fe658cc2fd
2 changed files with 9 additions and 8 deletions

View File

@ -1230,3 +1230,10 @@
.macro chosenstatus2animation bank, status
chosenstatusanimation \bank 0x1 \status
.endm
.macro setword dst, value
setbyte \dst, \value & 0xFF
setbyte \dst + 1, (\value >> 8) & 0xFF
setbyte \dst + 2, (\value >> 16) & 0xFF
setbyte \dst + 3, (\value >> 24) & 0xFF
.endm

View File

@ -826,10 +826,7 @@ BattleScript_EffectDragonRage::
ppreduce
typecalc
bicbyte gBattleMoveFlags, MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE
setbyte gBattleMoveDamage, 0x28
setbyte gBattleMoveDamage + 1, 0x0
setbyte gBattleMoveDamage + 2, 0x0
setbyte gBattleMoveDamage + 3, 0x0
setword gBattleMoveDamage, 40
adjustsetdamage
goto BattleScript_HitFromAtkAnimation
@ -1740,10 +1737,7 @@ BattleScript_EffectSonicboom::
ppreduce
typecalc
bicbyte gBattleMoveFlags, MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE
setbyte gBattleMoveDamage, 0x14
setbyte gBattleMoveDamage + 1, 0x0
setbyte gBattleMoveDamage + 2, 0x0
setbyte gBattleMoveDamage + 3, 0x0
setword gBattleMoveDamage, 20
adjustsetdamage
goto BattleScript_HitFromAtkAnimation