Merge pull request #2370 from StephenLynx/master

Fixed berserk not activating if mon falls to exactly half HP.
This commit is contained in:
Eduardo Quezada D'Ottone 2022-10-01 21:30:44 -03:00 committed by GitHub
commit d0895a7c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5209,7 +5209,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(battler)
// Had more than half of hp before, now has less
&& gBattleStruct->hpBefore[battler] > gBattleMons[battler].maxHP / 2
&& gBattleStruct->hpBefore[battler] >= gBattleMons[battler].maxHP / 2
&& gBattleMons[battler].hp < gBattleMons[battler].maxHP / 2
&& (gMultiHitCounter == 0 || gMultiHitCounter == 1)
&& !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove))