Commit Graph

702 Commits

Author SHA1 Message Date
Pasi Kallinen
7bf02ade48 Bigroom 2 can have ice floor in unlit areas 2022-07-18 17:58:45 +03:00
Pasi Kallinen
a4ef5ee533 timed_delay doc bits 2022-07-18 08:33:10 +03:00
Patric Mueller
5863d95837 Typo in opthelp 2022-06-17 16:57:03 +02:00
PatR
6c91f52908 documentation update
Incorporate the diff from entrez describing the travel_debug wizard
mode option and removing obsolete M prefix from the Guidebook.  That
missed a reference to it in the description of '_'.

I put M back in case someone who has used it with earlier versions
tries to use it and gets a no-such-command complaint so goes looking
for it.

Also, make the mention of ^X at the end of the discussion of status
stand out a bit.  The indentation of its paragraph made it line up
with the preceding text instead of making it be distinct from that.

The TeX changes are untested and given the amount of punctuation
characters used, it will be surprising if they all have been quoted
properly.
2022-06-17 03:18:52 -07:00
Patric Mueller
1685b5e16b Fix wrong glyph for tuwall in Enhanced1 symset 2022-06-13 20:52:58 +02:00
copperwater
1a847d0314 Remove pointless lighting statement in Val-strt
The whole level was already lit up, so lighting up a smaller area of it
does nothing.
2022-05-27 21:23:31 -04:00
nhmall
6d15142250 fix one more lua file header 2022-05-10 11:30:30 -04:00
nhmall
0602a3b89f update lua file headers 2022-05-10 11:26:52 -04:00
nhkeni
e5648584b3 update headers on Lua files 2022-05-10 07:44:26 -04:00
nhmall
cb0c21e91d ENHANCED_SYMBOLS
A new feature, enabled by default to maximize testing, but one which can
be disabled by commenting it out in config.h

With this, some additional information is added to the glyphmap entries
in a new optional substructure called u with these fields:
    ucolor          RGB color for use with truecolor terminals/platforms.
                    A ucolor value of zero means "not set." The actual
                    rgb value of 0 has the 0x1000000 bit set.
    u256coloridx    256 color index value for use with 256 color
                    terminals, the closest color match to ucolor.
    utf8str         Custom representation via utf-8 string (can be null).

There is a new symset included in the symbols file, called enhanced1.

Some initial code has been added to parse individual
OPTIONS=glyph:glyphid/R-G-B entries in the config file.

The glyphid can, in theory, either be an individual glyph (G_* glyphid)
for a single glyph, or it can be an existing symbol S_ value
(monster, object, or cmap symbol) to store the custom representation for
all the glyphs that match that symbol.

Examples:
   OPTIONS=glyph:G_fountain/U+03A8/0-150-255

(Your platform/terminal font needs to be able to include/display the
character, of course.)

The NetHack core code does parsing and storing the customized
entries, and adding them to the glyphmap data structure.

Any window port can utilize the additional information in the glyphinfo
that is passed to them, once code is added to do so.

Also, consolidate some symbol-related code into symbols.c, and remove it from
files.c and options.c
2022-05-07 10:25:13 -04:00
PatR
02207b967a autounlock:untrap
Implement 'untrap' as an 'autounlock' action.  Quite a bit more work
than anticipated.  The new documentation is rather clumsy; too many
if-this and if-not-that clauses have intruded.

I'll be astonished if all the return values are correct....

[A couple of places were checking for (rx != 0 && ry != 0) to decide
whether they were performating an autounlock action at <rx,ry> but
that erroneously excludes the top line of the map if the current
level extends that far.  Just check rx for zero/non-zero.]
2022-05-06 14:44:57 -07:00
PatR
44d5be6eb4 autounlock overhaul
This gives the player more control over what autounlock does.  It is
now a compound option rather than a boolean, and takes values of
  autounlock:none
  !autounlock or noautounlock (shortcuts for none)
  autounlock:untrap + apply-key + kick + force (spaces are optional
    or can be used instead of plus-signs, but can't mix "foo bar+quux")
  autounlock (without a value, shortcut for autounlock:apply-key).
Default is autounlock:apply-key.

Untrap isn't implemented (feel free to jump in) so is suppressed from
the 'O' command's new sub-menu for autounlock.  It's parsed and
accepted from .nethackrc but won't accomplish anything.

[Just musing: it should be feasible to kick in direction '.' to break
open a container or #force to an adjacent spot to break open a door.
If that was done, autounlock:kick+force (or more likely autounlock:
apply-key+kick+force when lacking a key) would resort to force if hero
couldn't kick due to wounded legs or riding.

This changes struct flags so increments EDITLEVEL again.

This includes pull requests #750 from entrez and #751 from FIQ but was
entered from scratch rather than using use their commits.

Closes #750
Closes #751
2022-05-04 19:13:28 -07:00
vultur-cadens
3571934c59 Allow specifying object classes in the object name given to des.object()
and actually do so in the lua files.

Before this, it was not possible to specify (for example) "scroll of
teleportation" in des.object() because there is actually no object
defined in objects.h named "scroll of teleportation", so
find_objtype() failed to find it.  Instead, one had to request
"teleportation", but that is ambiguous, and find_objtype() would find
the first defined item with that name instead (ring of teleportation).

In cases of ambiguity, I referred to the des files from 3.6.6 (before
the lua conversion).
2022-04-24 00:35:25 -07:00
Pasi Kallinen
cb02ce88c5 Revisit the Valkyrie goal level hack
Instead of hardcoding the lava terrain change in core, if the stairs
are created in a fixed location, force the terrain to room floor first.
Move the surrounding lava changing to room floor to the Val-goal lua
file.
2022-04-15 18:52:49 +03:00
PatR
554ebc0f4c temporary? fix for github issue #730 - stairs \
placed on lava spot on Valkyrie goal level

Reported by k2, arriving at the final level of the Valkyrie quest
can issue a recently added impossible
| mkstairs: placing stairs up on molten lava at <68,13>
The report said it was easy to reproduce, but it took me multiple
tries (so not hard to do, but not a sure thing on any given attempt).

The stairs on that level are placed at specific coordinates that
are outside the pre-mapped area, so there's no guarantee that their
spot will be suitable for stairs.  The underlying terrian changes
from lava to stair, but only after the warning about molten lava.

This hack solves that particular level but is not a general solution
for this type of thing.  When about to make stairs on a lava spot,
change that spot to normal floor first.  Plus 50:50 chance to change
each adjacent lava spot to floor too so that there's decent chance
for some elbow room upon arrival.

Also, turn the no-flip attribute off for that level so that 'fixed'
location of the stairs can occur in four different places.

Fixes #730
2022-04-14 10:50:23 -07:00
Pasi Kallinen
a1f2000afd Fix castle engraving and scroll
Fixes #723
2022-04-10 14:30:58 +03:00
Pasi Kallinen
f45e79e1a0 Fix medusa levels
My recent commit broke medusa-3 and medusa-4, so fix those.

Make des.stair and des.ladder also accept hash-coordinate:
  des.stair("up", {8, 10});
2022-04-01 08:53:15 +03:00
Pasi Kallinen
27898340b9 Lua: coordinate tweaking
Make selection rndcoord return a table with x and y keys.
Allow (most) coordinate parameters accept such a table.
Fix selection and des lua tests broken by the above changes and
an earlier change, because selections tried to set terrain
at column 0, and it now causes a complaint.
2022-03-22 09:16:19 +02:00
Pasi Kallinen
38924002e0 Lua: ice theme room and melting ice
Allow the ice theme room to occasionally have melting ice.
Add nh.abscoord() to convert room-relative to map-absolute coords.
2022-03-15 22:05:36 +02:00
zomgreg
c5f435a2f2 corrected spelling of transcription 2022-03-07 14:30:36 -08:00
zomgreg
164c720378 corrected spelling of metaphor 2022-03-07 14:30:35 -08:00
Pasi Kallinen
a1d5464fa7 Knight quest home level has some saddled warhorses
Also, when creating a saddle in a monster inventory in special
level lua code, automatically saddle the monster, if possible.
2022-02-19 11:51:10 +02:00
nhmall
99ffd027ae remove NHAccess symset, github issue #638
Closes #638
2022-02-13 09:07:41 -05:00
nhmall
8499c71fcc update a couple of lagging 3.6 references 2022-02-04 12:47:05 -05:00
nhmall
5d4fc4591d more .gitattributes updates 2022-02-04 11:01:20 -05:00
PatR
11c7643ea7 reformat dat/hh
For
 key name description
reduce the width of the first column from 8 spaces to 6 and increase
the width of the second column from 8 spaces to 10 so that fewer lines
have misaligned third column caused by long name.

Also a small amount of extra verbosity, mostly for I and A/P/R/T/W.
2022-01-29 12:26:22 -08:00
PatR
5f14f0ff57 options help one more time...
Move the help text for the 'O' command from the code into its own file
and allow that to be accessed from the '?' menu as well as by choosing
entry '?' in the 'O' menu.

sys/unix/Makefile.top has been updated to handle new 'optmenu', others
need to catch up.  The game will still build and run without the file
but asking for options menu help won't work until they do.
2022-01-19 14:22:21 -08:00
PatR
bbe83a8f05 yet more help
Add an extra couple of sentences explantion for control and meta.
Noticed an omitted command in the process.
2022-01-13 16:56:32 -08:00
PatR
9d3425917f more user help
A couple of additional things witnessed in between the frequent adds
shown by youtube (top prize goes to the recurring popup ad advertising
popup blocking).

He knew that ^D meant a control character but thought that he had to
type Ctrl+Shift+d instead of just being able to type Ctrl+d.  And he
had no idea what "meta key" meant.  (I don't think I've ever seen a
key labeled that myself.)
2022-01-13 16:32:37 -08:00
Pasi Kallinen
711a12afc3 Add a false rumor 2022-01-04 11:14:12 +02:00
Pasi Kallinen
03b55a6fa0 Make the adventurer ghost asleep 2022-01-04 10:55:09 +02:00
Pasi Kallinen
76381815f3 Add theme room: Ghost of an Adventurer 2022-01-02 19:51:32 +02:00
RojjaCebolla
381ed08366 Correct the genders of DCSS bogusmons
Reference: https://github.com/crawl/crawl/blob/master/crawl-ref/source/mon-data.h
2021-12-30 20:38:15 +02:00
Pasi Kallinen
4b525374d0 Make vrocks emit a poison cloud when they flee 2021-12-25 10:51:20 +02:00
PatR
ec5f7bce16 tribute update: Monstrous Regiment and A Hat Full
of Sky

Add a page citation for Monstrous Regiment passage 1 and add four new
passages, bringing its total to 12.

Add two new passages to A Hat Full of Sky, bringing its total to 13.
2021-11-27 17:40:48 -08:00
PatR
341d1dff13 add a Harry Potter reference
Add three new hallucinatory monsters:  dementor, flying monkey, and
plaid unicorn.
2021-11-24 01:14:08 -08:00
PatR
1f31f1ff81 tribute update: Night Watch and The Wee Free Men
Add a page citation to passage #1 of Night Watch, and add five new
passages, briging the total to 12.

Add four new passages to The Wee Free Men, bringing the total to 13.
2021-10-30 19:16:35 -07:00
nhmall
0c80ef0526 more imp 2021-10-29 13:39:27 -04:00
HMM
e2be44f2dd variation of imp's pr 602 period-speak
This pr is not merged word-for-word from the original pull request
by Vivit-R

Closes #602
2021-10-16 10:36:13 -04:00
nhmall
1f6c1d0f42 expand the glyphs
The walls for the mines, gehennom, knox, and sokoban had been
changed at the "tile"-level, with no awareness of the core game,
or non-tile interfaces.
- Expand the glyphs to include a set of walls for the main level
as well as each of those mentioned above.

Altars had been adjusted at the map_glyphinfo() level to substitute
some color variations on-the-fly for unaligned, chaotic, neutral,
lawful altars, and shrines. The tile interface had no awareness of
the feature.
- Expand the glyphs to include each of the altar variations that
had been implemented in the display code for tty-only. This required
the addition of four placeholder tiles in other.txt. Someone with
artistic skill will hopefully alter the additional tiles to better
reflect their intended purpose.

Explosions had unique tiles in the tile window port, and the display
code for tty tinkered with the colors, but the game had very little
awareness of the different types of explosions.
- Expand the glyphs to include each of the explosion types: dark,
noxious, muddy, wet, magical, fiery and frosty.

Pile-markers to represent a pile had been introduced at the
display-level, without little to no awareness by the core game.
- Expand the glyphs to include piletops, including objects,
bodys, and statues.

Recently male and female variations of tiles and monsters had been
had been introduced, but the mechanics had been mostly done at the
display-level through a marker flag. The window port interface then
had to increment the tile mapped to the glyph to get the female version
of the tile.
- Expand the glyphs to include the male and female versions of the
monsters, and their corresponding pet versions, ridden, detected
versions and statues of them.

Direct references to GLYPH_BODY_OFF and GLYPH_STATUE_OFF
in object_from_map() in pager.c were getting incomplete results.
- Add macros glyph_to_body_corpsenm(glyph) and
glyph_to_statue_corpsenm(glyph) macros for obtaining the corpsenm
value after passing the glyph_is_body() or glyph_is_statue() test.

Other relevant notes:

- The tile ordering in the win/share/*.txt tile files has been altered,
other.txt in particular.

- tilemap.c has had a lot of alterations to accommodate the expanded
glyphs. Output that is useful for troubleshooting will end up in
tilemappings.lst if OBTAIN_TILEMAP is defined during build.
It lists all of the glyphs and which tile it gets mapped to, and also
lists each tile and some of the references to it by various glyphs.

- An array glyphmap[MAXGLYPH] is now used. It has an entry for each
glyph, ordered by glyph, and once reset_glyphs(glyph) has been run, it
contains the mapped symindex, default color, glyphflags, and tile
index.
If USE_TILES is defined during build, the tile.c produced from the
tilemap utility populates the tileidx field of each array element with
a glyph-to-tile mapping for the glyph. Later on, when reset_glyphmap()
is run, the other fields of each element will get populated.

- The glyph-to-tile mapping is an added field available to a window
port via the glyphinfo struct passed in the documented interface. The
old glyph2tile[] array is gone. The various active window ports that
had been using glyph2tile[] have been updated to use the new interface
mechanism. Disclaimer: There may be some bug fixing or tidying
required in the window port code.

- reset_glyphmap() is called after config file options parsing
has finished, because some config file settings can impact the results
produced by reset_glyphmap().

- Everything that passes the glyph_is_cmap(glyph) test must
return a valid cmap value from glyph_to_cmap(glyph).

- An 'extern glyph_info glyphmap[MAX_GLYPH];' is inserted into the
top of only the files which need awareness of it, not inserted into
display.h. Presently, the only files that actually need to directly
reference the glyphmap[] array are display.c, o_init.c (for shuffling
the tiles), and the generated tile.c (if USE_TILES is defined).

- Added an MG_MALE glyphflag to complement the MG_FEMALE glyphflag.

- Provide an array for wall colorizations. reset_glyphmap() will draw
the colors from this array: int array wallcolors[sokoban_walls + 1];
The indices of the wallcolors array are main_walls (0), mines_walls
(1), gehennom_walls (2), knox_walls (3), and sokoban_walls (4).
In future, a config file option for adjusting the wall colors and/or
an 'O' option menu to do the same could be added. Right now, the
initializaton of the wallcolors[] array entries in display.c leaves the
walls at CLR_GRAY, matching the defsym color.

- Most of the display-level kludges for some of the on-the-fly
interface features have been removed from map_glyphinfo() as they
aren't needed any longer. These glyph expansions adhere more closely to
the original glyph mechanics of the game.

- Because the glyphs are re-ordered and expanded, an update to
editlevel will be required upon merge of these changes.
2021-09-18 19:51:04 -04:00
nhmall
9b57784348 rename explosion symbols
Use a slightly more meaningful name for each one rather than
a sequential numerical name.

S_explode1 to S_expl_tl
S_explode2 to S_expl_tc
S_explode3 to S_expl_tr
S_explode4 to S_expl_ml
S_explode5 to S_expl_mc
S_explode6 to S_expl_mr
S_explode7 to S_expl_bl
S_explode8 to S_expl_bc
S_explode9 to S_expl_br
2021-09-18 10:04:25 -04:00
PatR
828cbcf4ab tribute update: The Amazing Maurice
Add four new passages to The Amazing Maurice and His Educated Rodents,
bringing total to 14.

When wishing, accept truncated title "The Amazing Maurice" as well as
the full title.
2021-08-05 17:44:04 -07:00
PatR
ef17c0fa82 tribute update: The Last Hero
Add six passages, bringing total to 13.
2021-07-30 17:28:00 -07:00
Pasi Kallinen
b16c3732cb Add branch stairs to symbols 2021-07-28 07:57:16 +03:00
PatR
8e2f168544 tribute update: Thief of Time
Add a page citation to passage #1; add six new passages (bringing
total to 14).
2021-07-22 17:02:06 -07:00
Pasi Kallinen
043cd7e108 Lua: lit="random" is not allowed anymore
Random is the default lit state, so leave it out.
2021-07-22 19:38:04 +03:00
PatR
35a6939b5e tribute update: The Truth
Add page citations to passages 1 and 2 and missing italics to #1.

Add five new pssages, bringing total to 13.
2021-07-16 19:08:53 -07:00
PatR
938b51c76b tribute update: The Fifth Elephant
Add three new passages, bringing total to 12.

Also, fix a typo in Thief of Time #2:  had "starts" where "stars"
was intended.
2021-07-12 19:12:40 -07:00
Pasi Kallinen
29a8153170 Add a new bigroom variant "boulder maze" 2021-07-09 18:18:31 +03:00
PatR
c4ec1e9ada tribute update: Carpe Jugulum
Add four new passages to Carpe Jugulum, bringing total to 12.

A couple of fixes for the Fifth Elephant are mixed in:  page reference
and italics for passage #1, correct the spelling of "doublet" in #9.
2021-07-08 19:13:26 -07:00