summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-02 19:51:50 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-02 19:51:50 +0000
commit4293d91bfd7e4b10b7cdee76dc7d5da7e5e3e001 (patch)
tree071c35be0b6d5541418b190765e47591ca0229b5 /crawl-ref/source/misc.cc
parent8030e3981a5ff0333ae659cbd08763c09ffdede0 (diff)
downloadcrawl-ref-4293d91bfd7e4b10b7cdee76dc7d5da7e5e3e001.tar.gz
crawl-ref-4293d91bfd7e4b10b7cdee76dc7d5da7e5e3e001.zip
Many code cleanups, mostly involving using stack_iterator and
radius_iterator instead of the previous setup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6347 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index c7ecf4b35f..132d82a60d 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -87,7 +87,7 @@
static void create_monster_hide(int mons_class)
{
- int o = get_item_slot( 100 + random2(200) );
+ int o = get_item_slot();
if (o == NON_ITEM)
return;
@@ -410,17 +410,15 @@ static void _potion_stack_changed_message(item_def &potion, int num_changed,
std::string msg;
if (potion.quantity == num_changed)
msg = "Your ";
+ else if (num_changed == 1)
+ msg = "One of your ";
+ else if (num_changed == 2)
+ msg = "Two of your ";
+ else if (num_changed >= (potion.quantity * 3) / 4)
+ msg = "Most of your ";
else
- {
- if (num_changed == 1)
- msg = "One of your ";
- else if (num_changed == 2)
- msg = "Two of your ";
- else if (num_changed >= (potion.quantity * 3) / 4)
- msg = "Most of your ";
- else
- msg = "Some of your ";
- }
+ msg = "Some of your ";
+
msg += potion.name(DESC_PLAIN, false);
if (coagulate)
@@ -694,7 +692,7 @@ bool maybe_coagulate_blood_potions_inv(item_def &blood)
// If we got here nothing was found!
// Create a new stack of potions.
- o = get_item_slot( 100 + random2(200) );
+ o = get_item_slot();
if (o == NON_ITEM)
return (false);