getpos() complaint about invalid movement keystroke didn't describe meta-chars
accurately
'realtime' value in xlogfile was incorrect if 'checkpoint' option was active
+make a previously-discovered scroll written with marker while blind have its
+ label known so it can be read while blind
Platform- and/or Interface-Specific Fixes
General New Features
--------------------
naming Sting or Orcrist now breaks illiterate conduct
+different feedback for reading a scroll of mail created by writing with marker
Platform- and/or Interface-Specific New Features
-/* NetHack 3.6 bones.c $NHDT-Date: 1449269914 2015/12/04 22:58:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.66 $ */
+/* NetHack 3.6 bones.c $NHDT-Date: 1450261363 2015/12/16 10:22:43 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.67 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
/* NetHack may be freely redistributed. See license for details. */
free_oname(otmp);
}
- if (otmp->otyp == SLIME_MOLD)
+ if (otmp->otyp == SLIME_MOLD) {
goodfruit(otmp->spe);
#ifdef MAIL
- else if (otmp->otyp == SCR_MAIL)
- otmp->spe = 1;
+ } else if (otmp->otyp == SCR_MAIL) {
+ /* 0: delivered in-game via external event;
+ 1: from bones or wishing; 2: written with marker */
+ if (otmp->spe == 0)
+ otmp->spe = 1;
#endif
- else if (otmp->otyp == EGG)
+ } else if (otmp->otyp == EGG) {
otmp->spe = 0;
- else if (otmp->otyp == TIN) {
+ } else if (otmp->otyp == TIN) {
/* make tins of unique monster's meat be empty */
if (otmp->corpsenm >= LOW_PM
&& unique_corpstat(&mons[otmp->corpsenm]))
-/* NetHack 3.6 mail.c $NHDT-Date: 1436754892 2015/07/13 02:34:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.20 $ */
+/* NetHack 3.6 mail.c $NHDT-Date: 1450261364 2015/12/16 10:22:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
* Notify user when new mail has arrived. Idea by Merlyn Leroy.
*
* The mail daemon can move with less than usual restraint. It can:
- * - move diagonally from a door
- * - use secret and closed doors
- * - run through a monster ("Gangway!", etc.)
- * - run over pools & traps
+ * - move diagonally from a door
+ * - use secret and closed doors
+ * - run through a monster ("Gangway!", etc.)
+ * - run over pools & traps
*
* Possible extensions:
- * - Open the file MAIL and do fstat instead of stat for efficiency.
- * (But sh uses stat, so this cannot be too bad.)
- * - Examine the mail and produce a scroll of mail named "From somebody".
- * - Invoke MAILREADER in such a way that only this single letter is
- *read.
- * - Do something to the text when the scroll is enchanted or cancelled.
- * - Make the daemon always appear at a stairwell, and have it find a
- * path to the hero.
+ * - Open the file MAIL and do fstat instead of stat for efficiency.
+ * (But sh uses stat, so this cannot be too bad.)
+ * - Examine the mail and produce a scroll of mail named "From somebody".
+ * - Invoke MAILREADER in such a way that only this single mail is read.
+ * - Do something to the text when the scroll is enchanted or cancelled.
+ * - Make the daemon always appear at a stairwell, and have it find a
+ * path to the hero.
*
* Note by Olaf Seibert: On the Amiga, we usually don't get mail. So we go
- * through most of the effects at 'random' moments.
+ * through most of the effects at 'random' moments.
* Note by Paul Winner: The MSDOS port also 'fakes' the mail daemon at
- * random intervals.
+ * random intervals.
*/
STATIC_DCL boolean FDECL(md_start, (coord *));
return;
}
if (--mustgetmail <= 0) {
- static struct mail_info deliver = { MSG_MAIL,
- "I have some mail for you", 0,
- 0 };
+ static struct mail_info deliver = {
+ MSG_MAIL, "I have some mail for you", 0, 0
+ };
newmail(&deliver);
mustgetmail = -1;
}
/*ARGSUSED*/
void
readmail(otmp)
-struct obj *otmp;
+struct obj *otmp UNUSED;
{
static char *junk[] = {
NULL, /* placeholder for "Report bugs to <devteam@nethack.org>.", */
/*ARGSUSED*/
void
readmail(otmp)
-struct obj *otmp;
+struct obj *otmp UNUSED;
{
#ifdef DEF_MAILREADER /* This implies that UNIX is defined */
register const char *mr = 0;
#else
#ifndef AMS /* AMS mailboxes are directories */
display_file(mailbox, TRUE);
-#endif /* AMS */
-#endif /* DEF_MAILREADER */
+#endif /* AMS */
+#endif /* DEF_MAILREADER */
/* get new stat; not entirely correct: there is a small time
window where we do not see new mail */
vms_doshell(cmd, TRUE);
(void) sleep(1);
}
+#else
+ nhUse(otmp);
#endif /* SHELL */
}
-/* NetHack 3.6 objnam.c $NHDT-Date: 1449975408 2015/12/13 02:56:48 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.156 $ */
+/* NetHack 3.6 objnam.c $NHDT-Date: 1450261364 2015/12/16 10:22:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.157 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
break;
#ifdef MAIL
case SCR_MAIL:
+ /* 0: delivered in-game via external event (or randomly for fake mail);
+ 1: from bones or wishing; 2: written with marker */
otmp->spe = 1;
break;
#endif
-/* NetHack 3.6 read.c $NHDT-Date: 1449972474 2015/12/13 02:07:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.127 $ */
+/* NetHack 3.6 read.c $NHDT-Date: 1450261365 2015/12/16 10:22:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.128 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifdef MAIL
case SCR_MAIL:
known = TRUE;
- if (sobj->spe)
+ if (sobj->spe == 2)
+ /* "stamped scroll" created via magic marker--without a stamp */
+ pline("This scroll is marked \"postage due\".");
+ else if (sobj->spe)
+ /* scroll of mail obtained from bones file or from wishing;
+ * note to the puzzled: the game Larn actually sends you junk
+ * mail if you win!
+ */
pline(
"This seems to be junk mail addressed to the finder of the Eye of Larn.");
- /* note to the puzzled: the game Larn actually sends you junk
- * mail if you win!
- */
else
readmail(sobj);
break;
-/* NetHack 3.6 write.c $NHDT-Date: 1446078770 2015/10/29 00:32:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
+/* NetHack 3.6 write.c $NHDT-Date: 1450261366 2015/12/16 10:22:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
}
/* decide whether the hero knowns a particular scroll's label;
- unfortunately, we can't track things are haven't been added to
+ unfortunately, we can't track things that haven't been added to
the discoveries list and aren't present in current inventory,
so some scrolls with ought to yield True will end up False */
STATIC_OVL boolean
new_obj->cursed = (curseval < 0);
#ifdef MAIL
if (new_obj->otyp == SCR_MAIL)
- new_obj->spe = 1;
+ /* 0: delivered in-game via external event (or randomly for fake mail);
+ 1: from bones or wishing; 2: written with marker */
+ new_obj->spe = 2;
#endif
- new_obj =
- hold_another_object(new_obj, "Oops! %s out of your grasp!",
- The(aobjnam(new_obj, "slip")), (const char *) 0);
+ /* unlike alchemy, for example, a successful result yields the
+ specifically chosen item so hero recognizes it even if blind;
+ the exception is for being lucky writing an undiscovered scroll,
+ where the label associated with the type-name isn't known yet */
+ new_obj->dknown = label_known(new_obj->otyp, invent) ? 1 : 0;
+
+ new_obj = hold_another_object(new_obj, "Oops! %s out of your grasp!",
+ The(aobjnam(new_obj, "slip")),
+ (const char *) 0);
+ nhUse(new_obj); /* try to avoid complaint about dead assignment */
return 1;
}