From 19cd3f60eb72fef46210d73fffeec8dd10769400 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 21 Apr 2008 12:15:40 +0000 Subject: 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 --- crawl-ref/source/itemprop.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 0412d78b7b..8ef02ed116 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -474,11 +474,15 @@ bool item_known_uncursed( const item_def &item ) return ((item.flags & ISFLAG_KNOW_CURSE) && !(item.flags & ISFLAG_CURSED)); } -void do_curse_item( item_def &item ) +void do_curse_item( item_def &item, bool quiet ) { + // already cursed? + if (item.flags & ISFLAG_CURSED) + return; + // 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) + if (item.x == -1 && item.y == -1) { int amusement = 64; @@ -496,6 +500,12 @@ void do_curse_item( item_def &item ) xom_is_stimulated(amusement); } + if (!quiet) + { + mprf("Your %s glows black for a moment.", + item.name(DESC_PLAIN).c_str()); + } + item.flags |= ISFLAG_CURSED; } @@ -558,8 +568,8 @@ void set_ident_flags( item_def &item, unsigned long flags ) request_autoinscribe(); } - if (notes_are_active() && !(item.flags & ISFLAG_NOTED_ID) && - fully_identified(item) && is_interesting_item(item)) + if (notes_are_active() && !(item.flags & ISFLAG_NOTED_ID) + && fully_identified(item) && is_interesting_item(item)) { // make a note of it take_note(Note(NOTE_ID_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(), -- cgit v1.2.3-54-g00ecf