mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Fix Unnerve not canceling out type resist berries.
This commit is contained in:
parent
b322a42fea
commit
16d032e99d
@ -8203,6 +8203,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
|
||||
u32 abilityDef = GetBattlerAbility(battlerDef);
|
||||
u32 defSide = GET_BATTLER_SIDE(battlerDef);
|
||||
u16 finalModifier = UQ_4_12(1.0);
|
||||
u16 itemDef = gBattleMons[battlerDef].item;
|
||||
|
||||
// check multiple targets in double battle
|
||||
if (GetMoveTargetCount(move, battlerAtk, battlerDef) >= 2)
|
||||
@ -8323,7 +8324,8 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move
|
||||
// berries reducing dmg
|
||||
case HOLD_EFFECT_RESIST_BERRY:
|
||||
if (moveType == GetBattlerHoldEffectParam(battlerDef)
|
||||
&& (moveType == TYPE_NORMAL || typeEffectivenessModifier >= UQ_4_12(2.0)))
|
||||
&& (moveType == TYPE_NORMAL || typeEffectivenessModifier >= UQ_4_12(2.0))
|
||||
&& !UnnerveOn(battlerDef, itemDef))
|
||||
{
|
||||
if (abilityDef == ABILITY_RIPEN)
|
||||
MulModifier(&finalModifier, UQ_4_12(0.25));
|
||||
|
Loading…
x
Reference in New Issue
Block a user