Some types of shopkeeper start with a scroll of charging

This is partially for the pun, and partially because the "wish for
scrolls of charging to identify them" strategy has been nerfed in
previous commits and this offers an opportunity to discover what
scrolls of charging are without randomly encountering one.
This commit is contained in:
Alex Smith
2025-11-25 21:05:22 +00:00
parent 53247ec474
commit 10a5e67478
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 shknam.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.82 $ */
/* NetHack 3.7 shknam.c $NHDT-Date: 1764109114 2025/11/25 22:18:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.86 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -682,6 +682,10 @@ shkinit(const struct shclass *shp, struct mkroom *sroom)
mkmonmoney(shk, 1000L + 30L * (long) rnd(100)); /* initial capital */
if (shp->shknms == shkrings)
(void) mongets(shk, TOUCHSTONE);
if (shp->shknms == shktools || shp->shknms == shkwands ||
(shp->shknms == shkrings && rn2(2)) ||
(shp->shknms == shkgeneral && rn2(5)))
(void) mongets(shk, SCR_CHARGING);
nameshk(shk, shp->shknms);
return sh;