From 4293d91bfd7e4b10b7cdee76dc7d5da7e5e3e001 Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 2 Jul 2008 19:51:50 +0000 Subject: 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 --- crawl-ref/source/misc.cc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source/misc.cc') 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); -- cgit v1.2.3-54-g00ecf