Commit Graph

7327 Commits

Author SHA1 Message Date
nhmall
c29e4c572e Merge branch 'NetHack-3.6.2' 2018-09-30 00:12:08 -04:00
nhmall
09effe1677 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-30 00:11:30 -04:00
nhmall
00dfed5b3a move assignment outside inner loop 2018-09-29 23:38:20 -04:00
nhmall
ef199f3763 one more update for the right of the status line
This tracks the last character written on each row and clears
the previous content from the end independently of which field
is actually involved.
2018-09-29 23:21:11 -04:00
nhmall
d1c5649890 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.
2018-09-29 22:28:10 -04:00
keni
5a10926644 Update Files. Add missing files and missing .lev section. 2018-09-29 16:43:39 -04:00
nhmall
1ac064f03f Merge branch 'NetHack-3.6.2' 2018-09-28 20:01:41 -04:00
nhmall
141ddb98dc Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-28 20:01:08 -04:00
nhmall
394c72d366 display cleanup only targets the right-most field where it's needed 2018-09-28 12:55:30 -04:00
nhmall
bdc9a6b98e follow-up bit 2018-09-28 02:28:54 -04:00
nhmall
b14d495ce4 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-09-28 02:09:30 -04:00
nhmall
5639539568 tty: fix leftover display artifact when last field on the row got smaller 2018-09-28 02:09:07 -04:00
PatR
21db5a3ae6 alternate bear trap fix
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.
2018-09-27 18:42:12 -07:00
Patric Mueller
f87931a7bf fix typo of the Junethack tournament 2018-09-27 22:14:28 +02:00
PatR
dc3f497d56 more extended command help
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.
2018-09-27 03:52:23 -07:00
PatR
e0b7d2f5a9 monpolycontrol, wizdebug_*
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.
2018-09-26 18:40:13 -07:00
nhmall
3c25703576 Merge branch 'NetHack-3.6.2' 2018-09-26 17:39:20 -04:00
nhmall
a2d7722472 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-26 17:38:39 -04:00
nhmall
c5d0f6dd9d fix out of bounds error in tty_status_update() for BL_HUNGER case
The pointer could go out of bounds when decremented if it was pointing
at the start of the status_vals[BL_HUNGER] (empty string).

Also, guard tty_status_update() from an out of range index being
passed to it (botl shouldn't do that, but...).

The legal 1st parameter values for tty_status_update() in 3.6.2 are

	BL_RESET     (-2)
	BL_FLUSH     (-1)
	BL_TITLE     ( 0)
	...though to...
	BL_CONDITION (22)

  count MAXBLSTATS = (BL_CONDITION + 1)

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.

closes #142
fixes #141
2018-09-26 17:18:09 -04:00
nhmall
74b7829957 engr follow-up bit 2018-09-26 01:35:48 -04:00
nhmall
0fecf19789 wand of polymorph engrave for blind writers
Don't provide any discerning feedback on the blind player's turn
but do allow the wand to exercise its magic in a manner reflective
of blind writers
2018-09-26 01:10:27 -04:00
nhmall
2a92111223 fix missing space in "would flyif you weren't levitating"
Fixes #140
2018-09-25 23:28:20 -04:00
nhmall
eb63d6a023 Merge branch 'copperwater-flyif_fix' into NetHack-3.6.2-beta01 2018-09-25 23:24:44 -04:00
nhmall
cd0a29eae8 Merge branch 'flyif_fix' of https://github.com/copperwater/NetHack into copperwater-flyif_fix 2018-09-25 23:22:11 -04:00
copperwater
bab350f355 Fix "would flyif you weren't levitating" - missing space 2018-09-25 23:14:45 -04:00
nhmall
039ad51660 don't impact player stats with wizard mode ^T 2018-09-25 23:08:09 -04:00
PatR
64ebb9ceba fix #7414 - bug with Japanese names for Samurai
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.
2018-09-25 18:01:44 -07:00
PatR
3a62075070 fix #H7136 - iron bars vs non-diggable walls
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).
2018-09-25 16:43:06 -07:00
PatR
d86e9eaec4 extended commands revision
Reorganize the logic for showing or suppressing an extended command
to avoid a slightly hairy 'foo || bar && quux' expression.

When searching and not finding anything, report "no matches" rather
just waiting for another menu selection.

Plus miscellaneous reformatting.
2018-09-25 03:44:24 -07:00
PatR
d119eca297 simplify #wizidentify
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.
2018-09-24 17:06:04 -07:00
PatR
8ce81a27ef fix #H7397 - pronoun for unseen shopkeeper
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.
2018-09-24 15:15:04 -07:00
nhmall
3f5ef9bdf3 make long extended commands list be more navigable 2018-09-24 16:45:38 -04:00
nhmall
22d69d2424 update tournament reference 2018-09-24 15:59:38 -04:00
nhmall
02b1ce2d9a no leash-related message is given when leashed pet yellow light explodes
mondead() -> m_detach() -> m_unleash() suppresses
the m_unleash() slack message, so deliver it in
the caller explmm() in those circumstances.

(The issue of whether it should be possible to leash light
is side-stepped.)

bug H7406, 1548
2018-09-23 14:06:18 -04:00
nhmall
2813e42b22 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.
2018-09-23 11:16:09 -04:00
nhmall
76bffe5ba4 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."

bug 1099
2018-09-23 10:11:02 -04:00
nhmall
84c17d2e21 two typo/follow-up bits 2018-09-22 23:01:39 -04:00
nhmall
21a81d0294 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.
2018-09-22 22:41:02 -04:00
PatR
18d56724f9 'unbreak' wishing probabilities
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.
2018-09-22 16:46:27 -07:00
PatR
4f61e9697c 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().
2018-09-22 15:18:38 -07:00
PatR
b6e3f01855 shiny object probabilities
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.
2018-09-22 14:57:55 -07:00
nhmall
bbb81700f5 sunsword vs gremlin
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.

bug 42
2018-09-22 14:08:28 -04:00
nhmall
6a86cafa90 X11 exposed a genl_status_update negative index issue 2018-09-22 10:20:08 -04:00
nhmall
faf1a83fd0 follow-up bit 2018-09-22 09:24:20 -04:00
nhmall
fe68925100 another BL_CHARACTERISTICS fix
With the code as it stood, receipt of BL_CHARACTERISTICS would
trigger a flush of output which may not have been the
intention.

Ensure the flush code is only on BL_FLUSH (or BL_RESET).
2018-09-22 09:11:51 -04:00
nhmall
0aa9e00099 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-09-22 09:01:37 -04:00
nhmall
0a52543076 avoid illegal array indexes now that the enum treads beyond BL_FLUSH 2018-09-22 08:58:38 -04:00
Pasi Kallinen
39d10d96df Prevent leash showing unseen monster as "it" 2018-09-22 15:55:26 +03:00
nhmall
8e4ce066c9 fix C343-331 mirrors & sleeping mon
This outstanding bug was complicated slightly because the same
code was used for a sleeping mon as for a paralyzed mon so
message phrasing was called into question.

Just flip the phrasing to be about what you are able to discern
under those circumstances, which is very little, and don't have
the sleeping or paralyzed monster react to the mirror.
2018-09-21 23:34:00 -04:00
nhmall
6f5c3dcac5 Merge branch 'NetHack-3.6.2' 2018-09-21 22:18:23 -04:00