diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-04 14:44:13 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-04 14:44:13 +0000 |
commit | 4d0b7c461fd459e01cab475eb6b01ab5ea9d4689 (patch) | |
tree | 3750b8574e0cba9afe96292cf622c385a30ce62e /crawl-ref/source/ouch.cc | |
parent | da0c3f0c317cfb21e88aecbbb90388cc6d087cfe (diff) | |
download | crawl-ref-4d0b7c461fd459e01cab475eb6b01ab5ea9d4689.tar.gz crawl-ref-4d0b7c461fd459e01cab475eb6b01ab5ea9d4689.zip |
Redid monster death idiom so that monsters::hurt can implicitly
call monster_die(). (This behaviour can be overriden.)
Minor code cleanups elsewhere, removal of dead code from bolt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7123 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 120b0f316f..6fb5819f63 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -804,11 +804,9 @@ static void _yred_mirrors_injury(int dam, int death_source) flash_monster_colour(mon, RED, 200); #endif - hurt_monster(mon, dam); + mon->hurt(&you, dam); - if (mon->hit_points < 1) - monster_die(mon, KILL_YOU, NON_MONSTER); - else + if (mon->alive()) print_wounds(mon); lose_piety(integer_sqrt(dam)); |