Skip to content

Commit

Permalink
Renamed OW type effectiveness function for clarity (#5917)
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo authored Dec 31, 2024
1 parent 13dcd35 commit e127559
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/battle_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/event_object_movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e127559

Please sign in to comment.