There is a quote in data.base for squeaky board traps: A floorboard creaked. Galder had spent many hours tuning them, always a wise precaution with an ambitious assistant who walked like a cat. D flat. That meant he was just to the right of the door. "Ah, Trymon," he said, without turning, and noted with some satisfaction the faint indrawing of breath behind him. "Good of you to come. Shut the door, will you?" [ The Light Fantastic, by Terry Pratchett ] This patch makes each squeaky board trap on a level produce a unique sound. If you had visited the trap yourself prior to hearing a monster on it, you could actually know where a monster was by the unique pitch of the squeak. If someone wants further refinement of the roles, this could be adjusted to only work for musically adept roles/species, with the others only hearing a generic squeak. As it stands right now, everyone benefits. Does anyone thing the separation by role or species would be good? If so, which roles/species are musically proficient, and which are not? Since this patch increments editlevel anyway, it also sneaks in a context structure change for an upcoming patch.
109 lines
3.3 KiB
C
109 lines
3.3 KiB
C
/* SCCS Id: @(#)context.h 3.5 $Date$ */
|
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
|
|
/* If you change the context structure make sure you increment EDITLEVEL in */
|
|
/* patchlevel.h if needed. */
|
|
|
|
#ifndef CONTEXT_H
|
|
#define CONTEXT_H
|
|
|
|
#define CONTEXTVERBSZ 30
|
|
|
|
/*
|
|
* The context structure houses things that the game tracks
|
|
* or adjusts during the game, to preserve game state or context.
|
|
*
|
|
* The entire structure is saved with the game.
|
|
*
|
|
*/
|
|
|
|
struct dig_info { /* apply.c, hack.c */
|
|
int effort;
|
|
d_level level;
|
|
coord pos;
|
|
long lastdigtime;
|
|
boolean down, chew, warned, quiet;
|
|
};
|
|
|
|
struct tin_info {
|
|
struct obj *tin;
|
|
unsigned o_id; /* o_id of tin in save file */
|
|
int usedtime, reqtime;
|
|
};
|
|
|
|
struct book_info {
|
|
struct obj *book; /* last/current book being xscribed */
|
|
unsigned o_id; /* o_id of book in save file */
|
|
schar delay; /* moves left for this spell */
|
|
};
|
|
|
|
struct takeoff_info {
|
|
long mask;
|
|
long what;
|
|
int delay;
|
|
boolean cancelled_don;
|
|
char disrobing[CONTEXTVERBSZ+1];
|
|
};
|
|
|
|
struct victual_info {
|
|
struct obj *piece; /* the thing being eaten, or last thing that
|
|
* was partially eaten, unless that thing was
|
|
* a tin, which uses the tin structure above,
|
|
* in which case this should be 0 */
|
|
unsigned o_id; /* o_id of food object in save file */
|
|
/* doeat() initializes these when piece is valid */
|
|
int usedtime, /* turns spent eating */
|
|
reqtime; /* turns required to eat */
|
|
int nmod; /* coded nutrition per turn */
|
|
Bitfield(canchoke,1); /* was satiated at beginning */
|
|
|
|
/* start_eating() initializes these */
|
|
Bitfield(fullwarn,1); /* have warned about being full */
|
|
Bitfield(eating,1); /* victual currently being eaten */
|
|
Bitfield(doreset,1); /* stop eating at end of turn */
|
|
};
|
|
|
|
struct warntype_info {
|
|
unsigned long obj; /* object warn_of_mon monster type M2 */
|
|
unsigned long polyd; /* warn_of_mon monster type M2 due to poly */
|
|
struct permonst *species; /* particular species due to poly */
|
|
short speciesidx; /* index of above in mons[] (for save/restore) */
|
|
};
|
|
|
|
struct context_info {
|
|
unsigned ident; /* social security number for each monster */
|
|
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
|
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */
|
|
/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
|
|
/* 8: travel */
|
|
unsigned startingpet_mid;
|
|
int warnlevel;
|
|
int rndencode; /* randomized escape sequence introducer */
|
|
long next_attrib_check; /* next attribute check */
|
|
long stethoscope_move;
|
|
short stethoscope_movement;
|
|
boolean travel; /* find way automatically to u.tx,u.ty */
|
|
boolean travel1; /* first travel step */
|
|
boolean forcefight;
|
|
boolean nopick; /* do not pickup objects (as when running) */
|
|
boolean made_amulet;
|
|
boolean mon_moving; /* monsters' turn to move */
|
|
boolean move;
|
|
boolean mv;
|
|
boolean bypasses; /* bypass flag is set on at least one fobj */
|
|
boolean botl; /* partially redo status line */
|
|
boolean botlx; /* print an entirely new bottom line */
|
|
struct dig_info digging;
|
|
struct victual_info victual;
|
|
struct tin_info tin;
|
|
struct book_info spbook;
|
|
struct takeoff_info takeoff;
|
|
struct warntype_info warntype;
|
|
};
|
|
|
|
extern NEARDATA struct context_info context;
|
|
|
|
#endif /* CONTEXT_H */
|