Fix No Guard failing OHKO Moves into Semi-Invulnerable Pokemon (#5779)

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
iriv24 2024-12-07 16:11:45 -05:00 committed by GitHub
parent 6e24b6af3d
commit cb12bdc220
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -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

View file

@ -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")