From 3a83e92a99ce7a161f36e0bd2f1412580ef9bca0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 20 Jul 2009 18:07:51 +0000 Subject: Apply caotto's plant god patch, for now named "Feawn". Also fix potions of porridge's menu colour being yellow for Mummies. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10355 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 0b11a7c131..657b38e1ac 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3586,29 +3586,8 @@ void bolt::affect_player_enchantment() break; case BEAM_BACKLIGHT: - if (!you.duration[DUR_INVIS]) - { - if (you.duration[DUR_BACKLIGHT]) - mpr("You glow brighter."); - else - mpr("You are outlined in light."); - - you.duration[DUR_BACKLIGHT] += random_range(15, 35); - if (you.duration[DUR_BACKLIGHT] > 250) - you.duration[DUR_BACKLIGHT] = 250; - - obvious_effect = true; - } - else - { - mpr("You feel strangely conspicuous."); - - you.duration[DUR_BACKLIGHT] += random_range(3, 5); - if (you.duration[DUR_BACKLIGHT] > 250) - you.duration[DUR_BACKLIGHT] = 250; - - obvious_effect = true; - } + you.backlight(); + obvious_effect = true; break; case BEAM_POLYMORPH: @@ -4096,6 +4075,21 @@ void bolt::tracer_enchantment_affect_monster(monsters* mon) bool bolt::determine_damage(monsters* mon, int& preac, int& postac, int& final, std::vector& messages) { + // Worshippers of Feawn may shoot past friendly plants. + if (!is_explosion && !is_enchantment() + && this->attitude == ATT_FRIENDLY + && you.religion == GOD_FEAWN + && mons_genus(mon->mons_species()) == MONS_PLANT + && mon->mons_species() != MONS_GIANT_SPORE + && mon->attitude == ATT_FRIENDLY) + { + // FIXME: Messaging is kind of problematic here. + if (!is_tracer) + simple_god_message(" protects your plant from harm.", GOD_FEAWN); + return (false); + } + + // preac: damage before AC modifier // postac: damage after AC modifier // final: damage after AC and resists @@ -4192,6 +4186,7 @@ void bolt::tracer_nonenchantment_affect_monster(monsters* mon) { foe_info.power += 2 * final * mons_power(mon->type) / preac; foe_info.count++; + } else { -- cgit v1.2.3-54-g00ecf