diff options
author | hjk321 <37224753+hjk321@users.noreply.github.com> | 2019-04-27 16:41:37 -0600 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-05-03 18:21:11 -0500 |
commit | 106a89eace1cb4de5f7b45683d14c484c4cfdd90 (patch) | |
tree | 2b17d270c202712c74a6edf0f731feed059d194a /src | |
parent | 901a83d249a511e45a79d3358bdbdf1a594013ab (diff) |
Document magic number from atk04_critcalc
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_script_commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 7e783bef5..f7eed0760 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1276,8 +1276,8 @@ static void atk04_critcalc(void) + 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY) + 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD); - if (critChance > 4) - critChance = 4; + if (critChance > ARRAY_COUNT(sCriticalHitChance) - 1 ) + critChance = ARRAY_COUNT(sCriticalHitChance) - 1; if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR) && !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT) |