Commit Graph

14024 Commits

Author SHA1 Message Date
Pasi Kallinen
36f2dedeb6 Adjust couple therecmdmenu entries
- Don't show attacking a peaceful or tame monster, as
  that is actually swapping places with them - so add that.

- Don't show naming a hostile monster - it's usually not
  wanted, and this way when clicking a hostile monster, the
  only entry is the attack, so will be executed automatically.
  This makes it much more usable.
2022-08-25 18:10:50 +03:00
Pasi Kallinen
51ac21bc88 Make mouse clicklook report only the specific tile
Previously the mouse clicklook mentioned every tile that matched
the character symbol, leading to overload of information and
if playing with tiles, it was mostly useless. Also the most
important bit - the tile info - was last in the text.

Now mouse clicklook only reports the exact tile information
that was clicked on.
2022-08-25 17:17:42 +03:00
PatR
b8f8b170a8 sort #migratemons list of migrating monsters
If there are any migrating monsters, #migratemons offers a chance
to view them; display the list in arrival destination order rather
than the arbitrary migrating_mons order.  Doesn't change the list's
order and doesn't apply to viewing 'c' (mons aimed at current level)
or 'n' (mons aimed at next level), just to 'o' (other, neither 'c'
nor 'n') and 'a' (all migrating mons).
2022-08-24 15:33:35 -07:00
PatR
249f6395c5 bug fix for listing migrating monsters
A typo in the code added to #migratemons resulted in bad output when
listing a subset of migrating monsters if there were any aimed at the
next level.  Didn't affect listing 'a'll because the incorrect code
wasn't reached in that situation.
2022-08-24 14:53:36 -07:00
Patric Mueller
b566574d45 curses: revert accidentally removed code block for #saveoptions 2022-08-24 23:41:31 +02:00
Patric Mueller
2deb119ee0 curses: implement a dialog for the windowborders option 2022-08-24 21:03:36 +02:00
Pasi Kallinen
2da4d92751 Fix room array overflowing into subrooms
If the map is big enough so that makerooms generates the maximum
allowed number of rooms for the level, the last room will "overflow"
into the subrooms array.

The rooms array assumes the last entry has hx = -1, and add_room
changes the next room hx to -1 but because the subrooms array
is right after the rooms array, this change actually touches
the first subroom on the level.

This has been present since who knows how long, but because
the levels are normally small enough, the room limit is never hit.
2022-08-24 21:30:46 +03:00
Pasi Kallinen
48db75fabc Add some hallu monsters 2022-08-24 18:40:27 +03:00
Pasi Kallinen
7c8ccb8ccd Prevent getpos queueing mouse commands
My change to allow binding the mouse buttons made getpos
push the mouse commands into a command queue, so when you
were asked for a map location, clicked on it with a mouse,
you'd first get the expected effect, and then (most likely)
immediately traveled there.

Change getpos to clear the commands bound to the mouse buttons,
and restore the binds afterwards.
2022-08-24 14:21:27 +03:00
Pasi Kallinen
282b2a7bbe Make explosions give feedback message
... even when the explosion doesn't hit anything.
2022-08-24 13:26:44 +03:00
Pasi Kallinen
6766943455 Add boulder pushing to therecmdmenu 2022-08-24 12:53:04 +03:00
Pasi Kallinen
edae8273b9 Explicitly list the random breath types 2022-08-24 10:29:59 +03:00
PatR
f3f5fa8cfd fix mon digest mon conferring intrinsics
Pull request #846 from entrez:  pets got two chances to obtain
intrinsics if they hit for digestion damage (only possible with
engulf attacks).

Closes #846
2022-08-23 18:35:06 -07:00
Michael Meyer
cee6c9a919 Fix: engulf/digest intrinsic granting
Engulfing pets were getting a double chance to get an intrinsic from a
digestion attack, because they got the mon_givit call in mhitm_ad_dgst
and then also the one in mdamagem.

There is a bit of inconsistency here, in that mhitm_ad_dgst requires
corpse creation to grant nutrition, but the non-nutrition effects of
eating a corpse like polymorph, extra health, etc, in mdamagem don't
have any such requirement.  As a result, one of the mon_givit calls
required a corpse to be "created" before granting an intrinsic, and the
other didn't.   In choosing which one to remove, I figured intrinsic
granting is probably closer to those special effects than providing
nutrition (and also putting it in mhitm_ad_dgst is not ideal w/r/t
message ordering: it causes the 'intrinsic granted' message to appear
before the monster kill message).
2022-08-23 18:34:22 -07:00
PatR
422a06f01f black and white ice, sink
When moat and lava use the same screen symbol and color is Off, lava
is rendered in inverse video.  It used to be similar for floor and
ice, but that got broken last year.  Fix inverse ice, and now that
fountain and sink might be same symbol (recent IBMgraphics change),
render sinks in inverse if they match fountains and color is Off.

I started to give sink its own mapglyph flag but then got lazy and
used the same value as ice.  That can be amended if some interface
wants to use some more elaborate distinction than inverse video.
2022-08-23 16:01:35 -07:00
Pasi Kallinen
50b91bdcfa Make sink symbol match fountain in IBMgraphics 2022-08-23 23:36:41 +03:00
Pasi Kallinen
c42e73fd9c Allow binding mouse buttons
Instead of hardcoding mouse button actions, allow the user to
bind mouse buttons to extended commands.  For example the new
defaults are:

BIND=mouse1:therecmdmenu
BIND=mouse2:clicklook

Currently a bit rudimentary; the defaults should be OK, but
documentation is bit lacking, and in-game binding and option
saving are missing.

Allowed commands to bind are "nothing", "therecmdmenu", "clicklook",
and "mouseaction". Clicklook replaces the "clicklook" boolean option,
and mouseaction does what mouse 1 button used to do - a context sensitive
action.
2022-08-23 23:27:21 +03:00
Pasi Kallinen
3a255e86c4 Some lua selection userdata code cleanup 2022-08-23 17:34:29 +03:00
Pasi Kallinen
d39b2f3a23 Remove extra definitions 2022-08-23 16:52:05 +03:00
Pasi Kallinen
4cfefb056a Clear or copy whole selectionvar 2022-08-23 14:39:39 +03:00
PatR
336ecf34c3 docrt()
Replace a few more instances of calling user command doredraw()
when docrt() is meant.
2022-08-23 00:45:30 -07:00
Patric Mueller
4aeb3875e2 Fix some coordxy declarations that should be xint16
By temporarily changing the type definition for each of xint16 and
coordxy to int32_t, the compiler was able to find several places where
the type definitions were wrong.
2022-08-23 09:10:17 +02:00
PatR
8d29733fc4 curses: 'perm_invent' revisited
Redo the fix for using doset(#optionsfull) to toggle perm_invent
under curses.  Move it to curses code and let the core be unaware
of it.  It does the perm_invent update twice when creating the
window for that.
2022-08-22 18:36:53 -07:00
PatR
9541f17126 fix end-of-game DUMPLOG panic
dump_create_nhwindow() has been returning a bogus value.  In the past
that didn't make any difference but after some recent perm_invent
changes, it started triggering a panic when writing the inventory
portion of DUMPLOG.

The changes to invent.c just avoid attempting to create a window that
won't be used.
2022-08-22 14:03:28 -07:00
Pasi Kallinen
4a84fb5b9d Monsters can blind you with a camera 2022-08-22 13:32:12 +03:00
nhmall
25fc7ea2f5 update tested versions of Visual Studio 2022-08-21 11:51:15 -04:00
nhmall
dd791cdcb7 update Guidebook 2022-08-21 10:20:32 -04:00
Pasi Kallinen
a9ca23e8f9 Random figurines are of harder monsters 2022-08-21 13:23:16 +03:00
Pasi Kallinen
2b163d89b0 Rename command to #debugfuzzer, add some z and doc 2022-08-21 12:10:08 +03:00
Pasi Kallinen
fcf5c1ea50 Monsters see and remember when others trigger traps
No longer will there be a conga line of hill orcs stepping into
the same arrow trap one after another.
2022-08-21 11:51:19 +03:00
Pasi Kallinen
953d43f5ac Monster known traps bit twiddling 2022-08-21 11:36:39 +03:00
PatR
96e9534289 error() doesn't return
This will fix some complaints from static analysis.  Note that the
code it complained about wasn't incorrect and that's likely to be
the case of a lot of its complaints.
2022-08-20 15:42:04 -07:00
Pasi Kallinen
b0f3371147 Monsters try to escape from boulder forts
If a monster cannot move, for example because it's being
blocked off by boulders or walls, it will try to escape by some
method - such as a wand or scroll of teleportation.
2022-08-20 21:49:55 +03:00
Pasi Kallinen
54bff58598 Make #wizgenesis ignore debug_mongen blocking
Explicitly creating monsters in wizard-mode should go through
and not get blocked by the debug_mongen flag.
2022-08-20 21:45:26 +03:00
Pasi Kallinen
7ab1ac0a19 Split soldier-finding into separate function 2022-08-20 19:33:53 +03:00
Pasi Kallinen
caaa527d45 Fix some #saveoptions issues
The #name default key was 'N', but that gets bound to #runsoutheast
when not using number_pad. Swap around the default #name key to M-n,
and bind the 'N' to it in commands_init instead.

The number_pad option wasn't getting saved because it has a separate
handler - mark the option as changed even if the value did not change
so it will be saved to the config.
2022-08-20 17:09:23 +03:00
Pasi Kallinen
535eb9327a Fix the corpse taste adjectives
Use proper grammar, and just go with randomized, not fixed by corpse type.
2022-08-20 16:35:31 +03:00
Pasi Kallinen
ac5aadf0e3 Add #fuzzer wiz-mode command
Move the debug_fuzzer boolean out of the full options menu
and turn it into #fuzzer extended command
2022-08-20 08:34:52 +03:00
PatR
c1337773f5 'color' in simple options menu
'color' appears in the simplified O menu for curses, but was not
showing up for tty.  That's because it is hidden when tiles are in
use, and tty has had a bogus value for iflags.wc_tiled_map.

Presence of USE_TILES is not a reliable way to tell whether tiles
are available in a multi-interface binary.  Nor is the setting of
DEFAULT_WC_TILED_MAP from config.h.
2022-08-19 14:54:59 -07:00
nhmall
017ad88d13 grammar 2022-08-19 10:47:52 -04:00
PatR
091c3333e9 \#wizkill fixes
Remove 'I' for remembered, unseen monster if it is successfully killed
as well as when a kill attempt reveals that there is nothing there.

When killing engulfer, don't report it to be "unseen" since hero is
able to recognized it by touch.
2022-08-19 07:35:58 -07:00
nhmall
d5eaee6c2e comment typo fix 2022-08-19 10:13:16 -04:00
PatR
50665d10f2 m #optionsfull
Preceding #options or the key bound to that with m runs 'advanced'
options.  Implement the inverse:  preceding #optionsfull or the key
bound to that with m now runs 'simple' options.
2022-08-19 07:03:35 -07:00
nhmall
8fb6e0be83 fix comment 2022-08-19 10:00:47 -04:00
PatR
e4753f619f document that dochugw() return value is ignored 2022-08-19 06:26:13 -07:00
PatR
26a3a5c1d8 pull request #853 - remove useless 'if'
Pull request from argrath:  offending code is
|  if (function())
|    return FALSE;
|  return FALSE;
so testing the function's return value is pointless.

Closes #863
2022-08-19 06:23:24 -07:00
SHIRAKATA Kentaro
4e3fc4dcb0 remove unnecessary if 2022-08-19 06:22:01 -07:00
PatR
2acdf4333a pull request #854 - 'tname' comment in defsym.h
Pull request from copperwater:  remove duplicate description of
argument 'pname' for macro PCHAR2().

Closes #854
2022-08-19 06:17:33 -07:00
copperwater
df3fc20ed0 Fix: double documentation for 'tilenm' in PCHAR2 2022-08-19 06:16:47 -07:00
PatR
8b40ae6bdd comment typo 2022-08-19 06:12:51 -07:00