From e48b6408fb3cb89993cc0e8af3c5d9312ee4b414 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 20 Feb 2016 16:34:49 +0100 Subject: [PATCH] Added more flavour text for Primal Weather --- public/js/app.js | 15 ++++++++++++--- public/js/replays.js | 15 ++++++++++++--- server/bw/battle.coffee | 7 ++++++- server/bw/move.coffee | 1 + server/in/battle.coffee | 4 ++-- shared/canned_text.coffee | 16 +++++++++++++--- 6 files changed, 46 insertions(+), 12 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 863baba..0bb8e0f 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -226,9 +226,18 @@ FIRE_ROCK_HURT: "$p is hurt by molten rocks!", FIRE_ROCK_END: "The molten rocks disappeared from around $ts!", ILLUSION_BROKE: "The foes $p broke it's illusion!", - WEATHER_FAIL: "But the weather was suppressed!", - HARSHSUN_MOVEFAIL: "But the Harsh Sun caused the move to fail!", - HEAVYRAIN_MOVEFAIL: "But the Harsh Sun caused the move to fail!" + WEATHER_FAIL_RAIN: "There is no relief from this heavy rain!", + WEATHER_FAIL_SUN: "The extremely harsh sunlight was not lessened at all!", + HARSHSUN_MOVEFAIL: "The Water-type attack evaporated in the harsh sunlight!", + HEAVYRAIN_MOVEFAIL: "The Fire-type attack fizzled out in the heavy rain!", + HARSHSUN_START: "The sunlight turned extremely harsh!", + HEAVYRAIN_START: "A heavy rain began to fall!", + HARSHSUN_END: "The sunlight turned extremely harsh!", + HEAVYRAIN_END: "A heavy rain began to fall!", + DELTASTREAM_START: "A mysterious air current is protecting Flying-type Pok�mon!", + WEATHER_FAIL_AIR: "The mysterious air current blows on regardless!", + DELTASTREAM_END: "The mysterious air current has dissipated!", + DELTASTREAM_MOVEFAIL: "The mysterious air current weakened the attack!" } } }; diff --git a/public/js/replays.js b/public/js/replays.js index 4b8f503..66a9770 100644 --- a/public/js/replays.js +++ b/public/js/replays.js @@ -226,9 +226,18 @@ FIRE_ROCK_HURT: "$p is hurt by molten rocks!", FIRE_ROCK_END: "The molten rocks disappeared from around $ts!", ILLUSION_BROKE: "The foes $p broke it's illusion!", - WEATHER_FAIL: "But the weather was suppressed!", - HARSHSUN_MOVEFAIL: "But the Harsh Sun caused the move to fail!", - HEAVYRAIN_MOVEFAIL: "But the Harsh Sun caused the move to fail!" + WEATHER_FAIL_RAIN: "There is no relief from this heavy rain!", + WEATHER_FAIL_SUN: "The extremely harsh sunlight was not lessened at all!", + HARSHSUN_MOVEFAIL: "The Water-type attack evaporated in the harsh sunlight!", + HEAVYRAIN_MOVEFAIL: "The Fire-type attack fizzled out in the heavy rain!", + HARSHSUN_START: "The sunlight turned extremely harsh!", + HEAVYRAIN_START: "A heavy rain began to fall!", + HARSHSUN_END: "The sunlight turned extremely harsh!", + HEAVYRAIN_END: "A heavy rain began to fall!", + DELTASTREAM_START: "A mysterious air current is protecting Flying-type Pok�mon!", + WEATHER_FAIL_AIR: "The mysterious air current blows on regardless!", + DELTASTREAM_END: "The mysterious air current has dissipated!", + DELTASTREAM_MOVEFAIL: "The mysterious air current weakened the attack!" } } }; diff --git a/server/bw/battle.coffee b/server/bw/battle.coffee index e8f8dc2..669da7f 100644 --- a/server/bw/battle.coffee +++ b/server/bw/battle.coffee @@ -324,7 +324,7 @@ class @Battle extends Room console.log(weatherName) console.log(@weakWeather) if weatherName in @weakWeather and @weather in @strongWeather - @cannedText(WEATHER_FAIL) + @cannedText("WEATHER_FAIL") return cannedText = switch weatherName when Weather.SUN then "SUN_START" @@ -333,6 +333,8 @@ class @Battle extends Room when Weather.HAIL then "HAIL_START" when Weather.MOON then "MOON_START" when Weather.DELTASTREAM then "DELTASTREAM_START" + when Weather.HARSHSUN then "HARSHSUN_START" + when Weather.HEAVYRAIN then "HEAVYRAIN_START" else switch @weather when Weather.SUN then "SUN_END" @@ -341,6 +343,9 @@ class @Battle extends Room when Weather.HAIL then "HAIL_END" when Weather.MOON then "MOON_END" when Weather.DELTASTREAM then "DELTASTREAM_END" + when Weather.HARSHSUN then "HARSHSUN_END" + when Weather.HEAVYRAIN then "HEAVYRAIN_END" + @cannedText(cannedText) if cannedText @weather = weatherName @weatherDuration = turns diff --git a/server/bw/move.coffee b/server/bw/move.coffee index 9f88b79..c2e97a6 100644 --- a/server/bw/move.coffee +++ b/server/bw/move.coffee @@ -310,6 +310,7 @@ class @Move typeeffect = util.typeEffectiveness(type, targettype) if targettype == "Flying" and typeeffect > 1 typeeffect = 1 + battle.cannedText('DELTASTREAM_MOVEFAIL') neweffect * typeeffect effect = neweffect if target.hasAbility("Ethereal Shroud") diff --git a/server/in/battle.coffee b/server/in/battle.coffee index b6af94f..bb6b404 100644 --- a/server/in/battle.coffee +++ b/server/in/battle.coffee @@ -19,8 +19,8 @@ eval(coffee.compile(require('fs').readFileSync(path, 'utf8'), bare: true)) [ species, forme ] = pokemon.item.mega pokemon.changeForme(forme) - pokemon.getTeam().megaEvolve() if forme is "mega" - pokemon.getTeam().primalEvolve() if forme is "primal" + pokemon.team.megaEvolve() if forme is "mega" + pokemon.team.primalEvolve() if forme is "primal" ability = @FormeData[species][forme]["abilities"][0] ability = Ability[ability.replace(/\s+/g, '')] diff --git a/shared/canned_text.coffee b/shared/canned_text.coffee index b441b48..387932a 100644 --- a/shared/canned_text.coffee +++ b/shared/canned_text.coffee @@ -161,9 +161,19 @@ CannedText = FIRE_ROCK_HURT: "$p is hurt by molten rocks!" FIRE_ROCK_END: "The molten rocks disappeared from around $ts!" ILLUSION_BROKE: "The foes $p broke it's illusion!" - WEATHER_FAIL: "But the weather was suppressed!" - HARSHSUN_MOVEFAIL: "But the Harsh Sun caused the move to fail!" - HEAVYRAIN_MOVEFAIL: "But the Harsh Sun caused the move to fail!" + WEATHER_FAIL_RAIN: "There is no relief from this heavy rain!" + WEATHER_FAIL_SUN: "The extremely harsh sunlight was not lessened at all!" + HARSHSUN_MOVEFAIL: "The Water-type attack evaporated in the harsh sunlight!" + HEAVYRAIN_MOVEFAIL: "The Fire-type attack fizzled out in the heavy rain!" + HARSHSUN_START: "The sunlight turned extremely harsh!" + HEAVYRAIN_START: "A heavy rain began to fall!" + HARSHSUN_END: "The sunlight turned extremely harsh!" + HEAVYRAIN_END: "A heavy rain began to fall!" + DELTASTREAM_START: "A mysterious air current is protecting Flying-type Pokémon!" + WEATHER_FAIL_AIR: "The mysterious air current blows on regardless!" + DELTASTREAM_END: "The mysterious air current has dissipated!" + DELTASTREAM_MOVEFAIL: "The mysterious air current weakened the attack!" + cannedMap = {} cannedMapReverse = {}