The word "zorkmid" was hard-coded in format strings all
over the place. Often they would use "%ld zorkmid%s", amt, plur(amt) but not consistently, so some of the hard-coded usage could result in "1 zorkmids" This adds the function currency(long) to return the name of the currency, either plural or singular depending on the argument passed to it. That eliminates the need for the extra %s in the format string and the use of the plur() macro.
This commit is contained in:
@@ -785,6 +785,7 @@ E int NDECL(doorganize);
|
|||||||
E int FDECL(count_unpaid, (struct obj *));
|
E int FDECL(count_unpaid, (struct obj *));
|
||||||
E int FDECL(count_buc, (struct obj *,int));
|
E int FDECL(count_buc, (struct obj *,int));
|
||||||
E void FDECL(carry_obj_effects, (struct obj *));
|
E void FDECL(carry_obj_effects, (struct obj *));
|
||||||
|
E const char *FDECL(currency, (long));
|
||||||
|
|
||||||
/* ### ioctl.c ### */
|
/* ### ioctl.c ### */
|
||||||
|
|
||||||
|
|||||||
+11
-9
@@ -285,9 +285,9 @@ register struct obj *gold;
|
|||||||
#else
|
#else
|
||||||
ESHK(mtmp)->credit += value;
|
ESHK(mtmp)->credit += value;
|
||||||
#endif
|
#endif
|
||||||
You("have %ld zorkmid%s in credit.",
|
You("have %ld %s in credit.",
|
||||||
ESHK(mtmp)->credit,
|
ESHK(mtmp)->credit,
|
||||||
plur(ESHK(mtmp)->credit));
|
currency(ESHK(mtmp)->credit));
|
||||||
} else verbalize("Thanks, scum!");
|
} else verbalize("Thanks, scum!");
|
||||||
}
|
}
|
||||||
} else if (mtmp->ispriest) {
|
} else if (mtmp->ispriest) {
|
||||||
@@ -449,11 +449,11 @@ xchar x, y;
|
|||||||
}
|
}
|
||||||
if(costly && loss) {
|
if(costly && loss) {
|
||||||
if(!insider) {
|
if(!insider) {
|
||||||
You("caused %ld zorkmids worth of damage!", loss);
|
You("caused %ld %s worth of damage!", loss, currency(loss));
|
||||||
make_angry_shk(shkp, x, y);
|
make_angry_shk(shkp, x, y);
|
||||||
} else {
|
} else {
|
||||||
You("owe %s %ld zorkmids for objects destroyed.",
|
You("owe %s %ld %s for objects destroyed.",
|
||||||
mon_nam(shkp), loss);
|
mon_nam(shkp), loss, currency(loss));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1179,7 +1179,7 @@ xchar x, y, dlev;
|
|||||||
|
|
||||||
if(costly && shkp && price) {
|
if(costly && shkp && price) {
|
||||||
if(ESHK(shkp)->robbed > robbed) {
|
if(ESHK(shkp)->robbed > robbed) {
|
||||||
You("removed %ld zorkmids worth of goods!", price);
|
You("removed %ld %s worth of goods!", price, currency(price));
|
||||||
if(cansee(shkp->mx, shkp->my)) {
|
if(cansee(shkp->mx, shkp->my)) {
|
||||||
if(ESHK(shkp)->customer[0] == 0)
|
if(ESHK(shkp)->customer[0] == 0)
|
||||||
(void) strncpy(ESHK(shkp)->customer,
|
(void) strncpy(ESHK(shkp)->customer,
|
||||||
@@ -1192,10 +1192,12 @@ xchar x, y, dlev;
|
|||||||
(void) angry_guards(FALSE);
|
(void) angry_guards(FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(ESHK(shkp)->debit > debit)
|
if(ESHK(shkp)->debit > debit) {
|
||||||
You("owe %s %ld zorkmids for goods lost.",
|
long amt = (ESHK(shkp)->debit - debit);
|
||||||
|
You("owe %s %ld %s for goods lost.",
|
||||||
Monnam(shkp),
|
Monnam(shkp),
|
||||||
(ESHK(shkp)->debit - debit));
|
amt, currency(amt));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -463,10 +463,10 @@ winid endwin;
|
|||||||
otmp->known = otmp->bknown = otmp->dknown =
|
otmp->known = otmp->bknown = otmp->dknown =
|
||||||
otmp->rknown = 1;
|
otmp->rknown = 1;
|
||||||
/* assumes artifacts don't have quan>1 */
|
/* assumes artifacts don't have quan>1 */
|
||||||
Sprintf(pbuf, "%s (worth %ld zorkmids and %ld points)",
|
Sprintf(pbuf, "%s (worth %ld %s and %ld points)",
|
||||||
otmp->oartifact ? artifact_name(xname(otmp), &dummy) :
|
otmp->oartifact ? artifact_name(xname(otmp), &dummy) :
|
||||||
OBJ_NAME(objects[otmp->otyp]),
|
OBJ_NAME(objects[otmp->otyp]),
|
||||||
100L * (long)objects[otmp->otyp].oc_cost,
|
100L * (long)objects[otmp->otyp].oc_cost, currency(2L),
|
||||||
250L * (long)objects[otmp->otyp].oc_cost);
|
250L * (long)objects[otmp->otyp].oc_cost);
|
||||||
putstr(endwin, 0, pbuf);
|
putstr(endwin, 0, pbuf);
|
||||||
}
|
}
|
||||||
@@ -561,7 +561,7 @@ die:
|
|||||||
* smiling... :-) -3.
|
* smiling... :-) -3.
|
||||||
*/
|
*/
|
||||||
if (moves <= 1 && how < PANICKED) /* You die... --More-- */
|
if (moves <= 1 && how < PANICKED) /* You die... --More-- */
|
||||||
pline("Do not pass go. Do not collect 200 zorkmids.");
|
pline("Do not pass go. Do not collect 200 %s.", currency(200L));
|
||||||
|
|
||||||
if (have_windows) wait_synch(); /* flush screen output */
|
if (have_windows) wait_synch(); /* flush screen output */
|
||||||
#ifndef NO_SIGNAL
|
#ifndef NO_SIGNAL
|
||||||
@@ -769,9 +769,9 @@ die:
|
|||||||
otmp->dknown = 1; /* seen it (blindness fix) */
|
otmp->dknown = 1; /* seen it (blindness fix) */
|
||||||
otmp->onamelth = 0;
|
otmp->onamelth = 0;
|
||||||
otmp->quan = count;
|
otmp->quan = count;
|
||||||
Sprintf(pbuf, "%8ld %s (worth %ld zorkmids),",
|
Sprintf(pbuf, "%8ld %s (worth %ld %s),",
|
||||||
count, xname(otmp),
|
count, xname(otmp),
|
||||||
count * (long)objects[typ].oc_cost);
|
count * (long)objects[typ].oc_cost, currency(2L));
|
||||||
obfree(otmp, (struct obj *)0);
|
obfree(otmp, (struct obj *)0);
|
||||||
} else {
|
} else {
|
||||||
Sprintf(pbuf,
|
Sprintf(pbuf,
|
||||||
|
|||||||
+11
-3
@@ -573,6 +573,14 @@ register int type;
|
|||||||
return((struct obj *) 0);
|
return((struct obj *) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
currency(amount)
|
||||||
|
long amount;
|
||||||
|
{
|
||||||
|
if (amount == 1) return "zorkmid";
|
||||||
|
else return "zorkmids";
|
||||||
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
have_lizard()
|
have_lizard()
|
||||||
{
|
{
|
||||||
@@ -1442,9 +1450,9 @@ long quan; /* if non-0, print this quantity, not obj->quan */
|
|||||||
*/
|
*/
|
||||||
if (cost != 0 || let == '*') {
|
if (cost != 0 || let == '*') {
|
||||||
/* if dot is true, we're doing Iu, otherwise Ix */
|
/* if dot is true, we're doing Iu, otherwise Ix */
|
||||||
Sprintf(li, "%c - %-45s %6ld zorkmid%s",
|
Sprintf(li, "%c - %-45s %6ld %s",
|
||||||
(dot && use_invlet ? obj->invlet : let),
|
(dot && use_invlet ? obj->invlet : let),
|
||||||
(txt ? txt : doname(obj)), cost, plur(cost));
|
(txt ? txt : doname(obj)), cost, currency(cost));
|
||||||
#ifndef GOLDOBJ
|
#ifndef GOLDOBJ
|
||||||
} else if (obj && obj->oclass == GOLD_CLASS) {
|
} else if (obj && obj->oclass == GOLD_CLASS) {
|
||||||
Sprintf(li, "%ld gold piece%s%s", obj->quan, plur(obj->quan),
|
Sprintf(li, "%ld gold piece%s%s", obj->quan, plur(obj->quan),
|
||||||
@@ -2193,7 +2201,7 @@ doprgold()
|
|||||||
if(!umoney)
|
if(!umoney)
|
||||||
Your("wallet is empty.");
|
Your("wallet is empty.");
|
||||||
else
|
else
|
||||||
Your("wallet contains %ld zorkmid%s.", umoney, plur(umoney));
|
Your("wallet contains %ld %s.", umoney, currency(umoney));
|
||||||
#endif
|
#endif
|
||||||
shopper_financial_report();
|
shopper_financial_report();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+1
-1
@@ -201,7 +201,7 @@ forcelock() /* try to force a locked chest */
|
|||||||
if (costly)
|
if (costly)
|
||||||
loss += stolen_value(xlock.box, u.ux, u.uy,
|
loss += stolen_value(xlock.box, u.ux, u.uy,
|
||||||
(boolean)shkp->mpeaceful, TRUE);
|
(boolean)shkp->mpeaceful, TRUE);
|
||||||
if(loss) You("owe %ld zorkmids for objects destroyed.", loss);
|
if(loss) You("owe %ld %s for objects destroyed.", loss, currency(loss));
|
||||||
delobj(xlock.box);
|
delobj(xlock.box);
|
||||||
}
|
}
|
||||||
exercise((xlock.picktyp) ? A_DEX : A_STR, TRUE);
|
exercise((xlock.picktyp) ? A_DEX : A_STR, TRUE);
|
||||||
|
|||||||
+4
-4
@@ -2215,8 +2215,8 @@ register struct monst *mon;
|
|||||||
if (cost > u.ugold) cost = u.ugold;
|
if (cost > u.ugold) cost = u.ugold;
|
||||||
if (!cost) verbalize("It's on the house!");
|
if (!cost) verbalize("It's on the house!");
|
||||||
else {
|
else {
|
||||||
pline("%s takes %ld zorkmid%s for services rendered!",
|
pline("%s takes %ld %s for services rendered!",
|
||||||
Monnam(mon), cost, plur(cost));
|
Monnam(mon), cost, currency(cost));
|
||||||
u.ugold -= cost;
|
u.ugold -= cost;
|
||||||
mon->mgold += cost;
|
mon->mgold += cost;
|
||||||
flags.botl = 1;
|
flags.botl = 1;
|
||||||
@@ -2236,8 +2236,8 @@ register struct monst *mon;
|
|||||||
if (cost > umoney) cost = umoney;
|
if (cost > umoney) cost = umoney;
|
||||||
if (!cost) verbalize("It's on the house!");
|
if (!cost) verbalize("It's on the house!");
|
||||||
else {
|
else {
|
||||||
pline("%s takes %ld zorkmid%s for services rendered!",
|
pline("%s takes %ld %s for services rendered!",
|
||||||
Monnam(mon), cost, plur(cost));
|
Monnam(mon), cost, currency(cost));
|
||||||
money2mon(mon, cost);
|
money2mon(mon, cost);
|
||||||
flags.botl = 1;
|
flags.botl = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -140,8 +140,8 @@ register struct monst *mtmp;
|
|||||||
if (!demand) /* you have no gold */
|
if (!demand) /* you have no gold */
|
||||||
return mtmp->mpeaceful = 0;
|
return mtmp->mpeaceful = 0;
|
||||||
else {
|
else {
|
||||||
pline("%s demands %ld zorkmid%s for safe passage.",
|
pline("%s demands %ld %s for safe passage.",
|
||||||
Amonnam(mtmp), demand, plur(demand));
|
Amonnam(mtmp), demand, currency(demand));
|
||||||
|
|
||||||
if ((offer = bribe(mtmp)) >= demand) {
|
if ((offer = bribe(mtmp)) >= demand) {
|
||||||
pline("%s vanishes, laughing about cowardly mortals.",
|
pline("%s vanishes, laughing about cowardly mortals.",
|
||||||
@@ -185,8 +185,8 @@ struct monst *mtmp;
|
|||||||
} else if (offer >= u.ugold) {
|
} else if (offer >= u.ugold) {
|
||||||
You("give %s all your gold.", mon_nam(mtmp));
|
You("give %s all your gold.", mon_nam(mtmp));
|
||||||
offer = u.ugold;
|
offer = u.ugold;
|
||||||
} else You("give %s %ld zorkmid%s.", mon_nam(mtmp), offer,
|
} else You("give %s %ld %s.", mon_nam(mtmp), offer,
|
||||||
plur(offer));
|
currency(offer));
|
||||||
|
|
||||||
u.ugold -= offer;
|
u.ugold -= offer;
|
||||||
mtmp->mgold += offer;
|
mtmp->mgold += offer;
|
||||||
@@ -194,8 +194,8 @@ struct monst *mtmp;
|
|||||||
} else if (offer >= umoney) {
|
} else if (offer >= umoney) {
|
||||||
You("give %s all your gold.", mon_nam(mtmp));
|
You("give %s all your gold.", mon_nam(mtmp));
|
||||||
offer = umoney;
|
offer = umoney;
|
||||||
} else You("give %s %ld zorkmid%s.", mon_nam(mtmp), offer,
|
} else You("give %s %ld %s.", mon_nam(mtmp), offer,
|
||||||
plur(offer));
|
currency(offer));
|
||||||
|
|
||||||
money2mon(mtmp, offer);
|
money2mon(mtmp, offer);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-2
@@ -1983,8 +1983,8 @@ register int held;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cnt && loss)
|
if (cnt && loss)
|
||||||
You("owe %ld zorkmids for lost item%s.",
|
You("owe %ld %s for lost item%s.",
|
||||||
loss, lcnt > 1 ? "s" : "");
|
loss, currency(loss), lcnt > 1 ? "s" : "");
|
||||||
|
|
||||||
obj->owt = weight(obj);
|
obj->owt = weight(obj);
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -312,8 +312,8 @@ register struct monst *oracl;
|
|||||||
}
|
}
|
||||||
|
|
||||||
Sprintf(qbuf,
|
Sprintf(qbuf,
|
||||||
"\"Wilt thou settle for a minor consultation?\" (%d zorkmids)",
|
"\"Wilt thou settle for a minor consultation?\" (%d %s)",
|
||||||
minor_cost);
|
minor_cost, currency(minor_cost));
|
||||||
switch (ynq(qbuf)) {
|
switch (ynq(qbuf)) {
|
||||||
default:
|
default:
|
||||||
case 'q':
|
case 'q':
|
||||||
@@ -337,8 +337,8 @@ register struct monst *oracl;
|
|||||||
#endif
|
#endif
|
||||||
(oracle_cnt == 1 || oracle_flg < 0)) return 0;
|
(oracle_cnt == 1 || oracle_flg < 0)) return 0;
|
||||||
Sprintf(qbuf,
|
Sprintf(qbuf,
|
||||||
"\"Then dost thou desire a major one?\" (%d zorkmids)",
|
"\"Then dost thou desire a major one?\" (%d %s)",
|
||||||
major_cost);
|
major_cost, currency(major_cost));
|
||||||
if (yn(qbuf) != 'y') return 0;
|
if (yn(qbuf) != 'y') return 0;
|
||||||
#ifndef GOLDOBJ
|
#ifndef GOLDOBJ
|
||||||
u_pay = (u.ugold < (long)major_cost ? (int)u.ugold
|
u_pay = (u.ugold < (long)major_cost ? (int)u.ugold
|
||||||
|
|||||||
@@ -465,8 +465,8 @@ struct monst *shkp;
|
|||||||
eshkp = ESHK(shkp);
|
eshkp = ESHK(shkp);
|
||||||
total = (addupbill(shkp) + eshkp->debit);
|
total = (addupbill(shkp) + eshkp->debit);
|
||||||
if (eshkp->credit >= total) {
|
if (eshkp->credit >= total) {
|
||||||
Your("credit of %ld zorkmid%s is used to cover your shopping bill.",
|
Your("credit of %ld %s is used to cover your shopping bill.",
|
||||||
eshkp->credit, plur(eshkp->credit));
|
eshkp->credit, currency(eshkp->credit));
|
||||||
total = 0L; /* credit gets cleared by setpaid() */
|
total = 0L; /* credit gets cleared by setpaid() */
|
||||||
} else {
|
} else {
|
||||||
You("escaped the shop without paying!");
|
You("escaped the shop without paying!");
|
||||||
@@ -477,8 +477,8 @@ struct monst *shkp;
|
|||||||
|
|
||||||
/* by this point, we know an actual robbery has taken place */
|
/* by this point, we know an actual robbery has taken place */
|
||||||
eshkp->robbed += total;
|
eshkp->robbed += total;
|
||||||
You("stole %ld zorkmid%s worth of merchandise.",
|
You("stole %ld %s worth of merchandise.",
|
||||||
total, plur(total));
|
total, currency(total));
|
||||||
if (!Role_if(PM_ROGUE)) /* stealing is unlawful */
|
if (!Role_if(PM_ROGUE)) /* stealing is unlawful */
|
||||||
adjalign(-sgn(u.ualign.type));
|
adjalign(-sgn(u.ualign.type));
|
||||||
|
|
||||||
@@ -674,14 +674,14 @@ shopper_financial_report()
|
|||||||
if ((shkp != this_shkp) ^ pass) continue;
|
if ((shkp != this_shkp) ^ pass) continue;
|
||||||
eshkp = ESHK(shkp);
|
eshkp = ESHK(shkp);
|
||||||
if ((amt = eshkp->credit) != 0)
|
if ((amt = eshkp->credit) != 0)
|
||||||
You("have %ld zorkmid%s credit at %s %s.",
|
You("have %ld %s credit at %s %s.",
|
||||||
amt, plur(amt), s_suffix(shkname(shkp)),
|
amt, currency(amt), s_suffix(shkname(shkp)),
|
||||||
shtypes[eshkp->shoptype - SHOPBASE].name);
|
shtypes[eshkp->shoptype - SHOPBASE].name);
|
||||||
else if (shkp == this_shkp)
|
else if (shkp == this_shkp)
|
||||||
You("have no credit in here.");
|
You("have no credit in here.");
|
||||||
if ((amt = shop_debt(eshkp)) != 0)
|
if ((amt = shop_debt(eshkp)) != 0)
|
||||||
You("owe %s %ld zorkmid%s.",
|
You("owe %s %ld %s.",
|
||||||
shkname(shkp), amt, plur(amt));
|
shkname(shkp), amt, currency(amt));
|
||||||
else if (shkp == this_shkp)
|
else if (shkp == this_shkp)
|
||||||
You("don't owe any money here.");
|
You("don't owe any money here.");
|
||||||
}
|
}
|
||||||
@@ -1297,8 +1297,8 @@ proceed:
|
|||||||
#ifdef GOLDOBJ
|
#ifdef GOLDOBJ
|
||||||
umoney = money_cnt(invent);
|
umoney = money_cnt(invent);
|
||||||
#endif
|
#endif
|
||||||
Sprintf(sbuf, "You owe %s %ld zorkmid%s ",
|
Sprintf(sbuf, "You owe %s %ld %s ",
|
||||||
shkname(shkp), dtmp, plur(dtmp));
|
shkname(shkp), dtmp, currency(dtmp));
|
||||||
if(loan) {
|
if(loan) {
|
||||||
if(loan == dtmp)
|
if(loan == dtmp)
|
||||||
Strcat(sbuf, "you picked up in the store.");
|
Strcat(sbuf, "you picked up in the store.");
|
||||||
@@ -1493,8 +1493,8 @@ boolean itemize;
|
|||||||
|
|
||||||
if (itemize) {
|
if (itemize) {
|
||||||
char qbuf[BUFSZ];
|
char qbuf[BUFSZ];
|
||||||
Sprintf(qbuf,"%s for %ld zorkmid%s. Pay?", quan == 1L ?
|
Sprintf(qbuf,"%s for %ld %s. Pay?", quan == 1L ?
|
||||||
Doname2(obj) : doname(obj), ltmp, plur(ltmp));
|
Doname2(obj) : doname(obj), ltmp, currency(ltmp));
|
||||||
if (yn(qbuf) == 'n') {
|
if (yn(qbuf) == 'n') {
|
||||||
buy = PAY_SKIP; /* don't want to buy */
|
buy = PAY_SKIP; /* don't want to buy */
|
||||||
} else if (quan < bp->bquan && !consumed) { /* partly used goods */
|
} else if (quan < bp->bquan && !consumed) { /* partly used goods */
|
||||||
@@ -1673,9 +1673,9 @@ boolean croaked;
|
|||||||
money2mon(shkp, loss);
|
money2mon(shkp, loss);
|
||||||
#endif
|
#endif
|
||||||
flags.botl = 1;
|
flags.botl = 1;
|
||||||
pline("%s %s the %ld zorkmid%s %sowed %s.",
|
pline("%s %s the %ld %s %sowed %s.",
|
||||||
Monnam(shkp), takes,
|
Monnam(shkp), takes,
|
||||||
loss, plur(loss),
|
loss, currency(loss),
|
||||||
strncmp(eshkp->customer, plname, PL_NSIZ) ?
|
strncmp(eshkp->customer, plname, PL_NSIZ) ?
|
||||||
"" : "you ",
|
"" : "you ",
|
||||||
shkp->female ? "her" : "him");
|
shkp->female ? "her" : "him");
|
||||||
@@ -2230,12 +2230,12 @@ speak:
|
|||||||
(quan > 1L) ? "per" : "for this", xname(obj));
|
(quan > 1L) ? "per" : "for this", xname(obj));
|
||||||
obj->quan = quan;
|
obj->quan = quan;
|
||||||
} else
|
} else
|
||||||
pline("%s will cost you %ld zorkmid%s%s.",
|
pline("%s will cost you %ld %s%s.",
|
||||||
The(xname(obj)), ltmp, plur(ltmp),
|
The(xname(obj)), ltmp, currency(ltmp),
|
||||||
(obj->quan > 1L) ? " each" : "");
|
(obj->quan > 1L) ? " each" : "");
|
||||||
} else if(!silent) {
|
} else if(!silent) {
|
||||||
if(ltmp) pline_The("list price of %s is %ld zorkmid%s%s.",
|
if(ltmp) pline_The("list price of %s is %ld %s%s.",
|
||||||
the(xname(obj)), ltmp, plur(ltmp),
|
the(xname(obj)), ltmp, currency(ltmp),
|
||||||
(obj->quan > 1L) ? " each" : "");
|
(obj->quan > 1L) ? " each" : "");
|
||||||
else pline("%s does not notice.", Monnam(shkp));
|
else pline("%s does not notice.", Monnam(shkp));
|
||||||
}
|
}
|
||||||
@@ -2423,8 +2423,8 @@ register boolean peaceful, silent;
|
|||||||
char *still = "";
|
char *still = "";
|
||||||
if (credit_use) {
|
if (credit_use) {
|
||||||
if (ESHK(shkp)->credit) {
|
if (ESHK(shkp)->credit) {
|
||||||
You("have %ld zorkmids credit remaining.",
|
You("have %ld %s credit remaining.",
|
||||||
ESHK(shkp)->credit);
|
ESHK(shkp)->credit, currency(ESHK(shkp)->credit));
|
||||||
return value;
|
return value;
|
||||||
} else if (!value) {
|
} else if (!value) {
|
||||||
You("have no credit remaining.");
|
You("have no credit remaining.");
|
||||||
@@ -2433,10 +2433,10 @@ register boolean peaceful, silent;
|
|||||||
still = "still ";
|
still = "still ";
|
||||||
}
|
}
|
||||||
if(obj->oclass == GOLD_CLASS)
|
if(obj->oclass == GOLD_CLASS)
|
||||||
You("%sowe %s %ld zorkmids!", still, mon_nam(shkp), value);
|
You("%sowe %s %ld %s!", still, mon_nam(shkp), value, currency(value));
|
||||||
else You("%sowe %s %ld zorkmids for %s!", still,
|
else You("%sowe %s %ld %s for %s!", still,
|
||||||
mon_nam(shkp),
|
mon_nam(shkp),
|
||||||
value,
|
value, currency(value),
|
||||||
obj->quan > 1L ? "them" : "it");
|
obj->quan > 1L ? "them" : "it");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2588,8 +2588,8 @@ xchar x, y;
|
|||||||
eshkp->loan = 0L;
|
eshkp->loan = 0L;
|
||||||
Your("debt is paid off.");
|
Your("debt is paid off.");
|
||||||
}
|
}
|
||||||
pline("%ld zorkmid%s added to your credit.",
|
pline("%ld %s %s added to your credit.",
|
||||||
delta, delta > 1L ? "s are" : " is");
|
delta, currency(delta), delta > 1L ? "are" : "is");
|
||||||
}
|
}
|
||||||
if(offer) goto move_on;
|
if(offer) goto move_on;
|
||||||
else {
|
else {
|
||||||
@@ -2631,8 +2631,8 @@ move_on:
|
|||||||
} else if (sell_response != 'n') {
|
} else if (sell_response != 'n') {
|
||||||
pline("%s cannot pay you at present.", Monnam(shkp));
|
pline("%s cannot pay you at present.", Monnam(shkp));
|
||||||
Sprintf(qbuf,
|
Sprintf(qbuf,
|
||||||
"Will you accept %ld zorkmid%s in credit for %s?",
|
"Will you accept %ld %s in credit for %s?",
|
||||||
tmpcr, plur(tmpcr), doname(obj));
|
tmpcr, currency(tmpcr), doname(obj));
|
||||||
/* won't accept 'a' response here */
|
/* won't accept 'a' response here */
|
||||||
/* KLY - 3/2000 yes, we will, it's a damn nuisance
|
/* KLY - 3/2000 yes, we will, it's a damn nuisance
|
||||||
to have to constantly hit 'y' to sell for credit */
|
to have to constantly hit 'y' to sell for credit */
|
||||||
@@ -3497,8 +3497,8 @@ getcad:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Invis) Your("invisibility does not fool %s!", shkname(shkp));
|
if (Invis) Your("invisibility does not fool %s!", shkname(shkp));
|
||||||
Sprintf(qbuf,"\"Cad! You did %ld zorkmids worth of damage!\" Pay? ",
|
Sprintf(qbuf,"\"Cad! You did %ld %s worth of damage!\" Pay? ",
|
||||||
cost_of_damage);
|
cost_of_damage, currency(cost_of_damage));
|
||||||
if(yn(qbuf) != 'n') {
|
if(yn(qbuf) != 'n') {
|
||||||
cost_of_damage = check_credit(cost_of_damage, shkp);
|
cost_of_damage = check_credit(cost_of_damage, shkp);
|
||||||
#ifndef GOLDOBJ
|
#ifndef GOLDOBJ
|
||||||
@@ -3584,7 +3584,7 @@ register struct obj *first_obj;
|
|||||||
if (!cost) {
|
if (!cost) {
|
||||||
Strcpy(price, "no charge");
|
Strcpy(price, "no charge");
|
||||||
} else {
|
} else {
|
||||||
Sprintf(price, "%ld zorkmid%s%s", cost, plur(cost),
|
Sprintf(price, "%ld %s%s", cost, currency(cost),
|
||||||
otmp->quan > 1L ? " each" : "");
|
otmp->quan > 1L ? " each" : "");
|
||||||
}
|
}
|
||||||
Sprintf(buf, "%s, %s", doname(otmp), price);
|
Sprintf(buf, "%s, %s", doname(otmp), price);
|
||||||
@@ -3600,8 +3600,8 @@ register struct obj *first_obj;
|
|||||||
cost = get_cost(first_obj, (struct monst *)0);
|
cost = get_cost(first_obj, (struct monst *)0);
|
||||||
if (Has_contents(first_obj))
|
if (Has_contents(first_obj))
|
||||||
cost += contained_cost(first_obj, shkp, 0L, FALSE);
|
cost += contained_cost(first_obj, shkp, 0L, FALSE);
|
||||||
pline("%s, price %ld zorkmid%s%s%s", doname(first_obj),
|
pline("%s, price %ld %s%s%s", doname(first_obj),
|
||||||
cost, plur(cost), first_obj->quan > 1L ? " each" : "",
|
cost, currency(cost), first_obj->quan > 1L ? " each" : "",
|
||||||
shk_embellish(first_obj, cost));
|
shk_embellish(first_obj, cost));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3692,15 +3692,15 @@ struct monst *shkp;
|
|||||||
}
|
}
|
||||||
} else if (eshk->billct) {
|
} else if (eshk->billct) {
|
||||||
register long total = addupbill(shkp) + eshk->debit;
|
register long total = addupbill(shkp) + eshk->debit;
|
||||||
pline("%s says that your bill comes to %ld zorkmid%s.",
|
pline("%s says that your bill comes to %ld %s.",
|
||||||
shkname(shkp), total, plur(total));
|
shkname(shkp), total, currency(total));
|
||||||
} else if (eshk->debit)
|
} else if (eshk->debit)
|
||||||
pline("%s reminds you that you owe %s %ld zorkmid%s.",
|
pline("%s reminds you that you owe %s %ld %s.",
|
||||||
shkname(shkp), mhim(shkp),
|
shkname(shkp), mhim(shkp),
|
||||||
eshk->debit, plur(eshk->debit));
|
eshk->debit, currency(eshk->debit));
|
||||||
else if (eshk->credit)
|
else if (eshk->credit)
|
||||||
pline("%s encourages you to use your %ld zorkmid%s of credit.",
|
pline("%s encourages you to use your %ld %s of credit.",
|
||||||
shkname(shkp), eshk->credit, plur(eshk->credit));
|
shkname(shkp), eshk->credit, currency(eshk->credit));
|
||||||
else if (eshk->robbed)
|
else if (eshk->robbed)
|
||||||
pline("%s complains about a recent robbery.", shkname(shkp));
|
pline("%s complains about a recent robbery.", shkname(shkp));
|
||||||
#ifndef GOLDOBJ
|
#ifndef GOLDOBJ
|
||||||
@@ -3823,19 +3823,19 @@ boolean altusage;
|
|||||||
|
|
||||||
arg1 = arg2 = "";
|
arg1 = arg2 = "";
|
||||||
if (otmp->oclass == SPBOOK_CLASS) {
|
if (otmp->oclass == SPBOOK_CLASS) {
|
||||||
fmt = "%sYou owe%s %ld zorkmids.";
|
fmt = "%sYou owe%s %ld %s.";
|
||||||
arg1 = rn2(2) ? "This is no free library, cad! " : "";
|
arg1 = rn2(2) ? "This is no free library, cad! " : "";
|
||||||
arg2 = ESHK(shkp)->debit > 0L ? " an additional" : "";
|
arg2 = ESHK(shkp)->debit > 0L ? " an additional" : "";
|
||||||
} else if (otmp->otyp == POT_OIL) {
|
} else if (otmp->otyp == POT_OIL) {
|
||||||
fmt = "%s%sThat will cost you %ld zorkmids (Yendorian Fuel Tax).";
|
fmt = "%s%sThat will cost you %ld %s (Yendorian Fuel Tax).";
|
||||||
} else {
|
} else {
|
||||||
fmt = "%s%sUsage fee, %ld zorkmids.";
|
fmt = "%s%sUsage fee, %ld %s.";
|
||||||
if (!rn2(3)) arg1 = "Hey! ";
|
if (!rn2(3)) arg1 = "Hey! ";
|
||||||
if (!rn2(3)) arg2 = "Ahem. ";
|
if (!rn2(3)) arg2 = "Ahem. ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shkp->mcanmove || !shkp->msleeping)
|
if (shkp->mcanmove || !shkp->msleeping)
|
||||||
verbalize(fmt, arg1, arg2, tmp);
|
verbalize(fmt, arg1, arg2, tmp, currency(tmp));
|
||||||
ESHK(shkp)->debit += tmp;
|
ESHK(shkp)->debit += tmp;
|
||||||
exercise(A_WIS, TRUE); /* you just got info */
|
exercise(A_WIS, TRUE); /* you just got info */
|
||||||
}
|
}
|
||||||
@@ -3864,8 +3864,8 @@ register long amount;
|
|||||||
eshkp = ESHK(shkp);
|
eshkp = ESHK(shkp);
|
||||||
if(eshkp->credit >= amount) {
|
if(eshkp->credit >= amount) {
|
||||||
if(eshkp->credit > amount)
|
if(eshkp->credit > amount)
|
||||||
Your("credit is reduced by %ld zorkmid%s.",
|
Your("credit is reduced by %ld %s.",
|
||||||
amount, plur(amount));
|
amount, currency(amount));
|
||||||
else Your("credit is erased.");
|
else Your("credit is erased.");
|
||||||
eshkp->credit -= amount;
|
eshkp->credit -= amount;
|
||||||
} else {
|
} else {
|
||||||
@@ -3873,10 +3873,10 @@ register long amount;
|
|||||||
if(eshkp->credit)
|
if(eshkp->credit)
|
||||||
Your("credit is erased.");
|
Your("credit is erased.");
|
||||||
if(eshkp->debit)
|
if(eshkp->debit)
|
||||||
Your("debt increases by %ld zorkmid%s.",
|
Your("debt increases by %ld %s.",
|
||||||
delta, plur(delta));
|
delta, currency(delta));
|
||||||
else You("owe %s %ld zorkmid%s.",
|
else You("owe %s %ld %s.",
|
||||||
shkname(shkp), delta, plur(delta));
|
shkname(shkp), delta, currency(delta));
|
||||||
eshkp->debit += delta;
|
eshkp->debit += delta;
|
||||||
eshkp->loan += delta;
|
eshkp->loan += delta;
|
||||||
eshkp->credit = 0L;
|
eshkp->credit = 0L;
|
||||||
|
|||||||
+4
-4
@@ -3298,11 +3298,11 @@ boolean disarm;
|
|||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
if(costly && loss) {
|
if(costly && loss) {
|
||||||
if(insider)
|
if(insider)
|
||||||
You("owe %ld zorkmids for objects destroyed.",
|
You("owe %ld %s for objects destroyed.",
|
||||||
loss);
|
loss, currency(loss));
|
||||||
else {
|
else {
|
||||||
You("caused %ld zorkmids worth of damage!",
|
You("caused %ld %s worth of damage!",
|
||||||
loss);
|
loss, currency(loss));
|
||||||
make_angry_shk(shkp, ox, oy);
|
make_angry_shk(shkp, ox, oy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -763,13 +763,13 @@ paygd()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (u.uinvault) {
|
if (u.uinvault) {
|
||||||
Your("%ld zorkmid%s goes into the Magic Memory Vault.",
|
Your("%ld %s goes into the Magic Memory Vault.",
|
||||||
#ifndef GOLDOBJ
|
#ifndef GOLDOBJ
|
||||||
u.ugold,
|
u.ugold,
|
||||||
plur(u.ugold));
|
currency(u.ugold));
|
||||||
#else
|
#else
|
||||||
umoney,
|
umoney,
|
||||||
plur(umoney));
|
currency(umoney));
|
||||||
#endif
|
#endif
|
||||||
gx = u.ux;
|
gx = u.ux;
|
||||||
gy = u.uy;
|
gy = u.uy;
|
||||||
|
|||||||
Reference in New Issue
Block a user