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:
@@ -255,6 +255,7 @@ for wizard and explore modes, skip second screen of ^X output when first
|
|||||||
screen is cancelled by ESC
|
screen is cancelled by ESC
|
||||||
polyself into minotaur causes hard headgear to fall off
|
polyself into minotaur causes hard headgear to fall off
|
||||||
with multiple leashes in use, 2nd had 50/50 chance of having unbounded length
|
with multiple leashes in use, 2nd had 50/50 chance of having unbounded length
|
||||||
|
GOLDOBJ: coins aren't subject to curses/blesses and don't need identification
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+4
-8
@@ -2228,16 +2228,12 @@ STATIC_OVL boolean
|
|||||||
mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */
|
mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */
|
||||||
register struct obj *otmp, *obj;
|
register struct obj *otmp, *obj;
|
||||||
{
|
{
|
||||||
#ifndef GOLDOBJ
|
|
||||||
if (obj->otyp != otmp->otyp || obj->unpaid != otmp->unpaid ||
|
|
||||||
#else
|
|
||||||
if (obj->otyp != otmp->otyp) return FALSE;
|
if (obj->otyp != otmp->otyp) return FALSE;
|
||||||
|
#ifdef GOLDOBJ
|
||||||
/* Coins of the same kind will always merge. */
|
/* coins of the same kind will always merge */
|
||||||
if (obj->oclass == COIN_CLASS) return TRUE;
|
if (obj->oclass == COIN_CLASS) return TRUE;
|
||||||
|
|
||||||
if (obj->unpaid != otmp->unpaid ||
|
|
||||||
#endif
|
#endif
|
||||||
|
if (obj->unpaid != otmp->unpaid ||
|
||||||
obj->spe != otmp->spe || obj->dknown != otmp->dknown ||
|
obj->spe != otmp->spe || obj->dknown != otmp->dknown ||
|
||||||
(obj->bknown != otmp->bknown && !Role_if(PM_PRIEST)) ||
|
(obj->bknown != otmp->bknown && !Role_if(PM_PRIEST)) ||
|
||||||
obj->cursed != otmp->cursed || obj->blessed != otmp->blessed ||
|
obj->cursed != otmp->cursed || obj->blessed != otmp->blessed ||
|
||||||
|
|||||||
+7
-1
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)mkobj.c 3.4 2002/08/02 */
|
/* SCCS Id: @(#)mkobj.c 3.4 2002/09/21 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -679,6 +679,9 @@ void
|
|||||||
bless(otmp)
|
bless(otmp)
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
{
|
{
|
||||||
|
#ifdef GOLDOBJ
|
||||||
|
if (otmp->oclass == COIN_CLASS) return;
|
||||||
|
#endif
|
||||||
otmp->cursed = 0;
|
otmp->cursed = 0;
|
||||||
otmp->blessed = 1;
|
otmp->blessed = 1;
|
||||||
if (otmp->otyp == LUCKSTONE
|
if (otmp->otyp == LUCKSTONE
|
||||||
@@ -707,6 +710,9 @@ void
|
|||||||
curse(otmp)
|
curse(otmp)
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
{
|
{
|
||||||
|
#ifdef GOLDOBJ
|
||||||
|
if (otmp->oclass == COIN_CLASS) return;
|
||||||
|
#endif
|
||||||
otmp->blessed = 0;
|
otmp->blessed = 0;
|
||||||
otmp->cursed = 1;
|
otmp->cursed = 1;
|
||||||
/* welded two-handed weapon interferes with some armor removal */
|
/* welded two-handed weapon interferes with some armor removal */
|
||||||
|
|||||||
+5
-1
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)objnam.c 3.4 2002/09/08 */
|
/* SCCS Id: @(#)objnam.c 3.4 2002/09/21 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -797,6 +797,10 @@ boolean
|
|||||||
not_fully_identified(otmp)
|
not_fully_identified(otmp)
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
{
|
{
|
||||||
|
#ifdef GOLDOBJ
|
||||||
|
/* gold doesn't have any interesting attributes [yet?] */
|
||||||
|
if (otmp->oclass == COIN_CLASS) return FALSE; /* always fully ID'd */
|
||||||
|
#endif
|
||||||
/* check fundamental ID hallmarks first */
|
/* check fundamental ID hallmarks first */
|
||||||
if (!otmp->known || !otmp->dknown ||
|
if (!otmp->known || !otmp->dknown ||
|
||||||
#ifdef MAIL
|
#ifdef MAIL
|
||||||
|
|||||||
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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");
|
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) {
|
if (nobj) {
|
||||||
for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1));
|
for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1));
|
||||||
cnt > 0; cnt--) {
|
cnt > 0; cnt--) {
|
||||||
onum = rn2(nobj);
|
onum = rnd(nobj);
|
||||||
for(otmp = invent; onum != 0; onum--)
|
for (otmp = invent; otmp; otmp = otmp->nobj) {
|
||||||
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) &&
|
if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) &&
|
||||||
rn2(10) < 8) {
|
rn2(10) < 8) {
|
||||||
|
|||||||
Reference in New Issue
Block a user