Make GOLDOBJ unconditional.

This commit is contained in:
Sean Hunt
2015-02-14 01:31:22 -05:00
parent 4f59f5c6fd
commit ac108cd365
58 changed files with 8 additions and 1196 deletions

View File

@@ -366,11 +366,7 @@ fnd:
return;
}
verbalize("I don't know you.");
#ifndef GOLDOBJ
umoney = u.ugold;
#else
umoney = money_cnt(invent);
#endif
if (Deaf) {
;
} else if (!umoney && !hidden_gold()) {
@@ -513,12 +509,8 @@ register struct monst *grd;
grd_in_vault = *in_rooms(grd->mx, grd->my, VAULT)?
TRUE : FALSE;
boolean disappear_msg_seen = FALSE, semi_dead = (grd->mhp <= 0);
#ifndef GOLDOBJ
register boolean u_carry_gold = ((u.ugold + hidden_gold()) > 0L);
#else
long umoney = money_cnt(invent);
register boolean u_carry_gold = ((umoney + hidden_gold()) > 0L);
#endif
boolean see_guard, newspot = FALSE;
if(!on_level(&(egrd->gdlevel), &u.uz)) return(-1);
@@ -560,15 +552,9 @@ register struct monst *grd;
if(egrd->warncnt == 3 && !Deaf)
verbalize("I repeat, %sfollow me!",
u_carry_gold ? (
#ifndef GOLDOBJ
!u.ugold ?
"drop that hidden gold and " :
"drop that gold and ") : "");
#else
!umoney ?
"drop that hidden money and " :
"drop that money and ") : "");
#endif
if(egrd->warncnt == 7) {
m = grd->mx;
n = grd->my;
@@ -654,13 +640,8 @@ letknow:
if (m == u.ux && n == u.uy) {
struct obj *gold = g_at(m,n);
/* Grab the gold from between the hero's feet. */
#ifndef GOLDOBJ
grd->mgold += gold->quan;
delobj(gold);
#else
obj_extract_self(gold);
add_to_minv(grd, gold);
#endif
newsym(m,n);
} else if (m == x && n == y) {
mpickgold(grd); /* does a newsym */
@@ -828,30 +809,17 @@ void
paygd()
{
register struct monst *grd = findgd();
#ifndef GOLDOBJ
struct obj *gold;
#else
long umoney = money_cnt(invent);
struct obj *coins, *nextcoins;
#endif
int gx,gy;
char buf[BUFSZ];
#ifndef GOLDOBJ
if (!u.ugold || !grd) return;
#else
if (!umoney || !grd) return;
#endif
if (u.uinvault) {
Your("%ld %s goes into the Magic Memory Vault.",
#ifndef GOLDOBJ
u.ugold,
currency(u.ugold));
#else
umoney,
currency(umoney));
#endif
gx = u.ux;
gy = u.uy;
} else {
@@ -868,10 +836,6 @@ paygd()
plname, mons[u.umonster].mname);
make_grave(gx, gy, buf);
}
#ifndef GOLDOBJ
place_object(gold = mkgoldobj(u.ugold), gx, gy);
stackobj(gold);
#else
for (coins = invent; coins; coins = nextcoins) {
nextcoins = coins->nobj;
if (objects[coins->otyp].oc_class == COIN_CLASS) {
@@ -880,7 +844,6 @@ paygd()
stackobj(coins);
}
}
#endif
mongone(grd);
}