From 2072d2654f4f2dc65110a8b3f221ab731bea2f28 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 14 Sep 2007 15:32:03 +0000 Subject: 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 --- crawl-ref/source/mon-util.cc | 18 ++++++++++++++++++ crawl-ref/source/spells3.cc | 18 +----------------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source') 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; } -- cgit v1.2.3-54-g00ecf