keni [Wed, 17 Oct 2018 19:37:24 +0000 (15:37 -0400)]
Deprecate "makedefs -m".
mons[].difficulty takes over for monstr[]
Invoking "makedefs -m" gives a deprecation message; it is also included
in the (now mostly empty) monstr.c.
Ports should now remove "makedefs -m" from their build procedures but this
commit does not include that change.
PatR [Sat, 20 Oct 2018 21:56:50 +0000 (14:56 -0700)]
Guidebook.mn #extended commands
Change the extended command section from a mixture of
|#cmd This is a short-named command.
|#command
| This is a long-named command.
to every command having its descriptive text start on the next line
|#cmd
| This is a short-named command.
|#command
| This is a long-named command.
which results in a longer document but the extended commands section
is much easier to read.
No change to Guidebook.txt, where the previous command name padding
was wide enough to accomplish the same for fixed-width tty font.
There is an update to that though; a previous change omitted it.
PatR [Sat, 20 Oct 2018 09:23:45 +0000 (02:23 -0700)]
WINCHAIN cleanup
This started out as some formatting cleanup for src/windows.c but
ended up removing calloc() from the WINCHAIN code, plus fixing a
couple of compiler complaints for win/chain/wc_trace.c.
I tried to actually run with +trace enabled and never managed to
get anything to happen. trace_procs_init() was never called. I've
never tried to use it before so don't know whether something which
used to work has gotten broken or I'm just doing it wrong.
PatR [Fri, 19 Oct 2018 00:54:30 +0000 (17:54 -0700)]
fix github issue #94 - files missing from Files
Fixes #94
I thought maintenance of this was going to be automated?
Add missing special levels: bigroom6..10.lev and medusa3..4.lev
in the generated at build time section of dat/.
PatR [Fri, 19 Oct 2018 00:15:42 +0000 (17:15 -0700)]
fix github issue #38 - indentation vs `if {}'
Fixes #38
In 3.6.1, some code in mfind0(detect.c) was mis-indented in a way
which suggested that the grouping within braces might not be what was
intended, and that was right--there was a pair of braces missing when
compared with older versions of the code involved. A previous patch
(post-#38) had changed the indentation to match the surrounding braces
without really addressing the issue. But it turned out not to make
any difference either way since mundetected is only used by hiders
and eels. This reorganizes the relevant code to make it simpler to
understand, I hope.
PatR [Thu, 18 Oct 2018 21:37:41 +0000 (14:37 -0700)]
Guidebook.tex quoting
Change instances of 'C' and ``C'' to `C'.
Change a few double quotes, "..." to ``...''.
Remove some trailing spaces (for Guidebook.mn too).
One tweak in wording: for #offer, ``use `m' to skip items on altar''
followed by ``you'll need to find an altar'' sounded strange. Move the
``skip items on altar'' sentence after the ``need an altar'' sentence.
Pasi Kallinen [Thu, 18 Oct 2018 14:19:26 +0000 (17:19 +0300)]
X11: Revert finding scrollbars in same window
Apparently this doesn't work, for some reason every widget reports
a different window, even when they are in the same window ...
Maybe widgets inside and outside a viewport are technically
in different windows?
PatR [Wed, 17 Oct 2018 12:22:36 +0000 (05:22 -0700)]
Guidebook.mn single quotes
Replace `C' and 'C' with \(oqC\(cq (open and close single quote).
For plain text output, the new form generates the first form. Most
single quotes were using that, but there was quite a bit of C-style
char quoting that was somewhat inconsisent.
There are several text changes too, mostly small. The few I can
remember are
replacing several ``#twoweapon'' with `X';
pets: change 'cat' to 'kitten' and mention that horses are
vegetartian where it claims that pets usually feed themselves;
NETHACKOPTIONS: add `bash' to the shells mentioned,
describe `NETHACKOPTIONS=@filename' better,
shorten the example (it's still too long for Guidebook.txt);
Configuring Status Hilites: expand the `behavior' descriptions
to mention the value limits for percentage and absolute, and
include post-3.6.1 '<=' and '>=' for them,
add omitted fields `hunger' and `title' to text match.
I also changed a bunch of examples in the option configuation section
from bold font to constant-width Roman which more closely resembles
the \tt font in TeX. Probably a whole bunch of other bold items
ought to follow suit.
Issues:
title for section 9.3 (NETHACKOPTIONS) is too close to the sample
config file at the end of section 9.2;
as mentioned above, the sample ``setenv NETHACKOPTIONS foo'' is
much too long for Guidebook.txt, and ``NETHACKOPTIONS=foo'' is
slightly too long; they're ok in Guidebook.ps (assuming default
page size);
does `WIZKIT=~/wizkit.txt' actually work? That's the example shown.
PatR [Tue, 16 Oct 2018 22:18:09 +0000 (15:18 -0700)]
a few Guidebook tweaks
I started out updating Guidebook.mn to use \(oq and \(cq for single
quotes but ended up including some new text. I've separated that
part out (there are a few instances of altered quoting in the midst
of it--the separation wasn't 100%) to commit separately.
Add verbiage to "choosing race" and several commands: f, s, S, t,
w, and ^X.
Change `E-' and `w-' to use minus sign instead of hyphen. The TeX
edition uses \tt font for those which has the same effect of making
those dashes be more prominent.
Fix typo/thinko in `IX': Guidebook.mn and Guidebook.txt said that
displayed inventory items whose bless/curse state is "known".
Guidebook.tex had it right, "unknown".
Pasi Kallinen [Tue, 16 Oct 2018 14:39:42 +0000 (17:39 +0300)]
X11: Don't reuse perm_invent window for picking an object
The core wants to reuse the permanent inventory window for choosing
an object from inventory, but the perm_invent window could be
hard to focus - it could even be on another display!
Instead, create a temporary new window from which the user can
pick an inventory item.
PatR [Tue, 16 Oct 2018 01:26:49 +0000 (18:26 -0700)]
fix #H7453 - 'bonesknown' for dead hero
Dead hero's map coordinates are set to <0,0> part way through bones
creation, then were being used to record grave location for overview
feedback with "final resting place for <dead hero>" if/when another
character got those bones and found the grave (actually, spotted the
location where first hero died regardless of whether a grave gets
placed there). Record dead hero's pre-<0,0> coordinates as intended.
Not previously noticed because in wizard mode the final resting place
becomes part of overview info as soon as bones are loaded rather than
waiting for the death location to be reached.
PatR [Mon, 15 Oct 2018 00:46:48 +0000 (17:46 -0700)]
Guidebook.mn screenshot
Putting a box around the simulated screenshot has a side-effect of
forcing it to the next page if there isn't room on the current page.
And it looks at least as good as the old top and bottom horizontal
lines, if not better. This also eliminates the blank left-most
column (relative to those lines) which isn't part of the screenshot.
There are issues:
1) for Guidebook.ps, the "Figure 1" label underneath seems to be
too close to the box; I didn't try to force a blank line in front
of it because that increases the risk of pushing it to the next
page if the figure lands at the bottom;
2) for Guidebook.txt, the "Figure 1" label actually overwrites the
bottom line of the box, and the embedded space allows the line
to show through: "---Figure-1---"; I tried using "\ Figure\ 1\ "
to see if that might hide the issue by making it seem that the
label in intended to be on that line, but it didn't help--
unbreakable-space evidently does not imply always-visible-space;
3) the box is one column wider than the rest of the document (the
previous horizontal lines were two or three columns wider, so
this is actually a tiny imrovement); squeezing out some whitespace
to make the status lines narrower didn't help--or at least not
enough; squeezing some spaces was needed to match STATUS_HILITES-
era status formatting anyway.
4] if there was a footnote (we have some for trademarks) on the same
page as the screenshot, either the footnote or the table would
probably become confused, perhaps both. I think we just pretend
that that will never come up....
5} I've made no attempt to alter Guidebook.tex to try to match.
I'm throwing in the towel. Fixing this up is way beyond my limited
'roff/tbl capability. (There's probably a much more straightforward
way to achieve what we want.)
PatR [Sun, 14 Oct 2018 22:09:40 +0000 (15:09 -0700)]
bring Guidebook.txt up to date
I may not get around to doing anything with 'C' vs `C' vs \(oqC\(cq
for a while. Bring Guidebook.txt up to date now rather than waiting
so that the repository's copy reflects the #H7444 fix.
This has ended up with substantial spurious differences due to it
placing padding in different spots during line justification. I
hope that's due to different groff version using a slightly different
algorithm rather than something like phase of the moon. :-]
There also differences caused by "..." taking less space than ``...''.
PatR [Sun, 14 Oct 2018 21:30:02 +0000 (14:30 -0700)]
fix #H7444 - bad line split in Guidebook
Reported for Windows beta3 but turns out to be present in 3.6.1
distribution.
| #wait
| Rest one move while doing nothing. Default key is '.', and '
| ' if rest_on_space is on.
where the line split occurs in the middle of "' '". We should
switch from the ascii single quote to the 'nroff open and close
single quote escapes but I haven't gotten around to that.
Preceding the space with backslash prevents a line break there.
PatR [Sun, 14 Oct 2018 19:58:59 +0000 (12:58 -0700)]
Guidebook.mn update
Replace ``foo'' with \(lqfoo\(rq (many instances) so that the
plain text Guidebook will use ". Also a few `bar' with \(lqbar\(rq
(mostly `#enhance' and `#twoweapon') to be consistent with other
command names that all use double quotes. And replace a few strings
in actual double quotes with corresponding \(lq or \(rq.
Replace command descriptions using ^X with \(haX to get the larger
circumflex character (aka 'hat') instead of the smaller circumflex
punctuation. (Not noticeable with plain text output.)
Changed one DOS and a few MSDOS to MS-DOS to match the spelling in
the trademark line at the end.
Start each sentence on its own line for the paragraphs which were
being subjected to the above changes.
Also a much smaller subset for Guidebook.tex (not tested...).
Does not address the "wrapped to next line in middle of ' '" issue.
PatR [Sun, 14 Oct 2018 09:47:09 +0000 (02:47 -0700)]
fix github pull request #144 - uswapwep vs shield
Fixes #144
While giving a new character his/her starting equipment, don't clear
alternate weapon when putting on a shield since that weapon should
still be available to swap with primary. Affected knight's lance
and valkyrie's dagger.
Also, guard against wearing an initial shield if already wielding a
two-handed weapon, or wielding such a weapon if already wearing a
shield. Both situations are hypothetical with current starting gear.
PatR [Sun, 14 Oct 2018 01:14:34 +0000 (18:14 -0700)]
Elbereth tweaks
Don't "feel like a hypocrite" when on Elberth and attacking a monster
which isn't scared by Elbereth (exception: peaceful creatures aren't
scared but attacking them in such situation is hypocritical anyway).
This means that players can use Elbereth to scare away some creatures
while continuing to fight others. Elbereth won't be automatically
erased, but weapon attacks will scuff the engraving; wand zaps don't.
Reduce the -5 alignment penalty when alignment is 5 or less. Reduced
amount is -(1..5), so -3 average.
nhmall [Sat, 13 Oct 2018 00:57:26 +0000 (20:57 -0400)]
keyhelp missed during Windows build steps
BUG REPORT:
comments:
1. I start a new character.
2. The first command I type is '&'
3. I type "?" and "<enter key>" at the prompt.
4. Cannot open "keyhelp" data file!--More--
? give a help message.
PatR [Mon, 1 Oct 2018 22:08:33 +0000 (15:08 -0700)]
change default for 'autodescribe' to 'on'
This was discussed two years ago then nothing happened. Make
autodescribe for feedback when moving the cursor to pick something
default to on instead of off.
Force trap to activate during failed untrap attempt if done while
already at the trap's location, to match the recent change in
behavior when failed attempt occurs while adjacent to the trap.
Most noticeable while flying over bear traps, but affects all
failed untrap attempts.
Modify win/share/tilemap.c so that generated source file src/tile.c
uses similar formatting to the other sources. Mainly, avoid tabs and
use 4 columns indentation instead of 8 columns in the short routine
near the end.
tilemap.c still treats STATUES_LOOK_LIKE_MONSTERS as conditional.
The main sources made that unconditional prior to release of 3.6.0.
Make being trapped in/on/over floor block Levitation and Flying, the
way that being inside solid rock already does, and the way levitating
blocks flight.
Blocked levitation still provides enhanced carrying capacity since
magic is attempting to make the hero's body be bouyant. I think that
that is appropriate but am not completely convinced.
One thing that almost certainly needs fixing is digging a hole when
trapped in the floor or tethered to a buried iron ball, where the
first part of digactualhole() releases the hero from being trapped.
If being released re-enables blocked levitation, the further stages
of digging might not make sense in some circumstances.
I recently realized that being held by a grabbing monster is similar
to being trapped so should also interfere with levitation and flying.
Nothing here attempts to address that.
Save files change, but in a compatible fashion unless trapped at the
time of saving. If someone saves while trapped prior to this patch,
then applies it and restores, the game will behave as if the patch
wasn't in place--until escape from trap is achieved. (Not verified.)
revisit display artifact appearing to the right of status line
The prior fix for this was a bit flawed. It was only considering
the length of the last field, but what it really needed to do was
consider the placement of the last character of the last field
on the row relative to the placement of the last character of
the last field on the row previously.
If the new placement of that last character of the last field
is left of the previous placement, some clearing must be done.
Fix the situation of Flying hero failing to untrap a bear trap that
was resulting in the trap becoming hidden. Previous fix prevented
hero from moving onto the trap's location so that the reason for
hiding it didn't occur. This moves the hero and forces the trap,
so it will become unhidden again before there's any chance to notice
that it had been hidden.
Status 'Flying' conflicts with being trapped at floor level, but that
is a separate, known issue. I'll have to resurrect my unfinished fix
for that sooner rather than later.
For the searching capability offered by '# ?', use ':' instead of 's'
to activate it. Otherwise, if the player typed ':', menu processing
would handle that and would search the few menu entries (for selectors
'a', 's'--now ':', and maybe 'z') when we're interested in searching
the data displayed via many separator lines.
I left 's' as the selector for "show all, clear search" once a search
has been performed, but perhaps that ought to be switched to ':' too.
Demote #monpolycontrol and #wizdebug_traveldisplay from commands to
simple boolean options. The former has the same name, the latter
is called travel_debug. Rename #wizdebug_bury to #wizbury; it
shouldn't matter that it goes away when compiled without DEBUG.
There are now five wizard-mode boolean options: monpolycontrol,
sanity_check, and wizweight are documented in the Guidebook;
menu_tab_sep and travel_debug are commented out there.
Guidebook.mn has been tested; Guidebook.tex has not.
There's a BL_CHARACTERISTIC (-3) defined in the botl.h header file,
but it is not used in wintty.c and is now screened out along with
everything lower and everything MAXBLSTATS and above.
Description for use when an item hasn't been seen up close yet falls
back to real name if there is no separate description, but was doing
so before real name substitution for samurai.
actualn = foo;
dn = description ? description : actualn;
if (Samurai)
actualn = bar;
So player saw a flail (via 'dn') until dknown bit got set, then
nunchaku (via 'actualn' after it got set to samurai-specific value).
Wait until after substitution of Japanese real names before falling
back to real name when there's no description.
Iron bars can be destroyed in some circumstances (hit by yellow
dragon breath or thrown potion of acid, being eaten by rust monser
or black pudding, or by poly'd hero in those forms) and should act
like walls for diggable/non-diggable purposes. But they aren't
walls, so the non-diggable flag was not being set for them by the
special level loader. Even once that was changed, they weren't
being handled consistently. Some places checked for non-diggable
directly (zap_over_floor of acid breath, potion of acid hitting bars)
and started working as intended, others used may_dig() to check
non-diggable (poly'd hero attempting to eat iron bars) but it doesn't
handle iron bars, and still others didn't check at all (bars-eating
monster who moved onto bars location in expectation of eating those
next).
Get rid of bold/non-bold distinction in #wizidentify inventory menu
by only showing items which aren't yet fully identified instead of
full inventory with bold for unID'd. Support for bold text might
be lacking.
I was considering this even before the report that X11 menus ignore
attribute. The "_ - (use ^I for all)" menu entry is still present,
but it could be discarded in favor of '.' to pick everything via
ordinary menu selection.
Most shop messages accurately identify the shopkeeper even when he
or she can't be seen, but some also include a pronoun reference that
ended up as "it" or "its" when not seen. Extend pronoun selection
so that visibility can be ignored: noit_mhe(mon), noit_mhim(mon),
and noit_mhis(mon). Note that despite being called noit_foo(),
those will still return "it" if mon is neuter.
"Accurately identify shopkeeper" is misleading if the hero is
hallucinating; a random shopkeeper name is used then. noit_foo()
yields the pronoun applicable to the actual shopkeeper and might
not match the gender of a hallucinatory name. That could be fixed
in a couple of ways (add shk_mhe()/shk_mhim()/shk_mhis() and either
pass them the randomly chosen name so that they can figure out the
appropriate gender, or just have them use a random gender whenever
hallucinating) but I don't think that's worth bothering with.
A bunch of shop messages needed noit_foo(); only a couple of those
have actually been tested. A bunch more were using shkname() at
the beginning of a sentence where Shknam() should be used instead.
(All the existing shk names are already capitalized so there's no
noticeable difference.)
The three places outside shk.c and vault.c which directly use
pronoun_gender() have been successfully tested.
known bear trap forgotton by player polymorphed into a flyer
The original report stated:
"I located a bear trap as a human and just ignored it
for the time. I polymporphed into a Vampire Lord, then
went to #untrap the bear trap. On the first attempt,
I stood beside the trap and attempted to #untrap. I
received the 'Whoops!' message and automatically moved
onto the trap square as a result. The bear trap vanished!
I obviously wasn't trapped since I'm polymorphed into a
flying monster, but the trap glyph was no longer present.
The glyph looked like regular floor - as if I had
untrapped the bear trap and taken the trap with me."
The trap was actually still there but became hidden intentionally
for other valid scenarios, but was an unintended side-effect for
this scenario.
Fix it by failing the #untrap operation for a Flyer earlier on,
and in a more benign manner, since the Flyer ultimately doesn't
end up in the trap anyway. You'll still get the "Whoops!",
followed by a message, but that's as far as the "failed" #untrap
attempt will go under the circumstances.
drum of earthquake causing deafness inappropriately
Address a drum of earthquake inconsistency reported 2017-03-23:
"Drum of earthquake does not make you deaf. Leather drum or depleted
drum of earthquake does."
BL_RESET usage for window port status line updating
Like BL_FLUSH, only send BL_RESET if the window port has
indicated it wants them via setting the appropriate WC2
bits in its window_procs structure. Update documentation.
Fixing rnd_otyp_by_namedesc() for use by get_shiny() broke its use
by readobjnam(). Make the chance for 0% generation objects to have
non-zero chance of being selected be a parameter.
fix github issue #134 - display of migrated objects
Fixes #134
An invisible hero (who can't see invisible and doesn't have autopickup
enabled) going down stairs to an object which fell down those stairs
will see the stairs instead of the object on them. Missing newsym()
in obj_delivery() when objects aren't being passed through scatter().
The wishing code uses 'oc_prob + 1' so that probability 0 (never
random) objects are eligible to be selected if their name matches
a wish; collecting 'shiny' objects shouldn't do that. (No effect
on play since there aren't any shiny objects with 0% random chance.)
rn2() takes int, and total oc_prob for entire objects[] array is
15000, so don't accumulate the target probability in a long.
The original report complained that gremlins seemed impervious to
Sunsword's light yet a flash from a camera caused them to cry out in pain
despite "The long sword named Sunsword begins to shine brilliantly!"
This commit does two things:
1. A dmg bonus is applied against gremlins using a lit Sunsword.
2. Gremlins will generally avoid the light emitted by Sunsword.
There's a few minor flavor bits thrown in also.
It is understood that this effectively makes Sunsword provide
"gremlin-proofing", but the gremlin myth and Sunsword's characteristic
feature pretty much demand it.