mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +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
|
||||
&& moveTargets.some(p => {
|
||||
const doesNotFail =
|
||||
move.applyConditions(this, p, -1)
|
||||
|| [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id);
|
||||
!globalScene.arena.isMoveWeatherCancelled(this, move)
|
||||
&& (move.applyConditions(this, p, -1)
|
||||
|| [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id));
|
||||
return (
|
||||
doesNotFail
|
||||
&& p.getAttackDamage({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user