summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-30 14:31:12 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-30 14:31:12 +0100
commitd8190f4c633d2c4065e92c61894f85f506d5246a (patch)
tree887402a9869486e5a23386bc41dec9fae1987d39 /crawl-ref/source/mon-util.cc
parent1d0cbf5f8be4dcb3d78167d3a1f29691779298f8 (diff)
parent30ad58ea18d6e4e2132d235e60f66f11131e17dc (diff)
downloadcrawl-ref-d8190f4c633d2c4065e92c61894f85f506d5246a.tar.gz
crawl-ref-d8190f4c633d2c4065e92c61894f85f506d5246a.zip
Merge branch 'master' into iood
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 4d861d9de0..82dce8d5a0 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -927,6 +927,11 @@ bool mons_is_zombified(const monsters *mon)
return (mons_class_is_zombified(mon->type));
}
+monster_type mons_base_type(const monsters *mon)
+{
+ return mons_is_zombified(mon) ? mon->base_monster : mon->type;
+}
+
bool mons_class_can_be_zombified(int mc)
{
int ms = mons_species(mc);
@@ -2396,6 +2401,13 @@ bool ms_waste_of_time( const monsters *mon, spell_type monspell )
// handled here as well. - bwr
switch (monspell)
{
+ case SPELL_CALL_TIDE:
+ return (!player_in_branch(BRANCH_SHOALS)
+ || mon->has_ench(ENCH_TIDE)
+ || !foe
+ || (grd(mon->pos()) == DNGN_DEEP_WATER
+ && grd(foe->pos()) == DNGN_DEEP_WATER));
+
case SPELL_BRAIN_FEED:
ret = (foe != &you);
break;