GOLDOBJ pickup handling (trunk only)
For GOLDOBJ configuration, relax the 52 object limit for inventory
when gold uses the special $ slot instead of a letter. Takes care of an
old buglist entry from the beta testers. [It will need to be revisited
if we ever implement multiple coin types that can't all fit in one slot.]
Also for GOLDOBJ, prevents nymphs and monkeys from stealing coins,
since allowing that made their steal-item attack be a complete superset
of leprechaun's steal-gold attack.
This commit is contained in:
19
src/hack.c
19
src/hack.c
@@ -2479,13 +2479,14 @@ const char *str;
|
||||
}
|
||||
|
||||
int
|
||||
inv_cnt()
|
||||
inv_cnt(incl_gold)
|
||||
boolean incl_gold; /* only meaningful for GOLDOBJ config */
|
||||
{
|
||||
register struct obj *otmp = invent;
|
||||
register int ct = 0;
|
||||
|
||||
while(otmp){
|
||||
ct++;
|
||||
if (incl_gold || otmp->invlet != GOLD_SYM) ct++;
|
||||
otmp = otmp->nobj;
|
||||
}
|
||||
return(ct);
|
||||
@@ -2500,13 +2501,13 @@ long
|
||||
money_cnt(otmp)
|
||||
struct obj *otmp;
|
||||
{
|
||||
while(otmp) {
|
||||
/* Must change when silver & copper is implemented: */
|
||||
if (otmp->oclass == COIN_CLASS) return otmp->quan;
|
||||
otmp = otmp->nobj;
|
||||
}
|
||||
return 0;
|
||||
while (otmp) {
|
||||
/* Must change when silver & copper is implemented: */
|
||||
if (otmp->oclass == COIN_CLASS) return otmp->quan;
|
||||
otmp = otmp->nobj;
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
#endif
|
||||
#endif /* GOLDOBJ */
|
||||
|
||||
/*hack.c*/
|
||||
|
||||
Reference in New Issue
Block a user