The construct "\\'#rrggbb'" seemed strange and while fixing that
I made several other changes. There's an escape sequence for
apostrophe but "#rrggbb" doesn't actually need any quoting in the
first place (except for "\#" in the TeX version).
There was unwanted indentation after the OPTIONS=windowcolors line
in the 'roff version. For the TeX version, avoid 'verbatim' since
it contains both literal text and placeholders that are now being
distinguished with italics.
Also, "trueblack" is Windows-specific rather than an ordinary named
color.
The fixes entry about object info carrying over when normal play
was resumed could have been mistrued as stating that the objects
themselves were carrying over.
Reported by AndrioCelos, a handful of objects in the tutorial can
be discovered via use, and such discoveries were carrying over to
normal play when the tutorial ended.
This causes the hero to forget such discoveries. The player will
still be able to remember them. The proper fix would be to discard
the initialized but not-yet-started game when entering the tutorial
and then start a whole new one when exiting so that saving and
restoring game state would become unnecessary. This doesn't do that.
This also causes monster birth and death statistics to be reset when
exiting the tutorial. Affects the #vanquished command and potentially
extinctionist play.
Closes#1134
The constructed value for 'windowcolors' didn't specify the option
value correctly. If windowcolors was not at its default value, the
new RC file created by #saveoptions would contain a value for it
that didn't work when read back the next time nethack was run.
This works, but a non-default windowcolors value shown by the 'm O'
menu won't fit on an 80 column display. curses wraps it ok, but in
a manner that doesn't look good for that menu.
There's a bunch of reformatting here. The actual changes are at the
end of the diff.
When bulk reformatting took place prior to 3.6.0, the
\#if 0 "Palandir of Westernesse" #endif
block was left as-is, making it different from all the ones that
changed. Reformat it manually, a shorten a couple of wide lines.
When processing
|OPTIONS=windowcolors:window-type foreground-color/background-color
parse the color values and use their names rather than the player's
raw options text. Affects the feedback from 'm O' and is essential
for the next feature.
Accept either "gray" or "grey" where colortable[] always uses "gray"
(half a dozen or so instances), and accept dash or underscore where
colortable[] always uses dash (many instances).
Also, complain about 'window-type' if it isn't recognized as one of
menu, message, status, or text. [For curses, the complaint gets
written to stdout and is then immediately erased as it goes into full
screen mode. That's a general problem, not specific to this option.]
Recently, a config file complaint when windowcolors was used multiple
times was fixed.
This adds a complaint when windowcolors was specified for the
same type of window multiple times thus superseding a previous
setting.
Make sure the windowcolors option can be specified more than
once without a config file warning.
Make the struct holding the details a little more extendable.
Curses handles menu and text windows specially; their id numbers
keep going up, so we need to check if the id is for a menu or
text window instead of directly accessing the windows array.
Previously when wishing for "ring of protection from shape shifters",
you got a random ring instead of the protection from shape changers,
because the string matching alias was "protection from shape shifters"
without the object class. Now, we'll check if the wish matched any
object class, but not existing object or alias, and try matching
the aliases again, but only those of the already matching obj class.
Add an alias for the ring of increase accuracy: "ring of accuracy",
and tests for it.
When removing a temporary (menu, text, popup) window, the code
was erasing it from memory and then refreshing the screen.
This is unnecessary, as we're refreshing all the windows anyway.
symbols.c:429:7: warning: integer constant not in range of enumerated type 'enum symparse_range' [-Wassign-enum]
429 | { 0, 0, (const char *) 0 } /* fence post */
| ^
windows.c:1765:32: warning: integer constant not in range of enumerated type 'enum from_core_requests' [-Wassign-enum]
1765 | { 0, 0, { NO_COLOR, ATR_NONE }}};
| ^
The map frame (background) colors were all over the place; the
code should be much cleaner now, and still work exactly the same
as before.
I tested this with terminals with 8, 16, and 256 COLORS.
read.c:148:13: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
147 | "Ms. Palm's House of Negotiable Affection--A Very Reputable"
|
| ,
148 | " House Of Disrepute",
| ^
read.c:147:9: note: place parentheses around the string literal to silence warning
147 | "Ms. Palm's House of Negotiable Affection--A Very Reputable"
| ^
1 warning generated.
Pull request by elunna with assistance by entrez tried to fix up
wand of striking discovery when the wand is zapped by a monster.
The fix didn't match the intended behavior (which may or may not be
the desired behavior...), so this skips the code in the pull request.
[I can't post comments on github anymore since I declined to switch
to their 2-factor authentication. But I can still read submissions
without logging in.]
This also tries to fix a couple of inconsistencies between zapping
by the hero versus by a monster. If the zap "boinged" :-) due to
target's magic resistance, zap by hero didn't discover the wand but
zap by monster did. Conversely, a zap by the hero that reached a
target and missed did discover it but one by a monster did not.
Now a zap of not-yet-discovered wand of striking by the hero which
hits, whether or not the hit gets resisted, will become discovered
provided that the spot where target is hit can be seen (the target
itself need not be), and one which misses or which can't be seen
hitting something will no longer be.
Supersedes #1223Closes#1223
Reported directly to devteam: if a magic trap gave its uncurse
effect, scroll of remove curse could become discovered.
Turns out that it would happen if hero was wielding a stack of
unholy water potions. It didn't matter whether they were known
as water or known to be cursed or whether hero was carrying any
scrolls of remove curse.