The lava river will now draw another river, until a certain
amount of map locations have been turned into lava, so you don't
get a teensy "river" made out of 2 lava pools.
Add a lua selection method to count the number of locations
in the selection.
Items in initial hero inventory, or generated via lua in
special levels or themed rooms are not subject to this.
Code via xnethack by copperwater <aosdict@gmail.com>,
with some modifications.
Switch to using the term "sound triggers" for things that
result in a call to one of the soundlib routines.
SNDCAP_* renamed to SOUND_TRIGGER_*
sndcap field in the sound_procs struct changed to sound_triggers
rename display_gamewindows() to init_sound_and_display_gamewindows()
(I know that's getting pretty long-named).
move activate_chosen_soundlib() into init_sound_and_display_gamewindows()
from moveloop_preamble().
Also included was a missing break in a switch related to sounds.
Pull request from entrez: if bones left dead hero's corpse on top
of a new grave, don't find a corpse or summon a zombie when digging
the grave up. It also removed the chance that a ghoul might be
summoned when engraving on a headstone, switching to zombie or mummy
instead.
Rather than adopting the pull request, this retains summoning a
ghoul via engraving and adds the possibly of doing so when kicking
a headstone. Having a ghoul prowl around the grave is independent
of whether there is a corpse or zombie inside the grave. To achieve
this, another flag in 'struct rm' is needed; the single bit for
'disturbed' isn't sufficient. The bigger 'flags' field wasn't in
use for graves so commandeer that for new 'emptygrave'. 'disturbed'
still uses the 'horizontal' bit in order to have engraving and/or
kicking summon at most one ghoul.
Closes#944
Unless you kill the monster with one hit, it'll wake up
cranky and make noise - waking up other sleeping monsters.
This was a bit tricky with all the message sequencing; I tested
all the hit/throw/fire/zap combos I could think of, and it took
a while to get things looking right.
When playing as a Samurai, add things like "osaku" to the discoveries
list even though they don't have separate descriptions to be used
when not yet discovered. Non-magic ones are pre-discovered and
players can now use the '\' command to figure out what things like
"tanko" mean without resorting to '/?'.
"wooden harp" has been getting changed to "koto (harp)"; make that be
| koto [wooden harp] (koto)
"magic harp" has been staying as "magic harp (harp)"; add it to the
list of Japanese item names. Since it's magic it isn't pre-discovered.
Once discovered it becomes
| magic koto [magic harp] (koto)
Those two needed special case handling, none of the other items did
aside from forcing them to be discoverable when lacking descriptions.
The discoveries list now has things like
| wakizashi [short sword]
| naginata [glaive] (single-edged polearm)
| gunyoki [food ration]
if--and only if--the hero is a Samurai.
Allow setting a per-level "temperature": hot, cold, or temperate
via special level flags. Currently it only affects some messages
in Gehennom, but it could be expanded to ice melting, water freezing,
or monster generation, for example.
Invalidates saves and bones.
When hallucinating, random object selection for objects was including
the new generic objects. It was already excluding 'strange object'
by using 'rn2(NUM_OBJECTS - 1) + 1' to skip objects[0]; changing that
to be 'rn2(NUM_OBJECTS - MAXOCLASSES) + MAXOCLASSES' will skip the
first 18 objects, 'strange object' plus the 17 generic objects.
(I'm trying to convince myself that there's no off-by-1 or off-by-N
error and think I've succeeded.)
Add 17 fake objects to objects[], one for each object class. All
specific color as gray. They're grouped at the start--actually near
the start since "strange object" is still objects[0]--rather than
being among the objects for each class. init_object() knows to start
at [MAXOCLASSES] instead of [0]; other code that loops through every
object might need adjusting.
For potions, non-stone gems, and non-novel/non-Book_of_the_Dead
spellbooks that don't have obj->dknown set, display the corresponding
generic object rather the object itself. Fixes the longstanding bug
of seeing color for not-yet-seen objects whose primary distinguishing
characteristic is their color. Walking next to a generic object
while able to see its spot will set dknown and redraw as specific.
It's slightly disconcerting to have objects change as you reach them;
I hope it's just a matter of becoming used to that. (If there is any
code still changing the hero's location manually instead of using
u_on_newpos(), it should be changed to use that routine.)
Most of the new tiles are just a big rendering of punctuation
characters. The potion, gem, and spellbook ones could be cloned from
a specific object in their class and then have the color removed. I
started out that way but wasn't happy with the result. I'm not
artisticly inclined; hopefully someone else will do better. Each of
them is preceded by a comment beginning with "#_"; the underscore
isn't required, just being used to make the comments stand out a bit.
Invalidates existing save and bones files.
Instead of just plain old boring mazes, spice up Gehennom by
occasionally adding lava, iron bars, or even mines-style levels
(with lava, of course).
Of the fixed Gehennom levels, only Asmodeus' lair has been changed
to add some random lava pools.
Also some lua fixes and changes:
- Fixed a selection negation bounding box being wrong.
- Fixed a selection negated and ORed returning wrong results.
- des.map now returns a selection of the map grids it touched.
- When using des.map contents-function the commands following the
map are not relative to it.
From the newsgroup: identifying by menu pops up multiple menus in
succession if the player picks fewer invent entries than are being
granted, but the second and subsequent ones could cover up the
message window and hide the feedback from prior ones.
If multiple popup menus are needed when identifying, issue --More--
before each menu after the first. The code seemed to be trying to
do this already, but it should have used wait_synch() rather than
mark_synch(), or perhaps used display_nhwindow(WIN_MESSAGE, TRUE)
instead of either one of those. For curses, both mark_synch() and
wait_synch() were no-ops. Now they do something. X11's behavior
wasn't right either; it seemed to be lagging one message behind
(something I had noticed recently and then forgotten about; I still
don't remember the context then so don't know whether this fixes
that earlier situation).
Allow the preferred sort order for the vanquished monsters list to
be specified in the run-time config file
|OPTIONS=sortvanquished:X
where X is t, d, a, c, n, or z. It can also be set to 'A' or 'C'
but those aren't documented and aren't offered as choices when
setting the value interactively, which can be done via 'm O' or by
using 'm #vanquished'.
Guidebook.mn has been updated but Guidebook.tex is lagging again.
Catch the LaTex Guidebook up with the nroff one for the role, race,
gender, and alignment options.
For both formats, comment out the decription of 'altmeta' on Amiga.
Reported by entrez: if a trap killed hero's steed and dismounting
was fatal for the hero (probably by falling onto the same trap),
impossible "dmonsfree: 1 removed doesn't match 0 pending" warning
occurred during game-over cleanup.
Move the dismount calls in mondead() and mongone() from before their
m_detach() call to the end of m_detach() itself. This led to a
cascade of problems and attempted fixes until finally zeroing in on
place_monster()'s sanity checks and dismount_steed()'s attempts to
work-around one of them.
This reverts the convoluted hack from four years ago in commit
be327d9822 and deals with the issue in
a simpler way. After that, the new dismount_steed() placement at
end of m_detach() works cleanly.
Reported directly to devteam by entrez: a sleeping or unconscious
hero would still meet a monster's gaze attack even though those are
supposed to be eye-to-eye rather than just the monster looking at
you. Don't meet the gaze when Unaware, despite the fact that the
hero isn't blind and vision remains in operation.
Initially being Unaware also blocked Medusa's gaze being reflected
but I changed things so that that still affects her. It contradicts
the eye-to-eye aspect but is more consistent with her looking at a
blind hero who has reflection.
Due to the unorthodox values for role, race, gender, and alignment,
specifying a negated value or set of values in NETHACKOPTIONS wasn't
overriding a specific value set in the run-time config file. The
command line should take priority, then environment, then config file,
lastly builtin defaults.
This could probably use some improvement. It now treats role:!val
as if there was no val role and the entry was role:random rather than
previous role:none (affects prompting).
[I've just realized that role:!foo in environment will be combined
with role:!bar in config file rather than replacing it. I'm not sure
how to deal with that.]
If punished and the attached iron ball was both cursed and wielded,
falling while going down stairs would drop it instead of leaving it
welded to hero's hand. ( Didn't happen for iron ball that wasn't
chained to hero's leg.)
I thought that this was going to be a one or two line fix but ball
and chain stuff is never that simple.
Fixes#949
Using role:!wizard to limit which roles would be candidates for
random selection didn't work as I expected. It required a separate
option setting for role to exclude. This implements how I thought
it worked:
|OPTIONS=role:!ranger !samurai !wizard
will exclude multiple roles with a space-separated list in a single
option setting. It also adds support for
|OPTIONS=!role:ranger samurai wizard
to do the same thing. (OPTIONS=!role:!ranger isn't allowed.)
I thought 'OPTIONS=role:barbarian caveman knight' could be used to
limit random selection to those choices, but that doesn't work and
I haven't attempted to implement it.
This also renames the 'align' option to 'alignment'. That made the
truncation to 'align' become ambiguous, so it got added back as an
alias for the full name.
Guidebook.tex is lagging; I'm burned out.
This ended up combining several unrelated changes.
Add missing 'fixes' entry for curses-specific item in New Features.
When answering "Shall I pick ... for you? [ynaq]", accept \m as well
as \n and space for choosing the default of 'y', same as normal
ynaq() would. Also add '*' to '@' as not-shown potential answers;
they force 'random'.
When tty tore down any of the menus, things were reasonable if they
were short enough for corner windows, but tall ones that switch to
full screen weren't fully erased. The parts of those outside of the
map window stayed behind when the tall menu was closed and cleared.
Mainly affects picking the "~ - reset filtering" choice but also
affected the role menu on 24 line tty screens. (Didn't affect curses
because it tracks and refreshes its base window when some overlaying
window goes away.)
The role menu used 25 lines so required a second page for the case
of a 24 line screen on tty. Dealing with that is a bit ugly but it
wasn't an issue when this form of role selection was tty-only (because
the info about choices made so far was displayed on the base window
rather than in an extra menu line back then) so I added a hack for it.
If the role menu will take one more line than the screen height, the
separator between 'random' (below 'Wizard') and 'pick race first' gets
squeezed out. If the menu needs two more lines (doesn't happen now,
except by changing screen size to 23 lines for testing), a second line
gets squeezed out. (Not attempted for curses because it wouldn't
help. 'windowborders' and one or two extra separators it adds make
menus taller. I doubt if many players use curses on 24-line screens
but if they do, they'll be using something new rather than going from
something that used to fit on one page with 3.6.x.)