diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-15 17:28:34 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-15 17:28:34 +0000 |
commit | a0f8778f744f0a02ebf1d4739b74aa5bb8d1a690 (patch) | |
tree | 9543da6533f12822e238807655891472f1cea1cf /crawl-ref/source/mon-util.cc | |
parent | 60f0a9053b155127c5a9b3f9b14778091c4af142 (diff) | |
download | crawl-ref-a0f8778f744f0a02ebf1d4739b74aa5bb8d1a690.tar.gz crawl-ref-a0f8778f744f0a02ebf1d4739b74aa5bb8d1a690.zip |
Fixed demonspawn getting free protection from torment/draining (jarpiain).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6817 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index fa521232c7..ca88cd2bcb 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2472,7 +2472,12 @@ bool ms_waste_of_time( const monsters *mon, spell_type monspell ) // that'll mean monsters can just "know" the player is fully // life-protected if he has triple life protection. const mon_holy_type holiness = foe->holiness(); - return (holiness == MH_UNDEAD || holiness == MH_DEMONIC + return (holiness == MH_UNDEAD + // Demons, but not demonspawn - demonspawn will show + // up as demonic for purposes of things like holy + // wrath, but are still (usually) susceptible to + // torment and draining. + || (holiness == MH_DEMONIC && foe != &you) || holiness == MH_NONLIVING || holiness == MH_PLANT); } @@ -4359,7 +4364,7 @@ std::string monsters::hand_name(bool plural, bool *can_plural) const bool _can_plural; if (can_plural == NULL) can_plural = &_can_plural; - *can_plural = true; + *can_plural = true; std::string str; char ch = mons_char(type); @@ -4465,7 +4470,7 @@ std::string monsters::foot_name(bool plural, bool *can_plural) const bool _can_plural; if (can_plural == NULL) can_plural = &_can_plural; - *can_plural = true; + *can_plural = true; std::string str; char ch = mons_char(type); |