From cd3245cbf0097e5b93f6b37791746dbe12da1884 Mon Sep 17 00:00:00 2001 From: AlexOn1ine Date: Tue, 12 Nov 2024 23:33:35 +0100 Subject: [PATCH] maybe better names --- src/battle_script_commands.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b0c9399e95..0293e00f34 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1950,21 +1950,21 @@ static inline u32 GetHoldEffectCritChanceIncrease(u32 battler, u32 holdEffect) return critStageIncrease; } -#define CRIT_BLOCKED -1 -#define ALWAYS_CRITS -2 +#define CRITICAL_HIT_BLOCKED -1 +#define CRITICAL_HIT_ALWAYS -2 s32 CalcCritChanceStageArgs(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, u32 holdEffectAtk) { s32 critChance = 0; if (gSideStatuses[battlerDef] & SIDE_STATUS_LUCKY_CHANT) { - critChance = CRIT_BLOCKED; + critChance = CRITICAL_HIT_BLOCKED; } else if (gStatuses3[battlerAtk] & STATUS3_LASER_FOCUS || gMovesInfo[move].alwaysCriticalHit || (abilityAtk == ABILITY_MERCILESS && gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY)) { - critChance = ALWAYS_CRITS; + critChance = CRITICAL_HIT_ALWAYS; } else { @@ -1980,17 +1980,17 @@ s32 CalcCritChanceStageArgs(u32 battlerAtk, u32 battlerDef, u32 move, bool32 rec critChance = ARRAY_COUNT(sCriticalHitOdds) - 1; } - if (critChance != CRIT_BLOCKED && (abilityDef == ABILITY_BATTLE_ARMOR || abilityDef == ABILITY_SHELL_ARMOR)) + if (critChance != CRITICAL_HIT_BLOCKED && (abilityDef == ABILITY_BATTLE_ARMOR || abilityDef == ABILITY_SHELL_ARMOR)) { // Record ability only if move had 100% chance to get a crit if (recordAbility) { - if (critChance == ALWAYS_CRITS) + if (critChance == CRITICAL_HIT_ALWAYS) RecordAbilityBattle(battlerDef, abilityDef); else if (GetCriticalHitOdds(critChance) == 1) RecordAbilityBattle(battlerDef, abilityDef); } - critChance = CRIT_BLOCKED; + critChance = CRITICAL_HIT_BLOCKED; } return critChance;