Commit Graph

18421 Commits

Author SHA1 Message Date
Pasi Kallinen
8c55e7df1c Code style nit 2026-04-03 12:59:09 +03:00
Pasi Kallinen
b2a80ab87a Prevent phaseable monster hiding deep in undiggable walls
The outer edge of a random dungeon level can have undiggable
walls.  Phaseable monsters, such as earth elementals, could
hide deep inside that boundary.  Turn the walls beyond the
first layer of non-diggable walls also non-phaseable.
2026-04-02 15:43:13 +03:00
Pasi Kallinen
fc6c7d70be Give spellcast attack to monster priest and wizard
Acolytes grow up to priests, apprentices to wizards, but they
did not cast spells after they grew up.  Give the monster priests
and wizards the same spellcasting attack as all the other
priest and wizard -type monsters.

This lack of magical ability goes back at least to 3.3.1;
I didn't bother checking back further.
2026-04-02 12:28:00 +03:00
nhmall
3b4d4cd261 expand range of oc_weight 2026-04-01 12:56:37 -04:00
Pasi Kallinen
542d1db5f4 Another fix for #K4317 - monster grudge
Undead monsters created by the level creation routine do not grudge
other (zombifiable) monsters created during the level creation.

This of course doesn't prevent the grudge happening with monsters
created during gameplay.

Invalidates saves and bones.
2026-04-01 19:24:43 +03:00
nhw_cron
d911e4c4d3 This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-04-01 11:02:46 -04:00
nhmall
e377591240 follow-up: avoid issue with onefile concatenation 2026-04-01 10:59:22 -04:00
nhmall
ab459265b0 top line fixup 2026-04-01 09:09:39 -04:00
nhmall
396a3735ca follow-up for Xcode project 2026-04-01 08:48:05 -04:00
nhmall
686618f34d move early arg and enum dump processing to own file 2026-04-01 08:32:13 -04:00
Pasi Kallinen
3917f5493d More mcastu code reorg
Instead of using two separate functions with switch-cases for
wizard and clerical spell lists, define the spell lists
as arrays and use a single function to pick a spell
from the lists.

Adds levels to the monster spells, using the switch-case values,
with some minor fudging.
2026-04-01 13:17:09 +03:00
PatR
c8e97527f1 Schroedinger's live cat
Give a little experience when releasing live housecat from Schroedinger's
Box, similar to recent change giving experience when opening the Box
produces a dead cat.
2026-03-31 20:48:01 -07:00
nhmall
aa25005cf0 whitespace cleanup on recent file
replace leading tab with spaces to match include style
2026-03-31 12:57:41 -04:00
nhmall
90db8d7e2d clear up some warnings appearing with gcc 15.2.0
allmain.c: In function ‘debug_fields’:
allmain.c:1133:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1133 |     while ((op = strchr(opts, ',')) != 0) {
      |                ^
cfgfiles.c: In function ‘find_optparam’:
cfgfiles.c:590:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  590 |     bufp = strchr(buf, '=');
      |          ^
cfgfiles.c:591:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  591 |     altp = strchr(buf, ':');
      |          ^
end.c: In function ‘should_query_disclose_option’:
end.c:482:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  482 |     if ((dop = strchr(disclosure_options, category)) != 0) {
      |              ^
invent.c: In function ‘loot_classify’:
invent.c:175:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  175 |     p = strchr(classorder, oclass);
      |       ^
o_init.c: In function ‘dodiscovered’:
o_init.c:774:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  774 |     if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
      |                                 ^
o_init.c: In function ‘doclassdisco’:
o_init.c:907:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  907 |     if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
      |                                 ^
objnam.c: In function ‘the’:
objnam.c:2200:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2200 |         if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
      |                   ^
objnam.c:2200:53: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2200 |         if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
      |                                                     ^
options.c: In function ‘optfn_disclose’:
options.c:1529:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1529 |             dop = strchr(disclosure_options, c);
      |                 ^
pager.c: In function ‘add_cmap_descr’:
pager.c:1212:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1212 |                     || ((p = strchr(x_str, ' ')) != 0 && !strcmpi(p, " ice"))
      |                            ^
2026-03-31 10:16:28 -04:00
Pasi Kallinen
9bf90ee07f Replace magic number with define 2026-03-30 19:07:18 +03:00
Pasi Kallinen
f68f15e3b5 Simplify some special level lua
These were generated by a script that converted the des-file
format to lua.
2026-03-30 18:27:10 +03:00
Pasi Kallinen
f4173adc88 Use define for player name length in botl
This defines the cut-off how many characters of the player's name
is shown in the bottom status line.
Also increase the limit from 10 characters to 16.
2026-03-30 16:41:37 +03:00
Pasi Kallinen
9fba4af323 Status hilite menu retry limit
Fuzzer got stuck here for a very long time, so bail out
from the status hilite menu after few failed tries.
2026-03-30 13:29:12 +03:00
nhmall
12663473ab update tested versions of Visual Studio 2026-03-29 2026-03-29 20:20:56 -04:00
PatR
1813e27098 farlook of quest stairs down
When access to the quest isn't available yet, describe the stairs down
as "blocked staircase down" instead of the usual "staircase down".
Applies to mimics posing as stairs too.

Does not apply to the stairs when standing on them and using lookhere.

I was going to use "locked staircase down" but that would imply that a
key or unlocking magic could be applicable.
2026-03-29 14:02:21 -07:00
Pasi Kallinen
e3e01267aa Debug panic when level has too many (sub)rooms 2026-03-29 18:47:55 +03:00
nhmall
5d814053a1 some outdated cleanup outdated/sys/windows 2026-03-27 06:59:49 -04:00
PatR
f49ac037f9 release wish history memory
The memory leak only happened at end of game so wasn't a big deal.
2026-03-25 15:54:44 -07:00
nhw_cron
d939238ea6 This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-25 15:26:08 -04:00
PatR
11f27226cb 'pauper' documentation
The LaTeX Guidebook has been updated but not tested.  It's unlikely that
this small change has introduced any problems though.
2026-03-25 11:18:15 -07:00
nhw_cron
7c9b4b9595 This is cron-daily v1-Jan-12-2026. 005guidebook updated: doc/Guidebook.txt 2026-03-25 09:10:17 -04:00
nhmall
b58d2d4096 try to reduce some Amiga cross-compile warnings 2026-03-25 08:48:14 -04:00
nhmall
3c89dc2387 Guidebook date stamp to reflect most recent update 2026-03-25 08:06:12 -04:00
Pasi Kallinen
f8bd79354c Add a history menu for wizwish
Use the 'm' Prefix to make wizwish show the history menu.
Also entries wished via WIZKIT are added to the history.

While debugging, I often need to wish the same thing multiple
times, and typing or pasting it with mouse is annoying...
2026-03-25 13:46:07 +02:00
Pasi Kallinen
41b2087436 Hero has a small chance of catching items thrown at them 2026-03-25 09:35:39 +02:00
nhw_cron
0f461df338 This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-03-24 12:42:07 -04:00
nhmall
aac60db8d6 update Cross-compiling for Amiga steps 2026-03-24 11:46:07 -04:00
Pasi Kallinen
d78af5cec7 Add monster spell header file mcastu.h
Move the monster spell definitions there, and use hackery
(similar to objects.h) to generate enum and data from
the header file.

I have not tested Windows, VMS, or Amiga builds.
2026-03-24 17:26:24 +02:00
nhmall
d929adc85c warning fix in sp_lev.c
In function 'create_monster',
    inlined from 'lspo_monster' at sp_lev.c:3385:5:
sp_lev.c:2169:32: warning: 'tmpmons.m_lev_adj' may be used uninitialized [-Wmaybe-uninitialized]
 2169 |             if (mtmp->m_lev + m->m_lev_adj > 49)
      |                               ~^~~~~~~~~~~
sp_lev.c: In function 'lspo_monster':
sp_lev.c:3217:13: note: 'tmpmons.m_lev_adj' was declared here
 3217 |     monster tmpmons;
      |             ^~~~~~~
2026-03-24 10:05:48 -04:00
nhmall
39a4111104 Merge branch 'amiga-port' of https://github.com/ingpaschke/NetHack into NetHack-3.7 2026-03-24 07:53:39 -04:00
nhmall
4991339655 don't abort clean if target cross-compile directory isn't there 2026-03-24 07:49:38 -04:00
Ingo Paschke
ced24f6fc9 Remove dead -DLUA_32BITS=1 flag
luaconf.h hardcodes #define LUA_32BITS 0 which overrides the
command-line flag. m68k-amigaos-gcc supports long long so 32-bit
mode is not needed anyway.
2026-03-24 12:49:14 +01:00
Ingo Paschke
a398a9bdc7 Use NetHack's util/uudecode instead of system uudecode 2026-03-24 12:49:14 +01:00
nhw_cron
ab04f5455d This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-03-24 07:38:08 -04:00
nhmall
7f8f7c54dc Files identification update 2026-03-24 07:13:04 -04:00
nhw_cron
875efba210 This is cron-daily v1-Jan-12-2026. 000files updated: Files 2026-03-24 07:01:58 -04:00
nhmall
507f526b43 remove duplicate entry in .gitignore 2026-03-24 05:48:51 -04:00
nhmall
14c5f318e1 Add a fixes3-7-0.txt entry for Amiga build pr1494
Build instructions in sys/amiga/README.amiga

The Amiga cross-compile support makes the following file changes to
the repository:

 rename {outdated/include => include}/amiconf.h (96%)
 create mode 100644 sys/amiga/README.amiga
 rename {outdated/sys => sys}/amiga/amidos.c (91%)
 rename {outdated/sys => sys}/amiga/amidos.p (100%)
 rename {outdated/sys => sys}/amiga/amifont.uu (100%)
 rename {outdated/sys => sys}/amiga/amifont8.uu (100%)
 rename {outdated/sys => sys}/amiga/amigst.c (100%)
 rename {outdated/sys => sys}/amiga/amii.hlp (100%)
 rename {outdated/sys => sys}/amiga/amimenu.c (100%)
 rename {outdated/sys => sys}/amiga/amirip.c (93%)
 rename {outdated/sys => sys}/amiga/amistack.c (55%)
 rename {outdated/sys => sys}/amiga/amitty.c (97%)
 rename {outdated/sys => sys}/amiga/amiwind.c (90%)
 rename {outdated/sys => sys}/amiga/amiwind.p (100%)
 create mode 100644 sys/amiga/bmp2iff_host.c
 rename {outdated/sys => sys}/amiga/clipwin.c (100%)
 rename {outdated/sys => sys}/amiga/colorwin.c (100%)
 rename {outdated/sys => sys}/amiga/grave16.xpm (100%)
 create mode 100644 sys/amiga/nethack.cnf
 rename {outdated/sys => sys}/amiga/winamenu.c (94%)
 rename {outdated/sys => sys}/amiga/winami.c (94%)
 rename {outdated/sys => sys}/amiga/winami.p (87%)
 rename {outdated/sys => sys}/amiga/winchar.c (78%)
 rename {outdated/sys => sys}/amiga/windefs.h (98%)
 rename {outdated/sys => sys}/amiga/winext.h (100%)
 rename {outdated/sys => sys}/amiga/winfuncs.c (86%)
 rename {outdated/sys => sys}/amiga/winkey.c (89%)
 rename {outdated/sys => sys}/amiga/winproto.h (88%)
 rename {outdated/sys => sys}/amiga/winreq.c (95%)
 rename {outdated/sys => sys}/amiga/winstr.c (95%)
 create mode 100644 sys/amiga/xpm2iff_host.c
2026-03-24 05:43:46 -04:00
nhmall
aa90cd5cd8 Merge branch 'amiga-port' of https://github.com/ingpaschke/NetHack into NetHack-3.7 2026-03-24 05:37:17 -04:00
Ingo Paschke
2979030af1 Use NetHack's util/uudecode instead of system uudecode 2026-03-24 02:37:02 +01:00
Ingo Paschke
c5dfd1fc5c Fetch BSD regex from GitHub at build time
Replace bundled Spencer regex with a fetch-regex build step that
clones https://github.com/garyhouston/regex.git, generates the
required .ih and regex.h headers via mkh, and copies the result
into sys/amiga/regex/.

Usage: make CROSS_TO_AMIGA=1 fetch-regex

The fetched sources are not tracked in git.
2026-03-24 01:21:00 +01:00
Ingo Paschke
cb0b11be11 Add portable utilities for creating tiles, add AmigaFont to symbols
- bmp2iff_host: convert nhtiles.bmp to Amiga IFF tile files. Uses
  the AMIV UI palette in pens 0-15, remaining pens filled with tile
  colors sorted by frequency.
  Usage: bmp2iff_host -planes N input.bmp output.iff

- xpm2iff_host: convert XPM to IFF for tomb.iff (RIP screen).
  Adapted from xpm2iff.c, Copyright (c) 1995 Gregg Wonderly.

- Auto-select tiles32.iff (5 planes) or tiles16.iff (4 planes)
  based on screen color depth at runtime.

- Fix NO_GLYPH in amiv_lprint_glyph: return early to prevent
  blitting with uninitialised data (caused black spots).

- Add AmigaFont symbol set to dat/symbols for AMII text mode.
2026-03-23 21:11:56 +01:00
Ingo Paschke
cee390482c Add BSD POSIX regex for Amiga
Add Henry Spencer's BSD regex implementation (from ixemul) to provide
POSIX regular expressions for the Amiga port, enabling menu coloring
and config file pattern matching.

Copyright (c) 1992 Henry Spencer, The Regents of the University of
California. BSD license.
2026-03-23 20:48:28 +01:00
Ingo Paschke
2d597cb9fa Revive Amiga port for NetHack 3.7
Update the Amiga Intuition window port (AMII/AMIV) for the 3.7
window_procs API. Key changes:

- Update all window function signatures for 3.7
- Add assembly trampolines for AmigaOS register-based callbacks
- Convert all K&R function definitions to C99
- Add cross-compilation build system (cross-pre1/pre2/post.370)
  using bebbo's m68k-amigaos-gcc with -noixemul -std=gnu17 -m68000
- Clipping fixes: viewport centering, simplified ScrollRaster,
  duplicate Ctrl-R suppression, glyph buffer invalidation
- Add menucolor support in menu rendering
- Move native txt2iff.c and xpm2iff.c to outdated/
- Add nethack.cnf and README.amiga
2026-03-23 20:48:06 +01:00
Ingo Paschke
7b89255ea8 Move Amiga port files from outdated/ to sys/amiga/
Move the active Amiga source files back into their proper locations.
Legacy native build files (Makefile.ami, Build.ami, etc.) remain
in outdated/ as they are not used by the cross-compilation build.
2026-03-23 20:46:56 +01:00