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.
This commit is contained in:
copperwater
2017-10-31 22:15:44 -04:00
committed by Pasi Kallinen
parent da3afd39d2
commit e13b1833cc
2 changed files with 7 additions and 0 deletions

View 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

View 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);
}
}
}
}