Make GOLDOBJ unconditional.
This commit is contained in:
17
src/minion.c
17
src/minion.c
@@ -236,11 +236,7 @@ register struct monst *mtmp;
|
||||
if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE);
|
||||
return(1);
|
||||
}
|
||||
#ifndef GOLDOBJ
|
||||
cash = u.ugold;
|
||||
#else
|
||||
cash = money_cnt(invent);
|
||||
#endif
|
||||
demand = (cash * (rnd(80) + 20 * Athome)) /
|
||||
(100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
|
||||
|
||||
@@ -281,9 +277,7 @@ struct monst *mtmp;
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
long offer;
|
||||
#ifdef GOLDOBJ
|
||||
long umoney = money_cnt(invent);
|
||||
#endif
|
||||
|
||||
getlin("How much will you offer?", buf);
|
||||
if (sscanf(buf, "%ld", &offer) != 1) offer = 0L;
|
||||
@@ -297,16 +291,6 @@ struct monst *mtmp;
|
||||
} else if (offer == 0L) {
|
||||
You("refuse.");
|
||||
return 0L;
|
||||
#ifndef GOLDOBJ
|
||||
} else if (offer >= u.ugold) {
|
||||
You("give %s all your gold.", mon_nam(mtmp));
|
||||
offer = u.ugold;
|
||||
} else {
|
||||
You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer));
|
||||
}
|
||||
u.ugold -= offer;
|
||||
mtmp->mgold += offer;
|
||||
#else
|
||||
} else if (offer >= umoney) {
|
||||
You("give %s all your gold.", mon_nam(mtmp));
|
||||
offer = umoney;
|
||||
@@ -314,7 +298,6 @@ struct monst *mtmp;
|
||||
You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer));
|
||||
}
|
||||
(void) money2mon(mtmp, offer);
|
||||
#endif
|
||||
context.botl = 1;
|
||||
return(offer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user