From 10c390b9ec4a7a8ea0fd184dc2010617348b81d8 Mon Sep 17 00:00:00 2001 From: kleeenexfeu <94004034+kleeenexfeu@users.noreply.github.com> Date: Sat, 13 Nov 2021 11:53:49 +0100 Subject: [PATCH] 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. --- src/battle_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_util.c b/src/battle_util.c index 81897096fb..74068ec0b3 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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