summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-01 20:06:57 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-01 20:06:57 +0000
commit589c24cae68875c6953ce2778083b213f4072797 (patch)
tree1b22f05b2c0f04a510eb886dcc44e1876fc1918b /crawl-ref/source/fight.cc
parentf8d272fc179d973fb3d2601304830e516399f407 (diff)
downloadcrawl-ref-589c24cae68875c6953ce2778083b213f4072797.tar.gz
crawl-ref-589c24cae68875c6953ce2778083b213f4072797.zip
Fixed super-electric-golems.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1174 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index a756d29d6a..05cd73127c 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2760,8 +2760,10 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
case AF_ELEC:
special_damage =
- resist_adjust_damage(defender->res_elec(),
- atk->hit_dice + random2( 2 * atk->hit_dice ));
+ resist_adjust_damage(
+ defender->res_elec(),
+ atk->hit_dice + random2( atk->hit_dice / 2 ));
+
if (defender->levitates())
special_damage = special_damage * 2 / 3;
@@ -2770,6 +2772,10 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
attacker->name(DESC_CAP_THE).c_str(),
attacker->conj_verb("shock").c_str(),
defender->name(DESC_NOCAP_THE).c_str());
+
+#ifdef DEBUG_DIAGNOSTICS
+ mprf(MSGCH_DIAGNOSTICS, "Shock damage: %d", special_damage);
+#endif
break;
case AF_VAMPIRIC: