summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-chimera.cc
diff options
context:
space:
mode:
authorPete Hurst <pete@streamuniverse.tv>2013-06-23 21:02:48 +0100
committerPete Hurst <pete@streamuniverse.tv>2013-06-23 21:04:24 +0100
commita98cfa39ac268626ec04385ae94fa05f6c72078e (patch)
tree44123348edd0e7c0037d90bbd7057bceeb03c342 /crawl-ref/source/mon-chimera.cc
parent70a65ab34f31b0ff3323698f8d5489b781355f73 (diff)
downloadcrawl-ref-a98cfa39ac268626ec04385ae94fa05f6c72078e.tar.gz
crawl-ref-a98cfa39ac268626ec04385ae94fa05f6c72078e.zip
Let all chimera properly use spells
The MF_SPELLCASTER flag wasn't getting set for subsequent parts, so no matter what book they had they weren't using it (unless the first monster happened to be a spellcaster).
Diffstat (limited to 'crawl-ref/source/mon-chimera.cc')
-rw-r--r--crawl-ref/source/mon-chimera.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-chimera.cc b/crawl-ref/source/mon-chimera.cc
index 6165e8825b..35aba3601f 100644
--- a/crawl-ref/source/mon-chimera.cc
+++ b/crawl-ref/source/mon-chimera.cc
@@ -150,6 +150,13 @@ static void apply_chimera_part(monster* mon, monster_type part, int partnum)
if (partnum == 1)
return;
+ // Make sure resulting chimera can use spells
+ // TODO: Spell usage might still be a bit of a mess, especially with
+ // things like human/animal hybrids. Could perhaps do with some kind
+ // of ghost demon structure to manage and track everything better.
+ if (dummy.can_use_spells())
+ mon->flags |= MF_SPELLCASTER;
+
// XXX: It'd be nice to flood fill all available spell slots with spells
// from parts 2 and 3. But since this would conflict with special
// slots (emergency, enchantment, etc.) some juggling is needed, until