mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 14:55:22 +01:00
[AI] Prevent ai from using moves guaranteed to fail due to the weather (#6613)
Prevent ai from using moves guaranteed to fail due to the weather
This commit is contained in:
parent
0da202c26e
commit
2a9e4e5ebb
@ -6543,8 +6543,9 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
move.category !== MoveCategory.STATUS
|
move.category !== MoveCategory.STATUS
|
||||||
&& moveTargets.some(p => {
|
&& moveTargets.some(p => {
|
||||||
const doesNotFail =
|
const doesNotFail =
|
||||||
move.applyConditions(this, p, -1)
|
!globalScene.arena.isMoveWeatherCancelled(this, move)
|
||||||
|| [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id);
|
&& (move.applyConditions(this, p, -1)
|
||||||
|
|| [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id));
|
||||||
return (
|
return (
|
||||||
doesNotFail
|
doesNotFail
|
||||||
&& p.getAttackDamage({
|
&& p.getAttackDamage({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user