Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6

This commit is contained in:
nhmall
2019-11-14 19:14:42 -05:00
4 changed files with 74 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1573776729 2019/11/15 00:12:09 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.174 $ $NHDT-Date: 1573773953 2019/11/14 23:25:53 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -252,6 +252,7 @@ in symset:curses, symbol S_tree was accidentally set to horizontal line where
percentage highlighting for Xp broke up/down/changed highlighting for it;
it was flagged as having gone up every time the percentage changed
deaf change to zap_over_floor needed to be restricted to player actions only
monster vs shade attack inflicted damage despite "passes harmlessly through"
curses: sometimes the message window would show a blank line after a prompt
curses: the change to show map in columns 1..79 instead of 2..80 made the
highlight for '@' show up in the wrong place if clipped map had been

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mhitm.c $NHDT-Date: 1573688692 2019/11/13 23:44:52 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */
/* NetHack 3.6 mhitm.c $NHDT-Date: 1573773926 2019/11/14 23:25:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -411,9 +411,9 @@ register struct monst *magr, *mdef;
|| mdef->data == &mons[PM_BROWN_PUDDING])
&& (otmp && (objects[otmp->otyp].oc_material == IRON
|| objects[otmp->otyp].oc_material == METAL))
&& mdef->mhp > 1
&& !mdef->mcan) {
&& mdef->mhp > 1 && !mdef->mcan) {
struct monst *mclone;
if ((mclone = clone_mon(mdef, 0, 0)) != 0) {
if (vis && canspotmon(mdef)) {
char buf[BUFSZ];
@@ -455,6 +455,13 @@ register struct monst *magr, *mdef;
break;
case AT_ENGL:
if (mdef->data == &mons[PM_SHADE]) { /* no silver teeth... */
if (vis)
pline("%s attempt to engulf %s is futile.",
s_suffix(Monnam(magr)), mon_nam(mdef));
strike = 0;
break;
}
if (u.usteed && mdef == u.usteed) {
strike = 0;
break;
@@ -572,7 +579,9 @@ struct attack *mattk;
mdef->mcansee ? "smiles at" : "talks to");
pline("%s %s %s.", buf, mon_nam(mdef),
compat == 2 ? "engagingly" : "seductively");
} else if (!shade_miss(magr, mdef, otmp, FALSE, TRUE)) {
} else if (shade_miss(magr, mdef, otmp, FALSE, TRUE)) {
return MM_MISS; /* bypass mdamagem() */
} else {
char magr_name[BUFSZ];
Strcpy(magr_name, Monnam(magr));
@@ -851,11 +860,12 @@ mdamagem(magr, mdef, mattk)
register struct monst *magr, *mdef;
register struct attack *mattk;
{
struct obj *obj;
struct obj *obj, dmgwep;
char buf[BUFSZ];
struct permonst *pa = magr->data, *pd = mdef->data;
int armpro, num, tmp = d((int) mattk->damn, (int) mattk->damd),
res = MM_MISS;
int armpro, num,
tmp = d((int) mattk->damn, (int) mattk->damd),
res = MM_MISS;
boolean cancelled;
if ((touch_petrifies(pd) /* or flesh_petrifies() */
@@ -958,16 +968,19 @@ register struct attack *mattk;
case AD_HEAL:
case AD_PHYS:
physical:
if (mattk->aatyp == AT_KICK && thick_skinned(pd)) {
/* this shade check is necessary in case any attacks which
dish out physical damage bypass hitmm() to get here */
if ((mattk->aatyp == AT_WEAP || mattk->aatyp == AT_CLAW) && otmp)
dmgwep = *otmp;
else
dmgwep = zeroobj;
if (shade_miss(magr, mdef, &dmgwep, FALSE, TRUE)) {
tmp = 0;
} else if (mattk->aatyp == AT_KICK && thick_skinned(pd)) {
tmp = 0;
} else if (mattk->aatyp == AT_WEAP
|| (mattk->aatyp == AT_CLAW && otmp)) {
if (mdef->data == &mons[PM_SHADE]
&& !(otmp && objects[otmp->otyp].oc_material == SILVER)) {
/* "passes harmlessly through" given by hitmm() */
tmp = 0;
break;
}
if (otmp) {
struct obj *marmg;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 uhitm.c $NHDT-Date: 1573688694 2019/11/13 23:44:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.214 $ */
/* NetHack 3.6 uhitm.c $NHDT-Date: 1573764936 2019/11/14 20:55:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.215 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1375,17 +1375,17 @@ boolean thrown, verbose;
if (verbose
&& ((youdef || cansee(mdef->mx, mdef->my) || sensemon(mdef))
|| (magr == &youmonst && distu(mdef->mx, mdef->my) <= 2))) {
static const char harmless[] = " harmlessly through ";
static const char harmlessly_thru[] = " harmlessly through ";
what = (!obj || shade_aware(obj)) ? "attack" : cxname(obj);
target = youdef ? "you" : mon_nam(mdef);
if (!thrown) {
whose = youagr ? "Your" : s_suffix(Monnam(magr));
pline("%s %s %s%s%s.", whose, what,
vtense(what, "pass"), harmless, mon_nam(mdef));
vtense(what, "pass"), harmlessly_thru, target);
} else {
pline("%s %s%s%s.", The(what), /* note: not pline_The() */
vtense(what, "pass"), harmless, mon_nam(mdef));
vtense(what, "pass"), harmlessly_thru, target);
}
if (!youdef && !canspotmon(mdef))
map_invisible(mdef->mx, mdef->my);

View File

@@ -24,6 +24,15 @@ extern char erase_char, kill_char;
extern long curs_mesg_suppress_turn; /* from cursmesg.c */
/* stubs for curses_procs{} */
#ifdef POSITIONBAR
static void dummy_update_position_bar(char *);
#endif
#ifdef CHANGE_COLOR
static void dummy_change_color(int, long, int);
static char *dummy_get_color_string(VOID_ARGS);
#endif
/* Public functions for curses NetHack interface */
/* Interface definition, for windows.c */
@@ -69,7 +78,7 @@ struct window_procs curses_procs = {
curses_cliparound,
#endif
#ifdef POSITIONBAR
donull,
dummy_update_position_bar,
#endif
curses_print_glyph,
curses_raw_print,
@@ -83,9 +92,13 @@ struct window_procs curses_procs = {
curses_get_ext_cmd,
curses_number_pad,
curses_delay_output,
#ifdef CHANGE_COLOR /* only a Mac option currently */
donull,
donull,
#ifdef CHANGE_COLOR
dummy_change_color,
#ifdef MAC /* old OS 9, not OSX */
(void (*)(int)) 0,
(short (*)(winid, char *)) 0,
#endif
dummy_get_color_string,
#endif
curses_start_screen,
curses_end_screen,
@@ -945,4 +958,28 @@ curs_reset_windows(boolean redo_main, boolean redo_status)
}
}
/* stubs for curses_procs{} */
#ifdef POSITIONBAR
static void
dummy_update_position_bar(char *arg UNUSED)
{
return;
}
#endif
#ifdef CHANGE_COLOR
static void
dummy_change_color(int a1 UNUSED, long a2 UNUSED, int a3 UNUSED)
{
return;
}
static char *
dummy_get_color_string(VOID_ARGS)
{
return (char *) 0;
}
#endif
/*cursmain.c*/