From: copperwater Date: Wed, 1 Nov 2017 02:15:44 +0000 (-0400) Subject: Scroll of remove curse becomes learned when items' curses are removed X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e13b1833ccc980ff86db9b8a703aba507539cd10;p=nethack Scroll of remove curse becomes learned when items' curses are removed The scroll of remove curse is trivially identified by checking inventory after reading it to see whether anything became uncursed. This leads to annoying tactics like remembering which scroll you just read so you can go call it "remove curse" on the discoveries list. This simply autoidentifies it when an item that was known to be cursed has its curse removed. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 820ce6117..7b1ffbb83 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -111,6 +111,7 @@ confused scroll of light summons tame cancelled lights potions of hallucination can give enlightenment add a small chance of surviving food poisoning deliberate level teleporter activation ignores magic resistance +auto-id scroll of remove curse when a known buc-state was changed Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/read.c b/src/read.c index 3f0bba568..19aabab13 100644 --- a/src/read.c +++ b/src/read.c @@ -1138,6 +1138,12 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ if (shop_h2o) costly_alteration(obj, COST_UNCURS); uncurse(obj); + /* if the object was known to be cursed and is now known not to be, + make the scroll known; it's trivial to identify anyway by comparing + inventory before and after */ + if (obj->bknown && otyp == SCR_REMOVE_CURSE) { + learnscrolltyp(SCR_REMOVE_CURSE); + } } } }