diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-19 11:48:04 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-19 11:48:04 +0000 |
commit | 6154ce26f08678558f0e59dc19506bd5af6eeb9c (patch) | |
tree | 885875dc55b187ccdd2af5ebce09d134a63036f8 /crawl-ref/source/misc.cc | |
parent | b652f0fadfb222d17c816c01a81e5ea27966e691 (diff) | |
download | crawl-ref-6154ce26f08678558f0e59dc19506bd5af6eeb9c.tar.gz crawl-ref-6154ce26f08678558f0e59dc19506bd5af6eeb9c.zip |
* Properly print (non-spoily) resists descriptions for ghosts/pandemonium
lords, using mons_class_resists (currently only poison) instead of
mons_resists().
* Add option note_xom_effects (defaults to true) that causes note-taking
for all Xom effects, hopefully spoiler free.
* Autoinscribe hides from unique monsters' corpses with the monster name,
as suggested on rgrm. Currently only applies to Snorg and Tiamat.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9652 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 72edbf9402..a40e3c5457 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -82,8 +82,10 @@ REVISION("$Rev$"); #include "view.h" #include "xom.h" -static void _create_monster_hide(int mons_class) +static void _create_monster_hide(const item_def corpse) { + int mons_class = corpse.plus; + int o = get_item_slot(); if (o == NON_ITEM) return; @@ -118,6 +120,10 @@ static void _create_monster_hide(int mons_class) break; } + int mtype = corpse.orig_monnum - 1; + if (!invalid_monster_class(mtype) && mons_is_unique(mtype)) + item.inscription = mons_type_name(mtype, DESC_PLAIN); + move_item_to_grid(&o, you.pos()); } @@ -163,7 +169,7 @@ void turn_corpse_into_chunks(item_def &item) // Happens after the corpse has been butchered. if (monster_descriptor(item.plus, MDSC_LEAVES_HIDE) && !one_chance_in(3)) - _create_monster_hide(item.plus); + _create_monster_hide(item); } void turn_corpse_into_skeleton_and_chunks(item_def &item) @@ -896,7 +902,7 @@ void turn_corpse_into_blood_potions(item_def &item) // Happens after the blood has been bottled. if (monster_descriptor(mons_class, MDSC_LEAVES_HIDE) && !one_chance_in(3)) - _create_monster_hide(mons_class); + _create_monster_hide(item); } void turn_corpse_into_skeleton_and_blood_potions(item_def &item) |