From 1843dffcb6c0a31abd16378acbab2bc4e3df623e Mon Sep 17 00:00:00 2001 From: urkerab Date: Tue, 27 Oct 2020 20:58:41 +0000 Subject: [PATCH] Make Eerie Spell's secondary effect secondary (#7575) --- data/moves.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/data/moves.ts b/data/moves.ts index 974dcf78623b2..3fa3dc3f0ba7c 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -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", },