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.
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.
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).
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.
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.
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.
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.
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.
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.
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
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
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.
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.
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.
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.
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.
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.
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.
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().
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.
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.
'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.
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.
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.