diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-14 15:32:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-14 15:32:03 +0000 |
commit | 2072d2654f4f2dc65110a8b3f221ab731bea2f28 (patch) | |
tree | b9eb5fe9bfdfce70a9ae1d3eabc8a19c22030a79 /crawl-ref/source | |
parent | 26d250351778496b0bf2975ffc0c250b33b4dbd4 (diff) | |
download | crawl-ref-2072d2654f4f2dc65110a8b3f221ab731bea2f28.tar.gz crawl-ref-2072d2654f4f2dc65110a8b3f221ab731bea2f28.zip |
Whoops, overlooked something with abominations.
Moving the check directly into mons_holiness, so now it
should work for all cases.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2088 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/spells3.cc | 18 |
2 files changed, 19 insertions, 17 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 524371a243..1eb2369780 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -323,8 +323,26 @@ static int scan_mon_inv_randarts( const monsters *mon, int ra_prop ) return (ret); } +// Returns true if a given monster is an abomination +// created by Twisted Resurrection +static bool mons_your_abomination(const monsters *mon) +{ + if ( mon->type != MONS_ABOMINATION_SMALL + && mon->type != MONS_ABOMINATION_LARGE ) + { + return (false); + } + + // Reusing the colour scheme - hacky! (jpeg) + return (mon->number == BROWN || mon->number == RED + || mon->number == LIGHTRED); +} + mon_holy_type mons_holiness(const monsters *mon) { + if (mons_your_abomination(mon)) + return (MH_UNDEAD); + return (mons_class_holiness(mon->type)); } diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 6197e8235a..326823f743 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -909,21 +909,6 @@ bool project_noise(void) return (success); } // end project_noise() -// Returns true if a given monster is an abomination -// created by Twisted Resurrection -static bool mons_your_abomination(const monsters *mon) -{ - if ( mon->type != MONS_ABOMINATION_SMALL - && mon->type != MONS_ABOMINATION_LARGE ) - { - return (false); - } - - // Reusing the colour scheme - hacky! (jpeg) - return (mon->number == BROWN || mon->number == RED - || mon->number == LIGHTRED); -} - /* Type recalled: 0 = anything @@ -967,8 +952,7 @@ bool recall(char type_recalled) if (type_recalled == 1) // undead { if (monster->type != MONS_REAPER - && mons_holiness(monster) != MH_UNDEAD - && !mons_your_abomination(monster)) + && mons_holiness(monster) != MH_UNDEAD) { continue; } |