Skip to content

Commit

Permalink
Make Eerie Spell's secondary effect secondary (#7575)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkerab committed Oct 27, 2020
1 parent d045890 commit 4da5d66
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions data/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4006,17 +4006,19 @@ export const Moves: {[moveid: string]: MoveData} = {
pp: 5,
priority: 0,
flags: {protect: 1, mirror: 1, sound: 1, authentic: 1},
onHit(target) {
if (!target.hp) return;
const move = target.lastMove;
if (!move || move.isZ || move.isMax) return;
secondary: {
chance: 100,
onHit(target) {
if (!target.hp) return;
const move = target.lastMove;
if (!move || move.isZ || move.isMax) return;

const ppDeducted = target.deductPP(move.id, 3);
if (!ppDeducted) return;
const ppDeducted = target.deductPP(move.id, 3);
if (!ppDeducted) return;

this.add('-activate', target, 'move: Eerie Spell', move.name, ppDeducted);
this.add('-activate', target, 'move: Eerie Spell', move.name, ppDeducted);
},
},
secondary: null,
target: "normal",
type: "Psychic",
},
Expand Down

0 comments on commit 4da5d66

Please sign in to comment.