From b331266740598d8513d337f61d1cd75d540a9534 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 6 Aug 2009 08:55:04 +0000 Subject: * 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 --- crawl-ref/source/mon-util.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/mon-util.cc') 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(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); } -- cgit v1.2.3-54-g00ecf