From 053c07cfba8dc241252fcb40fc37695a9b34a545 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 11 Apr 2024 12:14:03 -0400 Subject: [PATCH] Fix being able to use rest without drawback when unable to sleep --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 2ba34d488fd..a9f84dd4130 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3416,7 +3416,7 @@ export function initMoves() { new SelfStatusMove(Moves.REST, "Rest", Type.PSYCHIC, -1, 5, "The user goes to sleep for two turns. This fully restores the user's HP and heals any status conditions.", -1, 0, 1) .attr(StatusEffectAttr, StatusEffect.SLEEP, true, 3, true) .attr(HealAttr, 1, true) - .condition((user, target, move) => user.status?.effect !== StatusEffect.SLEEP && user.getHpRatio() < 1) + .condition((user, target, move) => user.getHpRatio() < 1 && user.canSetStatus(StatusEffect.SLEEP, true)) .triageMove(), new AttackMove(Moves.ROCK_SLIDE, "Rock Slide", Type.ROCK, MoveCategory.PHYSICAL, 75, 90, 10, "Large boulders are hurled at opposing Pokémon to inflict damage. This may also make the opposing Pokémon flinch.", 30, 0, 1) .attr(FlinchAttr)