Commit Graph

4413 Commits

Author SHA1 Message Date
nhmall
3db819478f update OS terminology used in some text references 2022-02-04 11:26:14 -05:00
Pasi Kallinen
8f7f598050 Fix mention_walls distinguishing unseen walls from solid stone
Bumping into an unseen wall reported "a wall" instead of "solid stone",
even though you could not know it was a wall when looking at it.

Use the same method when looking at glyphs on the map instead of
the map location type.

Fixes #318
2022-02-04 14:02:18 +02:00
PatR
8a722ea949 Qt: add tool tips to to extended command selector
For the grid of extended commands used to pick one after typing "#",
show a command's description if the mouse hovers over its button.
For once something with Qt was actually easy.
2022-02-03 04:17:30 -08:00
PatR
afe36abdac fixes entry for pull request #665 - mplayer chat
From entrez:  Have fake players respond to #chat via verbalize() rather
than pline() since those responses are spoken.

Closes #665
2022-02-02 11:58:12 -08:00
Pasi Kallinen
2cad4ecec2 Covetous monsters will teleport to downstairs or upstairs
I accidentally swapped the covetous monsters teleport to stairs to heal
but instead of changing it back like it was, now make those monsters
teleport to either upstairs or downstairs - some of them will go up,
others go down.
2022-01-31 19:52:33 +02:00
Pasi Kallinen
218c0d4a3b Stinking clouds block line of sight
... you will also get a message when a seen stinking cloud
or the one surrounding the hero dissipates.

Original feature comes from Fourk, but this version (with some
minor changes) comes from xnethack by copperwater <aosdict@gmail.com>
2022-01-31 19:00:19 +02:00
nhmall
087f3993f7 yet more fixes*.* rename 2022-01-29 22:57:22 -05:00
PatR
d0b69efc10 more fixes*.* rename
nethack 3.0, nethack 2.2, and hack 1.0 did not use a three component
version numbering scheme so their corresponding fixes files shouldn't
do so either.  Change those from fixesX-Y-0.txt to fixesX-Y--.txt.
2022-01-29 15:00:49 -08:00
nhkeni
1647125f89 rationalize extensions in doc directory
rename text files to have .txt extension, etc
    update references to changed filenames
2022-01-29 16:28:06 -05:00
nhkeni
6feb4f09bc enable NH_DATESUB for all .6 files 2022-01-29 16:09:26 -05:00
PatR
a0964615af pull request #624 - Add missing const
git has me really confused right now, first requiring a merge, then
not needing any merge.  Anyway, add pull request #624 which was
unintentinoally closed and then couldn't re-opened.  Now it's been
incorporated so is intentionally closed.

Closes #624
2022-01-29 11:18:26 -08:00
nhmall
b9228bd284 Jan 28 cron daily updates 2022-01-28 10:57:08 -05:00
Pasi Kallinen
c722962713 Cancellation explodes magical traps 2022-01-28 08:30:08 +02:00
nhmall
b50d78231c fixes37.0 entry for pr#661
Makefile.mingw32 and Makefile.mingw32.depend are intended to replace
Makefile.gcc.
To use them:

cd /d/prj/NetHack/src
cp ../sys/windows/Makefile.mingw32* .
mingw32-make -f Makefile.mingw32 clean
mingw32-make -f Makefile.mingw32 depend
mingw32-make -f Makefile.mingw32
Improvements:

Add $(USE_LUADLL) to release lua-5.4.3.dll, instead of link static
lua.lib into .exe files.
Add windres "--target" option, to fix the NetHackW.exe startup problem.
Add "-s" option to $(LDFLAGS) in release mode, to make exe/dll smaller.
Add $(CLEAN_DIR) and $(CLEAN_FILE) to track what to clean.
Remove *.tag, but use "order-only prerequisites" to make directory
before any '.o' is built.
Use make variables and functions to improve readability.
Each project has its own directory to hold object files, to fix the
interference problem between different projects, like NetHack.exe object
files were built with "-DTILES".
Add "-mconsole" option when linking NetHack.exe, to fix that sometimes
GetStdHandle returned with invalid handle error.
Add ".PHONY" statements.
Use "gcc -E -MM -MT" to implement semi-auto "Prerequisites Generating".
2022-01-27 18:40:53 -05:00
Pasi Kallinen
95acaf2989 Falling through a hole or trap door will cause damage 2022-01-25 14:17:43 +02:00
Pasi Kallinen
61f78318a5 X11: Fix map expose area
The stop_row and stop_col were off-by-one in some cases, leaving
black lines on the map when a window on top was closed.
Simplify the calculation by always going one row/col further,
ensuring previously covered area gets redrawn for sure.
This should not affect speed or resource usage noticeably these days.
2022-01-25 11:26:47 +02:00
Pasi Kallinen
0652f7f774 Mindless monsters shouldn't cringe stepping on squeaky boards 2022-01-24 23:13:36 +02:00
Pasi Kallinen
6ed315ecf8 Don't stop running next to a peaceful monster
... unless the monster blocks the way.
2022-01-24 18:45:57 +02:00
PatR
6d67f56eab throttle excessive HP and En gains
The priest/cleric quest provides unlimited wraiths and a player
(not a robot with limitless patience) posting on reddit gave up
building up his character by killing them and eating the corpses
after accumulating 40K HP and 20K En.  (Or something close to that;
I can't get back to the post right now.)  His character might have
been capable of surviving decapitation or bisection.

Make it very much harder to get to 5 digits of HP or En via level
gains after reaching level 30.  If maxhp < 300, new gains will be
capped at 5 extra HP; 300..599, cap is 4; 600..899, cap is 3;
900..1199, cap is 2; and once 1200 is reached, further level gains
will only add 1 HP.  For maxen < 200, extra En is capped at 4;
200..399, cap is 3; 400..599, cap is 2; and once 600 is reached,
further gains only add 1 En.  Note: this only kicks in when gaining
levels while already at level 30.
2022-01-23 17:18:05 -08:00
Pasi Kallinen
a6816824c7 Lua: Pass more data to room contents function 2022-01-23 13:27:00 +02:00
Pasi Kallinen
9d64d135b8 Curses: fix extended command input
The extended command input prompt was behaving in an unintended way:
Typing #a<enter> executed #adjust. Spaces in the entry prevented matching
any command. No error message was given when no command was matched.

Fix all of those, so it behaves more like the tty.

Clean up the tty, curses, and X11 windowport code, so they don't use
the extcmdlist array directly, but query with extcmds_match
and extcmds_getentry.
2022-01-22 14:32:53 +02:00
PatR
6a72e48a40 fix rest_on_space
When rest_on_space is On, assign same function as for #wait to the
<space> key.  When Off, set that key to Null instead.  Binding some
other command to <space> when rest_on_space is Off doesn't work but
I would classify that as something to be discouraged anyway.
2022-01-21 15:51:05 -08:00
PatR
75fed4b92b autodig '>'
This fixes moving in direction '>' while wielding a pick-axe with
the 'autodig' option On.  Attempting to dig assumed size-to-side
activity because u.dz wasn't being set, so the pick-axe was swung at
thin air instead making a pit or turning an existing pit into a hole.

dodown() and doup() should probably call set_move_cmd() instead of
manipulating u.dz directly.  But they would also need to suppress
g.move_attempting or the game says "you can't get there from here..."
after successfully digging or plunging into a pit.
2022-01-21 14:27:21 -08:00
PatR
182abe6b60 wet towel tweaks
When hitting with a wielded wet towel, use "you lash <mon>" like
bullwhip.  If you continue with the towel after it has dried out,
message reverts to ordinary "you hit <mon>".

Enhance damage slightly and double the wetness bonus when target
is an iron golem.  Damage was (tmp=rnd(1..7), max(tmp,6)); now it's
rnd(1 + 1..7) for other monsters, rnd(1 + 2*(1..7)) for iron golem,
with no cap of 6 for either.

Sequencing:  defer "your towel dries" until after the lash message.
2022-01-21 11:38:21 -08:00
PatR
76df2ffcf5 slippery fingers
When the hero has the Glib condition, ^X reports "you have slippery
fingers" or "you have slippery gloves" but self-probing (either wand
or stethoscope aimed at self) was reporting "you have slippery hands."
Change self-probing to match enlightenment for this.
2022-01-20 16:31:34 -08:00
PatR
aaa49e3e96 fix #K3520 - typo in dry_a_towel()
Message shown when hero sees a monster's wet towel become less wet:
"<Mon>'s {moist|wet} towel drie[ out]."  Corresponding message for
hero's towel spelled "dries" correctly.

Reported for to-be-3.7 but present since 3.6.0.
2022-01-19 00:58:08 -08:00
PatR
9f6f6c1250 fix #K3518 - "WHAMMM!!!" vs deafness
Kicking a door can produce "WHAMMM!!!".  "Wham" doesn't necessarily
imply any noise but there's a strong suggestion that it does, so a
deaf hero shouldn't be able to hear it.  Give alternate feedback,
"Thwack!!" when deaf, and sometimes give that even when not deaf.

Also tone down "WHAMMM!!!" to Whammm!!".
2022-01-18 14:13:56 -08:00
PatR
f420b9672f Qt: more '#' support
Add an entry for running an extended command to Qt's 'game' menu.
2022-01-17 14:38:16 -08:00
nhw_cron
9cca0d88d8 This is cron-daily v1-Jan-11-2022. 005guidebook updated: doc/Guidebook.txt 2022-01-17 12:51:40 -05:00
nhw_cron
d781c4172e This is cron-daily v1-Jan-11-2022. 001datesub updated: ./doc/Guidebook.tex ./doc/Guidebook.mn 2022-01-17 12:51:25 -05:00
Pasi Kallinen
2e144e814d Change repeat into extended command 2022-01-17 17:13:59 +02:00
nhw_cron
8fa1e1ffa6 This is cron-daily v1-Jan-11-2022. 005guidebook updated: doc/Guidebook.txt 2022-01-16 12:59:47 -05:00
nhw_cron
0f12d6db39 This is cron-daily v1-Jan-11-2022. 001datesub updated: ./doc/Guidebook.tex ./doc/Guidebook.mn 2022-01-16 12:59:33 -05:00
Pasi Kallinen
e7fa065203 Change special keys into extended commands
Changes most of the special keys used in the main input loop
into extended commands:

- movement keys are now bound to extended commands, eg.
  #movewest and so on.

- m-prefix is now #reqmenu extended command, still bound to
  the 'm' key.

- run, rush, and fight are now extended commands, still bound
  to the same keys as previously.

- nopickup and runnopickup keys are removed.
  Nopickup was using 'm' key, the same as the m-prefix, so
  allow #reqmenu to modify movement commands to disable pickup.

- multiple prefix commands are allowed. This lets user to
  use #reqmenu, followed by #run, followed by movement to simulate
  runnopickup behaviour. (If necessary, adding runnopickup back
  as an extended command would be easy)
2022-01-16 14:48:24 +02:00
PatR
689aed55ca remove unused roles[].femalenum, races[].femalenum
and rename {roles,races}[].malenum to {roles,races}[].mnum.

Pull request #653 from entrez.  Male and female player character
monsters are no long separate even when their title's differ and all
the entries for femalenum in the roles[] and races[] arrays were set
to NON_PM (meaning not used in this case).

The update in the pull request overlooked win/Qt/qt_plsel.cpp which
had four references to .malenum so this is more than just the fixes
entry.

Closes #653
2022-01-14 14:09:00 -08:00
PatR
c954c267c0 fixes entry for unpaid_cost regression fix
Pull request #654 from entrez:  the change to avoid impossible
"unpaid_cost: object wasn't on any bill" when examining inventory
while in a wall shared by multiple shops didn't work correctly for
shop-owned objects inside hero-owned containers (which worked prior
to that change).

Not fixed, and possibly not going to be:  if a hero-owned container
holds items from more than one shop, the cost appended to those items'
inventory entries might show the wrong amount if the relevant code
picks the wrong shk.  Presumably the wrong amount can also happen if
player puts items from one shop into a container owned by another
shop.

Closes #654
2022-01-14 13:33:17 -08:00
PatR
6d6a266eed fixes entry for flyers 'swooping' down levels
Pull request from entrez:  flying hero who uses a hole or trap door to
move down to a lower level shouldn't fall to the floor when arriving.

Closes #655
2022-01-14 12:59:46 -08:00
PatR
5c14f3e81d fix #K3514 - unpaid_cost() impossible
Fix the reported bug of using Passes_walls to carry an unpaid item
from inside a shop into the wall it shares with another shop
producing a situation where examining inventory issued an impossible
"unpaid_cost: object wasn't on any bill" when trying to append the
cost to the formatted inventory line.  u.ushops[], u.ushops0[], and
others are lists that can have up to four entries and the relevant
code was only checking the first one.

Not mentioned in the report:  continuing another step into the other
shop didn't get recognized as robbing the first shop, for a similar
reason.

For either of these bugs, digging a breach in the wall, paying off
the miffed shopkeeper, then stepping into the breach before it gets
repaired will probably trigger the same results without the need for
polymorphing into a xorn or earth elemental.  But not on the tourist
goal level test case since walls there are undiggable.

I didn't go looking for other instances of not checking all relevant
shopkeepers.  It wouldn't surprise me if there are some more.
2022-01-11 23:32:13 -08:00
nhmall
0dd5d69da9 Guidebook.txt update from cron job 2022-01-11 17:38:46 -05:00
nhw_cron
ce3923e208 This is cron-daily v1-Jan-11-2022. 001datesub updated: ./doc/Guidebook.tex ./doc/Guidebook.mn 2022-01-11 17:37:18 -05:00
Kenneth Lorber
3a4cee5955 Enable automated date generation on the Guidebook source files. 2022-01-11 15:39:20 -05:00
PatR
ffeb0e27a8 fix recent Wounded_legs fix
Wounded_legs was changed from (HWounded_legs || EWounded_legs) to
just (HWounded_legs), but when the timeout code decremented the timer
to 0, HWounded_legs became 0 and heal_legs() operated as if there was
nothing to repair and hero didn't recover from temporarily lost Dex.
Change Wounded_legs back to (HWounded_legs || EWounded_legs).
2022-01-11 10:25:50 -08:00
PatR
1069777bc6 Qt player selection dialog
During role/race/gender/alignment selection, when gender gets toggled
replace the gender-specific role titles and their icons to reflect
new gender value.  And enable or disable Valkyrie choice depending
upon the gender value, not just current race value.

This ended up revising a lot of the NetHackQtPlayerSelector code,
eliminating some redundancies and being more careful with the use of
validrace()/validgend()/validalign().  That still isn't bulletproof.

It also changes the two instances of buttonPressed that were drawing
Qt6 warnings from connect() at run-time with buttonClicked.  That
works as intended with Qt5 and might eliminate those.

The code to use female player character tiles looks correct to me
but when I toggle gender, role titles change but their icons don't.
I don't know what's going on here.  Some ealier code always specifies
MALE but that code isn't used according to various prints to stderr
that I temporarily inserted.
2022-01-10 13:23:09 -08:00
SHIRAKATA Kentaro
a2a40c6b0b fix typo in Guidebook.tex 2022-01-10 21:36:16 +09:00
PatR
88d2c8ae24 parsebindings() vs commas
The set-but-not-used warning for 'ret' revealed an actual bug this
time.  Parsing sysconf cares whether any errors were encountered
when parsing its contents, but BINDINGS=key1:cmd1,key2:cmd2 only
returned the result of the first key in the comma-separated list
because the result from recursive calls was lost to the set-but-
not-used variable.  Just adding use of that variable would have
ended up reporting success if any key bound succesfully rather than
requiring that they all do as sysconf parse handling intends.

Also, binding comma to a command required that it be specified by
its numeric value because parsing via recursion ate up the actual
commas.  Now allow "BINDINGS=,:cmd" or "keyM:cmdM,,:cmdN" or
"BINDINGS=\,:cmd" or "keyM:cmdM,\,:cmdN".

It also recognizes "BINDINGS=',':cmd" and "keyM:cmdM,',':cmdN" but
that yields an invalid key error for "','".  I thought txt2key()
supported that but it doesn't.  I've left this in because the error
about ',' not being recognized as a key seems better than one about
"'" not being a valid key bind and then accidentally binding single
quote via post-comma "':command".
2022-01-08 12:32:49 -08:00
PatR
86343af200 Qt: force 'toptenwin' option On
'toptenwin' defaults to false, so the high scores list at end of game
gets written to stdout by default.  stdout might be a bit bucket if
the game is started from a menu somewhere or from Explorer or Finder
or something comparable.  Even when started from a terminal, writing
to stdout is bad if running asynchronously ('nethack &').

Have Qt init force the 'toptenwin' option to true to show the high
scores in a pop-up text window.  The "since you were in wizard mode
your score is ignored" line also goes to a pop-up text window now too.
An extra <return> is needed to dismiss that when quitting if you go
through the full disclosure sequence.

'nethack -s' writes scores to stdout before interface initialization
takes place, so isn't affected by this change.  That's intentional so
that 'nethack -s > ~/myscores' can be used to capture the output.
2022-01-06 12:25:17 -08:00
Pasi Kallinen
c300f9f084 Fixes entry 2022-01-06 14:34:33 +02:00
PatR
f4b30e872e fixes entry for PR #651 - single-char engraving
Pull request from vultur-cadens:  when engraving with a weapon, the
occupation routine doesn't dull it on the last character, so engraving
a single character never dulled the weapon.  Didn't apply to engraving
with other types of items.

Closes #651
2022-01-06 01:44:45 -08:00
PatR
9d34b727e2 Qt: more ant extermination
After the fairly recent glyph changes, the icons shown for roles and
races during the character selection dialog all were all depicted by
the giant ant tile.  I might have noticed this sooner but usually
have '-@' on the command line to bypass selection.
2022-01-04 11:54:05 -08:00
Pasi Kallinen
07451ca32c Update lua api docs 2022-01-04 21:29:06 +02:00