summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 19:37:35 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-03 19:37:35 +0000
commitc5e23e5f34cef7260911c2b82ebb5708e5a5f9b2 (patch)
tree073c09f1bb79ec8bc66b02fa1017d9bff7d4041f /crawl-ref
parentf965ee9d68e6b4d674897117f1711b1d439b3689 (diff)
downloadcrawl-ref-c5e23e5f34cef7260911c2b82ebb5708e5a5f9b2.tar.gz
crawl-ref-c5e23e5f34cef7260911c2b82ebb5708e5a5f9b2.zip
Add one more skeleton change: Allow vampires' bottling blood from
corpses to leave skeletons 25% of the time, as butchering them does. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8176 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/delay.cc5
-rw-r--r--crawl-ref/source/misc.cc16
-rw-r--r--crawl-ref/source/misc.h3
3 files changed, 22 insertions, 2 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 67dd35a979..e04b3c7762 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1178,7 +1178,10 @@ static void _finish_delay(const delay_queue_item &delay)
item_def &corpse = mitm[delay.parm1];
- turn_corpse_into_blood_potions(corpse);
+ if (mons_skeleton(corpse.plus) && one_chance_in(4))
+ turn_corpse_into_skeleton_and_blood_potions(corpse);
+ else
+ turn_corpse_into_blood_potions(corpse);
}
else
{
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 303fef5864..74c8a87898 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -969,6 +969,22 @@ void turn_corpse_into_blood_potions(item_def &item)
_create_monster_hide(mons_class);
}
+void turn_corpse_into_skeleton_and_blood_potions(item_def &item)
+{
+ 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_blood_potions(item);
+}
+
// A variation of the mummy curse:
// Instead of trashing the entire stack, split the stack and only turn part
// of it into POT_DECAY.
diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h
index 4f2a5ffddc..9eb46eaf11 100644
--- a/crawl-ref/source/misc.h
+++ b/crawl-ref/source/misc.h
@@ -39,7 +39,8 @@ void pick_up_blood_potions_stack( item_def &stack, int quant );
bool can_bottle_blood_from_corpse( int mons_type );
int num_blood_potions_from_corpse( int mons_class, int chunk_type = -1 );
-void turn_corpse_into_blood_potions ( item_def &item );
+void turn_corpse_into_blood_potions (item_def &item);
+void turn_corpse_into_skeleton_and_blood_potions(item_def &item);
void split_potions_into_decay( int obj, int amount, bool need_msg = true );
bool victim_can_bleed(int montype);