From e1275594c5492d0a63e23618905ae3f915d58163 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Tue, 31 Dec 2024 18:55:42 -0300 Subject: [PATCH] Renamed OW type effectiveness function for clarity (#5917) --- include/battle_util.h | 2 +- src/battle_util.c | 2 +- src/event_object_movement.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/battle_util.h b/include/battle_util.h index fc3840e800..5c151665b9 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -237,7 +237,7 @@ s32 CalculateMoveDamageVars(struct DamageCalculationData *damageCalcData, u32 fi uq4_12_t CalcTypeEffectivenessMultiplier(u32 move, u32 moveType, u32 battlerAtk, u32 battlerDef, u32 defAbility, bool32 recordAbilities); uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef); uq4_12_t GetTypeModifier(u32 atkType, u32 defType); -uq4_12_t GetTypeEffectiveness(struct Pokemon *mon, u8 moveType); +uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, u8 moveType); s32 GetStealthHazardDamage(u8 hazardType, u32 battler); s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp); bool32 CanMegaEvolve(u32 battler); diff --git a/src/battle_util.c b/src/battle_util.c index 2625a4b7cf..4dfb39dc66 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -10670,7 +10670,7 @@ static uq4_12_t GetInverseTypeMultiplier(uq4_12_t multiplier) } } -uq4_12_t GetTypeEffectiveness(struct Pokemon *mon, u8 moveType) +uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, u8 moveType) { uq4_12_t modifier = UQ_4_12(1.0); u16 abilityDef = GetMonAbility(mon); diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 47640b8f4e..0645d7073a 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -2520,7 +2520,7 @@ void GetFollowerAction(struct ScriptContext *ctx) // Essentially a big switch fo } if (multi < NUMBER_OF_MON_TYPES) { - multi = GetTypeEffectiveness(mon, multi); + multi = GetOverworldTypeEffectiveness(mon, multi); if (multi <= UQ_4_12(0.5)) condEmotes[condCount++] = (struct SpecialEmote) {.emotion = FOLLOWER_EMOTION_HAPPY, .index = 32}; else if (multi >= UQ_4_12(2.0))