This themed room boasts two shops, a weapons and an armor store,
that can generate in a number of different configurations.
Makes the random corridor joining routine obey unjoined areas.
Fixes a bug in shopkeeper naming routine, where multiple shops
of the same type on the same level might reuse the shopkeeper name.
This is modified and consolidated commit from xNetHack by
copperwater <aosdict@gmail.com>.
'? i' shows three keyless commands in the General section. This
makes M-X the key for #exploremode. #herecmdmenu and #therecmdmenu
are still keyless but now autocomplete.
A ridiculous amount of documentation for a three line code change.
Having recently noticed that using <del> aka <delete> aka <rubout>
could work as a command, assign it to #terrain. #terrain was the
only command in the "game" subset of commands as shown by '? i'
that didn't have any key assignment.
Since <delete> might be swapped with <backspace> on some terminals
and is a keypad key on the typical PC keyboard, it might not work
reliably depending on nethack's number_pad mode or the hardware
Num-Lock setting. Players in either of those situations haven't
lost anything; they can still use extended command #terrain.
Noticed while working on Qt's extended command handling, there
are an awful lot of "seeXYZ" commands. Keep the inventory display
ones (named versions of ')' to show wielded weapon(s), '[' for
worn armor, '"' for worn amulet, &c) and rename the others:
| #seenv -> #wizseenv debugging command
| #seespells -> #showspells '+' command
| #seetrap -> #showtrap '^' command
Also, expand the descriptions of #shell and #suspend a bit in
the Guidebook. LaTeX version is untested.
"Name of your starting pet when it is a kitten" could be
construed as meaning that it will no longer apply once the
kitten grows into a housecat. Use "if" instead of "when".
The 'other settings' were in alphabetical order except for
"status condition fields" which presumably started out as
"condition fields". Move it into proper place for current
description.
Add a few missing options to dat/opthelp (without worrying about
"if FOO was set at compile time"). No doubt there are lots of
others still missing.
Reword a few options in dat/opthelp and also in the dynamic help
derived from optlist.h, particuarly catname, dogname, horsename
whose descriptions have always been confusing or maybe confused.
The revamped options handling was't doing dynamic help properly.
After listing the booleans, it listed them again amongest the
compound options. Since their description field is Null, that
could be a big problem. sprintf(buf,"%s",NULL) on OSX produces
"(null)" but most sprintf()'s would probably crash instead.
The 'other' options (autopickup exceptions, menucolors, &c) were
not listed at all. (I don't remember whether that was also the
case before the revamp.) Now they're listed but not explained.
The 'msg_window' description was unhelpful; this replaces it.
A couple of others were longer than necessary so they've been
shortened. The rest of optlist.h is reformatting wide lines.
Recently added 'safe_wait' option was included in the Guidebook
but not in dat/opthelp; add it.
Since ^V is dead key for me with Qt on OSX, I use #wizlevelport
instead. It's annoying to have to type all the way up to the
'p' for it to become distinct. Rename the biggest conflict,
\#wizlevelflip to #wizfliplevel. I still have to type as far
as the first 'e' for #wizlevelport but 6 characters are easier
to type than 10.
It wasn't in the Guidebook so I've left things that way. I am
adding it to 'wizhelp' though.
Let ki-rin cure themselves (of being stunned, confused, or blinded)
with their own horn, and make them be poison resistant. They
aren't unicorns but their horn is very much like a unicorn horn.
They're flagged no-corpse so this hasn't changed them to leave
behind a horn upon death.
They were flagged as animals who neighed but they are also spell
casters. I took the animal flag off (they're still no-hands so
shouldn't be able to use items; also, unicorns aren't flagged as
animals either) and changed sound to 'ms_spell'.
This probably won't happen in practice, but it is a good safeguard
if this ever does happen (it happened for me in debugging when I wished
to have no "regular" rooms and only generate themed rooms).
This sets the minimum level depth of "Spider nest" to 10, somewhat above
the difficulty of an individual giant spider, because a whole room full
of them is a tougher challenge. Note that this isn't the only possible
fix to this problem; another solution would be to alter the special case
in mktrap that hardcodes a giant spider to generate with each web to
produce cave spiders if giant spiders would be too tough. Even then, a
lower difficulty cutoff is probably still warranted for this room, since
a large number of cave spiders might be too tough for level 1 or 2.
This also sets the minimum level depth of "Boulder room" to 4, based on
the fact that individual rolling boulder traps normally can't appear
until level 2, and having a bunch of them in one place which may be
required to reach the downstairs could be problematic.
This doesn't do anything to address the "Mausoleum" room problem, in
which a master or arch-lich can generate and immediately warp out and
attack the player. Even with a high difficulty threshold, it won't fix
the problem of these liches generating out of their normal difficulty
and Gehennom constraints.
Other potential candidates for difficulty thresholds:
- "Trap room": This room might be perilous on the first few levels,
especially if the level generates with it blocking the way to the
downstairs.
- "Massacre": Doesn't have any particular hazards, but might be
interesting if it only generated at deeper levels.
The system of themed rooms currently makes it so that any themed room
can potentially generate anywhere a themed room can be placed. This is
problematic in the long run, since it makes it difficult to design new
rooms that are an appropriate amount of challenge at all levels of the
dungeon. (A few themed rooms already have this problem: a hero starting
out on level 1 probably won't live very long when the neighboring room
is full of giant spiders, or an arch-lich has generated in a mausoleum
nearby).
This commit adds optional "mindiff" and "maxdiff" properties for
themerooms defined as tables and exposes level_difficulty() to Lua. A
themeroom whose mindiff exceeds the current level difficulty, or whose
maxdiff is lower than the current level difficulty, is prevented from
being selected.
Because the set of rooms eligible to generate on a given level is no
longer fixed, the total frequency of all the rooms can't be computed
once per game when the file is first parsed, as it was before. In place
of this, the themerooms_generate() function now uses a reservoir
sampling algorithm to choose a room from among the eligible rooms,
weighted by frequency.
This is an omission in the filled/prefilled unification. The default for
filled on regions now being 0 meant that regions that had previously had
no need for any fill declaration at all (regions' prefilled defaulted to
0 before this, the effect being to fill them) now failed to get filled.
The rule of thumb is that all des.regions with a type for which filled
is meaningful (e.g. special rooms) should declare the fill status. I
added it to a bunch of temples even though this doesn't really seem to
affect anything there (the priest and altar come with the altar
definition). I assigned temples filled=1 and filled=2 loosely based on
if there is ever being some other generation that would put other
furniture or items in a temple, but the distinction should not affect
anything right now.
Cases fixed where non-temple regions weren't getting filled:
- Barracks, a graveyard, and shops in Tou-goal
- The beehive in the Wizard's Tower
There is code in fixup_special for stocking Medusa's lair with statues
of players from the leaderboard. It makes two assumptions: that there
will always be at least one room defined on Medusa's level, and that
the statues should be placed in the first room defined. In the process
of removing prefilled, some of these rooms suddenly became non-rooms,
and this caused problems. This commit ensures that the regions for
turning into rooms to hold the statues are present and come first.
In the process of writing this commit, I discovered a bug: the statue
stocking code for medusa in fixup_special naively chooses the spot at
which to place its final statue by selecting independent x and y
coordinates with somex and somey. This is responsible for a statue
occasionally being embedded in a wall or in iron bars on medusa-2 and
medusa-4: the rooms defined to receive statues are irregular, and some
of the possible coordinates happen to be walls, bars, and water.
The proper fix here is to add lua functionality so that the level
designer can specify that they want a leaderboard corpse or statue, and
remove the medusa special case from fixup_special, but that's rather
out of scope for what I'm doing here.
The existing system was a confusing mess of competing names (filled,
needfill, prefilled, etc) that had varying semantics, with prefilled
being the worst offender as it meant at least three different things in
various contexts. This commit unifies everything in the code under
"needfill", and everything in Lua under "filled", which defaults to 0
everywhere.
This also removes the second argument to fill_special_room; that
function now just checks the needfill of the room it's passed. As
before, a filled == 2 value is used for a special room to indicate that
the room should set the appropriate level flag, but shouldn't actually
be stocked with anything (for instance, King Arthur's throne room); the
difference is that this now comes directly from the lua script instead
of being manipulated within sp_lev.c.
The prefilled argument had one use case that is occasionally used in the
level files: if the level designer had specified an ordinary region with
prefilled = 1, it would become a room to control monster arrivals on a
level -- monsters that arrive within the bounds of a room are supposed
to stay there.
However, not all of the places where the comments indicated this was
being used were using it correctly; I tested this by letting a few
monsters fall through the knox portal (they're supposed to be
constrained to the entry room) and waiting a hundred turns, then going
through the portal; they were not constrained to the room and had
"wandered" through its walls.
Instead of trying to maintain this special case, I have added an
optional "arrival_room" boolean argument to des.region, which forces it
to create a room for the purposes of constraining monster arrival.
I have gone through and replaced occurrences of prefilled in lua files
with the appropriate filled option (or arrival, as needed). In some
cases, that resulted in questionable regions such as a filled ordinary
area in a non-themeroom (I just dropped the filled=1), or an area which
didn't do anything, not even lighting (which I deleted).
"When a room is created and passed down to a contents function in
Lua, the width and height properties of that room are computed by
subtracting lx from hx and ly from hy, which means e.g. a room
which is 8 floor squares wide and 5 tall appears to the contents
function as having a width of 7 and height of 4. This patch fixes
that off-by-one."
I don't understand the details here: should a room's dimensions
include its boundary walls or just the inner amount? This change
didn't seem to cause any problems so I've put it in.
Closes#345
Qt's text window for 'history' was unexpectedly wide and it turned
out that that was to fit in one excessively wide line. tty has
been formatting it by splitting it into one normal sized line
followed by an excessively short line.
Update the help menu entry for wizard mode commands to reflect the
recent change to #wizrumorcheck. This messes up the formatting a
bit (by introducing a continuation line) but the no longer precise
command name warrants it.
Give an implied explanation for the seemingly odd copyright info in
the source files and the run-time startup banner.
The extra Hack version number, the release dates, and the newsgroup
creation are from
https://homepages.cwi.nl/~aeb/games/hack/hack.html
which is the "Brouwer's /Hack/ page at CWI" external link near the
end of Andries Brouwer's Wikipedia page.
Fix two of the unresolved issues from the previous reconciliation
between dat/history and doc/Guidebook.*: synchronize the list of
devteam members for 3.0 and also the information about Izchak's
death.
Add a description of the Y2K situation. It's been moved to its
own paragraph and rephrased from the earlier draft(s), both the
introduction and a switch from present to past tense. Parentheses
around a whole paragraph look a bit odd but including the paragraph
without them also looks unusual because the context is so different
from adjacent paragraphs. Maybe use "Note: Blah blah..." instead
of "(Blah blah...)"?
Redo the paragraph about 3.0 version numbering since the situation
was more complex than I realized.
A check into github issue 364 confirmed that
ba6edbe5dc
had incorrectly updated the bwrite sizeof entry for sysflags.
The SYSFLAGS and MFLOPPY code is all in the outdated part of the tree, so just
remove it rather than re-correct it.
Closes#364Closes#207
fixes#361
Also, experminental introduction of vt_sounddata to enable tty to pass
a sound file index to the terminal side of things where perhaps someone
can add code to something like hterm to take the information relayed by
NetHack to trigger user_sounds locally even if playing on a server.
Compile time option TTY_SOUND_ESCCODES required to build that support in.
It should be independent of TTY_TILE_ESCCODES.
Eliminate most of the minor differences between dat/history and the
end section of doc/Guidebook.txt which didn't seem to be intentional.
Several commas, a couple of past/present tense discrepancies, and
various clauses or whole sentences which were in one but not the
other. There are still differences which this doesn't address.
Also a couple of actual changes. Make the Guidebook refer to itself
as "this document" rather than "this paper". Change "dozens of
people's work" to "scores of people's work". Add a new sentence
describing the version numbering scheme used by 3.0, which wasn't
3.0.x yet.
Warwick did the heavy lifting of the first tiles implementation. But
I was the one who suggested changing his terminology to "tiles" even
though that doesn't match the term's traditional usage in computer
graphics. Since then, our [mis-]usage has spread beyond nethack and
its variants. [This isn't just bragging; I recall several years ago
that someone thought our implementation of tiles for MS-DOS was the
original implementation. Their search of the newsgroup archives didn't
find Warwick's original announcement--Atari binaries and/or a source
patch in between releases--because the term "tiles" wasn't in use yet.]
I'm not sure whether Dean's font preceded Warwick's icons, but the
concept did. If the description of their implemenations is backwards
than that bit should be reworded.
Also, add a sentence explaining why NetHack++ "was quickly renamed
NetHack--".
Reported directly to devteam; transcription typo: had "Vines", should
be "Vimes".
I double checked that long passage and found two other mistakes:
"proffered" was misspelled with 2nd 'r' doubled,
| 'Quoted statement,' someone said. 'Another statement.'
lacked the opening quote on the second sentence.
My source uses double quotes (normal American usage). I'm not sure
why the passages which refer to it--the page number annotations
specify that same source--were transcribed with single quotes (normal
British usage), but I've left those as is.
The sentence with "Vines" was also separated from the previous one by
a single space when nearly everything in dat/tribute uses double space.
A quick regexp search found half a dozen or so other instances of that.
This fixes those but the searching wasn't rigorous and it's sometimes
ambiguous whether an elipsis or long dash constitutes the end of a
sentence before another starts or is just in the middle of a long one.
Displacer beast and genetic engineer lacked data.base entries so
I've made a couple up from thin air. I tried to look up "genetic
engineering" in _the_Concise_Dictionary_of_Biology_ (after seeing
that the quantum mechanic quote comes from _Concise_Dictionary_of_
_Physics_) but could only view the first sentence so don't know
whether it had anything more useful. I also skipped the AD&D
Monster Manual for displacer beast except for remembering the
puma-like bit from previously checking it. So regardless of any
old copyright issues in data.base, there shouldn't be any new ones.
Allows creating shaped or themed rooms for the Dungeons of Doom
via lua script.
Invalidates bones and saves.
Makefiles updated for unix/linux by adding themerms.lua, but other
OSes need to have that added.
Instead of trying to figure out in core whether to change a minetown
food shop to health food shop for monks, just figure it out in the
minetown level creation script.
Intended to simplify many of the math.random calls currently in use, and
make them more semantic and thus more readable.
The dice function d() takes either a two-argument form which is the same
as in the C source (number of dice, faces per die) or a one-argument
form that rolls a single die.
The percent(N) function returns true N% of the time.
Instead of having the demon lair levels unconditionally no-teleport,
grant demon lords and princes the ability to suppress teleportation
in Gehennom on the level they are on.