From e4ef3cc3b4732885c6c783f06c9e52bd529c14a1 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 24 Feb 2022 22:06:18 -0500 Subject: [PATCH] move glare effectiveness exception to code --- data/battle_scripts_1.s | 3 --- src/battle_util.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 624e911bc..c85a47d8b 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3735,9 +3735,6 @@ BattleScript_EffectParalyze: jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects jumpifsubstituteblocks BattleScript_ButItFailed -.if B_GLARE_GHOST >= GEN_4 - jumpifmove MOVE_GLARE, BattleScript_BattleScript_EffectParalyzeNoTypeCalc -.endif typecalc BattleScript_BattleScript_EffectParalyzeNoTypeCalc: jumpifmovehadnoeffect BattleScript_ButItFailed diff --git a/src/battle_util.c b/src/battle_util.c index 4127b9bd4..fd06b2cd2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -9135,6 +9135,10 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat { modifier = UQ_4_12(0.0); } + else if (move == MOVE_GLARE && IS_BATTLER_OF_TYPE(battlerDef, TYPE_GHOST)) + { + modifier = UQ_4_12(1.0); + } // Thousand Arrows ignores type modifiers for flying mons if (!IsBattlerGrounded(battlerDef) && (gBattleMoves[move].flags & FLAG_DMG_UNGROUNDED_IGNORE_TYPE_IF_FLYING)