summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-place.h
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2010-09-29 21:57:15 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2010-09-29 21:57:15 -0500
commit820b7ca5be58857ff70ca77f1151d23632930b9c (patch)
treed29fdbfdcce8cee9b7b01a8e053109c0a7458ad2 /crawl-ref/source/mon-place.h
parentfac0a13230b303f70d5c2379eb845768a093ea6b (diff)
downloadcrawl-ref-820b7ca5be58857ff70ca77f1151d23632930b9c.tar.gz
crawl-ref-820b7ca5be58857ff70ca77f1151d23632930b9c.zip
Make zombified monsters retain their stats (at least HD and HP).
define_zombie() is no longer static, and is now used when creating all zombified monsters. This removes redundancy and inconsistency with regard to monster flag setting (e.g. the dual-wielding flag no longer needs to be set in multiple places, and zombified krakens created with Animate Dead now retain their spellcasting flag and, hence, their tentacles "spell"). This also fixes inconsistencies with regard to stats, as undead created with define_zombie() are made by creating the original monster and applying zombie downgrades. Now that other places in the code use it, they no longer create the zombified type and apply zombie downgrades to it. The stat retention is accomplished by adding a flag to define_zombie() to make it use the original monster type. One potentially controversial bit: this flag also makes define_zombie() use the original type as the base type (except for uniques, to avoid things like "Nergalle the spectral Nergalle"). The flag is used for all spells and abilities that create undead*, but not in the code to place them randomly (in e.g. the Crypt) or from card effects. This may be an issue, as players or monsters can now raise "orc warrior zombies" from orc corpses that were orc warriors in life, but since orc warrior zombies are now stronger than plain orc zombies, there should be an easy way to tell the difference. The Summon Spectral Orcs spell did this before anyway. Issues: The monster's original HD is not preserved yet; the monster class' original HD is always used. Also, I don't know at the moment if the base damage is preserved. * Animate Dead (spell and Yred power), Simulacrum, Death Channel, Enslave Soul, Summon Spectral Orcs (Nergalle spell)
Diffstat (limited to 'crawl-ref/source/mon-place.h')
-rw-r--r--crawl-ref/source/mon-place.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-place.h b/crawl-ref/source/mon-place.h
index 04236b0cf7..a765cf2ebe 100644
--- a/crawl-ref/source/mon-place.h
+++ b/crawl-ref/source/mon-place.h
@@ -51,6 +51,9 @@ monster_type pick_local_zombifiable_monster(int power,
monster_type cs = MONS_NO_MONSTER,
const coord_def& pos = coord_def());
+void define_zombie(monster* mon, monster_type ztype, monster_type cs,
+ bool force_ztype = false);
+
// Converts a monster_type involving RANDOM_MONSTER and similar into an
// explicit monster type usable on the current level.
monster_type resolve_monster_type(monster_type mon_type,