diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 283adb54a..9ace33bf0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12562,7 +12562,7 @@ static void Cmd_tryKO(void) if (gCurrentMove == MOVE_SHEER_COLD && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)) odds -= 10; #endif - if (Random() % 100 + 1 < odds && gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) + if (RandomPercentage(RNG_ACCURACY, odds) && gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level) lands = TRUE; } diff --git a/test/ability_compound_eyes.c b/test/ability_compound_eyes.c index bbe718176..d90604d5c 100644 --- a/test/ability_compound_eyes.c +++ b/test/ability_compound_eyes.c @@ -21,12 +21,11 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy") // than we expect. SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves") { - KNOWN_FAILING; PASSES_RANDOMLY(30, 100, RNG_ACCURACY); GIVEN { ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30); ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO); - PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_TINTED_LENS); }; + PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); }; OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(player, MOVE_FISSURE); }