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 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. */
@@ -118,15 +118,18 @@ boolean restore;
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]))