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 +++----- crawl-ref/source/mutation.cc | 9 ++++++--- 2 files changed, 9 insertions(+), 8 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(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); } diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 5c006e94ee..da633db58b 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -2606,8 +2606,7 @@ std::string mutation_name(mutation_type mut, int level, bool colour) return (result); } -// Use an attribute counter for how many demonic mutations a demonspawn -// has. +// Use an attribute counter for how many demonic mutations a demonspawn has. void demonspawn() { mutation_type whichm = NUM_MUTATIONS; @@ -2710,7 +2709,11 @@ void demonspawn() howm = 1; } - if (you.religion != GOD_SIF_MUNA && one_chance_in(11)) + // Theoretically, you could use this with Trog (for rods and + // some misc. items), but in general it's going to be much more + // useful for someone capable of casting spells. + if (you.religion != GOD_TROG + && you.religion != GOD_SIF_MUNA && one_chance_in(11)) { whichm = MUT_CHANNEL_HELL; howm = 1; -- cgit v1.2.3-54-g00ecf