mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Updates conditional for sleep talk to track turns in getCondition
This commit is contained in:
parent
02cac77853
commit
573c6c668c
@ -2843,12 +2843,12 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
|
||||
|
||||
export class BypassSleepAttr extends MoveAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (user.status?.effect === StatusEffect.SLEEP) {
|
||||
user.addTag(BattlerTagType.BYPASS_SLEEP, 1, move.id, user.id);
|
||||
return true;
|
||||
}
|
||||
user.addTag(BattlerTagType.BYPASS_SLEEP, 1, move.id, user.id);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
getCondition(): MoveConditionFunc {
|
||||
return (user, target, move) => user.status?.effect === StatusEffect.SLEEP && user.status.sleepTurnsRemaining != undefined && user.status.sleepTurnsRemaining > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user