fix B10003 - GOLDOBJ: BUC gold; identification

Curse and bless status has no meaning for gold.  Likewise
for erosion and other object flags controlling whether an item is
considered to be fully identified.
This commit is contained in:
nethack.rankin
2002-09-24 03:20:22 +00:00
parent b0f2478b51
commit 4d251c6688
5 changed files with 36 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)sit.c 3.4 2002/07/12 */
/* SCCS Id: @(#)sit.c 3.4 2002/09/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -325,14 +325,27 @@ rndcurse() /* curse a few inventory items at random! */
You(mal_aura, "you");
}
for (otmp = invent; otmp; otmp = otmp->nobj) nobj++;
for (otmp = invent; otmp; otmp = otmp->nobj) {
#ifdef GOLDOBJ
/* gold isn't subject to being cursed or blessed */
if (otmp->oclass == COIN_CLASS) continue;
#endif
nobj++;
}
if (nobj) {
for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1));
cnt > 0; cnt--) {
onum = rn2(nobj);
for(otmp = invent; onum != 0; onum--)
otmp = otmp->nobj;
onum = rnd(nobj);
for (otmp = invent; otmp; otmp = otmp->nobj) {
#ifdef GOLDOBJ
/* as above */
if (otmp->oclass == COIN_CLASS) continue;
#endif
if (--onum == 0) break; /* found the target */
}
/* the !otmp case should never happen; picking an already
cursed item happens--avoid "resists" message in that case */
if (!otmp || otmp->cursed) continue; /* next target */
if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) &&
rn2(10) < 8) {