summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-14 15:04:48 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-14 15:04:48 +0000
commit26d250351778496b0bf2975ffc0c250b33b4dbd4 (patch)
treefe46665f8934f131937cf7b3447c5120bb34d3b5 /crawl-ref/source/spells3.cc
parent5f0047a46771cbb691ed76feb3a66d8bbbaf674d (diff)
downloadcrawl-ref-26d250351778496b0bf2975ffc0c250b33b4dbd4.tar.gz
crawl-ref-26d250351778496b0bf2975ffc0c250b33b4dbd4.zip
Fixing bugs:
- butterflies stay confused, even when reentering levels (Bug 1793061) - Hunters with Bow/Crossbow don't get Shields skill (FR 1762819), it sends the wrong message - abominations count as undead regardless of colour, at least the ones created via Twisted Resurrection (Bug 1784326) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2087 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc32
1 files changed, 20 insertions, 12 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 00d882177a..6197e8235a 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -909,6 +909,21 @@ 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
@@ -949,20 +964,13 @@ bool recall(char type_recalled)
if (!monster_habitable_grid(monster, DNGN_FLOOR))
continue;
- if (type_recalled == 1)
+ if (type_recalled == 1) // undead
{
- /* abomin created by twisted res, although it gets others too */
- if ( !((monster->type == MONS_ABOMINATION_SMALL
- || monster->type == MONS_ABOMINATION_LARGE)
- && (monster->colour == BROWN
- || monster->colour == RED
- || monster->colour == LIGHTRED)) )
+ if (monster->type != MONS_REAPER
+ && mons_holiness(monster) != MH_UNDEAD
+ && !mons_your_abomination(monster))
{
- if (monster->type != MONS_REAPER
- && mons_holiness(monster) != MH_UNDEAD)
- {
- continue;
- }
+ continue;
}
}
else if (type_recalled == 2) // Beogh