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 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. */
@@ -3345,6 +3345,8 @@ typfnd:
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