summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-23 15:15:10 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-23 15:15:10 +0000
commite48766e842f0586ce575268ee7127f58d6d29f51 (patch)
tree6611db85325871347e8500c65b7fc5b255257e66 /crawl-ref/source/fight.cc
parent7b9c8f3ef0a491779f4a3100425cee9c227ab6ff (diff)
downloadcrawl-ref-e48766e842f0586ce575268ee7127f58d6d29f51.tar.gz
crawl-ref-e48766e842f0586ce575268ee7127f58d6d29f51.zip
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc6
1 files changed, 3 insertions, 3 deletions
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;