summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-02 20:30:19 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:20 -0600
commitba5a6485e52823b2a6082f18ee3487e280ad51a2 (patch)
tree4ba350aade6e83ff01f5400b6dba094977b47eaa /crawl-ref/source/misc.cc
parentb9ac4c953e9d5fae3bc23dde3f999218d396f804 (diff)
downloadcrawl-ref-ba5a6485e52823b2a6082f18ee3487e280ad51a2.tar.gz
crawl-ref-ba5a6485e52823b2a6082f18ee3487e280ad51a2.zip
Gozag wrath: the Curse of Gozag.
Trying to pick up a consumable while under Gozag penance occasionally turns the consumable to a small amount of gold - more likely with higher value items.
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index c699a37d89..227716182d 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -493,18 +493,18 @@ void maybe_coagulate_blood_potions_floor(int obj)
_compare_blood_quantity(blood, timer.size());
}
-static string _get_desc_quantity(const int quant, const int total)
+string get_desc_quantity(const int quant, const int total, string whose)
{
if (total == quant)
- return "Your";
+ return uppercase_first(whose);
else if (quant == 1)
- return "One of your";
+ return "One of " + whose;
else if (quant == 2)
- return "Two of your";
+ return "Two of " + whose;
else if (quant >= total * 3 / 4)
- return "Most of your";
+ return "Most of " + whose;
else
- return "Some of your";
+ return "Some of " + whose;
}
// Prints messages for blood potions coagulating or rotting in inventory.
@@ -515,7 +515,7 @@ static void _potion_stack_changed_message(item_def &potion, int num_changed,
verb = replace_all(verb, "%s", num_changed == 1 ? "s" : "");
mprf(MSGCH_ROTTEN_MEAT, "%s %s %s.",
- _get_desc_quantity(num_changed, potion.quantity).c_str(),
+ get_desc_quantity(num_changed, potion.quantity).c_str(),
potion.name(DESC_PLAIN, false).c_str(),
verb.c_str());
}