Fixes inconsistency for Kings rock. (#6302)

This commit is contained in:
Alex 2025-02-19 21:50:03 +01:00 committed by GitHub
parent ff098bc520
commit d695c74e39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8145,9 +8145,7 @@ u32 ItemBattleEffects(enum ItemCaseId caseID, u32 battler, bool32 moveTurn)
atkHoldEffectParam *= 2;
if (gSideStatuses[GetBattlerSide(battler)] & SIDE_STATUS_RAINBOW && gCurrentMove != MOVE_SECRET_POWER)
atkHoldEffectParam *= 2;
if (gBattleStruct->moveDamage[battler] != 0 // Need to have done damage
&& !(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT)
&& IsBattlerTurnDamaged(gBattlerTarget)
if (IsBattlerTurnDamaged(gBattlerTarget)
&& !MoveIgnoresKingsRock(gCurrentMove)
&& gBattleMons[gBattlerTarget].hp
&& RandomPercentage(RNG_HOLD_EFFECT_FLINCH, atkHoldEffectParam)