From 15f309d118a356fb1700bc28713acd83894f23a0 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 15 Apr 2005 02:59:03 +0000 Subject: [PATCH] confused remove curse When confused remove curse acts upon an object to randomly bless or curse it, clear the bknown flag. Do this for all objects which get subjected to the effect, even ones which are already blessed or cursed and hence don't change state. --- doc/fixes34.4 | 1 + src/read.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 12f2b40c9..2bb016411 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -112,6 +112,7 @@ vision was not updated when polymorphing a statue into a boulder armor which auto-curses when worn by hero should do same if worn by monster limit how high accuracy, damage, or protection can become via eating rings when blinded hero detects a trap by touch, make sure it shows up on the map +confused remove curse will cause loss of knowledge of items' curse/bless state Platform- and/or Interface-Specific Fixes diff --git a/src/read.c b/src/read.c index c88d25aaa..80def904d 100644 --- a/src/read.c +++ b/src/read.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)read.c 3.5 2005/03/28 */ +/* SCCS Id: @(#)read.c 3.5 2005/04/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -970,6 +970,9 @@ struct obj *sobj; if (confused) { blessorcurse(obj, 2); + /* lose knowledge of this object's curse/bless + state (even if it didn't actually change) */ + obj->bknown = 0; /* blessorcurse() only affects uncursed items so no need to worry about price of water going down (hence no costly_alteration) */