From 3c9d6c2687ccc5c3d833c2f1c735313db4216ad2 Mon Sep 17 00:00:00 2001 From: Marty-D Date: Sun, 18 Dec 2016 11:06:55 -0500 Subject: [PATCH] Correct crit ratio boosting Z-Effect --- chat-plugins/info.js | 2 +- data/moves.js | 18 +++++++++++------- data/scripts.js | 4 ++-- data/statuses.js | 12 ------------ 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/chat-plugins/info.js b/chat-plugins/info.js index 2324156758..d2539bd317 100644 --- a/chat-plugins/info.js +++ b/chat-plugins/info.js @@ -408,7 +408,7 @@ exports.commands = { } else if (move.zMoveEffect) { details["Z-Effect"] = { 'clearnegativeboost': "Restores negative stat stages to 0", - 'crit1': "Crit ratio +1", + 'crit2': "Crit ratio +2", 'heal': "Restores HP 100%", 'curse': "Restores HP 100% if user is Ghost type, otherwise Attack +1", 'redirect': "Redirects opposing attacks to user", diff --git a/data/moves.js b/data/moves.js index d7c5212f81..b78a308074 100644 --- a/data/moves.js +++ b/data/moves.js @@ -227,7 +227,7 @@ exports.BattleMovedex = { secondary: false, target: "adjacentAllyOrSelf", type: "Normal", - zMoveEffect: 'crit1', + zMoveEffect: 'crit2', contestType: "Tough", }, "aerialace": { @@ -5644,8 +5644,12 @@ exports.BattleMovedex = { flags: {snatch: 1}, volatileStatus: 'focusenergy', effect: { - onStart: function (pokemon) { - this.add('-start', pokemon, 'move: Focus Energy'); + onStart: function (target, source, effect) { + if (effect && effect.id === 'zpower') { + this.add('-start', target, 'move: Focus Energy', '[zeffect]'); + } else { + this.add('-start', target, 'move: Focus Energy'); + } }, onModifyCritRatio: function (critRatio) { return critRatio + 2; @@ -5788,7 +5792,7 @@ exports.BattleMovedex = { secondary: false, target: "normal", type: "Normal", - zMoveEffect: 'crit1', + zMoveEffect: 'crit2', contestType: "Clever", }, "forestscurse": { @@ -7315,7 +7319,7 @@ exports.BattleMovedex = { secondary: false, target: "normal", type: "Psychic", - zMoveEffect: 'crit1', + zMoveEffect: 'crit2', contestType: "Clever", }, "heatcrash": { @@ -14987,7 +14991,7 @@ exports.BattleMovedex = { secondary: false, target: "self", type: "Normal", - zMoveEffect: 'crit1', + zMoveEffect: 'crit2', contestType: "Cute", }, "sludge": { @@ -16863,7 +16867,7 @@ exports.BattleMovedex = { secondary: false, target: "allySide", type: "Flying", - zMoveEffect: 'crit1', + zMoveEffect: 'crit2', contestType: "Cool", }, "takedown": { diff --git a/data/scripts.js b/data/scripts.js index bdb134e070..a9d48fd4db 100644 --- a/data/scripts.js +++ b/data/scripts.js @@ -130,8 +130,8 @@ exports.BattleScripts = { this.add('-clearnegativeboost', pokemon, '[zeffect]'); } else if (zMove && move.zMoveEffect === 'redirect') { pokemon.addVolatile('followme', pokemon, {id: 'zpower'}); - } else if (zMove && move.zMoveEffect === 'crit1') { - pokemon.addVolatile('crit1', pokemon, {id: 'zpower'}); + } else if (zMove && move.zMoveEffect === 'crit2') { + pokemon.addVolatile('focusenergy', pokemon, {id: 'zpower'}); } else if (zMove && move.zMoveEffect === 'curse') { if (pokemon.hasType('Ghost')) { this.heal(pokemon.maxhp, pokemon, pokemon, {id: 'zpower'}); diff --git a/data/statuses.js b/data/statuses.js index d84d527402..085ee278b4 100644 --- a/data/statuses.js +++ b/data/statuses.js @@ -202,18 +202,6 @@ exports.BattleStatuses = { trapper: { noCopy: true, }, - crit1: { - onStart: function (target, source, effect) { - if (effect && effect.id === 'zpower') { - this.add('-start', target, 'move: Focus Energy', '[zeffect]'); - } else { - this.add('-start', target, 'move: Focus Energy'); - } - }, - onModifyCritRatio: function (critRatio) { - return critRatio + 1; - }, - }, partiallytrapped: { duration: 5, durationCallback: function (target, source) {