Commit Graph

5659 Commits

Author SHA1 Message Date
Pasi Kallinen
5ccfd34328 Allow picking a used inventory letter from menu when #adjusting 2016-01-06 14:05:24 +02:00
Pasi Kallinen
4c016853d4 Unify getting a count into single function 2016-01-06 13:54:09 +02:00
Pasi Kallinen
1bc05714b5 Fix bz66: Count number cannot be backspaced
... or at least partially fix it - ^H does now backspace.
I can't be bothered to dive into the (n)curses raw-mode stuff.
2016-01-06 11:50:10 +02:00
PatR
fbdeaae286 tribute: Equal Rites revisited
The number of passages felt a little light, so split one of the
long-ish ones into two.  The punchline that now ends the first one was
being watered down by continuing the text, and an interesting bit that
was left out can be added to finish the second part.  They both lose
some context but I think they work ok separately.
2016-01-06 00:45:46 -08:00
PatR
e6fa0ce809 provisional fix for bz239 - '[tty] Enter key...'
'... inconsistency in character creation menus'.

During role selection, the final 'is this ok?' menu has 'yes'
preselected so accepted <return> or <enter> to answer yes.  The
pick-role, pick-race, &c menus prior to getting to that stage didn't
have a default, so using <enter> meant nothing was chosen, and choosing
nothing was treated as a request to quit.  This changes that so it's a
request for 'random' instead.

'Provisional fix' because it ought to do this by making 'random' be a
pre-selected menu entry so that the default choice is visible.  But
that takes more effort than I'm inclined to expend on this.
2016-01-06 00:07:54 -08:00
PatR
cb4bb72631 fix getpos() m,M to move to next monster
Fixing a couple of warnings led to discovery of a couple of real bugs.
Warnings:
1) -Wshadow warning for 'dist2' variable blocking access to dist2()
   function.
2) Declaration not at top of block not allowed for C89/C90 (let alone
   for pre-ANSI).
Bugs:
3) there might be 0 visible monsters, in which case the code prior to
   qsort will call alloc(0).  I think ANSI requires malloc(0) to return
   a unique pointer which can be freed, but pre-ANSI malloc might
   return Null to satisfy it, leading to panic from nethack's alloc().
4) visible monsters in direct line with hero horizontally or vertically
   were unintentionally skipped when collecting monster locations.

I think looking at monsters is the wrong way to implement this.  It
should be scanning the map for monster glyphs instead.  (Coin toss as
to whether it should also treat statues-shown-as-monsters as if they
were monsters while doing this.  I'm leaning towards yes.  And what
about warning glyphs and instances of the remembered-invisible monster
glyph?  They aren't interesting to look at but they might provide a
shortcut to positioning the cursor near something else.)

Using '^' to move to next trap moves from hero's position to end of
hero's line, then columns 1 to N of next line, and so on to bottom
right, then top left columns 1 to N, second line 1 to N, on down to
hero's line.  Having 'm' traverse monsters from nearest to farthest
feels like a noticeable inconsistency between the two.  Especially if
you move the cursor with direction or topology keystrokes prior to 'm'.
2016-01-05 23:19:14 -08:00
Pasi Kallinen
4aeb2913cf Only requiver pickup_thrown ammo and throwing weapons 2016-01-06 04:58:37 +02:00
Pasi Kallinen
6b559d06f0 Redraw map when hilite_pile is toggled 2016-01-06 04:41:57 +02:00
Pasi Kallinen
4d919b4d1f Update fixes entries 2016-01-06 03:37:35 +02:00
Pasi Kallinen
f314fe87bd Fix unmapped branch stairs on premapped levels
This happens when levelporting to the first Sokoban level in wizard mode
before visiting the level, causing the branch stairs to not appear until
the space it is in comes in sight of the player.

The issue was that levels flagged premapped would cause the special
level coder to call sokoban_detect() before fixup_special() had a chance
to place the branch stairs properly.

Fix from Dynahack by Tung Nguyen.
2016-01-06 03:35:58 +02:00
PatR
de5ed30cd7 fix #H4179 - death reason for rotted globs
'Poisoned by a rotted gray ooze corpse' should have been
'Poisoned by a rotted glob of gray ooze'.

eatcorpse() is called for non-corpse globs and then corpse_xname()
is called for them too to set up death reason for make_sick(), but
it didn't know anything about globs.  Now it does.  Blob size is
ignored since it's not relevant for cause of death.
2016-01-05 17:29:36 -08:00
Pasi Kallinen
ed1c592a9a Remove double defines of hunger states 2016-01-06 03:23:24 +02:00
Pasi Kallinen
31f883da0d Use appropriate place description for drum of earthquake shake
Fix via Dynahack by Tung Nguyen
2016-01-06 03:17:36 +02:00
Pasi Kallinen
2c9ae20c5a Allow quickly moving cursor on monsters
Original patch was mine, but this implementation took
ideas from Dynahack by Tung Nguyen
2016-01-06 03:05:50 +02:00
PatR
d598cf536b fix #H4179 - lava vs boots
Stepping onto lava destroyed water walking boots if they weren't
fireproof but didn't do that for other types of boots unless hero
was not fire resistant and got killed by the lava.  Burn up all
non-fireproof leather boots when stepping onto lava.
2016-01-05 16:17:38 -08:00
Pasi Kallinen
fd709d6840 Clear mimic vision blocking after genocide
Fix via Dynahack by Tung Nguyen
2016-01-06 01:55:39 +02:00
Pasi Kallinen
db4120012d Make mimics mimicing walls or trees also block light 2016-01-06 01:44:18 +02:00
Pasi Kallinen
a049cd070b Never route a travel path through boulders in Sokoban
Change via Dynahack by Tung Nguyen
2016-01-06 01:05:22 +02:00
Pasi Kallinen
e92b80b2ab Requiver pickup_thrown objects if quiver is empty
Change via Dynahack by Tung Nguyen
2016-01-06 00:53:03 +02:00
Pasi Kallinen
192d1bd89e Add mtrack changes to fixes file 2016-01-05 12:59:54 +02:00
PatR
1d097bf0dd tribute: Equal Rites 2016-01-05 02:39:46 -08:00
Pasi Kallinen
e80a9e0daf Make (level) teleporting clear monster movement tracking 2016-01-05 12:32:18 +02:00
Pasi Kallinen
861afbb1c9 Fix bz276,H4172: Fleeing monsters don't actually flee
This fix comes via DynaHack by Tung Nguyen.
2016-01-05 12:09:43 +02:00
Pasi Kallinen
3506062c7d Fix bz270, H4166: Finding a secret corridor shows it unlit with lit_corridor
Also #terrain command with dark_room on showed lit room floor on places with
objects or traps. We don't want to show dark room symbol anyway, because
the dark room symbols are only for line-of-sight, and #terrain should
override that...
2016-01-05 11:14:04 +02:00
Pasi Kallinen
a329d7a6dd Capitalize Linux in guidebook 2016-01-05 09:11:42 +02:00
Pasi Kallinen
ece4407c41 Finish splitting wallification into two 2016-01-05 07:42:28 +02:00
PatR
366043f714 tribute catch-up 2016-01-04 17:30:05 -08:00
PatR
a037c6fc28 tribute: The Light Fantastic 2016-01-04 17:19:56 -08:00
PatR
e8e1673df7 build fix for ck_server_admin_msg()
ck_server_admin_msg() is only available for '#if (UNIX && MAIL)' but
moveloop() tried to call it unconditionally.  Call if from the UNIX
edition of ckmailstatus() instead.
2016-01-04 16:51:24 -08:00
Pasi Kallinen
1e0b16c99d Add the compile-time options to fixes-file 2016-01-04 23:19:49 +02:00
Pasi Kallinen
e9b0fa23d2 Add server admin messaging functionality
It's occasionally important for public servers to notify
all the players. Sending a mail is not reliable, as not everyone
wants to break conduct, or have mail on.

This adds a compile-time defined filename, which NetHack
will monitor. The contents of the file are in the same
format as SIMPLE_MAIL: "sender:message" on one line.
2016-01-04 23:04:59 +02:00
Pasi Kallinen
89e4d5e9fa Add SIMPLE_MAIL compile-time option for public servers 2016-01-04 19:54:36 +02:00
Pasi Kallinen
34b45a2c10 Add an alternative paniclog format as compile-time option 2016-01-04 18:05:16 +02:00
PatR
44a9f1db17 fix reformatting typo in monmove.c
Fix the vault guard error in dochug() discovered by Alex K.  The
behavior of a vault guard ignoring Conflict when confronting the
hero in the vault and escorting him through the temporary corridor
isn't affected.  3.4.3 already behaved that way.  (I didn't track
the cause of that down so don't know whether it's intentional.)
2016-01-03 16:22:22 -08:00
nhmall
3198c3bf79 shk segfault diagnostic workaround but not fix
Changes to be committed:
	modified:   src/shk.c
2016-01-03 11:33:03 -05:00
nhmall
c4d45d6960 make some mextra guard macros available
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/mextra.h
2016-01-03 10:48:47 -05:00
Pasi Kallinen
d1ef006eef Fix bz241, H4143: LoS still blocked after mimic hit by force bolt 2016-01-03 16:27:55 +02:00
PatR
f279a9ec0d fix #H4153 - killed by kicking something weird
Steps to make sure 'kickedobj' didn't end up as a stale pointer
prevented it from being around to format the reason for death when
a kicking attempt was fatal.
2016-01-03 00:36:31 -08:00
Pasi Kallinen
cb574aadcc Split wallification into two by function 2016-01-03 00:36:36 +02:00
Pasi Kallinen
0106901078 Move and reorder ap exc, menucolor and msgtype entries in options
Move autopickup exception, menucolor, and message type entries
in the options menu under "Other settings" -header, and reorders
them into alphabetical order.

Also use enums instead of hardcoded values.
2016-01-02 13:40:53 +02:00
nhmall
8da7375c21 Files update 2016-01-01 22:04:15 -05:00
nhmall
14ce76a159 windows visual studio 2013 build updates 2016-01-01 22:01:25 -05:00
nhmall
adcb7dc202 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2016-01-01 20:37:12 -05:00
nhmall
61148f05bb SYSCF_FILE corrections for windows
Changes to be committed:
	modified:   src/files.c
	modified:   sys/share/pcmain.c

Related to #H4170, bz274

The current startup code seeks out the SYSCONFPREFIX using:
	envp = nh_getenv("COMMONPROGRAMFILES");
which is fine and usually translates to something like
"C:\\Program Files (x86)\\Common Files\\
NetHack then tacks on the NetHack subfolder to the path
"C:\\Program Files (x86)\\Common Files\\NetHack\\"

That should always be the definitive location.

However, in the event that there is no SYSCF_FILE actually
located at that system-wide spot (and ONLY in that event),
fall back to a secondary location of HACKDIR for locating
the SYSCF_FILE.

Also, there's some explicit tweaking added for the Microsoft
visual studio compiler debug execution to all a debug
session to correctly locate things. By default, on a
visual studio build, the executables are linked down in
subfolders of the build directory (Release, or Debug,
depending on visual studio build configuration options).
2016-01-01 20:33:14 -05:00
Pasi Kallinen
8b0ada1d31 Allow scrolling X11 extended cmd menu with cursors 2016-01-02 00:47:10 +02:00
nhmall
c70d466325 wizweight optional
Changes to be committed:
	modified:   include/flag.h
	modified:   include/hack.h
	modified:   src/objnam.c
	modified:   src/options.c
2016-01-01 16:17:46 -05:00
Pasi Kallinen
8e7e79448e Enable scroll bar in X11 menu windows 2016-01-01 21:24:55 +02:00
nhmall
fce9f1131d improve messaging on vampire bat to fog cloud transition in Vlad's
Bug 271 - #H4167: vampires being fog clouds show up as bats on telepathy

A bug reporter wrote:
> In top level of Vlad's, the vampires hiding as fog clouds in the closets show
> up on telepathy as B, when far-looked as vampire bat.  once the door opens they
> are fog clouds.
>
> I currently have telepathy from the PYEC.

The vampire /was/ shapeshifted into a vampire bat, but once the secret door
was revealed, it shifted into a fog cloud in order to pass under the door.

If you were to blast the door with a wand of striking from a distance,
you would have encountered the vampire bat.

This clarifies the situation through better messaging.

--------
Original debug call stack trace:
     NetHack.exe!newcham(monst * mtmp, permonst * mdat, char polyspot, char msg) Line 3140
     NetHack.exe!vamp_shift(monst * mon, permonst * ptr) Line 1598
     NetHack.exe!m_move(monst * mtmp, int after) Line 1219
     NetHack.exe!dochug(monst * mtmp) Line 566
     NetHack.exe!dochugw(monst * mtmp) Line 100
     NetHack.exe!movemon(...) Line 707
     NetHack.exe!moveloop(char resuming) Line 105
     NetHack.exe!main(int argc, char * * argv) Line 105
2016-01-01 11:17:57 -05:00
nhmall
9a5340a3bf windows: fix undefined reference in release build
Changes to be committed:
	modified:   win/win32/mswproc.c
2015-12-31 20:26:47 -05:00
nhmall
4566b2903f windows: PDB files in Debug and Release 2015-12-31 20:16:48 -05:00