If a monster read a scroll of earth and got killed in the process, there would be an "dealloc_obj: obj not free" panic when trying to use up the scroll. It was dropped to the ground with any other possessions and no longer in the monster's inventory at the time m_useup() was called. Use up the scroll before performing its effects. The patch does something similar for potion of polymorph, but if newcham() can kill the monster then there are other problems besides trying to use up the potion. I kept that in anyway. Fixes #468
61 KiB
61 KiB