]> granicus.if.org Git - nethack/commitdiff
Scroll of remove curse becomes learned when items' curses are removed
authorcopperwater <aosdict@gmail.com>
Wed, 1 Nov 2017 02:15:44 +0000 (22:15 -0400)
committerPasi Kallinen <paxed@alt.org>
Sun, 5 Apr 2020 12:40:21 +0000 (15:40 +0300)
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.

doc/fixes37.0
src/read.c

index 820ce6117a85d1d3d6697254ccf09bdd6540c961..7b1ffbb83a674d5372053072aa298c16b1a7b7e2 100644 (file)
@@ -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
index 3f0bba5687f6e3e4336ec875173e170ebce074f6..19aabab1322665d8f0f8750fa1377f467d3cefd8 100644 (file)
@@ -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);
+                        }
                     }
                 }
             }