They aren't initially loaded with boulders, thus aren't dangerous.
This is particularly relevant for pets, who would otherwise be very
reluctant to follow their owners up to the level above.
I noticed a strange thing where the X11 windowport didn't show the tethered
thrown aklys animation correctly. Interestingly, other stuff, such as zapped
wands did show the path. I didn't bother trying to figure out what the core
was doing differently, as the animation worked in all the other windowports,
so instead fix the issue in X11, so it behaves the same as all the others.
The issue seems to be that the event loop exited on any(?) event, instead
of our specific timed event. So, create our event with a magic id number,
and exit only when we encounter that.
Also: Obey the timed_delay option, and change the delay from 30ms to 50ms,
like in other windowports.
During a restore from a savefiles is not the only
time that levels are processed by getlev() in NetHack.
They are read back in as the hero moves up and down
between levels and dungeons.
The previous fix checked for program_state.beyond_savefile_load,
but once set, that remains static through level changes.
It would be better to check the status of the level
being read, because those operations do placements as well.
Add the following:
struct levelstatus level_status;
level_status.making - in the midst of makelevel processing
level_status.loading - in the midst of loading a level via getlev()
level_status.ready - the level is fully ready
(all 3 of the above status settings are mutually exclusive)
level_status.shkready - the level processing is far enough
along to allow shop keeper tests and actions
This also relocates the find_lev_obj() call in getlev() down several
lines, so that it falls after any set_residency() calls, so that it
has a better chance of carrying out what it was intending to do with
the shop_keeper() checks made by its subfunctions.
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.