Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
are no-op without DEBUG. To show debugging output from a
certain source files, use sysconf:
DEBUGFILES=dungeon.c questpgr.c
Also fix couple debug lines which did not compile.
This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
This commit is contained in:
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#define BETA /* development or beta testing [MRS] */
|
#define BETA /* development or beta testing [MRS] */
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Files expected to exist in the playground directory.
|
* Files expected to exist in the playground directory.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+25
-3
@@ -11,9 +11,31 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For debugging beta code. */
|
#ifdef DEBUG
|
||||||
#ifdef BETA
|
/* due to strstr(), mon.c matches makemon.c */
|
||||||
#define Dpline pline
|
# define showdebug() (sysopt.debugfiles && \
|
||||||
|
((sysopt.debugfiles[0] == '*') || \
|
||||||
|
(strstr( __FILE__ , sysopt.debugfiles))))
|
||||||
|
|
||||||
|
/* GCC understands this syntax */
|
||||||
|
# ifdef __GNUC__
|
||||||
|
/* ... but whines about it anyway without these pragmas. */
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wvariadic-macros"
|
||||||
|
# define debugpline(args...) \
|
||||||
|
do { if (showdebug()) pline( args ); } while(0);
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* and Visual Studio understands this one */
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# define debugpline(...) \
|
||||||
|
do { if (showdebug()) pline(__VA_ARGS__); } while(0);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define showdebug() (0)
|
||||||
|
# define debugpline(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TELL 1
|
#define TELL 1
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ struct sysopt {
|
|||||||
char *recover; /* how to run recover - may be overridden by win port */
|
char *recover; /* how to run recover - may be overridden by win port */
|
||||||
char *wizards;
|
char *wizards;
|
||||||
char *shellers; /* like wizards, for ! command (-DSHELL) */
|
char *shellers; /* like wizards, for ! command (-DSHELL) */
|
||||||
|
char *debugfiles; /* files to show debugplines in. '*' is all. */
|
||||||
int maxplayers;
|
int maxplayers;
|
||||||
/* record file */
|
/* record file */
|
||||||
int persmax;
|
int persmax;
|
||||||
|
|||||||
+1
-3
@@ -1773,9 +1773,7 @@ long timeout;
|
|||||||
char monnambuf[BUFSZ], carriedby[BUFSZ];
|
char monnambuf[BUFSZ], carriedby[BUFSZ];
|
||||||
|
|
||||||
if (!figurine) {
|
if (!figurine) {
|
||||||
#ifdef DEBUG
|
debugpline("null figurine in fig_transform()");
|
||||||
pline("null figurine in fig_transform()");
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
silent = (timeout != monstermoves); /* happened while away */
|
silent = (timeout != monstermoves); /* happened while away */
|
||||||
|
|||||||
+11
-35
@@ -8,8 +8,6 @@
|
|||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
/* #define DEBUG */ /* uncomment for debugging info */
|
|
||||||
|
|
||||||
/* part of the output on gain or loss of attribute */
|
/* part of the output on gain or loss of attribute */
|
||||||
static
|
static
|
||||||
const char * const plusattr[] = {
|
const char * const plusattr[] = {
|
||||||
@@ -349,9 +347,7 @@ exercise(i, inc_or_dec)
|
|||||||
int i;
|
int i;
|
||||||
boolean inc_or_dec;
|
boolean inc_or_dec;
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
debugpline("Exercise:");
|
||||||
pline("Exercise:");
|
|
||||||
#endif
|
|
||||||
if (i == A_INT || i == A_CHA) return; /* can't exercise these */
|
if (i == A_INT || i == A_CHA) return; /* can't exercise these */
|
||||||
|
|
||||||
/* no physical exercise while polymorphed; the body's temporary */
|
/* no physical exercise while polymorphed; the body's temporary */
|
||||||
@@ -368,12 +364,10 @@ boolean inc_or_dec;
|
|||||||
* Note: *YES* ACURR is the right one to use.
|
* Note: *YES* ACURR is the right one to use.
|
||||||
*/
|
*/
|
||||||
AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2);
|
AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2);
|
||||||
#ifdef DEBUG
|
debugpline("%s, %s AEXE = %d",
|
||||||
pline("%s, %s AEXE = %d",
|
|
||||||
(i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" :
|
(i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" :
|
||||||
(i == A_DEX) ? "Dex" : "Con",
|
(i == A_DEX) ? "Dex" : "Con",
|
||||||
(inc_or_dec) ? "inc" : "dec", AEXE(i));
|
(inc_or_dec) ? "inc" : "dec", AEXE(i));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (moves > 0 && (i == A_STR || i == A_CON)) (void)encumber_msg();
|
if (moves > 0 && (i == A_STR || i == A_CON)) (void)encumber_msg();
|
||||||
}
|
}
|
||||||
@@ -398,9 +392,7 @@ exerper()
|
|||||||
(u.uhunger > 50) ? HUNGRY :
|
(u.uhunger > 50) ? HUNGRY :
|
||||||
(u.uhunger > 0) ? WEAK : FAINTING;
|
(u.uhunger > 0) ? WEAK : FAINTING;
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("exerper: Hunger checks");
|
||||||
pline("exerper: Hunger checks");
|
|
||||||
#endif
|
|
||||||
switch (hs) {
|
switch (hs) {
|
||||||
case SATIATED: exercise(A_DEX, FALSE);
|
case SATIATED: exercise(A_DEX, FALSE);
|
||||||
if (Role_if(PM_MONK))
|
if (Role_if(PM_MONK))
|
||||||
@@ -416,9 +408,7 @@ exerper()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Encumberance Checks */
|
/* Encumberance Checks */
|
||||||
#ifdef DEBUG
|
debugpline("exerper: Encumber checks");
|
||||||
pline("exerper: Encumber checks");
|
|
||||||
#endif
|
|
||||||
switch (near_capacity()) {
|
switch (near_capacity()) {
|
||||||
case MOD_ENCUMBER: exercise(A_STR, TRUE); break;
|
case MOD_ENCUMBER: exercise(A_STR, TRUE); break;
|
||||||
case HVY_ENCUMBER: exercise(A_STR, TRUE);
|
case HVY_ENCUMBER: exercise(A_STR, TRUE);
|
||||||
@@ -431,9 +421,7 @@ exerper()
|
|||||||
|
|
||||||
/* status checks */
|
/* status checks */
|
||||||
if(!(moves % 5)) {
|
if(!(moves % 5)) {
|
||||||
#ifdef DEBUG
|
debugpline("exerper: Status checks");
|
||||||
pline("exerper: Status checks");
|
|
||||||
#endif
|
|
||||||
if ((HClairvoyant & (INTRINSIC|TIMEOUT)) &&
|
if ((HClairvoyant & (INTRINSIC|TIMEOUT)) &&
|
||||||
!BClairvoyant) exercise(A_WIS, TRUE);
|
!BClairvoyant) exercise(A_WIS, TRUE);
|
||||||
if (HRegeneration) exercise(A_STR, TRUE);
|
if (HRegeneration) exercise(A_STR, TRUE);
|
||||||
@@ -464,15 +452,11 @@ exerchk()
|
|||||||
/* Check out the periodic accumulations */
|
/* Check out the periodic accumulations */
|
||||||
exerper();
|
exerper();
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if(moves >= context.next_attrib_check)
|
if(moves >= context.next_attrib_check)
|
||||||
pline("exerchk: ready to test. multi = %d.", multi);
|
debugpline("exerchk: ready to test. multi = %d.", multi);
|
||||||
#endif
|
|
||||||
/* Are we ready for a test? */
|
/* Are we ready for a test? */
|
||||||
if(moves >= context.next_attrib_check && !multi) {
|
if(moves >= context.next_attrib_check && !multi) {
|
||||||
#ifdef DEBUG
|
debugpline("exerchk: testing.");
|
||||||
pline("exerchk: testing.");
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* Law of diminishing returns (Part II):
|
* Law of diminishing returns (Part II):
|
||||||
*
|
*
|
||||||
@@ -499,13 +483,11 @@ exerchk()
|
|||||||
exercise/abuse gradually wears off without impact then */
|
exercise/abuse gradually wears off without impact then */
|
||||||
if (Upolyd && i != A_WIS) goto nextattrib;
|
if (Upolyd && i != A_WIS) goto nextattrib;
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("exerchk: testing %s (%d).",
|
||||||
pline("exerchk: testing %s (%d).",
|
|
||||||
(i == A_STR) ? "Str" : (i == A_INT) ? "Int?" :
|
(i == A_STR) ? "Str" : (i == A_INT) ? "Int?" :
|
||||||
(i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" :
|
(i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" :
|
||||||
(i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???",
|
(i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???",
|
||||||
ax);
|
ax);
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* Law of diminishing returns (Part III):
|
* Law of diminishing returns (Part III):
|
||||||
*
|
*
|
||||||
@@ -515,13 +497,9 @@ exerchk()
|
|||||||
if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax)))
|
if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax)))
|
||||||
goto nextattrib;
|
goto nextattrib;
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("exerchk: changing %d.", i);
|
||||||
pline("exerchk: changing %d.", i);
|
|
||||||
#endif
|
|
||||||
if(adjattrib(i, mod_val, -1)) {
|
if(adjattrib(i, mod_val, -1)) {
|
||||||
#ifdef DEBUG
|
debugpline("exerchk: changed %d.", i);
|
||||||
pline("exerchk: changed %d.", i);
|
|
||||||
#endif
|
|
||||||
/* if you actually changed an attrib - zero accumulation */
|
/* if you actually changed an attrib - zero accumulation */
|
||||||
AEXE(i) = ax = 0;
|
AEXE(i) = ax = 0;
|
||||||
/* then print an explanation */
|
/* then print an explanation */
|
||||||
@@ -535,9 +513,7 @@ exerchk()
|
|||||||
AEXE(i) = (abs(ax) / 2) * mod_val;
|
AEXE(i) = (abs(ax) / 2) * mod_val;
|
||||||
}
|
}
|
||||||
context.next_attrib_check += rn1(200,800);
|
context.next_attrib_check += rn1(200,800);
|
||||||
#ifdef DEBUG
|
debugpline("exerchk: next check at %ld.", context.next_attrib_check);
|
||||||
pline("exerchk: next check at %ld.", context.next_attrib_check);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -581,11 +581,9 @@ getbones()
|
|||||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (has_mname(mtmp)) sanitize_name(MNAME(mtmp));
|
if (has_mname(mtmp)) sanitize_name(MNAME(mtmp));
|
||||||
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
||||||
#if defined(DEBUG)
|
|
||||||
if (wizard)
|
if (wizard)
|
||||||
pline("Removing defunct monster %s from bones.",
|
debugpline("Removing defunct monster %s from bones.",
|
||||||
mtmp->data->mname);
|
mtmp->data->mname);
|
||||||
#endif
|
|
||||||
mongone(mtmp);
|
mongone(mtmp);
|
||||||
} else
|
} else
|
||||||
/* to correctly reset named artifacts on the level */
|
/* to correctly reset named artifacts on the level */
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
#include "func_tab.h"
|
#include "func_tab.h"
|
||||||
/* #define DEBUG */ /* uncomment for debugging */
|
|
||||||
|
|
||||||
#ifdef ALTMETA
|
#ifdef ALTMETA
|
||||||
STATIC_VAR boolean alt_esc = FALSE;
|
STATIC_VAR boolean alt_esc = FALSE;
|
||||||
@@ -30,12 +29,8 @@ extern const char *enc_stat[]; /* encumbrance status from botl.c */
|
|||||||
#define CMD_CLICKLOOK (char)0x8F
|
#define CMD_CLICKLOOK (char)0x8F
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/*
|
extern int NDECL(wiz_debug_cmd_bury);
|
||||||
* only one "wiz_debug_cmd" routine should be available (in whatever
|
extern int NDECL(wiz_debug_cmd_traveldisplay);
|
||||||
* module you are trying to debug) or things are going to get rather
|
|
||||||
* hard to link :-)
|
|
||||||
*/
|
|
||||||
extern int NDECL(wiz_debug_cmd);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DUMB /* stuff commented out in extern.h, but needed here */
|
#ifdef DUMB /* stuff commented out in extern.h, but needed here */
|
||||||
@@ -389,11 +384,11 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */
|
|||||||
Sprintf(fmtstr, "%%-%ds", biggest + 15);
|
Sprintf(fmtstr, "%%-%ds", biggest + 15);
|
||||||
}
|
}
|
||||||
if (++i > MAX_EXT_CMD) {
|
if (++i > MAX_EXT_CMD) {
|
||||||
# if defined(DEBUG) || defined(BETA)
|
# if defined(BETA)
|
||||||
impossible(
|
impossible(
|
||||||
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
|
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
|
||||||
MAX_EXT_CMD);
|
MAX_EXT_CMD);
|
||||||
# endif /* DEBUG || BETA */
|
# endif /* BETA */
|
||||||
iflags.extmenu = 0;
|
iflags.extmenu = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -454,7 +449,7 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */
|
|||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
if (matchlevel > (QBUFSZ - 2)) {
|
if (matchlevel > (QBUFSZ - 2)) {
|
||||||
free((genericptr_t)pick_list);
|
free((genericptr_t)pick_list);
|
||||||
# if defined(DEBUG) || defined(BETA)
|
# if defined(BETA)
|
||||||
impossible("Too many chars (%d) entered in extcmd_via_menu()",
|
impossible("Too many chars (%d) entered in extcmd_via_menu()",
|
||||||
matchlevel);
|
matchlevel);
|
||||||
# endif
|
# endif
|
||||||
@@ -2507,7 +2502,8 @@ struct ext_func_tab extcmdlist[] = {
|
|||||||
{(char *)0, (char *)0, donull, TRUE}, /* vision */
|
{(char *)0, (char *)0, donull, TRUE}, /* vision */
|
||||||
{(char *)0, (char *)0, donull, TRUE}, /* wizsmell */
|
{(char *)0, (char *)0, donull, TRUE}, /* wizsmell */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
{(char *)0, (char *)0, donull, TRUE}, /* wizdebug */
|
{(char *)0, (char *)0, donull, TRUE}, /* wizdebug_traveldisplay */
|
||||||
|
{(char *)0, (char *)0, donull, TRUE}, /* wizdebug_bury */
|
||||||
#endif
|
#endif
|
||||||
{(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */
|
{(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */
|
||||||
{(char *)0, (char *)0, donull, TRUE}, /* wmode */
|
{(char *)0, (char *)0, donull, TRUE}, /* wmode */
|
||||||
@@ -2534,7 +2530,8 @@ static const struct ext_func_tab debug_extcmdlist[] = {
|
|||||||
{"vision", "show vision array", wiz_show_vision, TRUE},
|
{"vision", "show vision array", wiz_show_vision, TRUE},
|
||||||
{"wizsmell", "smell monster", wiz_smell, TRUE},
|
{"wizsmell", "smell monster", wiz_smell, TRUE},
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
{"wizdebug", "wizard debug command", wiz_debug_cmd, TRUE},
|
{"wizdebug_traveldisplay", "wizard debug: toggle travel display", wiz_debug_cmd_traveldisplay, TRUE},
|
||||||
|
{"wizdebug_bury", "wizard debug: bury objs under and around you", wiz_debug_cmd_bury, TRUE},
|
||||||
#endif
|
#endif
|
||||||
{"wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, TRUE},
|
{"wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, TRUE},
|
||||||
{"wmode", "show wall modes", wiz_show_wmodes, TRUE},
|
{"wmode", "show wall modes", wiz_show_wmodes, TRUE},
|
||||||
|
|||||||
+24
-76
@@ -26,9 +26,6 @@ STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *));
|
|||||||
STATIC_DCL void FDECL(u_to_e, (struct entity *));
|
STATIC_DCL void FDECL(u_to_e, (struct entity *));
|
||||||
STATIC_DCL void FDECL(set_entity, (int, int, struct entity *));
|
STATIC_DCL void FDECL(set_entity, (int, int, struct entity *));
|
||||||
STATIC_DCL const char *FDECL(e_nam, (struct entity *));
|
STATIC_DCL const char *FDECL(e_nam, (struct entity *));
|
||||||
#ifdef D_DEBUG
|
|
||||||
static const char *FDECL(Enam, (struct entity *)); /* unused */
|
|
||||||
#endif
|
|
||||||
STATIC_DCL const char *FDECL(E_phrase, (struct entity *, const char *));
|
STATIC_DCL const char *FDECL(E_phrase, (struct entity *, const char *));
|
||||||
STATIC_DCL boolean FDECL(e_survives_at, (struct entity *, int, int));
|
STATIC_DCL boolean FDECL(e_survives_at, (struct entity *, int, int));
|
||||||
STATIC_DCL void FDECL(e_died, (struct entity *, int, int));
|
STATIC_DCL void FDECL(e_died, (struct entity *, int, int));
|
||||||
@@ -253,8 +250,8 @@ int x, y;
|
|||||||
(occupants[entitycnt].ex == x) &&
|
(occupants[entitycnt].ex == x) &&
|
||||||
(occupants[entitycnt].ey == y))
|
(occupants[entitycnt].ey == y))
|
||||||
break;
|
break;
|
||||||
|
debugpline("entitycnt = %d", entitycnt);
|
||||||
#ifdef D_DEBUG
|
#ifdef D_DEBUG
|
||||||
pline("entitycnt = %d", entitycnt);
|
|
||||||
wait_synch();
|
wait_synch();
|
||||||
#endif
|
#endif
|
||||||
return((entitycnt == ENTITIES)?
|
return((entitycnt == ENTITIES)?
|
||||||
@@ -319,19 +316,6 @@ struct entity *etmp;
|
|||||||
return(is_u(etmp)? "you" : mon_nam(etmp->emon));
|
return(is_u(etmp)? "you" : mon_nam(etmp->emon));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef D_DEBUG
|
|
||||||
/*
|
|
||||||
* Enam is another unused utility routine: E_phrase is preferable.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const char *
|
|
||||||
Enam(etmp)
|
|
||||||
struct entity *etmp;
|
|
||||||
{
|
|
||||||
return(is_u(etmp)? "You" : Monnam(etmp->emon));
|
|
||||||
}
|
|
||||||
#endif /* D_DEBUG */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generates capitalized entity name, makes 2nd -> 3rd person conversion on
|
* Generates capitalized entity name, makes 2nd -> 3rd person conversion on
|
||||||
* verb, where necessary.
|
* verb, where necessary.
|
||||||
@@ -465,10 +449,8 @@ boolean chunks;
|
|||||||
{
|
{
|
||||||
int misses;
|
int misses;
|
||||||
|
|
||||||
#ifdef D_DEBUG
|
|
||||||
if (chunks)
|
if (chunks)
|
||||||
pline("Do chunks miss?");
|
debugpline("Do chunks miss?");
|
||||||
#endif
|
|
||||||
if (automiss(etmp))
|
if (automiss(etmp))
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
||||||
@@ -488,9 +470,7 @@ boolean chunks;
|
|||||||
if (is_db_wall(etmp->ex, etmp->ey))
|
if (is_db_wall(etmp->ex, etmp->ey))
|
||||||
misses -= 3; /* less airspace */
|
misses -= 3; /* less airspace */
|
||||||
|
|
||||||
#ifdef D_DEBUG
|
debugpline("Miss chance = %d (out of 8)", misses);
|
||||||
pline("Miss chance = %d (out of 8)", misses);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return((boolean)((misses >= rnd(8))? TRUE : FALSE));
|
return((boolean)((misses >= rnd(8))? TRUE : FALSE));
|
||||||
}
|
}
|
||||||
@@ -519,9 +499,7 @@ struct entity *etmp;
|
|||||||
if (is_db_wall(etmp->ex, etmp->ey))
|
if (is_db_wall(etmp->ex, etmp->ey))
|
||||||
tmp -= 2; /* less room to maneuver */
|
tmp -= 2; /* less room to maneuver */
|
||||||
|
|
||||||
#ifdef D_DEBUG
|
debugpline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp);
|
||||||
pline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp);
|
|
||||||
#endif
|
|
||||||
return((boolean)((tmp >= rnd(10))? TRUE : FALSE));
|
return((boolean)((tmp >= rnd(10))? TRUE : FALSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,17 +532,13 @@ struct entity *etmp;
|
|||||||
if (at_portcullis)
|
if (at_portcullis)
|
||||||
pline_The("portcullis misses %s!",
|
pline_The("portcullis misses %s!",
|
||||||
e_nam(etmp));
|
e_nam(etmp));
|
||||||
#ifdef D_DEBUG
|
|
||||||
else
|
else
|
||||||
pline_The("drawbridge misses %s!",
|
debugpline("The drawbridge misses %s!",
|
||||||
e_nam(etmp));
|
e_nam(etmp));
|
||||||
#endif
|
|
||||||
if (e_survives_at(etmp, oldx, oldy))
|
if (e_survives_at(etmp, oldx, oldy))
|
||||||
return;
|
return;
|
||||||
else {
|
else {
|
||||||
#ifdef D_DEBUG
|
debugpline("Mon can't survive here");
|
||||||
pline("Mon can't survive here");
|
|
||||||
#endif
|
|
||||||
if (at_portcullis)
|
if (at_portcullis)
|
||||||
must_jump = TRUE;
|
must_jump = TRUE;
|
||||||
else
|
else
|
||||||
@@ -583,9 +557,7 @@ struct entity *etmp;
|
|||||||
if (at_portcullis) {
|
if (at_portcullis) {
|
||||||
if (e_jumps(etmp)) {
|
if (e_jumps(etmp)) {
|
||||||
relocates = TRUE;
|
relocates = TRUE;
|
||||||
#ifdef D_DEBUG
|
debugpline("Jump succeeds!");
|
||||||
pline("Jump succeeds!");
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
if (e_inview)
|
if (e_inview)
|
||||||
pline("%s crushed by the falling portcullis!",
|
pline("%s crushed by the falling portcullis!",
|
||||||
@@ -598,9 +570,7 @@ struct entity *etmp;
|
|||||||
}
|
}
|
||||||
} else { /* tries to jump off bridge to original square */
|
} else { /* tries to jump off bridge to original square */
|
||||||
relocates = !e_jumps(etmp);
|
relocates = !e_jumps(etmp);
|
||||||
#ifdef D_DEBUG
|
debugpline("Jump %s!", (relocates)? "fails" : "succeeds");
|
||||||
pline("Jump %s!", (relocates)? "fails" : "succeeds");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,17 +580,13 @@ struct entity *etmp;
|
|||||||
* would be inaccessible (i.e. etmp started on drawbridge square) or
|
* would be inaccessible (i.e. etmp started on drawbridge square) or
|
||||||
* unnecessary (i.e. etmp started here) in such a situation.
|
* unnecessary (i.e. etmp started here) in such a situation.
|
||||||
*/
|
*/
|
||||||
#ifdef D_DEBUG
|
debugpline("Doing relocation.");
|
||||||
pline("Doing relocation.");
|
|
||||||
#endif
|
|
||||||
newx = oldx;
|
newx = oldx;
|
||||||
newy = oldy;
|
newy = oldy;
|
||||||
(void)find_drawbridge(&newx, &newy);
|
(void)find_drawbridge(&newx, &newy);
|
||||||
if ((newx == oldx) && (newy == oldy))
|
if ((newx == oldx) && (newy == oldy))
|
||||||
get_wall_for_db(&newx, &newy);
|
get_wall_for_db(&newx, &newy);
|
||||||
#ifdef D_DEBUG
|
debugpline("Checking new square for occupancy.");
|
||||||
pline("Checking new square for occupancy.");
|
|
||||||
#endif
|
|
||||||
if (relocates && (e_at(newx, newy))) {
|
if (relocates && (e_at(newx, newy))) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -631,30 +597,24 @@ struct entity *etmp;
|
|||||||
struct entity *other;
|
struct entity *other;
|
||||||
|
|
||||||
other = e_at(newx, newy);
|
other = e_at(newx, newy);
|
||||||
#ifdef D_DEBUG
|
debugpline("New square is occupied by %s", e_nam(other));
|
||||||
pline("New square is occupied by %s", e_nam(other));
|
|
||||||
#endif
|
|
||||||
if (e_survives_at(other, newx, newy) && automiss(other)) {
|
if (e_survives_at(other, newx, newy) && automiss(other)) {
|
||||||
relocates = FALSE; /* "other" won't budge */
|
relocates = FALSE; /* "other" won't budge */
|
||||||
#ifdef D_DEBUG
|
debugpline("%s suicide.", E_phrase(etmp, "commit"));
|
||||||
pline("%s suicide.", E_phrase(etmp, "commit"));
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef D_DEBUG
|
debugpline("Handling %s", e_nam(other));
|
||||||
pline("Handling %s", e_nam(other));
|
|
||||||
#endif
|
|
||||||
while ((e_at(newx, newy) != 0) &&
|
while ((e_at(newx, newy) != 0) &&
|
||||||
(e_at(newx, newy) != etmp))
|
(e_at(newx, newy) != etmp))
|
||||||
do_entity(other);
|
do_entity(other);
|
||||||
|
debugpline("Checking existence of %s", e_nam(etmp));
|
||||||
#ifdef D_DEBUG
|
#ifdef D_DEBUG
|
||||||
pline("Checking existence of %s", e_nam(etmp));
|
|
||||||
wait_synch();
|
wait_synch();
|
||||||
#endif
|
#endif
|
||||||
if (e_at(oldx, oldy) != etmp) {
|
if (e_at(oldx, oldy) != etmp) {
|
||||||
#ifdef D_DEBUG
|
debugpline("%s moved or died in recursion somewhere",
|
||||||
pline("%s moved or died in recursion somewhere",
|
|
||||||
E_phrase(etmp, "have"));
|
E_phrase(etmp, "have"));
|
||||||
|
#ifdef D_DEBUG
|
||||||
wait_synch();
|
wait_synch();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
@@ -662,9 +622,7 @@ struct entity *etmp;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */
|
if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */
|
||||||
#ifdef D_DEBUG
|
debugpline("Moving %s", e_nam(etmp));
|
||||||
pline("Moving %s", e_nam(etmp));
|
|
||||||
#endif
|
|
||||||
if (!is_u(etmp)) {
|
if (!is_u(etmp)) {
|
||||||
remove_monster(etmp->ex, etmp->ey);
|
remove_monster(etmp->ex, etmp->ey);
|
||||||
place_monster(etmp->emon, newx, newy);
|
place_monster(etmp->emon, newx, newy);
|
||||||
@@ -677,13 +635,13 @@ struct entity *etmp;
|
|||||||
etmp->ey = newy;
|
etmp->ey = newy;
|
||||||
e_inview = e_canseemon(etmp);
|
e_inview = e_canseemon(etmp);
|
||||||
}
|
}
|
||||||
|
debugpline("Final disposition of %s", e_nam(etmp));
|
||||||
#ifdef D_DEBUG
|
#ifdef D_DEBUG
|
||||||
pline("Final disposition of %s", e_nam(etmp));
|
|
||||||
wait_synch();
|
wait_synch();
|
||||||
#endif
|
#endif
|
||||||
if (is_db_wall(etmp->ex, etmp->ey)) {
|
if (is_db_wall(etmp->ex, etmp->ey)) {
|
||||||
|
debugpline("%s in portcullis chamber", E_phrase(etmp, "are"));
|
||||||
#ifdef D_DEBUG
|
#ifdef D_DEBUG
|
||||||
pline("%s in portcullis chamber", E_phrase(etmp, "are"));
|
|
||||||
wait_synch();
|
wait_synch();
|
||||||
#endif
|
#endif
|
||||||
if (e_inview) {
|
if (e_inview) {
|
||||||
@@ -703,13 +661,9 @@ struct entity *etmp;
|
|||||||
e_died(etmp, 0, CRUSHING); /* no message */
|
e_died(etmp, 0, CRUSHING); /* no message */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef D_DEBUG
|
debugpline("%s in here", E_phrase(etmp, "survive"));
|
||||||
pline("%s in here", E_phrase(etmp, "survive"));
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
#ifdef D_DEBUG
|
debugpline("%s on drawbridge square", E_phrase(etmp, "are"));
|
||||||
pline("%s on drawbridge square", E_phrase(etmp, "are"));
|
|
||||||
#endif
|
|
||||||
if (is_pool(etmp->ex, etmp->ey) && !e_inview)
|
if (is_pool(etmp->ex, etmp->ey) && !e_inview)
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
You_hear("a splash.");
|
You_hear("a splash.");
|
||||||
@@ -720,9 +674,7 @@ struct entity *etmp;
|
|||||||
E_phrase(etmp, "fall"));
|
E_phrase(etmp, "fall"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef D_DEBUG
|
debugpline("%s cannot survive on the drawbridge square",E_phrase(etmp, NULL));
|
||||||
pline("%s cannot survive on the drawbridge square",Enam(etmp));
|
|
||||||
#endif
|
|
||||||
if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey))
|
if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey))
|
||||||
if (e_inview && !is_u(etmp)) {
|
if (e_inview && !is_u(etmp)) {
|
||||||
/* drown() will supply msgs if nec. */
|
/* drown() will supply msgs if nec. */
|
||||||
@@ -938,9 +890,7 @@ int x,y;
|
|||||||
if (etmp1->edata) {
|
if (etmp1->edata) {
|
||||||
e_inview = e_canseemon(etmp1);
|
e_inview = e_canseemon(etmp1);
|
||||||
if (e_missed(etmp1, TRUE)) {
|
if (e_missed(etmp1, TRUE)) {
|
||||||
#ifdef D_DEBUG
|
debugpline("%s spared!", E_phrase(etmp1, "are"));
|
||||||
pline("%s spared!", E_phrase(etmp1, "are"));
|
|
||||||
#endif
|
|
||||||
/* if there is water or lava here, fall in now */
|
/* if there is water or lava here, fall in now */
|
||||||
if (is_u(etmp1))
|
if (is_u(etmp1))
|
||||||
spoteffects(FALSE);
|
spoteffects(FALSE);
|
||||||
@@ -957,11 +907,9 @@ int x,y;
|
|||||||
} else {
|
} else {
|
||||||
if (!Deaf && !is_u(etmp1) && !is_pool(x,y))
|
if (!Deaf && !is_u(etmp1) && !is_pool(x,y))
|
||||||
You_hear("a crushing sound.");
|
You_hear("a crushing sound.");
|
||||||
#ifdef D_DEBUG
|
|
||||||
else
|
else
|
||||||
pline("%s from shrapnel",
|
debugpline("%s from shrapnel",
|
||||||
E_phrase(etmp1, "die"));
|
E_phrase(etmp1, "die"));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
killer.format = KILLED_BY_AN;
|
killer.format = KILLED_BY_AN;
|
||||||
Strcpy(killer.name, "collapsing drawbridge");
|
Strcpy(killer.name, "collapsing drawbridge");
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
/* #define DEBUG */ /* turn on for diagnostics */
|
|
||||||
|
|
||||||
static NEARDATA boolean did_dig_msg;
|
static NEARDATA boolean did_dig_msg;
|
||||||
|
|
||||||
STATIC_DCL boolean NDECL(rm_waslit);
|
STATIC_DCL boolean NDECL(rm_waslit);
|
||||||
@@ -1692,9 +1690,7 @@ bury_an_obj(otmp)
|
|||||||
struct obj *otmp2;
|
struct obj *otmp2;
|
||||||
boolean under_ice;
|
boolean under_ice;
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("bury_an_obj: %s", xname(otmp));
|
||||||
pline("bury_an_obj: %s", xname(otmp));
|
|
||||||
#endif
|
|
||||||
if (otmp == uball) {
|
if (otmp == uball) {
|
||||||
unpunish();
|
unpunish();
|
||||||
u.utrap = rn1(50,20);
|
u.utrap = rn1(50,20);
|
||||||
@@ -1756,10 +1752,8 @@ int x, y;
|
|||||||
{
|
{
|
||||||
struct obj *otmp, *otmp2;
|
struct obj *otmp, *otmp2;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if(level.objects[x][y] != (struct obj *)0)
|
if(level.objects[x][y] != (struct obj *)0)
|
||||||
pline("bury_objs: at %d, %d", x, y);
|
debugpline("bury_objs: at %d, %d", x, y);
|
||||||
#endif
|
|
||||||
for (otmp = level.objects[x][y]; otmp; otmp = otmp2)
|
for (otmp = level.objects[x][y]; otmp; otmp = otmp2)
|
||||||
otmp2 = bury_an_obj(otmp);
|
otmp2 = bury_an_obj(otmp);
|
||||||
|
|
||||||
@@ -1776,9 +1770,7 @@ int x, y;
|
|||||||
struct obj *otmp, *otmp2, *bball;
|
struct obj *otmp, *otmp2, *bball;
|
||||||
coord cc;
|
coord cc;
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("unearth_objs: at %d, %d", x, y);
|
||||||
pline("unearth_objs: at %d, %d", x, y);
|
|
||||||
#endif
|
|
||||||
cc.x = x; cc.y = y;
|
cc.x = x; cc.y = y;
|
||||||
bball = buried_ball(&cc);
|
bball = buried_ball(&cc);
|
||||||
for (otmp = level.buriedobjlist; otmp; otmp = otmp2) {
|
for (otmp = level.buriedobjlist; otmp; otmp = otmp2) {
|
||||||
@@ -1887,9 +1879,7 @@ void
|
|||||||
bury_monst(mtmp)
|
bury_monst(mtmp)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
debugpline("bury_monst: %s", mon_nam(mtmp));
|
||||||
pline("bury_monst: %s", mon_nam(mtmp));
|
|
||||||
#endif
|
|
||||||
if(canseemon(mtmp)) {
|
if(canseemon(mtmp)) {
|
||||||
if(is_flyer(mtmp->data) || is_floater(mtmp->data)) {
|
if(is_flyer(mtmp->data) || is_floater(mtmp->data)) {
|
||||||
pline_The("%s opens up, but %s is not swallowed!",
|
pline_The("%s opens up, but %s is not swallowed!",
|
||||||
@@ -1908,9 +1898,7 @@ struct monst *mtmp;
|
|||||||
void
|
void
|
||||||
bury_you()
|
bury_you()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
debugpline("bury_you");
|
||||||
pline("bury_you");
|
|
||||||
#endif
|
|
||||||
if (!Levitation && !Flying) {
|
if (!Levitation && !Flying) {
|
||||||
if(u.uswallow)
|
if(u.uswallow)
|
||||||
You_feel("a sensation like falling into a trap!");
|
You_feel("a sensation like falling into a trap!");
|
||||||
@@ -1927,9 +1915,7 @@ bury_you()
|
|||||||
void
|
void
|
||||||
unearth_you()
|
unearth_you()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
debugpline("unearth_you");
|
||||||
pline("unearth_you");
|
|
||||||
#endif
|
|
||||||
u.uburied = FALSE;
|
u.uburied = FALSE;
|
||||||
under_ground(0);
|
under_ground(0);
|
||||||
if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION)
|
if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION)
|
||||||
@@ -1940,9 +1926,7 @@ unearth_you()
|
|||||||
void
|
void
|
||||||
escape_tomb()
|
escape_tomb()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
debugpline("escape_tomb");
|
||||||
pline("escape_tomb");
|
|
||||||
#endif
|
|
||||||
if ((Teleportation || can_teleport(youmonst.data)) &&
|
if ((Teleportation || can_teleport(youmonst.data)) &&
|
||||||
(Teleport_control || rn2(3) < Luck+2)) {
|
(Teleport_control || rn2(3) < Luck+2)) {
|
||||||
You("attempt a teleport spell.");
|
You("attempt a teleport spell.");
|
||||||
@@ -1974,9 +1958,7 @@ bury_obj(otmp)
|
|||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("bury_obj");
|
||||||
pline("bury_obj");
|
|
||||||
#endif
|
|
||||||
if(cansee(otmp->ox, otmp->oy))
|
if(cansee(otmp->ox, otmp->oy))
|
||||||
pline_The("objects on the %s tumble into a hole!",
|
pline_The("objects on the %s tumble into a hole!",
|
||||||
surface(otmp->ox, otmp->oy));
|
surface(otmp->ox, otmp->oy));
|
||||||
@@ -1987,7 +1969,7 @@ struct obj *otmp;
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
int
|
int
|
||||||
wiz_debug_cmd() /* in this case, bury everything at your loc and around */
|
wiz_debug_cmd_bury() /* in this case, bury everything at your loc and around */
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ dumpit()
|
|||||||
s_level *x;
|
s_level *x;
|
||||||
branch *br;
|
branch *br;
|
||||||
|
|
||||||
|
if (!showdebug()) return;
|
||||||
|
|
||||||
for(i = 0; i < n_dgns; i++) {
|
for(i = 0; i < n_dgns; i++) {
|
||||||
fprintf(stderr, "\n#%d \"%s\" (%s):\n", i,
|
fprintf(stderr, "\n#%d \"%s\" (%s):\n", i,
|
||||||
DD.dname, DD.proto);
|
DD.dname, DD.proto);
|
||||||
|
|||||||
@@ -5,12 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
/* #define DEBUG */ /* uncomment to enable new eat code debugging */
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define debugpline if (wizard) pline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STATIC_PTR int NDECL(eatmdone);
|
STATIC_PTR int NDECL(eatmdone);
|
||||||
STATIC_PTR int NDECL(eatfood);
|
STATIC_PTR int NDECL(eatfood);
|
||||||
STATIC_PTR void FDECL(costly_tin, (int));
|
STATIC_PTR void FDECL(costly_tin, (int));
|
||||||
@@ -290,15 +284,11 @@ recalc_wt()
|
|||||||
{
|
{
|
||||||
struct obj *piece = context.victual.piece;
|
struct obj *piece = context.victual.piece;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Old weight = %d", piece->owt);
|
debugpline("Old weight = %d", piece->owt);
|
||||||
debugpline("Used time = %d, Req'd time = %d",
|
debugpline("Used time = %d, Req'd time = %d",
|
||||||
context.victual.usedtime, context.victual.reqtime);
|
context.victual.usedtime, context.victual.reqtime);
|
||||||
#endif
|
|
||||||
piece->owt = weight(piece);
|
piece->owt = weight(piece);
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("New weight = %d", piece->owt);
|
debugpline("New weight = %d", piece->owt);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -308,9 +298,7 @@ reset_eat() /* called when eating interrupted by an event */
|
|||||||
* the round is spent eating.
|
* the round is spent eating.
|
||||||
*/
|
*/
|
||||||
if(context.victual.eating && !context.victual.doreset) {
|
if(context.victual.eating && !context.victual.doreset) {
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("reset_eat...");
|
debugpline("reset_eat...");
|
||||||
#endif
|
|
||||||
context.victual.doreset = TRUE;
|
context.victual.doreset = TRUE;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -325,9 +313,7 @@ register struct obj *otmp;
|
|||||||
(void) splitobj(otmp, otmp->quan - 1L);
|
(void) splitobj(otmp, otmp->quan - 1L);
|
||||||
else
|
else
|
||||||
otmp = splitobj(otmp, 1L);
|
otmp = splitobj(otmp, 1L);
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("split object,");
|
debugpline("split object,");
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!otmp->oeaten) {
|
if (!otmp->oeaten) {
|
||||||
@@ -388,9 +374,7 @@ struct obj *old_obj, *new_obj;
|
|||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
do_reset_eat()
|
do_reset_eat()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("do_reset_eat...");
|
debugpline("do_reset_eat...");
|
||||||
#endif
|
|
||||||
if (context.victual.piece) {
|
if (context.victual.piece) {
|
||||||
context.victual.o_id = 0;
|
context.victual.o_id = 0;
|
||||||
context.victual.piece = touchfood(context.victual.piece);
|
context.victual.piece = touchfood(context.victual.piece);
|
||||||
@@ -731,57 +715,39 @@ register struct permonst *ptr;
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case FIRE_RES:
|
case FIRE_RES:
|
||||||
res = (ptr->mconveys & MR_FIRE) != 0;
|
res = (ptr->mconveys & MR_FIRE) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get fire resistance");
|
if (res) debugpline("can get fire resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case SLEEP_RES:
|
case SLEEP_RES:
|
||||||
res = (ptr->mconveys & MR_SLEEP) != 0;
|
res = (ptr->mconveys & MR_SLEEP) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get sleep resistance");
|
if (res) debugpline("can get sleep resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case COLD_RES:
|
case COLD_RES:
|
||||||
res = (ptr->mconveys & MR_COLD) != 0;
|
res = (ptr->mconveys & MR_COLD) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get cold resistance");
|
if (res) debugpline("can get cold resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case DISINT_RES:
|
case DISINT_RES:
|
||||||
res = (ptr->mconveys & MR_DISINT) != 0;
|
res = (ptr->mconveys & MR_DISINT) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get disintegration resistance");
|
if (res) debugpline("can get disintegration resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case SHOCK_RES: /* shock (electricity) resistance */
|
case SHOCK_RES: /* shock (electricity) resistance */
|
||||||
res = (ptr->mconveys & MR_ELEC) != 0;
|
res = (ptr->mconveys & MR_ELEC) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get shock resistance");
|
if (res) debugpline("can get shock resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case POISON_RES:
|
case POISON_RES:
|
||||||
res = (ptr->mconveys & MR_POISON) != 0;
|
res = (ptr->mconveys & MR_POISON) != 0;
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get poison resistance");
|
if (res) debugpline("can get poison resistance");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case TELEPORT:
|
case TELEPORT:
|
||||||
res = can_teleport(ptr);
|
res = can_teleport(ptr);
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get teleport");
|
if (res) debugpline("can get teleport");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case TELEPORT_CONTROL:
|
case TELEPORT_CONTROL:
|
||||||
res = control_teleport(ptr);
|
res = control_teleport(ptr);
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get teleport control");
|
if (res) debugpline("can get teleport control");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case TELEPAT:
|
case TELEPAT:
|
||||||
res = telepathic(ptr);
|
res = telepathic(ptr);
|
||||||
#ifdef DEBUG
|
|
||||||
if (res) debugpline("can get telepathy");
|
if (res) debugpline("can get telepathy");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* res stays 0 */
|
/* res stays 0 */
|
||||||
@@ -800,9 +766,7 @@ register struct permonst *ptr;
|
|||||||
{
|
{
|
||||||
register int chance;
|
register int chance;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Attempting to give intrinsic %d", type);
|
debugpline("Attempting to give intrinsic %d", type);
|
||||||
#endif
|
|
||||||
/* some intrinsics are easier to get than others */
|
/* some intrinsics are easier to get than others */
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case POISON_RES:
|
case POISON_RES:
|
||||||
@@ -831,9 +795,7 @@ register struct permonst *ptr;
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FIRE_RES:
|
case FIRE_RES:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give fire resistance");
|
debugpline("Trying to give fire resistance");
|
||||||
#endif
|
|
||||||
if(!(HFire_resistance & FROMOUTSIDE)) {
|
if(!(HFire_resistance & FROMOUTSIDE)) {
|
||||||
You(Hallucination ? "be chillin'." :
|
You(Hallucination ? "be chillin'." :
|
||||||
"feel a momentary chill.");
|
"feel a momentary chill.");
|
||||||
@@ -841,27 +803,21 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SLEEP_RES:
|
case SLEEP_RES:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give sleep resistance");
|
debugpline("Trying to give sleep resistance");
|
||||||
#endif
|
|
||||||
if(!(HSleep_resistance & FROMOUTSIDE)) {
|
if(!(HSleep_resistance & FROMOUTSIDE)) {
|
||||||
You_feel("wide awake.");
|
You_feel("wide awake.");
|
||||||
HSleep_resistance |= FROMOUTSIDE;
|
HSleep_resistance |= FROMOUTSIDE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COLD_RES:
|
case COLD_RES:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give cold resistance");
|
debugpline("Trying to give cold resistance");
|
||||||
#endif
|
|
||||||
if(!(HCold_resistance & FROMOUTSIDE)) {
|
if(!(HCold_resistance & FROMOUTSIDE)) {
|
||||||
You_feel("full of hot air.");
|
You_feel("full of hot air.");
|
||||||
HCold_resistance |= FROMOUTSIDE;
|
HCold_resistance |= FROMOUTSIDE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISINT_RES:
|
case DISINT_RES:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give disintegration resistance");
|
debugpline("Trying to give disintegration resistance");
|
||||||
#endif
|
|
||||||
if(!(HDisint_resistance & FROMOUTSIDE)) {
|
if(!(HDisint_resistance & FROMOUTSIDE)) {
|
||||||
You_feel(Hallucination ?
|
You_feel(Hallucination ?
|
||||||
"totally together, man." :
|
"totally together, man." :
|
||||||
@@ -870,9 +826,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHOCK_RES: /* shock (electricity) resistance */
|
case SHOCK_RES: /* shock (electricity) resistance */
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give shock resistance");
|
debugpline("Trying to give shock resistance");
|
||||||
#endif
|
|
||||||
if(!(HShock_resistance & FROMOUTSIDE)) {
|
if(!(HShock_resistance & FROMOUTSIDE)) {
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
You_feel("grounded in reality.");
|
You_feel("grounded in reality.");
|
||||||
@@ -882,9 +836,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case POISON_RES:
|
case POISON_RES:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give poison resistance");
|
debugpline("Trying to give poison resistance");
|
||||||
#endif
|
|
||||||
if(!(HPoison_resistance & FROMOUTSIDE)) {
|
if(!(HPoison_resistance & FROMOUTSIDE)) {
|
||||||
You_feel(Poison_resistance ?
|
You_feel(Poison_resistance ?
|
||||||
"especially healthy." : "healthy.");
|
"especially healthy." : "healthy.");
|
||||||
@@ -892,9 +844,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TELEPORT:
|
case TELEPORT:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give teleport");
|
debugpline("Trying to give teleport");
|
||||||
#endif
|
|
||||||
if(!(HTeleportation & FROMOUTSIDE)) {
|
if(!(HTeleportation & FROMOUTSIDE)) {
|
||||||
You_feel(Hallucination ? "diffuse." :
|
You_feel(Hallucination ? "diffuse." :
|
||||||
"very jumpy.");
|
"very jumpy.");
|
||||||
@@ -902,9 +852,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TELEPORT_CONTROL:
|
case TELEPORT_CONTROL:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give teleport control");
|
debugpline("Trying to give teleport control");
|
||||||
#endif
|
|
||||||
if(!(HTeleport_control & FROMOUTSIDE)) {
|
if(!(HTeleport_control & FROMOUTSIDE)) {
|
||||||
You_feel(Hallucination ?
|
You_feel(Hallucination ?
|
||||||
"centered in your personal space." :
|
"centered in your personal space." :
|
||||||
@@ -913,9 +861,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TELEPAT:
|
case TELEPAT:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Trying to give telepathy");
|
debugpline("Trying to give telepathy");
|
||||||
#endif
|
|
||||||
if(!(HTelepat & FROMOUTSIDE)) {
|
if(!(HTelepat & FROMOUTSIDE)) {
|
||||||
You_feel(Hallucination ?
|
You_feel(Hallucination ?
|
||||||
"in touch with the cosmos." :
|
"in touch with the cosmos." :
|
||||||
@@ -926,9 +872,7 @@ register struct permonst *ptr;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Tried to give an impossible intrinsic");
|
debugpline("Tried to give an impossible intrinsic");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1059,9 +1003,7 @@ register int pm;
|
|||||||
case PM_DISENCHANTER:
|
case PM_DISENCHANTER:
|
||||||
/* picks an intrinsic at random and removes it; there's
|
/* picks an intrinsic at random and removes it; there's
|
||||||
no feedback if hero already lacks the chosen ability */
|
no feedback if hero already lacks the chosen ability */
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("using attrcurse to strip an intrinsic");
|
debugpline("using attrcurse to strip an intrinsic");
|
||||||
#endif
|
|
||||||
attrcurse();
|
attrcurse();
|
||||||
break;
|
break;
|
||||||
case PM_MIND_FLAYER:
|
case PM_MIND_FLAYER:
|
||||||
@@ -1101,9 +1043,7 @@ register int pm;
|
|||||||
if (conveys_STR) {
|
if (conveys_STR) {
|
||||||
count = 1;
|
count = 1;
|
||||||
tmp = -1; /* use -1 as fake prop index for STR */
|
tmp = -1; /* use -1 as fake prop index for STR */
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("\"Intrinsic\" strength, %d", tmp);
|
debugpline("\"Intrinsic\" strength, %d", tmp);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
for (i = 1; i <= LAST_PROP; i++) {
|
for (i = 1; i <= LAST_PROP; i++) {
|
||||||
if (!intrinsic_possible(i, ptr)) continue;
|
if (!intrinsic_possible(i, ptr)) continue;
|
||||||
@@ -1113,9 +1053,7 @@ register int pm;
|
|||||||
of keeping the old choice (note that 1 in 1 and
|
of keeping the old choice (note that 1 in 1 and
|
||||||
0 in 1 are what we want for the first candidate) */
|
0 in 1 are what we want for the first candidate) */
|
||||||
if (!rn2(count)) {
|
if (!rn2(count)) {
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("Intrinsic %d replacing %d", i, tmp);
|
debugpline("Intrinsic %d replacing %d", i, tmp);
|
||||||
#endif
|
|
||||||
tmp = i;
|
tmp = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1659,13 +1597,11 @@ start_eating(otmp) /* called as you start to eat */
|
|||||||
{
|
{
|
||||||
const char *old_nomovemsg, *save_nomovemsg;
|
const char *old_nomovemsg, *save_nomovemsg;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("start_eating: %lx (victual = %lx)", otmp, context.victual.piece);
|
debugpline("start_eating: %lx (victual = %lx)", otmp, context.victual.piece);
|
||||||
debugpline("reqtime = %d", context.victual.reqtime);
|
debugpline("reqtime = %d", context.victual.reqtime);
|
||||||
debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay);
|
debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay);
|
||||||
debugpline("nmod = %d", context.victual.nmod);
|
debugpline("nmod = %d", context.victual.nmod);
|
||||||
debugpline("oeaten = %d", otmp->oeaten);
|
debugpline("oeaten = %d", otmp->oeaten);
|
||||||
#endif
|
|
||||||
context.victual.fullwarn = context.victual.doreset = FALSE;
|
context.victual.fullwarn = context.victual.doreset = FALSE;
|
||||||
context.victual.eating = TRUE;
|
context.victual.eating = TRUE;
|
||||||
|
|
||||||
@@ -2505,15 +2441,11 @@ doeat() /* generic "eat" command funtion (see cmd.c) */
|
|||||||
if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit;
|
if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit;
|
||||||
else basenutrit = objects[otmp->otyp].oc_nutrition;
|
else basenutrit = objects[otmp->otyp].oc_nutrition;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
||||||
debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
|
debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
|
||||||
#endif
|
|
||||||
context.victual.reqtime = (basenutrit == 0 ? 0 :
|
context.victual.reqtime = (basenutrit == 0 ? 0 :
|
||||||
rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit));
|
rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit));
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
||||||
#endif
|
|
||||||
/* calculate the modulo value (nutrit. units per round eating)
|
/* calculate the modulo value (nutrit. units per round eating)
|
||||||
* note: this isn't exact - you actually lose a little nutrition
|
* note: this isn't exact - you actually lose a little nutrition
|
||||||
* due to this method.
|
* due to this method.
|
||||||
@@ -2615,9 +2547,7 @@ register int num;
|
|||||||
{
|
{
|
||||||
/* See comments in newuhs() for discussion on force_save_hs */
|
/* See comments in newuhs() for discussion on force_save_hs */
|
||||||
boolean iseating = (occupation == eatfood) || force_save_hs;
|
boolean iseating = (occupation == eatfood) || force_save_hs;
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("lesshungry(%d)", num);
|
debugpline("lesshungry(%d)", num);
|
||||||
#endif
|
|
||||||
u.uhunger += num;
|
u.uhunger += num;
|
||||||
if(u.uhunger >= 2000) {
|
if(u.uhunger >= 2000) {
|
||||||
if (!iseating || context.victual.canchoke) {
|
if (!iseating || context.victual.canchoke) {
|
||||||
|
|||||||
@@ -2107,6 +2107,9 @@ int src;
|
|||||||
} else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) {
|
} else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) {
|
||||||
if (sysopt.shellers) free(sysopt.shellers);
|
if (sysopt.shellers) free(sysopt.shellers);
|
||||||
sysopt.shellers = dupstr(bufp);
|
sysopt.shellers = dupstr(bufp);
|
||||||
|
} else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) {
|
||||||
|
if (sysopt.debugfiles) free(sysopt.debugfiles);
|
||||||
|
sysopt.debugfiles = dupstr(bufp);
|
||||||
} else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) {
|
} else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) {
|
||||||
if (sysopt.support) free(sysopt.support);
|
if (sysopt.support) free(sysopt.support);
|
||||||
sysopt.support = dupstr(bufp);
|
sysopt.support = dupstr(bufp);
|
||||||
|
|||||||
+1
-1
@@ -767,7 +767,7 @@ int mode;
|
|||||||
static boolean trav_debug = FALSE;
|
static boolean trav_debug = FALSE;
|
||||||
|
|
||||||
int
|
int
|
||||||
wiz_debug_cmd() /* in this case, toggle display of travel debug info */
|
wiz_debug_cmd_traveldisplay() /* in this case, toggle display of travel debug info */
|
||||||
{
|
{
|
||||||
trav_debug = !trav_debug;
|
trav_debug = !trav_debug;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
+4
-8
@@ -393,18 +393,14 @@ write_ls(fd, ls)
|
|||||||
otmp = ls->id.a_obj;
|
otmp = ls->id.a_obj;
|
||||||
ls->id = zeroany;
|
ls->id = zeroany;
|
||||||
ls->id.a_uint = otmp->o_id;
|
ls->id.a_uint = otmp->o_id;
|
||||||
#ifdef DEBUG
|
if (find_oid((unsigned)ls->id.a_uint) != otmp)
|
||||||
if (find_oid((unsigned)ls->id) != otmp)
|
debugpline("write_ls: can't find obj #%u!", ls->id.a_uint);
|
||||||
panic("write_ls: can't find obj #%u!", ls->id.a_uint);
|
|
||||||
#endif
|
|
||||||
} else { /* ls->type == LS_MONSTER */
|
} else { /* ls->type == LS_MONSTER */
|
||||||
mtmp = (struct monst *)ls->id.a_monst;
|
mtmp = (struct monst *)ls->id.a_monst;
|
||||||
ls->id = zeroany;
|
ls->id = zeroany;
|
||||||
ls->id.a_uint = mtmp->m_id;
|
ls->id.a_uint = mtmp->m_id;
|
||||||
#ifdef DEBUG
|
if (find_mid((unsigned)ls->id.a_uint, FM_EVERYWHERE) != mtmp)
|
||||||
if (find_mid((unsigned)ls->id, FM_EVERYWHERE) != mtmp)
|
debugpline("write_ls: can't find mon #%u!", ls->id.a_uint);
|
||||||
panic("write_ls: can't find mon #%u!", ls->x_id);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
ls->flags |= LSF_NEEDS_FIXUP;
|
ls->flags |= LSF_NEEDS_FIXUP;
|
||||||
bwrite(fd, (genericptr_t)ls, sizeof(light_source));
|
bwrite(fd, (genericptr_t)ls, sizeof(light_source));
|
||||||
|
|||||||
+6
-18
@@ -93,9 +93,7 @@ register int x, y, n;
|
|||||||
int cnttmp,cntdiv;
|
int cnttmp,cntdiv;
|
||||||
|
|
||||||
cnttmp = cnt;
|
cnttmp = cnt;
|
||||||
# ifdef DEBUG
|
debugpline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt);
|
||||||
pline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt);
|
|
||||||
# endif
|
|
||||||
cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1);
|
cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1);
|
||||||
#endif
|
#endif
|
||||||
/* Tuning: cut down on swarming at low character levels [mrs] */
|
/* Tuning: cut down on swarming at low character levels [mrs] */
|
||||||
@@ -760,10 +758,8 @@ boolean ghostly;
|
|||||||
mvitals[mndx].born++;
|
mvitals[mndx].born++;
|
||||||
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) &&
|
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) &&
|
||||||
!(mvitals[mndx].mvflags & G_EXTINCT)) {
|
!(mvitals[mndx].mvflags & G_EXTINCT)) {
|
||||||
#ifdef DEBUG
|
if (wizard) debugpline("Automatically extinguished %s.",
|
||||||
if (wizard) pline("Automatically extinguished %s.",
|
|
||||||
makeplural(mons[mndx].mname));
|
makeplural(mons[mndx].mname));
|
||||||
#endif
|
|
||||||
mvitals[mndx].mvflags |= G_EXTINCT;
|
mvitals[mndx].mvflags |= G_EXTINCT;
|
||||||
reset_rndmonst(mndx);
|
reset_rndmonst(mndx);
|
||||||
}
|
}
|
||||||
@@ -906,11 +902,9 @@ register int mmflags;
|
|||||||
/* if you are to make a specific monster and it has
|
/* if you are to make a specific monster and it has
|
||||||
already been genocided, return */
|
already been genocided, return */
|
||||||
if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0);
|
if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0);
|
||||||
#ifdef DEBUG
|
|
||||||
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
|
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
|
||||||
pline("Explicitly creating extinct monster %s.",
|
debugpline("Explicitly creating extinct monster %s.",
|
||||||
mons[mndx].mname);
|
mons[mndx].mname);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
/* make a random (common) monster that can survive here.
|
/* make a random (common) monster that can survive here.
|
||||||
* (the special levels ask for random monsters at specific
|
* (the special levels ask for random monsters at specific
|
||||||
@@ -922,9 +916,7 @@ register int mmflags;
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
if(!(ptr = rndmonst())) {
|
if(!(ptr = rndmonst())) {
|
||||||
#ifdef DEBUG
|
debugpline("Warning: no monster.");
|
||||||
pline("Warning: no monster.");
|
|
||||||
#endif
|
|
||||||
return((struct monst *) 0); /* no more monsters! */
|
return((struct monst *) 0); /* no more monsters! */
|
||||||
}
|
}
|
||||||
fakemon.data = ptr; /* set up for goodpos */
|
fakemon.data = ptr; /* set up for goodpos */
|
||||||
@@ -1260,9 +1252,7 @@ rndmonst()
|
|||||||
}
|
}
|
||||||
if (mndx == SPECIAL_PM) {
|
if (mndx == SPECIAL_PM) {
|
||||||
/* evidently they've all been exterminated */
|
/* evidently they've all been exterminated */
|
||||||
#ifdef DEBUG
|
debugpline("rndmonst: no common mons!");
|
||||||
pline("rndmonst: no common mons!");
|
|
||||||
#endif
|
|
||||||
return (struct permonst *)0;
|
return (struct permonst *)0;
|
||||||
} /* else `mndx' now ready for use below */
|
} /* else `mndx' now ready for use below */
|
||||||
zlevel = level_difficulty();
|
zlevel = level_difficulty();
|
||||||
@@ -1300,9 +1290,7 @@ rndmonst()
|
|||||||
|
|
||||||
if (rndmonst_state.choice_count <= 0) {
|
if (rndmonst_state.choice_count <= 0) {
|
||||||
/* maybe no common mons left, or all are too weak or too strong */
|
/* maybe no common mons left, or all are too weak or too strong */
|
||||||
#ifdef DEBUG
|
debugpline("rndmonst: choice_count=%d", rndmonst_state.choice_count);
|
||||||
Norep("rndmonst: choice_count=%d", rndmonst_state.choice_count);
|
|
||||||
#endif
|
|
||||||
return (struct permonst *)0;
|
return (struct permonst *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-10
@@ -4,11 +4,6 @@
|
|||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define debugpline if (wizard) pline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */
|
/* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */
|
||||||
/* croom->lx etc are schar (width <= int), so % arith ensures that */
|
/* croom->lx etc are schar (width <= int), so % arith ensures that */
|
||||||
@@ -689,9 +684,7 @@ makelevel()
|
|||||||
/* make a secret treasure vault, not connected to the rest */
|
/* make a secret treasure vault, not connected to the rest */
|
||||||
if(do_vault()) {
|
if(do_vault()) {
|
||||||
xchar w,h;
|
xchar w,h;
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("trying to make a vault...");
|
debugpline("trying to make a vault...");
|
||||||
#endif
|
|
||||||
w = 1;
|
w = 1;
|
||||||
h = 1;
|
h = 1;
|
||||||
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
||||||
@@ -1567,9 +1560,7 @@ xchar x, y;
|
|||||||
*source = u.uz;
|
*source = u.uz;
|
||||||
insert_branch(br, TRUE);
|
insert_branch(br, TRUE);
|
||||||
|
|
||||||
#ifdef DEBUG
|
debugpline("Made knox portal.");
|
||||||
pline("Made knox portal.");
|
|
||||||
#endif
|
|
||||||
place_branch(br, x, y);
|
place_branch(br, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-6
@@ -587,12 +587,10 @@ register const char *s;
|
|||||||
int x_range = x_maze_max - x_maze_min - 2*INVPOS_X_MARGIN - 1,
|
int x_range = x_maze_max - x_maze_min - 2*INVPOS_X_MARGIN - 1,
|
||||||
y_range = y_maze_max - y_maze_min - 2*INVPOS_Y_MARGIN - 1;
|
y_range = y_maze_max - y_maze_min - 2*INVPOS_Y_MARGIN - 1;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN ||
|
if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN ||
|
||||||
(x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE))
|
(x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE))
|
||||||
panic("inv_pos: maze is too small! (%d x %d)",
|
debugpline("inv_pos: maze is too small! (%d x %d)",
|
||||||
x_maze_max, y_maze_max);
|
x_maze_max, y_maze_max);
|
||||||
#endif
|
|
||||||
inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/
|
inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/
|
||||||
do {
|
do {
|
||||||
x = rn1(x_range, x_maze_min + INVPOS_X_MARGIN + 1);
|
x = rn1(x_range, x_maze_min + INVPOS_X_MARGIN + 1);
|
||||||
@@ -879,10 +877,8 @@ register xchar x, y, todnum, todlevel;
|
|||||||
impossible("portal on top of portal??");
|
impossible("portal on top of portal??");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
debugpline("mkportal: at (%d,%d), to %s, level %d",
|
||||||
pline("mkportal: at (%d,%d), to %s, level %d",
|
|
||||||
x, y, dungeons[todnum].dname, todlevel);
|
x, y, dungeons[todnum].dname, todlevel);
|
||||||
#endif
|
|
||||||
ttmp->dst.dnum = todnum;
|
ttmp->dst.dnum = todnum;
|
||||||
ttmp->dst.dlevel = todlevel;
|
ttmp->dst.dlevel = todlevel;
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-12
@@ -17,8 +17,6 @@ STATIC_DCL void FDECL(insane_object,
|
|||||||
(struct obj *,const char *,const char *,struct monst *));
|
(struct obj *,const char *,const char *,struct monst *));
|
||||||
STATIC_DCL void FDECL(check_contained, (struct obj *,const char *));
|
STATIC_DCL void FDECL(check_contained, (struct obj *,const char *));
|
||||||
|
|
||||||
/*#define DEBUG_EFFECTS*/ /* show some messages for debugging */
|
|
||||||
|
|
||||||
struct icp {
|
struct icp {
|
||||||
int iprob; /* probability of an item type */
|
int iprob; /* probability of an item type */
|
||||||
char iclass; /* item class */
|
char iclass; /* item class */
|
||||||
@@ -1526,12 +1524,10 @@ struct obj *otmp;
|
|||||||
/* Adjust the age; must be same as obj_timer_checks() for off ice*/
|
/* Adjust the age; must be same as obj_timer_checks() for off ice*/
|
||||||
age = monstermoves - otmp->age;
|
age = monstermoves - otmp->age;
|
||||||
retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT;
|
retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT;
|
||||||
#ifdef DEBUG_EFFECTS
|
debugpline("The %s age has ice modifications:otmp->age = %ld, returning %ld.",
|
||||||
pline_The("%s age has ice modifications:otmp->age = %ld, returning %ld.",
|
|
||||||
s_suffix(doname(otmp)),otmp->age, retval);
|
s_suffix(doname(otmp)),otmp->age, retval);
|
||||||
pline("Effective age of corpse: %ld.",
|
debugpline("Effective age of corpse: %ld.",
|
||||||
monstermoves - retval);
|
monstermoves - retval);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@@ -1560,9 +1556,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
|
|||||||
|
|
||||||
/* mark the corpse as being on ice */
|
/* mark the corpse as being on ice */
|
||||||
otmp->on_ice = 1;
|
otmp->on_ice = 1;
|
||||||
#ifdef DEBUG_EFFECTS
|
debugpline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y);
|
||||||
pline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y);
|
|
||||||
#endif
|
|
||||||
/* Adjust the time remaining */
|
/* Adjust the time remaining */
|
||||||
tleft *= ROT_ICE_ADJUSTMENT;
|
tleft *= ROT_ICE_ADJUSTMENT;
|
||||||
restart_timer = TRUE;
|
restart_timer = TRUE;
|
||||||
@@ -1588,9 +1582,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
|
|||||||
long age;
|
long age;
|
||||||
|
|
||||||
otmp->on_ice = 0;
|
otmp->on_ice = 0;
|
||||||
#ifdef DEBUG_EFFECTS
|
debugpline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y);
|
||||||
pline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y);
|
|
||||||
#endif
|
|
||||||
/* Adjust the remaining time */
|
/* Adjust the remaining time */
|
||||||
tleft /= ROT_ICE_ADJUSTMENT;
|
tleft /= ROT_ICE_ADJUSTMENT;
|
||||||
restart_timer = TRUE;
|
restart_timer = TRUE;
|
||||||
|
|||||||
@@ -1278,10 +1278,8 @@ register struct monst *mtmp, *mtmp2;
|
|||||||
|
|
||||||
/* transfer the monster's inventory */
|
/* transfer the monster's inventory */
|
||||||
for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) {
|
for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) {
|
||||||
#ifdef DEBUG
|
|
||||||
if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp)
|
if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp)
|
||||||
panic("replmon: minvent inconsistency");
|
debugpline("replmon: minvent inconsistency");
|
||||||
#endif
|
|
||||||
otmp->ocarry = mtmp2;
|
otmp->ocarry = mtmp2;
|
||||||
}
|
}
|
||||||
mtmp->minvent = 0;
|
mtmp->minvent = 0;
|
||||||
|
|||||||
+1
-3
@@ -903,9 +903,7 @@ int how; /* type of query */
|
|||||||
(*pick_list)->item.a_int = curr->oclass;
|
(*pick_list)->item.a_int = curr->oclass;
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
#ifdef DEBUG
|
debugpline("query_category: no single object match");
|
||||||
impossible("query_category: no single object match");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-5
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#define QTEXT_FILE "quest.dat"
|
#define QTEXT_FILE "quest.dat"
|
||||||
|
|
||||||
/* #define DEBUG */ /* uncomment for debugging */
|
|
||||||
|
|
||||||
/* from sp_lev.c, for deliver_splev_message() */
|
/* from sp_lev.c, for deliver_splev_message() */
|
||||||
extern char *lev_message;
|
extern char *lev_message;
|
||||||
|
|
||||||
@@ -46,6 +44,8 @@ dump_qtlist() /* dump the character msg list to check appearance */
|
|||||||
struct qtmsg *msg;
|
struct qtmsg *msg;
|
||||||
long size;
|
long size;
|
||||||
|
|
||||||
|
if (!showdebug()) return;
|
||||||
|
|
||||||
for (msg = qt_list.chrole; msg->msgnum > 0; msg++) {
|
for (msg = qt_list.chrole; msg->msgnum > 0; msg++) {
|
||||||
pline("msgnum %d: delivery %c",
|
pline("msgnum %d: delivery %c",
|
||||||
msg->msgnum, msg->delivery);
|
msg->msgnum, msg->delivery);
|
||||||
@@ -54,7 +54,10 @@ dump_qtlist() /* dump the character msg list to check appearance */
|
|||||||
deliver_by_window(msg, NHW_TEXT);
|
deliver_by_window(msg, NHW_TEXT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#else
|
||||||
|
static void
|
||||||
|
dump_qtlist() { }
|
||||||
|
#endif /* !DEBUG */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Fread(ptr, size, nitems, stream)
|
Fread(ptr, size, nitems, stream)
|
||||||
@@ -133,9 +136,7 @@ load_qtlist()
|
|||||||
|
|
||||||
if (!qt_list.common || !qt_list.chrole)
|
if (!qt_list.common || !qt_list.chrole)
|
||||||
impossible("load_qtlist: cannot load quest text.");
|
impossible("load_qtlist: cannot load quest text.");
|
||||||
#ifdef DEBUG
|
|
||||||
dump_qtlist();
|
dump_qtlist();
|
||||||
#endif
|
|
||||||
return; /* no ***DON'T*** close the msg_file */
|
return; /* no ***DON'T*** close the msg_file */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -1153,9 +1153,7 @@ register int fd;
|
|||||||
++msgcount;
|
++msgcount;
|
||||||
}
|
}
|
||||||
if (msgcount) putmsghistory((char *)0, TRUE);
|
if (msgcount) putmsghistory((char *)0, TRUE);
|
||||||
#ifdef DEBUG_MSGCOUNT
|
debugpline("Read %d messages from savefile.", msgcount);
|
||||||
pline("Read %d messages from savefile.", msgcount);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear all structures for object and monster ID mapping. */
|
/* Clear all structures for object and monster ID mapping. */
|
||||||
|
|||||||
@@ -5,10 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
#if defined(BETA) && !defined(DEBUG) && !defined(NODEBUG)
|
|
||||||
#define DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* "Rand()"s definition is determined by [OS]conf.h */
|
/* "Rand()"s definition is determined by [OS]conf.h */
|
||||||
#if defined(LINT) && defined(UNIX) /* rand() is long... */
|
#if defined(LINT) && defined(UNIX) /* rand() is long... */
|
||||||
extern int NDECL(rand);
|
extern int NDECL(rand);
|
||||||
@@ -26,9 +22,9 @@ int
|
|||||||
rn2(x) /* 0 <= rn2(x) < x */
|
rn2(x) /* 0 <= rn2(x) < x */
|
||||||
register int x;
|
register int x;
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef BETA
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rn2(%d) attempted", x);
|
debugpline("rn2(%d) attempted", x);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
x = RND(x);
|
x = RND(x);
|
||||||
@@ -44,9 +40,9 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */
|
|||||||
{
|
{
|
||||||
register int i, adjustment;
|
register int i, adjustment;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BETA
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rnl(%d) attempted", x);
|
debugpline("rnl(%d) attempted", x);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -83,9 +79,9 @@ int
|
|||||||
rnd(x) /* 1 <= rnd(x) <= x */
|
rnd(x) /* 1 <= rnd(x) <= x */
|
||||||
register int x;
|
register int x;
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef BETA
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rnd(%d) attempted", x);
|
debugpline("rnd(%d) attempted", x);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
x = RND(x)+1;
|
x = RND(x)+1;
|
||||||
@@ -101,9 +97,9 @@ register int n, x;
|
|||||||
{
|
{
|
||||||
register int tmp = n;
|
register int tmp = n;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef BETA
|
||||||
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
||||||
impossible("d(%d,%d) attempted", n, x);
|
debugpline("d(%d,%d) attempted", n, x);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-3
@@ -1210,9 +1210,7 @@ int fd, mode;
|
|||||||
}
|
}
|
||||||
bwrite(fd, (genericptr_t) &minusone, sizeof(int));
|
bwrite(fd, (genericptr_t) &minusone, sizeof(int));
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_MSGCOUNT
|
debugpline("Stored %d messages into savefile.", msgcount);
|
||||||
pline("Stored %d messages into savefile.", msgcount);
|
|
||||||
#endif
|
|
||||||
/* note: we don't attempt to handle release_data() here */
|
/* note: we don't attempt to handle release_data() here */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
/*#define DEBUG*/
|
|
||||||
|
|
||||||
#define PAY_SOME 2
|
#define PAY_SOME 2
|
||||||
#define PAY_BUY 1
|
#define PAY_BUY 1
|
||||||
#define PAY_CANT 0 /* too poor */
|
#define PAY_CANT 0 /* too poor */
|
||||||
@@ -1207,9 +1205,7 @@ dopay()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!shkp) {
|
if(!shkp) {
|
||||||
#ifdef DEBUG
|
debugpline("dopay: null shkp.");
|
||||||
pline("dopay: null shkp.");
|
|
||||||
#endif
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
proceed:
|
proceed:
|
||||||
|
|||||||
@@ -12,11 +12,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
#include "dlb.h"
|
#include "dlb.h"
|
||||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define debugpline if (wizard) pline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sp_lev.h"
|
#include "sp_lev.h"
|
||||||
|
|
||||||
@@ -329,10 +324,8 @@ chk:
|
|||||||
lev = &levl[x][y];
|
lev = &levl[x][y];
|
||||||
for (; y <= ymax; y++) {
|
for (; y <= ymax; y++) {
|
||||||
if (lev++->typ) {
|
if (lev++->typ) {
|
||||||
#ifdef DEBUG
|
|
||||||
if(!vault)
|
if(!vault)
|
||||||
debugpline("strange area [%d,%d] in check_room.",x,y);
|
debugpline("strange area [%d,%d] in check_room.",x,y);
|
||||||
#endif
|
|
||||||
if (!rn2(3)) return FALSE;
|
if (!rn2(3)) return FALSE;
|
||||||
if (x < *lowx)
|
if (x < *lowx)
|
||||||
*lowx = x + xlim + 1;
|
*lowx = x + xlim + 1;
|
||||||
@@ -405,9 +398,7 @@ xchar rtype, rlit;
|
|||||||
r1 = rnd_rect(); /* Get a random rectangle */
|
r1 = rnd_rect(); /* Get a random rectangle */
|
||||||
|
|
||||||
if (!r1) { /* No more free rectangles ! */
|
if (!r1) { /* No more free rectangles ! */
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("No more rects...");
|
debugpline("No more rects...");
|
||||||
#endif
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
hx = r1->hx;
|
hx = r1->hx;
|
||||||
@@ -1320,10 +1311,8 @@ schar ftyp, btyp;
|
|||||||
if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 ||
|
if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 ||
|
||||||
xx > COLNO-1 || tx > COLNO-1 ||
|
xx > COLNO-1 || tx > COLNO-1 ||
|
||||||
yy > ROWNO-1 || ty > ROWNO-1) {
|
yy > ROWNO-1 || ty > ROWNO-1) {
|
||||||
#ifdef DEBUG
|
|
||||||
debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).",
|
debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).",
|
||||||
xx,yy,tx,ty);
|
xx,yy,tx,ty);
|
||||||
#endif
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (tx > xx) dx = 1;
|
if (tx > xx) dx = 1;
|
||||||
|
|||||||
+1
-1
@@ -424,12 +424,12 @@ register struct monst *mtmp;
|
|||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
{
|
{
|
||||||
int freed_otmp;
|
int freed_otmp;
|
||||||
|
boolean snuff_otmp = FALSE;
|
||||||
|
|
||||||
/* if monster is acquiring a thrown or kicked object, the throwing
|
/* if monster is acquiring a thrown or kicked object, the throwing
|
||||||
or kicking code shouldn't continue to track and place it */
|
or kicking code shouldn't continue to track and place it */
|
||||||
if (otmp == thrownobj) thrownobj = 0;
|
if (otmp == thrownobj) thrownobj = 0;
|
||||||
else if (otmp == kickedobj) kickedobj = 0;
|
else if (otmp == kickedobj) kickedobj = 0;
|
||||||
boolean snuff_otmp = FALSE;
|
|
||||||
/* don't want hidden light source inside the monster; assumes that
|
/* don't want hidden light source inside the monster; assumes that
|
||||||
engulfers won't have external inventories; whirly monsters cause
|
engulfers won't have external inventories; whirly monsters cause
|
||||||
the light to be extinguished rather than letting it shine thru */
|
the light to be extinguished rather than letting it shine thru */
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ sys_early_init(){
|
|||||||
#else
|
#else
|
||||||
sysopt.wizards = WIZARD_NAME;
|
sysopt.wizards = WIZARD_NAME;
|
||||||
#endif
|
#endif
|
||||||
|
sysopt.debugfiles = NULL;
|
||||||
sysopt.shellers = NULL;
|
sysopt.shellers = NULL;
|
||||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -121,9 +121,7 @@ unsigned entflags;
|
|||||||
struct monst fakemon; /* dummy monster */
|
struct monst fakemon; /* dummy monster */
|
||||||
|
|
||||||
if (!mdat) {
|
if (!mdat) {
|
||||||
#ifdef DEBUG
|
debugpline("enexto() called with mdat==0");
|
||||||
pline("enexto() called with mdat==0");
|
|
||||||
#endif
|
|
||||||
/* default to player's original monster type */
|
/* default to player's original monster type */
|
||||||
mdat = &mons[u.umonster];
|
mdat = &mons[u.umonster];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1717,9 +1717,7 @@ struct obj *obj, *otmp;
|
|||||||
if (context.bypasses)
|
if (context.bypasses)
|
||||||
return 0;
|
return 0;
|
||||||
else {
|
else {
|
||||||
#ifdef DEBUG
|
debugpline("%s for a moment.", Tobjnam(obj, "pulsate"));
|
||||||
pline("%s for a moment.", Tobjnam(obj, "pulsate"));
|
|
||||||
#endif
|
|
||||||
obj->bypass = 0;
|
obj->bypass = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3418,9 +3416,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */
|
|||||||
resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL))
|
resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL))
|
||||||
tmp /= 2;
|
tmp /= 2;
|
||||||
if (tmp < 0) tmp = 0; /* don't allow negative damage */
|
if (tmp < 0) tmp = 0; /* don't allow negative damage */
|
||||||
#ifdef WIZ_PATCH_DEBUG
|
debugpline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp);
|
||||||
pline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp);
|
|
||||||
#endif
|
|
||||||
mon->mhp -= tmp;
|
mon->mhp -= tmp;
|
||||||
return(tmp);
|
return(tmp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ WIZARDS=root games
|
|||||||
# Uses the same syntax as the WIZARDS option above.
|
# Uses the same syntax as the WIZARDS option above.
|
||||||
#SHELLERS=
|
#SHELLERS=
|
||||||
|
|
||||||
|
# Show debugging information originating from these source files.
|
||||||
|
# Use '*' for all, or list source files separated by spaces.
|
||||||
|
# Only available if game has been compiled with DEBUG.
|
||||||
|
#DEBUGFILES=*
|
||||||
|
|
||||||
# Limit the number of simultaneous games (see also nethack.sh).
|
# Limit the number of simultaneous games (see also nethack.sh).
|
||||||
MAXPLAYERS=10
|
MAXPLAYERS=10
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1946,7 +1946,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and
|
|||||||
case NHW_TEXT: s = "[text window]"; break;
|
case NHW_TEXT: s = "[text window]"; break;
|
||||||
case NHW_BASE: s = "[base window]"; break;
|
case NHW_BASE: s = "[base window]"; break;
|
||||||
}
|
}
|
||||||
impossible("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user