Fix Entry Hazard Miss (#984)
* 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. * Update move.ts
This commit is contained in:
parent
f3c4a3838b
commit
4a9664c04c
|
@ -55,6 +55,7 @@ export enum MoveTarget {
|
||||||
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_all_Pok%C3%A9mon Moves that target all Pokemon} */
|
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Moves_that_target_all_Pok%C3%A9mon Moves that target all Pokemon} */
|
||||||
ALL,
|
ALL,
|
||||||
USER_SIDE,
|
USER_SIDE,
|
||||||
|
/** {@link https://bulbapedia.bulbagarden.net/wiki/Category:Entry_hazard-creating_moves Entry hazard-creating moves} */
|
||||||
ENEMY_SIDE,
|
ENEMY_SIDE,
|
||||||
BOTH_SIDES,
|
BOTH_SIDES,
|
||||||
PARTY
|
PARTY
|
||||||
|
|
|
@ -2597,7 +2597,8 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
}
|
}
|
||||||
|
|
||||||
hitCheck(target: Pokemon): boolean {
|
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;
|
return true;
|
||||||
|
|
||||||
const user = this.getUserPokemon();
|
const user = this.getUserPokemon();
|
||||||
|
|
Loading…
Reference in New Issue