scrolls written while blind; scrolls of mail

Make a fix suggested during beta testing:  you can read scrolls while
blind if you know the label, and you can write a scroll with a magic
marker while blind, but the result was flagged as description unknown
so you couldn't read the newly written scroll until regaining sight
or obtaining object identification.  So change writing a previously
discovered scroll while blind to set dknown since a successful write
always yields the type of scroll requested.  Getting lucky while
attempting to write an undiscovered scroll--which has to be done by
scroll's type name (for instance "food detection") rather than by its
label ("YUM YUM")--still leaves the description flagged as unknown
since hero hasn't seen the what sort of label the new scroll has.

Along the way I got side-tracked by the possibilty of writing a scroll
of mail.  It's allowed and yielded the same result as finding such a
scroll in bones, or wishing for one:  when read, it was junk mail from
Larn.  Make one written via marker give different feedback since it
comes from creation of a stamped scroll without any stamps available.

Also, suppress an "argument not used" warning for readmail().
This commit is contained in:
PatR
2015-12-16 02:23:32 -08:00
parent 8f96d4b9ef
commit af6887796f
6 changed files with 62 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
/* 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. */
@@ -970,12 +970,16 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
#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;