mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 00:13:58 +01:00
Status moves should not be considered for type effectiveness (#2743)
This commit is contained in:
commit
05b52cf3f1
@ -9851,7 +9851,17 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat
|
|||||||
&& gBattleMons[battlerDef].type3 != gBattleMons[battlerDef].type1)
|
&& gBattleMons[battlerDef].type3 != gBattleMons[battlerDef].type1)
|
||||||
MulByTypeEffectiveness(&modifier, move, moveType, battlerDef, gBattleMons[battlerDef].type3, battlerAtk, recordAbilities);
|
MulByTypeEffectiveness(&modifier, move, moveType, battlerDef, gBattleMons[battlerDef].type3, battlerAtk, recordAbilities);
|
||||||
|
|
||||||
if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING))
|
if (gBattleMoves[move].split == SPLIT_STATUS && move != MOVE_THUNDER_WAVE)
|
||||||
|
{
|
||||||
|
modifier = UQ_4_12(1.0);
|
||||||
|
#if B_GLARE_GHOST <= GEN_3
|
||||||
|
if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST))
|
||||||
|
{
|
||||||
|
modifier = UQ_4_12(0.0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else if (moveType == TYPE_GROUND && !IsBattlerGrounded2(battlerDef, TRUE) && !(gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING))
|
||||||
{
|
{
|
||||||
modifier = UQ_4_12(0.0);
|
modifier = UQ_4_12(0.0);
|
||||||
if (recordAbilities && defAbility == ABILITY_LEVITATE)
|
if (recordAbilities && defAbility == ABILITY_LEVITATE)
|
||||||
@ -9869,12 +9879,6 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat
|
|||||||
modifier = UQ_4_12(0.0);
|
modifier = UQ_4_12(0.0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if B_GLARE_GHOST >= GEN_4
|
|
||||||
else if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST))
|
|
||||||
{
|
|
||||||
modifier = UQ_4_12(1.0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Thousand Arrows ignores type modifiers for flying mons
|
// Thousand Arrows ignores type modifiers for flying mons
|
||||||
if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)
|
if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user