Update move.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Bertie690 2025-08-03 20:35:46 -04:00 committed by GitHub
parent 6f3d1b9116
commit 1b2cb1de00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1308,7 +1308,7 @@ export class MoveEffectAttr extends MoveAttr {
* @returns true if basic application of the ability attribute should be possible
*/
canApply(user: Pokemon, target: Pokemon, move: Move, _args?: any[]) {
return (this.selfTarget ? user : target).hp > 0
return !(this.selfTarget ? user : target).isFainted();
}
/** Applies move effects so long as they are able based on {@linkcode canApply} */