summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index f678914f3d..bc1b0a4df0 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -139,6 +139,30 @@ static void create_monster_hide(int mons_class)
move_item_to_grid( &o, you.x_pos, you.y_pos );
}
+// Vampire draining corpses currently leaves them a time of 90, while the
+// default time is 200. I'm not sure whether this is for balancing reasons
+// or just an arbitrary difference. (jpeg)
+void turn_corpse_into_skeleton(item_def &corpse, int time)
+{
+ ASSERT(corpse.base_type == OBJ_CORPSES && corpse.sub_type == CORPSE_BODY);
+
+ // Some monsters' corpses lack the structure to leave skeletons behind.
+ if (!mons_skeleton( corpse.plus ))
+ return;
+
+ // While it is possible to distinguish draconian corpses by colour, their
+ // skeletons are indistinguishable.
+ if (mons_genus(corpse.plus) == MONS_DRACONIAN
+ && corpse.plus != MONS_DRACONIAN)
+ {
+ corpse.plus = MONS_DRACONIAN;
+ }
+
+ corpse.sub_type = CORPSE_SKELETON;
+ corpse.special = time;
+ corpse.colour = LIGHTGREY;
+}
+
void turn_corpse_into_chunks( item_def &item )
{
ASSERT( item.base_type == OBJ_CORPSES );