Qt menus have [ok][cancel][all][none][other stuff] buttons across
the top but it was disabling [cancel] for inventory viewing and
other pick-none menus. Enable that so that [cancel] is a viable
alternative to typing ESC or clicking on [ok] for dismissing the
menu without picking anything.
Qt's implementation of '#' puts up a rectangular grid of buttons
containing command names from the alphabetized extcmdlist[]:
| # ? adjust annotate
| apply attributes autopickup call
| cast ...
When 3.6 put all commands into that list, the hardcoded 4 columns
resulted in so many rows that the grid wouldn't fit on the screen
(at least not on my smallish laptop screen). There's no scrollbar
so the commands beyond "takeoff" were inaccessible off the bottom.
Warning messages from within Qt were issued to stderr complaining
about trying to render something off the screen (once each time the
'#' command grid was generated).
It was also including wizard mode commands when not in wizard mode.
Suppress those when they're not applicable, and change the grid to
use 6 columns then and 8 for wizard mode. The appropriate amount
ought to be calculated on the fly but these values work ok with the
current command list. (On my screen; if something smaller is used,
the original problem could come back, just not as severe as before.)
Having an alphabetized list go across rows instead of down columns
feels counter-intuitive so transpose the grid.
| # autopickup ...
| ? call
| adjust cast
| annotate ...
| apply
[Having another button next to <cancel> that lets the user switch
back and forth between the two orientations could be worthwhile.
A full-fledged wc/wc2 option for that doesn't seem warranted.]
The commands can be selected by typing their names as an alternative
to mouse click. The input widget supports <backspace> but lacked
handling for <delete> so add that.
When typing a command by its name, a new grid showing only matching
candidates gets displayed so that you can switch back to mouse input.
It looks pretty bad but does work as intended. I didn't touch that;
however, it looks different now due to the columns-vs-rows change.
The menu after picking "?" looks worse. It assumes a fixed width
font and tries to align things in two columns with spaces, but the
result when using a variable width font is ugly. This makes no
attempt to address that.
Prevent corpses left by cancelled trolls from reviving. Their
revival is an innate ability but is clearly a magical one, so make
that be subject to cancellation magic.
Change existing corpses that are scheduled to revive to rot instead
if they get cancelled as objects. Rider corpses are excluded.
Uncancel an ice troll whose corpse is put into an ice box.
Commit e9f53ab7f6 at the end of May
to fix corpses taken out of ice boxes by monsters changed removing
corpses from ice boxes by anybody to always give them rot-away
timers, even for trolls. Make an exception for ice troll corpses:
give those revive timers instead.
A reddit thread mentioned that throwing rocks at unicorns behaved
the same as throwing gems at them: not treated as an attack and if
teleporting away is allowed, they will. Change to treat shooting
gems and glass at unicorns with a sling as an attack rather than as
just giving the gem or piece of glass to them, and treat throwing
or shooting rocks and gray stones as an attack too.
If picked up by blind hero while not yet seen, gems and glass
format as "gem" and rocks and gray stones format as "stone" so the
player can always tell the difference. Forgetting to unwield a
sling before interacting with a unicorn is on the player's head.
Fix at least one typo. Change a few quoted and/or italicized words
to fixed width (tty) font. In the "Curses and Blessings" subsection,
mention dropping objects onto altars and the terms "BUC" and "BUCX".
tiles2x11 didn't complain about the tile definitions of the renamed
objects. It seems to me that all processors of win/share/*.txt
ought to be sharing the same code instead of apparently rolling
their own. (Maybe the issue was issuing diagnostic messages rather
than noticing the name mismatches? I haven't looked.)
I tried wishing for "splashes of venom" but was told that no such
thing exists even though "splashs of venom" and "2 splash of venom"
both work to produce "2 splashes of venom". After the spurious
failure, retrying with EDIT_GETLIN enabled showed that "splashes"
had been singularized to "splashe" so fix that.
"2 splashes of venom" IDed to "2 uncursed blinding venoms" because
the base name omits "splash of" prefix. And due to that, explicitly
wishing for "splash of {acid,blinding} venom" didn't work either.
Change the names to include the prefix, and add a hack to makedefs
to keep generating the old macro names without the prefix. (Wishing
for "{acid,blinding} venom" still works due to post-3.6.6 changes
to " of " matching.)
A recent newsgroup or reddit complaint stated that only 75% of a
monks attacks used martial arts. It turned out to be true; the
'valid_weapon_attack' intended to control whether skill gets
exercised was being overloaded for skill use. So the monk's 1..4
base damage used skill for 2..4 but not for 1. That was never
intended (nor for other roles and other skills; a damage value of
1 is meant to miss out on a chance to train the skill for future
enhancement but should still get a skill bonus or penalty for the
current attack).
If hero is a monk who is wearing a suit, have ^X mention the to-hit
penalty for that in the status section even though it isn't a normal
status line item. Combat feedback makes it annoyingly obvious, but
player might forget if MSGTYPE=hide is used to suppress the "Your
armor is rather cumbersome..." message.
For Qt, if unable to load either nhfiles.bmp or x11tiles, quit after
giving the can't-load-tiles feedback instead of continuing on and
eventually triggering a segfault.
Noticed when the comment about "this can go away when compatibility
with 3.6.x is no longer needed" was modified recently. Make it and
the code it applied to go away.
The recently added sanity check for monster maximum HP was giving
false complaints when Nd8 monster had N mhpmax. Most noticeable
for level 1 monsters (level 0 monsters use 1d4 instead of 0d8 and
weren't affected) but possible for higher level ones if they were
unlucky--from their own perspective--with all their d8 rolls.
Give level N monsters a minimum of N+1 HP, so minimum of 2 for
level 1 monsters, making 1/8 of those stronger. Same minimum for
level 0 monsters, 25% of which will become stronger now. (The pull
request's patch gave every Nd8 monster 1 extra HP; this only does
so for Nd8 and 1d4 ones which have rolled lowest possible amount.)
Also relax the sanity check so that existing to-be-3.7 save files
don't continue to trigger sanity complaints for existing monsters
that have the old minimum.
Fixes 365
When a mind flayer scores a hit against a headless target (or worm's
tail), there's a message that says that the attack hits and that the
target is unharmed. Since an ordinary mind flayer has 3 such attacks
per turn and a master mind flayer has 5, it can become excessively
verbose.
This doesn't eliminate the attacks until a hit fails to do harm, so
ordinary misses still get repeated if they happen first. Once a
successful hit doesn't do anything, any remaining AT_TENT+AD_DRIN
attacks are silently skipped. That way feedback isn't as verbose
and mind flayers don't seem to be quite so stupid about using their
tentacles when those won't work. Unfortunately they need to relearn
the lesson every turn they attack.
hitting a hidden monster didn't reveal that monster. It stayed
hidden despite the feedback describing it as if it could be seen.
The pull request's two line fix handled a monster's blast hitting
another monster but left two related issues as-is: monster's blast
hitting hidden poly'd hero left hero unrevealed and poly'd hero's
blast left hidden monster unrevealed. Same code, different bug:
poly'd hero's blast affected mindless monsters.
This unhides an affected target before the message about it being
hit rather than after. That would look better if preceded by a
message describing the object (mimic or hides-under) or furniture
(mimic) or empty spot (ceiling hider) as being or concealing a
monster but I didn't put in sufficient effort to accomplish that.
Fixes#367Fixes#362
If the Wizard fled up the stairs on level 1 and escaped the dungeon
(which can only happen if he isn't carrying the Amulet or any of
the invocation items), the number_of_wizards counter wasn't being
decremented. If that was the only Wizard, he couldn't be brought
back into play because he wasn't on the migrating monsters list, and
he wouldn't appear on the Plane of Earth when the hero eventually
went there. If that was one of two, the remaining one couldn't use
Double Trouble anymore. (I'm not sure about Earth handling in that
situation; should be moot now.)
Wizard mode blessed genocide of "*" when the Wizard is on current
level caused the same problem.
Fix by keeping the number_of_wizards counter up to date if mongone()
is called for the Wizard, handling both cases. Also, don't let the
Wizard escape the dungeon unless he's one of two at the time, making
the first case no longer possible.
If wizard mode blessed genocide of "*" is used on the level where
the quest nemesis is present, the killed-the-nemesis feedback will
now be given. I'm not completely convinced that this was the right
thing to do, but it only applies to wizard mode so may not matter.
Fixes#372
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.
A recent fixes entry reported things incorrectly. The invocation
failure message inappropriately referring to the Bell and Candelabrum
as artifacts was given when reading the Book after both of those have
been used to set things up and either or both of them are cursed, not
when they weren't used before the Book.
Fixes#369.
Fixes#370.
The default entries inserted by makedefs -s (starting in 3.6.6,
to guard against having an empty data file which led to divide by
zero crash when nethack picked a random entry) lacked a terminating
newline so the first entry from the file (for the usual case when
that data file wasn't empty) got implicitly concatenated to it.
If the first entry got chosen during play, the initial portion
corresponding to the default entry was decrypted properly but the
concatenated portion corresponding to file's first line didn't.
So gibberish was appended to default engraving or epitaph or bogus
monster; also, the input file's first line would never appear.
The newline fix in makedefs is different from pull request #370
but accomplishes the same thing.
The bulk of the patch is an enhancement to #wizrumorcheck to show
first (default inserted by makedefs), second (first in input file)
and last engravings, epitaphs, and bogusmons in addition to rumors.
The command name has become a little misleading but the limited
functionality doesn't call for separate commands.
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
Rephrase a few things and mention the extra boulder(s) since
that feature is a fundamental difference with actual Sokoban.
Fix typo/thinko: "Others rules can...".
Change one instance of /Sokoban/ in italics to ordinary text.
Other conduct descriptions don't use such so it looked odd.
Noticed when checking the sokoban conduct's counter. Breaking
a line of boulders in one zap reported seeing the first but only
hearing the others, despite the first one being gone by the time
the second one was hit and so on down the line for the rest.
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.
Add the "if these walls could talk" gag. Use an array of message
strings rather than switch/cases of pline calls, and add a couple
more messages.
Also, only give wall feedback if the map indicates a wall (so not
while blind unless the wall is already known) and prevent chat from
pinpointing secret doors (via lack of wall feedback when they're
shown as walls).
After writing the log message for the bell change, I decided to
test the Book and found some issues:
1) reading it while blind discovered the book's type but wasn't
marking the book object as if it had become seen (dknown);
2) reading it while blind gave sighted feedback if it was cursed;
3) reading (blind or not) when either of the other two invocation
tools are cursed referred to those as "artifacts" even though
they aren't artifacts; the discoveries list describes them as
"unique items" but that makes for a clumsy message--use "relics"
instead.
Allow a hero in silver-hating form to ring the Bell of Opening when
on the vibrating square so be able to perform the invocation ritual.
But only at that location and only if the stairs aren't there yet.
This is about on par with being able to read the Book of the Dead
while blind although that isn't limited to a specific location.
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.
Adopt the contribution to use "you can't read the words" when
trying to read a novel when blind rather than defaulting to
spellbooks' "you can't read the mystic runes." An unseen novel
is already described as "a book" instead of "a spellbook" so the
alternate feedback doesn't give away any information.
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--".