diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-01 23:20:18 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-01 23:20:18 +0000 |
commit | 151e03aa3be3015e394dba00cc16e8024031c87f (patch) | |
tree | 4e3febf2b67c54ef87b348cbb0ba17e0be1db079 /crawl-ref/source/misc.cc | |
parent | 9bd7a3af19172474a95751224c4bb2f5e7e31ac3 (diff) | |
download | crawl-ref-151e03aa3be3015e394dba00cc16e8024031c87f.tar.gz crawl-ref-151e03aa3be3015e394dba00cc16e8024031c87f.zip |
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
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 25 |
1 files changed, 20 insertions, 5 deletions
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) { |