Make WIZARD unconditional.
This commit is contained in:
+4
-8
@@ -172,16 +172,12 @@
|
||||
* GDBPATH (the path to the system gdb(1) program)
|
||||
*/
|
||||
|
||||
#ifndef WIZARD /* allow for compile-time or Makefile changes */
|
||||
# ifndef KR1ED
|
||||
# define WIZARD "wizard" /* the person allowed to use the -D option */
|
||||
#ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */
|
||||
# define WIZARD_NAME "wizard"
|
||||
#endif
|
||||
|
||||
/* #define SYSCF */ /* use a global configuration */
|
||||
/* #define SYSCF_FILE "sysconf" */ /* global configuration is in a file */
|
||||
# else
|
||||
# define WIZARD
|
||||
# define WIZARD_NAME "wizard"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef GDBPATH
|
||||
# define GDBPATH "/usr/bin/gdb"
|
||||
|
||||
@@ -151,9 +151,7 @@ E NEARDATA struct sinfo {
|
||||
#ifdef PANICLOG
|
||||
int in_paniclog;
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
int wizkit_wishing;
|
||||
#endif
|
||||
} program_state;
|
||||
|
||||
E boolean restoring;
|
||||
|
||||
+1
-21
@@ -172,7 +172,6 @@ E int NDECL(domonability);
|
||||
E int NDECL(doprev_message);
|
||||
E int NDECL(timed_occupation);
|
||||
E int NDECL(doattributes);
|
||||
# ifdef WIZARD
|
||||
E int NDECL(wiz_detect);
|
||||
E int NDECL(wiz_genesis);
|
||||
E int NDECL(wiz_identify);
|
||||
@@ -180,7 +179,6 @@ E int NDECL(wiz_level_tele);
|
||||
E int NDECL(wiz_map);
|
||||
E int NDECL(wiz_where);
|
||||
E int NDECL(wiz_wish);
|
||||
# endif /* WIZARD */
|
||||
#endif /* USE_TRAMPOLI */
|
||||
E void NDECL(reset_occupations);
|
||||
E void FDECL(set_occupation, (int (*)(void),const char *,int));
|
||||
@@ -189,9 +187,7 @@ E char NDECL(pgetchar);
|
||||
E void FDECL(pushch, (CHAR_P));
|
||||
E void FDECL(savech, (CHAR_P));
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
E void NDECL(add_debug_extended_commands);
|
||||
#endif /* WIZARD */
|
||||
E void FDECL(reset_commands, (BOOLEAN_P));
|
||||
E void FDECL(rhack, (char *));
|
||||
E int NDECL(doextlist);
|
||||
@@ -215,9 +211,7 @@ E void FDECL(hangup, (int));
|
||||
E void NDECL(end_of_input);
|
||||
#endif
|
||||
E char NDECL(readchar);
|
||||
#ifdef WIZARD
|
||||
E void NDECL(sanity_check);
|
||||
#endif
|
||||
E char FDECL(yn_function, (const char *, const char *, CHAR_P));
|
||||
E boolean FDECL(paranoid_query, (BOOLEAN_P,const char *));
|
||||
|
||||
@@ -578,9 +572,7 @@ E int FDECL(induced_align, (int));
|
||||
E boolean FDECL(Invocation_lev, (d_level *));
|
||||
E xchar NDECL(level_difficulty);
|
||||
E schar FDECL(lev_by_name, (const char *));
|
||||
#ifdef WIZARD
|
||||
E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *));
|
||||
#endif
|
||||
E int NDECL(donamelevel);
|
||||
E int NDECL(dooverview);
|
||||
E void FDECL(show_overview, (int,int));
|
||||
@@ -726,7 +718,7 @@ E void FDECL(set_savefile_name, (BOOLEAN_P));
|
||||
#ifdef INSURANCE
|
||||
E void FDECL(save_savefile_name, (int));
|
||||
#endif
|
||||
#if defined(WIZARD) && !defined(MICRO)
|
||||
#ifndef MICRO
|
||||
E void NDECL(set_error_savefile);
|
||||
#endif
|
||||
E int NDECL(create_savefile);
|
||||
@@ -742,9 +734,7 @@ E boolean FDECL(can_read_file, (const char *));
|
||||
#endif
|
||||
E boolean FDECL(read_config_file, (const char *, int));
|
||||
E void FDECL(check_recordfile, (const char *));
|
||||
#if defined(WIZARD)
|
||||
E void NDECL(read_wizkit);
|
||||
#endif
|
||||
#ifdef LOADSYMSETS
|
||||
E int FDECL(read_sym_file, (int));
|
||||
E int FDECL(parse_sym_line, (char *,int));
|
||||
@@ -987,9 +977,7 @@ E void FDECL(obj_adjust_light_radius, (struct obj *,int));
|
||||
E int FDECL(candle_light_range, (struct obj *));
|
||||
E int FDECL(arti_light_radius, (struct obj *));
|
||||
E const char *FDECL(arti_light_description, (struct obj *));
|
||||
#ifdef WIZARD
|
||||
E int NDECL(wiz_light_sources);
|
||||
#endif
|
||||
|
||||
/* ### lock.c ### */
|
||||
|
||||
@@ -1260,9 +1248,7 @@ E void FDECL(dealloc_obj, (struct obj *));
|
||||
E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P));
|
||||
E long FDECL(peek_at_iced_corpse_age, (struct obj *));
|
||||
E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P));
|
||||
#ifdef WIZARD
|
||||
E void NDECL(obj_sanity_check);
|
||||
#endif
|
||||
|
||||
/* ### mkroom.c ### */
|
||||
|
||||
@@ -1896,9 +1882,7 @@ E void FDECL(do_genocide, (int));
|
||||
E void FDECL(punish, (struct obj *));
|
||||
E void NDECL(unpunish);
|
||||
E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *));
|
||||
#ifdef WIZARD
|
||||
E boolean NDECL(create_particular);
|
||||
#endif
|
||||
|
||||
/* ### rect.c ### */
|
||||
|
||||
@@ -2000,9 +1984,7 @@ E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P));
|
||||
E void FDECL(save_oracles, (int,int));
|
||||
E void FDECL(restore_oracles, (int));
|
||||
E int FDECL(doconsult, (struct monst *));
|
||||
#ifdef WIZARD
|
||||
E void NDECL(rumor_check);
|
||||
#endif
|
||||
|
||||
/* ### save.c ### */
|
||||
|
||||
@@ -2263,10 +2245,8 @@ E boolean FDECL(obj_is_local, (struct obj *));
|
||||
E void FDECL(save_timers, (int,int,int));
|
||||
E void FDECL(restore_timers, (int,int,BOOLEAN_P,long));
|
||||
E void FDECL(relink_timers, (BOOLEAN_P));
|
||||
#ifdef WIZARD
|
||||
E int NDECL(wiz_timeout_queue);
|
||||
E void NDECL(timer_sanity_check);
|
||||
#endif
|
||||
|
||||
/* ### topten.c ### */
|
||||
|
||||
|
||||
@@ -174,10 +174,8 @@ struct instance_flags {
|
||||
coord travelcc; /* coordinates for travel_cache */
|
||||
boolean window_inited; /* true if init_nhwindows() completed */
|
||||
boolean vision_inited; /* true if vision is ready */
|
||||
#ifdef WIZARD
|
||||
boolean sanity_check; /* run sanity checks */
|
||||
boolean mon_polycontrol; /* debug: control monster polymorphs */
|
||||
#endif
|
||||
/* stuff that is related to options and/or user or platform preferences */
|
||||
unsigned msg_history; /* hint: # of top lines to save */
|
||||
int menu_headings; /* ATR for menu headings */
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#define doprev_message() doprev_message_()
|
||||
#define timed_occupation() timed_occupation_()
|
||||
#define wiz_attributes() wiz_attributes_()
|
||||
#ifdef WIZARD
|
||||
#define wiz_detect() wiz_detect_()
|
||||
#define wiz_genesis() wiz_genesis_()
|
||||
#define wiz_identify() wiz_identify_()
|
||||
@@ -36,7 +35,6 @@
|
||||
#define wiz_map() wiz_map_()
|
||||
#define wiz_where() wiz_where_()
|
||||
#define wiz_wish() wiz_wish_()
|
||||
#endif
|
||||
|
||||
/* ### display.c ### */
|
||||
#define doredraw() doredraw_()
|
||||
|
||||
+1
-10
@@ -30,20 +30,11 @@
|
||||
#ifdef HACKDIR
|
||||
# undef HACKDIR
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
# undef WIZARD
|
||||
#endif
|
||||
#ifdef WIZARD_NAME
|
||||
# undef WIZARD_NAME
|
||||
#endif
|
||||
#define HACKDIR Local_HACKDIR
|
||||
#ifndef KR1ED
|
||||
# define WIZARD Local_WIZARD
|
||||
# define WIZARD_NAME WIZARD
|
||||
#else
|
||||
# define WIZARD 1
|
||||
# define WIZARD_NAME Local_WIZARD
|
||||
#endif
|
||||
#define WIZARD_NAME Local_WIZARD
|
||||
#ifndef SYSCF
|
||||
# define SYSCF
|
||||
#endif
|
||||
|
||||
@@ -35,9 +35,7 @@ boolean resuming;
|
||||
monstr_init(); /* monster strengths */
|
||||
objects_init();
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard) add_debug_extended_commands();
|
||||
#endif
|
||||
|
||||
/* if a save file created in normal mode is now being restored in
|
||||
explore mode, treat it as normal restore followed by 'X' command
|
||||
@@ -384,10 +382,8 @@ boolean resuming;
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
if (iflags.sanity_check)
|
||||
sanity_check();
|
||||
#endif
|
||||
|
||||
#ifdef CLIPPING
|
||||
/* just before rhack */
|
||||
@@ -525,9 +521,7 @@ newgame()
|
||||
|
||||
mklev();
|
||||
u_on_upstairs();
|
||||
#ifdef WIZARD
|
||||
if (wizard) obj_delivery(FALSE); /* finish wizkit */
|
||||
#endif
|
||||
vision_reset(); /* set up internals for level (after mklev) */
|
||||
check_special_room(FALSE);
|
||||
|
||||
|
||||
@@ -698,7 +698,6 @@ int propidx; /* special cases can have negative values */
|
||||
/*
|
||||
* Restrict the source of the attributes just to debug mode for now
|
||||
*/
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
static NEARDATA const char because_of[] = " because of %s";
|
||||
|
||||
@@ -745,7 +744,6 @@ int propidx; /* special cases can have negative values */
|
||||
}
|
||||
|
||||
} /*wizard*/
|
||||
#endif
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
+2
-23
@@ -312,10 +312,7 @@ can_make_bones()
|
||||
|
||||
if(depth(&u.uz) <= 0 || /* bulletproofing for endgame */
|
||||
(!rn2(1 + (depth(&u.uz)>>2)) /* fewer ghosts on low levels */
|
||||
#ifdef WIZARD
|
||||
&& !wizard
|
||||
#endif
|
||||
)) return FALSE;
|
||||
&& !wizard)) return FALSE;
|
||||
/* don't let multiple restarts generate multiple copies of objects
|
||||
* in bones files */
|
||||
if (discover) return FALSE;
|
||||
@@ -344,23 +341,19 @@ struct obj *corpse;
|
||||
fd = open_bonesfile(&u.uz, &bonesid);
|
||||
if (fd >= 0) {
|
||||
(void) close(fd);
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
if (yn("Bones file already exists. Replace it?") == 'y') {
|
||||
if (delete_bonesfile(&u.uz)) goto make_bones;
|
||||
else pline("Cannot unlink old bones.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* compression can change the file's name, so must
|
||||
wait until after any attempt to delete this file */
|
||||
compress_bonesfile();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
make_bones:
|
||||
#endif
|
||||
unleash_all();
|
||||
/* in case these characters are not in their home bases */
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
@@ -488,10 +481,8 @@ struct obj *corpse;
|
||||
|
||||
fd = create_bonesfile(&u.uz, &bonesid, whynot);
|
||||
if(fd < 0) {
|
||||
#ifdef WIZARD
|
||||
if(wizard)
|
||||
pline1(whynot);
|
||||
#endif
|
||||
/* bones file creation problems are silent to the player.
|
||||
* Keep it that way, but place a clue into the paniclog.
|
||||
*/
|
||||
@@ -520,10 +511,8 @@ struct obj *corpse;
|
||||
savefruitchn(fd, COUNT_SAVE);
|
||||
bflush(fd);
|
||||
if (bytes_counted > freediskspace(bones)) { /* not enough room */
|
||||
# ifdef WIZARD
|
||||
if (wizard)
|
||||
pline("Insufficient space to create bones file.");
|
||||
# endif
|
||||
(void) close(fd);
|
||||
cancel_bonesfile();
|
||||
return;
|
||||
@@ -556,23 +545,18 @@ getbones()
|
||||
|
||||
/* wizard check added by GAN 02/05/87 */
|
||||
if(rn2(3) /* only once in three times do we find bones */
|
||||
#ifdef WIZARD
|
||||
&& !wizard
|
||||
#endif
|
||||
) return(0);
|
||||
if(no_bones_level(&u.uz)) return(0);
|
||||
fd = open_bonesfile(&u.uz, &bonesid);
|
||||
if (fd < 0) return(0);
|
||||
|
||||
if (validate(fd, bones) != 0) {
|
||||
#ifdef WIZARD
|
||||
if (!wizard)
|
||||
#endif
|
||||
pline("Discarding unuseable bones; no need to panic...");
|
||||
ok = FALSE;
|
||||
} else {
|
||||
ok = TRUE;
|
||||
#ifdef WIZARD
|
||||
if(wizard) {
|
||||
if(yn("Get bones?") == 'n') {
|
||||
(void) close(fd);
|
||||
@@ -580,7 +564,6 @@ getbones()
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
mread(fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */
|
||||
mread(fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */
|
||||
if (strcmp(bonesid, oldbonesid) != 0) {
|
||||
@@ -588,12 +571,10 @@ getbones()
|
||||
|
||||
Sprintf(errbuf, "This is bones level '%s', not '%s'!",
|
||||
oldbonesid, bonesid);
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
pline1(errbuf);
|
||||
ok = FALSE; /* won't die of trickery */
|
||||
}
|
||||
#endif
|
||||
trickery(errbuf);
|
||||
} else {
|
||||
register struct monst *mtmp;
|
||||
@@ -610,7 +591,7 @@ getbones()
|
||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (has_mname(mtmp)) sanitize_name(MNAME(mtmp));
|
||||
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
||||
#if defined(DEBUG) && defined(WIZARD)
|
||||
#if defined(DEBUG)
|
||||
if (wizard)
|
||||
pline("Removing defunct monster %s from bones.",
|
||||
mtmp->data->mname);
|
||||
@@ -627,14 +608,12 @@ getbones()
|
||||
(void) close(fd);
|
||||
sanitize_engravings();
|
||||
|
||||
#ifdef WIZARD
|
||||
if(wizard) {
|
||||
if(yn("Unlink bones?") == 'n') {
|
||||
compress_bonesfile();
|
||||
return(ok);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!delete_bonesfile(&u.uz)) {
|
||||
/* When N games try to simultaneously restore the same
|
||||
* bones file, N-1 of them will fail to delete it
|
||||
|
||||
@@ -126,7 +126,6 @@ STATIC_PTR int NDECL(domonability);
|
||||
STATIC_PTR int NDECL(dooverview_or_wiz_where);
|
||||
STATIC_PTR int NDECL(dotravel);
|
||||
STATIC_PTR int NDECL(doterrain);
|
||||
# ifdef WIZARD
|
||||
STATIC_PTR int NDECL(wiz_wish);
|
||||
STATIC_PTR int NDECL(wiz_identify);
|
||||
STATIC_PTR int NDECL(wiz_map);
|
||||
@@ -164,7 +163,6 @@ STATIC_DCL int NDECL(wiz_port_debug);
|
||||
# endif
|
||||
STATIC_PTR int NDECL(wiz_rumor_check);
|
||||
STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*))));
|
||||
# endif /* WIZARD */
|
||||
STATIC_PTR int NDECL(doattributes);
|
||||
STATIC_PTR int NDECL(doconduct); /**/
|
||||
|
||||
@@ -514,9 +512,7 @@ int
|
||||
enter_explore_mode(VOID_ARGS)
|
||||
{
|
||||
if (wizard) {
|
||||
#ifdef WIZARD
|
||||
You("are in debug mode.");
|
||||
#endif
|
||||
} else if (discover) {
|
||||
You("are already in explore mode.");
|
||||
} else {
|
||||
@@ -538,16 +534,11 @@ enter_explore_mode(VOID_ARGS)
|
||||
STATIC_PTR int
|
||||
dooverview_or_wiz_where(VOID_ARGS)
|
||||
{
|
||||
#ifdef WIZARD
|
||||
if (wizard) return wiz_where();
|
||||
else
|
||||
#endif
|
||||
dooverview();
|
||||
else dooverview();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
|
||||
/* ^W command - wish for something */
|
||||
STATIC_PTR int
|
||||
wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */
|
||||
@@ -1063,7 +1054,6 @@ wiz_rumor_check(VOID_ARGS)
|
||||
rumor_check();
|
||||
return 0;
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
/* #terrain command */
|
||||
STATIC_PTR int
|
||||
@@ -1091,7 +1081,6 @@ doterrain(VOID_ARGS)
|
||||
add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE,
|
||||
"full map without monsters, objects, and traps",
|
||||
MENU_UNSELECTED);
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
any.a_int = 3;
|
||||
add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE,
|
||||
@@ -1102,7 +1091,6 @@ doterrain(VOID_ARGS)
|
||||
"legend of base-36 levl[][].typ codes",
|
||||
MENU_UNSELECTED);
|
||||
}
|
||||
#endif
|
||||
end_menu(men, "View which?");
|
||||
|
||||
n = select_menu(men, PICK_ONE, &sel);
|
||||
@@ -1121,10 +1109,8 @@ doterrain(VOID_ARGS)
|
||||
switch (which) {
|
||||
case 1: reveal_terrain(FALSE); break; /* known map */
|
||||
case 2: reveal_terrain(TRUE); break; /* full map */
|
||||
#ifdef WIZARD
|
||||
case 3: wiz_map_levltyp(); break; /* map internals */
|
||||
case 4: wiz_levltyp_legend(); break; /* internal details */
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
return 0; /* no time elapses */
|
||||
@@ -1584,9 +1570,7 @@ int final;
|
||||
you_are("buried", "");
|
||||
} else {
|
||||
Strcpy(buf, "being strangled");
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT));
|
||||
#endif
|
||||
you_are(buf, from_what(STRANGLED));
|
||||
}
|
||||
}
|
||||
@@ -1639,9 +1623,7 @@ int final;
|
||||
} /* (u.utrap) */
|
||||
if (u.uswallow) {
|
||||
Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck));
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim);
|
||||
#endif
|
||||
you_are(buf, "");
|
||||
} else if (u.ustuck) {
|
||||
Sprintf(buf, "%s %s",
|
||||
@@ -1662,13 +1644,11 @@ int final;
|
||||
/* when mounted, Wounded_legs applies to steed rather than to
|
||||
hero; we only report steed's wounded legs in wizard mode */
|
||||
if (u.usteed) { /* not `Riding' here */
|
||||
# ifdef WIZARD
|
||||
if (wizard) {
|
||||
Strcpy(buf, steedname);
|
||||
*buf = highc(*buf);
|
||||
enl_msg(buf, " has", " had", " wounded legs", "");
|
||||
}
|
||||
# endif
|
||||
} else {
|
||||
Sprintf(buf, "wounded %s", makeplural(body_part(LEG)));
|
||||
you_have(buf, "");
|
||||
@@ -1685,9 +1665,7 @@ int final;
|
||||
if (Sleepy) {
|
||||
if (magic || cause_known(SLEEPY)) {
|
||||
Strcpy(buf, from_what(SLEEPY));
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%ld)", (HSleepy & TIMEOUT));
|
||||
#endif
|
||||
enl_msg("You ", "fall", "fell", " asleep uncontrollably", buf);
|
||||
}
|
||||
}
|
||||
@@ -1788,12 +1766,10 @@ int final;
|
||||
else if (u.ualign.record >= -3) you_have("strayed","");
|
||||
else if (u.ualign.record >= -8) you_have("sinned","");
|
||||
else you_have("transgressed","");
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
Sprintf(buf, " %d", u.ualign.record);
|
||||
enl_msg("Your alignment ", "is", "was", buf, "");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*** Resistances to troubles ***/
|
||||
if (Invulnerable) you_are("invulnerable",from_what(INVULNERABLE));
|
||||
@@ -1977,9 +1953,7 @@ int final;
|
||||
if (Upolyd) {
|
||||
if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form");
|
||||
else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname));
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
|
||||
#endif
|
||||
you_are(buf,"");
|
||||
if (lays_eggs(youmonst.data) && flags.female)
|
||||
you_can("lay eggs", "");
|
||||
@@ -2000,14 +1974,9 @@ int final;
|
||||
Sprintf(buf, "%s%slucky",
|
||||
ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "",
|
||||
Luck < 0 ? "un" : "");
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%d)", Luck);
|
||||
#endif
|
||||
you_are(buf,"");
|
||||
}
|
||||
#ifdef WIZARD
|
||||
else if (wizard) enl_msg("Your luck ", "is", "was", " zero","");
|
||||
#endif
|
||||
} else if (wizard) enl_msg("Your luck ", "is", "was", " zero","");
|
||||
if (u.moreluck > 0) you_have("extra luck","");
|
||||
else if (u.moreluck < 0) you_have("reduced luck","");
|
||||
if (carrying(LUCKSTONE) || stone_luck(TRUE)) {
|
||||
@@ -2021,9 +1990,7 @@ int final;
|
||||
if (u.ugangr) {
|
||||
Sprintf(buf, " %sangry with you",
|
||||
u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : "");
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr);
|
||||
#endif
|
||||
enl_msg(u_gname(), " is", " was", buf,"");
|
||||
} else
|
||||
/*
|
||||
@@ -2039,9 +2006,7 @@ int final;
|
||||
#else
|
||||
Sprintf(buf, "%ssafely pray", can_pray(FALSE) ? "" : "not ");
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt);
|
||||
#endif
|
||||
you_can(buf,"");
|
||||
}
|
||||
if (wizard) {
|
||||
@@ -2301,25 +2266,21 @@ int final;
|
||||
|
||||
if (!u.uconduct.weaphit)
|
||||
you_have_never("hit with a wielded weapon");
|
||||
#ifdef WIZARD
|
||||
else if (wizard) {
|
||||
Sprintf(buf, "used a wielded weapon %ld time%s",
|
||||
u.uconduct.weaphit, plur(u.uconduct.weaphit));
|
||||
you_have_X(buf);
|
||||
}
|
||||
#endif
|
||||
if (!u.uconduct.killer)
|
||||
you_have_been("a pacifist");
|
||||
|
||||
if (!u.uconduct.literate)
|
||||
you_have_been("illiterate");
|
||||
#ifdef WIZARD
|
||||
else if (wizard) {
|
||||
Sprintf(buf, "read items or engraved %ld time%s",
|
||||
u.uconduct.literate, plur(u.uconduct.literate));
|
||||
you_have_X(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
ngenocided = num_genocides();
|
||||
if (ngenocided == 0) {
|
||||
@@ -2332,23 +2293,19 @@ int final;
|
||||
|
||||
if (!u.uconduct.polypiles)
|
||||
you_have_never("polymorphed an object");
|
||||
#ifdef WIZARD
|
||||
else if (wizard) {
|
||||
Sprintf(buf, "polymorphed %ld item%s",
|
||||
u.uconduct.polypiles, plur(u.uconduct.polypiles));
|
||||
you_have_X(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!u.uconduct.polyselfs)
|
||||
you_have_never("changed form");
|
||||
#ifdef WIZARD
|
||||
else if (wizard) {
|
||||
Sprintf(buf, "changed form %ld time%s",
|
||||
u.uconduct.polyselfs, plur(u.uconduct.polyselfs));
|
||||
you_have_X(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!u.uconduct.wishes)
|
||||
you_have_X("used no wishes");
|
||||
@@ -2381,22 +2338,18 @@ int final;
|
||||
|
||||
static const struct func_tab cmdlist[] = {
|
||||
{C('d'), FALSE, dokick}, /* "D" is for door!...? Msg is in dokick.c */
|
||||
#ifdef WIZARD
|
||||
{C('e'), TRUE, wiz_detect},
|
||||
{C('f'), TRUE, wiz_map},
|
||||
{C('g'), TRUE, wiz_genesis},
|
||||
{C('i'), TRUE, wiz_identify},
|
||||
#endif
|
||||
{C('l'), TRUE, doredraw}, /* if number_pad is set */
|
||||
{C('n'), TRUE, donamelevel}, /* if number_pad is set */
|
||||
{C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */
|
||||
{C('p'), TRUE, doprev_message},
|
||||
{C('r'), TRUE, doredraw},
|
||||
{C('t'), TRUE, dotele},
|
||||
#ifdef WIZARD
|
||||
{C('v'), TRUE, wiz_level_tele},
|
||||
{C('w'), TRUE, wiz_wish},
|
||||
#endif
|
||||
{C('x'), TRUE, doattributes},
|
||||
{C('z'), TRUE, dosuspend_core},
|
||||
{'a', FALSE, doapply},
|
||||
@@ -2532,7 +2485,6 @@ struct ext_func_tab extcmdlist[] = {
|
||||
doextversion, TRUE},
|
||||
{"wipe", "wipe off your face", dowipe, FALSE},
|
||||
{"?", "get this list of extended commands", doextlist, TRUE},
|
||||
#if defined(WIZARD)
|
||||
/*
|
||||
* There must be a blank entry here for every entry in the table
|
||||
* below.
|
||||
@@ -2559,11 +2511,9 @@ struct ext_func_tab extcmdlist[] = {
|
||||
#endif
|
||||
{(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */
|
||||
{(char *)0, (char *)0, donull, TRUE}, /* wmode */
|
||||
#endif
|
||||
{(char *)0, (char *)0, donull, TRUE} /* sentinel */
|
||||
};
|
||||
|
||||
#ifdef WIZARD
|
||||
/* there must be a placeholder in the table above for every entry here */
|
||||
static const struct ext_func_tab debug_extcmdlist[] = {
|
||||
{"levelchange", "change experience level", wiz_level_change, TRUE},
|
||||
@@ -2882,8 +2832,6 @@ wiz_migrate_mons()
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WIZARD */
|
||||
|
||||
#define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c))
|
||||
#define unmeta(c) (0x7f & (c))
|
||||
|
||||
@@ -3371,11 +3319,7 @@ const char *msg;
|
||||
sym = highc(sym);
|
||||
ctrl = (sym - 'A') + 1;
|
||||
if ((explain = dowhatdoes_core(ctrl, buf2))
|
||||
&& (!index(wiz_only_list, sym)
|
||||
#ifdef WIZARD
|
||||
|| wizard
|
||||
#endif
|
||||
)) {
|
||||
&& (!index(wiz_only_list, sym) || wizard)) {
|
||||
Sprintf(buf, "Are you trying to use ^%c%s?", sym,
|
||||
index(wiz_only_list, sym) ? "" :
|
||||
" as specified in the Guidebook");
|
||||
|
||||
@@ -1029,9 +1029,7 @@ boolean at_stairs, falling, portal;
|
||||
newlevel->dlevel = dunlevs_in_dungeon(newlevel);
|
||||
if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */
|
||||
if (!u.uhave.amulet) return; /* must have the Amulet */
|
||||
#ifdef WIZARD
|
||||
if (!wizard) /* wizard ^V can bypass Earth level */
|
||||
#endif
|
||||
assign_level(newlevel, &earth_level); /* (redundant) */
|
||||
}
|
||||
new_ledger = ledger_no(newlevel);
|
||||
@@ -1297,12 +1295,10 @@ boolean at_stairs, falling, portal;
|
||||
mnexto(mtmp);
|
||||
|
||||
if ((mtmp = m_at(u.ux, u.uy)) != 0) {
|
||||
#ifdef WIZARD
|
||||
/* there was an unconditional impossible("mnearto failed")
|
||||
here, but it's not impossible and we're prepared to cope
|
||||
with the situation, so only say something when debugging */
|
||||
if (wizard) pline("(monster in hero's way)");
|
||||
#endif
|
||||
if (!rloc(mtmp, TRUE))
|
||||
/* no room to move it; send it away, to return later */
|
||||
migrate_to_level(mtmp, ledger_no(&u.uz),
|
||||
|
||||
+3
-19
@@ -50,14 +50,12 @@ STATIC_DCL void FDECL(init_level, (int,int,struct proto_dungeon *));
|
||||
STATIC_DCL int FDECL(possible_places, (int, boolean *, struct proto_dungeon *));
|
||||
STATIC_DCL xchar FDECL(pick_level, (boolean *, int));
|
||||
STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *));
|
||||
#ifdef WIZARD
|
||||
STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *));
|
||||
STATIC_DCL boolean FDECL(unreachable_level, (d_level *,BOOLEAN_P));
|
||||
STATIC_DCL void FDECL(tport_menu, (winid,char *,struct lchoice *,
|
||||
d_level *,BOOLEAN_P));
|
||||
STATIC_DCL const char *FDECL(br_string, (int));
|
||||
STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *));
|
||||
#endif
|
||||
|
||||
mapseen *mapseenchn = (struct mapseen *)0;
|
||||
STATIC_DCL mapseen *FDECL(load_mapseen, (int));
|
||||
@@ -521,10 +519,7 @@ init_level(dgn, proto_index, pd)
|
||||
struct tmplevel *tlevel = &pd->tmplevel[proto_index];
|
||||
|
||||
pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */
|
||||
#ifdef WIZARD
|
||||
if (!wizard)
|
||||
#endif
|
||||
if (tlevel->chance <= rn2(100)) return;
|
||||
if (!wizard && tlevel->chance <= rn2(100)) return;
|
||||
|
||||
pd->final_lev[proto_index] = new_level =
|
||||
(s_level *) alloc(sizeof(s_level));
|
||||
@@ -742,10 +737,8 @@ init_dungeons() /* initialize the "dungeon" structs */
|
||||
for (i = 0; i < n_dgns; i++) {
|
||||
Fread((genericptr_t)&pd.tmpdungeon[i],
|
||||
sizeof(struct tmpdungeon), 1, dgn_file);
|
||||
#ifdef WIZARD
|
||||
if(!wizard)
|
||||
#endif
|
||||
if(pd.tmpdungeon[i].chance && (pd.tmpdungeon[i].chance <= rn2(100))) {
|
||||
if(!wizard && pd.tmpdungeon[i].chance
|
||||
&& (pd.tmpdungeon[i].chance <= rn2(100))) {
|
||||
int j;
|
||||
|
||||
/* skip over any levels or branches */
|
||||
@@ -1542,9 +1535,7 @@ const char *nam;
|
||||
(u.uz.dnum == medusa_level.dnum &&
|
||||
dlev.dnum == valley_level.dnum)) &&
|
||||
( /* either wizard mode or else seen and not forgotten */
|
||||
#ifdef WIZARD
|
||||
wizard ||
|
||||
#endif
|
||||
(level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED)) {
|
||||
lev = depth(&slev->dlevel);
|
||||
}
|
||||
@@ -1558,9 +1549,7 @@ const char *nam;
|
||||
idxtoo = (idx >> 8) & 0x00FF;
|
||||
idx &= 0x00FF;
|
||||
if ( /* either wizard mode, or else _both_ sides of branch seen */
|
||||
#ifdef WIZARD
|
||||
wizard ||
|
||||
#endif
|
||||
((level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED &&
|
||||
(level_info[idxtoo].flags & (FORGOTTEN|VISITED)) == VISITED)) {
|
||||
if (ledger_to_dnum(idxtoo) == u.uz.dnum) idx = idxtoo;
|
||||
@@ -1573,8 +1562,6 @@ const char *nam;
|
||||
return lev;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
|
||||
STATIC_OVL boolean
|
||||
unplaced_floater(dptr)
|
||||
struct dungeon *dptr;
|
||||
@@ -1821,7 +1808,6 @@ xchar *rdgn;
|
||||
destroy_nhwindow(win);
|
||||
return 0;
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
/* Record that the player knows about a branch from a level. This function
|
||||
* will determine whether or not it was a "real" branch that was taken.
|
||||
@@ -2560,7 +2546,6 @@ boolean printdun;
|
||||
*/
|
||||
Sprintf(buf, "%sLevel %d:", TAB, i);
|
||||
|
||||
#ifdef WIZARD
|
||||
/* wizmode prints out proto dungeon names for clarity */
|
||||
if (wizard) {
|
||||
s_level *slev;
|
||||
@@ -2568,7 +2553,6 @@ boolean printdun;
|
||||
if ((slev = Is_special(&mptr->lev)) != 0)
|
||||
Sprintf(eos(buf), " [%s]", slev->proto);
|
||||
}
|
||||
#endif
|
||||
/* [perhaps print custom annotation on its own line when it's long] */
|
||||
if (mptr->custom)
|
||||
Sprintf(eos(buf), " (%s)", mptr->custom);
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
/* #define DEBUG */ /* uncomment to enable new eat code debugging */
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef WIZARD
|
||||
#define debugpline if (wizard) pline
|
||||
# else
|
||||
#define debugpline pline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
STATIC_PTR int NDECL(eatmdone);
|
||||
|
||||
@@ -323,7 +323,7 @@ done2()
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE))
|
||||
#if (defined(UNIX) || defined(VMS) || defined(LATTICE))
|
||||
if(wizard) {
|
||||
int c;
|
||||
# ifdef VMS
|
||||
@@ -510,7 +510,7 @@ panic VA_DECL(const char *, str)
|
||||
!program_state.something_worth_saving ?
|
||||
"Program initialization has failed." :
|
||||
"Suddenly, the dungeon collapses.");
|
||||
#if defined(WIZARD) && !defined(MICRO)
|
||||
#ifndef MICRO
|
||||
# if defined(NOTIFY_NETHACK_BUGS)
|
||||
if (!wizard)
|
||||
raw_printf("Report the following error to \"%s\" or at \"%s\".",
|
||||
@@ -531,11 +531,7 @@ panic VA_DECL(const char *, str)
|
||||
free(tmp);
|
||||
} else
|
||||
raw_printf("Report error to \"%s\"%s.",
|
||||
# ifdef WIZARD_NAME /*(KR1ED)*/
|
||||
WIZARD_NAME,
|
||||
# else
|
||||
WIZARD,
|
||||
# endif
|
||||
!program_state.something_worth_saving ? "" :
|
||||
" and it may be possible to rebuild.");
|
||||
}
|
||||
@@ -560,7 +556,7 @@ panic VA_DECL(const char *, str)
|
||||
#ifdef WIN32
|
||||
interject(INTERJECT_PANIC);
|
||||
#endif
|
||||
#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32))
|
||||
#if defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32)
|
||||
if (wizard)
|
||||
NH_abort(); /* generate core dump */
|
||||
#endif
|
||||
@@ -846,12 +842,10 @@ int how;
|
||||
paniclog("trickery", killer.name);
|
||||
killer.name[0] = 0;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
You("are a very tricky wizard, it seems.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* pbuf: holds Sprintf'd output for raw_print and putstr
|
||||
@@ -885,11 +879,7 @@ int how;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((
|
||||
#ifdef WIZARD
|
||||
wizard ||
|
||||
#endif
|
||||
discover) && (how <= GENOCIDED)) {
|
||||
if ((wizard || discover) && (how <= GENOCIDED)) {
|
||||
if (paranoid_query(ParanoidDie, "Die?")) goto die;
|
||||
pline("OK, so you don't %s.",
|
||||
(how == CHOKING) ? "choke" : "die");
|
||||
@@ -1047,9 +1037,7 @@ die:
|
||||
}
|
||||
|
||||
if (bones_ok) {
|
||||
#ifdef WIZARD
|
||||
if (!wizard || paranoid_query(ParanoidBones, "Save bones?"))
|
||||
#endif
|
||||
savebones(how, endtime, corpse);
|
||||
/* corpse may be invalid pointer now so
|
||||
ensure that it isn't used again */
|
||||
|
||||
@@ -836,12 +836,10 @@ doengrave()
|
||||
break;
|
||||
|
||||
case VENOM_CLASS:
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
pline("Writing a poison pen letter??");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case ILLOBJ_CLASS:
|
||||
impossible("You're engraving with an illegal object!");
|
||||
break;
|
||||
|
||||
@@ -171,13 +171,11 @@ const char *drainer; /* cause of death, if drain should be fatal */
|
||||
{
|
||||
register int num;
|
||||
|
||||
#ifdef WIZARD
|
||||
/* override life-drain resistance when handling an explicit
|
||||
wizard mode request to reduce level; never fatal though */
|
||||
if (drainer && !strcmp(drainer, "#levelchange"))
|
||||
drainer = 0;
|
||||
else
|
||||
#endif
|
||||
if (resists_drli(&youmonst)) return;
|
||||
|
||||
if (u.ulevel > 1) {
|
||||
|
||||
+1
-12
@@ -124,12 +124,10 @@ boolean nethack_thinks_it_is_open; /* Does NetHack think it's open? */
|
||||
# endif
|
||||
#endif /*HOLD_LOCKFILE_OPEN*/
|
||||
|
||||
#ifdef WIZARD
|
||||
#define WIZKIT_MAX 128
|
||||
static char wizkit[WIZKIT_MAX];
|
||||
STATIC_DCL FILE *NDECL(fopen_wizkit_file);
|
||||
STATIC_DCL void FDECL(wizkit_addinv, (struct obj *));
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA
|
||||
extern char PATH[]; /* see sys/amiga/amidos.c */
|
||||
@@ -790,10 +788,8 @@ d_level *lev;
|
||||
#else
|
||||
ret = rename(tempname, fq_bones);
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
if (wizard && ret != 0)
|
||||
pline("couldn't rename %s to %s.", tempname, fq_bones);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -899,7 +895,7 @@ int fd;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(WIZARD) && !defined(MICRO)
|
||||
#ifndef MICRO
|
||||
/* change pre-existing savefile name to indicate an error savefile */
|
||||
void
|
||||
set_error_savefile()
|
||||
@@ -1298,9 +1294,7 @@ boolean uncomp;
|
||||
(void) signal(SIGQUIT, SIG_IGN);
|
||||
(void) wait((int *)&i);
|
||||
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
|
||||
# ifdef WIZARD
|
||||
if (wizard) (void) signal(SIGQUIT, SIG_DFL);
|
||||
# endif
|
||||
#else
|
||||
/* I don't think we can really cope with external compression
|
||||
* without signals, so we'll declare that compress failed and
|
||||
@@ -2246,10 +2240,8 @@ int src;
|
||||
#ifdef LOADSYMSETS
|
||||
switch_symbols(TRUE);
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
} else if (match_varname(buf, "WIZKIT", 6)) {
|
||||
(void) strncpy(wizkit, bufp, WIZKIT_MAX-1);
|
||||
#endif
|
||||
#ifdef AMIGA
|
||||
} else if (match_varname(buf, "FONT", 4)) {
|
||||
char *t;
|
||||
@@ -2435,7 +2427,6 @@ OR: Forbid multiline stuff for alternate config sources.
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
STATIC_OVL FILE *
|
||||
fopen_wizkit_file()
|
||||
{
|
||||
@@ -2569,8 +2560,6 @@ read_wizkit()
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /*WIZARD*/
|
||||
|
||||
#ifdef LOADSYMSETS
|
||||
extern struct symsetentry *symset_list; /* options.c */
|
||||
extern struct symparse loadsyms[]; /* drawing.c */
|
||||
|
||||
@@ -182,12 +182,10 @@ boolean isyou;
|
||||
if(!mtmp) pline_The("flow reduces to a trickle.");
|
||||
return;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (isyou && wizard) {
|
||||
if (yn("Dry up fountain?") == 'n')
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/* replace the fountain with ordinary floor */
|
||||
levl[x][y].typ = ROOM;
|
||||
levl[x][y].looted = 0;
|
||||
|
||||
@@ -33,7 +33,6 @@ STATIC_DCL char FDECL(obj_to_let,(struct obj *));
|
||||
|
||||
static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
|
||||
|
||||
#ifdef WIZARD
|
||||
/* wizards can wish for venom, which will become an invisible inventory
|
||||
* item without this. putting it in inv_order would mean venom would
|
||||
* suddenly become a choice for all the inventory-class commands, which
|
||||
@@ -42,7 +41,6 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
|
||||
* around on a bones level for normal players to find.
|
||||
*/
|
||||
static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */
|
||||
#endif
|
||||
|
||||
void
|
||||
assigninvlet(otmp)
|
||||
@@ -1916,7 +1914,6 @@ long* out_cnt;
|
||||
}
|
||||
|
||||
start_menu(win);
|
||||
#ifdef WIZARD
|
||||
if (wizard && iflags.override_ID) {
|
||||
char prompt[BUFSZ];
|
||||
any.a_char = -1;
|
||||
@@ -1927,7 +1924,6 @@ long* out_cnt;
|
||||
add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE,
|
||||
prompt, MENU_UNSELECTED);
|
||||
}
|
||||
#endif
|
||||
nextclass:
|
||||
classcount = 0;
|
||||
any = zeroany; /* set all bits to zero */
|
||||
@@ -1950,12 +1946,10 @@ nextclass:
|
||||
}
|
||||
if (flags.sortpack) {
|
||||
if (*++invlet) goto nextclass;
|
||||
#ifdef WIZARD
|
||||
if (--invlet != venom_inv) {
|
||||
invlet = venom_inv;
|
||||
goto nextclass;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
end_menu(win, (char *) 0);
|
||||
|
||||
|
||||
@@ -633,8 +633,6 @@ struct obj *obj;
|
||||
return "strangely";
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
|
||||
int
|
||||
wiz_light_sources()
|
||||
{
|
||||
@@ -674,6 +672,4 @@ wiz_light_sources()
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* WIZARD */
|
||||
|
||||
/*light.c*/
|
||||
|
||||
+2
-6
@@ -779,7 +779,7 @@ boolean ghostly;
|
||||
mvitals[mndx].born++;
|
||||
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) &&
|
||||
!(mvitals[mndx].mvflags & G_EXTINCT)) {
|
||||
#if defined(DEBUG) && defined(WIZARD)
|
||||
#ifdef DEBUG
|
||||
if (wizard) pline("Automatically extinguished %s.",
|
||||
makeplural(mons[mndx].mname));
|
||||
#endif
|
||||
@@ -925,7 +925,7 @@ register int mmflags;
|
||||
/* if you are to make a specific monster and it has
|
||||
already been genocided, return */
|
||||
if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0);
|
||||
#if defined(WIZARD) && defined(DEBUG)
|
||||
#ifdef DEBUG
|
||||
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
|
||||
pline("Explicitly creating extinct monster %s.",
|
||||
mons[mndx].mname);
|
||||
@@ -1186,12 +1186,9 @@ boolean neverask;
|
||||
int x, y;
|
||||
struct monst *mon;
|
||||
boolean known = FALSE;
|
||||
#ifdef WIZARD
|
||||
boolean ask = (wizard && !neverask);
|
||||
#endif
|
||||
|
||||
while (cnt--) {
|
||||
#ifdef WIZARD
|
||||
if (ask) {
|
||||
if (create_particular()) {
|
||||
known = TRUE;
|
||||
@@ -1199,7 +1196,6 @@ boolean neverask;
|
||||
}
|
||||
else ask = FALSE; /* ESC will shut off prompting */
|
||||
}
|
||||
#endif
|
||||
x = u.ux, y = u.uy;
|
||||
/* if in water, try to encourage an aquatic monster
|
||||
by finding and then specifying another wet location */
|
||||
|
||||
+1
-11
@@ -7,11 +7,7 @@
|
||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef WIZARD
|
||||
#define debugpline if (wizard) pline
|
||||
# else
|
||||
#define debugpline pline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */
|
||||
@@ -720,9 +716,7 @@ makelevel()
|
||||
{
|
||||
register int u_depth = depth(&u.uz);
|
||||
|
||||
#ifdef WIZARD
|
||||
if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else
|
||||
#endif
|
||||
if (u_depth > 1 &&
|
||||
u_depth < depth(&medusa_level) &&
|
||||
nroom >= room_threshold &&
|
||||
@@ -1561,11 +1555,7 @@ xchar x, y;
|
||||
}
|
||||
|
||||
/* Already set or 2/3 chance of deferring until a later level. */
|
||||
if (source->dnum < n_dgns || (rn2(3)
|
||||
#ifdef WIZARD
|
||||
&& !wizard
|
||||
#endif
|
||||
)) return;
|
||||
if (source->dnum < n_dgns || (rn2(3) && !wizard)) return;
|
||||
|
||||
if (! (u.uz.dnum == oracle_level.dnum /* in main dungeon */
|
||||
&& !at_dgn_entrance("The Quest") /* but not Quest's entry */
|
||||
|
||||
@@ -509,7 +509,6 @@ register const char *s;
|
||||
|
||||
} else Strcpy(protofile, "");
|
||||
|
||||
#ifdef WIZARD
|
||||
/* SPLEVTYPE format is "level-choice,level-choice"... */
|
||||
if (wizard && *protofile && sp && sp->rndlevs) {
|
||||
char *ep = getenv("SPLEVTYPE"); /* not nh_getenv */
|
||||
@@ -531,7 +530,6 @@ register const char *s;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(*protofile) {
|
||||
Strcat(protofile, LEV_EXT);
|
||||
|
||||
@@ -10,14 +10,12 @@ STATIC_DCL void FDECL(maybe_adjust_light, (struct obj *,int));
|
||||
STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int));
|
||||
STATIC_DCL void FDECL(container_weight, (struct obj *));
|
||||
STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *));
|
||||
#ifdef WIZARD
|
||||
STATIC_DCL void FDECL(objlist_sanity, (struct obj *,int,const char *));
|
||||
STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *,const char *));
|
||||
STATIC_DCL const char *FDECL(where_name, (struct obj *));
|
||||
STATIC_DCL void FDECL(insane_object,
|
||||
(struct obj *,const char *,const char *,struct monst *));
|
||||
STATIC_DCL void FDECL(check_contained, (struct obj *,const char *));
|
||||
#endif
|
||||
|
||||
/*#define DEBUG_EFFECTS*/ /* show some messages for debugging */
|
||||
|
||||
@@ -1950,7 +1948,6 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */
|
||||
return objcount;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
/* support for wizard-mode's `sanity_check' option */
|
||||
|
||||
static const char NEARDATA /* pline formats for insane_object() */
|
||||
@@ -2144,6 +2141,5 @@ check_contained(container, mesg)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
/*mkobj.c*/
|
||||
|
||||
+3
-12
@@ -67,7 +67,6 @@ mkshop()
|
||||
{
|
||||
register struct mkroom *sroom;
|
||||
int i = -1;
|
||||
#ifdef WIZARD
|
||||
char *ep = (char *)0; /* (init == lint suppression) */
|
||||
|
||||
/* first determine shoptype */
|
||||
@@ -129,7 +128,6 @@ mkshop()
|
||||
}
|
||||
#ifndef MAC
|
||||
gottype:
|
||||
#endif
|
||||
#endif
|
||||
for(sroom = &rooms[0]; ; sroom++){
|
||||
if(sroom->hx < 0) return;
|
||||
@@ -140,11 +138,8 @@ gottype:
|
||||
if(sroom->rtype != OROOM) continue;
|
||||
if(has_dnstairs(sroom) || has_upstairs(sroom))
|
||||
continue;
|
||||
if(
|
||||
#ifdef WIZARD
|
||||
(wizard && ep && sroom->doorct != 0) ||
|
||||
#endif
|
||||
sroom->doorct == 1) break;
|
||||
if( (wizard && ep && sroom->doorct != 0) || sroom->doorct == 1)
|
||||
break;
|
||||
}
|
||||
if (!sroom->rlit) {
|
||||
int x, y;
|
||||
@@ -200,11 +195,7 @@ register boolean strict;
|
||||
continue;
|
||||
} else if(has_upstairs(sroom) || has_dnstairs(sroom))
|
||||
continue;
|
||||
if(sroom->doorct == 1 || !rn2(5)
|
||||
#ifdef WIZARD
|
||||
|| wizard
|
||||
#endif
|
||||
)
|
||||
if(sroom->doorct == 1 || !rn2(5) || wizard)
|
||||
return sroom;
|
||||
}
|
||||
return (struct mkroom *)0;
|
||||
|
||||
@@ -23,9 +23,7 @@ STATIC_DCL void FDECL(dealloc_mextra, (struct mextra *));
|
||||
STATIC_DCL int FDECL(pickvampshape, (struct monst *));
|
||||
STATIC_DCL boolean FDECL(isspecmon, (struct monst *));
|
||||
STATIC_DCL boolean FDECL(validspecmon, (struct monst *,int));
|
||||
#ifdef WIZARD
|
||||
STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int));
|
||||
#endif
|
||||
STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int));
|
||||
|
||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||
@@ -2599,7 +2597,6 @@ int mndx;
|
||||
return TRUE; /* potential new form is ok */
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
/* prevent wizard mode user from specifying invalid vampshifter shape */
|
||||
STATIC_OVL boolean
|
||||
validvamp(mon, mndx_p, monclass)
|
||||
@@ -2638,7 +2635,6 @@ int *mndx_p, monclass;
|
||||
}
|
||||
return (*mndx_p != NON_PM);
|
||||
}
|
||||
#endif /*WIZARD*/
|
||||
|
||||
int
|
||||
select_newcham_form(mon)
|
||||
@@ -2689,7 +2685,6 @@ struct monst *mon;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
/* for debugging: allow control of polymorphed monster */
|
||||
if (wizard && iflags.mon_polycontrol) {
|
||||
char pprompt[BUFSZ], buf[BUFSZ];
|
||||
@@ -2731,7 +2726,6 @@ struct monst *mon;
|
||||
if (is_vampshifter(mon) && !validvamp(mon, &mndx, monclass))
|
||||
mndx = pickvampshape(mon); /* don't resort to arbitrary */
|
||||
}
|
||||
#endif /*WIZARD*/
|
||||
|
||||
/* if no form was specified above, pick one at random now */
|
||||
if (mndx == NON_PM) {
|
||||
|
||||
@@ -1462,9 +1462,7 @@ struct monst *mtmp;
|
||||
typ != LUMP_OF_ROYAL_JELLY &&
|
||||
obj->oclass != AMULET_CLASS &&
|
||||
obj->oclass != RING_CLASS &&
|
||||
#ifdef WIZARD
|
||||
obj->oclass != VENOM_CLASS &&
|
||||
#endif
|
||||
typ != SACK && typ != BAG_OF_HOLDING &&
|
||||
typ != BAG_OF_TRICKS && !Is_candle(obj) &&
|
||||
typ != OILSKIN_SACK && typ != LEASH &&
|
||||
|
||||
@@ -1690,9 +1690,7 @@ static const char *const as_is[] = {
|
||||
"boots", "shoes",
|
||||
"gloves", "lenses", "scales",
|
||||
"gauntlets",
|
||||
#ifdef WIZARD
|
||||
"iron bars",
|
||||
#endif
|
||||
/* both singular and plural are spelled the same */
|
||||
"deer", "fish", "tuna", "yaki", "-hai",
|
||||
"krill", "manes", "ninja", "sheep", "ronin", "roshi", "shito", "tengu",
|
||||
@@ -2188,9 +2186,7 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = {
|
||||
{ "dragon scale mail",
|
||||
ARMOR_CLASS, GRAY_DRAGON_SCALE_MAIL, YELLOW_DRAGON_SCALE_MAIL },
|
||||
{ "sword", WEAPON_CLASS, SHORT_SWORD, KATANA },
|
||||
#ifdef WIZARD
|
||||
{ "venom", VENOM_CLASS, BLINDING_VENOM, ACID_VENOM },
|
||||
#endif
|
||||
{ "gray stone", GEM_CLASS, LUCKSTONE, FLINT },
|
||||
{ "grey stone", GEM_CLASS, LUCKSTONE, FLINT },
|
||||
};
|
||||
@@ -2652,7 +2648,6 @@ struct obj *no_wish;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
/* Wishing in wizard mode can create traps and furniture.
|
||||
* Part I: distinguish between trap and object for the two
|
||||
* types of traps which have corresponding objects: bear trap
|
||||
@@ -2692,7 +2687,6 @@ struct obj *no_wish;
|
||||
the object name and getting a disarmed trap object] */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
retry:
|
||||
/* "grey stone" check must be before general "stone" */
|
||||
@@ -2862,7 +2856,6 @@ srch:
|
||||
goto typfnd;
|
||||
}
|
||||
}
|
||||
#ifdef WIZARD
|
||||
/* Let wizards wish for traps and furniture.
|
||||
* Must come after objects check so wizards can still wish for
|
||||
* trap objects like beartraps.
|
||||
@@ -2979,7 +2972,6 @@ wiztrap:
|
||||
return &zeroobj;
|
||||
}
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
if(!oclass) return((struct obj *)0);
|
||||
any:
|
||||
@@ -3035,16 +3027,12 @@ typfnd:
|
||||
|| typ == ROCK || is_missile(otmp)))))
|
||||
otmp->quan = (long) cnt;
|
||||
|
||||
#ifdef WIZARD
|
||||
if (oclass == VENOM_CLASS) otmp->spe = 1;
|
||||
#endif
|
||||
|
||||
if (spesgn == 0) {
|
||||
spe = otmp->spe;
|
||||
#ifdef WIZARD
|
||||
} else if (wizard) {
|
||||
; /* no alteration to spe */
|
||||
#endif
|
||||
} else if (oclass == ARMOR_CLASS || oclass == WEAPON_CLASS ||
|
||||
is_weptool(otmp) ||
|
||||
(oclass==RING_CLASS && objects[typ].oc_charged)) {
|
||||
|
||||
+1
-33
@@ -138,12 +138,8 @@ static struct Bool_Opt
|
||||
#else
|
||||
{"mail", (boolean *)0, TRUE, SET_IN_FILE},
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
/* for menu debugging only*/
|
||||
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
|
||||
#else
|
||||
{"menu_tab_sep", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
{"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/
|
||||
#ifdef NEWS
|
||||
{"news", &iflags.news, TRUE, DISP_IN_GAME},
|
||||
@@ -177,11 +173,7 @@ static struct Bool_Opt
|
||||
DISP_IN_GAME},
|
||||
#endif
|
||||
{"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME},
|
||||
#ifdef WIZARD
|
||||
{"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME},
|
||||
#else
|
||||
{"sanity_check", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
{"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/
|
||||
#ifdef EXP_ON_BOTL
|
||||
{"showexp", &flags.showexp, FALSE, SET_IN_GAME},
|
||||
@@ -339,12 +331,7 @@ static struct Comp_Opt
|
||||
MAXOCLASSES, SET_IN_GAME },
|
||||
{ "pile_limit", "threshold for \"there are many objects here\"",
|
||||
24, SET_IN_GAME },
|
||||
{ "playmode",
|
||||
#ifdef WIZARD
|
||||
"normal play, non-scoring explore mode, or debug mode",
|
||||
#else
|
||||
"normal play or non-scoring explore mode",
|
||||
#endif
|
||||
{ "playmode", "normal play, non-scoring explore mode, or debug mode",
|
||||
8, DISP_IN_GAME },
|
||||
{ "player_selection", "choose character via dialog or prompts",
|
||||
12, DISP_IN_GAME },
|
||||
@@ -1112,17 +1099,9 @@ STATIC_VAR const struct paranoia_opts {
|
||||
{ PARANOID_QUIT, "quit", 1, "explore", 1,
|
||||
"yes vs y to quit or to enter explore mode" },
|
||||
{ PARANOID_DIE, "die", 1, "death", 2,
|
||||
#ifdef WIZARD
|
||||
"yes vs y to die (explore mode or debug mode)" },
|
||||
#else
|
||||
"yes vs y to die (explore mode only)" },
|
||||
#endif
|
||||
{ PARANOID_BONES, "bones", 1, 0, 0,
|
||||
#ifdef WIZARD
|
||||
"yes vs y to save bones data when dying in debug mode" },
|
||||
#else
|
||||
"(only applicable for debug mode)" },
|
||||
#endif
|
||||
{ PARANOID_HIT, "attack", 1, "hit", 1,
|
||||
"yes vs y to attack a peaceful monster" },
|
||||
{ PARANOID_PRAY, "pray", 1, 0, 0,
|
||||
@@ -2045,12 +2024,7 @@ goodfruit:
|
||||
wizard = FALSE, discover = TRUE;
|
||||
} else if (!strncmpi(op, "debug", 5) ||
|
||||
!strncmpi(op, "wizard", 6)) {
|
||||
#ifdef WIZARD
|
||||
wizard = TRUE, discover = FALSE;
|
||||
#else
|
||||
raw_printf("\"%s\":%s -- debug mode not available.",
|
||||
fullname, op);
|
||||
#endif
|
||||
} else {
|
||||
raw_printf("Invalid value for \"%s\":%s.", fullname, op);
|
||||
}
|
||||
@@ -2868,10 +2842,8 @@ doset()
|
||||
((boolopt[i].optflags == DISP_IN_GAME && pass == 0) ||
|
||||
(boolopt[i].optflags == SET_IN_GAME && pass == 1))) {
|
||||
if (bool_p == &flags.female) continue; /* obsolete */
|
||||
#ifdef WIZARD
|
||||
if (bool_p == &iflags.sanity_check && !wizard) continue;
|
||||
if (bool_p == &iflags.menu_tab_sep && !wizard) continue;
|
||||
#endif
|
||||
if (is_wc_option(boolopt[i].name) &&
|
||||
!wc_supported(boolopt[i].name)) continue;
|
||||
if (is_wc2_option(boolopt[i].name) &&
|
||||
@@ -4162,10 +4134,8 @@ option_help()
|
||||
/* Boolean options */
|
||||
for (i = 0; boolopt[i].name; i++) {
|
||||
if (boolopt[i].addr) {
|
||||
#ifdef WIZARD
|
||||
if (boolopt[i].addr == &iflags.sanity_check && !wizard) continue;
|
||||
if (boolopt[i].addr == &iflags.menu_tab_sep && !wizard) continue;
|
||||
#endif
|
||||
next_opt(datawin, boolopt[i].name);
|
||||
}
|
||||
}
|
||||
@@ -4756,11 +4726,9 @@ void
|
||||
set_playmode()
|
||||
{
|
||||
if (wizard) {
|
||||
#ifdef WIZARD
|
||||
if (authorize_wizard_mode())
|
||||
Strcpy(plname, "wizard");
|
||||
else
|
||||
#endif
|
||||
wizard = FALSE; /* not allowed or not available */
|
||||
/* force explore mode if we didn't make it into wizard mode */
|
||||
discover = !wizard;
|
||||
|
||||
@@ -936,9 +936,7 @@ static const char *help_menu_items[] = {
|
||||
#else
|
||||
#define WIZHLP_SLOT 11
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
"List of wizard-mode commands.",
|
||||
#endif
|
||||
"",
|
||||
(char *)0
|
||||
};
|
||||
@@ -957,10 +955,8 @@ help_menu(sel)
|
||||
|
||||
any = zeroany; /* zero all bits */
|
||||
start_menu(tmpwin);
|
||||
#ifdef WIZARD
|
||||
if (!wizard) help_menu_items[WIZHLP_SLOT] = "",
|
||||
help_menu_items[WIZHLP_SLOT+1] = (char *)0;
|
||||
#endif
|
||||
for (i = 0; help_menu_items[i]; i++)
|
||||
#ifdef PORT_HELP
|
||||
/* port-specific line has a %s in it for the PORT_ID */
|
||||
@@ -1010,10 +1006,8 @@ dohelp()
|
||||
case PORT_HELP_ID: port_help(); break;
|
||||
#endif
|
||||
default:
|
||||
#ifdef WIZARD
|
||||
/* handle slot 11 or 12 */
|
||||
display_file(DEBUGHELP, TRUE);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,7 @@ pline VA_DECL(const char *, line)
|
||||
#ifdef HANGUPHANDLING
|
||||
if (program_state.done_hup) return;
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
if (program_state.wizkit_wishing) return;
|
||||
#endif
|
||||
|
||||
if (index(line, '%')) {
|
||||
Vsprintf(pbuf,line,VA_ARGS);
|
||||
@@ -341,7 +339,6 @@ register struct monst *mtmp;
|
||||
|
||||
info[0] = 0;
|
||||
if (mtmp->mtame) { Strcat(info, ", tame");
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
Sprintf(eos(info), " (%d", mtmp->mtame);
|
||||
if (!mtmp->isminion)
|
||||
@@ -349,7 +346,6 @@ register struct monst *mtmp;
|
||||
EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport);
|
||||
Strcat(info, ")");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (mtmp->mpeaceful) Strcat(info, ", peaceful");
|
||||
if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham])
|
||||
|
||||
@@ -1645,7 +1645,6 @@ dopray()
|
||||
/* set up p_type and p_alignment */
|
||||
if (!can_pray(TRUE)) return 0;
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard && p_type >= 0) {
|
||||
if (yn("Force the gods to be pleased?") == 'y') {
|
||||
u.ublesscnt = 0;
|
||||
@@ -1655,7 +1654,6 @@ dopray()
|
||||
if(p_type < 2) p_type = 3;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
nomul(-3);
|
||||
nomovemsg = "You finish your prayer.";
|
||||
afternmv = prayer_done;
|
||||
|
||||
@@ -129,7 +129,6 @@ boolean talk;
|
||||
int purity;
|
||||
aligntyp original_alignment = u.ualignbase[A_ORIGINAL];
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard && talk) {
|
||||
if (u.ualign.type != original_alignment) {
|
||||
You("are currently %s instead of %s.",
|
||||
@@ -143,7 +142,6 @@ boolean talk;
|
||||
u.ualign.record = MIN_QUEST_ALIGN;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
purity = (u.ualign.record >= MIN_QUEST_ALIGN &&
|
||||
u.ualign.type == original_alignment &&
|
||||
u.ualignbase[A_CURRENT] == original_alignment) ? 1 :
|
||||
|
||||
@@ -461,10 +461,8 @@ boolean
|
||||
skip_pager(common)
|
||||
boolean common;
|
||||
{
|
||||
#ifdef WIZARD
|
||||
/* WIZKIT: suppress plot feedback if starting with quest artifact */
|
||||
if (program_state.wizkit_wishing) return TRUE;
|
||||
#endif
|
||||
if (!(common ? qt_list.common : qt_list.chrole)) {
|
||||
panic("%s: no %s quest text data available",
|
||||
common ? "com_pager" : "qt_pager",
|
||||
|
||||
@@ -1687,7 +1687,6 @@ do_class_genocide()
|
||||
else if (immunecnt || class == S_invisible)
|
||||
You("aren't permitted to genocide such monsters.");
|
||||
else
|
||||
#ifdef WIZARD /* to aid in topology testing; remove pesky monsters */
|
||||
if (wizard && buf[0] == '*') {
|
||||
register struct monst *mtmp, *mtmp2;
|
||||
|
||||
@@ -1701,7 +1700,6 @@ do_class_genocide()
|
||||
pline("Eliminated %d monster%s.", gonecnt, plur(gonecnt));
|
||||
return;
|
||||
} else
|
||||
#endif
|
||||
pline("That %s does not represent any monster.",
|
||||
strlen(buf) == 1 ? "symbol" : "response");
|
||||
continue;
|
||||
@@ -2023,7 +2021,6 @@ struct obj *from_obj;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
/*
|
||||
* Make a new monster with the type controlled by the user.
|
||||
*
|
||||
@@ -2063,12 +2060,10 @@ create_particular()
|
||||
makehostile = TRUE;
|
||||
}
|
||||
/* decide whether a valid monster was chosen */
|
||||
#ifdef WIZARD
|
||||
if (wizard && (!strcmp(bufp, "*") || !strcmp(bufp, "random"))) {
|
||||
randmonst = TRUE;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
which = name_to_mon(bufp);
|
||||
if (which >= LOW_PM) break; /* got one */
|
||||
monclass = name_to_monclass(bufp, &which);
|
||||
@@ -2089,12 +2084,10 @@ create_particular()
|
||||
if (!randmonst) {
|
||||
firstchoice = which;
|
||||
if (cant_revive(&which, FALSE, (struct obj *)0)) {
|
||||
#ifdef WIZARD /* intentionally redundant... */
|
||||
/* wizard mode can override handling of special monsters */
|
||||
Sprintf(buf, "Creating %s instead; force %s?",
|
||||
mons[which].mname, mons[firstchoice].mname);
|
||||
if (yn(buf) == 'y') which = firstchoice;
|
||||
#endif
|
||||
}
|
||||
whichpm = &mons[which];
|
||||
}
|
||||
@@ -2127,6 +2120,5 @@ create_particular()
|
||||
}
|
||||
return madeany;
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
/*read.c*/
|
||||
|
||||
@@ -137,9 +137,7 @@ add_rect(r)
|
||||
NhRect *r;
|
||||
{
|
||||
if (rect_cnt >= MAXRECT) {
|
||||
#ifdef WIZARD
|
||||
if (wizard) pline("MAXRECT may be too small.");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
/* Check that this NhRect is not included in another one */
|
||||
|
||||
@@ -531,9 +531,7 @@ unsigned int *stuckid, *steedid;
|
||||
/* for wizard mode, issue a reminder; for others, treat it
|
||||
as an attempt to cheat and refuse to restore this file */
|
||||
pline("Saved game was not yours.");
|
||||
#ifdef WIZARD
|
||||
if (!wizard)
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
mread(fd, (genericptr_t) &context, sizeof(struct context_info));
|
||||
@@ -1008,9 +1006,7 @@ boolean ghostly;
|
||||
hpid, pid);
|
||||
else
|
||||
Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev);
|
||||
#ifdef WIZARD
|
||||
if (wizard) pline1(trickbuf);
|
||||
#endif
|
||||
trickery(trickbuf);
|
||||
}
|
||||
restcemetery(fd, &level.bonesinfo);
|
||||
|
||||
@@ -172,7 +172,6 @@ boolean exclude_cookie;
|
||||
return rumor_buf;
|
||||
}
|
||||
|
||||
#ifdef WIZARD
|
||||
/*
|
||||
* test that the true/false rumor boundaries are valid.
|
||||
*/
|
||||
@@ -266,7 +265,6 @@ rumor_check()
|
||||
true_rumor_size = -1; /* don't try to open it again */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
outrumor(truth, mechanism)
|
||||
|
||||
@@ -1391,12 +1391,10 @@ int lev;
|
||||
if (!swapout_oldest())
|
||||
return FALSE;
|
||||
}
|
||||
# ifdef WIZARD
|
||||
if (wizard) {
|
||||
pline("Swapping in `%s'.", from);
|
||||
wait_synch();
|
||||
}
|
||||
# endif
|
||||
copyfile(from, to);
|
||||
(void) unlink(from);
|
||||
level_info[lev].where = ACTIVE;
|
||||
@@ -1423,12 +1421,10 @@ swapout_oldest() {
|
||||
Sprintf(to, "%s%s", permbones, alllevels);
|
||||
set_levelfile_name(from, oldest);
|
||||
set_levelfile_name(to, oldest);
|
||||
# ifdef WIZARD
|
||||
if (wizard) {
|
||||
pline("Swapping out `%s'.", from);
|
||||
wait_synch();
|
||||
}
|
||||
# endif
|
||||
copyfile(from, to);
|
||||
(void) unlink(from);
|
||||
level_info[oldest].where = SWAPPED;
|
||||
|
||||
@@ -510,7 +510,6 @@ struct mkroom *sroom;
|
||||
else if(sy == sroom->hy+1) sy--; else {
|
||||
shk_failed:
|
||||
#ifdef DEBUG
|
||||
# ifdef WIZARD
|
||||
/* Said to happen sometimes, but I have never seen it. */
|
||||
/* Supposedly fixed by fdoor change in mklev.c */
|
||||
if(wizard) {
|
||||
@@ -527,7 +526,6 @@ struct mkroom *sroom;
|
||||
}
|
||||
display_nhwindow(WIN_MESSAGE, FALSE);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@@ -15,11 +15,7 @@
|
||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef WIZARD
|
||||
#define debugpline if (wizard) pline
|
||||
# else
|
||||
#define debugpline pline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "sp_lev.h"
|
||||
|
||||
@@ -177,10 +177,8 @@ doride()
|
||||
if (u.usteed) {
|
||||
dismount_steed(DISMOUNT_BYCHOICE);
|
||||
} else if (getdir((char *)0) && isok(u.ux+u.dx, u.uy+u.dy)) {
|
||||
#ifdef WIZARD
|
||||
if (wizard && yn("Force the mount to succeed?") == 'y')
|
||||
forcemount = TRUE;
|
||||
#endif
|
||||
return (mount_steed(m_at(u.ux+u.dx, u.uy+u.dy), forcemount));
|
||||
} else {
|
||||
return 0;
|
||||
@@ -225,11 +223,9 @@ mount_steed(mtmp, force)
|
||||
*/
|
||||
if (Wounded_legs) {
|
||||
Your("%s are in no shape for riding.", makeplural(body_part(LEG)));
|
||||
#ifdef WIZARD
|
||||
if (force && wizard && yn("Heal your legs?") == 'y')
|
||||
HWounded_legs = EWounded_legs = 0;
|
||||
else
|
||||
#endif
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string;
|
||||
for usual config, WIZARD is the string; forcing WIZARD_NAME to match it
|
||||
eliminates conditional testing for which one to use in string ops */
|
||||
#ifndef KR1ED
|
||||
# undef WIZARD_NAME
|
||||
# define WIZARD_NAME WIZARD
|
||||
#endif
|
||||
|
||||
struct sysopt sysopt;
|
||||
|
||||
|
||||
+7
-51
@@ -418,14 +418,10 @@ struct obj *scroll;
|
||||
|
||||
/* Disable teleportation in stronghold && Vlad's Tower */
|
||||
if (level.flags.noteleport) {
|
||||
#ifdef WIZARD
|
||||
if (!wizard) {
|
||||
#endif
|
||||
pline("A mysterious force prevents you from teleporting!");
|
||||
return TRUE;
|
||||
#ifdef WIZARD
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* don't show trap if "Sorry..." */
|
||||
@@ -433,15 +429,11 @@ struct obj *scroll;
|
||||
|
||||
if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) {
|
||||
You_feel("disoriented for a moment.");
|
||||
#ifdef WIZARD
|
||||
if (wizard && yn("Override?") != 'y')
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
if ((Teleport_control && !Stunned)
|
||||
#ifdef WIZARD
|
||||
|| wizard
|
||||
#endif
|
||||
) {
|
||||
if (unconscious()) {
|
||||
pline("Being unconscious, you cannot control your teleport.");
|
||||
@@ -519,40 +511,29 @@ dotele()
|
||||
castit = TRUE;
|
||||
break;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (!wizard) {
|
||||
#endif
|
||||
if (!castit) {
|
||||
if (!Teleportation)
|
||||
You("don't know that spell.");
|
||||
else You("are not able to teleport at will.");
|
||||
return(0);
|
||||
}
|
||||
#ifdef WIZARD
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (u.uhunger <= 100 || ACURR(A_STR) < 6) {
|
||||
#ifdef WIZARD
|
||||
if (!wizard) {
|
||||
#endif
|
||||
You("lack the strength %s.",
|
||||
castit ? "for a teleport spell" : "to teleport");
|
||||
return 1;
|
||||
#ifdef WIZARD
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2;
|
||||
if (u.uen <= energy) {
|
||||
#ifdef WIZARD
|
||||
if (wizard)
|
||||
energy = u.uen;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
You("lack the energy %s.",
|
||||
castit ? "for a teleport spell" : "to teleport");
|
||||
return 1;
|
||||
@@ -567,10 +548,7 @@ dotele()
|
||||
exercise(A_WIS, TRUE);
|
||||
if (spelleffects(sp_no, TRUE))
|
||||
return(1);
|
||||
else
|
||||
#ifdef WIZARD
|
||||
if (!wizard)
|
||||
#endif
|
||||
else if (!wizard)
|
||||
return(0);
|
||||
} else {
|
||||
u.uen -= energy;
|
||||
@@ -601,29 +579,19 @@ level_tele()
|
||||
boolean force_dest = FALSE;
|
||||
|
||||
if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz))
|
||||
#ifdef WIZARD
|
||||
&& !wizard
|
||||
#endif
|
||||
) {
|
||||
&& !wizard) {
|
||||
You_feel("very disoriented for a moment.");
|
||||
return;
|
||||
}
|
||||
if ((Teleport_control && !Stunned)
|
||||
#ifdef WIZARD
|
||||
|| wizard
|
||||
#endif
|
||||
) {
|
||||
if ((Teleport_control && !Stunned) || wizard) {
|
||||
char qbuf[BUFSZ];
|
||||
int trycnt = 0;
|
||||
|
||||
Strcpy(qbuf, "To what level do you want to teleport?");
|
||||
do {
|
||||
if (++trycnt == 2) {
|
||||
#ifdef WIZARD
|
||||
if (wizard) Strcat(qbuf, " [type a number or ? for a menu]");
|
||||
else
|
||||
#endif
|
||||
Strcat(qbuf, " [type a number]");
|
||||
else Strcat(qbuf, " [type a number]");
|
||||
}
|
||||
getlin(qbuf, buf);
|
||||
if (!strcmp(buf,"\033")) { /* cancelled */
|
||||
@@ -638,7 +606,6 @@ level_tele()
|
||||
pline("Oops...");
|
||||
goto random_levtport;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (wizard && !strcmp(buf,"?")) {
|
||||
schar destlev = 0;
|
||||
xchar destdnum = 0;
|
||||
@@ -661,9 +628,7 @@ level_tele()
|
||||
}
|
||||
}
|
||||
force_dest = TRUE;
|
||||
} else
|
||||
#endif /*WIZARD*/
|
||||
if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf);
|
||||
} else if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf);
|
||||
} while (!newlev && !digit(buf[0]) &&
|
||||
(buf[0] != '-' || !digit(buf[1])) &&
|
||||
trycnt < 10);
|
||||
@@ -721,7 +686,6 @@ level_tele()
|
||||
You1(shudder_for_moment);
|
||||
return;
|
||||
}
|
||||
#ifdef WIZARD
|
||||
if (In_endgame(&u.uz)) { /* must already be wizard */
|
||||
int llimit = dunlevs_in_dungeon(&u.uz);
|
||||
|
||||
@@ -734,7 +698,6 @@ level_tele()
|
||||
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
killer.name[0] = 0; /* still alive, so far... */
|
||||
|
||||
@@ -800,18 +763,13 @@ level_tele()
|
||||
} else if (u.uz.dnum == medusa_level.dnum &&
|
||||
newlev >= dungeons[u.uz.dnum].depth_start +
|
||||
dunlevs_in_dungeon(&u.uz)) {
|
||||
#ifdef WIZARD
|
||||
if (!(wizard && force_dest))
|
||||
#endif
|
||||
find_hell(&newlevel);
|
||||
} else {
|
||||
/* if invocation did not yet occur, teleporting into
|
||||
* the last level of Gehennom is forbidden.
|
||||
*/
|
||||
#ifdef WIZARD
|
||||
if (!wizard)
|
||||
#endif
|
||||
if (Inhell && !u.uevent.invoked &&
|
||||
if (!wizard && Inhell && !u.uevent.invoked &&
|
||||
newlev >= (dungeons[u.uz.dnum].depth_start +
|
||||
dunlevs_in_dungeon(&u.uz) - 1)) {
|
||||
newlev = dungeons[u.uz.dnum].depth_start +
|
||||
@@ -825,9 +783,7 @@ level_tele()
|
||||
* we must translate newlev to a number relative to the
|
||||
* current dungeon.
|
||||
*/
|
||||
#ifdef WIZARD
|
||||
if (!(wizard && force_dest))
|
||||
#endif
|
||||
get_level(&newlevel, newlev);
|
||||
}
|
||||
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0);
|
||||
|
||||
@@ -1336,10 +1336,8 @@ do_storms()
|
||||
* Check whether object has a timer of type timer_type.
|
||||
*/
|
||||
|
||||
#ifdef WIZARD
|
||||
STATIC_DCL const char *FDECL(kind_name, (SHORT_P));
|
||||
STATIC_DCL void FDECL(print_queue, (winid, timer_element *));
|
||||
#endif
|
||||
STATIC_DCL void FDECL(insert_timer, (timer_element *));
|
||||
STATIC_DCL timer_element *FDECL(remove_timer, (timer_element **, SHORT_P,
|
||||
ANY_P *));
|
||||
@@ -1377,9 +1375,6 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = {
|
||||
};
|
||||
#undef TTAB
|
||||
|
||||
|
||||
#if defined(WIZARD)
|
||||
|
||||
STATIC_OVL const char *
|
||||
kind_name(kind)
|
||||
short kind;
|
||||
@@ -1460,9 +1455,6 @@ timer_sanity_check()
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WIZARD */
|
||||
|
||||
|
||||
/*
|
||||
* Pick off timeout elements from the global queue and call their functions.
|
||||
* Do this until their time is less than or equal to the move count.
|
||||
|
||||
@@ -775,10 +775,8 @@ u_init()
|
||||
if (discover)
|
||||
ini_inv(Wishing);
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard)
|
||||
read_wizkit();
|
||||
#endif
|
||||
|
||||
#ifndef GOLDOBJ
|
||||
u.ugold0 += hidden_gold(); /* in case sack has gold in it */
|
||||
|
||||
+1
-10
@@ -821,9 +821,7 @@ boolean speedy;
|
||||
{
|
||||
return !P_RESTRICTED(skill)
|
||||
&& P_SKILL(skill) < P_MAX_SKILL(skill) && (
|
||||
#ifdef WIZARD
|
||||
(wizard && speedy) ||
|
||||
#endif
|
||||
(P_ADVANCE(skill) >=
|
||||
(unsigned) practice_needed_to_advance(P_SKILL(skill))
|
||||
&& u.skills_advanced < P_SKILL_LIMIT
|
||||
@@ -896,10 +894,8 @@ enhance_weapon_skill()
|
||||
winid win;
|
||||
boolean speedy = FALSE;
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard && yn("Advance skills without practice?") == 'y')
|
||||
speedy = TRUE;
|
||||
#endif
|
||||
|
||||
do {
|
||||
/* find longest available skill name, count those that can advance */
|
||||
@@ -972,7 +968,6 @@ enhance_weapon_skill()
|
||||
prefix = (to_advance + eventually_advance +
|
||||
maxxed_cnt > 0) ? " " : "";
|
||||
(void) skill_level_name(i, sklnambuf);
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
if (!iflags.menu_tab_sep)
|
||||
Sprintf(buf, " %s%-*s %-12s %5d(%4d)",
|
||||
@@ -984,9 +979,7 @@ enhance_weapon_skill()
|
||||
prefix, P_NAME(i), sklnambuf,
|
||||
P_ADVANCE(i),
|
||||
practice_needed_to_advance(P_SKILL(i)));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if (!iflags.menu_tab_sep)
|
||||
Sprintf(buf, " %s %-*s [%s]",
|
||||
prefix, longest, P_NAME(i), sklnambuf);
|
||||
@@ -1001,11 +994,9 @@ enhance_weapon_skill()
|
||||
|
||||
Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" :
|
||||
"Current skills:");
|
||||
#ifdef WIZARD
|
||||
if (wizard && !speedy)
|
||||
Sprintf(eos(buf), " (%d slot%s available)",
|
||||
u.weapon_slots, plur(u.weapon_slots));
|
||||
#endif
|
||||
end_menu(win, buf);
|
||||
n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected);
|
||||
destroy_nhwindow(win);
|
||||
|
||||
@@ -161,10 +161,8 @@ static void process_options(int argc, char **argv)
|
||||
argc--;
|
||||
switch (argv[0][1]) {
|
||||
case 'D':
|
||||
#ifdef WIZARD
|
||||
wizard = TRUE, discover = FALSE;
|
||||
break;
|
||||
#endif
|
||||
/* otherwise fall thru to discover */
|
||||
case 'X':
|
||||
discover = TRUE, wizard = FALSE;
|
||||
@@ -253,12 +251,8 @@ void getlock(void)
|
||||
boolean
|
||||
authorize_wizard_mode()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
/* other ports validate user name or character name here */
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef __begui__
|
||||
|
||||
@@ -284,12 +284,8 @@ finder_file_request(void)
|
||||
boolean
|
||||
authorize_wizard_mode()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
/* other ports validate user name or character name here */
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*macmain.c*/
|
||||
|
||||
+2
-13
@@ -619,9 +619,7 @@ void mac_askname ()
|
||||
fatal("\pCannot create mode menu");
|
||||
AppendMenu(askmenu[RSRC_ASK_MODE], "\pNormal");
|
||||
AppendMenu(askmenu[RSRC_ASK_MODE], "\pExplore");
|
||||
#ifdef WIZARD
|
||||
AppendMenu(askmenu[RSRC_ASK_MODE], "\pDebug");
|
||||
#endif
|
||||
InsertMenu(askmenu[RSRC_ASK_MODE], hierMenu);
|
||||
currmode = 0;
|
||||
|
||||
@@ -708,9 +706,7 @@ void mac_askname ()
|
||||
/* Adjust the mode popup menu */
|
||||
CheckMenuItem(askmenu[RSRC_ASK_MODE], 1, currmode == 0);
|
||||
CheckMenuItem(askmenu[RSRC_ASK_MODE], 2, currmode == 1);
|
||||
#ifdef WIZARD
|
||||
CheckMenuItem(askmenu[RSRC_ASK_MODE], 3, currmode == 2);
|
||||
#endif
|
||||
|
||||
/* Wait for an action on an item */
|
||||
ModalDialog(filter, &item);
|
||||
@@ -773,22 +769,17 @@ void mac_askname ()
|
||||
DisposeUserItemUPP(redraw);
|
||||
|
||||
/* Process the mode */
|
||||
#ifdef WIZARD
|
||||
wizard =
|
||||
#endif
|
||||
discover = 0;
|
||||
wizard = discover = 0;
|
||||
switch (currmode) {
|
||||
case 0: /* Normal */
|
||||
break;
|
||||
case 1: /* Explore */
|
||||
discover = 1;
|
||||
break;
|
||||
#ifdef WIZARD
|
||||
case 2: /* Debug */
|
||||
wizard = 1;
|
||||
strcpy(plname, WIZARD);
|
||||
strcpy(plname, WIZARD_NAME);
|
||||
break;
|
||||
#endif
|
||||
default: /* Quit */
|
||||
ExitToShell();
|
||||
}
|
||||
@@ -935,7 +926,6 @@ AdjustMenus(short dimMenubar)
|
||||
|
||||
if (newMenubar != mbarRegular)
|
||||
; /* we've already found its state */
|
||||
#ifdef WIZARD
|
||||
else if (wizard)
|
||||
{
|
||||
newMenubar = mbarSpecial;
|
||||
@@ -947,7 +937,6 @@ AdjustMenus(short dimMenubar)
|
||||
SetMenuItemText(MHND_FILE, menuFilePlayMode, "\pDebug");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
else if (discover)
|
||||
{
|
||||
|
||||
@@ -702,21 +702,11 @@ port_help()
|
||||
# endif /* MSDOS || WIN32 */
|
||||
#endif /* PORT_HELP */
|
||||
|
||||
/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string;
|
||||
for usual config, WIZARD is the string; forcing WIZARD_NAME to match it
|
||||
eliminates conditional testing for which one to use in string ops */
|
||||
#ifndef KR1ED
|
||||
# undef WIZARD_NAME
|
||||
# define WIZARD_NAME WIZARD
|
||||
#endif
|
||||
|
||||
/* validate wizard mode if player has requested access to it */
|
||||
boolean
|
||||
authorize_wizard_mode()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
if (!strcmp(plname, WIZARD_NAME)) return TRUE;
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-10
@@ -224,13 +224,10 @@ char *argv[];
|
||||
or holds a generic user name like "player" or "games" */
|
||||
plnamesuffix();
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
/* use character name rather than lock letter for file names */
|
||||
locknum = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
/* suppress interrupts while processing lock file */
|
||||
(void) signal(SIGQUIT,SIG_IGN);
|
||||
(void) signal(SIGINT,SIG_IGN);
|
||||
@@ -560,12 +557,10 @@ port_help()
|
||||
boolean
|
||||
authorize_wizard_mode()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
struct passwd *pw = get_unix_pw();
|
||||
if (pw && sysopt.wizards && sysopt.wizards[0]) {
|
||||
if(check_user_string(sysopt.wizards)) return TRUE;
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
wiz_error_flag = TRUE; /* not being allowed into wizard mode */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -574,16 +569,12 @@ static void
|
||||
wd_message()
|
||||
{
|
||||
if (wiz_error_flag) {
|
||||
#ifdef WIZARD
|
||||
if (sysopt.wizards && sysopt.wizards[0]) {
|
||||
char *tmp = build_english_list(sysopt.wizards);
|
||||
pline("Only user%s %s may access debug (wizard) mode.",
|
||||
index(sysopt.wizards, ' ')?"s":"", tmp);
|
||||
free(tmp);
|
||||
} else
|
||||
#else
|
||||
pline("Debug mode is not available.");
|
||||
#endif
|
||||
pline("Entering explore/discovery mode instead.");
|
||||
wizard = 0, discover = 1; /* (paranoia) */
|
||||
} else if (discover)
|
||||
|
||||
@@ -311,9 +311,7 @@ int wt;
|
||||
#endif
|
||||
#ifndef NO_SIGNAL
|
||||
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
|
||||
# ifdef WIZARD
|
||||
if(wizard) (void) signal(SIGQUIT,SIG_DFL);
|
||||
# endif
|
||||
#endif
|
||||
if(wt) {
|
||||
raw_print("");
|
||||
|
||||
+3
-14
@@ -136,13 +136,10 @@ char *argv[];
|
||||
or holds a generic user name like "player" or "games" */
|
||||
plnamesuffix();
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
/* use character name rather than lock letter for file names */
|
||||
locknum = 0;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
/* suppress interrupts while processing lock file */
|
||||
(void) signal(SIGQUIT, SIG_IGN);
|
||||
(void) signal(SIGINT, SIG_IGN);
|
||||
@@ -416,12 +413,10 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
|
||||
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|
||||
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
|
||||
program_state.done_hup = TRUE; /* pretend hangup has been attempted */
|
||||
# if defined(WIZARD) && !defined(BETA)
|
||||
# ifndef BETA
|
||||
if (wizard)
|
||||
# endif /*WIZARD && !BETA*/
|
||||
# if defined(WIZARD) || defined(BETA)
|
||||
# endif /* !BETA */
|
||||
abort(); /* enter the debugger */
|
||||
# endif /*WIZARD || BETA*/
|
||||
}
|
||||
return SS$_RESIGNAL;
|
||||
}
|
||||
@@ -454,9 +449,7 @@ port_help()
|
||||
boolean
|
||||
authorize_wizard_mode()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE;
|
||||
#endif
|
||||
wiz_error_flag = TRUE; /* not being allowed into wizard mode */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -465,12 +458,8 @@ static void
|
||||
wd_message()
|
||||
{
|
||||
if (wiz_error_flag) {
|
||||
#ifdef WIZARD
|
||||
pline("Only user \"%s\" may access debug (wizard) mode.",
|
||||
WIZARD_NAME);
|
||||
#else
|
||||
pline("Debug mode is not available.");
|
||||
#endif
|
||||
pline("Entering explore/discovery mode instead.");
|
||||
wizard = 0, discover = 1; /* (paranoia) */
|
||||
} else if (discover)
|
||||
|
||||
@@ -367,9 +367,7 @@ hack_resume(screen_manip)
|
||||
boolean screen_manip;
|
||||
{
|
||||
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
|
||||
# ifdef WIZARD
|
||||
if (wizard) (void) signal(SIGQUIT,SIG_DFL);
|
||||
# endif
|
||||
if (screen_manip)
|
||||
resume_nhwindows(); /* setup terminal modes, redraw screen, &c */
|
||||
}
|
||||
|
||||
@@ -296,7 +296,6 @@ NHCmdPadCell cells_layout_lookup[NH_CMDPAD_CELLNUM] =
|
||||
{ -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 }
|
||||
};
|
||||
|
||||
#ifdef WIZARD
|
||||
/* wizard mode layout */
|
||||
NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] =
|
||||
{
|
||||
@@ -313,7 +312,6 @@ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] =
|
||||
{ -1, "", "", -NH_CMDPAD_FONT_NORMAL, NH_CELL_REG, 1, (void*)-1 },
|
||||
{ -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 }
|
||||
};
|
||||
#endif
|
||||
|
||||
#else /* !WIN_CE_SMARTPHONE */
|
||||
|
||||
@@ -557,13 +555,11 @@ void register_command_window_class()
|
||||
nhcmdlayout_init(plt, cells_layout_lookup);
|
||||
nhcmdset_add(nhcmdset_current, plt);
|
||||
|
||||
#ifdef WIZARD
|
||||
if( wizard ) {
|
||||
plt = nhcmdlayout_create("Wizard Mode", NH_CMDPAD_ROWS, NH_CMDPAD_COLS);
|
||||
nhcmdlayout_init(plt, cells_layout_wizard);
|
||||
nhcmdset_add(nhcmdset_current, plt);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* ! WIN_CE_SMARTPHONE */
|
||||
plt = nhcmdlayout_create("lowercase", NH_CMDPAD_ROWS, NH_CMDPAD_COLS);
|
||||
|
||||
@@ -340,10 +340,8 @@ register char *s;
|
||||
void win32_abort()
|
||||
{
|
||||
|
||||
#ifdef WIZARD
|
||||
if (wizard)
|
||||
DebugBreak();
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -417,7 +417,7 @@ int *x, *y, *mod;
|
||||
static void
|
||||
really_move_cursor()
|
||||
{
|
||||
#if defined(PORT_DEBUG) && defined(WIZARD)
|
||||
#ifdef PORT_DEBUG
|
||||
char oldtitle[BUFSZ], newtitle[BUFSZ];
|
||||
if (display_cursor_info && wizard) {
|
||||
oldtitle[0] = '\0';
|
||||
|
||||
@@ -236,7 +236,6 @@ extern void NDECL(backsp);
|
||||
|
||||
void win32_abort()
|
||||
{
|
||||
#ifdef WIZARD
|
||||
if (wizard) {
|
||||
# ifdef WIN32CON
|
||||
int c, ci, ct;
|
||||
@@ -263,7 +262,6 @@ void win32_abort()
|
||||
DebugBreak();
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
@@ -1233,9 +1233,6 @@ static const char *build_opts[] = {
|
||||
#ifdef DLB
|
||||
"data librarian",
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
"debug mode",
|
||||
#endif
|
||||
#ifdef EXP_ON_BOTL
|
||||
"experience points on status line",
|
||||
#endif
|
||||
|
||||
@@ -257,11 +257,7 @@ static struct grep_var grep_vars[]={
|
||||
#else
|
||||
{"WIN_CE_SMARTPHONE", 0},
|
||||
#endif
|
||||
#if defined(WIZARD)
|
||||
{"WIZARD", 1},
|
||||
#else
|
||||
{"WIZARD", 0},
|
||||
#endif
|
||||
#if defined(X11_GRAPHICS)
|
||||
{"X11_GRAPHICS", 1},
|
||||
#else
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
# Game Features:
|
||||
@feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR
|
||||
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS WIZARD
|
||||
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS
|
||||
SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS
|
||||
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
|
||||
BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE
|
||||
|
||||
Reference in New Issue
Block a user