Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1544920233 2018/12/16 00:30:33 $ $NHDT-Branch: win-minor $:$NHDT-Revision: 1.321 $ */
|
/* NetHack 3.6 cmd.c $NHDT-Date: 1545128652 2018/12/18 10:24:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.322 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -5544,7 +5544,6 @@ parse()
|
|||||||
static char in_line[COLNO];
|
static char in_line[COLNO];
|
||||||
#endif
|
#endif
|
||||||
register int foo;
|
register int foo;
|
||||||
boolean prezero = FALSE;
|
|
||||||
|
|
||||||
iflags.in_parse = TRUE;
|
iflags.in_parse = TRUE;
|
||||||
multi = 0;
|
multi = 0;
|
||||||
@@ -5617,8 +5616,6 @@ parse()
|
|||||||
in_line[2] = 0;
|
in_line[2] = 0;
|
||||||
}
|
}
|
||||||
clear_nhwindow(WIN_MESSAGE);
|
clear_nhwindow(WIN_MESSAGE);
|
||||||
if (prezero)
|
|
||||||
in_line[0] = Cmd.spkeys[NHKF_ESC];
|
|
||||||
|
|
||||||
iflags.in_parse = FALSE;
|
iflags.in_parse = FALSE;
|
||||||
return in_line;
|
return in_line;
|
||||||
|
|||||||
13
src/mhitu.c
13
src/mhitu.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1540767817 2018/10/28 23:03:37 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.159 $ */
|
/* NetHack 3.6 mhitu.c $NHDT-Date: 1545130893 2018/12/18 11:01:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.160 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1989,12 +1989,12 @@ boolean ufound;
|
|||||||
if (mtmp->mcan)
|
if (mtmp->mcan)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!ufound)
|
if (!ufound) {
|
||||||
pline("%s explodes at a spot in %s!",
|
pline("%s explodes at a spot in %s!",
|
||||||
canseemon(mtmp) ? Monnam(mtmp) : "It",
|
canseemon(mtmp) ? Monnam(mtmp) : "It",
|
||||||
levl[mtmp->mux][mtmp->muy].typ == WATER ? "empty water"
|
levl[mtmp->mux][mtmp->muy].typ == WATER ? "empty water"
|
||||||
: "thin air");
|
: "thin air");
|
||||||
else {
|
} else {
|
||||||
int tmp = d((int) mattk->damn, (int) mattk->damd);
|
int tmp = d((int) mattk->damn, (int) mattk->damd);
|
||||||
boolean not_affected = defends((int) mattk->adtyp, uwep);
|
boolean not_affected = defends((int) mattk->adtyp, uwep);
|
||||||
|
|
||||||
@@ -2012,6 +2012,13 @@ boolean ufound;
|
|||||||
case AD_ELEC:
|
case AD_ELEC:
|
||||||
physical_damage = FALSE;
|
physical_damage = FALSE;
|
||||||
not_affected |= Shock_resistance;
|
not_affected |= Shock_resistance;
|
||||||
|
goto common;
|
||||||
|
case AD_PHYS:
|
||||||
|
/* there aren't any exploding creatures with AT_EXPL attack
|
||||||
|
for AD_PHYS damage but there might be someday; without this,
|
||||||
|
static analysis complains that 'physical_damage' is always
|
||||||
|
False when tested below; it's right, but having that in
|
||||||
|
place means one less thing to update if AD_PHYS gets added */
|
||||||
common:
|
common:
|
||||||
|
|
||||||
if (!not_affected) {
|
if (!not_affected) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 pager.c $NHDT-Date: 1543185072 2018/11/25 22:31:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.139 $ */
|
/* NetHack 3.6 pager.c $NHDT-Date: 1545129848 2018/12/18 10:44:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.142 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -527,14 +527,14 @@ char *supplemental_name;
|
|||||||
|
|
||||||
fp = dlb_fopen(DATAFILE, "r");
|
fp = dlb_fopen(DATAFILE, "r");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
pline("Cannot open data file!");
|
pline("Cannot open 'data' file!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If someone passed us garbage, prevent fault. */
|
/* If someone passed us garbage, prevent fault. */
|
||||||
if (!inp || strlen(inp) > (BUFSZ - 1)) {
|
if (!inp || strlen(inp) > (BUFSZ - 1)) {
|
||||||
impossible("bad do_look buffer passed (%s)!",
|
impossible("bad do_look buffer passed (%s)!",
|
||||||
!inp ? "null" : "too long");
|
!inp ? "null" : "too long");
|
||||||
return;
|
goto checkfile_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* To prevent the need for entries in data.base like *ngel to account
|
/* To prevent the need for entries in data.base like *ngel to account
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 priest.c $NHDT-Date: 1501725407 2017/08/03 01:56:47 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.44 $ */
|
/* NetHack 3.6 priest.c $NHDT-Date: 1545131519 2018/12/18 11:11:59 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.45 $ */
|
||||||
/* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
|
/* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -53,7 +53,9 @@ register xchar omx, omy, gx, gy;
|
|||||||
coord poss[9];
|
coord poss[9];
|
||||||
long info[9];
|
long info[9];
|
||||||
long allowflags;
|
long allowflags;
|
||||||
|
#if 0 /* dead code; see below */
|
||||||
struct obj *ib = (struct obj *) 0;
|
struct obj *ib = (struct obj *) 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (omx == gx && omy == gy)
|
if (omx == gx && omy == gy)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -121,6 +123,7 @@ pick_move:
|
|||||||
newsym(nix, niy);
|
newsym(nix, niy);
|
||||||
if (mtmp->isshk && !in_his_shop && inhishop(mtmp))
|
if (mtmp->isshk && !in_his_shop && inhishop(mtmp))
|
||||||
check_special_room(FALSE);
|
check_special_room(FALSE);
|
||||||
|
#if 0 /* dead code; maybe someday someone will track down why... */
|
||||||
if (ib) {
|
if (ib) {
|
||||||
if (cansee(mtmp->mx, mtmp->my))
|
if (cansee(mtmp->mx, mtmp->my))
|
||||||
pline("%s picks up %s.", Monnam(mtmp),
|
pline("%s picks up %s.", Monnam(mtmp),
|
||||||
@@ -128,6 +131,7 @@ pick_move:
|
|||||||
obj_extract_self(ib);
|
obj_extract_self(ib);
|
||||||
(void) mpickobj(mtmp, ib);
|
(void) mpickobj(mtmp, ib);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
17
src/rumors.c
17
src/rumors.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 rumors.c $NHDT-Date: 1542422933 2018/11/17 02:48:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ */
|
/* NetHack 3.6 rumors.c $NHDT-Date: 1545132266 2018/12/18 11:24:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.34 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -183,13 +183,15 @@ boolean exclude_cookie;
|
|||||||
void
|
void
|
||||||
rumor_check()
|
rumor_check()
|
||||||
{
|
{
|
||||||
dlb *rumors;
|
dlb *rumors = 0;
|
||||||
winid tmpwin;
|
winid tmpwin;
|
||||||
char *endp, line[BUFSZ], xbuf[BUFSZ], rumor_buf[BUFSZ];
|
char *endp, line[BUFSZ], xbuf[BUFSZ], rumor_buf[BUFSZ];
|
||||||
|
|
||||||
if (true_rumor_size < 0L) { /* we couldn't open RUMORFILE */
|
if (true_rumor_size < 0L) { /* we couldn't open RUMORFILE */
|
||||||
no_rumors:
|
no_rumors:
|
||||||
pline("rumors not accessible.");
|
pline("rumors not accessible.");
|
||||||
|
if (rumors)
|
||||||
|
(void) dlb_fclose(rumors);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,11 +425,10 @@ outoracle(special, delphi)
|
|||||||
boolean special;
|
boolean special;
|
||||||
boolean delphi;
|
boolean delphi;
|
||||||
{
|
{
|
||||||
char line[COLNO];
|
winid tmpwin;
|
||||||
char *endp;
|
|
||||||
dlb *oracles;
|
dlb *oracles;
|
||||||
int oracle_idx;
|
int oracle_idx;
|
||||||
char xbuf[BUFSZ];
|
char *endp, line[COLNO], xbuf[BUFSZ];
|
||||||
|
|
||||||
/* early return if we couldn't open ORACLEFILE on previous attempt,
|
/* early return if we couldn't open ORACLEFILE on previous attempt,
|
||||||
or if all the oracularities are already exhausted */
|
or if all the oracularities are already exhausted */
|
||||||
@@ -437,17 +438,16 @@ boolean delphi;
|
|||||||
oracles = dlb_fopen(ORACLEFILE, "r");
|
oracles = dlb_fopen(ORACLEFILE, "r");
|
||||||
|
|
||||||
if (oracles) {
|
if (oracles) {
|
||||||
winid tmpwin;
|
|
||||||
if (oracle_flg == 0) { /* if this is the first outoracle() */
|
if (oracle_flg == 0) { /* if this is the first outoracle() */
|
||||||
init_oracles(oracles);
|
init_oracles(oracles);
|
||||||
oracle_flg = 1;
|
oracle_flg = 1;
|
||||||
if (oracle_cnt == 0)
|
if (oracle_cnt == 0)
|
||||||
return;
|
goto close_oracles;
|
||||||
}
|
}
|
||||||
/* oracle_loc[0] is the special oracle;
|
/* oracle_loc[0] is the special oracle;
|
||||||
oracle_loc[1..oracle_cnt-1] are normal ones */
|
oracle_loc[1..oracle_cnt-1] are normal ones */
|
||||||
if (oracle_cnt <= 1 && !special)
|
if (oracle_cnt <= 1 && !special)
|
||||||
return; /*(shouldn't happen)*/
|
goto close_oracles; /*(shouldn't happen)*/
|
||||||
oracle_idx = special ? 0 : rnd((int) oracle_cnt - 1);
|
oracle_idx = special ? 0 : rnd((int) oracle_cnt - 1);
|
||||||
(void) dlb_fseek(oracles, (long) oracle_loc[oracle_idx], SEEK_SET);
|
(void) dlb_fseek(oracles, (long) oracle_loc[oracle_idx], SEEK_SET);
|
||||||
if (!special) /* move offset of very last one into this slot */
|
if (!special) /* move offset of very last one into this slot */
|
||||||
@@ -470,6 +470,7 @@ boolean delphi;
|
|||||||
}
|
}
|
||||||
display_nhwindow(tmpwin, TRUE);
|
display_nhwindow(tmpwin, TRUE);
|
||||||
destroy_nhwindow(tmpwin);
|
destroy_nhwindow(tmpwin);
|
||||||
|
close_oracles:
|
||||||
(void) dlb_fclose(oracles);
|
(void) dlb_fclose(oracles);
|
||||||
} else {
|
} else {
|
||||||
couldnt_open_file(ORACLEFILE);
|
couldnt_open_file(ORACLEFILE);
|
||||||
|
|||||||
Reference in New Issue
Block a user