Hotfix Sucker Punch and Upper Hand AI (#1237)

This commit is contained in:
Xavion3 2024-05-22 22:13:39 +10:00 committed by GitHub
parent 460e94725b
commit 7ae09a31a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -3084,7 +3084,7 @@ export class EnemyPokemon extends Pokemon {
const target = this.scene.getField()[mt]; const target = this.scene.getField()[mt];
let targetScore = move.getUserBenefitScore(this, target, move) + move.getTargetBenefitScore(this, target, move) * (mt < BattlerIndex.ENEMY === this.isPlayer() ? 1 : -1); let targetScore = move.getUserBenefitScore(this, target, move) + move.getTargetBenefitScore(this, target, move) * (mt < BattlerIndex.ENEMY === this.isPlayer() ? 1 : -1);
if (move.name.endsWith(' (N)') || !move.applyConditions(this, target, move)) if ((move.name.endsWith(' (N)') || !move.applyConditions(this, target, move)) && ![Moves.SUCKER_PUNCH, Moves.UPPER_HAND].includes(move.id))
targetScore = -20; targetScore = -20;
else if (move instanceof AttackMove) { else if (move instanceof AttackMove) {
const effectiveness = target.getAttackMoveEffectiveness(this, pokemonMove); const effectiveness = target.getAttackMoveEffectiveness(this, pokemonMove);