(u.uac < 0) ? "best" : "worst");
enl_msg("Your armor class ", "is ", "was ", buf, "");
- /* gold; similar to doprgold(#seegold) but without shop billing info;
- same amount as shown on status line which ignores container contents */
+ /* gold; similar to doprgold (#showgold) but without shop billing info;
+ includes container contents, unlike status line but like doprgold */
{
- static const char Your_wallet[] = "Your wallet ";
- long umoney = money_cnt(g.invent);
+ long umoney = money_cnt(g.invent), hmoney = hidden_gold(final);
if (!umoney) {
- enl_msg(Your_wallet, "is ", "was ", "empty", "");
+ Sprintf(buf, " Your wallet %s empty", !final ? "is" : "was");
} else {
- Sprintf(buf, "%ld %s", umoney, currency(umoney));
- enl_msg(Your_wallet, "contains ", "contained ", buf, "");
+ Sprintf(buf, " Your wallet contain%s %ld %s", !final ? "s" : "ed",
+ umoney, currency(umoney));
}
+ if (hmoney) {
+ Sprintf(eos(buf),
+ ", %s you %s %ld %s stashed away in your pack",
+ umoney ? "and" : "but", !final ? "have" : "had",
+ hmoney, umoney ? "more" : currency(hmoney));
+ }
+ Strcat(buf, ".");
+ enlght_out(buf);
}
if (flags.pickup) {
long hmoney = hidden_gold(FALSE);
if (Verbose(1, doprgold)) {
- if (!umoney && !hmoney)
- Your("wallet is empty.");
- else if (umoney && !hmoney)
- Your("wallet contains %ld %s.", umoney, currency(umoney));
- else if (!umoney && hmoney)
- Your("wallet is empty, but there %s %ld %s stashed away in "
- "your pack.",
- (hmoney == 1) ? "is" : "are",
- hmoney, currency(hmoney));
- else if (umoney && hmoney)
- Your("wallet contains %ld %s, and there %s %ld more stashed "
- "away in your pack.", umoney, currency(umoney),
- (hmoney == 1) ? "is" : "are",
- hmoney);
+ char buf[BUFSZ];
+
+ if (!umoney) {
+ Strcpy(buf, "Your wallet is empty");
+ } else {
+ Sprintf(buf, "Your wallet contains %ld %s",
+ umoney, currency(umoney));
+ }
+ if (hmoney) {
+ Sprintf(eos(buf),
+ ", %s you have %ld %s stashed away in your pack",
+ umoney ? "and" : "but", hmoney,
+ umoney ? "more" : currency(hmoney));
+ }
+ pline("%s.", buf);
} else {
long total = umoney + hmoney;
if (total)