summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-18 20:58:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-18 20:58:14 +0000
commite1879031547aa6861a565563724d7308d02cc2f2 (patch)
treef8a3723661ec4f2b90a016865a1a398de882939d /crawl-ref/source/shopping.cc
parentc229c0161fb07fd421e4c818821f27e34a56f9d2 (diff)
downloadcrawl-ref-e1879031547aa6861a565563724d7308d02cc2f2.tar.gz
crawl-ref-e1879031547aa6861a565563724d7308d02cc2f2.zip
Fix shopping messages mentioning "0 gold piece", and fix reading
unidentified scrolls of immolation counting as attacking friends. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9793 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r--crawl-ref/source/shopping.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index aaa31a7b80..a93f00eacb 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -291,30 +291,30 @@ static bool _in_a_shop( int shopidx )
if (!total_cost)
{
- snprintf( info, INFO_SIZE, "You have %d gold piece%s.", you.gold,
- you.gold > 1 ? "s" : "" );
+ snprintf(info, INFO_SIZE, "You have %d gold piece%s.", you.gold,
+ you.gold != 1 ? "s" : "");
textcolor(YELLOW);
}
else if (total_cost > you.gold)
{
- snprintf( info, INFO_SIZE, "You now have %d gold piece%s. "
- "You are short %d gold piece%s for the purchase.",
- you.gold,
- you.gold > 1 ? "s" : "",
- total_cost - you.gold,
- (total_cost - you.gold > 1) ? "s" : "" );
+ snprintf(info, INFO_SIZE, "You now have %d gold piece%s. "
+ "You are short %d gold piece%s for the purchase.",
+ you.gold,
+ you.gold != 1 ? "s" : "",
+ total_cost - you.gold,
+ (total_cost - you.gold != 1) ? "s" : "");
textcolor(LIGHTRED);
}
else
{
- snprintf( info, INFO_SIZE, "You now have %d gold piece%s. "
- "After the purchase, you will have %d gold piece%s.",
- you.gold,
- you.gold > 1 ? "s" : "",
- you.gold - total_cost,
- (you.gold - total_cost > 1) ? "s" : "" );
+ snprintf(info, INFO_SIZE, "You now have %d gold piece%s. "
+ "After the purchase, you will have %d gold piece%s.",
+ you.gold,
+ you.gold != 1 ? "s" : "",
+ you.gold - total_cost,
+ (you.gold - total_cost != 1) ? "s" : "");
textcolor(YELLOW);
}