diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-30 05:56:13 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-30 05:56:13 +0000 |
commit | fc944616f69e347423c408a9d3e3efee9140a46d (patch) | |
tree | 342a77d3a517969c7ac57c6d6bc0408dc07422c3 /crawl-ref/source/itemprop.cc | |
parent | cc20c6d673722c6dd4ca32290d9cc66e55597f3c (diff) | |
download | crawl-ref-fc944616f69e347423c408a9d3e3efee9140a46d.tar.gz crawl-ref-fc944616f69e347423c408a9d3e3efee9140a46d.zip |
This commit breaks save file compatability.
Lots of new things that amuse/stimulate Xom, and a few things which
don't amuse him as much anymore. Among the new things is a corpse
turning into a skeleton while butchering it; if this is too harsh to
do just for Xom's amusement (previously turning into a skeleton while
butchering was an ignored case and still produced chunks of flesh) it
can be changed back. Also, if a Xom worshiper draws the Blank card,
Xom makes it act like a Xom card, since a plain old Blank card is boring.
Keep track of which branch the Orb is in, if the player isn't carrying
it.
Keep track of how/why the player ended up in a particular level type
(Abyss, Pan, etc).
Changed most "a distortion effect" cause strings for distortion caused
tranlsocation miscast effects to something more specific.
Added new wizard commands 'C' to curse or uncruse an item, and 'Ctrl-A'
to re-generate the Abyss.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2256 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index cd77235da0..1ed8f1cc52 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -37,6 +37,7 @@ #include "stuff.h" #include "transfor.h" #include "view.h" +#include "xom.h" // XXX: name strings in most of the following are currently unused! @@ -445,6 +446,26 @@ bool item_known_uncursed( const item_def &item ) void do_curse_item( item_def &item ) { + // Xom is amused by the player's items being cursed, especially + // if they're worn/equipped. + if (!(item.flags & ISFLAG_CURSED) && item.x == -1 && item.y == -1) + { + int amusement = 64; + + if (item_is_equipped(item)) + { + amusement *= 2; + + // Cursed cloaks prevent you from removing body armour + if (item.base_type == OBJ_ARMOUR + && get_armour_slot(item) == EQ_CLOAK) + { + amusement *= 2; + } + } + xom_is_stimulated(amusement); + } + item.flags |= ISFLAG_CURSED; } |