From e48766e842f0586ce575268ee7127f58d6d29f51 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 23 May 2008 15:15:10 +0000 Subject: Apply beam tracer prompt to helpless/fleeing etc. creatures when worshipping an appropriate god. I'm simply reusing dolorous unchivalric methods here. :) Also, don't prompt for harmless beams. Still TODO: Make the message differentiate between target and obstacles, and clean up the code a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5193 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 84853eb97c..02b9016458 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1909,7 +1909,7 @@ static inline int get_resistible_fraction(beam_type flavour) // (does handle monster acid damage), miasma, and other exotic // attacks. // -// beam_type is just use to determine the damage flavour, it does not +// beam_type is just used to determine the damage flavour, it does not // necessarily imply that the attack is a beam attack. int resist_adjust_damage(actor *defender, beam_type flavour, int res, int rawdamage, bool ranged) @@ -1917,12 +1917,12 @@ int resist_adjust_damage(actor *defender, beam_type flavour, if (!res) return (rawdamage); - const bool monster = defender->atype() == ACT_MONSTER; + const bool monster = (defender->atype() == ACT_MONSTER); // Check if this is a resist that pretends to be boolean for // damage purposes - only electricity at the moment, raw poison // damage uses the normal formula. - int res_base = is_boolean_resist(flavour)? 2 : 1; + int res_base = (is_boolean_resist(flavour) ? 2 : 1); const int resistible_fraction = get_resistible_fraction(flavour); int resistible = rawdamage * resistible_fraction / 100; -- cgit v1.2.3-54-g00ecf