Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

This commit is contained in:
nhmall
2019-02-05 21:53:19 -05:00
3 changed files with 51 additions and 14 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.248 $ $NHDT-Date: 1549333449 2019/02/05 02:24:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.249 $ $NHDT-Date: 1549334449 2019/02/05 02:40:49 $
This fixes36.2 file is here to capture information about updates in the 3.6.x This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however, lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -365,6 +365,9 @@ teleporting out a vault after guard appears could result in the guard being
if game ends while hero is in a vault wall breach or in guard's temporary if game ends while hero is in a vault wall breach or in guard's temporary
corridor, a message "you are encased in the rock" could be given when corridor, a message "you are encased in the rock" could be given when
guard repairs things (for possible bones); suppress it if hero is dead guard repairs things (for possible bones); suppress it if hero is dead
DUMPLOG: output from '/' (#whatis) and ';' went into ^P message recall history
but was missing from DUMPLOG's message history due to special handling
for the first character which might be graphical rather than text
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
+31 -12
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 do_wear.c $NHDT-Date: 1543745354 2018/12/02 10:09:14 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.103 $ */ /* NetHack 3.6 do_wear.c $NHDT-Date: 1549406868 2019/02/05 22:47:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.104 $ */
/* 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. */
@@ -572,7 +572,9 @@ STATIC_PTR int
Shield_on(VOID_ARGS) Shield_on(VOID_ARGS)
{ {
/* no shield currently requires special handling when put on, but we /* no shield currently requires special handling when put on, but we
keep this uncommented in case somebody adds a new one which does */ keep this uncommented in case somebody adds a new one which does
[reflection is handled by setting u.uprops[REFLECTION].extrinsic
in setworn() called by armor_or_accessory_on() before Shield_on()] */
switch (uarms->otyp) { switch (uarms->otyp) {
case SMALL_SHIELD: case SMALL_SHIELD:
case ELVEN_SHIELD: case ELVEN_SHIELD:
@@ -648,14 +650,15 @@ Shirt_off(VOID_ARGS)
return 0; return 0;
} }
/* This must be done in worn.c, because one of the possible intrinsics
* conferred is fire resistance, and we have to immediately set
* HFire_resistance in worn.c since worn.c will check it before returning.
*/
STATIC_PTR STATIC_PTR
int int
Armor_on(VOID_ARGS) Armor_on(VOID_ARGS)
{ {
/*
* No suits require special handling. Special properties conferred by
* suits are set up as intrinsics (actually 'extrinsics') by setworn()
* which is called by armor_or_accessory_on() before Armor_on().
*/
return 0; return 0;
} }
@@ -669,7 +672,10 @@ Armor_off(VOID_ARGS)
} }
/* The gone functions differ from the off functions in that if you die from /* The gone functions differ from the off functions in that if you die from
* taking it off and have life saving, you still die. * taking it off and have life saving, you still die. [Obsolete reference
* to lack of fire resistance being fatal in hell (nethack 3.0) and life
* saving putting a removed item back on to prevent that from immediately
* repeating.]
*/ */
int int
Armor_gone() Armor_gone()
@@ -920,7 +926,7 @@ register struct obj *obj;
goto adjust_attrib; goto adjust_attrib;
case RIN_ADORNMENT: case RIN_ADORNMENT:
which = A_CHA; which = A_CHA;
adjust_attrib: adjust_attrib:
old_attrib = ACURR(which); old_attrib = ACURR(which);
ABON(which) += obj->spe; ABON(which) += obj->spe;
observable = (old_attrib != ACURR(which)); observable = (old_attrib != ACURR(which));
@@ -1034,7 +1040,7 @@ boolean gone;
goto adjust_attrib; goto adjust_attrib;
case RIN_ADORNMENT: case RIN_ADORNMENT:
which = A_CHA; which = A_CHA;
adjust_attrib: adjust_attrib:
old_attrib = ACURR(which); old_attrib = ACURR(which);
ABON(which) -= obj->spe; ABON(which) -= obj->spe;
observable = (old_attrib != ACURR(which)); observable = (old_attrib != ACURR(which));
@@ -1082,7 +1088,7 @@ struct obj *obj;
void void
Blindf_on(otmp) Blindf_on(otmp)
register struct obj *otmp; struct obj *otmp;
{ {
boolean already_blind = Blind, changed = FALSE; boolean already_blind = Blind, changed = FALSE;
@@ -1118,7 +1124,7 @@ register struct obj *otmp;
void void
Blindf_off(otmp) Blindf_off(otmp)
register struct obj *otmp; struct obj *otmp;
{ {
boolean was_blind = Blind, changed = FALSE; boolean was_blind = Blind, changed = FALSE;
@@ -1902,8 +1908,21 @@ struct obj *obj;
if (armor) { if (armor) {
int delay; int delay;
/*
* FIXME: [#H8124]
* This (setting 'obj->known=1') takes places as soon as hero
* starts donning armor and sticks even if interrupted before
* finishing. (Most glaring instance is theft of this armor
* by a nymph but any interruption applies.)
*
* Perhaps setworn() (the reason to set obj->known=1) should
* be deferred until the (*aftermv)() action? But Boots_on()/
* Helmet_on()/&c aren't passed this 'obj', they rely to uarmf/
* uarmh/&c being assigned by setworn() before they're called.
*/
obj->known = 1; /* since AC is shown on the status line */ obj->known = 1; /* since AC is shown on the status line */
/* if the armor is wielded, release it for wearing */ /* if the armor is wielded, release it for wearing (won't be
welded even if cursed; that only happens for weapons/weptools) */
if (obj->owornmask & W_WEAPON) if (obj->owornmask & W_WEAPON)
remove_worn_item(obj, FALSE); remove_worn_item(obj, FALSE);
setworn(obj, mask); setworn(obj, mask);
+16 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 pager.c $NHDT-Date: 1546656415 2019/01/05 02:46:55 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.147 $ */ /* NetHack 3.6 pager.c $NHDT-Date: 1549334449 2019/02/05 02:40:49 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.150 $ */
/* 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. */
@@ -1242,6 +1242,21 @@ coord *click_cc;
if (found) { if (found) {
/* use putmixed() because there may be an encoded glyph present */ /* use putmixed() because there may be an encoded glyph present */
putmixed(WIN_MESSAGE, 0, out_str); putmixed(WIN_MESSAGE, 0, out_str);
#ifdef DUMPLOG
{
char dmpbuf[BUFSZ];
/* putmixed() bypasses pline() so doesn't write to DUMPLOG;
tty puts it into ^P recall, so it ought to be there;
DUMPLOG is plain text, so override graphics character;
at present, force space, but we ought to use defsyms[]
value for the glyph the graphics character came from */
(void) decode_mixed(dmpbuf, out_str);
if (dmpbuf[0] < ' ' || dmpbuf[0] >= 127) /* ASCII isprint() */
dmpbuf[0] = ' ';
dumplogmsg(dmpbuf);
}
#endif
/* check the data file for information about this thing */ /* check the data file for information about this thing */
if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE