diff --git a/src/battle_util.c b/src/battle_util.c index fbf4ed117..b36895044 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7831,8 +7831,6 @@ static void MulByTypeEffectiveness(u16 *modifier, u16 move, u8 moveType, u8 batt mod = UQ_4_12(2.0); if (moveType == TYPE_GROUND && defType == TYPE_FLYING && IsBattlerGrounded(battlerDef) && mod == UQ_4_12(0.0)) mod = UQ_4_12(1.0); - if (gBattleMoves[move].flags & FLAG_DAMAGE_AIRBORNE && defType == TYPE_FLYING) // Thousand Arrows - mod = UQ_4_12(1.0); if (gProtectStructs[battlerDef].kingsShielded && gBattleMoves[move].effect != EFFECT_FEINT) mod = UQ_4_12(1.0); @@ -7884,6 +7882,14 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat RecordAbilityBattle(battlerDef, ABILITY_LEVITATE); } } + + // Thousand Arrows ignores type modifiers for flying mons + if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DAMAGE_AIRBORNE) + && (gBattleMons[battlerDef].type1 == TYPE_FLYING || gBattleMons[battlerDef].type2 == TYPE_FLYING || gBattleMons[battlerDef].type3 == TYPE_FLYING)) + { + modifier = UQ_4_12(1.0); + } + if (GetBattlerAbility(battlerDef) == ABILITY_WONDER_GUARD && modifier <= UQ_4_12(1.0) && gBattleMoves[move].power) { modifier = UQ_4_12(0.0);