Commit Graph

2342 Commits

Author SHA1 Message Date
PatR
b17c6d0b54 fix #H7155 - polearm can reveal hidden monster
The code to choose a likely target when applying a polearm was
basing its decision on visible spots which contained monsters,
so could expose the location of a hidden monster if there was
only one such spot within polearm range.  Not mentioned in the
report:  it also wouldn't pick remembered, unseen monster unless
there was a monster still at that spot.

I've changed it to choose candidate location based on the glyphs
shown rather than on the presence of monsters.
2018-05-19 15:46:09 -07:00
PatR
98099863ff fix #H7159 - orc hero can start with lembas wafers
Orc heroes get an extra food item ("to compensate for generally
inferior equipment") and it could randomly be lembas wafers (or
cram rations), and Ranger heroes always started with cram rations
even when they're orcs.  Fixing the latter was simple, but the
normal race-based substitutions weren't applied to randomly
generated items, so the fix for the former required a bit of code
reorganization in ini_inv().

Elf heroes already get lembas instead of cram; do the reverse for
dwarves (although I don't think this case can happen--no role gets
lembas wafers and only orcs and always-human tourists get random
food); give orc heroes tripe instead of either lembas or cram.
2018-05-19 11:47:15 -07:00
PatR
e9f1e03271 fix some of #H7156 - perm_invent issues
> [1. perm_invent is kept in flags so persists across save/restore, but
>  perm_invent capability can change if player restores with a different
>  interface--or same one running on a different-sized display--so it
>  ought to be in iflags instead.]

Not addressed here.

> 2. perm_invent window does not get updated when charging a wand (or
> other chargeable item presumably), with a scroll of charging.

Most scrolls rely on useup() -> update_inventory(), but charging uses up
the scroll early so that it will be gone from inventory when choosing an
item to charge.  It needed an explicit update_inventory() after charging.

> 3. update_inventory(), is called from setworn(), which is called from
> dorestore(), when loading a save.  Segfaults have been observed in
> variants based on this code (though not yet in vanilla 3.6.1), so it's
> possible this may be unsafe.  The update_inventory() call in setworn()
> could be protected with "if (!restoring) ..."

tty doesn't support perm_invent, so this might be a win32 issue.
I've made the suggested change, but a better fix would be to turn off
perm_invent as soon as options processing (new game) or options restore
(old game unless/until #1 gets changed) has finished setting things up,
then turn it back on at the end of moveloop()'s prolog when play is
about to start.

 = =

Most of the read.c change is reordering prototypes to match the order
of the corresponding functions.  I did this when adding a new static
routine, then ended up discarding that routine.
2018-05-19 04:19:18 -07:00
PatR
bed79b8391 more hilite_status threshold number parsing
In addition to leading '-' for negative values, accept explicit '+'
for positive values as a no-op.
2018-05-18 22:56:21 -07:00
PatR
546321d055 Unix Makefile changes 2018-05-18 22:04:21 -04:00
PatR
4b98266e25 fix #H7160 - hilite thresholds reject negatives
There was a prior report about this but I can't find it; maybe it
didn't go through the web contact form.  Anyway, status_hilite
threshold numeric values wouldn't accept a minus sign before the
digits, preventing negative AC values from being tracked.
2018-05-17 15:48:09 -07:00
nhmall
2758cd998a Guidebook.txt update 2018-05-17 03:42:38 +00:00
nhmall
1e60a16565 sync date between two Guidebook files (.mn, .tex) 2018-05-16 23:26:07 -04:00
nhmall
2b66b5ecd1 bump version ID values 2018-05-16 23:06:44 -04:00
nhmall
8dc2c59796 fixes36.2 catch-up for previous commit 2018-05-15 19:41:12 -04:00
nhmall
88f5dcbfb4 fix spaces in hilite_status option text field not working H7107 (GitHub #88)
Fixes #88

H7107: FWD: spaces in hilite_status option text field not working
2018-05-15 19:35:36 -04:00
nhmall
504f0a4510 integrate aklys feature introduced in 3.6.1 into 3.6.x display 2018-05-15 06:41:06 -04:00
nhmall
aaddab5450 catch up on fixes36.2 updates 2018-05-15 01:10:32 -04:00
nhmall
2e8b69d5ff some tty per field rendering and optimization 2018-05-14 21:13:37 -04:00
nhmall
4e5c41401f last line of config file wasn't heeded if newline was missing 2018-04-28 17:22:21 -04:00
nhmall
331abfe530 Specify both width and height when creating font for width testing
From Bart...

When we are creating the console font for testing character widths,
we were not specifying width. Because of this, the created font's
average width might be larger then what we expect and we might
falsely detect that the font was inappropriate for playing Nethack.
Fix provides the width that we are expecting when creating the font.
2018-04-28 12:11:19 -04:00
PatR
78fe5fbb05 display glitch: warning vs remembered,unseen
Noticed while testing the fix for the recently reported clairvoyance
bug.  I saw a '1' move onto an 'I', then when it moved again the 'I'
reappeared.  The remembered unseen monster couldn't be there anymore
if the warned-of monster was able to walk through that spot, so
remove any 'I' when showing a warning (digit) to stop remembering an
unseen monster at the warning spot.

Nobody has ever reported this so fixing it isn't urgent, but fixing
it is trivial so I'm doing it in now (without the clairvoyance fix).
2018-04-26 15:07:00 -07:00
nhmall
dcb9657b03 new Guidebook.txt 2018-04-25 19:56:39 -04:00
nhmall
9914250632 Guidebook.tex bit spotted in test pdf generation 2018-04-25 17:36:29 -04:00
nhmall
5101b9efb8 Update some dates and comment out BETA 2018-04-25 17:11:28 -04:00
nhmall
671c40c557 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2018-04-25 16:58:59 -04:00
nhmall
fd482d11f0 fixes36.1 multi-line entries require leading tab after first line 2018-04-25 16:55:42 -04:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
nhmall
6623b5b007 Update Guidebook.txt 2018-04-23 21:38:36 -04:00
nhmall
f6496a61f1 Apr23 Guidebook date bump 2018-04-23 21:31:28 -04:00
PatR
79c49eb86d Guidebook...
Refine the recently added short description about how monsters are
displayed on the map.
2018-04-23 16:08:57 -07:00
PatR
e1dd895dc2 fix #H7079 - melting ice destroys lowered dbridge
melt_ice() attempted to handle this but checked for raised drawbridge
instead of lowered one.
2018-04-23 00:39:57 -07:00
PatR
6f16a318a3 Guidebook update: map display of mons and objs
Mostly add a paragraph clarifying the classification of WONTFIX for
a reported bug ('I' unseen monster clobbers remembered object at the
location).  It felt like it needed a parallel paragraph for monsters.
2018-04-22 20:01:14 -07:00
nhmall
21d1e68951 Guidebook.txt update 2018-04-21 17:27:36 -04:00
nhmall
e48600ec87 adjacent pit movement isn't a fall
H7074 1311

> When moving from a pit into an adjacent pit, you "fall into" the pit and take
> damage. This happens even when you are walking back and forth between two pits,
> repeatedly, where you should have no way to fall.
>
> The intent seems to be that you can move into the adjacent pit without having
> to climb out of the first one, and this works properly - the only problem is
> that the pit gets triggered when you ought to have no distance to fall.

This is really just stumbling over uncleared clutter, not a pit fall.
There was already a way to clear the clutter between adjacent pits.
2018-04-21 00:47:59 -04:00
nhmall
58eb1430b1 Guidebook.tex bit
also date bump
2018-04-20 19:00:35 -04:00
PatR
01abfa8c3d yet another Guidebook update
A couple of \e to \\ changes, a whole bunch of ^ to \(ha changes
(similar character but bigger so easier to see), ~ to \(ti (ditto),
and - to \- (first is a hyphen, second is a minus sign which is
bigger; see the difference for "- and | The walls of a room...").

As well as horizontal walls, open doors, top and bottom of swallow
and explode octagons, I changed command line switches -s, -X, and -D
to use minus sign.  I was unsure whether the umpteen M-C should be
changed too.  Since it was less work to leave them as-is, that's
what I did.  I also left ^C with smaller circumflex punctation
instead of changing to bigger circumflex character for same reason.

The [much smaller] Guidebook.tex changes need testing.

Not fixed:
I think the sentence "you can type 'nethack -s all' on most versions"
is very misleading.  Using 'versions' to refer to the various ports
rather than different releases is iffy, but my complaint is that
"typing something" sounds like an action you would perform while in
the game.  Access to a command line and figuring out how to invoke
nethack from there is probably not something where "most versions"
applies any more.  But I don't know how to rephrase that succinctly.
If I did, I would have just changed it....
2018-04-20 00:20:31 -07:00
nhmall
5895c18ab5 sync TeX Guidebook content bit with nroff Guidebook content 2018-04-19 22:27:26 -04:00
nhmall
9539dc40ce more Guidebook
Remove 3.6.0-specific preface.
Bump the date.
2018-04-19 22:10:46 -04:00
keni
98186fca84 Escaping escape characters that escaped previous updates. 2018-04-19 19:37:44 -04:00
Pasi Kallinen
d26fa16e5c Reorder #droptype menu and add some separators 2018-04-19 09:10:06 +03:00
nhmall
3b86b29ce8 extraneous braces 2018-04-16 20:44:45 -04:00
nhmall
b5a623a6d7 fix Guidebook.tex creation
The Guidebook.tex band in it breaks the creation of Guidebook.tex.

    ! Not a letter.
    l.2701 \hyphenation{.
                     nethackrc}
    ?

For these simple one-time situations, just use \mbox{} to prevent
them from hyphenation instead.
2018-04-16 20:35:53 -04:00
nhmall
123dddebb6 Guidebook date bump 2018-04-16 19:55:04 -04:00
PatR
24c62868c4 more Guidebook.mn tweaks
The sample map was being rendered in a proportional-width font for
Guidebook.mn -> Guidebook.ps -> Guidebook.pdf so looked awful.  It
is quite hard to believe that no one ever noticed this.  I wasn't
sure how to force tty font, but it is straightforward to pick
constant-width variant of Roman which seems to be 'roff's universal
font.

Prevent ".nethackrc" from being hyphenated and split across lines.
Ditto for other file names in the same section even though they
hadn't been positioned in spots where they got split.  I put same
thing into Guidebook.tex but I don't know whether their embedded
dots will become a problem there.

Loads of unmatched double quotes were confusing Emacs' nroff-mode
(which unlike tex-mode for Guidebook.tex, wasn't being activated
by default for Guidebook.mn).  Supply missing closing quote for a
bunch of things, convert literal '"' to '\(dq' for ones that aren't
intended to have matching close quote.  And change a bunch of
instances of "text" to ``text'' for rendering as quoted strings.
(There are a lot of single-quoted characters 'c' which should
probably be `c' instead, but I haven't touched those.)

There were several '\e' to render the 'escape' character, but that
is something which can be changed at will.  Use '\\' to explicitly
show backslash instead.  Change several ' - ' and '--' to '\(em'
for M-sized dash.  Right now they all have <space>\(em<space> but
the spaces probably shouldn't be there.

Change instances of 'number_pad' to '.op number_pad' to have it
rendered as an option name.

Remove the obsolete sentence which said that "Elbereth" might be
conditionally excluded.  (This change also made in Guidebook.tex.)

Split some wide lines (wide in the source, not after rendering),
although this wasn't done exhaustively.  For the re-split lines,
put each sentence on its own line as suggested by 'roff' man page.
2018-04-16 16:29:01 -07:00
PatR
0942c1c3c8 more 'roff Guidebook tweaks
Fix the alignment of three short tables which use 'key dash meaning'
so that the dashes line up using Keni's .PS/.PL/.PE macros.  (There
might be others that need this.)

Center the "- - - -" separator which precedes the list of dungeoneers
at the end.  (Thinking about it now, possibly it should be forced to
have zero paragraph indentation prior to centering rather than tacking
on some trailing spaces to shift the non-blank part to the left.  The
title for the table of display symbols might be in the same boat here.
But I'm roff'd out for the time being.)

Try to explain object filtering for commands that can take multiple
object classes combined with multiple BUCX states (and/or 'unpaid').
At the moment it is attached to the 'D' command where it is most
likely to be used, but probably ought to have its own subsection in
the Objects chapter so that it doesn't bog down the command list.

The filtering paragraph ought to be duplicated in Guidebook.tex, but
there's enough quoting going on that I didn't trust myself to attempt
an untested change.
2018-04-16 01:24:23 -07:00
PatR
be8313cc5f doc/Guidebook.mn: UNIX trademark, other tweaks
Instead of modifying tmac.n's '.ux' macro, replace usage of it with
clone '.UX' (inline in Guidebook.mn in order to avoid modifying tmac.n
according to the author's wishes).  '.ux' was used in several places
and neglected in a few others.  Now all "UNIX" references use '.UX'
(unless I missed some...).  Only the first generates a trademark
footnote.  Also only the first adds the (r) superscript for registered
trademark; it would be better if that macro always showed (r) while
continued to show the footnote only once.

I made the mistake of making a bunch of small revisions all at once
and am not going to try to separate them out for separate commit.
I'm not sure they all got reviewed closely; I didn't spot any glaring
errors while scrolling through the formatted file.

The table of display symbols wasn't quoting the backslash used for
thrones so that symbol showed erroneously as blank.  hbeam, vbeam,
lslant, and rslant (used for zap animations) were mislabeled as
"wall".  (drawing.c used to have the same bug but it got fixed about
two years ago.  Guidebook.tex still needs to have this fixed.)

In the section 'using a configuration file', the file name ".nethackrc"
ended up as a hyphenated split across two lines.  That needs to be
fixed; the presence of a dash makes the spelling of the name become
ambiguous.

Several small tables that use <something><space+dash+space><something>
don't line up their dashes correctly.

I replaced most blank lines and also lines which begin with whitespace.
One notable exception is the sample map excerpt.  It seems to format
as intended so I didn't try to tinker with it.
2018-04-15 18:33:41 -07:00
PatR
2b818949b0 Revert "doc/tmac.n: UNIX trademark"
This reverts commit 206f9e43e9.

tmac.n contains a comment asking that modified versions not be
distributed.  So back out the change which updated '.ux' with
the current trademark owner for "UNIX" so that we can continue
distributing with Guidebook.mn.  We'll handle the out of date
trademark issue in another fashion.
2018-04-15 16:41:42 -07:00
keni
662380bf8c fix makedefs.6 formatting errors 2018-04-15 16:12:19 -04:00
PatR
206f9e43e9 doc/tmac.n: UNIX trademark
The 'roff Guidebook's first reference to UNIX includes a footnote with
the trademark notice.  Several subsequent ones do not.  I think that's
ok; I think the '.ux' macro even keeps track and only issues it once.
But the extra ones aren't currently using '.ux' and probably should in
order to get the '(tm)' character.  I'll leave that for someone else....

The history section mentions quite a few trademarked names.  I hope
that the blanket "brand and product names are trademarks or registered
trademarks of their respective holders" is sufficient for them.
2018-04-14 19:21:04 -07:00
nhmall
68b1d0c7ba doc update 2018-04-14 19:01:15 -04:00
nhmall
a972554d7e more Guidebook symbols 2018-04-14 18:46:14 -04:00
nhmall
97a2995c28 spotted a typo in Guidebook.tex 2018-04-14 17:53:37 -04:00
nhmall
7945d517f4 more Guidebook 2018-04-14 17:34:05 -04:00