From 99bd3dba4aee063b587d0fedc825d486de20aaa2 Mon Sep 17 00:00:00 2001 From: AlexOn1ine Date: Mon, 14 Apr 2025 16:20:07 +0200 Subject: [PATCH] revert BS_UpdateDynamax --- src/battle_dynamax.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/battle_dynamax.c b/src/battle_dynamax.c index d230dda5fa..007b5b20ee 100644 --- a/src/battle_dynamax.c +++ b/src/battle_dynamax.c @@ -471,12 +471,13 @@ void ChooseDamageNonTypesString(u8 type) void BS_UpdateDynamax(void) { NATIVE_ARGS(); - struct Pokemon *mon = GetPartyBattlerData(gBattlerAttacker); + u32 battler = gBattleScripting.battler; + struct Pokemon *mon = GetPartyBattlerData(battler); - if (!IsGigantamaxed(gBattlerAttacker)) // RecalcBattlerStats will get called on form change. - RecalcBattlerStats(gBattlerAttacker, mon, GetActiveGimmick(gBattlerAttacker) == GIMMICK_DYNAMAX); + if (!IsGigantamaxed(battler)) // RecalcBattlerStats will get called on form change. + RecalcBattlerStats(battler, mon, GetActiveGimmick(battler) == GIMMICK_DYNAMAX); - UpdateHealthboxAttribute(gHealthboxSpriteIds[gBattlerAttacker], mon, HEALTHBOX_ALL); + UpdateHealthboxAttribute(gHealthboxSpriteIds[battler], mon, HEALTHBOX_ALL); gBattlescriptCurrInstr = cmd->nextInstr; }