Files
nethack/include/objects.h
PatR ed6b78e227 fix #K4054 - spellbook weight bug
Report was that converting a novel into a blank spellbook via water
damage resulted in a spellbook of blank paper that increased weight
when put into a bag of holding.

Spellbooks weigh 50 units but novels were defined with a weight of 0;
when one was created, a non-zero weight of 1 got assigned.  Blanking
it didn't update the weight; that stayed at 1.  Putting it into a
container reset the weight to match the new type: spellbook of blank
paper, so its weight increased.

Do that when blanking rather than wait until a container might fix it
up.  If it is already in a [possibly nested] container, update that
container's weight too along with any outer ones.

This also changes the base weight of novel from 0 to 10, so it still
gets magically heavier when turned into a spellbook of blank paper.
(The alternative seems to be to destroy it instead.)

The Book of the Dead weighed only 20 units which seemed odd to be so
much less than a spellbook.  This changes that to 50 to match those.
2023-12-03 18:03:16 -08:00

91 KiB