diff --git a/doc/fixes36.2 b/doc/fixes36.2 index a5c243912..159e58cfb 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -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 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 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 +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 diff --git a/src/do_wear.c b/src/do_wear.c index 542b294bd..528986a78 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -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) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -568,7 +568,9 @@ STATIC_PTR int Shield_on(VOID_ARGS) { /* 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) { case SMALL_SHIELD: case ELVEN_SHIELD: @@ -644,14 +646,15 @@ Shirt_off(VOID_ARGS) 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 int 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; } @@ -665,7 +668,10 @@ Armor_off(VOID_ARGS) } /* 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 Armor_gone() @@ -916,7 +922,7 @@ register struct obj *obj; goto adjust_attrib; case RIN_ADORNMENT: which = A_CHA; - adjust_attrib: + adjust_attrib: old_attrib = ACURR(which); ABON(which) += obj->spe; observable = (old_attrib != ACURR(which)); @@ -1030,7 +1036,7 @@ boolean gone; goto adjust_attrib; case RIN_ADORNMENT: which = A_CHA; - adjust_attrib: + adjust_attrib: old_attrib = ACURR(which); ABON(which) -= obj->spe; observable = (old_attrib != ACURR(which)); @@ -1078,7 +1084,7 @@ struct obj *obj; void Blindf_on(otmp) -register struct obj *otmp; +struct obj *otmp; { boolean already_blind = Blind, changed = FALSE; @@ -1114,7 +1120,7 @@ register struct obj *otmp; void Blindf_off(otmp) -register struct obj *otmp; +struct obj *otmp; { boolean was_blind = Blind, changed = FALSE; @@ -1898,8 +1904,21 @@ struct obj *obj; if (armor) { 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 */ - /* 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) remove_worn_item(obj, FALSE); setworn(obj, mask); diff --git a/src/pager.c b/src/pager.c index 2f37f261f..05fb966f4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -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) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1242,6 +1242,21 @@ coord *click_cc; if (found) { /* use putmixed() because there may be an encoded glyph present */ 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 */ if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE