Track sokoban cheating (taking actions that incur a luck penalty).
The pull request only reported the number of times (possibly zero)
that the player broke nethack's sokoban rules when reporting the
"you obtained the Sokoban prize" achievement, which is when the
count is most meaningful, but this implements it as a full-fledged
conduct instead. This way the #conduct command can be used after
"creative nethacking" to check immediately whether an action has
violated the Sokoban rules so a player willing to put in a bit of
effort can eventually learn which actions have a negative impact.
The new conduct is only shown during games where the character has
entered the Sokoban branch, but once that has happened it gets shown
no matter the location at the time of #conduct or end of game.
Most of this wasn't in the pull request: expanding the Guidebook to
give more information about sokoban and its conduct.
Bump EDITLEVEL to invalidate to-be-3.7 save files because u.uconduct
has been extended.
Fixes#355
The new sound stuff needed some fixing up.
Guidebook.mn - list start no longer specified the longest key;
in the Postscript/PDF output, the new longer one was partially
overwritten by the text which followed and in the text output,
things didn't line up cleanly anymore.
Guidebook.tex - former last list entry which became next-to-last
was missing a necessary line break. [not tested]
both - sentence punctuation: change period to semi-colon in former
last entry that's now next-to-last; vice versa in new last entry.
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--".
Guidebook.mn had a mixture of literal "--" and \(em to insert an
M-sized dash. The literal was poor usage but the 'em' directives
were using " \(em " for source readability. Unfortunately those
spaces ended up being included in the output where a long dash
shouldn't be surrounded by such. This changes both to be
|start\(emmiddle\(emend
for proper usage without unwanted spaces. The 'roff source becomes
harder to read so such phrases have been moved onto separate lines
instead of just staying within the flow of words. (I tried
|start
|\(em
|middle
|\(em
|end
but the newlines became unwanted spaces in the output.)
Guidebook.tex incorrectly had a numeric range dash ("--") instead
of long dash punctuation ("---") in the places where the 'roff
version had literal "--". I also moved the quite readable
|start---middle---end
phrases and a handful of whole sentences to separate lines to match
the Guidebook.mn source more closely.
One trivial text change is "you will forget" to "you will have
forgotten" in the bit about what happens to remembered objects
when the "remembered, unseen monster" glyph is taken off the map
since forgetting happens when that glyph is put on.
"if will" should be "it will". The pull request only fixes this
for Guidebook.tex but it is also present in Guidebook.mn. The typo
made it from one to the other via copy+paste.
Fixes#358
Record reaching experience level 3, 6, 10, 14, 18, 22, 26, and 30,
the levels where the character gets a new rank title, and report
those as achievements at end of game. These achievements persist
even if enough levels to lose a rank are lost, and if lost ranks
are regained the original achievement is the one that gets tracked
and disclosed.
Generally speaking there's no reason to wait or search next to
a hostile monster, so let's just prevent those actions. You can
still do those commands by prefixing them with the 'm' prefix.
Introduce eight achievements that can be attained by more players.
Entered Gnomish Mines - self explanatory
Entered Mine Town - the town portion, not just the level
Entered a shop - any tended shop on any level
Entered a temple - likewise for temple
Consulted the Oracle - bought at least one major or minor oracle
Read a Discworld Novel - read at least one passage
Entered Sokoban - like mines
Entered the Big Room - not always possible since not always present
The novel and bigroom ones aren't always achieveable since novels are
only guaranteed if a book or scroll shop gets created and bigroom is
only guaranteed in wizard mode. No one ever claimed that every
possible achievement can be attained in a single game. (If one for
entering the Fort Ludios level--or perhaps entering the Fort itself--
eventually gets add, that won't be possible in every game either.)
The mine town one probably needs some tweaking. Two of the town's
seven variants have no town boundary (despite a rectangular area of
pre-defined map) and at present simply arriving on either of those
levels is enough to be credited with the entered-town achievement.
Bump EDITLEVEL because u.uachieved[] has increased in size. This
time it has been expanded to the maximum that xlogfile's bitmask of
achievements can handle, enough for up to 9 more achievements without
another EDITLEVEL increment.
Redo the Achievements section in Guidebook.mn to be more compact.
It's also become more complicated because it formats Guidebook.txt
differently from Guidebook.ps/.pdf.
Finally add the Achievements section to Guidebook.tex to catch up.
Not as complicated but also not tested.
Condense the clunky one entry per line table of suits of armor and
their AC values in Guidebook.mn. Guidebook.tex uses a two-column table
that I've left alone.
Mention all the other types of armor instead of leaving out gloves and
shirts. For armor commands, mention that P and R work.
Rings: describe their interaction with gloves. For ring commands,
include a pointer to amulets.
Amulets: for amulet commands, mention that A, W, and T work.
Tools: mention that some can be worn and include a pointer to amulets
for the relevant commands. Also, that some can be wielded as weapons.
Boulders and statues: boulders can be pushed and smashed, statues can
be smashed.
Gold: not subject to blessing or cursing. goldX option affects BUCX
filtering.
This adds a pair of new glyphs: GLYPH_UNEXPLORED and GLYPH_NOTHING
GLYPH_UNEXPLORED is meant to be the glyph for areas of the map that
haven't been explored yet.
GLYPH_NOTHING is a glyph that represents that which cannot be seen,
for instance the dark part of a room when the dark_room option is
not set. Since the symbol for stone can now be overridden to
a players choice, it no longer made sense using S_stone for the
dark areas of the room with dark_room off. This allows the same
intended result even if S_stone symbol is mapped to something visible.
GLYPH_UNEXPLORED is what areas of the map get initialized to now
instead of STONE.
This adds a pair of new symbols: S_unexplored and S_nothing.
S_nothing is meant to be left as an unseen character (space) in
order to achieve the intended effect on the display.
S_unexplored is the symbol that is mapped to GLYPH_UNEXPLORED, and
is a distinct symbol from S_stone, even if they are set to the same
character. They don't have to be set to the same character.
Hopefully there are minimal bugs, but it is a deviation from a
fairly long-standing approach so there could be some unintended
glitches that will need repair.
"The 'm' prefix before a movement command can be used" is awkwardly
worded.
"Various ... variations" is redundant all by itself but doubly so
when "various" is used again two sentences later.
mention_decor is missing a sentence between "Normally only shown
when obscured" and then an exception when it is enabled.
Somewhat similar to 'mention_walls', 'mention_decor' is a way to
request additional feedback when moving around the map. It reports
furniture or unusual terrain when you step on that. Normally stepping
on furniture only mentions it when it is covered by object(s). And
moving onto (rather than into) water or lava or ice doesn't bother
saying anything at all. With the new option set there will be a
message. It uses Norep so won't repeat when moving from one water
spot to another or one lava spot to another or one ice spot to another
unless there has been at least one intervening message. There is also
a one-shot message when moving from water or lava or ice onto ordinary
terrain (not Norep, just once since there's no land to land message).
Having the verbose flag Off doesn't inhibit these new messages but it
does shorten them: "A fountain." instead of "There is a fountain here."
The Guidebook gets a new subsection "Movement feedback" of the "Rooms
and corridors" section and it covers more than just 'mention_decor'.
As usual, Guidebook.tex is untested.
'mention_decor' persists across save/restore, so 'struct flags' has
changed and EDITLEVEL is being bumped, hence save files are invalided.
Move 'implicit_uncursed' and 'mention_walls' from iflags to flags to
make their current setting persist across save/restore. Invalidates
existing save files.
Report complained that having autoopen not work when fumbling was
inconvenient and mentioned that the "ouch! you bump into a door"
result didn't take any time. This updates the documentation to
state that autoopen won't work while fumbling (so the inconvenient
behavior persists) but changes movement so that bumping into a door
now takes time. (Despite "ouch!", it doesn't inflict any damage.)
Also, document the recently added autounlock option.
Bite the bullet and add a special purpose boolean option to control
game behavior for random clairvoyance. When objects or monsters are
discovered, it normally issues "you sense your surroundings" and
performs a getpos() operation which allows the player to browse the
map by moving the cursor around and getting 'autodescribe' feedback.
But there have been complaints that once the hero has the Amulet
(which triggers random clairvoyance even though hero isn't flagged
as having that attribute) the message and pause-to-browse become too
intrusive.
This was initially combined with the 'timed clairvoyance' fix because
they both bump EDITLEVEL to invalidate existing save files, but their
details don't interact so I separated them.