From e73b293040e12f5dfe3bc8b9a2e7145571cfbdaa Mon Sep 17 00:00:00 2001 From: ascriptmaster Date: Thu, 23 Oct 2014 11:32:42 -0700 Subject: [PATCH] Add -fail messages for harsh sun, heavy rain, strong winds All new messages are from the textdump. Also, updated the weather table in updateWeather. --- js/battle.js | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/js/battle.js b/js/battle.js index 9fd2c3fa4..85f308a1c 100644 --- a/js/battle.js +++ b/js/battle.js @@ -2606,9 +2606,12 @@ function Battle(frame, logFrame, noPreload) { this.updateWeather = function (weather) { var weatherNameTable = { sunnyday: 'Sun', + desolateland: 'Intense Sun', raindance: 'Rain', + primordialsea: 'Heavy Rain', sandstorm: 'Sandstorm', - hail: 'Hail' + hail: 'Hail', + deltastream: 'Strong Winds' }; if (typeof weather === 'undefined') { @@ -3459,12 +3462,39 @@ function Battle(frame, logFrame, noPreload) { actions += "But it failed!"; } break; + case 'sunnyday': + case 'raindance': + case 'sandstorm': + case 'hail': + switch (fromeffect.id) { + case 'desolateland': + actions += "The extremely harsh sunlight was not lessened at all!"; + break; + case 'primordialsea': + actions += "There's no relief from this heavy rain!"; + break; + case 'deltastream': + actions += "The mysterious air current blows on regardless!"; + break; + default: + actions += "But it failed!"; + } + break; case 'unboost': self.resultAnim(poke, 'Stat drop blocked', 'neutral', animDelay); actions += "" + poke.getName() + "'s " + (args[3] ? args[3] + " was" : "stats were") + " not lowered!"; break; default: - actions += "But it failed!"; + switch (fromeffect.id) { + case 'desolateland': + actions += "The Water-type attack evaporated in the harsh sunlight!"; + break; + case 'primordialsea': + actions += "The Fire-type attack fizzled out in the heavy rain!"; + break; + default: + actions += "But it failed!"; + } break; } break; @@ -3776,6 +3806,21 @@ function Battle(frame, logFrame, noPreload) { case 'mummy': actions += "" + poke.getName() + "'s Ability became Mummy!"; break; + case 'desolateland': + if (kwargs.fail) { + actions += "[" + poke.getName() + "'s " + ability.name + "] The extremely harsh sunlight was not lessened at all!"; + } + break; + case 'primordialsea': + if (kwargs.fail) { + actions += "[" + poke.getName() + "'s " + ability.name + "] There's no relief from this heavy rain!"; + } + break; + case 'deltastream': + if (kwargs.fail) { + actions += "[" + poke.getName() + "'s " + ability.name + "] The mysterious air current blows on regardless!"; + } + break; default: actions += "" + poke.getName() + " acquired " + ability.name + "!"; break; @@ -4432,6 +4477,10 @@ function Battle(frame, logFrame, noPreload) { actions += '' + ofpoke.getName() + ' shared its ' + Tools.getItem(args[3]).name + ' with ' + poke.getLowerName(); break; + case 'deltastream': + actions += "The mysterious air current weakened the attack!"; + break; + // item activations case 'custapberry': case 'quickclaw':