Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some crashes with fallback randarts for staff of battle
A weapon can be upgraded to an unrand enhancer staff (e.g. staff of battle), changing object type. In the case where this unrand had already generated, the code for finding a fallback randart wasn't handling this case correctly (setting OBJ_STAVES as the base type, but a weapon sub type), and crashing. This commit fixes a few other issues with fallback randarts for enhancer staves as well, and does a bit of code cleanup. Example crash: https://crawl.xtahua.com/crawl/morgue/ventricule/crash-ventricule-20200614-182734.txt (cherry picked from commit 64415b1)
- Loading branch information
Showing
1 changed file
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters