From 52c344adb7f29471f07a38514e5917e3eb84f71b Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Tue, 28 Jul 2015 14:26:21 -0700 Subject: [PATCH] Update message parsing for Anticipate and Forewarn Anticipate uses -ability now. Allow Forewarn to read the Pokemon with the move in Gen5+. --- js/battle.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/js/battle.js b/js/battle.js index 183086a22..d8b917d04 100644 --- a/js/battle.js +++ b/js/battle.js @@ -4058,6 +4058,9 @@ var Battle = (function () { case 'cloudnine': actions += "The effects of the weather disappeared."; break; + case 'anticipation': + actions += "" + poke.getName() + " shuddered!"; + break; case 'aurabreak': actions += "" + poke.getName() + " reversed all other Pokémon's auras!"; break; @@ -4787,12 +4790,19 @@ var Battle = (function () { actions += "" + poke.getName() + "'s' Speed Boost increases its speed!"; break; case 'forewarn': - actions += "" + poke.getName() + "'s Forewarn alerted it to " + Tools.escapeHTML(args[3]) + "!"; - if (poke.side.foe.active.length === 1) { - poke.side.foe.active[0].markMove(args[3], true); + this.resultAnim(poke, 'Forewarn', 'ability', animDelay); + this.message('', "[" + poke.getName(true) + "'s Forewarn!]"); + if (this.gen >= 5) { + actions += "It was alerted to " + ofpoke.getLowerName() + "'s " + Tools.escapeHTML(args[3]) + "!"; + ofpoke.markMove(args[3], true); + } else { + actions += "" + poke.getName() + "'s Forewarn alerted it to " + Tools.escapeHTML(args[3]) + "!"; + if (poke.side.foe.active.length === 1) { + poke.side.foe.active[0].markMove(args[3], true); + } } break; - case 'anticipation': + case 'anticipation': // Deprecated, now uses -ability. This is for replay compatability actions += "" + poke.getName() + " shuddered!"; break; case 'telepathy':