Skip to content

Commit

Permalink
Shared Power: Fix source for Rest failure message (#10596)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrivrie authored Oct 2, 2024
1 parent 998c360 commit 2e805a2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions data/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15500,8 +15500,13 @@ 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);
// insomnia and vital spirit checks are separate so that the message is accurate in multi-ability mods
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 2e805a2

Please sign in to comment.