summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-06 02:03:17 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-06 02:03:17 +0000
commit967e9e7bb84c639c1e5065c6a65a05972dbc88c5 (patch)
treef5c6684f92e9d3b97b1761eab1818e6138b9ecb3 /crawl-ref/source/spells2.cc
parent97aa9cdb2a971d66113b6b246ad56cc046be04e1 (diff)
downloadcrawl-ref-967e9e7bb84c639c1e5065c6a65a05972dbc88c5.tar.gz
crawl-ref-967e9e7bb84c639c1e5065c6a65a05972dbc88c5.zip
Add more minor cosmetic fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7147 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 35f0257eee..d14b52057c 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -715,7 +715,7 @@ void drain_life(int pow)
// Incoming power to this function is skill in INVOCATIONS, so
// we'll add an assert here to warn anyone who tries to use
// this function with spell level power.
- ASSERT( pow <= 27 );
+ ASSERT(pow <= 27);
show_green = DARKGREY;
viewwindow(true, false);
@@ -747,6 +747,7 @@ void drain_life(int pow)
hp_gain += hurted;
monster->hurt(&you, hurted);
+
if (monster->alive())
print_wounds(monster);
}
@@ -754,13 +755,12 @@ void drain_life(int pow)
hp_gain /= 2;
- if (hp_gain > pow * 2)
- hp_gain = pow * 2;
+ hp_gain = std::min(pow * 2, hp_gain);
if (hp_gain)
{
- mpr( "You feel life flooding into your body." );
- inc_hp( hp_gain, false );
+ mpr("You feel life flooding into your body.");
+ inc_hp(hp_gain, false);
}
}