Add type immunity exception for status effect moves

This commit is contained in:
Flashfyre committed 2024-02-20 11:00:40 -05:00
1 parent fcb21f8b61
commit fa45d54be7
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -770,7 +770,7 @@ export class StatusEffectAttr extends MoveEffectAttr {
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
return !(this.selfTarget ? user : target).status ? Math.floor(move.chance * -0.1) : 0;
return !(this.selfTarget ? user : target).status && target.getAttackMoveEffectiveness(move.type) ? Math.floor(move.chance * -0.1) : 0;
}
}