summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-21 12:15:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-21 12:15:40 +0000
commit19cd3f60eb72fef46210d73fffeec8dd10769400 (patch)
treebe5020659e46412ed645680e18ac2f2885f2b8fe /crawl-ref/source/item_use.cc
parentaa3d47d0610ee14663c7920b166933c27bc453b3 (diff)
downloadcrawl-ref-19cd3f60eb72fef46210d73fffeec8dd10769400.tar.gz
crawl-ref-19cd3f60eb72fef46210d73fffeec8dd10769400.zip
Change mummy curses to only turn part of a stack of potions into decay.
Instead, the amount is 2 + random2(quantity - 1), so ranging anywhere from 2 to the entire stack. Yes, I know this is probably highly controversial, but I've thought about it some, and I think that this will actually change little for most characters: You still won't take large stacks of valuable potions into the Tomb since even if only part of the stack is destroyed it's a huge loss. On the other hand, this is easier on newbies who had no idea this could happen, and makes it a bit more harder for Transmuters to turn their twenty-something potions of water into decay. I also added a message ("Your potions of xyz decay.") if you know the decay type. Otherwise the message is suppressed, so as to replicate the current situation of "Hey, what's this? When did I pick up those? (q)uaff..." For consistency, I also added a message when stuff is cursed, or rather I merged all those "Your foo glows black" messages into do_curse_stuff() that now takes a parameter "quiet" to control whether it's printed ot not. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4438 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc24
1 files changed, 5 insertions, 19 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 30e78b8467..72d21f072b 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -706,12 +706,7 @@ void wield_effects(int item_wield_2, bool showMsgs)
case SPWPN_SCYTHE_OF_CURSES:
you.special_wield = SPWLD_CURSE;
if (!item_cursed(item) && one_chance_in(5))
- {
- mprf("%s glows black for a moment.",
- item.name(DESC_CAP_YOUR).c_str());
-
- do_curse_item( item );
- }
+ do_curse_item( item, false );
break;
case SPWPN_MACE_OF_VARIABILITY:
@@ -1770,6 +1765,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
item.quantity = 1;
item.slot = index_to_letter(item.link);
origin_set_unknown(item);
+
if (item.base_type == OBJ_POTIONS
&& (item.sub_type == POT_BLOOD
|| item.sub_type == POT_BLOOD_COAGULATED)
@@ -4271,10 +4267,7 @@ void read_scroll( int slot )
}
else
{
- mprf("%s glows black for a moment.",
- you.inv[nthing].name(DESC_CAP_YOUR).c_str());
-
- do_curse_item( you.inv[nthing] );
+ do_curse_item( you.inv[nthing], false );
you.wield_change = true;
}
break;
@@ -4392,11 +4385,7 @@ void read_scroll( int slot )
else
{
// make the name before we curse it
- item_def& item = you.inv[you.equip[affected]];
- mprf("%s glows black for a moment.",
- item.name(DESC_CAP_YOUR).c_str());
-
- do_curse_item( item );
+ do_curse_item( you.inv[you.equip[affected]], false );
}
break;
@@ -4566,10 +4555,7 @@ void use_randart(item_def &item)
if ( !item_cursed(item) && proprt[RAP_CURSED] > 0
&& one_chance_in(proprt[RAP_CURSED]) )
{
- mprf("%s glows black for a moment.",
- item.name(DESC_CAP_YOUR).c_str());
-
- do_curse_item( item );
+ do_curse_item( item, false );
randart_wpn_learn_prop(item, RAP_CURSED);
}