From 26114d45793c14602e7c9f565461bddac1d3fc40 Mon Sep 17 00:00:00 2001 From: hjk321 <37224753+hjk321@users.noreply.github.com> Date: Fri, 3 May 2019 07:56:44 -0500 Subject: [PATCH] Update comparison --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d2496881e0..51b6582505 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1276,7 +1276,7 @@ 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 > ARRAY_COUNT(sCriticalHitChance) - 1 ) + if (critChance >= ARRAY_COUNT(sCriticalHitChance)) critChance = ARRAY_COUNT(sCriticalHitChance) - 1; if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR)