From 15882c5beea6db6d3c998ea720753ae5b6259793 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 21 May 2022 15:19:48 -0700 Subject: [PATCH] wizard mode wishing bit I meant to wish for a "wand of cold" and accidentally typed "wand of ice". Instead of being told that there's no such thing or receiving a random wand, the spot I was standing on was changed to ice. Only check for a terrain-change wish if an object class hasn't been stripped from the wish text. --- src/objnam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objnam.c b/src/objnam.c index 61c277d5e..58f72ea78 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 objnam.c $NHDT-Date: 1652332281 2022/05/12 05:11:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.361 $ */ +/* NetHack 3.7 objnam.c $NHDT-Date: 1653171584 2022/05/21 22:19:44 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.364 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4514,7 +4514,7 @@ readobjnam(char *bp, struct obj *no_wish) * Disallow such topology tweaks for WIZKIT startup wishes. */ wiztrap: - if (wizard && !g.program_state.wizkit_wishing) { + if (wizard && !g.program_state.wizkit_wishing && !d.oclass) { /* [inline code moved to separate routine to unclutter readobjnam] */ if ((d.otmp = wizterrainwish(&d)) != 0) return d.otmp;