Fixes wrongly usage of arguments without checking effect (#6859)
This commit is contained in:
parent
ad0e98bb12
commit
34918f5f0d
@ -819,11 +819,6 @@ static inline bool32 IsBattleMoveStatus(u32 move)
|
||||
return GetMoveCategory(move) == DAMAGE_CATEGORY_STATUS;
|
||||
}
|
||||
|
||||
static inline bool32 IsBattleMoveRecoil(u32 move)
|
||||
{
|
||||
return GetMoveRecoil(move) > 0 || GetMoveEffect(move) == EFFECT_RECOIL_IF_MISS;
|
||||
}
|
||||
|
||||
/* Checks if 'battlerId' is any of the types.
|
||||
* Passing multiple types is more efficient than calling this multiple
|
||||
* times with one type because it shares the 'GetBattlerTypes' result. */
|
||||
|
||||
@ -972,10 +972,8 @@ static bool32 AI_IsMoveEffectInMinus(u32 battlerAtk, u32 battlerDef, u32 move, s
|
||||
case EFFECT_EXPLOSION:
|
||||
case EFFECT_FINAL_GAMBIT:
|
||||
return TRUE;
|
||||
case EFFECT_RECOIL_IF_MISS:
|
||||
if (AI_IsDamagedByRecoil(battlerAtk))
|
||||
return TRUE;
|
||||
case EFFECT_RECOIL:
|
||||
case EFFECT_RECOIL_IF_MISS:
|
||||
if (AI_IsDamagedByRecoil(battlerAtk))
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
@ -8396,7 +8396,7 @@ static inline u32 CalcMoveBasePowerAfterModifiers(struct DamageCalculationData *
|
||||
modifier = uq4_12_multiply(modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case ABILITY_RECKLESS:
|
||||
if (IsBattleMoveRecoil(move))
|
||||
if (moveEffect == EFFECT_RECOIL || moveEffect == EFFECT_RECOIL_IF_MISS)
|
||||
modifier = uq4_12_multiply(modifier, UQ_4_12(1.2));
|
||||
break;
|
||||
case ABILITY_IRON_FIST:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user