From 151e03aa3be3015e394dba00cc16e8024031c87f Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 1 Jan 2009 23:20:18 +0000 Subject: Add various long-standing skeleton changes, to compensate for their stairs-related weakness: * For consistency, skeletons created by vampire draining now have the normal duration of 200, instead of 90. To compensate for this, they are left 25% of the time imstead of 75%. * Skeletons can now be left after butchering corpses, with the same chance of 25%, so that vampires don't have an exclusive advantage. * Monsters that eat corpses (and effectively butcher them) can leave skeletons from doing so, with the same chance of 25%. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8095 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 9175c51df5..9ca1a1994b 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -132,10 +132,7 @@ static void _create_monster_hide(int mons_class) move_item_to_grid(&o, you.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 &item, int time) +void turn_corpse_into_skeleton(item_def &item) { ASSERT(item.base_type == OBJ_CORPSES && item.sub_type == CORPSE_BODY); @@ -153,7 +150,7 @@ void turn_corpse_into_skeleton(item_def &item, int time) item.plus = MONS_RAT; item.sub_type = CORPSE_SKELETON; - item.special = time; + item.special = 200; item.colour = LIGHTGREY; } @@ -180,6 +177,24 @@ void turn_corpse_into_chunks(item_def &item) _create_monster_hide(item.plus); } +void turn_corpse_into_skeleton_and_chunks(item_def &item) +{ + ASSERT(item.base_type == OBJ_CORPSES && item.sub_type == CORPSE_BODY); + + if (mons_skeleton(item.plus)) + { + int o = get_item_slot(); + if (o != NON_ITEM) + { + item_def &skel = item; + turn_corpse_into_skeleton(skel); + copy_item_to_grid(skel, you.pos()); + } + } + + turn_corpse_into_chunks(item); +} + // Initialize blood potions with a vector of timers. void init_stack_blood_potions(item_def &stack, int age) { -- cgit v1.2.3-54-g00ecf