summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-04 14:44:13 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-04 14:44:13 +0000
commit4d0b7c461fd459e01cab475eb6b01ab5ea9d4689 (patch)
tree3750b8574e0cba9afe96292cf622c385a30ce62e /crawl-ref/source/spells3.cc
parentda0c3f0c317cfb21e88aecbbb90388cc6d087cfe (diff)
downloadcrawl-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/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 9cb7ac7434..a968f7de85 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -221,11 +221,8 @@ int cast_smiting(int power, dist &beam)
// Maxes out at around 40 damage at 27 Invocations, which is
// plenty in my book (the old max damage was around 70,
// which seems excessive).
- hurt_monster(monster, 7 + (random2(power) * 33 / 191));
-
- if (monster->hit_points < 1)
- monster_die(monster, KILL_YOU, NON_MONSTER);
- else
+ monster->hurt(&you, 7 + (random2(power) * 33 / 191));
+ if (monster->alive())
print_wounds(monster);
}
}
@@ -278,11 +275,8 @@ int airstrike(int power, dist &beam)
if (hurted < 0)
hurted = 0;
- hurt_monster(monster, hurted);
-
- if (monster->hit_points < 1)
- monster_die(monster, KILL_YOU, NON_MONSTER);
- else
+ monster->hurt(&you, hurted);
+ if (monster->alive())
print_wounds(monster);
}
}