fix compound eyes ohko test

This commit is contained in:
sbird 2023-03-24 15:41:18 +01:00 committed by Philipp AUER
parent 4928911cd0
commit b9447f88fc
2 changed files with 2 additions and 3 deletions

View File

@ -12562,7 +12562,7 @@ static void Cmd_tryKO(void)
if (gCurrentMove == MOVE_SHEER_COLD && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE)) if (gCurrentMove == MOVE_SHEER_COLD && !IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_ICE))
odds -= 10; odds -= 10;
#endif #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; lands = TRUE;
} }

View File

@ -21,12 +21,11 @@ SINGLE_BATTLE_TEST("Compound Eyes raises accuracy")
// than we expect. // than we expect.
SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves") SINGLE_BATTLE_TEST("Compound Eyes does not affect OHKO moves")
{ {
KNOWN_FAILING;
PASSES_RANDOMLY(30, 100, RNG_ACCURACY); PASSES_RANDOMLY(30, 100, RNG_ACCURACY);
GIVEN { GIVEN {
ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30); ASSUME(gBattleMoves[MOVE_FISSURE].accuracy == 30);
ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO); ASSUME(gBattleMoves[MOVE_FISSURE].effect == EFFECT_OHKO);
PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_TINTED_LENS); }; PLAYER(SPECIES_BUTTERFREE) { Ability(ABILITY_COMPOUND_EYES); };
OPPONENT(SPECIES_WOBBUFFET); OPPONENT(SPECIES_WOBBUFFET);
} WHEN { } WHEN {
TURN { MOVE(player, MOVE_FISSURE); } TURN { MOVE(player, MOVE_FISSURE); }