Commit Graph

5712 Commits

Author SHA1 Message Date
Pasi Kallinen
c49490dfd4 Rename getpos_coord values to "compass" and "map" 2016-01-13 12:21:27 +02:00
Pasi Kallinen
ef3ce49dd4 Make getpos monster/object coord picker deterministic
...and make it pick coordinates top-left to bottom-right.
2016-01-13 10:22:44 +02:00
PatR
5f6c0bd04a getpos autodescribe
Move the details of autodescribe out of getpos into a separate
routine.

I think 'cartesian' mode should be renamed 'compass' mode, and
'absolute' mode perhaps should be 'map' mode.  And we should have
a new 'screen' mode which shows rows,columns (1..N rather than
0..N-1).  For tty, row is line+2; message and prompting "window"
is row 1, line 0 of map is row 2.  Columns are straightforward
since column 0 of the map isn't used for map display:  column 1
of map is column 1 of screen.  Non-tty mostly shouldn't care and
might as well use the same conversion.
2016-01-12 23:10:31 -08:00
nhmall
fc9cf8cf89 update fixes36.1 2016-01-13 00:12:31 -05:00
nhmall
32a4859e5b show deafness indicator on status line
May as well show a deafness indicator.
2016-01-12 23:43:28 -05:00
PatR
04c39f9e91 silly thing bit
Simplify some conditionally excluded, obsolete but not yet
discarded code.

This is something else I thought I'd checked in a long time ago.
I must have clobbered pending changes to invent.c at some point.
2016-01-12 18:00:43 -08:00
PatR
7e01237dce getobj() magic marker candidate items
When applying a magic marker, only list known blank scrolls and known
blank spellbooks as likely candidates to write on.  Accepts any scroll
or book (but non-blank ones will get rejected by the writing code).
Attempting to choose some other class of item yields "that is a silly
thing to write on", same as before.

This was requested during beta testing and I'd swear that I checked it
in a long time ago, but it wasn't here.
2016-01-12 17:50:32 -08:00
PatR
a34d327159 bit of X11 reformating
Cleanup up the copyright notice in dialogs.c, and replace some tabs.
2016-01-12 02:20:43 -08:00
PatR
c5db7f57a3 X11 extended command menu
Restore the ability to select extended commands by keystroke.
The key translation stuff had gotten attached to the wrong widget.

When using keys to highlight an entry in the extended command menu,
don't reset the key-by-key handling so quickly.  (On second and
subsequent keystrokes, if you waited more than 0.5 second, the new
key started picking an extended command from scratch rather than
continuing the current one, making it pretty hard to disambiguate
commands which have the same initial letter.  Now the delay
threshold is 2.5 seconds.  In theory that should become a user-
preference resource but I don't think it's worth the effort.)

Display the help choice in response to '?'.

Clean up the formatting of the top two buttons (dismiss + help).

Start with a scroll bar if the menu is too big to fit on the screen.
Prior to this, on OSX, the full menu would be constructed but any
of it that was 'displayed' beneath the bottom of the screen was
inaccessible because it couldn't be dragged higher and couldn't be
resized to get a scroll bar (since the way to resize on OSX is by
dragging the bottom right corner--which was off the screen).

The problems I mentioned recently are still present:  when scroll
bar is present, I can click beneath it and it moves down, but
neither dragging it up nor clicking above it will move it back up.
Fortunately the recently implemented up and down arrows both work,
even after clicking/dragging starts failing.

There was a lot of trial and error involved here.  Most of it
eventually got phased out, but the mystery of 'defaultDistance'
(which is reported to be 0 but is actually 4) remains.  The screen
height stuff at the end ought to be fixed up if someone can figure
out how to get the width of a horizontal scroll bar or the height
of a title bar.  (I'm sure I used to know how to do the latter,
but that was 25 or so years ago, and in Fortran with Xlib rather
than Xt or Xaw....)
2016-01-12 02:15:35 -08:00
Pasi Kallinen
99ee354637 Fix get_count: ^H should go left instead of backspacing a count 2016-01-12 08:20:13 +02:00
Pasi Kallinen
6dd6584e21 Add getpos_coord to fixes file 2016-01-11 21:12:52 +02:00
Pasi Kallinen
0ee5d8ce47 Add getpos_coord option
Allows showing the coordinate when picking a position on the
map with '/' and autodescribe is on.

This is another blind player request
2016-01-11 21:10:51 +02:00
PatR
9cfc0ac5d7 getpos() 'm','M' and 'o','O'
Always include the hero's location in the set of spots for 'm',&c to
cycle through.  This way the set will never be empty so checks for that
can be dropped, and choosing initial index becomes trivial (set to 0,
then increment to reach nearest spot of interest or decrement to reach
farthest).  Also, it makes it easier for player to see when successive
'm's,&c have been through all the interesting locations if there are
multiple monsters or objects clumped near the last one in the cycle.
2016-01-10 14:42:06 -08:00
Pasi Kallinen
c902b44b5b Document fixes 2016-01-10 18:54:35 +02:00
Pasi Kallinen
854fe40609 Fix bz175: Pile mark is shown when potion is destroyed
Original bug report:

> When killing something that's carrying a potion, or death-drops a potion,
> or stands on top of a potion, with a force bolt or a wand of striking,
> "you hear something shatter" or "a potion of foo shatters" but the corpse
> is inverse as if it's (still) a pile.

Unfortunately the newsym() checks for already existing glyph, and
the gbuf doesn't distinguish between object piles and single items,
so newsym doesn't mark the location for update.

This is a dirty hack to force the newsym to update the glyph.
The glyph buffering should be revisited in a future version.
2016-01-10 18:33:41 +02:00
Pasi Kallinen
a8172e1208 Fix unreferenced variable 2016-01-10 18:24:38 +02:00
Pasi Kallinen
fe01018d90 Enable TIMED_DELAY for linux hints files
runmode is completely useless in TTY without this
2016-01-10 15:09:03 +02:00
Pasi Kallinen
c6bf49f647 Small code cleanup 2016-01-10 14:47:06 +02:00
Pasi Kallinen
65d780dc3d Add compile-time option MSGHANDLER
This was a feature request from a blind player; he wanted to
play a sound whenever a pline message was given.
2016-01-10 13:08:20 +02:00
Pasi Kallinen
e7d65a44cd TTY: Add compile-time option for tile data hinting
Several people have asked if 3.6.0 supports playing with tiles on
a public server. Because there's no way for the user's end to know
what that white @ is, this adds special console escape codes for
tile hinting.

The idea was originally a patch called TelnetTiles by Justin Hiltscher,
but this expanded version comes via NAO, where it's been in use for years.

This is basically an interim hack, which should go away when/if
we support actual client-server model.
2016-01-10 10:53:15 +02:00
Pasi Kallinen
653f75edc1 Add missing variable init 2016-01-10 10:09:56 +02:00
PatR
e1f8deb63f tribute: Mort 2016-01-09 18:17:15 -08:00
PatR
3a8ce3ff98 fix #H4083 - globs preID'd as "uncursed"
I think there was also a report about this during beta testing.
Killing an ooze, slime, or pudding left a glob of same which had its
bknown flag pre-set so was immediately shown as "uncursed" even to
non-priests.  Use another way to maximize glob mergability:  allow
globs to merge even when one has bknown set and the other doesn't.
2016-01-09 15:28:25 -08:00
PatR
7e3f82ed3c fix #H4187 - doppelgangers posing as Riders...
... never transform and can leave Rider corpses

Riders can't be polymorphed, and the code to prevent that was also
preventing doppelgangers in Rider form from changing shape.

Using ring of protection from shape changers effectively turned such
doppelgangers into actual Riders which would leave self-reviving
corpses.  That didn't prevent Riders from appearing on the Astral
Plane though.
2016-01-09 13:57:15 -08:00
Pasi Kallinen
1e1557ed46 Add extended command #kick
I've seen some complaints about not being able to kick with ^d
so add kick as an extended command.

Also add the missing #exploremode command to the Guidebook.
2016-01-09 13:39:47 +02:00
Pasi Kallinen
7e4e9f263a Update fixes 2016-01-09 13:16:43 +02:00
Pasi Kallinen
ff4a59ef23 Fix bz258: Covetous monsters malfunction when there are no upstairs
Make the monsters pick downstairs/ladders if the branch builds up
(like Sokoban), otherwise try upstairs/ladders.
2016-01-09 12:07:35 +02:00
Pasi Kallinen
a2a1027be1 Fix bz62: Pets walk into poison clouds
Makes monsters who would be damaged by the poison cloud
not walk into it
2016-01-09 02:25:52 +02:00
Pasi Kallinen
befc6a65b5 TTY: Add menu_overlay option
This was a request from a blind player.  It's hard to find
the left edge of the menu when it's drawn on the map, so
clear the screen and align menus to the left edge of the screen
when this option is turned off.

Originally this was called the window edge patch.
2016-01-08 22:17:40 +02:00
PatR
db234f743d integrate 'msgtype' option and Norep()
Allow 'msgtype=show' for messages that nethack uses Norep() for.
I don't know whether anyone will ever want to do that, but if felt
strange to have two different message suppression mechanisms that
were completely disconnected from each other.

For a user with no msgtype filter, there'll be no difference in
behavior.
2016-01-08 00:38:34 -08:00
Pasi Kallinen
f16e9a8890 Use plain ASCII for the database 2016-01-08 07:55:56 +02:00
Pasi Kallinen
0f5809c924 Add some new database entries 2016-01-07 22:38:33 +02:00
nhmall
8aa0d9e2cc typo spotted 2016-01-07 07:46:20 -05:00
PatR
9fae621778 fix #H4181 - strange death messages
"Petrified by <foo>, while getting stoned." -- multi_reason "while
getting stoned" explains why no last-second recovery could be made,
but doesn't explain how the petrification happened, so suppress it.

"Died of starvation, while fainted from lack of food." -- nethack
does not display this; presumeably the IRC death notices for NAO are
generated from xlogfile entries.  Change 'while fainted from lack of
food' to 'while fainted' at time of death if reason for death is
starvation.  The longer version is accurate but sounds fairly silly.

When starvation is set in motion, set it up before checking whether
the initial faint triggers falling on a wielded cockatrice corpse, so
that fainting isn't applied after recovery in case of life-saving.
2016-01-07 01:53:06 -08:00
nhmall
89a1db6480 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2016-01-06 21:04:37 -05:00
nhmall
b48673425e vault Deaf bits 2016-01-06 21:04:05 -05:00
PatR
d8591be858 fix #4138 - 'text bug' for freezing moat
Freezing a moat--unlike other types of water--substitutes the type
of water (because that isn't "moat" for Medusa's level) in the freeze
message but was doing so after changing the affected terrain to ICE,
yielding "The ice is bridged with ice."
2016-01-06 17:57:39 -08:00
nhmall
a2e16cd9e6 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2016-01-06 20:21:29 -05:00
PatR
22685763d1 getpos() for objects
Extend the 'm' and 'M' functionality (move cursor to nearest monster
or farthest monster, respectively, then to next nearest/next farthest
when used successively) to 'o' and 'O' for objects.

'M' was picking the wrong monster (nearest) on first use; now fixed.
Hero is now included in the monster list, and will be the last one
reached if you cycle all the way through in either direction.  (Makes
it easier to tell that you have actually been all the way through.
Unfortunately, objects don't have any seen-'em-all indicator.  Perhaps
the hero's coordinates should go on that list too?)
2016-01-06 16:47:30 -08:00
PatR
c8cd550a5a get_count() cleanup
Fix several warnings.  Accept ASCII RUBOUT (aka DELETE) in addition
to backspace.  [Should use erase_char (and add support for kill_char)
but that means pushing get_count() into the interface code.]  Guard
against user causing the count to wrap if someone ever adds a call to
get_count() which doesn't specifying a maximum value.
2016-01-06 15:37:46 -08:00
Pasi Kallinen
5d1281c9ac Make getpos monster targeting use glyph lookup 2016-01-06 21:42:45 +02:00
Pasi Kallinen
50359a3552 Fix possible lev_comp segfault when map was too tall 2016-01-06 19:49:38 +02:00
Pasi Kallinen
c8d0b04c74 Make the raven medusa level shortsighted
This prevents all of the ravens mobbing the player immediately.

Change via Dynahack by Tung Nguyen
2016-01-06 18:54:56 +02:00
Pasi Kallinen
caf872be05 Allow knife and stiletto as possible tin opening tools
Via Dynahack, original idea from K-mod by Karadoc.
2016-01-06 18:41:13 +02:00
Pasi Kallinen
0a25502593 Fix weight of containers in lev_comp 2016-01-06 18:25:50 +02:00
Pasi Kallinen
785aba242a Fix the mtrack memset 2016-01-06 18:15:04 +02:00
Pasi Kallinen
c2ceb88d3c Make vault guard accept names starting with number
Fix via Dynahack by Tung Nguyen
2016-01-06 17:28:45 +02:00
Pasi Kallinen
c740425a90 Use define for iron ball weight increment 2016-01-06 16:23:48 +02:00
Pasi Kallinen
da0e660110 Poison breath leaves a trail of poison gas clouds
Original patch by L
2016-01-06 16:05:43 +02:00
Pasi Kallinen
237c4a2787 Allow dissolving iron bars with potion of acid
Force-fight iron bars with wielded potion of acid to dissolve them

This change comes via UnNetHack by Patric Mueller.
2016-01-06 15:49:06 +02:00