Commit Graph

15669 Commits

Author SHA1 Message Date
Pasi Kallinen
48b10a1c8d MSDOS: example hilite_status in default config 2023-10-25 09:50:47 +03:00
Pasi Kallinen
614e6c9d5e MSDOS: implement inverse text attribute 2023-10-24 18:34:15 +03:00
Pasi Kallinen
76471e890b MSDOS: Fix VESA mode text background color 2023-10-24 09:37:36 +03:00
PatR
1a5eaf78e6 probing vs underwater items
When probing is zapped downward while hero is at a water or lava spot
and hero isn't beneath the surface, show any objects 'hidden' by the
water or lava at that spot.
2023-10-23 13:07:15 -07:00
PatR
814a69f061 update a couple of tty perm_invent comments
Gold can be quivered but not wielded, so remove the reference to the
latter.  Inuse-only mode gets passed lamps and leashes when they're
actively used, so remove the reference to that being different from
Qt's paperdoll.  (It is actually different, but not because they
won't be shown as in-use.  The paperdoll only shows one of each but
inventory of in-use items might have more than one of either or both.)
Add a what-if comment to tools_in_use().
2023-10-22 16:44:49 -07:00
PatR
85a5c3125e TTY_PERM_INVENT fix header for empty perm_invent
and reimplement 'sparse' mode (TTYINV=2 or TTYINV=3).

When hero had no inventory except for gold and perminv display mode is
ignoring gold, the header said "empty" when "only gold" was intended.

Sparse mode populates perminv with inventory letters in the unused
slots instead of leaving them blank.  (The core doesn't need to be
aware of that since it doesn't affect what display_inventory() sends
to the inventory menu.)
2023-10-22 08:54:41 -07:00
PatR
b0ab22a4e6 tty build fix
My repository got out of synch and I had a hell of a time restoring
sanity.

The most recent commit included a line in wintty.c that shouldn't have
been there.
2023-10-22 08:50:33 -07:00
PatR
77ae10f566 more TTY_PERM_INVENT, part 3 of 2
Some changes I made while chasing the slots 'A' and 'B' bug.  These
weren't necessary to fix that and I don't think they produce any
change in behavior, aside from making the "Bad window id N" panic
be more specific if it occurs.
2023-10-22 01:38:13 -07:00
PatR
8e37ea26d8 another data.base bit
Change the stalker entry attribution of "H. G. Wells" to "H.G. Wells"
to match the other attributions.  There was once a mixture of both
styles but at some point all the ones with the expected--and possibly
stylistically preferred--extra space got changed to the condensed form.

The sasquatch quote still contains "J. W. Burns", in the text rather
than in an attribution.  I wasn't sure whether it should be changed
so left it alone.  Presumably the source of the quote had that space.
2023-10-21 16:52:09 -07:00
Pasi Kallinen
79496b079a Fix splitting monster being killed twice
Fuzzer encountered "m_detach: monster already detached?"

A monster hit a black pudding that split. The clone was
created on top of a rolling boulder trap, which triggered,
the boulder hit the original black pudding, and killed it.
The dead pudding then retaliated (as the code didn't check
if it was dead) and a passive attack of the other monster
tried to kill the already dead pudding.

I think one of these checks would be enough, but adding the
DEADMONSTER check just in case.
2023-10-21 19:49:49 +03:00
Pasi Kallinen
ff4f81af1b Make rolling boulders hit walls and trees
While testing something else, I noticed rolling boulders
just ignored walls and trees; in normal play this isn't
a problem - but should probably make boulders handle other
terrain too.  Lava and water is already handled correctly.
2023-10-21 18:42:43 +03:00
Pasi Kallinen
9ea4a3a329 Don't set getdir_click unless we've requested it
This allowed eg. throwing the iron ball anywhere on the map,
by first throwing something else, using the "simulated mouse click"
to select any map location, and then throwing the iron ball and
also using the mouse click feature to select any location.

Currently the only function that actually uses the simulated
mouse click feature is #therecmdmenu
2023-10-21 16:13:22 +03:00
Pasi Kallinen
69a4853851 Fix "no monster to remove" when tame nymph attacked
A tame nymph attacked another monster, stole an item and teleported
away, but dog_move() wasn't passed the information that the nymph
was done, and tried to move the nymph from the old location.

Same with a tame leprechaun.
2023-10-21 16:05:15 +03:00
PatR
f7e5437746 fix #K4019 - "can not"
Report suggested that "can not" should be "cannot".  Both forms are
acceptable.  This switches them to use contractions for various "You
<verb> not subject" phrases:  "You can't subject", "hadn't", and so
forth.  Not exhaustively tested; there may be some sentences where the
informal contraction makes things worse rather than better.

The goal here was compactness rather than efficiency since the code
involved doesn't execute very often.
2023-10-21 03:40:56 -07:00
PatR
a2f80a611a TTY_PERM_INVENT fix, part 2 of 2
The problem with tty perminv slots 'A' and 'B' boiled down to
  slot_limit = SIZE(slot_tracker); /*54*/
  ...
  /* blank out unused slots */
  for (slot = 0; slot < slot_limit; ++slot) {
    ...
    row = (slot % rows_per_side) + 1; /* +1: top border */
    side = slot < rows_per_side ? 0 : 1;
    ttyinv_populate_slot(row,side,...);
  }

Unused slots [52] and [53] (available for show_gold mode to display
"$a..zA..Z#", not filled with inventory for normal tty perm_invent
"a..zA..Z") yielded rows 1 and 2, side 1, so clobbered slots 'A' and
'B' with blanks.

This is a subset of the changes I was working with and didn't get as
much testing as the full set.
2023-10-20 22:52:38 -07:00
PatR
d96bd6e728 TTY_PERM_INVENT fix
This fixes one of the two problems I encountered while testing tty
resize changes:  'perm_inv' wouldn't work in a new game, whether set
via config file or via 'm O', but would work if enabled (via either
method) during a restored game.

The problem with nothing appearing in the invent window's 'A' and 'B'
slots (top of right-hand panel) is still present.  Earlier I had
assumed that 'A'..'Z' were all nonfunctional but slot 'C' works (and
is shown in the expected place).  That's slightly more mysterious....

Testing is difficult because I have to switch to a teeny tiny font in
order to give the terminal window enough lines for TTY_PERM_INVENT to
allow 'perm_inv'.
2023-10-19 22:39:18 -07:00
PatR
a31be02350 more wand of probing enhancements
Recent changes to wand of probing cause it to map unseen terrain when
zapped into the dark (or while blind) and also to reveal tin contents
if the beam hits such.  Extend that to discover secret doors, secret
corridors, and traps whether the spot can be seen or not, and also to
reveal egg contents.  Previously, secret corridors were converted into
regular corridors when they couldn't be seen but left as is if their
spot could be seen; now they're found and converted either way.

Issue the kaboom sound effect if zapping a magical trap with wand or
spell of cancellation causes it to go "Kaboom!"

A couple of chunks of code has been moved out of zap_updown() and
bhit() into new routine zap_map().
2023-10-19 00:28:19 -07:00
nhmall
4aa0bf4a09 MSYS post-compiler fix 2023-10-17 19:54:15 -04:00
PatR
d1c11903cf data.base entry for athame
Separate the old generic text for athame from the new quote with an
empty attribution line.  Reformat both the old and new portions so
that they won't their widths won't be so different from each other.
2023-10-17 00:04:30 -07:00
PatR
9021aa9ec0 minor data.base cleanup
The new entry for 'shade' had "acrossthe" run together on the first
line.  While fixing that, I changed that entry to use two-space
separation between sentences and did the same for 'shield'.

I also made indentation for various attribution lines (new necessarily
new ones) be more consistent (two tabs, for for the data file format
and one for indentation, unless the line is wide-enough to warrant
shrinking the second tab) but burned out before getting very far with
that.  Also removed line split between "Dante" and "Alighieri" in a
couple of places.  Shouldn't split a name unless other alternatives
are worse...
2023-10-16 16:50:29 -07:00
nhmall
42348ac299 recent sound addition bit 2023-10-16 09:11:05 -04:00
Pasi Kallinen
72016b1f17 Don't iterate over off-map monsters 2023-10-16 11:28:01 +03:00
PatR
00f45d62ae data.base lookup for inventory item actions
Simplify the code that checks whether '/' should be included in an
inventory item action menu.  Initially it was overloading the
'supplemental_name' argument to provide an alternate return value and
when that was discarded, some of the convolutions it needed stuck
around.  Since there was no primary return value, just switch to that.
2023-10-15 15:04:07 -07:00
PatR
006d97e5c8 github pull request #1108 - new data.base entries
Pull request from NullCGT:  a lot of new data.base entries.  Over 20
separate commits; this time I didn't squash them together because I
didn't want to mess with their log messages.

Three had non-ascii characters where apostrophe or single-quote or
long dash are intended.  _The_Invisible_Man_ for stalker was the worst
offender.  While fixing those, I changed period followed by single
space when separating sentences to period followed by two spaces but
didn't do that for the other new entires.  A few had trailing spaces and
one existing entry had trailing tabs.  I've fixed up those situations.

The ice box quote is out of whack with everything else due to wider
lines but the capitalization indicates that it's from a poem that was
formatted that way.  I left it as is instead of splitting several of
the lines.

The conical hat entry is iffy since nethack's conical hat is not a
wide-brimmed witch's hat, but I've left it in.  Likewise helm of
brilliance says that it's made of steel but nethack's is now crystal.

Closes #1108
2023-10-15 01:39:40 -07:00
Kestrel Gregorich-Trevor
502c66f5e3 Add encyclopedia entry for helm of brilliance. 2023-10-15 00:07:42 -07:00
Kestrel Gregorich-Trevor
47a25c8abc Looking up custom fruitnames in the encyclopedia.
Looking up a custom fruitname in the encyclopedia will now yield
the encyclopedia entry for "fruit" if another matching database
entry is not found. This preserves the fun associated with naming
fruits after existing objects, while also preventing a failure to
find.
2023-10-15 00:07:42 -07:00
Kestrel Gregorich-Trevor
83344e7568 Add encyclopedia entry for pointy hats. 2023-10-15 00:07:42 -07:00
Kestrel Gregorich-Trevor
1fa0da3948 Match "large rock" for rock encyclopedia entry. 2023-10-15 00:07:41 -07:00
Kestrel Gregorich-Trevor
629e3371b7 Add database entry for white-handed shield. 2023-10-15 00:07:41 -07:00
Kestrel Gregorich-Trevor
ad49757553 Add Demonbane encyclopedia entry. 2023-10-15 00:07:41 -07:00
Kestrel Gregorich-Trevor
820432da08 Replace shade encyclopedia entry.
Sourced from xnethack. Seems like an excellent candidate for
replacement, since the quote gets across what shades are and also
hints at their weakness.
2023-10-15 00:07:40 -07:00
Kestrel Gregorich-Trevor
1a5b0851fc Scroll of punishment encyclopedia entry.
Sourced from xnethack. Added a line so that it will match "punished"
as well as "punishing."
2023-10-15 00:07:40 -07:00
Kestrel Gregorich-Trevor
1ebf96d94e Ensure potion of hallucination matches encyclopedia. 2023-10-15 00:07:40 -07:00
Kestrel Gregorich-Trevor
cdf9e7563c Add hallucination encylopedia entry.
Sourced from xnethack.
2023-10-15 00:07:40 -07:00
Kestrel Gregorich-Trevor
9b899c3eca Add fruit/fruitname encyclopedia entry.
Sourced from xnethack.
2023-10-15 00:07:40 -07:00
Kestrel Gregorich-Trevor
7a61a454d0 Add fortune cookie encyclopedia entry.
Sourced from xnethack.
2023-10-15 00:07:39 -07:00
Kestrel Gregorich-Trevor
da5283174d Add dwarvish cloak encyclopedia entry.
Sourced from xnethack.
2023-10-15 00:07:39 -07:00
Kestrel Gregorich-Trevor
236dff24f4 Added dented pot encyclopedia entry.
Sourced from xnethack.
2023-10-15 00:07:39 -07:00
Kestrel Gregorich-Trevor
69fb0b5e65 Add athame quotation.
Sourced from xnethack.
2023-10-15 00:07:39 -07:00
Kestrel Gregorich-Trevor
4dbb930be0 Add fortune cookie quotation.
Sourced from xnethack.
2023-10-15 00:07:38 -07:00
Kestrel Gregorich-Trevor
a138080b33 Remove unneeded engraved bell encyclopedia entry. 2023-10-15 00:07:38 -07:00
Kestrel Gregorich-Trevor
1efdc9fd93 Return strange object entry for strange and glorkum.
If the player is looking up a glorkum in the encyclopedia then
there are probably larger problems at play than a missing encyclopedia
entry.
2023-10-15 00:07:38 -07:00
Kestrel Gregorich-Trevor
9676352cf1 Rectify typo in shield database entry. 2023-10-15 00:07:38 -07:00
Kestrel Gregorich-Trevor
babd9d50cb Encyclopedia: Bells, credit cards, and stalkers.
Replace the encyclopedia entries for bells, credit cards, and
stalkers with those suggested by aosdict. Sourced from xnethack.
2023-10-15 00:07:37 -07:00
Kestrel Gregorich-Trevor
b0a83bbee3 Encyclopedia Entry: Ice Box. 2023-10-15 00:07:37 -07:00
Kestrel Gregorich-Trevor
f5bd695017 Add missing database entries.
This commit adds entries for the following items:
    - Credit card
    - Silver bell
    - Bell
    - Walking shoes
    - Iron shoes
    - Hard shoes
    - Dragonbane
    - Gauntlets of Power
    - Gauntlets of Fumbling
    - Gauntlets of Dexterity
    - Potion of Sickness
    - Splashes of Venom (Various)
    - Shields (Various)

The following monsters also now have associated entries:
    - Stalker
2023-10-15 00:07:37 -07:00
PatR
2476329b2c fix ^ as choice in / menu for tty and X11
It turned out that using '^' as a group accelerator (new behavior for
the 'whatis' command to view traps) already worked for curses and Qt.
Fix that for tty and X11.  I don't know the situation for WinGUI.

Offering any of the menu paging keystrokes as group accelerators
should be avoided if there's any chance that the menu will need more
that one page.  The menu for '/' is short though so losing "^ to go
back to first page" for it isn't an issue.
2023-10-14 17:24:39 -07:00
PatR
1d0e4729bd 'make depend' again
Having source files with the same name in different subdirectories
won't work because their object files would conflict, but don't allow
the failure to be because depend.awk left out the conflicting rules.

No change in behavior from the most recent commit.
2023-10-14 14:36:42 -07:00
PatR
db48b92dd3 avoid redundant unix dependency for tile.o 2023-10-14 13:48:47 -07:00
PatR
ef22d87e26 github pull request #1107 - flipping coins
Pull request from NullCGT:  applying gold from inventory will flip
one coin and report "heads" or "tails".  If impaired, that coin will
be dropped, otherwise it will remain part of the stack in inventory.
Can be done via 'a $' or with context-senstive item action via 'i $ a'.

I've used 'git merge --squash' and 'git commit -C <commit#>' to
flatten four commits into one and it seems to have accomplished what
I wanted, including retaining the log message from <commit#>.

I also changed
|You flip a gold piece.  The gold pieces slips between your fingers.
to
|You flip a gold piece.  It slips between your fingers.
when impaired and applying one from a stack.

Closes #1107
2023-10-14 01:13:24 -07:00