summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-30 05:56:13 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-30 05:56:13 +0000
commitfc944616f69e347423c408a9d3e3efee9140a46d (patch)
tree342a77d3a517969c7ac57c6d6bc0408dc07422c3 /crawl-ref/source/item_use.cc
parentcc20c6d673722c6dd4ca32290d9cc66e55597f3c (diff)
downloadcrawl-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/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc30
1 files changed, 24 insertions, 6 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 212e2ea00e..18d4c1ffe5 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -61,6 +61,7 @@
#include "player.h"
#include "randart.h"
#include "religion.h"
+#include "shopping.h"
#include "skills.h"
#include "skills2.h"
#include "spells1.h"
@@ -74,6 +75,7 @@
#include "transfor.h"
#include "tutorial.h"
#include "view.h"
+#include "xom.h"
static bool drink_fountain();
static bool enchant_armour();
@@ -401,6 +403,8 @@ void wield_effects(int item_wield_2, bool showMsgs)
{
unsigned char i_dam = 0;
+ const bool known_cursed = item_known_cursed(you.inv[item_wield_2]);
+
// and here we finally get to the special effects of wielding {dlb}
if (you.inv[item_wield_2].base_type == OBJ_MISCELLANY)
{
@@ -593,7 +597,11 @@ void wield_effects(int item_wield_2, bool showMsgs)
break;
case SPWPN_DISTORTION:
- miscast_effect( SPTYP_TRANSLOCATION, 9, 90, 100, "a distortion effect" );
+ if (!was_known)
+ xom_is_stimulated(128);
+ miscast_effect( SPTYP_TRANSLOCATION, 9, 90, 100,
+ was_known ? "distortion wield" :
+ "uknowning distortion wield");
break;
case SPWPN_SINGING_SWORD:
@@ -645,7 +653,10 @@ void wield_effects(int item_wield_2, bool showMsgs)
if (item_cursed( you.inv[item_wield_2] ))
{
mpr("It sticks to your hand!");
- xom_is_stimulated(64);
+ if (known_cursed)
+ xom_is_stimulated(32);
+ else
+ xom_is_stimulated(64);
}
}
@@ -2279,8 +2290,11 @@ void jewellery_wear_effects(item_def &item)
// Randart jewellery shouldn't auto-ID just because the
// base type is known. Somehow the player should still
// be told, preferably by message. (jpeg)
- const bool artefact = is_random_artefact( item );
- const bool identified = fully_identified( item );
+ const bool artefact = is_random_artefact( item );
+ const bool identified = fully_identified( item );
+ const bool known_cursed = item_known_cursed( item );
+ const bool known_bad = item_type_known( item )
+ && (item_value( item ) <= 2);
switch (item.sub_type)
{
@@ -2406,7 +2420,11 @@ void jewellery_wear_effects(item_def &item)
mprf("Oops, that %s feels deathly cold.",
jewellery_is_amulet(item)? "amulet" : "ring");
learned_something_new(TUT_YOU_CURSED);
- xom_is_stimulated(128);
+
+ if (known_cursed || known_bad)
+ xom_is_stimulated(64);
+ else
+ xom_is_stimulated(128);
}
// cursed or not, we know that since we've put the ring on
@@ -3268,7 +3286,7 @@ static bool affix_weapon_enchantment()
// from unwield_item
miscast_effect( SPTYP_TRANSLOCATION, 9, 90, 100,
- "a distortion effect" );
+ "distortion affixation" );
success = false;
break;