fix github issue #1233 - egraving with stacks
commita49444ea39848b3ee2d3b4124493212255587eb3
authorPatR <rankin@nethack.org>
Sun, 21 Apr 2024 00:00:04 +0000 (20 17:00 -0700)
committerPatR <rankin@nethack.org>
Sun, 21 Apr 2024 00:00:04 +0000 (20 17:00 -0700)
treedbc9455e04d87b09dafb26f7ff47ea2569245c36
parent2afca0fc56e0781fe7fea08ef01dc263d9027669
fix github issue #1233 - egraving with stacks

Issue reported by NetSysFire:  engraving with a stack of multiple
weapons dulls the whole stack where it ought to only dull one of them.

This was actually trickier than it ought to have been, and will need
a lot more testing.  When engraving with a stack, split one off and
use just that one.  If inventory is full, it will be dropped (after
writing the first 2 characters and becoming duller).  I've avoided
moving it into the overflow slot, otherwise engraving repeatedly with
an arbitrarily large stack could be used to produce an arbitrary
number of overflow items.

Engraving with a weapon of known enchantment us somewhat more verbose
than it used to be.

From the report:
" It would be a great quality of life change if only one item of the
" specified stack was used, as with #forceing open chests.

One person's improved quality of life is another's outrage.  Players
who want to dull a stack of +6 daggers down to +5 in order to have
another try of enchanting to +7 are not going to like this....

Closes #1233
doc/fixes3-7-0.txt
src/engrave.c