diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-21 12:15:40 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-21 12:15:40 +0000 |
commit | 19cd3f60eb72fef46210d73fffeec8dd10769400 (patch) | |
tree | be5020659e46412ed645680e18ac2f2885f2b8fe /crawl-ref/source/monstuff.cc | |
parent | aa3d47d0610ee14663c7920b166933c27bc453b3 (diff) | |
download | crawl-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/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 87edb41f96..f36788784a 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -205,7 +205,7 @@ int get_mimic_colour( const monsters *mimic ) } // monster curses a random player inventory item: -bool curse_an_item( bool decay_potions ) +bool curse_an_item( bool decay_potions, bool quiet ) { int count = 0; int item = ENDOFPACK; @@ -241,36 +241,28 @@ bool curse_an_item( bool decay_potions ) return (false); // curse item: + if (decay_potions && !quiet) // just for mummies + mpr("You feel nervous for a moment...", MSGCH_MONSTER_SPELL); - /* problem: changes large piles of potions */ /* don't change you.inv_special (just for fun) */ if (you.inv[item].base_type == OBJ_POTIONS) { - // Potions of blood are vital to vampires, so make an exception for - // for them. (Come to think of it, this would work nicely for all - // other potion types as well.) - if (you.inv[item].sub_type == POT_BLOOD - || you.inv[item].sub_type == POT_BLOOD_COAGULATED) - { - int amount = random2(you.inv[item].quantity) + 1; - split_blood_potions_into_decay(item, amount); - - // Xom is amused if this happens to thirsty vampires - if (you.species == SP_VAMPIRE && you.hunger_state <= HS_HUNGRY) - xom_is_stimulated(32 * amount); - } + int amount; + // decay at least two of the stack + if (you.inv[item].quantity <= 2) + amount = you.inv[item].quantity; else - { - // Xom is amused by useful potions being ruined. - if (item_value(you.inv[item], true) / you.inv[item].quantity > 2) - xom_is_stimulated(32 * you.inv[item].quantity); + amount = 2 + random2(you.inv[item].quantity - 1); - you.inv[item].sub_type = POT_DECAY; - unset_ident_flags( you.inv[item], ISFLAG_IDENT_MASK ); // all different - } + split_potions_into_decay(item, amount); + + if (item_value(you.inv[item], true) / amount > 2) + xom_is_stimulated(32 * amount); } else - do_curse_item( you.inv[item] ); + { + do_curse_item( you.inv[item], false ); + } return (true); } @@ -1159,10 +1151,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent) if (monster->type == MONS_MUMMY) { if (YOU_KILL(killer) && killer != KILL_YOU_CONF) - { - if (curse_an_item(true)) - mpr("You feel nervous for a moment...", MSGCH_MONSTER_SPELL); - } + curse_an_item(true); } else if (monster->type == MONS_GUARDIAN_MUMMY || monster->type == MONS_GREATER_MUMMY |