confused blessed scroll of remove curse on itself
Noticed when testing the set_bknown patch earlier: something updated the persistent inventory window while scroll processing was in the midst of traversing invent and it showed the scroll I'd just read change from known blessed to bless/curse state not known. The scroll should really be removed from inventory because player is told that it has disappeared, but unlike charging (which does do that so that it is gone when selecting an item to charge), remove curse isn't auto-IDed and the code to ask the player to call an unIDed item something only kicks in when it's still in inventory. Preventing the scroll in use from having its bknown flag cleared should be good enough; it won't have disappeared yet but at least it won't be visibly changing.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1546465285 2019/01/02 21:41:25 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.164 $ */
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1559679496 2019/06/04 20:18:16 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1285,6 +1285,10 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
|
||||
/* gold isn't subject to cursing and blessing */
|
||||
if (obj->oclass == COIN_CLASS)
|
||||
continue;
|
||||
/* hide current scroll from itself so that perm_invent won't
|
||||
show known blessed scroll losing bknown when confused */
|
||||
if (obj == sobj && obj->quan == 1L)
|
||||
continue;
|
||||
wornmask = (obj->owornmask & ~(W_BALL | W_ART | W_ARTI));
|
||||
if (wornmask && !sblessed) {
|
||||
/* handle a couple of special cases; we don't
|
||||
|
||||
Reference in New Issue
Block a user