Mitre of Holiness

If the priest quest artifact Mitre of Holiness (a helm of brilliance,
so crystal helmet) is acquired via the quest (rather than by wishing)
make it start out tempered (aka crackproof|erodeproof).
This commit is contained in:
PatR
2023-06-17 13:27:40 -07:00
parent bbba8b82d2
commit 8fd8d1defa
2 changed files with 14 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
-- NetHack Priest Pri-goal.lua $NHDT-Date: 1652196008 2022/05/10 15:20:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $
-- NetHack Priest Pri-goal.lua $NHDT-Date: 1687033651 2023/06/17 20:27:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991-2 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
@@ -29,8 +29,9 @@ local placeidx = math.random(1, #place);
des.region(selection.area(00,00,25,10), "unlit")
-- Stairs
des.stair("up", 20,05)
-- Objects
des.object({ id = "helm of brilliance", coord = place[placeidx], buc="blessed", spe=0, name="The Mitre of Holiness" })
-- Objects [note: eroded=-1 => obj->oerodeproof=1]
des.object({ id = "helm of brilliance", coord = place[placeidx],
buc="blessed", spe=0, eroded=-1, name="The Mitre of Holiness" })
des.object()
des.object()
des.object()

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 trap.c $NHDT-Date: 1684140131 2023/05/15 08:42:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.536 $ */
/* NetHack 3.7 trap.c $NHDT-Date: 1687033655 2023/06/17 20:27:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.540 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -178,6 +178,7 @@ erode_obj(
boolean vulnerable = FALSE, is_primary = TRUE,
check_grease = (ef_flags & EF_GREASE) ? TRUE : FALSE,
print = (ef_flags & EF_VERBOSE) ? TRUE : FALSE,
crackers = FALSE, /* True: different feedback if otmp destroyed */
uvictim, vismon, visobj;
int erosion, cost_type;
struct monst *victim;
@@ -223,6 +224,7 @@ erode_obj(
case ERODE_CRACK: /* crystal armor */
vulnerable = is_crackable(otmp);
is_primary = TRUE;
crackers = TRUE;
cost_type = COST_CRACK;
break;
default:
@@ -253,8 +255,8 @@ erode_obj(
&& (uvictim || vismon || visobj))
pline("Somehow, %s %s %s not affected by the %s.",
uvictim ? "your"
: !vismon ? "the" /* visobj */
: s_suffix(mon_nam(victim)),
: !vismon ? "the" /* visobj */
: s_suffix(mon_nam(victim)),
ostr, vtense(ostr, "are"), bythe[type]);
/* We assume here that if the object is protected because it
* is blessed, it still shows some minor signs of wear, and
@@ -276,8 +278,8 @@ erode_obj(
if (uvictim || vismon || visobj)
pline("%s %s %s%s!",
uvictim ? "Your"
: !vismon ? "The" /* visobj */
: s_suffix(Monnam(victim)),
: !vismon ? "The" /* visobj */
: s_suffix(Monnam(victim)),
ostr, vtense(ostr, action[type]), adverb);
if (ef_flags & EF_PAY)
@@ -297,14 +299,14 @@ erode_obj(
if (uvictim || vismon || visobj) {
char actbuf[BUFSZ];
if (cost_type != COST_CRACK)
if (!crackers)
Sprintf(actbuf, "%s away", vtense(ostr, action[type]));
else
Sprintf(actbuf, "shatters");
pline("%s %s %s!",
uvictim ? "Your"
: !vismon ? "The" /* visobj */
: s_suffix(Monnam(victim)),
: !vismon ? "The" /* visobj */
: s_suffix(Monnam(victim)),
ostr, actbuf);
}
if (ef_flags & EF_PAY)