Merge branch 'NetHack-3.6.2'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1554045808 2019/03/31 15:23:28 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.96 $ */
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1554591223 2019/04/06 22:53:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.97 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -542,11 +542,11 @@ void
|
||||
display_gamewindows()
|
||||
{
|
||||
WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
|
||||
#ifdef STATUS_HILITES
|
||||
status_initialize(0);
|
||||
#else
|
||||
WIN_STATUS = create_nhwindow(NHW_STATUS);
|
||||
#endif
|
||||
if (VIA_WINDOWPORT()) {
|
||||
status_initialize(0);
|
||||
} else {
|
||||
WIN_STATUS = create_nhwindow(NHW_STATUS);
|
||||
}
|
||||
WIN_MAP = create_nhwindow(NHW_MAP);
|
||||
WIN_INVEN = create_nhwindow(NHW_MENU);
|
||||
/* in case of early quit where WIN_INVEN could be destroyed before
|
||||
|
||||
43
src/botl.c
43
src/botl.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1554554180 2019/04/06 12:36:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.142 $ */
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1554591223 2019/04/06 22:53:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.143 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -14,10 +14,8 @@ const char *const enc_stat[] = { "", "Burdened", "Stressed",
|
||||
"Strained", "Overtaxed", "Overloaded" };
|
||||
|
||||
STATIC_DCL const char *NDECL(rank);
|
||||
#ifdef STATUS_HILITES
|
||||
STATIC_DCL void NDECL(bot_via_windowport);
|
||||
STATIC_DCL void NDECL(stat_update_time);
|
||||
#endif
|
||||
|
||||
static char *
|
||||
get_strength_str()
|
||||
@@ -235,14 +233,14 @@ bot()
|
||||
{
|
||||
/* dosave() flags completion by setting u.uhp to -1 */
|
||||
if ((u.uhp != -1) && g.youmonst.data && iflags.status_updates) {
|
||||
#ifdef STATUS_HILITES
|
||||
bot_via_windowport();
|
||||
#else
|
||||
curs(WIN_STATUS, 1, 0);
|
||||
putstr(WIN_STATUS, 0, do_statusline1());
|
||||
curs(WIN_STATUS, 1, 1);
|
||||
putmixed(WIN_STATUS, 0, do_statusline2());
|
||||
#endif
|
||||
if (VIA_WINDOWPORT()) {
|
||||
bot_via_windowport();
|
||||
} else {
|
||||
curs(WIN_STATUS, 1, 0);
|
||||
putstr(WIN_STATUS, 0, do_statusline1());
|
||||
curs(WIN_STATUS, 1, 1);
|
||||
putmixed(WIN_STATUS, 0, do_statusline2());
|
||||
}
|
||||
}
|
||||
g.context.botl = g.context.botlx = iflags.time_botl = FALSE;
|
||||
}
|
||||
@@ -250,13 +248,13 @@ bot()
|
||||
void
|
||||
timebot()
|
||||
{
|
||||
if (flags.time) {
|
||||
#ifdef STATUS_HILITES
|
||||
stat_update_time();
|
||||
#else
|
||||
/* old status display updates everything */
|
||||
bot();
|
||||
#endif
|
||||
if (flags.time && iflags.status_updates) {
|
||||
if (VIA_WINDOWPORT()) {
|
||||
stat_update_time();
|
||||
} else {
|
||||
/* old status display updates everything */
|
||||
bot();
|
||||
}
|
||||
}
|
||||
iflags.time_botl = FALSE;
|
||||
}
|
||||
@@ -696,11 +694,6 @@ bot_via_windowport()
|
||||
evaluate_and_notify_windowport(g.valset, idx);
|
||||
}
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
/* stat_update_time() isn't really a STATUS_HILITES routine
|
||||
* but timebot() will only ever call it for that configuration.
|
||||
*/
|
||||
|
||||
/* update just the status lines' 'time' field */
|
||||
STATIC_OVL void
|
||||
stat_update_time()
|
||||
@@ -718,7 +711,6 @@ stat_update_time()
|
||||
NO_COLOR, (unsigned long *) 0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
STATIC_OVL boolean
|
||||
eval_notify_windowport_field(fld, valsetlist, idx)
|
||||
@@ -2161,6 +2153,7 @@ boolean from_configfile;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif /* STATUS_HILITES */
|
||||
|
||||
const struct condmap valid_conditions[] = {
|
||||
{ "stone", BL_MASK_STONE },
|
||||
@@ -2178,6 +2171,8 @@ const struct condmap valid_conditions[] = {
|
||||
{ "ride", BL_MASK_RIDE },
|
||||
};
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
|
||||
const struct condmap condition_aliases[] = {
|
||||
{ "strangled", BL_MASK_STRNGL },
|
||||
{ "all", BL_MASK_STONE | BL_MASK_SLIME | BL_MASK_STRNGL
|
||||
|
||||
10
src/dog.c
10
src/dog.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dog.c $NHDT-Date: 1545439150 2018/12/22 00:39:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.85 $ */
|
||||
/* NetHack 3.6 dog.c $NHDT-Date: 1554580624 2019/04/06 19:57:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.85 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -7,11 +7,6 @@
|
||||
|
||||
STATIC_DCL int NDECL(pet_type);
|
||||
|
||||
/* cloned from mon.c; used here if mon_arrive() can't place mon */
|
||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||
(Is_rogue_level(&u.uz) \
|
||||
|| (g.level.flags.graveyard && is_undead(mdat) && rn2(3)))
|
||||
|
||||
void
|
||||
newedog(mtmp)
|
||||
struct monst *mtmp;
|
||||
@@ -696,7 +691,8 @@ coord *cc; /* optional destination coordinates */
|
||||
/* **** NOTE: worm is truncated to # segs = max wormno size **** */
|
||||
num_segs = min(cnt, MAX_NUM_WORMS - 1); /* used below */
|
||||
wormgone(mtmp); /* destroys tail and takes head off map */
|
||||
place_monster(mtmp, mtmp->mx, mtmp->my); /* put head back for relmon */
|
||||
/* there used to be a place_monster() here for the relmon() below,
|
||||
but it doesn't require the monster to be on the map anymore */
|
||||
}
|
||||
|
||||
/* set minvent's obj->no_charge to 0 */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1554045810 2019/03/31 15:23:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.167 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1554591224 2019/04/06 22:53:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.168 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1349,9 +1349,8 @@ int how;
|
||||
}
|
||||
display_nhwindow(WIN_MESSAGE, TRUE);
|
||||
destroy_nhwindow(WIN_MAP), WIN_MAP = WIN_ERR;
|
||||
#ifndef STATUS_HILITES
|
||||
destroy_nhwindow(WIN_STATUS), WIN_STATUS = WIN_ERR;
|
||||
#endif
|
||||
if (WIN_STATUS != WIN_ERR)
|
||||
destroy_nhwindow(WIN_STATUS), WIN_STATUS = WIN_ERR;
|
||||
destroy_nhwindow(WIN_MESSAGE), WIN_MESSAGE = WIN_ERR;
|
||||
|
||||
if (!done_stopprint || flags.tombstone)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1550524562 2019/02/18 21:16:02 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.279 $ */
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1554580625 2019/04/06 19:57:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.280 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2647,7 +2647,7 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
||||
xchar newx, newy;
|
||||
coord mm;
|
||||
|
||||
if (mtmp->mx == x && mtmp->my == y && m_at(x,y) == mtmp)
|
||||
if (mtmp->mx == x && mtmp->my == y && m_at(x, y) == mtmp)
|
||||
return TRUE;
|
||||
|
||||
if (move_other && (othermon = m_at(x, y)) != 0) {
|
||||
@@ -2666,7 +2666,7 @@ boolean move_other; /* make sure mtmp gets to x, y! so move m_at(x, y) */
|
||||
*/
|
||||
if (!enexto(&mm, newx, newy, mtmp->data))
|
||||
return FALSE;
|
||||
if (!isok(mm.x,mm.y))
|
||||
if (!isok(mm.x, mm.y))
|
||||
return FALSE;
|
||||
newx = mm.x;
|
||||
newy = mm.y;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1554155747 2019/04/01 21:55:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.362 $ */
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1554591224 2019/04/06 22:53:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.363 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -4034,9 +4034,8 @@ boolean tinitial, tfrom_file;
|
||||
|| boolopt[i].addr == &flags.showscore
|
||||
#endif
|
||||
|| boolopt[i].addr == &flags.showexp) {
|
||||
#ifdef STATUS_HILITES
|
||||
status_initialize(REASSESS_ONLY);
|
||||
#endif
|
||||
if (VIA_WINDOWPORT())
|
||||
status_initialize(REASSESS_ONLY);
|
||||
g.context.botl = TRUE;
|
||||
} else if (boolopt[i].addr == &flags.invlet_constant) {
|
||||
if (flags.invlet_constant) {
|
||||
@@ -4077,11 +4076,12 @@ boolean tinitial, tfrom_file;
|
||||
iflags.wc2_petattr = curses_read_attrs("I");
|
||||
}
|
||||
#endif
|
||||
#ifdef STATUS_HILITES
|
||||
} else if (boolopt[i].addr == &iflags.wc2_hitpointbar) {
|
||||
status_initialize(REASSESS_ONLY);
|
||||
g.opt_need_redraw = TRUE;
|
||||
#endif
|
||||
if (VIA_WINDOWPORT()) {
|
||||
/* [is reassessment really needed here?] */
|
||||
status_initialize(REASSESS_ONLY);
|
||||
g.opt_need_redraw = TRUE;
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
} else if (boolopt[i].addr == &iflags.use_color) {
|
||||
g.opt_need_redraw = TRUE;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 save.c $NHDT-Date: 1543972194 2018/12/05 01:09:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.115 $ */
|
||||
/* NetHack 3.6 save.c $NHDT-Date: 1554591225 2019/04/06 22:53:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.117 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2009. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1401,9 +1401,8 @@ freedynamicdata()
|
||||
/* free_pickinv_cache(); -- now done from really_done()... */
|
||||
free_symsets();
|
||||
#endif /* FREE_ALL_MEMORY */
|
||||
#ifdef STATUS_HILITES
|
||||
status_finish();
|
||||
#endif
|
||||
if (VIA_WINDOWPORT())
|
||||
status_finish();
|
||||
#ifdef DUMPLOG
|
||||
dumplogfreemessages();
|
||||
#endif
|
||||
|
||||
14
src/steal.c
14
src/steal.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 steal.c $NHDT-Date: 1496614914 2017/06/04 22:21:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.69 $ */
|
||||
/* NetHack 3.6 steal.c $NHDT-Date: 1554580626 2019/04/06 19:57:06 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.72 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -693,7 +693,17 @@ struct monst *mon;
|
||||
for the other roles are not */
|
||||
if (obj_resists(obj, 0, 0) || is_quest_artifact(obj)) {
|
||||
obj_extract_self(obj);
|
||||
mdrop_obj(mon, obj, FALSE);
|
||||
if (mon->mx) {
|
||||
mdrop_obj(mon, obj, FALSE);
|
||||
} else { /* migrating monster not on map */
|
||||
if (obj->owornmask) {
|
||||
mon->misc_worn_check &= ~obj->owornmask;
|
||||
if (obj->owornmask & W_WEP)
|
||||
setmnotwielded(mon, obj);
|
||||
obj->owornmask = 0L;
|
||||
}
|
||||
rloco(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user