diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 5f7e898e1dcf..1eb74cea3151 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3413,7 +3413,7 @@ BattleScript_EffectOHKO:: attackcanceler attackstring ppreduce - accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON + accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE typecalc jumpifmovehadnoeffect BattleScript_HitFromAtkAnimation tryKO BattleScript_KOFail diff --git a/test/battle/move_effect/ohko.c b/test/battle/move_effect/ohko.c index 511d76a8ad31..8a8015309b87 100644 --- a/test/battle/move_effect/ohko.c +++ b/test/battle/move_effect/ohko.c @@ -20,6 +20,22 @@ SINGLE_BATTLE_TEST("Sheer Cold doesn't affect Ice-type Pokémon") MESSAGE("It doesn't affect the opposing Glalie…"); } } + +SINGLE_BATTLE_TEST("OHKO moves can hit semi-invulnerable mons when the user has No-Guard") +{ + GIVEN { + ASSUME(gMovesInfo[MOVE_SHEER_COLD].effect == EFFECT_OHKO); + PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_NO_GUARD); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_FLY); } + TURN { MOVE(player, MOVE_SHEER_COLD); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SHEER_COLD, player); + HP_BAR(opponent, hp: 0); + } +} + TO_DO_BATTLE_TEST("Fissure faints the target, skipping regular damage calculations") TO_DO_BATTLE_TEST("Fissure always fails if the target has a higher level than the user") TO_DO_BATTLE_TEST("Fissure's accuracy increases by 1% for every level the user has over the target")