Commit Graph

759 Commits

Author SHA1 Message Date
Pasi Kallinen
8e6cf385b1 Fix subroom doors
Doors weren't getting added to the correct subrooms in certain cases.

Also fix one of the themerooms, because doors have to be added
after subrooms; there was a possibility of no door to the subroom(s)
in that themeroom, because the subrooms overwrote the doors in
the parent room.

Test case for the subroom doors:

Large room, with a medium subroom, with a tiny subroom inside that.
The doors go from outermost room <-> tiny innermost room <-> middle room.

des.room({ type = "ordinary", x = 1, y = 1, w = 10, h = 10,
   contents = function()
      des.room({ type = "ordinary", w = 6, h = 6, x = 2, y = 2,
         contents = function()
            des.room({ type = "ordinary", w = 2, h = 2, x = 0, y = 0,
               contents = function()
                  des.door({ state="random", wall="south", pos = 1 });
               end
            });
            des.door({ state="random", wall="north", pos = 1 });
         end
      });
   end
});

Before this fix:

ROOM: ndoors:1, subrooms:1
  SUBROOM: ndoors:1, subrooms:1
    SUBROOM: ndoors:1, subrooms:0

after this fix:

ROOM: ndoors:1, subrooms:1
  SUBROOM: ndoors:1, subrooms:1
    SUBROOM: ndoors:2, subrooms:0
2023-03-07 09:43:44 +02:00
nhmall
32ca917d2c sym-changes - add engravings to the map
1. Add "engraved room floor" pchar sym (S_engroom). The symbol that
displays at the engraved part of a room (not a corridor though).
The default symbol is '`' which is currently never shown if people
have defined the boulder symbol to '0' and statues are displayed as
monster symbols. It is bright blue.

Add some stylized variations of the S_engroom symset to some of
the symsets.

2. Add "engraved corridor" pchar sym (S_engrcorr). The symbol that
displays at the engraved part of a corridor. The default symbol is
'#', and it matches the symbol for corridor from for whatever the
current symset uses. It is bright blue to match the color of the
S_engroom symbol. Using the normal corridor symbol for display
preserves the lines of the corridor so is not as visually-disruptive
as a smaller symbol would be. Explicit entries that match the S_corr
symbol have been added to the symset file.

Magic mapping and clairvoyance impacts yet to be determined.

The Guidebook updates will come later.
2023-03-05 17:35:49 -05:00
Pasi Kallinen
c2d6bde9cd More tutorial level
Add more stuff to the tutorial level:
 - closing a door
 - cursed armor
 - taking off armor
 - shuffled descriptions
 - removing curses
 - reading scrolls
2023-03-05 16:38:24 +02:00
Pasi Kallinen
2c092bb641 Tutorial: pushing boulders 2023-03-03 16:14:22 +02:00
Pasi Kallinen
3b519c7023 Minor tutorial tweak
Remove the autoopen setting, as it alraedy defaults to on.
Add an engraving mentioning some actions may take multiple tries.
2023-03-03 09:57:49 +02:00
Pasi Kallinen
fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
Kufat
b435cd840a Bogusmon from The Culture (Iain M. Banks)
Add the antagonistic undecagonstring from The Hydrogen Sonata as a hallucinatory monster.
2023-02-25 23:54:07 -08:00
Pasi Kallinen
5d659cf1f6 Tips and option to disable them
Adds a more general way to handle gameplay tips, and adds
a boolean option "tips", which can be used to disable all
tips.  Adds a helpful longer message when the game goes
into the "farlook" mode.

Also adds a lua binding to easily show multi-line text
in a menu window.

Breaks save compat.
2023-02-19 15:56:18 +02:00
nhmall
7aab1c0b76 Guidebook update 2023-02-16 20:56:33 -05:00
PatR
6fd0047784 add #genocided command
Comparable to #vanquished, be able to view info normally available
during end of game disclosure while the game is still in progress.
The new #genocided command lists all genocided and extincted types
of monsters.  Unlike #vanquished, there aren't any sorting choices.

Potential future enhancement:  provide a way to view the genocided
list at the "what do you want to genocide?" prompt.
2023-02-11 11:35:06 -08:00
Pasi Kallinen
7401b44fa1 Walls of lava
Add "walls of lava", basically lava which blocks vision and
require a bit more than just levitation or flight to move through.

No levels use this yet, as testing isn't thorough enough.
2023-02-06 19:23:42 +02:00
nhmall
43af05a6b8 Unchanging and improvisations
Adds a reveal.

Increments EDITLEVEL.
2023-02-05 11:32:58 -05:00
Pasi Kallinen
1b5414c833 Add some variation to minefill levels
Randomize the number of objects and monsters a little bit,
they're still roughly the same as before.
2023-02-03 19:10:04 +02:00
Pasi Kallinen
fe99bcd591 Hellfill: Lich
Similar to the fake wizard towers.
2023-01-30 18:30:39 +02:00
Pasi Kallinen
71f900f174 Add helltweaks to fake wiz towers 2023-01-30 17:58:51 +02:00
Pasi Kallinen
a4c15f23bc Add helltweaks to wizard3 2023-01-30 17:47:21 +02:00
Pasi Kallinen
788492bdcd Add helltweaks to wizard2 2023-01-30 17:43:34 +02:00
Pasi Kallinen
7def7ece92 Add helltweaks to wizard1 2023-01-30 17:31:25 +02:00
Pasi Kallinen
744d64487b Helltweaks: improve lava river
The lava river will now draw another river, until a certain
amount of map locations have been turned into lava, so you don't
get a teensy "river" made out of 2 lava pools.

Add a lua selection method to count the number of locations
in the selection.
2023-01-30 17:10:39 +02:00
Pasi Kallinen
84c14982bd Hellfill: Add an angel to the cage 2023-01-25 10:04:56 +02:00
Pasi Kallinen
09fa9a865d Hellfill: Caged monster 2023-01-24 18:06:16 +02:00
Pasi Kallinen
0bfd6b22f1 Gehennom tweaks: replace some walls with iron bars 2023-01-24 09:00:43 +02:00
Pasi Kallinen
9c21832cf2 Gehennom tweaks: replace some walls with boulders 2023-01-24 08:34:27 +02:00
Pasi Kallinen
3b5c53de86 Add triple nesting theme room 2023-01-23 20:00:21 +02:00
Pasi Kallinen
83eaa85dd8 Fix ancient subroom location bug
Randomly placed subrooms were never generated touching
the right or bottom walls of the parent room.

This bug has been present since at least 3.1.0
2023-01-23 19:50:37 +02:00
Pasi Kallinen
18a77b1c42 Hellfill: Random temples to Moloch 2023-01-22 20:09:26 +02:00
Pasi Kallinen
af1bd84766 Add hell_tweaks to Orcus' level 2023-01-20 14:08:34 +02:00
Pasi Kallinen
1113373892 Fix vibrating square
The Gehennom changes broke the vibrating square, allowing hero to go
down into the Sanctum via stairs without performing the invocation.

Fix this by making the hellfill lua check for invocation level, and
placing down the vibrating square trap, instead of stairs.
2023-01-19 12:15:46 +02:00
Pasi Kallinen
2511637169 Make plane of fire hot 2023-01-18 10:50:32 +02:00
Pasi Kallinen
bb8c144809 Level temperature
Allow setting a per-level "temperature": hot, cold, or temperate
via special level flags. Currently it only affects some messages
in Gehennom, but it could be expanded to ice melting, water freezing,
or monster generation, for example.

Invalidates saves and bones.
2023-01-17 20:11:45 +02:00
Pasi Kallinen
bd267c0c61 Add a cold, watery gehennom filler maze 2023-01-16 19:17:19 +02:00
Pasi Kallinen
6abb12aee0 Lua: Persistent variables
Add a way for the lua scripts to set and retrieve variables
that are persistent - saved and restored with the game.

Invalidates saves.
2023-01-15 10:34:45 +02:00
Pasi Kallinen
9bf6d837ad More Gehennom filler level variance 2023-01-12 12:37:08 +02:00
Pasi Kallinen
4af086be73 More interesting Gehennom levels
Instead of just plain old boring mazes, spice up Gehennom by
occasionally adding lava, iron bars, or even mines-style levels
(with lava, of course).

Of the fixed Gehennom levels, only Asmodeus' lair has been changed
to add some random lava pools.

Also some lua fixes and changes:
- Fixed a selection negation bounding box being wrong.
- Fixed a selection negated and ORed returning wrong results.
- des.map now returns a selection of the map grids it touched.
- When using des.map contents-function the commands following the
  map are not relative to it.
2023-01-10 12:20:21 +02:00
nhmall
2fc0d25d45 introduce support for coloring the frame behind a map location
Also includes support by paxed for polearm targeting using the
frame color.

Also renames USE_TILES to TILES_IN_GLYPHMAP which is a more
accurate description.

Not all window interfaces have full support for the color framing
of the background square yet.

MS-DOS needs further work (to bring it to both VESA and VGA, with
and without tiles.

Windows GUI is missing support.

X11 and Qt have been started, but may require further refinement.
2023-01-01 19:55:02 -05:00
PatR
249e431e46 new 'sortvanquished' option
Allow the preferred sort order for the vanquished monsters list to
be specified in the run-time config file
|OPTIONS=sortvanquished:X
where X is t, d, a, c, n, or z.  It can also be set to 'A' or 'C'
but those aren't documented and aren't offered as choices when
setting the value interactively, which can be done via 'm O' or by
using 'm #vanquished'.

Guidebook.mn has been updated but Guidebook.tex is lagging again.
2022-12-26 14:56:12 -08:00
Pasi Kallinen
37f6eee147 Add themeroom filler "Storeroom"
Contains mostly mimics (pretending to be chests), and possibly some chests.
2022-12-22 21:47:13 +02:00
Pasi Kallinen
5e47afed4f Typofix 2022-12-19 18:20:31 +02:00
PatR
25de3d2247 usage typo/thinko 2022-12-05 23:24:18 -08:00
PatR
be9e1f31af man page and usage: -D
Mention the changed character name that happens when running in wizard
mode.
2022-12-04 00:17:50 -08:00
PatR
940f98c223 usage text revisions
Move the mention of viewing usage info via 'nethack --usage | more'
to the end, where it should remain visible if text has scrolled off
the top of the screen (which is nearly certain since it ended up
being much longer than originally intended).

Also, rephrase the text at the start about restore vs new game since
the previous description said "in all cases" which isn't applicable
for 'nethack --scores' or --version or --showpaths or --usage.

Move 'nethack --usage' to last so that 'nethack --scores' is first
among the non-playing command variants since -s is of more interest.

For 'nethack --scores', move -v before the other options since it
has to be next after -s|--scores to be processed correctly.  Also,
avoid using "present" twice in the same sentence.
2022-11-25 13:44:43 -08:00
PatR
d51c1b4691 'nethack -s -v' usage feedback fix
The usage description of '-v' (for scores from all versions present
in 'record' vs only for the current version) was backwards.
2022-11-24 01:00:59 -08:00
PatR
3278d7e0c1 control of command-line usage entry in '?' menu
Instead of using a compile-time macro to suppress inclusion of the
menu entry to show UNIX command-line usage in the help menu, use a
sysconf setting instead.

Default is HIDEUSAGE=0, to include the entry for command-line usage.
Set HIDEUSAGE=1 to exclude that.  Does not affect 'nethack --usage'
if player actually has access to the command-line.
2022-11-18 17:54:17 -08:00
PatR
9a7f8418ee 'nethack --usage' and '?' menu
Write up a description of how the command line works on UNIX and put
that in new file dat/usagehlp.  Add support for
|nethack --usage | --help | -? | ?
to display it and exit.

Also add a menu entry for nethack's help command to show it during
play.  That can be suppressed by uncommenting new '#define HIDE_USAGE'
in config.h since it won't be useful on servers that don't give
players access to command lines.

New genl_display_file() just writes to stdout.  opt_usage(), which
calls it, might need some suid/sgid handling to make sure the output
is done as the player rather than as nethack.

doc/nethack.6 is already out of date again.
2022-11-18 16:07:15 -08:00
PatR
f6b3b968e7 change #vanquished from wizard mode to normal play
Make the existing '#vanquished' command be available during regular
play, with M-V bound to it.  'm #vanquished' or 'm M-V' brings up
the sorting menu that you get when answering 'a' rather than 'y' at
the end-of-game "disclose vanquished creatures?" prompt.

The original #vanquished came from slash'em, where it was available
in normal play.  When added to nethack, it was put in as wizard-mode-
only. I added the sorting capability several years ago.

The chosen sort is remembered and re-used if not reset but only for
the remainder of the current session.  It probably ought of become
a run-time option so be settable in advance and across sessions but
I haven't done that.
2022-11-03 00:00:34 -07:00
PatR
de12cbe47f rename #wizcheckmdifficulty to #wizmondiff
Shorten the name of the recently added debug command that validates
monster difficulty values.  'wizcheckmdifficulty' was 19 characters
long, the next longest is 14 ('wiztelekinesis').  The extra width
messed up the Qt interface's extended command selection dialog when
wizard mode commands are included.  It sizes the button for every
command to fit the longest name; the increase in size from 14 to 19
made the button grid become too big for the screen.

Add monsters' base difficulty level to the #wizmondiff output.

Add #wizmondiff and #wizdispmacros to 'wizhelp'.
2022-10-14 12:42:12 -07:00
PatR
c2894a422b monk strength
Add a stack of 2 tins of spinach near the leader on the monk quest
start level and another stack of 2 blessed tins of spinach at a
random spot on the monk quest locate level, to compensate for the
inability to gain strength from giant corpses if they adhere to
vegan or vegetarian conduct.  paxed supplied the 'tinplace' magic.

4 tins of spinach aren't nearly enough to get to 18/100, but by
uncursing the first pair, if necessary, and waiting until strength
is at least 18, they can be eaten to add 4..40 (average 22) points
of exceptional strength.  (Players choosing either of those conducts
for other roles or foodless for any role are on their own as far as
boosting Str goes, same as before.)

The special level loader needed to be modified to handle tins of
spinach.  It now accepts "spinach" as a fake monster type for an
object of type "tin".  Also added support for empty tins since it
involved the same code, and use of fake monster type "empty" with
object type "egg" to be able to create generic (unhatchable) eggs.
(Wishing for "egg" produces those by default but it also accepts
explicit "empty egg" by coincidence.)
2022-10-12 13:47:12 -07:00
copperwater
1abdaf1ddb Fix: prevent traps in shops in the Tourist quest
The Tourist locate and goal levels have 2 shops each, and also have
various traps randomly placed on the level. Unfortunately, this does not
account for placing them in the shops, so it was possible to wind up
with a magic trap or falling rock trap or whatever inside the shop,
which the shopkeeper would not clean up.

This commit makes selections that exclude the shop areas, and picks the
traps from those selections, keeping the shop floors trap-free as their
customers expect.
2022-09-22 23:42:01 -07:00
Pasi Kallinen
bb3dc379bc Themerooms: Engraving hints the location of buried treasure
Add two new themeroom functions that are called when generating
the level: pre_themerooms_generate and post_themerooms_generate,
calles before and after themerooms_generate.

Allow the buried treasure -themeroom to put down an engraving
anywhere on the level, hinting at the location of the treasure.

des.object contents function now gets the generated object passed
to it as a parameter.
2022-09-18 12:45:16 +03:00
Pasi Kallinen
3605f18a8e Split themeroom shape from themeroom contents
Previously, the tetris-shaped rooms were always either
normal rooms, or turned into shops or other special rooms
in NetHack core. Now, the themed room lua code first picks
the themed room (which can be a themed or shaped), and some
of those will then pick a random filling (eg. ice floor,
traps, corpses, 3 altars).

Adds a new lua binding to create a selection picking locations
in current room.

The content-function in special level regions now get passed
the room data as a parameter.
2022-09-15 18:09:40 +03:00