Having a hard cap on the number of rerolls doesn't help save CPU
usage from excessive rerolling, because if the cap is set low
enough to keep the CPU usage reasonable it isn't high enough for
players to actually use the feature.
Instead, allow capping the number of rerolls per second. (Sensible
values seem to be in the 5-10 range.) If the player attempts more
rerolls than this, show a paranoid confirmation prompt: the need to
type the answer to the prompt will slow a human user down (and if
the prompt is filled in too quickly, it will simply just be shown
again, preventing attempts to use automation to skip the prompt).
Buffer overflows could occur when interacting with containers while
inputting or outputting many items.
This commit ensures topline updates do not exceed buffer limits by
checking against TBUFSZ.
Issue reported by k21971 on IRC.
When a random statue or a figurine was generated in special levels,
the gender was not initialized correctly, so you ended up getting
eg. "dwarf ruler"
It now works correctly, and you can still specifically request
a non-gendered version with the montype-parameter.
For example
des.object({ id = "statue" });
des.object({ id = "statue", montype = "dwarf ruler" });
The gnome king statue in minetn-5 was generated as a gnome leader,
obey the gender of the statue name, so generating a statue of
for example "gnome king" and "gnome queen" works correctly.
When a vault guard is being moving off the map to <0,0> to wait until
his temporary corridor gets removed, don't try to update the map for
that off-the-screen location in order to avoid triggering impossible()
from newsym().
Plus a trivial tweak to NH_abort(). Its argument is never modified so
declare it as such.