Skip to content

Commit

Permalink
move fix from sharedpower to base
Browse files Browse the repository at this point in the history
  • Loading branch information
adrivrie committed Oct 2, 2024
1 parent c812f97 commit 425fd94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
19 changes: 0 additions & 19 deletions data/mods/sharedpower/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},
},
};
8 changes: 6 additions & 2 deletions data/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},
Expand Down

0 comments on commit 425fd94

Please sign in to comment.