From 425fd945da6cc3d819991edf57695ddfde2cf612 Mon Sep 17 00:00:00 2001 From: adrivrie Date: Wed, 2 Oct 2024 20:30:59 +0200 Subject: [PATCH] move fix from sharedpower to base --- data/mods/sharedpower/moves.ts | 19 ------------------- data/moves.ts | 8 ++++++-- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/data/mods/sharedpower/moves.ts b/data/mods/sharedpower/moves.ts index 6f5c41e74cf7..a883f0fa81f0 100644 --- a/data/mods/sharedpower/moves.ts +++ b/data/mods/sharedpower/moves.ts @@ -15,23 +15,4 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { }, }, }, - rest: { - inherit: true, - onTry(source) { - if (source.status === 'slp' || source.hasAbility('comatose')) return false; - - if (source.hp === source.maxhp) { - this.add('-fail', source, 'heal'); - return null; - } - if (source.hasAbility('insomnia')) { - this.add('-fail', source, '[from] ability: Insomnia', '[of] ' + source); - return null; - } - if (source.hasAbility('vitalspirit')) { - this.add('-fail', source, '[from] ability: Vital Spirit', '[of] ' + source); - return null; - } - }, - }, }; diff --git a/data/moves.ts b/data/moves.ts index 64e608c6486d..a5c69b0a5c14 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -15498,8 +15498,12 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { this.add('-fail', source, 'heal'); return null; } - if (source.hasAbility(['insomnia', 'vitalspirit'])) { - this.add('-fail', source, '[from] ability: ' + source.getAbility().name, '[of] ' + source); + if (source.hasAbility('insomnia')) { + this.add('-fail', source, '[from] ability: Insomnia', '[of] ' + source); + return null; + } + if (source.hasAbility('vitalspirit')) { + this.add('-fail', source, '[from] ability: Vital Spirit', '[of] ' + source); return null; } },