summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-28 22:29:06 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-28 22:29:06 +1000
commita7280a4d1b2470ff6f78f82b5afb2d3b6dfccd09 (patch)
treeff9a95f5bfeb98c3ce192fe1901283306496ec4d /crawl-ref/source/files.cc
parent97870b61701d19f36ae6da5b88595f207cb5c173 (diff)
downloadcrawl-ref-a7280a4d1b2470ff6f78f82b5afb2d3b6dfccd09.tar.gz
crawl-ref-a7280a4d1b2470ff6f78f82b5afb2d3b6dfccd09.zip
Make death effects unaffected by polymorph.
Polymorphing either Pikel, Kirke or Duvessa/Dowan rendered their death effects useless, as it checked monster->type and not the original monster (ie, monster->mname). Instead of checking monster->mname, though, store the name in monster->props, to stop sorear complaining.
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index da1444d2a9..79bb2488e9 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1082,11 +1082,21 @@ static void _grab_followers()
if (fmenv == NULL)
continue;
- if (fmenv->type == MONS_DUVESSA && fmenv->alive())
+ if ((fmenv->type == MONS_DUVESSA
+ || (fmenv->props.exists("original_name")
+ && fmenv->props["original_name"].get_string() == "Duvessa"))
+ && fmenv->alive())
+ {
duvessa = fmenv;
+ }
- if (fmenv->type == MONS_DOWAN && fmenv->alive())
+ if ((fmenv->type == MONS_DOWAN
+ || (fmenv->props.exists("original_name")
+ && fmenv->props["original_name"].get_string() == "Dowan"))
+ && fmenv->alive())
+ {
dowan = fmenv;
+ }
if (fmenv->wont_attack() && !mons_can_use_stairs(fmenv))
non_stair_using_allies++;