maybe better names
This commit is contained in:
parent
4dc784bd2d
commit
cd3245cbf0
1 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue