If we ever want huge maps with COLNO or ROWNO larger than signed char,
this will at least allow the game to compile and start when typedef'ing
xchar to int. Trying to use huge maps exposes more bugs.
Try to set the initial window sizes to be big enough to show the
full welcome line in the message window when the Qt settings
(Preferences on OSX) specify Large font (Huge/Medium/Small/Tiny
seemed ok but I wasn't systematic about checking them).
While at it, I added a long comment about the status window format
and noticed a bug with experience formatting there. Again only
seemed to matter for Large font but the change to fix ignores font
size.
Plus add a couple of Qt "issues", one old and one just discovered.
If a monster threw a cocktrice egg that hit and petrified another
monster, the hero would credit (experience) and blame (possible
alignment penalty, &c) for it.
Fixes#410
Using 'ladder' as a variable conflicts with 'struct flag flags'
because of a macro in rm.h. Also remove or hide a couple of
unused variables.
The hack.c diff is unrelated; just a reformatting bit that I had
laying around.
Use a linked list to store stair and ladder information, instead
of having fixed up/down stairs/ladders and a single "special" (branch)
stair.
Breaks saves and bones.
Adds information to migrating objects and monsters for the dungeon
and level where they are migrating from.
Breaking a wand didn't require the hero to have free hands.
That's definitely a bug when they're both welded to the same
two-handed weapon. It's debatable when welded separately to
a one-handed weapon and to a shield but simpler to pretend
there's no such distinction.
This also makes glass wand join balsa wand as "fragile". Hero
doesn't need as much strength to break them as other wands and
the wording for breaking them is slightly different.
My fixes entry initially had a trailing space. When I took
that out, I spotted a couple of others so take those out too.
When wielding a two-handed weapon, Qt's paper doll shows uwep
in the shield slot as well as in the weapon slot to reflect
that it's occupying both hands. Make the shield slot's copy
be a mirror image of the weapon's tile so that it looks less
like wielding two weapons.
Attacking a concealed mimic at range by applying a polearm
could make the hero be stuck to that mimic in addition to
bringing it out of hiding. Only do that when adjacent.
This also adds a new sanity check when setting u.ustuck.
It may get triggered by other sticking activity since only
attacking has been tested. The check must be explicitly
enabled by setting the wizard mode 'sanity_check' option.
Fixes#408
Some eggs and tins could cause an out of bounds index into the
mons[] array. Post-3.6 bug: the faulty part of the test is only
relevant for 3.7 genetic engineer monster. Earlier versions just
called pm_to_cham() which does it's own index validation.
Fixes#406
Text window search behaved very strangely: at some point after
selecting [Search], entering a search string, having the string
entry popup go away, and having the search performed, but before
the result could be shown, the text window got pushed behind the
main window (map+messages+paperdoll+status). Clicking on the
main window's minimize button hid the main window and gave access
to the text window behind it. That was still functional even
after having been inaccessible; another search could be performed
and/or it could be dismissed. I still don't know what causes
that or how to properly fix it, but using raise() is a workaround
to bring it to the front where it belongs. Unfortunately you can
see it go away and come back so searching for text is distracting.
Allow <return> (when not searching) to dismiss all text windows
including RIP. Accept ctrl+[ as ESC.
Make text window searching be case-insensitive.
Searching wouldn't find a match on the first line of text. Now
it will.
This also includes an attempt to fix github issue #400 (typing a
pickup command while "things that are here" popup text window is
displayed seems to hang the program), but since I can't reproduce
that, I can't tell whether the fix works. The issue description
says that pickup started executing and "things here" couldn't be
dismissed which is different from "things here" being behind the
map waiting for it to be dismissed. The attempted fix is for text
window handling to tell Qt that it wants control of the keyboard,
so nethack shouldn't see any attempted pickup command.
Some enhancements to the widget used to get player input for
getline() and also menu search and text window search.
give caller control of [cancel] and [okay] button names;
give caller a say in how wide the string input box should be
instead of basing that on the length of the prompt string
(needs more work...);
use fixed-width font for displaying the user's input;
clean up the widget layout a little bit.
src/Makefile needs a dependency update for Qt (not included).
ignitable() was excluding magic lamp and then every place that
used it did so as 'ignitable(obj) || obj->otyp == MAGIC_LAMP'
so just include magic lamp.
I noticed that while hunting for an explanation for report #K2734
where returning to a previously visited level triggered the
warning "begin_burn: unexpected eggs". I've decided that the
zombie apocalypse is probably the cause. It inserted a new type
of timer in the list of such but it didn't bump EDITLEVEL to
invalidate save and bones files which relied on indices into the
old list. I'm not sure whether we should bump that now.
A couple of colors used by the Qt hitpointbar didn't look very good.
Switch to lighter green because the named value for that is too dark.
It was using the wrong value for orange; the right one isn't too dark
after all.
Take care of a Qt TODO: when using 'popup_dialog' and entering
a count during a yn#aq question, change the default answer button
from 'n' to 'y' since ending the count with <return> accepts it.
The overview code could reveal the true alignment of an altar
if hero saw a mimic pretending to be an altar on that spot, or
reveal junk for the alignment when mimicking at altar on some
other spot.
Avoid passing macros that might evaluate their arguments more
than once to other macros which might also do that. The hidden
code expansion can easily get out of hand (although in this case
it was modest).
Also, get rid of the unused MSA_foo alignment values since two
of them had the values swapped. Lastly, make Amask2align() more
robust in case a value with the shrine bit set gets passed to it.
Tweak the Qt character selection widget format a bit. Forcing
the 'logo' string to be taller has resulted in stretching the
window enough to fit all the roles without a scrollbar. (On my
monitor on my OSX system, that is. It won't necessarily be an
improvement for anybody else but shouldn't break anything.)
The TODO item about making it taller so that role list fits is
still there.
For Qt's character selection widget, only allow the [Play] button
to be used when the character name field is non-blank. When that
field is blank, show "(required)" there.
Catch up with SYSCF for checking generic names like "player".
Fix up handling for some conditionally unused variables.
If player got Qt's saved game selection widget at startup but
picked "new game" there, the save file for the last character
in the list of saved games would be clobbered with the new
character's game if a save was performed. It wasn't necessarily
easy to spot because saved game selection shows the character
name from inside the file rather than from the file name, so the
next restore would look normal except for one older character
missing.
Noticed while testing: when you used the character selection
widget (either by picking "new game" in saved game selection or
because there aren't any save files), if you blanked out the
name field or it was already blanked because a generic name like
"player" had been specified, then clicked on "play", the program
would get stuck in a loop somewhere. I didn't try to figure out
where, just changed qt_askname() to revert to original name if
it ended up with a blank one.
This fixes the Qt popup widget for selecting among saved games.
The character name from each applicable save file is shown in a
button and clicking on one of those buttons restores corresponding
file. Previously all the buttons were written on top of each
other so only the final name was visible and the button for the
initial name received the click. The widget also has [quit] and
[new game] buttons.
This fixes restoring an existing save file if no character name
is supplied on the command line in the options. It does not fix
the problem where picking [new game] remembers the file name of
the last saved game in the popup's list and overwrites that file
(after requesting confirmation to do so) if/when you eventually
save. The resulting file will contain the character just saved
but be named for the earlier one. It may not be obvious because
on subsequent restores it will list names from inside the files
rather than deduce those from file names, so the clobbered/
misnamed file will just show up as the former new character.
I'm not sure whether any yn_function() calls include ampersand
in the list of acceptable choices but if any did, the button
for that character would have shown up blank. (Clicking on it
would have successfully produced '&' as player's input though.)
Add support for the 'hitpointbar' to the Qt interface. Rather
than rendering the status title (name+rank or name+monster_species)
using inverse video for leading substring to produce distinct left
and right sides, draw a horizontal bar above that field.
The left portion (current health) is thicker and uses red for <10%
or <5hp, orange for <25% or <10hp, yellow for <50%, green for <75%,
blue for <100%, and black for 100%.
The right portion (missing maximum health) is thinner and runs
from white (paired with red), light gray (paired with orange),
dark gray (with yellow), plain gray (which turns out to be darker
than dark gray, with green), dark blue (with blue), and black (but
black is never shown for injury portion because that's suppressed
when at full health).
Qt already supports a square frame around the hero's map tile that
changes color according to health. Turning the hitpointbar option
Off or On has no effect on that.
With to-be-3.7, if game ends without any achievements, the conduct
disclosure prompt is the same as it has always been
Do you want to see your conduct?
If it ends after attaining one achievement (probably entering the
mines or acquiring the second rank title when gaining Xp level 3)
you're asked
Do you want to see your conduct and achievement?
which looks awkward after the fact if 'y' reveals multiple conducts.
Instead of deciding whether to pluralize "conduct(s)", simplify the
prompt when one or more achievements have been attained to be
Do you want to see your conduct and achievements?
That works even when there is only one achievement.
When a monster used a fire horn or frost horn to attack the hero,
the feedback claimed that the attack was being directed at itself.
The error occurred in code that was added to 3.7 during 3.6
development but wasn't present in 3.6.x so fixes entry is in the
"exposed by git" section.
Monsters with rust attacks (rust monster) and corrosion attacks
(black pudding, gray ooze) can eat or otherwise destroy iron bars
but xorns could only move through the iron bars spot without being
able to eat the metal there. Change xorn to eat bars instead of
phazing through them. Lets rock moles eat bars too.
Hero polymorphed into a rust monster would eat bars if trying to
move to their location but couldn't do so if already there (maybe
was in xorn form and now in rust monster form). Xorns could pass
through them but not eat them. Allow hero metallivores to eat
bars at the current location via 'e', similar to eating food off
the floor. Hero as rock mole behaves like rust monster.
When a zombie (or lich) kills a monster in melee without a weapon,
the monster can rise few turns later as a zombie.
The only creatures that can be zombified are ones that actually have
a zombie counterpart monster. A zombie cannot turn a jackal into
a zombie, for instance. But it could turn a shopkeeper into a human
zombie, or a dwarf king into a dwarf zombie.
Zombies will fight with monsters that can be turned into zombies.
Originally this was a SliceHack feature, but this is based on xNetHack
version of it, with some modifications.