diff options
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 8 |
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); } |