more wizard mode wishing for terrain

Try a lot harder to keep terrain/level flags in a sane state.  They're
overloaded so it's not simple.

Creating a fountain or sink incremented the corresponding counter (for
controlling ambient sounds) but removing one by wishing for something
else in its place didn't decrement.

Allow wish for "disturbed grave" to create a grave with the 'disturbed'
flag set, similar to existing "magic fountain" and 'blessedftn' flag.
(I didn't add "looted throne", "looted tree", and several other things
that use the 'looted' overload of 'rm.flags'.)

Automate block_point (tree, cloud, secret corridor, or secret door in
open doorway) and add unblock_point (use Pass_wall to move into wall
or tree or stone, or just walk onto a cloud, then make iron bars or
almost any other wishable terrain to replace the blocking feature).
This commit is contained in:
PatR
2020-01-26 12:23:50 -08:00
parent 4505a8dc4c
commit c911446188
2 changed files with 85 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 rm.h $NHDT-Date: 1578258722 2020/01/05 21:12:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */
/* NetHack 3.6 rm.h $NHDT-Date: 1580070206 2020/01/26 20:23:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -528,16 +528,19 @@ struct rm {
#define SV7 0x80
#define SVALL 0xFF
#define doormask flags
#define altarmask flags
#define wall_info flags
#define ladder flags
#define drawbridgemask flags
#define looted flags
#define icedpool flags
/* if these get changed or expanded, make sure wizard-mode wishing becomes
aware of the new usage */
#define doormask flags /* door, sdoor (note conflict with wall_info) */
#define altarmask flags /* alignment and maybe temple */
#define wall_info flags /* wall, sdoor (note conflict with doormask) */
#define ladder flags /* up or down */
#define drawbridgemask flags /* what's underneath when the span is open */
#define looted flags /* used for throne, tree, fountain, sink, door */
#define icedpool flags /* used for ice (in case it melts) */
/* horizonal applies to walls, doors (including sdoor); also to iron bars
even though they don't have separate symbols for horizontal and vertical */
#define blessedftn horizontal /* a fountain that grants attribs */
#define disturbed horizontal /* a grave that has been disturbed */
#define disturbed horizontal /* a grave that has been disturbed */
struct damage {
struct damage *next;