summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-06 08:55:04 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-06 08:55:04 +0000
commitb331266740598d8513d337f61d1cd75d540a9534 (patch)
treed8f5a6fc0c67b1ae451f92ca838998a194c4a4b1 /crawl-ref/source/mon-util.cc
parenteb331955f2f8adeea2b360cdad1c4dc73c009fad (diff)
downloadcrawl-ref-b331266740598d8513d337f61d1cd75d540a9534.tar.gz
crawl-ref-b331266740598d8513d337f61d1cd75d540a9534.zip
* Don't give the CHANNEL_HELL mutation to Demonspawns worshipping Trog.
* Check for mummy genus rather than species, in the can_drink_potion check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10492 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 8f70f23498..2478e7cf65 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -437,8 +437,6 @@ static int _scan_mon_inv_items(const monsters *mon,
static bool _mons_has_undrinkable_potion(const monsters *mon)
{
- bool ret = false;
-
if (mons_itemuse(mon) >= MONUSE_STARTING_EQUIPMENT)
{
const int potion = mon->inv[MSLOT_POTION];
@@ -449,11 +447,11 @@ static bool _mons_has_undrinkable_potion(const monsters *mon)
static_cast<potion_type>(mitm[potion].sub_type);
if (!mon->can_drink_potion(ptype))
- ret = true;
+ return (true);
}
}
- return (ret);
+ return (false);
}
int mons_unusable_items(const monsters *mon)
@@ -8152,7 +8150,7 @@ bool monsters::can_drink_potion(potion_type ptype) const
if (mons_itemuse(this) >= MONUSE_STARTING_EQUIPMENT)
{
if (mons_is_skeletal(type) || mons_is_insubstantial(type)
- || mons_species() == MONS_LICH || mons_species() == MONS_MUMMY)
+ || mons_species() == MONS_LICH || mons_genus(type) == MONS_MUMMY)
{
return (false);
}