Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #H2060 - objects blanked by water while hero is blind
From a bug report, if you entered water while blind and any spellbooks got blanked, you would know they became "plain spellbooks" iff their original description was known. The same situation applied to scrolls and potions; if they had been previously seen you'd learn they'd become blank or clear. This fix resets the obj->dknown flag during transformation so that altered objects are only known by their class when blind, never their description, the same as when they hadn't been seen before being blanked. (When sighted, the dknown flag gets set again the next time the object's name is formatted, so the player shouldn't be able to notice that any reset took place.) Unpaid objects which get blanked should be treated as used up for shop billing purposes (force the hero to buy), but there aren't any pools in shops so aside from the added comment I'm going to pretend I didn't notice that that isn't being done.... Potions seen before becoming blind which become diluted while blind will be known to be diluted since there's no way to know the description without also knowing the dilution. I don't think that's important enough to track known-dilution separately, although I suppose we could overload the cknown (contents-known) flag for that if necessary. This also removes an inaccurate comment about the effects of Luck. Its maximum is always 13 regardless of whether the moon is full, so 5% for the lowest chance of blanking via submersion was impossible.
- Loading branch information