Commit Graph

12590 Commits

Author SHA1 Message Date
PatR
d19e80ae2f NO_TILE_C => no USE_TILES in tile.c
Compiling with NO_TILE_C defined results in preventing USE_TILES
from being defined and that causes display.c to use alternate code.
Construct src/tile.c such that nethack links successfully if the
configuration specifies NO_TILE_C but the Makefile goes ahead and
builds tile.c, compiles it, and links with it, otherwise it conflicts
with that alternate code.  Prior to this, linking gave two complaints
about duplicate symbols and failed.
2021-12-31 13:49:43 -08:00
nhmall
eddbff351e change MacOSX to MacOS in version display 2021-12-31 16:44:15 -05:00
nhmall
07575f6344 macOS homebrew qt@5
Once 'brew update' and 'brew upgrade' had been done, the qt@5
package did become available for installation and the original
line in the hints file worked, so put it back as it was.
2021-12-31 16:06:30 -05:00
nhw_cron
af35e7ab61 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-12-31 14:28:48 -05:00
Pasi Kallinen
8db18275a6 Define engulfing_u, making clearer code 2021-12-31 21:12:21 +02:00
nhmall
776064933a linux-minimal hints was used with the CI 2021-12-31 14:02:35 -05:00
Pasi Kallinen
2591a21cf0 Leprechauns bury their gold after teleporting 2021-12-31 18:48:44 +02:00
nhw_cron
4f9e763f5b This is cron-daily v1-Jan-20-2020. files updated: Files 2021-12-31 09:47:53 -05:00
nhmall
7a44b3b52e hints updates
move out-of-date hints files to the outdated folder.

rename the hints files, and hints/include files that are currently
named *.2020 to *.370 (next release number).
2021-12-31 08:48:24 -05:00
PatR
f0d971fc2a Qt splash code
Move the handling for the Qt interface's splash window into its own
routine to unclutter the constructor for QtBind.  Also, don't load
nhsplash.xpm if OPTIONS=!splash has been specified.
2021-12-31 01:53:46 -08:00
nhmall
5ac71e66d5 sync linux.2020 topology with macOS.2020 2021-12-30 18:05:45 -05:00
PatR
3d4ebb8450 Qt map column 0
Column 0 ought to be suppressed like it is for tty and curses (not
sure about X11 or Windows GUI), but until that happens, display it as
'nothing'.  The glyph overhaul not too long ago resulted in it being
shown as a column of giant ants.

We ought to have some special 'none of the above' tile #0 that will
stand out enough to be reported and fixed.  Glyph #0 too.
2021-12-30 14:07:59 -08:00
nhmall
92879378ba remove qt-specifc hints file 2021-12-30 16:27:02 -05:00
nhmall
3cb78eaefc macOS homebrew Qt5 build fix
I had to revert this line in order to build on macOS Monterey.
2021-12-30 15:36:59 -05:00
nhmall
5d26ee0a4c Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2021-12-30 15:15:39 -05:00
nhmall
b633bf46f9 qt6 support follow-up
encompass Qt6 support in the common hints file macOS.2020 instead
of a separate macOS.2020-qt6, which had already diverged and would
likely be a maintenance headache.

From the Makefile perspective:
WANT_WIN_QT=1 will default to Qt5
WANT_WIN_QT5=1 will assume Qt5
WANT_WIN_QT6=1 will assume Qt6

You must have the appropriate Qt installed, of course.
I expect some additional fine-tuning will be needed as this gets
tried out.
2021-12-30 15:11:49 -05:00
PatR
f7c71b9f83 Qt vs C() macro
Our C() macro conflicts with Qt6 usage, so #undef C has added.  Move
that from nearly every qt_*.cpp into qt_pre.h where other similar
fixups are handled.
2021-12-30 11:29:03 -08:00
Michael Meyer
221e4a760d Fix: chameleon quickmimic not reset after eating
finish_meating was checking whether the monster in question was a
chameleon/shapechanger, rather than whether it was a mimic, in deciding
which monsters should be allowed to maintain their current appearance
once they finish eating.  This meant that true mimics had their
appearance reset, while a chameleon, vampire, etc, who ate a mimic
would maintain their appearance as a tripe ration even after they had
finished eating and resumed their normal behavior.  The result?  An
amazing living tripe ration which followed the hero around throughout
the level.
2021-12-30 21:14:08 +02:00
HMM
706b1a939b Have the '$' command include gold in your pack
In verbose mode, the gold in your wallet is totaled separately from
that in containers in your pack, and the two are listed separately.
In terse mode, just print the total of both.

Only known gold is mentioned.
2021-12-30 21:12:38 +02:00
PatR
b7688ca1cf Merge branch 'Qt6' into NetHack-3.7 2021-12-30 11:07:07 -08:00
PatR
24c9f79aa5 fixes entry for Qt6 support
I had a minor merge issue when incorporating Ray's Qt6 port from
github.com/chasonr/NetHack/Qt6 but it got resolved.  This still builds
with Qt5 (and that's the only aspect I've been able to test) but is
supposed to work with Qt6 too.  It adds a new hints file for OSX and
someone might need to create a comparable one for linux.  Or maybe
the differences can be folded into the existing hints as conditional.

Closes #525
2021-12-30 11:06:29 -08:00
George Edward Bulmer
b019f51fd2 Make amnesia drain training to appropriate level
When amnesia drains your skills the skill training would be set
to a random amount rather than a random valid amount for the new
level of skill.

This meant that, for example, you could have Master skill level in
martial arts but with the training amount of Basic.

Attempts to retrain to level martial arts to Grand Master would
then take an extraordinary amount of time compared to usual.

Fix taken from Evilhack
2021-12-30 21:04:20 +02:00
PatR
0f6ed46b8f Merge branch 'Qt6' 2021-12-30 10:56:28 -08:00
Ray Chason
1f2a1efee5 Use QApplication::desktop for screen size on Qt5
5.15 has QWidget::screen, but older versions don't.
2021-12-30 10:56:07 -08:00
Ray Chason
1f7541e496 Changes for Qt 6 on MacOS 2021-12-30 10:56:06 -08:00
HMM
0aafe11515 Don't erase Elbereth when monster steps into a pit or hole dug by you
Elbereth was fading when offscreen monsters stepped into
pits or holes dug elsewhere on the level. This was happening
because monsters falling into traps set by you were calling
setmangry() as if you had just attacked them. The behavior
made it unsafe to use Elbereth if you've dug down anywhere
else on the level, making it a bit harder to get archeologists
off the ground.
2021-12-30 20:46:06 +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
d53cd28d46 Make extended commands return defined flags
Instead of returning 0 or 1, we'll now use ECMD_OK or ECMD_TURN.
These have the same meaning as the hardcoded numbers; ECMD_TURN
means the command uses a turn.

In future, could add eg. a flag denoting "user cancelled command"
or "command failed", and should clear eg. the cmdq.

Mostly this was simply replacing return values with the defines
in the extended commands, so hopefully I didn't break anything.
2021-12-30 19:16:33 +02:00
PatR
511ce70309 add new TODO item to Qt status: tool tips 2021-12-29 11:39:57 -08:00
Pasi Kallinen
fa41d5fe66 Apply a wielded polearm with fire-command
Wield a polearm and use 'f'ire to automatically hit with it,
if there's a single valid target.
With fireassist-option, will swapweapon to a polearm.
This only applies if quiver is empty and autoquiver is off.
2021-12-29 19:40:26 +02:00
PatR
3536ede5bd makedefs.c comment typo 2021-12-29 03:16:31 -08:00
PatR
bc9cb7f7b8 no USED_SOUNDS option parsing bit
If the program is build without USER_SOUNDS and encounters any SOUND
or SOUNDDIR directive when parsing the run-time config file it only
issues an error message about the first one.  When finished parsing,
have it include suppressed ones in the count of errors encountered.
2021-12-29 02:21:13 -08:00
PatR
fdc6914926 Qt paper doll fix for two-handed weapons
Allowing optional arguments can be risky.  The recent glyph changes
added a new argument to the routine that constructs a mirror image
of a tile but not to the call to that routine.  Because an existing
argument was optional, the compiler didn't complain about the new
one being missing.

Obsolete optional 'fem' argument ought to removed but this doesn't
tackle that.
2021-12-29 02:13:34 -08:00
Ray Chason
35c12e2518 Use QApplication::desktop for screen size on Qt5
5.15 has QWidget::screen, but older versions don't.
2021-12-29 01:44:02 -05:00
Pasi Kallinen
ea0c488178 Split leprechaun avoidance into separate function 2021-12-28 19:11:30 +02:00
nhmall
2b197fbc33 Merge branch 'pr645' into NetHack-3.7 2021-12-28 08:43:07 -05:00
nhmall
67e7632e38 Merge branch 'libnethack-target-fixes' of https://github.com/dextercd/NetHack into pr645 2021-12-28 08:41:35 -05:00
nhmall
a194194039 more possible build fixes
Once again, I need to commit these first and observe the CI results
afterwards to verify the results.
2021-12-28 08:04:59 -05:00
nhmall
e9424445f6 possible build fix catch-up for Windows Makefile.gcc
Verification once CI attempts a build as no local testing capability
2021-12-27 21:43:46 -05:00
nhmall
019adaefb1 Xcode build fix 2021-12-27 21:33:01 -05:00
PatR
43317a2ef7 Qt misuse of Role_if()
The Qt paper doll highlights known blessed/uncursed/cursed items with
a color border.  It was trying to force obj->bknown for non-blinded
priest[ess] but passed the old role letter argument to Role_if()
instead of the monster number that's used these days.  It was also
potentially modifying an invent item in a way that's observable to
the player but not updating persistent inventory to show that.

Probably didn't matter though; I don't think the situation it checks
for can occur anymore.  On the off chance that it could, move the
check-and-set out of #if ENHANCED_PAPERDOLL so that same inventory
update would occur for ordinary paper doll even though that doesn't
care about displayed items' bless/curse state.
2021-12-27 14:27:35 -08:00
Ray Chason
7d8563d33a Changes for Qt 6 on MacOS 2021-12-27 13:45:54 -05:00
PatR
8b30f3e1d1 red dragon's sight
Since wearing red dragon scales/mail confers infravision, give that
ability to red dragons.  Matters when the hero is polymorphed into one.
Also give it to the Chromatic Dragon, where I don't think it matters.
2021-12-26 14:57:29 -08:00
PatR
f72ad04266 hero_seq followup
Make sure g.hero_seq has a sane value during restore before moveloop()
has a chance to update it.

Have curses use g.hero_seq for messages delivered via putmsghistory().
2021-12-26 14:40:03 -08:00
PatR
9daefde0c4 fix #K3503 - boulder-carrying monster killed twice
A giant that is carrying a boulder and standing on ice who drowns when
the ice gets melted could die a second time if the resulting pool gets
plugged by the boulder.  It results in an impossible from dmonsfree()
about bookkeeping inconsistency when dead monsters are removed at the
end of the turn.  The fuzzer escalates that to a panic.
2021-12-26 09:44:10 -08:00
PatR
80a61c6e67 curses message management
Switch from 'moves' to 'hero_seq' for tracking whether consecutive
messages were issued on the same move and for whether current move
is still same one after played has responded to --More-- with ESC.
2021-12-26 00:43:24 -08:00
PatR
5fbe1de2a7 hero_seq
'moves' is actually turns and there hasn't been any straightforward
way to track actual hero moves.  Add hero_seq for that.  It isn't a
counter but is distinct each time the hero makes a move.  I wanted
it for curses ^P support but so far use it for checking stethoscope
usage and for shopkeeper behavior when items in a shop are broken by
the hero.

Increment EDITLEVEL due to change in save file contents.
2021-12-26 00:16:55 -08:00
PatR
c4724fd271 dragon armor fix
Fix a segfault when polymorphed into a dragon and using ^X.

One inconsistency I've spotted that I hadn't noticed earlier:  if
you wear red dragon scales/mail you obtain infravision ability, but
if polymorph into a red dragon, you don't.
2021-12-25 14:31:33 -08:00
PatR
439b6b7779 dragon armor properties
Special abilities conferred by wearing dragon armor was implemented in
a somewhat half-assed fashion; extend it to 3/4-assed.  Abilities came
from wearing dragon armor but not from being poly'd into a dragon or
for monsters that were wearing dragon armor or actually were dragons.
This covers much of that.

There are umpteen calls of 'resists_foo(mon)' and some are now
'resists_foo(mon) || defended(mon, AD_FOO)' but the second part ought
to be incorporated into update_mon_intrinics() so that the extra
'|| defended()' doesn't have to be spread all over the place and the
ones being put in now could/should be removed.

While testing, I noticed that a monster wielding Fire Brand did not
resist being hit by a wand of fire.  This fixes that and should also
fix various comparable situations for other artifacts.  But so far it
has only been done for zapping (and any other actions which use the
zapping code).  Folding defended() checks into update_mon_intrinsics()
matters more than that probably sounds.
2021-12-25 10:26:44 -08:00
Pasi Kallinen
4b525374d0 Make vrocks emit a poison cloud when they flee 2021-12-25 10:51:20 +02:00