Commit Graph

7263 Commits

Author SHA1 Message Date
PatR
d438bf07c8 X11 resource defaults
Some of the items in NetHack.ad were separated from others by "!"
comment line rather than plain blank line and that tended to make it
look like the two items were directly related.  For the ones which
aren't, remove '!'.

I also expanded some comments and reordered a couple of resources,
moving 'slow' closer to top and advanced 'translations' farther down.
2018-11-14 17:18:12 -08:00
nhmall
9130216545 Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-11-14 08:04:40 -05:00
nhmall
6764933413 newline at end of file 2018-11-14 07:51:25 -05:00
Bart House
489abb45f5 Added monitor dpi awareness to NetHackW splash dialog. 2018-11-13 20:48:56 -08:00
PatR
bd4cacbc52 fix #H7536 - pet vampire behavior
Vampires tend to take vampire bat form and stay that way, unless/until
there's a closed door they want to pass in which case they change to
fog cloud form.  Those shifted forms are weak, so pet vampires tend
not to attack other monsters, and if they don't take damage, they
won't change to vampire form.  So, when comparing relative strength of
self and foe while deciding whether to attack another monster, treat
their own strength in weak form as if in vampire form, making them be
more aggressive.

Hostile vampires shouldn't need any comparable change.  They don't use
relative strengths when deciding whether to attack something.
2018-11-13 16:29:48 -08:00
PatR
a97d0b7270 fix github issue #159 - eating nurse corpses
Fixes #159

The nurse monster definition is flagged to be able to convery poison
resistance when a corpse or tin is eaten, but the post-corpse code
for nurse healed HP and cured blindness then skipped the intrinsic
handling.
2018-11-13 15:05:54 -08:00
nhmall
8e907a0b0f Merge branch 'NetHack-3.6.2-beta01' into win-minor 2018-11-13 13:32:01 -05:00
Bart House
8069659912 Adjust menu item rendering based on monitor dpi. 2018-11-12 22:40:36 -08:00
Bart House
f67e7c0614 Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor 2018-11-12 21:39:05 -08:00
Bart House
4912149ff2 Implemented back buffer rendering to improve fit to screen rendering
quality.
2018-11-12 21:38:32 -08:00
nhmall
16e014b39f Merge branch 'win-minor' into NetHack-3.6.2-beta01 2018-11-12 23:15:13 -05:00
nhmall
d89deb5bf7 Makefile update to reference recently added file 2018-11-12 23:10:42 -05:00
Bart House
0bbc7cb6db Adjust tile size to bounds of text meterics when in ascii mode. 2018-11-12 19:36:08 -08:00
Bart House
3bb759a9ab Started work to support per monitor DPI. Using DPI to scale tiles
appropriately.

Renamed ntassert to nhassert.  (Naming mistake caused by using ntassert
at work).

Re-ordered a few more includes to get window headers included before
nethack headers.
2018-11-12 17:45:22 -08:00
PatR
5c2ff62089 comment tidbit 2018-11-12 11:08:59 -08:00
PatR
1295e7ee28 conflicting countdowns again
Use the make_foo() intrinsic set/reset routines instead of trying
to manipulate the intrinsics directly.  Previous patch left Dex
down by 1 if stoning caused wounded legs to be fixed, and left
delayed killer allocated if stoning cured sliming or vice versa.
2018-11-12 11:02:40 -08:00
Bart House
f3bc4af242 Removing support for Visual Studio 2015 solution. 2018-11-12 09:13:51 -08:00
PatR
53a6ce2c2a conflicting countdowns
I tried 'pick all' in the #wizintrinsics' menu and after 30 turns,
died with "poisoned by a poisoned, while vomiting".  Food poisioning
and/or terminal illness beat the other fatal conditions to the coup
de gras.  However, the final stage of vomiting sets Sick to 0 cure
food poisoning and ends up clobbering the killer reason if Sick is
due to terminal illness.  It's feasible for that to happen without
using #wizintrinsic, so this fixes that, and also a few other
combinations that seemed contradictory:
1) limbs turn to stone during Stoned countdown now cures wounded legs;
2) turn to stone (a couple of turns later) cures vomiting and sliming;
3) turning to slime during Slimed countdown cures stoning.
2018-11-12 02:13:32 -08:00
Bart House
8944235282 Enforced the inclusion of windows headers before nethack headers.
Moved the code page 437 mapping table to winnt.c so that it could be
used in window and console clients.
Added check that fonts support unicode values we use from code page 437.
Use unicode to draw text if font supports it otherwise use ASCII.
2018-11-12 01:58:56 -08:00
PatR
a22175cd99 prayer vs blocked by boulder
Salvaged from an old, unfinished patch.  When checking whether the
hero is trapped by walls and solid rock, adjacent boulders are
evaluated on whether they can be pushed out of the way.  Extend that
evaluation:  (1) two boulders on a spot are pushable if there is a
pool beyond that spot, and (2) boulders can't be pushed diagonally
in Sokoban.
2018-11-11 16:04:45 -08:00
PatR
ab7fb9360e fix #H7065 - clairvoyance shows trap over monsters
and over the hero.  3.6.0's clairvoyance tried to show things in
a non-standard sequence, which was intentional but had unintended
side-effects like the disappearing monsters complained about in the
report.  To make it work as intended would have required --More--
whenever it kicked in, which is much too intrusive when it happens
every N turns rather than when explicitly casting the spell.

Redo it substantially, and give preference to monsters over objects,
objects over traps, and traps over underlying terrain like normal
vision-based display does.  It now detects all monsters within its
bounding box but shows ones which aren't directly in view as
"unseen monster" unless via spell cast at skilled or expert, or at
basic when also having intrinsic clairvoyance.
2018-11-11 14:28:54 -08:00
nhmall
ed70005c9b Makefile build updates 2018-11-11 15:39:13 -05:00
nhmall
e87496b897 merge fluff 2018-11-11 10:48:08 -05:00
nhmall
a0b53ee391 merge 2018-11-11 10:29:52 -05:00
PatR
e486d941ed couple of #wizintrinsic fixes
When #wizinstrinsic was expanded to be able to set any timed attribute,
some that need more than just a timeout counter were left inconsistent.
1) Timed Flying wasn't blocked by levitation, and existing flight
   wasn't becoming blocked by timed levitation.  Also, eventual flight
   timeout wasn't updating the status line, so false 'Fly' condition
   remained shown until a status update happened for some other reason.
2) Setting timer for Warn_of_mon didn't set up any type of monster to
   warn about so wouldn't do anything.  This sets that to grid bug
   unless already set due to polymorph form or artifact that warns.

The end.c portion is just a bit of formatting.
2018-11-10 18:22:38 -08:00
Bart House
26171ed9f5 Ignore .vs hidden folders generated by visual studio 2017. 2018-11-10 20:33:30 -05:00
Bart House
20e8482e6e Fix crash that can occur when panic is called early. 2018-11-10 20:26:20 -05:00
Bart House
0a3f6d17df Removed the defining of WIN32CONNDEBUG for NethackW.
Defined NOTTYGRAPHICS for NethackW.
2018-11-10 20:25:49 -05:00
PatR
e8a8f142ae otransit_msg() fixes
Fixes #156

githib issue #156 complains that "The Excalibur falls down the stairs,"
is using poor grammar despite the fact that the usual drop message is
"You drop the +0 Excalibur."  I agree.  Change it to be "Excalibur
falls down the stairs."  (Drop message remains unchanged.)

While looking at that, I noticed that when knocking other items down
stairs, text was being appended to the formatted object name.  It was
probably safe due to the space reserved for inserting a prefix while
formatting an object's name, which becomes available for a suffix
after that name has been copied into otransit_msg()'s local buffer,
but using a separate buffer is safer.
2018-11-10 01:37:23 -08:00
PatR
8551df2a7a impossible worm_cross non-adjacent location
Attempting to mount a long worm tail could yield
\#ride -> mount_steed() -> test_move() -> worm_cross() ->
impossible("worm_cross checking for non-adjacent location").
2018-11-09 15:43:50 -08:00
PatR
91f973306b build and bug fixes for USE_OLDARGS
New:  call to panic() in impossible() used arbitrary string as a
format so was vulnerable to percent signs in that string.  (This
potentially serious problem is not limited to USE_OLDARGS.)

Old:  revised message string for impossible ("save/restore might fix
this" instead of "perhaps you'd better quit") passed wrong number of
arguments to pline() when using the clumsy VA_PASSx() mechanism (was
missing arg 0 for the fixed-arg format argument).

Old:  varargs config_error_add() in files.c wouldn't compile for
USE_OLDARGS.  Evidently no one has been impacted by that but this
fixes it anyway.  (Two problems:  prototype used FDECL() when it
should have been using VDECL(), and calls to config_error_add() in
the same file would need the VA_PASSx() stuff to force presence of
all optional args.  I moved it instead of adding the latter.)
2018-11-08 15:33:03 -08:00
Pasi Kallinen
f9f1236f26 Fix some buffer underflows 2018-11-08 21:02:24 +02:00
Pasi Kallinen
afd793e9b7 Fix memory leak in makedefs 2018-11-08 17:38:36 +02:00
Pasi Kallinen
0bb6754998 Fuzz testing debug tool
Add code to run a fuzz tester, simulating (more-or-less) random
keyboard mashing. There's no option to turn it on, you need to
set iflags.debug_fuzzer on via a debugger or something along
those lines.
2018-11-08 15:55:49 +02:00
PatR
4f541fe216 ^X about armor
Enlightenment feedback for "nudist" was added 3.5 years ago.  Ever
since, ^X has been reporting "you are not wearing any armor" when
wearing a shield without any other armor.

Since Valkyrie starts in that situation, it's very surprising that no
one ever noticed 'til now (or did notice and didn't bother to report).
2018-11-07 14:50:44 -08:00
nhmall
359b59753f fixes update for odd wording 2018-11-07 17:08:41 -05:00
nhmall
6fb2000feb fix odd wording "The boulder triggers and fills a pit" 2018-11-07 17:06:45 -05:00
Pasi Kallinen
75f6001afc Report insanities via impossible 2018-11-07 18:50:09 +02:00
Pasi Kallinen
c6ade9c715 Prevent out of array index 2018-11-07 18:39:00 +02:00
nhmall
0fb263ea88 fix broken build cause by missing semicolon 2018-11-05 15:33:02 -05:00
Pasi Kallinen
e8eadac3c8 Feedback on trying to pick up stairs or altar 2018-11-05 18:35:20 +02:00
PatR
f68883beb3 removing all items via 'A' when looting container
Followup to 'fix #148' patch:  looting a container with menustyle:Full
wasn't offering a chance to remove everything in one go.  That was due
to an error I introuduced 2.5 years ago with commit
529dad8ef1 when I changed how the flags
passed to query_category() were being set up.  It accidentally switched
'A' from take-out to put-in but the only code to handle 'A' at that
time would take everything out (from container to inventory).

Prior to that, removing everything worked as intended and putting in
everything wasn't supported.  Now 'A - autoselect all' is a viable
choice for both in and out.
2018-11-03 23:17:49 -07:00
PatR
6002db106c fix github issue #154 - #loot in A-autoselect all
Fixes #154

With menustyle:Full, picking 'A - autoselect all' when putting items
into a container ran code for taking things out and there wasn't any
corresponding code for putting things in.

Add some put-in-everything code.  Taking things out doesn't offer
'A - autoselect all' as a choice so the code mentioned above may now
be dead.  Taking everything out seems like something that's much more
likely to be desired than putting everything in.
2018-11-03 17:45:31 -07:00
PatR
9ca519d9f7 yet another ^X revision...
Hopefully this will be the last one.  Change from a text window to
a menu so that it is possible to scroll backwards (without needing
scrollbars) via '^' and '<' keys.  End of game disclosure for
attributes still uses a single-forward-pass text window.

Also, move the recently added weapon proficiency line from the new
'basic' section to right after the "you are wielding" line at the
end of the 'status' section.
2018-11-03 02:01:11 -07:00
Pasi Kallinen
d7c042eb80 Make Mjollnir lightning noisy 2018-11-02 20:49:11 +02:00
PatR
89a3f4a3fd ^X again
Add a new line for one last missing status field:  gold.
Also add one for proficiency with current weapon.

Move a few lines from 'characteristics' to 'background' and a few
more from 'characteristics' to new 'basics', leaving characteristics
with the six original characteristics:  Str, Con, Dec, &c.
2018-11-02 00:59:01 -07:00
PatR
3e8f199a9f fix #H7501 again - searching
Previous change resulted in 'finding' visible monsters.
2018-11-02 00:41:33 -07:00
nhmall
4e98337abc grammar 2018-11-01 21:04:23 -04:00
PatR
ac81022eed fix #7501 - searching while blind
My "fix github issue #38 - indentation vs 'if {}'" patch, commit
d2ae45984e, broke finding unseen
monsters via searching.  Most notable if blind, but applied to
invisible monsters too.
2018-11-01 17:37:47 -07:00
nhmall
0ea7fbad7a single fixes36.2 entry for special case wish/genocide since release 2018-10-31 09:11:57 -04:00