Fixes 2 instances of global usage in the Cmd_adjustdamage loop (#7918)

This commit is contained in:
Alex 2025-10-11 14:49:36 +02:00 committed by GitHub
parent c030a14063
commit 0bc3c348b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1901,13 +1901,13 @@ static void Cmd_adjustdamage(void)
gBattleStruct->moveResultFlags[battlerDef] &= ~(MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE);
gBattleStruct->moveDamage[battlerDef] = 0;
gSpecialStatuses[battlerDef].enduredDamage = TRUE;
RecordAbilityBattle(gBattlerTarget, ABILITY_ICE_FACE);
RecordAbilityBattle(battlerDef, ABILITY_ICE_FACE);
gDisableStructs[battlerDef].iceFaceActivationPrevention = TRUE;
// Form change will be done after attack animation in Cmd_resultmessage.
continue;
}
if (gBattleMons[gBattlerTarget].hp > gBattleStruct->moveDamage[battlerDef])
if (gBattleMons[battlerDef].hp > gBattleStruct->moveDamage[battlerDef])
continue;
holdEffect = GetBattlerHoldEffect(battlerDef, TRUE);