Wishing for an item uses hold_another_object to put it into inventory and hold_another_object wasn't reporting changes in encumbrance. That feedback would happen at start of next turn so its lack usually wasn't noticeable, but encumbrance could be off for remainder of the current turn which might include additional move(s). Report indicated that dropping something seemed to increase encumbrance instead of decrease it, but it was dropped on an extra move and actually a delayed report of the increase that hold_another_object failed to show. I fixed a couple of other things with hold_another_object: it would add an item to inventory, which triggered an update of persistent inventory if that was enabled, then remove it from inventory in order to drop it if fumbling or inventory had too many items or encumbrance was going to become too high, triggering a second update of persistent inventory to reverse the first one. Also, "encumbrance becoming too high" was using hardcoded Stressed instead of the 'pickup_burden' option that manages the same situation during pickup. Not because hold_another_object isn't pickup, but because its use of hardcoded Stressed predated implementation of that option. There was another fix for hold_another_object recently and I've moved the fixes entry for that one to group it with the new ones. Also, update an obsolete (from !GOLDOBJ config) comment in makewish().
25 KiB
25 KiB