Fix issue with status effect move AI

pull/78/head
Flashfyre 2024-04-10 15:39:36 -04:00
parent 3a2f364b41
commit 350aa30a35
1 changed files with 1 additions and 1 deletions

View File

@ -916,7 +916,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return !(this.selfTarget ? user : target).status && target.getAttackTypeEffectiveness(move.type) ? Math.floor(move.chance * -0.1) : 0;
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(this.effect, true) ? Math.floor(move.chance * -0.1) : 0;
}
}