From 7d3980de589d0c645c9f31838937b0da463a8611 Mon Sep 17 00:00:00 2001 From: BuffelSaft Date: Sun, 12 Sep 2021 18:33:04 +1200 Subject: [PATCH] Fix multihit moves vs damage reducing berries The extra waitmessage command is ugly but appears to be needed - if it's moved before the printstring, the message isn't displayed long enough on single hit moves. --- data/battle_scripts_1.s | 1 + src/battle_script_commands.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2d6db5a28..7c37be63c 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7519,6 +7519,7 @@ BattleScript_BerryReduceDmg:: BattleScript_PrintBerryReduceString:: waitmessage B_WAIT_TIME_LONG printstring STRINGID_BERRYDMGREDUCES + waitmessage B_WAIT_TIME_LONG return BattleScript_BerryCureConfusionEnd2:: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 05702aec6..c7df3406e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1967,6 +1967,15 @@ static void Cmd_multihitresultmessage(void) } } gBattlescriptCurrInstr++; + + // Print berry reducing message after result message. + if (gSpecialStatuses[gBattlerTarget].berryReduced + && !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)) + { + gSpecialStatuses[gBattlerTarget].berryReduced = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_PrintBerryReduceString; + } } static void Cmd_attackanimation(void)