Merge branch 'NetHack-3.7' into keni-prefix

This commit is contained in:
nhkeni
2024-09-06 15:07:19 -04:00
202 changed files with 8527 additions and 6374 deletions

View File

@@ -14,7 +14,7 @@ typedef struct align { /* alignment & record */
} align;
/* bounds for "record" -- respect initial alignments of 10 */
#define ALIGNLIM (10L + (gm.moves / 200L))
#define ALIGNLIM (10L + (svm.moves / 200L))
#define A_NONE (-128) /* the value range of type */

View File

@@ -142,7 +142,7 @@ struct context_info {
* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF-,
* 8: travel */
unsigned startingpet_mid; /* monster id number for initial pet */
int current_fruit; /* fruit->fid corresponding to gp.pl_fruit[] */
int current_fruit; /* fruit->fid corresponding to svp.pl_fruit[] */
int mysteryforce; /* adjusts how often "mysterious force" kicks in */
int rndencode; /* randomized escape sequence introducer */
int warnlevel; /* threshold (digit) to warn about unseen mons */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 decl.h $NHDT-Date: 1706079834 2024/01/24 07:03:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.355 $ */
/* NetHack 3.7 decl.h $NHDT-Date: 1720074483 2024/07/04 06:28:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.373 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2007. */
/* NetHack may be freely redistributed. See license for details. */
@@ -194,13 +194,9 @@ struct instance_globals_b {
#endif
/* decl.c */
int bases[MAXOCLASSES + 1];
coord bhitpos; /* place where throw or zap hits or stops */
struct obj *billobjs; /* objects not yet paid for */
/* dungeon.c */
branch *branches; /* dungeon branch list */
/* files.c */
char bones[BONESSIZE];
@@ -212,7 +208,6 @@ struct instance_globals_b {
/* mkmaze.c */
lev_region bughack; /* for preserving the insect legs when wallifying
* baalz level */
struct bubble *bbubbles;
/* pickup.c */
boolean bucx_filter;
@@ -253,7 +248,6 @@ struct instance_globals_c {
#ifdef DEF_PAGER
const char *catmore; /* external pager; from getenv() or DEF_PAGER */
#endif
struct context_info context;
/* dog.c */
char catname[PL_PSIZ];
@@ -317,12 +311,7 @@ struct instance_globals_d {
long domove_succeeded;
#define DOMOVE_WALK 0x00000001
#define DOMOVE_RUSH 0x00000002
dungeon dungeons[MAXDUNGEON]; /* ini'ed by init_dungeon() */
dest_area dndest;
boolean defer_see_monsters;
struct dgn_topology dungeon_topology;
int doors_alloc; /* doors-array allocated size */
coord *doors; /* array of door locations */
/* dig.c */
boolean did_dig_msg;
@@ -341,9 +330,6 @@ struct instance_globals_d {
/* mon.c */
boolean disintegested;
/* o_init.c */
short disco[NUM_OBJECTS];
/* objname.c */
/* distantname used by distant_name() to pass extra information to
xname_flags(); it would be much cleaner if this were a parameter,
@@ -372,7 +358,6 @@ struct instance_globals_e {
struct bubble *ebubbles;
/* new stuff */
struct exclusion_zone *exclusion_zones;
int early_raw_messages; /* if raw_prints occurred early prior
to gb.beyond_savefile_load */
@@ -457,7 +442,6 @@ struct instance_globals_h {
/* decl.c */
const char *hname; /* name of the game (argv[0] of main) */
int hackpid; /* current process id */
#if defined(MICRO) || defined(WIN32)
char hackdir[PATHLEN]; /* where rumors, help, record are */
#endif /* MICRO || WIN32 */
@@ -479,7 +463,6 @@ struct instance_globals_i {
/* decl.c */
int in_doagain;
coord inv_pos;
boolean in_mklev;
boolean in_steed_dismounting;
struct obj *invent;
@@ -525,7 +508,6 @@ struct instance_globals_k {
/* decl.c */
struct obj *kickedobj; /* object in flight due to kicking */
struct kinfo killer;
/* read.c */
boolean known;
@@ -540,9 +522,6 @@ struct instance_globals_l {
cmdcount_nht last_command_count;
/* decl.c (before being incorporated into instance_globals_*) */
schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */
struct linfo level_info[MAXLINFO];
dlevel_t level; /* level map */
#if defined(UNIX) || defined(VMS)
int locknum; /* max num of simultaneous users */
#endif
@@ -620,20 +599,15 @@ struct instance_globals_m {
struct multishot m_shot;
boolean mrg_to_wielded; /* weapon picked is merged with wielded one */
struct menucoloring *menu_colorings;
long moves; /* turn counter */
struct obj *migrating_objs; /* objects moving to another dungeon level */
/* dog.c */
struct monst *mydogs; /* monsters that went down/up together with @ */
struct monst *migrating_mons; /* monsters moving to another level */
struct mvitals mvitals[NUMMONS];
/* dokick.c */
struct rm *maploc;
/* dungeon.c */
mapseen *mapseenchn; /*DUNGEON_OVERVIEW*/
/* mhitu.c */
int mhitu_dieroll;
@@ -682,15 +656,11 @@ struct instance_globals_n {
/* decl.c */
const char *nomovemsg;
int nroom;
int nsubroom;
/* dokick.c */
struct rm nowhere;
/* dungeon.c */
int n_dgns; /* number of dungeons (also used in mklev.c and do.c) */
/* files.c */
int nesting;
int no_sound_notified; /* run-time option processing: warn once if built
@@ -713,9 +683,6 @@ struct instance_globals_n {
/* questpgr.c */
char nambuf[CVT_BUF_SIZE];
/* region.c */
int n_regions;
/* restore.c */
int n_ids_mapped;
@@ -779,7 +746,6 @@ struct instance_globals_o {
/* rumors.c */
int oracle_flg; /* -1=>don't use, 0=>need init, 1=>init done */
unsigned oracle_cnt; /* oracles are handled differently from rumors... */
unsigned long *oracle_loc;
/* uhitm.c */
@@ -799,13 +765,9 @@ struct instance_globals_p {
int polearm_range_max;
/* decl.c */
char plname[PL_NSIZ]; /* player name */
int plnamelen; /* length of plname[] if that came from getlogin() */
char pl_character[PL_CSIZ];
char pl_race; /* character's race */
char pl_fruit[PL_FSIZ];
struct plinemsg_type *plinemsg_types;
struct sinfo program_state; /* flags describing game's current state */
/* dog.c */
int petname_used; /* user preferred pet name has been used */
@@ -849,18 +811,12 @@ struct instance_globals_p {
struct instance_globals_q {
/* quest.c */
struct q_score quest_status;
boolean havestate;
unsigned long magic; /* validate that structure layout is preserved */
};
struct instance_globals_r {
/* decl.c */
struct mkroom rooms[(MAXNROFROOMS + 1) * 2];
/* symbols.c */
nhsym rogue_syms[SYM_MAX]; /* loaded rogue symbols */
@@ -895,11 +851,9 @@ struct instance_globals_s {
messages in artifact_hit() */
/* decl.c */
s_level * sp_levchn;
stairway *stairs;
int smeq[MAXNROFROOMS + 1];
boolean stoned; /* done to monsters hit by 'c' */
struct spell spl_book[MAXSPELL + 1];
struct mkroom *subrooms;
/* do.c */
@@ -937,6 +891,7 @@ struct instance_globals_s {
boolean simple_options_help;
/* pickup.c */
boolean sellobj_first; /* True => need sellobj_state(); False => don't */
boolean shop_filter;
/* pline.c */
@@ -957,7 +912,7 @@ struct instance_globals_s {
/* spells.c */
int spl_sortmode; /* index into spl_sortchoices[] */
int *spl_orderindx; /* array of gs.spl_book[] indices */
int *spl_orderindx; /* array of svs.spl_book[] indices */
/* steal.c */
unsigned int stealoid; /* object to be stolen */
@@ -976,7 +931,6 @@ struct instance_globals_t {
struct trapinfo trapinfo;
/* decl.c */
char tune[6];
schar tbx; /* mthrowu: target x */
schar tby; /* mthrowu: target y */
char toplines[TBUFSZ];
@@ -1011,7 +965,6 @@ struct instance_globals_t {
/* timeout.c */
/* ordered timer list */
struct fe *timer_base; /* "active" */
unsigned long timer_id;
/* topten.c */
winid toptenwin;
@@ -1029,7 +982,6 @@ struct instance_globals_u {
boolean update_all;
/* decl.c */
dest_area updest;
boolean unweapon;
/* role.c */
@@ -1114,9 +1066,6 @@ struct instance_globals_x {
/* lock.c */
struct xlock_s xlock;
/* mkmaze.c */
int xmin, xmax; /* level boundaries x */
/* objnam.c */
char *xnamep; /* obuf[] returned by xname(), for use in doname() for
* bounds checking; differs from xname() return value
@@ -1136,9 +1085,6 @@ struct instance_globals_y {
int y_maze_max;
struct monst youmonst;
/* mkmaze.c */
int ymin, ymax; /* level boundaries y */
/* pline.c */
/* work buffer for You(), &c and verbalize() */
char *you_buf;
@@ -1168,6 +1114,126 @@ struct instance_globals_z {
unsigned long magic; /* validate that structure layout is preserved */
};
struct instance_globals_saved_b {
/* dungeon.c */
branch *branches; /* dungeon branch list */
/* mkmaze.c */
struct bubble *bbubbles;
/* o_init.c */
int bases[MAXOCLASSES + 2]; /* make bases[MAXOCLASSES+1] available */
};
struct instance_globals_saved_c {
/* decl.c */
struct context_info context;
};
struct instance_globals_saved_d {
/* dungeon.c */
dungeon dungeons[MAXDUNGEON]; /* ini'ed by init_dungeon() */
struct dgn_topology dungeon_topology;
/* decl.c */
dest_area dndest;
coord *doors; /* array of door locations */
int doors_alloc; /* doors-array allocated size */
/* o_init.c */
short disco[NUM_OBJECTS];
};
struct instance_globals_saved_e {
/* decl.c */
struct exclusion_zone *exclusion_zones;
};
struct instance_globals_saved_h {
/* decl.c */
int hackpid; /* current process id */
};
struct instance_globals_saved_i {
/* decl.c */
coord inv_pos;
};
struct instance_globals_saved_k {
/* decl.c */
struct kinfo killer;
};
struct instance_globals_saved_l {
/* decl.c */
schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */
dlevel_t level; /* level map */
struct linfo level_info[MAXLINFO];
};
struct instance_globals_saved_m {
/* dungeon.c */
mapseen *mapseenchn; /*DUNGEON_OVERVIEW*/
/* decl.c */
long moves; /* turn counter */
struct mvitals mvitals[NUMMONS];
};
struct instance_globals_saved_n {
/* dungeon.c */
int n_dgns; /* number of dungeons (also used in mklev.c and do.c) */
/* mkroom.c */
int nroom;
/* region.c */
int n_regions;
};
struct instance_globals_saved_o {
/* rumors.c */
unsigned oracle_cnt; /* oracles are handled differently from rumors... */
};
struct instance_globals_saved_p {
/* decl.c */
char plname[PL_NSIZ]; /* player name */
char pl_character[PL_CSIZ];
char pl_fruit[PL_FSIZ];
};
struct instance_globals_saved_q {
/* quest.c */
struct q_score quest_status;
};
struct instance_globals_saved_r {
/* mkroom.c */
struct mkroom rooms[(MAXNROFROOMS + 1) * 2];
};
struct instance_globals_saved_s {
/* decl.c */
struct spell spl_book[MAXSPELL + 1];
s_level *sp_levchn;
};
struct instance_globals_saved_t {
/* decl.c */
char tune[6];
/* timeout.c */
unsigned long timer_id;
};
struct instance_globals_saved_u {
/* decl.c */
dest_area updest;
};
struct instance_globals_saved_x {
/* mkmaze.c */
int xmin, xmax; /* level boundaries x */
};
struct instance_globals_saved_y {
/* mkmaze.c */
int ymin, ymax; /* level boundaries y */
};
extern struct instance_globals_a ga;
extern struct instance_globals_b gb;
extern struct instance_globals_c gc;
@@ -1194,6 +1260,26 @@ extern struct instance_globals_w gw;
extern struct instance_globals_x gx;
extern struct instance_globals_y gy;
extern struct instance_globals_z gz;
extern struct instance_globals_saved_b svb;
extern struct instance_globals_saved_c svc;
extern struct instance_globals_saved_d svd;
extern struct instance_globals_saved_e sve;
extern struct instance_globals_saved_h svh;
extern struct instance_globals_saved_i svi;
extern struct instance_globals_saved_k svk;
extern struct instance_globals_saved_l svl;
extern struct instance_globals_saved_m svm;
extern struct instance_globals_saved_n svn;
extern struct instance_globals_saved_o svo;
extern struct instance_globals_saved_p svp;
extern struct instance_globals_saved_q svq;
extern struct instance_globals_saved_r svr;
extern struct instance_globals_saved_s svs;
extern struct instance_globals_saved_t svt;
extern struct instance_globals_saved_u svu;
extern struct instance_globals_saved_x svx;
extern struct instance_globals_saved_y svy;
extern struct sinfo program_state; /* flags describing game's current state */
struct const_globals {
const struct obj zeroobj; /* used to zero out a struct obj */

View File

@@ -1,8 +1,7 @@
/* NetHack 3.7 defsym.h */
/* NetHack 3.7 defsym.h $NHDT-Date: 1720565306 2024/07/09 22:48:26 $ $NHDT-Branch: NetHack-3.7 $ $NHDT-Revision: 1.24 $ */
/* Copyright (c) 2016 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
/*
This header is included in multiple places to produce
different code depending on its use. Its purpose is to
@@ -131,6 +130,7 @@
PCHAR2(35, '\\', S_throne, "throne", "opulent throne", HI_GOLD)
PCHAR( 36, '{', S_sink, "sink", CLR_WHITE)
PCHAR( 37, '{', S_fountain, "fountain", CLR_BRIGHT_BLUE)
/* the S_pool symbol is used for both POOL terrain and MOAT terrain */
PCHAR2(38, '}', S_pool, "pool", "water", CLR_BLUE)
PCHAR( 39, '.', S_ice, "ice", CLR_CYAN)
PCHAR( 40, '}', S_lava, "molten lava", CLR_RED)
@@ -145,6 +145,8 @@
"raised drawbridge", CLR_BROWN)
PCHAR( 46, ' ', S_air, "air", CLR_CYAN)
PCHAR( 47, '#', S_cloud, "cloud", CLR_GRAY)
/* the S_water symbol is used for WATER terrain: wall of water in the
dungeon and Plane of Water in the endgame */
PCHAR( 48, '}', S_water, "water", CLR_BRIGHT_BLUE)
/* end dungeon characters */
/* */

View File

@@ -19,7 +19,7 @@
* Returns the head of the list of objects that the player can see
* at location (x,y). [Vestige of unimplemented invisible objects.]
*/
#define vobj_at(x, y) (gl.level.objects[x][y])
#define vobj_at(x, y) (svl.level.objects[x][y])
/*
* sensemon()
@@ -63,7 +63,7 @@
*/
#define _mon_warning(mon) \
(Warning && !(mon)->mpeaceful && (mdistu(mon) < 100) \
&& (((int) ((mon)->m_lev / 4)) >= gc.context.warnlevel))
&& (((int) ((mon)->m_lev / 4)) >= svc.context.warnlevel))
/*
* mon_visible()
@@ -820,7 +820,7 @@ enum glyph_offsets {
expression but there will always be sequence points in between */
#define obj_is_piletop(obj) \
((obj)->where == OBJ_FLOOR \
&& (go.otg_otmp = gl.level.objects[(obj)->ox][(obj)->oy]->nexthere) != 0 \
&& (go.otg_otmp = svl.level.objects[(obj)->ox][(obj)->oy]->nexthere) != 0 \
&& ((obj)->otyp != BOULDER || go.otg_otmp->otyp == BOULDER))
/* used to hide info such as potion and gem color when not seen yet;
stones and rock are excluded for gem class; LAST_SPELL includes blank

View File

@@ -246,7 +246,7 @@ typedef struct mapseen {
struct mapseen_rooms {
Bitfield(seen, 1);
Bitfield(untended, 1); /* flag for shop without shk */
} msrooms[(MAXNROFROOMS + 1) * 2]; /* same size as gr.rooms[] */
} msrooms[(MAXNROFROOMS + 1) * 2]; /* same size as svr.rooms[] */
/* dead heroes; might not have graves or ghosts */
struct cemetery *final_resting_place; /* same as level.bonesinfo */
} mapseen;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 extern.h $NHDT-Date: 1718303205 2024/06/13 18:26:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1426 $ */
/* NetHack 3.7 extern.h $NHDT-Date: 1723580890 2024/08/13 20:28:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1435 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -428,7 +428,6 @@ extern void end_of_input(void);
#endif
extern char readchar(void);
extern char readchar_poskey(coordxy *, coordxy *, int *);
extern void sanity_check(void);
extern char* key2txt(uchar, char *);
extern char yn_function(const char *, const char *, char, boolean);
extern char paranoid_ynq(boolean, const char *, boolean);
@@ -499,7 +498,9 @@ extern int wiz_mgender(void);
extern int dig_typ(struct obj *, coordxy, coordxy);
extern boolean is_digging(void);
extern int holetime(void);
extern boolean dig_check(struct monst *, boolean, coordxy, coordxy);
extern enum digcheck_result dig_check(struct monst *, coordxy, coordxy);
extern void digcheck_fail_message(enum digcheck_result, struct monst *,
coordxy, coordxy);
extern void digactualhole(coordxy, coordxy, struct monst *, int);
extern boolean dighole(boolean, boolean, coord *);
extern int use_pick_axe(struct obj *) NONNULLARG1;
@@ -650,6 +651,7 @@ extern char *Some_Monnam(struct monst *) NONNULLARG1;
extern char *noname_monnam(struct monst *, int) NONNULLARG1;
extern char *m_monnam(struct monst *) NONNULLARG1;
extern char *y_monnam(struct monst *) NONNULLARG1;
extern char *YMonnam(struct monst *) NONNULLARG1;
extern char *Adjmonnam(struct monst *, const char *) NONNULLARG1;
extern char *Amonnam(struct monst *) NONNULLARG1;
extern char *a_monnam(struct monst *) NONNULLARG1;
@@ -1755,7 +1757,7 @@ extern void kill_genocided_monsters(void);
extern void golemeffects(struct monst *, int, int);
extern boolean angry_guards(boolean);
extern void pacify_guards(void);
extern void decide_to_shapeshift(struct monst *, int) NONNULLARG1;
extern void decide_to_shapeshift(struct monst *) NONNULLARG1;
extern boolean vamp_stone(struct monst *) NONNULLARG1;
extern void check_gear_next_turn(struct monst *) NONNULLARG1;
extern void copy_mextra(struct monst *, struct monst *);
@@ -1850,6 +1852,7 @@ extern void m_break_boulder(struct monst *, coordxy, coordxy) NONNULLARG1;
extern int dochug(struct monst *) NONNULLARG1;
extern boolean m_digweapon_check(struct monst *, coordxy, coordxy) NONNULLARG1;
extern boolean m_avoid_kicked_loc(struct monst *, coordxy, coordxy) NONNULLARG1;
extern boolean m_avoid_soko_push_loc(struct monst *, coordxy, coordxy) NONNULLARG1;
extern int m_move(struct monst *, int) NONNULLARG1;
extern int m_move_aggress(struct monst *, coordxy, coordxy) NONNULLARG1;
extern void dissolve_bars(coordxy, coordxy);
@@ -2153,6 +2156,7 @@ extern char *Tobjnam(struct obj *, const char *) NONNULL NONNULLARG1;
extern char *otense(struct obj *, const char *) NONNULL NONNULLARG12;
extern char *vtense(const char *, const char *) NONNULL NONNULLARG2;
extern char *Doname2(struct obj *) NONNULL NONNULLARG1;
extern char *paydoname(struct obj *) NONNULL NONNULLARG1;
extern char *yname(struct obj *) NONNULL NONNULLARG1;
extern char *Yname2(struct obj *) NONNULL NONNULLARG1;
extern char *ysimple_name(struct obj *) NONNULL NONNULLARG1;
@@ -2570,6 +2574,9 @@ extern boolean in_out_region(coordxy, coordxy);
extern boolean m_in_out_region(struct monst *, coordxy, coordxy) NONNULLARG1;
extern void update_player_regions(void);
extern void update_monster_region(struct monst *) NONNULLARG1;
extern int reg_damg(NhRegion *) NONNULLARG1;
extern boolean any_visible_region(void);
extern void visible_region_summary(winid);
extern NhRegion *visible_region_at(coordxy, coordxy);
extern void show_region(NhRegion *, coordxy, coordxy) NONNULLARG1;
extern void save_regions(NHFILE *) NONNULLARG1;
@@ -3742,6 +3749,7 @@ extern void wizcustom_callback(winid win, int glyphnum, char *id);
extern int wiz_display_macros(void);
extern int wiz_mon_diff(void);
#endif
extern void sanity_check(void);
/* ### worm.c ### */

View File

@@ -234,7 +234,7 @@ struct instance_flags {
boolean query_menu; /* use a menu for yes/no queries */
boolean showdamage;
boolean debug_fuzzer; /* fuzz testing */
boolean defer_plname; /* X11 hack: askname() might not set gp.plname */
boolean defer_plname; /* X11 hack: askname() might not set svp.plname */
boolean herecmd_menu; /* use menu when mouseclick on yourself */
boolean invis_goldsym; /* gold symbol is ' '? */
boolean in_lua; /* executing a lua script */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 hack.h $NHDT-Date: 1717878594 2024/06/08 20:29:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.257 $ */
/* NetHack 3.7 hack.h $NHDT-Date: 1724094288 2024/08/19 19:04:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.261 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -327,6 +327,28 @@ struct _create_particular_data {
boolean sleeping, saddled, invisible, hidden;
};
/* dig_check() results */
enum digcheck_result {
DIGCHECK_PASSED = 1,
DIGCHECK_PASSED_DESTROY_TRAP = 2,
DIGCHECK_PASSED_PITONLY = 3,
DIGCHECK_FAILED = 4,
DIGCHECK_FAIL_ONSTAIRS = DIGCHECK_FAILED,
DIGCHECK_FAIL_ONLADDER,
DIGCHECK_FAIL_THRONE,
DIGCHECK_FAIL_ALTAR,
DIGCHECK_FAIL_AIRLEVEL,
DIGCHECK_FAIL_WATERLEVEL,
DIGCHECK_FAIL_TOOHARD,
DIGCHECK_FAIL_UNDESTROYABLETRAP,
DIGCHECK_FAIL_CANTDIG,
DIGCHECK_FAIL_BOULDER,
DIGCHECK_FAIL_OBJ_POOL_OR_TRAP
};
/* Dismount: causes for why you are no longer riding */
enum dismount_types {
DISMOUNT_GENERIC = 0,
@@ -372,40 +394,40 @@ struct dgn_topology { /* special dungeon levels for speed */
/* macros for accessing the dungeon levels by their old names */
/* clang-format off */
#define oracle_level (gd.dungeon_topology.d_oracle_level)
#define bigroom_level (gd.dungeon_topology.d_bigroom_level)
#define rogue_level (gd.dungeon_topology.d_rogue_level)
#define medusa_level (gd.dungeon_topology.d_medusa_level)
#define stronghold_level (gd.dungeon_topology.d_stronghold_level)
#define valley_level (gd.dungeon_topology.d_valley_level)
#define wiz1_level (gd.dungeon_topology.d_wiz1_level)
#define wiz2_level (gd.dungeon_topology.d_wiz2_level)
#define wiz3_level (gd.dungeon_topology.d_wiz3_level)
#define juiblex_level (gd.dungeon_topology.d_juiblex_level)
#define orcus_level (gd.dungeon_topology.d_orcus_level)
#define baalzebub_level (gd.dungeon_topology.d_baalzebub_level)
#define asmodeus_level (gd.dungeon_topology.d_asmodeus_level)
#define portal_level (gd.dungeon_topology.d_portal_level)
#define sanctum_level (gd.dungeon_topology.d_sanctum_level)
#define earth_level (gd.dungeon_topology.d_earth_level)
#define water_level (gd.dungeon_topology.d_water_level)
#define fire_level (gd.dungeon_topology.d_fire_level)
#define air_level (gd.dungeon_topology.d_air_level)
#define astral_level (gd.dungeon_topology.d_astral_level)
#define tower_dnum (gd.dungeon_topology.d_tower_dnum)
#define sokoban_dnum (gd.dungeon_topology.d_sokoban_dnum)
#define mines_dnum (gd.dungeon_topology.d_mines_dnum)
#define quest_dnum (gd.dungeon_topology.d_quest_dnum)
#define tutorial_dnum (gd.dungeon_topology.d_tutorial_dnum)
#define qstart_level (gd.dungeon_topology.d_qstart_level)
#define qlocate_level (gd.dungeon_topology.d_qlocate_level)
#define nemesis_level (gd.dungeon_topology.d_nemesis_level)
#define knox_level (gd.dungeon_topology.d_knox_level)
#define mineend_level (gd.dungeon_topology.d_mineend_level)
#define sokoend_level (gd.dungeon_topology.d_sokoend_level)
#define oracle_level (svd.dungeon_topology.d_oracle_level)
#define bigroom_level (svd.dungeon_topology.d_bigroom_level)
#define rogue_level (svd.dungeon_topology.d_rogue_level)
#define medusa_level (svd.dungeon_topology.d_medusa_level)
#define stronghold_level (svd.dungeon_topology.d_stronghold_level)
#define valley_level (svd.dungeon_topology.d_valley_level)
#define wiz1_level (svd.dungeon_topology.d_wiz1_level)
#define wiz2_level (svd.dungeon_topology.d_wiz2_level)
#define wiz3_level (svd.dungeon_topology.d_wiz3_level)
#define juiblex_level (svd.dungeon_topology.d_juiblex_level)
#define orcus_level (svd.dungeon_topology.d_orcus_level)
#define baalzebub_level (svd.dungeon_topology.d_baalzebub_level)
#define asmodeus_level (svd.dungeon_topology.d_asmodeus_level)
#define portal_level (svd.dungeon_topology.d_portal_level)
#define sanctum_level (svd.dungeon_topology.d_sanctum_level)
#define earth_level (svd.dungeon_topology.d_earth_level)
#define water_level (svd.dungeon_topology.d_water_level)
#define fire_level (svd.dungeon_topology.d_fire_level)
#define air_level (svd.dungeon_topology.d_air_level)
#define astral_level (svd.dungeon_topology.d_astral_level)
#define tower_dnum (svd.dungeon_topology.d_tower_dnum)
#define sokoban_dnum (svd.dungeon_topology.d_sokoban_dnum)
#define mines_dnum (svd.dungeon_topology.d_mines_dnum)
#define quest_dnum (svd.dungeon_topology.d_quest_dnum)
#define tutorial_dnum (svd.dungeon_topology.d_tutorial_dnum)
#define qstart_level (svd.dungeon_topology.d_qstart_level)
#define qlocate_level (svd.dungeon_topology.d_qlocate_level)
#define nemesis_level (svd.dungeon_topology.d_nemesis_level)
#define knox_level (svd.dungeon_topology.d_knox_level)
#define mineend_level (svd.dungeon_topology.d_mineend_level)
#define sokoend_level (svd.dungeon_topology.d_sokoend_level)
/* clang-format on */
#define dunlev_reached(x) (gd.dungeons[(x)->dnum].dunlev_ureached)
#define dunlev_reached(x) (svd.dungeons[(x)->dnum].dunlev_ureached)
#define MAXLINFO (MAXDUNGEON * MAXLEVEL)
enum lua_theme_group {
@@ -783,6 +805,7 @@ struct sinfo {
int in_parseoptions; /* in parseoptions */
int in_role_selection; /* role/race/&c selection menus in progress */
int in_getlin; /* inside interface getlin routine */
int in_sanity_check; /* for impossible() during sanity checking */
int config_error_ready; /* config_error_add is ready, available */
int beyond_savefile_load; /* set when past savefile loading */
#ifdef PANICLOG
@@ -1072,10 +1095,10 @@ typedef struct {
#define MATCH_WARN_OF_MON(mon) \
(Warn_of_mon \
&& ((gc.context.warntype.obj & (mon)->data->mflags2) != 0 \
|| (gc.context.warntype.polyd & (mon)->data->mflags2) != 0 \
|| (gc.context.warntype.species \
&& (gc.context.warntype.species == (mon)->data))))
&& ((svc.context.warntype.obj & (mon)->data->mflags2) != 0 \
|| (svc.context.warntype.polyd & (mon)->data->mflags2) != 0 \
|| (svc.context.warntype.species \
&& (svc.context.warntype.species == (mon)->data))))
typedef uint32_t mmflags_nht; /* makemon MM_ flags */
@@ -1116,6 +1139,7 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */
#define MHID_PREFIX 1 /* include ", mimicking " prefix */
#define MHID_ARTICLE 2 /* include "a " or "an " after prefix */
#define MHID_ALTMON 4 /* if mimicking a monster, include that */
#define MHID_REGION 8 /* include region when mon is in one */
/* flags for make_corpse() and mkcorpstat(); 0..7 are recorded in obj->spe */
#define CORPSTAT_NONE 0x00

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 integer.h $NHDT-Date: 1717967331 2024/06/09 21:08:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 integer.h $NHDT-Date: 1720397754 2024/07/08 00:15:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) 2016 by Michael Allison */
/* NetHack may be freely redistributed. See license for details. */
@@ -110,4 +110,9 @@ typedef uint64_t uint64;
? (L) * 10L + (D) \
: -1L)
/* add a and b, return max long value if overflow would have occurred;
assumes that both a and b are non-negative; caller should apply
cast(s) to (long) in the arguments if any are needed */
#define nowrap_add(a,b) ((a) <= (LONG_MAX - (b)) ? ((a) + (b)) : LONG_MAX)
#endif /* INTEGER_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 mextra.h $NHDT-Date: 1596498545 2020/08/03 23:49:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.30 $ */
/* NetHack 3.7 mextra.h $NHDT-Date: 1720717969 2024/07/11 17:12:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.40 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -113,7 +113,6 @@ struct epri {
struct bill_x {
unsigned bo_id;
boolean useup;
boolean queuedpay;
long price; /* price per unit */
long bquan; /* amount used up */
};
@@ -123,8 +122,8 @@ struct eshk {
long credit; /* amount credited to customer */
long debit; /* amount of debt for using unpaid items */
long loan; /* shop-gold picked (part of debit) */
int shoptype; /* the value of gr.rooms[shoproom].rtype */
schar shoproom; /* index in gr.rooms; set by inshop() */
int shoptype; /* the value of svr.rooms[shoproom].rtype */
schar shoproom; /* index in svr.rooms; set by inshop() */
schar unused; /* to force alignment for stupid compilers */
boolean following; /* following customer since he owes us sth */
boolean surcharge; /* angry shk inflates prices */

View File

@@ -40,10 +40,10 @@ struct shclass {
const char *const *shknms; /* list of shopkeeper names for this type */
};
/* the normal rooms on the current level are described in gr.rooms[0..n] for
/* the normal rooms on the current level are described in svr.rooms[0..n] for
* some n<MAXNROFROOMS
* the vault, if any, is described by gr.rooms[n+1]
* the next gr.rooms entry has hx -1 as a flag
* the vault, if any, is described by svr.rooms[n+1]
* the next svr.rooms entry has hx -1 as a flag
* there is at most one non-vault special room on a level
*/
@@ -88,7 +88,7 @@ enum roomtype_types {
#define SHARED 1 /* indicates normal shared boundary */
#define SHARED_PLUS 2 /* indicates shared boundary - extra adjacent-square
* searching required */
#define ROOMOFFSET 3 /* (levl[x][y].roomno - ROOMOFFSET) gives gr.rooms[] index,
#define ROOMOFFSET 3 /* (levl[x][y].roomno - ROOMOFFSET) gives svr.rooms[] index,
* for inside-squares and non-shared boundaries */
/* Values for needfill */
@@ -99,14 +99,14 @@ enum roomtype_types {
#define FILL_LVFLAGS 2 /* special rooms only; set the room's rtype and level
flags as appropriate, but do not put anything in it */
#define IS_ROOM_PTR(x) ((x) >= gr.rooms && (x) < gr.rooms + MAXNROFROOMS)
#define IS_ROOM_PTR(x) ((x) >= svr.rooms && (x) < svr.rooms + MAXNROFROOMS)
#define IS_ROOM_INDEX(x) ((x) >= 0 && (x) < MAXNROFROOMS)
#define IS_SUBROOM_PTR(x) \
((x) >= gs.subrooms && (x) < gs.subrooms + MAXNROFROOMS)
#define IS_SUBROOM_INDEX(x) ((x) > MAXNROFROOMS && (x) <= (MAXNROFROOMS * 2))
#define ROOM_INDEX(x) ((x) - gr.rooms)
#define ROOM_INDEX(x) ((x) - svr.rooms)
#define SUBROOM_INDEX(x) ((x) - gs.subrooms)
#define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == gn.nroom)
#define IS_LAST_ROOM_PTR(x) (ROOM_INDEX(x) == svn.nroom)
#define IS_LAST_SUBROOM_PTR(x) (!gn.nsubroom || SUBROOM_INDEX(x) == gn.nsubroom)
#endif /* MKROOM_H */

View File

@@ -204,7 +204,7 @@ enum ms_sounds {
passed to mkclass() as if it dealt with mons[].geno bits */
#define G_IGNORE 0x8000 /* for mkclass(), ignore G_GENOD|G_EXTINCT */
/* for gm.mvitals[].mvflags (variant during game), along with G_NOCORPSE */
/* for svm.mvitals[].mvflags (variant during game), along with G_NOCORPSE */
#define G_KNOWN 0x04 /* have been encountered */
#define G_GENOD 0x02 /* have been genocided */
#define G_EXTINCT 0x01 /* population control; create no more */

View File

@@ -212,7 +212,7 @@ struct monst {
/* dead monsters stay on the fmon list until dmonsfree() at end of turn */
#define DEADMONSTER(mon) ((mon)->mhp < 1)
#define is_starting_pet(mon) ((mon)->m_id == gc.context.startingpet_mid)
#define is_starting_pet(mon) ((mon)->m_id == svc.context.startingpet_mid)
#define is_vampshifter(mon) \
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LEADER \
|| (mon)->cham == PM_VLAD_THE_IMPALER)
@@ -226,7 +226,7 @@ struct monst {
#define mundisplaceable(mon) \
((mon)->ispriest || (mon)->isshk \
|| (mon)->isgd || (mon)->data == &mons[PM_ORACLE] \
|| (mon)->m_id == gq.quest_status.leader_m_id)
|| (mon)->m_id == svq.quest_status.leader_m_id)
/* mimic appearances that block vision/light */
#define is_lightblocker_mappear(mon) \

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 monsters.h $NHDT-Date: 1705092146 2024/01/12 20:42:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.119 $ */
/* NetHack 3.7 monsters.h $NHDT-Date: 1723945838 2024/08/18 01:50:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.124 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2693,8 +2693,17 @@
| M2_SHAPESHIFTER,
M3_INFRAVISIBLE,
11, HI_DOMESTIC, DOPPELGANGER),
/* 3.7: shopkeepers used to have speed 18, but if/when they were
hasted they always got 2 moves per turn and had a tendency to move
away from blocking the door and then move right back; since they
might start with a potion of speed and drink that as soon as the
hero gets close, once inside the shop the hero could have trouble
getting out again; also, being slowed still guaranteed one move
per turn; reduce their innate speed from 18 to 16 for a hasted
speed of 22 rather than 24 and slowed speed of 11 rather than 12;
they will still block the shop door, but not as tenaciously */
MON(NAM("shopkeeper"), S_HUMAN,
LVL(12, 18, 0, 50, 0), G_NOGEN,
LVL(12, 16, 0, 50, 0), G_NOGEN,
A(ATTK(AT_WEAP, AD_PHYS, 4, 4), ATTK(AT_WEAP, AD_PHYS, 4, 4),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(WT_HUMAN, 400, MS_SELL, MZ_HUMAN), 0, 0,

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 obj.h $NHDT-Date: 1633802062 2021/10/09 17:54:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.94 $ */
/* NetHack 3.7 obj.h $NHDT-Date: 1718999845 2024/06/21 19:57:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.116 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -82,6 +82,8 @@ struct obj {
#define OBJ_ONBILL 7 /* object on shk bill */
#define OBJ_LUAFREE 8 /* object has been dealloc'd, but is ref'd by lua */
#define OBJ_DELETED 9 /* object is marked for deletion by dobjsfree() */
/* note: OBJ_xxx values are used in obj_state_names[] in mkobj.c
so adding, removing, or renumbering these needs to change that too */
#define NOBJ_STATES 10
xint16 timed; /* # of fuses (timers) attached to this obj */
@@ -300,14 +302,14 @@ struct obj {
/* Eggs and other food */
#define MAX_EGG_HATCH_TIME 200 /* longest an egg can remain unhatched */
#define stale_egg(egg) \
((gm.moves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
((svm.moves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
/* note: sometimes eggs and tins have special corpsenm values that
shouldn't be used as an index into mons[] */
#define polyfodder(obj) \
#define polyfood(obj) \
(ofood(obj) && (obj)->corpsenm >= LOW_PM \
&& (pm_to_cham((obj)->corpsenm) != NON_PM \
|| dmgtype(&mons[(obj)->corpsenm], AD_POLY)))
|| dmgtype(&mons[(obj)->corpsenm], AD_POLY)))
#define mlevelgain(obj) (ofood(obj) && (obj)->corpsenm == PM_WRAITH)
#define mhealup(obj) (ofood(obj) && (obj)->corpsenm == PM_NURSE)
#define Is_pudding(o) \
@@ -418,8 +420,8 @@ struct obj {
|| (o)->otyp == AMULET_OF_UNCHANGING)
/* achievement tracking; 3.6.x did this differently */
#define is_mines_prize(o) ((o)->o_id == gc.context.achieveo.mines_prize_oid)
#define is_soko_prize(o) ((o)->o_id == gc.context.achieveo.soko_prize_oid)
#define is_mines_prize(o) ((o)->o_id == svc.context.achieveo.mines_prize_oid)
#define is_soko_prize(o) ((o)->o_id == svc.context.achieveo.soko_prize_oid)
/* is_art() is now a function in artifact.c */
/* #define is_art(o,art) ((o) && (o)->oartifact == (art)) */

View File

@@ -548,6 +548,9 @@ static int optfn_##a(int, int, boolean, char *, char *);
NHOPTC(paranoid_confirmation, Advanced, 28, opt_in, set_in_game,
Yes, Yes, Yes, Yes, "prayconfirm",
"extra prompting in certain situations")
NHOPTB(pauper, Advanced, 0, opt_in, set_in_config,
Off, Yes, No, No, NoAlias, &u.uroleplay.pauper, Term_False,
"start your character without any items")
NHOPTB(perm_invent, Advanced, 0, opt_in, set_in_game,
Off, Yes, No, No, NoAlias, &iflags.perm_invent, Term_Off,
"show persistent inventory window")

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 patchlevel.h $NHDT-Date: 1703294869 2023/12/23 01:27:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.249 $ */
/* NetHack 3.7 patchlevel.h $NHDT-Date: 1720717988 2024/07/11 17:13:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.261 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 103
#define EDITLEVEL 107
/*
* Development status possibilities.

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 permonst.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */
/* NetHack 3.7 permonst.h $NHDT-Date: 1721844081 2024/07/24 18:01:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.25 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -11,14 +11,14 @@ enum monnums {
#include "monsters.h"
#undef MONS_ENUM
NUMMONS,
NON_PM = -1, /* "not a monster */
LOW_PM = NON_PM + 1, /* first monster in mons */
LEAVESTATUE = NON_PM - 1, /* leave statue instead of corpse;
* there are two lower values assigned
* in end.c so that (x == LEAVESTATUE)
* will test FALSE in bones.c:
* (NON_PM - 2) for no corpse
* (NON_PM - 3) for no corpse, no grave */
NON_PM = -1, /* "not a monster" */
LOW_PM = NON_PM + 1, /* first monster in mons */
LEAVESTATUE = NON_PM - 1, /* leave statue instead of corpse;
* there are two lower values assigned
* in end.c so that (x == LEAVESTATUE)
* will test FALSE in bones.c:
* (NON_PM - 2) for no corpse
* (NON_PM - 3) for no corpse, no grave */
HIGH_PM = NUMMONS - 1,
SPECIAL_PM = PM_LONG_WORM_TAIL /* [normal] < ~ < [special] */
/* mons[SPECIAL_PM] through mons[NUMMONS-1], inclusive, are

View File

@@ -107,7 +107,7 @@ enum levl_typ_types {
#define IS_DOOR(typ) ((typ) == DOOR)
#define IS_DOORJOIN(typ) (IS_ROCK(typ) || (typ) == IRONBARS)
#define IS_TREE(typ) \
((typ) == TREE || (gl.level.flags.arboreal && (typ) == STONE))
((typ) == TREE || (svl.level.flags.arboreal && (typ) == STONE))
#define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */
#define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM, STAIRS, furniture.. */
#define ZAP_POS(typ) ((typ) >= POOL)
@@ -374,7 +374,7 @@ struct damage {
an existing bones level; if so, most recent victim will be first in list */
struct cemetery {
struct cemetery *next; /* next struct is previous dead character... */
/* "gp.plname" + "-ROLe" + "-RACe" + "-GENder" + "-ALIgnment" + \0 */
/* "svp.plname" + "-ROLe" + "-RACe" + "-GENder" + "-ALIgnment" + \0 */
char who[PL_NSIZ + 4 * (1 + 3) + 1];
/* death reason, same as in score/log file */
char how[100 + 1]; /* [DTHSZ+1] */
@@ -441,9 +441,9 @@ typedef struct {
/*
* Macros for compatibility with old code. Someday these will go away.
*/
#define levl gl.level.locations
#define fobj gl.level.objlist
#define fmon gl.level.monlist
#define levl svl.level.locations
#define fobj svl.level.objlist
#define fmon svl.level.monlist
/*
* Covert a trap number into the defsym graphics array.
@@ -453,45 +453,45 @@ typedef struct {
#define trap_to_defsym(t) (S_arrow_trap + (t) - 1)
#define defsym_to_trap(d) ((d) - S_arrow_trap + 1)
#define OBJ_AT(x, y) (gl.level.objects[x][y] != (struct obj *) 0)
#define OBJ_AT(x, y) (svl.level.objects[x][y] != (struct obj *) 0)
/*
* Macros for encapsulation of level.monsters references.
*/
#if 0
/* these wouldn't allow buried monster and surface monster at same location */
#define MON_AT(x, y) \
(gl.level.monsters[x][y] && !gl.level.monsters[x][y]->mburied)
(svl.level.monsters[x][y] && !svl.level.monsters[x][y]->mburied)
#define MON_BURIED_AT(x, y) \
(gl.level.monsters[x][y] && gl.level.monsters[x][y]->mburied)
(svl.level.monsters[x][y] && svl.level.monsters[x][y]->mburied)
#define m_at(x, y) \
(MON_AT(x, y) ? gl.level.monsters[x][y] : (struct monst *) 0)
(MON_AT(x, y) ? svl.level.monsters[x][y] : (struct monst *) 0)
#define m_buried_at(x, y) \
(MON_BURIED_AT(x, y) ? gl.level.monsters[x][y] : (struct monst *) 0)
(MON_BURIED_AT(x, y) ? svl.level.monsters[x][y] : (struct monst *) 0)
#else /* without 'mburied' */
#define MON_AT(x, y) (gl.level.monsters[x][y] != (struct monst *) 0)
#define m_at(x, y) (gl.level.monsters[x][y])
#define MON_AT(x, y) (svl.level.monsters[x][y] != (struct monst *) 0)
#define m_at(x, y) (svl.level.monsters[x][y])
#define m_buried_at(x, y) ((struct monst *) 0)
#endif
#ifdef EXTRA_SANITY_CHECKS
#define place_worm_seg(m, x, y) \
do { \
if (gl.level.monsters[x][y] && gl.level.monsters[x][y] != m) \
if (svl.level.monsters[x][y] && svl.level.monsters[x][y] != m) \
impossible("place_worm_seg over mon"); \
gl.level.monsters[x][y] = m; \
svl.level.monsters[x][y] = m; \
} while(0)
#define remove_monster(x, y) \
do { \
if (!gl.level.monsters[x][y]) \
if (!svl.level.monsters[x][y]) \
impossible("no monster to remove"); \
gl.level.monsters[x][y] = (struct monst *) 0; \
svl.level.monsters[x][y] = (struct monst *) 0; \
} while(0)
#else
#define place_worm_seg(m, x, y) gl.level.monsters[x][y] = m
#define remove_monster(x, y) gl.level.monsters[x][y] = (struct monst *) 0
#define place_worm_seg(m, x, y) svl.level.monsters[x][y] = m
#define remove_monster(x, y) svl.level.monsters[x][y] = (struct monst *) 0
#endif
/* restricted movement, potential luck penalties */
#define Sokoban gl.level.flags.sokoban_rules
#define Sokoban svl.level.flags.sokoban_rules
/*
* These prototypes are in extern.h but some of the code which uses them

View File

@@ -28,9 +28,9 @@ enum spellknowledge {
#define ALL_MAP 0x1
#define ALL_SPELLS 0x2
#define decrnknow(spell) gs.spl_book[spell].sp_know--
#define spellid(spell) gs.spl_book[spell].sp_id
#define spellknow(spell) gs.spl_book[spell].sp_know
#define decrnknow(spell) svs.spl_book[spell].sp_know--
#define spellid(spell) svs.spl_book[spell].sp_id
#define spellknow(spell) svs.spl_book[spell].sp_know
/* how much Pw a spell of level lvl costs to cast? */
#define SPELL_LEV_PW(lvl) ((lvl) * 5)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 sym.h */
/* NetHack 3.7 sym.h $NHDT-Date: $ $NHDT-Branch: $ $NHDT-Revision: $ */
/* Copyright (c) 2016 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
@@ -105,6 +105,7 @@ struct symsetentry {
#define is_cmap_water(i) ((i) == S_pool || (i) == S_water)
#define is_cmap_lava(i) ((i) == S_lava || (i) == S_lavawall)
#define is_cmap_stairs(i) ((i) >= S_upstair && (i) <= S_brdnladder)
#define is_cmap_engraving(i) ((i) == S_engroom || (i) == S_engrcorr)
/* misc symbol definitions */
enum misc_symbols {

View File

@@ -162,6 +162,7 @@ struct u_roleplay {
boolean blind; /* permanently blind */
boolean nudist; /* has not worn any armor, ever */
boolean deaf; /* permanently deaf */
boolean pauper; /* no starting inventory */
long numbones; /* # of bones files loaded */
};