Streamline tryheal macros (#7830)

This commit is contained in:
Bassoonian 2025-10-01 13:45:20 +02:00 committed by GitHub
parent ad7c944f9f
commit 6267cef403
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -696,10 +696,10 @@
.4byte \jumpInstr
.endm
.macro tryhealhalfhealth failInstr:req, battler:req
.macro tryhealhalfhealth battler:req, failInstr:req
.byte 0x7b
.4byte \failInstr
.byte \battler
.4byte \failInstr
.endm
.macro trymirrormove
@ -1427,7 +1427,7 @@
.4byte \jumpInstr
.endm
.macro setpledgestatus battler:req sidestatus:req
.macro setpledgestatus battler:req, sidestatus:req
callnative BS_SetPledgeStatus
.byte \battler
.4byte \sidestatus

View File

@ -1077,7 +1077,7 @@ BattleScript_PurifyWorks:
updatestatusicon BS_TARGET
printstring STRINGID_ATTACKERCUREDTARGETSTATUS
waitmessage B_WAIT_TIME_LONG
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
tryhealhalfhealth BS_ATTACKER, BattleScript_AlreadyAtFullHp
goto BattleScript_RestoreHp
BattleScript_EffectStrengthSap::
@ -2408,7 +2408,7 @@ BattleScript_GravityLoopEnd:
BattleScript_EffectRoost::
attackcanceler
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_TARGET
tryhealhalfhealth BS_TARGET, BattleScript_AlreadyAtFullHp
setroost
goto BattleScript_PresentHealTarget
@ -2836,7 +2836,7 @@ BattleScript_EffectConversion::
BattleScript_EffectRestoreHp::
attackcanceler
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_ATTACKER
tryhealhalfhealth BS_ATTACKER, BattleScript_AlreadyAtFullHp
attackanimation
waitanimation
BattleScript_RestoreHp:
@ -3858,7 +3858,7 @@ BattleScript_DefenseCurlDoStatUpAnim::
BattleScript_EffectSoftboiled::
attackcanceler
tryhealhalfhealth BattleScript_AlreadyAtFullHp, BS_TARGET
tryhealhalfhealth BS_TARGET, BattleScript_AlreadyAtFullHp
BattleScript_PresentHealTarget::
attackanimation
waitanimation

View File

@ -9622,7 +9622,7 @@ static void Cmd_jumpifnexttargetvalid(void)
static void Cmd_tryhealhalfhealth(void)
{
CMD_ARGS(const u8 *failInstr, u8 battler);
CMD_ARGS(u8 battler, const u8 *failInstr);
const u8 *failInstr = cmd->failInstr;