From 6267cef4032142a2e1000b2eefcdbba9e100baf9 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Wed, 1 Oct 2025 13:45:20 +0200 Subject: [PATCH] Streamline tryheal macros (#7830) --- asm/macros/battle_script.inc | 6 +++--- data/battle_scripts_1.s | 8 ++++---- src/battle_script_commands.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index cf5c97308b..19a4da0e95 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -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 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index c8bd206ca1..c4165c4829 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -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 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ca85f1a6f5..1636af9aee 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -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;