mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Adjusts conditional for userSleptOrComatoseCondition, removes getCondition, fixes failing test
This commit is contained in:
parent
573c6c668c
commit
c1a7862c29
@ -2847,10 +2847,6 @@ export class BypassSleepAttr extends MoveAttr {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCondition(): MoveConditionFunc {
|
|
||||||
return (user, target, move) => user.status?.effect === StatusEffect.SLEEP && user.status.sleepTurnsRemaining != undefined && user.status.sleepTurnsRemaining > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns arbitrarily high score when Pokemon is asleep, otherwise shouldn't be used
|
* Returns arbitrarily high score when Pokemon is asleep, otherwise shouldn't be used
|
||||||
* @param user
|
* @param user
|
||||||
@ -7923,7 +7919,7 @@ const failIfDampCondition: MoveConditionFunc = (user, target, move) => {
|
|||||||
return !cancelled.value;
|
return !cancelled.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const userSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => user.status?.effect === StatusEffect.SLEEP || user.hasAbility(Abilities.COMATOSE);
|
const userSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => (user.status?.effect === StatusEffect.SLEEP && (user.status.sleepTurnsRemaining ?? 0) > 0) || user.hasAbility(Abilities.COMATOSE);
|
||||||
|
|
||||||
const targetSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => target.status?.effect === StatusEffect.SLEEP || target.hasAbility(Abilities.COMATOSE);
|
const targetSleptOrComatoseCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => target.status?.effect === StatusEffect.SLEEP || target.hasAbility(Abilities.COMATOSE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user