Fix Entry Hazard Miss

Made Entry Hazards bypass the accuracy check as they cannot miss a target. There's still one more bug to fix with this but it requires way more code changes. This change needed to be done as well, so I'm getting it out early.
This commit is contained in:
Benjamin Odom 2024-05-16 10:52:16 -05:00
parent ff086ca492
commit b2334bb130

View File

@ -2588,7 +2588,8 @@ export class MoveEffectPhase extends PokemonPhase {
}
hitCheck(target: Pokemon): boolean {
if (this.move.getMove().moveTarget === MoveTarget.USER)
// Moves targeting the user and entry hazards can't miss
if ([MoveTarget.USER, MoveTarget.ENEMY_SIDE].includes(this.move.getMove().moveTarget))
return true;
const user = this.getUserPokemon();