Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen 7353bf0e69 Message location for monster throwing or shooting at hero 2024-01-04 11:43:13 +02:00
Pasi Kallinen db4a44735e Message locations for Monster creation and teleporting 2024-01-03 10:28:16 +02:00
Pasi Kallinen dc8d9d6cd0 Accessibility: Add location info to messages
Adds a new boolean option, accessiblemsg.  If on, some game messages
are prefixed with direction or location information, for example:

   (west): The newt bites!
   (northwest): You find a hidden door.

I added the info to the most common messages, but several are
still missing it.
2024-01-02 18:59:25 +02:00
Pasi Kallinen 95aceb1722 Remove double boom on cancelling a magical trap 2023-12-31 21:06:56 +02:00
Pasi Kallinen 780d30eca9 Wielded quarterstaff gives a small spellcasting bonus
From NetHack Fourk.
2023-12-31 17:53:03 +02:00
Pasi Kallinen 42a6a5df66 Cursed welded quarterstaff doesn't prevent spellcasting 2023-12-31 17:41:04 +02:00
Pasi Kallinen c2fd027669 Typofix 2023-12-30 23:11:50 +02:00
Pasi Kallinen 073b0c90f3 Recalc mapseen when a special room is entered 2023-12-28 18:58:53 +02:00
Pasi Kallinen 5b5e547791 Restful sleep gives a warning message 2023-12-21 09:41:47 +02:00
Pasi Kallinen 5a60c37676 One more NO_NNARGS bit 2023-12-21 07:50:04 +02:00
Pasi Kallinen 488afffcd7 Fix NONNULL for hitting bare handed 2023-12-20 20:09:50 +02:00
Pasi Kallinen 60dc6343e4 Moving monsters disturb buried zombies 2023-12-20 11:17:23 +02:00
Pasi Kallinen 3c94b276a2 Amulet of unchanging cannot be polymorphed 2023-12-19 17:13:52 +02:00
Pasi Kallinen c0fdb2e8c4 Level temperature affects monster generation
Hot levels generate more fire-resistant monsters, cold
levels cold-resistant ones.
2023-12-18 13:43:41 +02:00
Pasi Kallinen e4026d55fb Lazy evaluation of overview info
Callgrind showed recalc_mapseen was three times more expensive (in terms
of instructions read) than anything else in our codebase.  It was being
called in every vision change, re-evaluating the last seen map terrain
type for every map location in sight.

Remove updating the lastseen info in the vision code, and make a small
change so newsym() uses update_lastseentyp.

From my short tests, this seems to work correctly ...
2023-12-18 10:53:18 +02:00
Pasi Kallinen ea1fdc066a Split lastseentyp updating 2023-12-17 15:43:49 +02:00
Pasi Kallinen 9b8272b57f Split counting mapseen features from lastseentyp 2023-12-17 15:21:37 +02:00
Pasi Kallinen a2aa4edd51 Allow SIGINT (Ctrl-C) to stop the fuzzer 2023-12-17 11:28:13 +02:00
Pasi Kallinen 0a8f919ff3 Make monsters not use camera when hero resists blindness 2023-12-16 23:34:16 +02:00
Pasi Kallinen 0099098d35 Silence some nonnull complaints 2023-12-16 14:03:16 +02:00
Pasi Kallinen 3c421da746 Previous hero rising as undead in bones retains intrinsics 2023-12-15 16:03:26 +02:00
Pasi Kallinen d4c0f6bb75 Fix minetn-1 regions
Fuzzer encountered an error because the game couldn't place
a level region; allow placing the stairs to the left or right
edge of the fixed map part, just in case the randomly generated
map didn't extend out of it.

Fix the teleport region preventing falling into the orctown.
2023-12-13 17:55:42 +02:00
Pasi Kallinen b9768ad43a Fix earthquake causing boulder on lava sanity
Before checking if lava or water fills in the pit created by
an earthquake, drop the boulder on the pit into it.
2023-12-13 14:25:28 +02:00
Pasi Kallinen c2802dba2d Demons cannot be frightened by showing them their reflection
From xnethack by copperwater <aosdict@gmail.com>.
2023-12-10 20:11:29 +02:00
Pasi Kallinen aa5ad3e37e Split tip container menu function 2023-12-10 17:32:47 +02:00
Pasi Kallinen 2996e42b79 Redo my clobbered commit 2023-12-09 16:06:07 +02:00
Pasi Kallinen 252e661b72 Prioritize paying shopkeeper next to you even if multiple are detected 2023-12-09 13:24:50 +02:00
Pasi Kallinen 1ceb9d2d91 Show menu when paying items
... and have more than 1 billed item, and using non-traditional
menustyle.

I opted to add an extra field to the bill struct, because
that made the code cleaner.

Breaks saves and bones.
2023-12-09 12:43:41 +02:00
Pasi Kallinen ecb3a1a68d Change mind flayers, the Wizard, and the riders to bright magenta 2023-12-08 22:03:54 +02:00
Pasi Kallinen ad833ce02d Add more tile grayscale mappings
Color I added to the warg tiles was missing from the greyscale
mapping when generating statue tiles.  Map the missing greys
to slightly darker shades.
2023-12-08 21:16:02 +02:00
Pasi Kallinen 348f88c726 Walking into a shopkeeper tries to pay the bill 2023-12-08 18:31:16 +02:00
Pasi Kallinen 20b91270ba Fix wrong level flags in mazes below Medusa
The mazes between Medusa and the Castle had couple wrong default
level flags, because those levels don't go through the special
level routines.
2023-12-08 14:10:12 +02:00
Pasi Kallinen d2ae6fd5d2 Split out wizmode monpolycontrol part 2023-12-08 08:32:07 +02:00
Pasi Kallinen 3b2d3eabed Change wolf, werewolf, and warg colors
There were 6 brown 'd' monsters; move wolf and werewolf to grey,
and warg to black, as those colors had no canines.

The wolf tiles are already greyish; changed warg tile to be
slightly darker.
2023-12-07 17:47:21 +02:00
Pasi Kallinen 6e2fa24344 Change hezrou and vrock color to green
There are many red major demons, and hezrous and vrocks
now emit poison gas, so change the symbol color to green.

Also adjust vrock tiles to have green. The hezrou tiles
already are green.
2023-12-07 13:50:51 +02:00
Pasi Kallinen 5dc94f3d83 Macro for picking random entry from array 2023-12-05 10:06:27 +02:00
Pasi Kallinen 1c933d689e Remove leftover debug extern define 2023-12-04 17:57:58 +02:00
Pasi Kallinen d8421aa219 Save and restore hero tracks
The tracks left by hero were cleared when player saved and
restored the game, or changed levels.  Now the tracks are
saved in the dungeon level, so changing levels keeps the tracks
left by hero in that level.

Also increased the length of tracks from 50 to 100, and
simplify the tracking function.

Thing not done: fade out old tracks when returning to a level.

Breaks saves and bones.
2023-12-04 17:50:48 +02:00
Pasi Kallinen a30a205c45 Fix sanity error with migrating monster 2023-12-01 22:15:10 +02:00
Pasi Kallinen e6ea551150 Fix segfault when trying to create tame lights 2023-12-01 22:13:46 +02:00
Pasi Kallinen 94d44e433b Fix sanity error when pet ate a mimic corpse
When a pet ate a mimic corpse and started mimicking a monster,
and the user then used #wizmakemap, the sanity checker complained
about "non-mimic posing as foo" - the code was clearing the
pet eating counter, but didn't clear the appearance.
2023-11-29 12:15:08 +02:00
Pasi Kallinen febda956ee Fix status hilites in curses
TEXTCOLOR removal left one #ifndef line in, breaking
status hilites in curses.
2023-11-27 20:12:29 +02:00
Pasi Kallinen 830168f26e Update comment 2023-11-15 07:26:21 +02:00
Pasi Kallinen d2ca1794df Move other add_menu routines to windows.c 2023-11-13 20:12:47 +02:00
Pasi Kallinen f74f7988ff MSDOS: implement valid location highlighting
... for VGA and VESA tiled map.
2023-11-13 12:40:10 +02:00
Pasi Kallinen dd5ca5b058 Change menu_headings to accept color and attribute
Instead of just accepting an attribute, it's now possible to
use a color, or both color and attribute, for example:

OPTIONS=menu_headings:inverse
OPTIONS=menu_headings:red
OPTIONS=menu_headings:red&underline

Default is still just inverse.
This lets the player change the menu heading color without
needing to use menu colors for them.

Also makes it so the core uses NO_COLOR instead of 0, for all
the menu lines which don't have any prefedefined color.

Tested for tty, curses, x11, qt, and win32
2023-11-13 07:33:56 +02:00
Pasi Kallinen c44906b28e Put random room engravings on room locations only
Another case of engraving going on a cloud.
2023-11-10 20:08:45 +02:00
Pasi Kallinen 2e8adda028 Clouds cannot have engravings in them
... so delete the existing engraving if a cloud is put on the map.
2023-11-09 18:08:00 +02:00
Pasi Kallinen 8dc7a4882a Make spell menu work with repeat command 2023-11-05 13:49:04 +02:00
Pasi Kallinen f720e1e548 Themeroom: Cloud room 2023-11-05 13:08:43 +02:00
Pasi Kallinen 2bb7239867 Fix iron bars dissolving turning floor into doorway 2023-11-04 13:41:12 +02:00
Pasi Kallinen 738c2239c9 Lightning has a small chance of melting iron bars 2023-11-04 13:04:27 +02:00
Pasi Kallinen 56f4657041 Simplify add_menu, part 10 2023-11-03 22:37:50 +02:00
Pasi Kallinen 4dd9602f4b Simplify add_menu, part 9 2023-11-03 22:32:36 +02:00
Pasi Kallinen ee27757b60 Simplify add_menu, part 8 2023-11-03 22:23:46 +02:00
Pasi Kallinen 06235b7841 Simplify add_menu, part 7 2023-11-03 22:04:55 +02:00
Pasi Kallinen 70c47c4054 Simplify add_menu, part 6 2023-11-03 21:48:46 +02:00
Pasi Kallinen 93fd946ff6 Simplify add_menu, part 5 2023-11-03 21:41:26 +02:00
Pasi Kallinen 175d167896 Simplify add_menu, part 4 2023-11-03 21:27:22 +02:00
Pasi Kallinen 7592ce81f4 Simplify add_menu, part 3 2023-11-03 21:09:34 +02:00
Pasi Kallinen 2fd177ddb5 Simplify add_menu, part 2 2023-11-03 21:01:17 +02:00
Pasi Kallinen a6051dae81 Simplify adding menu headings 2023-11-03 19:07:15 +02:00
Pasi Kallinen 852f8e4996 Dropping items disturbs buried zombies 2023-11-02 20:31:51 +02:00
Pasi Kallinen e6993f2ef1 Digging down on a magical trap causes it to explode 2023-11-02 19:18:18 +02:00
Pasi Kallinen 4b70213677 #saveoptions fixme comment 2023-10-31 18:16:56 +02:00
Pasi Kallinen 1d9726f821 More #saveoptions and cond_ options
Only save the cond_ options that are different from the default.
2023-10-31 14:57:36 +02:00
Pasi Kallinen 03ee609ca0 Saving grace stops multi-turn actions, sleeping, and fainting 2023-10-29 18:01:28 +02:00
Pasi Kallinen 16ed7e49c3 Separate level flags for premapped and sokoban 2023-10-29 12:35:32 +02:00
Pasi Kallinen 638c487c59 Split deadbook undead pacify effect into separate function
Also make the monster chain iterator functions more robust,
in case the called function changes the next monster pointer.
2023-10-28 19:01:46 +03:00
Pasi Kallinen 7bf3888118 Shopkeepers consider monster type for some items
Tins, eggs, and corpses will now cost different amounts
based on what intrinsics the monster type could give
2023-10-25 18:45:16 +03:00
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
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
Pasi Kallinen 72016b1f17 Don't iterate over off-map monsters 2023-10-16 11:28:01 +03:00
Pasi Kallinen 13ad9561f3 Buff scroll of confuse monster 2023-10-11 20:22:56 +03:00
Pasi Kallinen dfac5fbf67 Buff blessed potion of monster detection 2023-10-11 19:52:31 +03:00
Pasi Kallinen 38546778d5 Bigroom 3 may have some walls replaced with other terrain 2023-10-06 12:07:07 +03:00
Pasi Kallinen 90ec36bcd6 Reduce land mine weight
They were simply too heavy to lug around; now they weigh
the same beartraps.
2023-10-04 21:43:28 +03:00
Pasi Kallinen 76de4f6ee9 Ice devils get a slowing touch 2023-10-04 20:06:12 +03:00
Pasi Kallinen 93b9467c08 Balrogs prefer bullwhip is hero is wielding something 2023-10-04 19:48:21 +03:00
Pasi Kallinen 3946c5a01d Give barbed devils a sticking attack 2023-10-04 11:09:25 +03:00
Pasi Kallinen f83a57c5bf Tweak wand of make invisible and potion of invisibility
Wand of make invisible doesn't make you permanently invisible,
just for a short duration.  Potion of invisibility makes you
invisible for much longer period, or if blessed, has a small
chance of giving permanent invisibility.

This makes the wand actually useful, and improves the spell
too.
2023-10-03 21:04:15 +03:00
Pasi Kallinen 2402e6ad4d Decommission Juiblex Express 2023-10-03 10:57:29 +03:00
Pasi Kallinen f0698e1dca Bone devils summon skeletons
Skeletons are extremely rare, and not generated at random,
and bone devils are basically just a speed bump when they appear.
Make both more interesting.

Idea by copperwater <aosdict@gmail.com>
2023-10-02 20:25:58 +03:00
Pasi Kallinen 9b4eaafe8c Fog clouds maintain any gas clouds 2023-10-02 13:05:15 +03:00
Pasi Kallinen cf0eb8dfa0 Steam vortices leave steam clouds behind
Code via xnethack by copperwater <aosdict@gmail.com>
2023-10-01 20:30:54 +03:00
Pasi Kallinen 412a996da8 Wand of probing reveals tin contents 2023-10-01 14:49:00 +03:00
Pasi Kallinen ac9be58970 Sitting on cream pies destroys them 2023-09-30 23:27:47 +03:00
Pasi Kallinen 6e09c980d2 Use #monster to make dragon steed breathe 2023-09-30 22:44:46 +03:00
Pasi Kallinen b1e3863b43 Stop occupation when timed levitation or choking issues a message 2023-09-30 21:15:20 +03:00
Pasi Kallinen 086f68187f Coughing due to stinking cloud wakes up neighbors 2023-09-29 10:56:17 +03:00
Pasi Kallinen 0ecb0547e6 Reset getdir_click when exiting therecmdmenu early
This was causing a really annoying to track down bug where
the fuzzer threw the attached iron ball and it could end up
anywhere on the level, emitting a sanity check error.
2023-09-28 18:19:53 +03:00
Pasi Kallinen 56159742c2 Prevent segfault for non-existent trap
If a buried zombie under stairs revived
2023-09-23 17:25:24 +03:00
Pasi Kallinen 44a649b0b4 Wand of probing reveals map locations in ray path 2023-09-18 19:20:01 +03:00
Pasi Kallinen ef296e7ad9 Change wall of water color to bright blue
Differentiates it from a pool of water, with the same logic as
wall of lava is different from pool of lava.
2023-09-10 20:48:41 +03:00
Pasi Kallinen 50084750c4 Ring of hunger prevents choking on food
... but you will not be prompted to stop eating,
and you will vomit enough to be hungry afterwards.
2023-09-03 18:27:00 +03:00