Effectiveness is calculated for moves bypassing king's shield

I'm curious what this is for. Before the change it just prevented moves that bypass protections from dealing super effective/not very effective damage to an aegislash using king's shield. So I just added a check with IsBattlerProtected, but in my opinion this line should be entirely removed. Unless I'm missing something.
This commit is contained in:
kleeenexfeu 2021-11-13 11:53:49 +01:00 committed by GitHub
parent fdff1ae1b6
commit 10c390b9ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8783,7 +8783,7 @@ static void MulByTypeEffectiveness(u16 *modifier, u16 move, u8 moveType, u8 batt
if (moveType == TYPE_FIRE && gDisableStructs[battlerDef].tarShot)
mod = UQ_4_12(2.0);
if (gProtectStructs[battlerDef].kingsShielded && gBattleMoves[move].effect != EFFECT_FEINT)
if (gProtectStructs[battlerDef].kingsShielded && gBattleMoves[move].effect != EFFECT_FEINT && IsBattlerProtected(battlerDef, move))
mod = UQ_4_12(1.0);
// WEATHER_STRONG_WINDS weakens Super Effective moves against Flying-type Pokémon