wizard mode terrain wishing at drawbridge spot

When trying to reproduce the wand of striking "interesting effect (0)"
report, I tried wishing for lava under the castle drawbridge.  That
wasn't handling drawbridges properly.  This fixes wishing for moat,
lava, ice, or floor at a drawbridge span location whether the bridge
is currently open of closed.  It also allows wishing for room or floor
or ground at room spots; that hasn't had much testing.

Wishing for furniture, pool|moat|water, or lava at an ice location
wasn't cancelling any pending melt timer.

ice_descr() was declared as returning const but returns its non-const
output buffer argument.  Change to 'char *' so that wizterrainwish()
can capitilize that output without jumping through any hoops.
This commit is contained in:
PatR
2023-12-11 19:54:20 -08:00
parent e9e444d109
commit 4bd7f265f1
3 changed files with 104 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 extern.h $NHDT-Date: 1698264776 2023/10/25 20:12:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1296 $ */
/* NetHack 3.7 extern.h $NHDT-Date: 1702349265 2023/12/12 02:47:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1328 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2106,7 +2106,7 @@ extern char *monhealthdescr(struct monst *mon, boolean, char *);
extern void mhidden_description(struct monst *, boolean, char *);
extern boolean object_from_map(int, coordxy, coordxy, struct obj **);
extern const char *waterbody_name(coordxy, coordxy);
extern const char *ice_descr(coordxy, coordxy, char *);
extern char *ice_descr(coordxy, coordxy, char *);
extern boolean ia_checkfile(struct obj *);
extern int do_screen_description(coord, boolean, int, char *, const char **,
struct permonst **);