Commit Graph

11016 Commits

Author SHA1 Message Date
copperwater
5d73b2be08 Adjust rooms in Medusa levels to account for player monster statues
There is code in fixup_special for stocking Medusa's lair with statues
of players from the leaderboard. It makes two assumptions: that there
will always be at least one room defined on Medusa's level, and that
the statues should be placed in the first room defined. In the process
of removing prefilled, some of these rooms suddenly became non-rooms,
and this caused problems. This commit ensures that the regions for
turning into rooms to hold the statues are present and come first.

In the process of writing this commit, I discovered a bug: the statue
stocking code for medusa in fixup_special naively chooses the spot at
which to place its final statue by selecting independent x and y
coordinates with somex and somey. This is responsible for a statue
occasionally being embedded in a wall or in iron bars on medusa-2 and
medusa-4: the rooms defined to receive statues are irregular, and some
of the possible coordinates happen to be walls, bars, and water.

The proper fix here is to add lua functionality so that the level
designer can specify that they want a leaderboard corpse or statue, and
remove the medusa special case from fixup_special, but that's rather
out of scope for what I'm doing here.
2020-09-27 18:54:15 +03:00
copperwater
f8ff58ed7e Fill special rooms recursively rather than only at top level
The fill_special_rooms function was only stocking two types of rooms:
top-level rooms in g.rooms, and their immediate subrooms. If there were
a special room 2 or more levels down, it would not get filled. (No
special levels currently define such a special room, so this bug is
latent.)

To address this, I changed fill_special_rooms to iterate only through
the top level rooms, and fill_special_room to recurse through all of its
subrooms (if any) before filling itself.
2020-09-27 18:54:15 +03:00
copperwater
0fef8fce9f Unify all special level filling options
The existing system was a confusing mess of competing names (filled,
needfill, prefilled, etc) that had varying semantics, with prefilled
being the worst offender as it meant at least three different things in
various contexts. This commit unifies everything in the code under
"needfill", and everything in Lua under "filled", which defaults to 0
everywhere.

This also removes the second argument to fill_special_room; that
function now just checks the needfill of the room it's passed. As
before, a filled == 2 value is used for a special room to indicate that
the room should set the appropriate level flag, but shouldn't actually
be stocked with anything (for instance, King Arthur's throne room); the
difference is that this now comes directly from the lua script instead
of being manipulated within sp_lev.c.

The prefilled argument had one use case that is occasionally used in the
level files: if the level designer had specified an ordinary region with
prefilled = 1, it would become a room to control monster arrivals on a
level -- monsters that arrive within the bounds of a room are supposed
to stay there.
However, not all of the places where the comments indicated this was
being used were using it correctly; I tested this by letting a few
monsters fall through the knox portal (they're supposed to be
constrained to the entry room) and waiting a hundred turns, then going
through the portal; they were not constrained to the room and had
"wandered" through its walls.
Instead of trying to maintain this special case, I have added an
optional "arrival_room" boolean argument to des.region, which forces it
to create a room for the purposes of constraining monster arrival.

I have gone through and replaced occurrences of prefilled in lua files
with the appropriate filled option (or arrival, as needed). In some
cases, that resulted in questionable regions such as a filled ordinary
area in a non-themeroom (I just dropped the filled=1), or an area which
didn't do anything, not even lighting (which I deleted).
2020-09-27 18:54:15 +03:00
copperwater
f57588cef1 Make fill_special_room avoid themed rooms
No code in this function would actually do anything if it were called on
a themed room, but since it is pretty clearly intended for the "regular"
special rooms, it's probably best to explicitly avoid themed rooms as
well.
2020-09-27 18:54:14 +03:00
copperwater
0b2b0965a8 Allow themed room subrooms to be filled
I noticed that any subrooms created within a themed room were bare -
they never had any monsters, objects, traps, or anything really,
regardless of whether filled = 1 was set on them. As a result, they're
pretty boring.

It turns out that the code in makelevel() responsible for stocking
ordinary rooms with stuff only looped through g.rooms, and completely
ignored subrooms. (Subrooms would not get stocked with items by virtue
of being part of the larger room; I tested this by dialing the item
generation in rooms way up, and none of those items ever got placed in a
subroom.)

To fix this, I've extracted the code that populates an ordinary room
into its own function, fill_ordinary_room, and made it recurse into its
own subrooms. (I also renamed fill_rooms and fill_room to include the
word "special" in their names, because they only deal with special
rooms.) Note that since special rooms follow a separate codepath, an
ordinary subroom of a special room won't get stocked; perhaps these
functions should be unified in the future.

The fill_ordinary_room code is pretty much a verbatim cut and paste from
makelevel, so there is not currently any consideration for the size of
the subroom or the fact that it is a subroom with respect to how many
monsters, traps, objects, etc get placed.

I'm not sure whether other things such as stair selection will ever
select themed room subrooms, or whether they too only look at g.rooms.
2020-09-27 18:54:14 +03:00
copperwater
3e0c0f6f0f Fix the "stuck pets" bug (github issue #329)
This commit is intended to fix the bug where a pet will get fixated on
an unmoving monster and stop moving itself. I described the cause in the
github issue; the gist is that the pet AI chooses the unmoving monster
as its ranged target, doesn't do anything when it calls mattackm
(because it doesn't have ranged attacks), then returns a value
indicating it didn't move and can't take further actions.

I initially implemented a fix that refactored mattackm to distinguish
between "attacker missed" and "attacker did nothing", which the pet AI
could then use to determine whether the pet could continue doing things.
But then I realized that if mattackm is called with non-adjacent
monsters, a return of MM_MISS more or less unambiguously indicates that
the attacker did nothing (because the ranged functions it calls like
breamm don't actually check to see whether the target was hit, just
whether the monster initiated the attack.) So, this only really needed
to check whether mattackm returned with MM_MISS.

I also found a probable bug in mattackm, in that the thrwmm call isn't
treated the same as breamm or spitmm. In the latter two, mattackm
returns MM_HIT even though it doesn't check whether the ranged attack
actually hit its target. But there was no logic doing the same for
thrwmm, so this commit also adds that. (Otherwise, a pet could possibly
use a ranged weapon attack and then get to keep moving on its turn.)
2020-09-27 18:14:49 +03:00
PatR
87e2d974ef Qt popup_dialog tinkering
Some changes to the YnDialog widget used when popup_dialog is On.

If a button is labelled with a space, it just looks like an
unlabelled button.  Switch to "Spc" for space, "Ent" for \n and
"Ret" for \r.  (The last two aren't completely logical but I
haven't seen any dialogs that need them and they'll be better
than "^J" and "^M" if there are such.)

For yn#aq dialogs, preload a grayed-out "#" in the count widget.
Just for show; has no tangible effect.

The count widget should return long rather than plain int.
2020-09-26 19:35:37 -07:00
PatR
5df5079700 peacefuls witnessing attack against peaceful mon
The short exclamations ("Gasp!", "Why?", &c) led to ambiguity
about which monster was vocalizing them.  Use full sentences
which refer to the speaker.  It can become quite a bit more
verbose but is less likely to lead to confusion.  Perhaps it
should cut those off after a modest number of them have been
issued?
2020-09-24 00:44:07 -07:00
PatR
9faaa1b25d pull request #345 - theme room dimensions
"When a room is created and passed down to a contents function in
Lua, the width and height properties of that room are computed by
subtracting lx from hx and ly from hy, which means e.g. a room
which is 8 floor squares wide and 5 tall appears to the contents
function as having a width of 7 and height of 4.  This patch fixes
that off-by-one."

I don't understand the details here:  should a room's dimensions
include its boundary walls or just the inner amount?  This change
didn't seem to cause any problems so I've put it in.

Closes #345
2020-09-23 17:57:19 -07:00
PatR
10d80eb150 Qt's 3.6 status conditions
Replace the blank placeholder icon with individual placeholders
for Stone, Slime, Strngl, Deaf, Lev, Fly, and Ride.  They're just
40x40 tiles showing solid color (different for each) holding white
block letters spelling the condition.  For the first four of those,
the text runs from upper-left to lower-right, for Lev and Fly the
text runs from lower-left towards upper-right, and for Ride it's
horizontal.  Not particularly exciting but better than blank.  We
still need real artwork to make them be similar to the older
conditions.

Also moves the two petmarks and the pilemark from qt_xpms.h to
qt_map.cpp.  The marks and the assorted status icons are all
static arrays, and including that header in two source files
meant that they were all duplicated unless the compiler or linker
was smart enough to discard the unused ones.
2020-09-23 16:40:26 -07:00
PatR
b672511513 Qt status fix: 'showexp'
For Qt, experience points weren't shown when enabling 'showexp'
option because they were conditional upon '#if EXP_ON_BOTL'.  That
got eliminated prior to 3.6.0 so wasn't defined for qt_stat.cpp.

When displayed, show Exp as Level:Xp/Exp instead of as a separate
status field.  This has the intentional side-effect of omitting it
when hero is polymorphed and status shows HD instead of Xp.

Label the six characteristics in mixed case instead of all upper
case:  Str, Dex, and so forth.
2020-09-23 05:21:31 -07:00
PatR
5346d8f9e9 makedefs: hide conditionally unused routine
Avoid a new build warning for the default configuration.
2020-09-23 03:03:46 -07:00
nhmall
c1ebfb730c whitespace bit 2020-09-22 10:28:22 -04:00
nhmall
29c558ed12 follow-up bit; ensure the mkstemp() file is unlinked 2020-09-22 10:11:51 -04:00
nhmall
1a0ee44760 unique temp files for makedefs invocations (GitHub issue #391)
As reported in https://github.com/NetHack/NetHack/issues/391
if make was invoked with -j, makedefs instances could end up running in
parallel and could trample on each other's grep.tmp tempory files.

Default to using mkstemp(); allow a port runtime library implementation
that lacks mkstemp() to define HAS_NO_MKSTEMP to revert to the old behaviour.

Provide a work-alike mkstemp() implementation for windows Visual Studio build
in mdlib.c so there is no requirement to define HAS_NO_MKSTEMP there.

Fixes #391
2020-09-22 09:03:15 -04:00
PatR
cf482f1f42 fix #K2203 - animals can talk
The code for peaceful monsters witnessing the hero attack another
peaceful monster and getting angry had a 20% of making them gasp in
surprise or exclaim "why?" in shock.  It was only requiring them to
have humanoid shape rather than checking for speech capability, so
peaceful zruty or minotaur, possibly other animals, could exclaim
comprehensibly.  Other things which shouldn't talk, like mummies,
would behave similarly.

This categorizes how a bunch of MS_foo types should react.  It has
only been lightly tested.
2020-09-20 18:38:31 -07:00
PatR
101940f7d1 Qt non-issue
Any key bindings in player's run-time config file will already be
in place by the time the Qt menus are constructed.  Those menus
will use the new key assignments rather than the defaults, so not
a bug.
2020-09-18 17:30:48 -07:00
PatR
239620ffd7 fix pull request #386 - monster interaction
The previous teleport scroll fix was mislabeled with this pull
request number.  Too late to fix that now; should have been

Closes #307

Now...  Interaction between voluntarily busy hero (resting,
searching, and so on) with approaching monsters to decide whether
to stop had some inconsistencies.

Really closes #386
2020-09-18 15:53:43 -07:00
PatR
81ec2bfa2a pull request #386 - discovering teleport scroll
Since teleporation gives a "you matrialize" message even when
arriving close by, the old behavior of not learning a scroll of
teleportation when you land quite close to your original spot
no longer made sense.  Always [almost] discover teleport scroll
when reading it.

Also adds one-shot teleport control when reading a blessed scroll
of teleportation.  I changed that to be prevented when hero is
stunned, same as with full-fledged teleport control.

I reworded or reformatted several of the comments.  And removed
the EDITLEVEL increment in patchlevel.h; save and bones file
contents are not affected.

I've also added an unrelated comment about reading mechanics to
doread().

Closes #386
2020-09-18 15:34:29 -07:00
PatR
7592eebdf6 another Qt "issue" 2020-09-17 19:02:23 -07:00
PatR
4acdbaaf72 more Qt menu
The #enhance menu revealed a couple of menu problems for Qt.

Items flagged with "*" or "#" were showing tiny "..." instead of
the flag character.  An existing problem rather than something
caused by yesterday's overhaul patch.

The "(Skills flagged by "*" may be enhanced when you're more
experienced.)" legend line was causing the regular entries to be
formatted strangely (their skill name column was much too wide).
That was caused by me dropping something (special case for header
lines during tab-separation handling) in yesterday's patch that
I mistakenly thought wasn't needed.
2020-09-17 10:47:33 -07:00
PatR
82689eb048 silence a Qt complaint
The save file selection widget was issuing a complaint to stderr:
|QLayout: Attempting to add QLayout "" to QDialog "", which already
| has a layout

This shuts that up, but doesn't fix the broken save file selection
so I haven't added a fixes37.0 entry.
2020-09-17 02:49:37 -07:00
PatR
5401d18c4b Qt menu overhaul
handle preselected item in pick-one menu; picking it returns that
  item rather than toggling it off and returning nothing, picking
  something else only returns the other thing (was returning first
  of the chosen item or the preselected item, foiling core's attempt
  to deal with both and giving wrong result whenever the preselected
  one came first--like pick-an-attribute for menu colors);

when handling typed input, check selector letters before menu
  command keys so that special "letters" '-' (fingers, hands, self)
  and ':' (look inside container) that are specified by a few menus
  can be chosen by keyboard;

menus were using default line heights which are excessively tall,
  effectively making them be double spaced and using more screen
  space than should have been needed; reduce height to 60% of what
  it was, still a bit taller than regular spacing; look at ^X--which
  is rendered via menu--before and after to see the difference;

start with count column empty instead of 6 spaces; grow it as counts
  get entered; reset to empty if [all], [none], or [invert] is used;
  treat intermediate counts as long rather than int; right justify
  formatted count values;

simplify creating menu return data (pick-one doesn't need separate
  handling);

for pick-one menus,
  enable [ok] button if there is one preselected item,
  enable [all] button if there is only one item (may never happen),
  enable [none] if there is a preselected item (menu remains active
    if [none] is used to clear the preselection);
  enable [invert] if there is one item (may never happen; should
    allow two items if one of them is preselected--definitely does
    happen--but that wouldn't work as intended without code changes);

honor pending count if an item is selected by clicking its checkbox
  (already done for typing its letter or for clicking another part
  of item's menu line);

accept <delete>/<rubout> in addition to <backspace> when backing out
  a digit as a count is being typed;

accept ^[ as well as ESC key for cancelling count or entire menu;

honor 'menucolors'=false to ignore any defined menu color patterns.
2020-09-16 15:51:33 -07:00
PatR
81771ccda3 new file win/Qt/Qt-issues.txt
Record a bunch of Qt stuff before I forget it all.  It's probably
too late:  I'll bet I've left some things out.

Doesn't include several menu problems that I've already fixed but
not checked in yet.  (I don't have any other Qt changes pending.)
2020-09-16 02:04:15 -07:00
PatR
eaf2af0b58 unexplored terrain on Qt map
Qt's map hadn't been updated to draw unexplored locations with
the unexplored glyph so was still using solid stone instead.

Column 0 should be removed but I'll leave that for someone more
adventurous; I did it for curses and for X11 but am going to
pass here.  It's very noticable after magic mapping but is only
"bad" (by wasting space) if clipping is being performed.
2020-09-15 07:26:42 -07:00
PatR
33964801c8 history formatting
Qt's text window for 'history' was unexpectedly wide and it turned
out that that was to fit in one excessively wide line.  tty has
been formatting it by splitting it into one normal sized line
followed by an excessively short line.
2020-09-15 03:51:20 -07:00
PatR
ba4a639de0 pick-a-color tweak
Move a minor conditional out of a short loop.  I only bothered
because I wanted to fix a comment.
2020-09-11 23:59:20 -07:00
nhmall
a3be3f79b6 syntax bit 2020-09-12 00:32:05 -04:00
PatR
239b7aaf66 pick-a-color in color
Similar to how the pick-an-attribute menu for menu colors and
status highlights shows the attribute names using the attribute
so that you can see how it looks (or whether it is supported),
have the pick-a-color menu show the color names in the
corresponding color.  Does so by temporarily removing any
user-specified menu colors and setting up another list of such
for matching color names.

Forces the 'menucolors' option On while the pick-a-color menu is
in use, then restores the previous setting along with the user's
menu colorings.  Might need some way to avoid setting that for a
configuration where colors don't work.
2020-09-10 16:01:18 -07:00
PatR
5772069fb7 hints/*.2020 vs CFLAGS, take 3...
Avoid use of GNU make's 'override' feature by requiring
'make CCFLAGS=-O' to replace -g from the make command line instead
of 'make CFLAGS=-O'.  Note the extra 'C' in the spelling.

Revert the previous umpteen MORECFLAGS+= back to normal CFLAGS+=.
2020-09-09 14:40:22 -07:00
PatR
e9df383bd6 boolean option processing
In addition to 'true', 'yes', 'on' and 'false', 'no', 'off',
accept 1 and 0 for the value of a boolean option.  Other numeric
values are rejected rather than treated as non-zero.

Relax the parsing for true, false, yes, no to accept one or more
letters instead of requiring at least three for true and false
and full word for yes and no.  Full word is still required for
on and off.

Don't report two errors for the same mistake:
 |% NETHACKOPTIONS='legacy:flase' ./nethack
 | * Illegal parameter for a boolean.
 | * Unknown option 'legacy:flase'.
 |2 errors in NETHACKOPTIONS.
is changed to
 | * 'legacy:flase' is not valid for a boolean.
 |1 error in NETHACKOPTIONS.
2020-09-09 14:19:48 -07:00
PatR
d3181e20ba qt_map.cpp source formatting
Clean up the Qt code a bit.  The only intended change is to use
a different check for being polymorphed.
2020-09-08 13:26:13 -07:00
PatR
0b67fd60df hints/{linux,macOS}.2020
A recent change was intended to allow specifying
  make CFLAGS=-O
on the command line to override our default of -g, but it didn't
work as intended.  foo=bar and foo+=bar don't work if foo has
been given a value on the command line.  The first was expected
behavior but the second wasn't, at least for me.  GNU make allows
'override foo+=bar' to cope with that.  (We're already implicitly
requiring GNU make for the linux and OSX hints.)
2020-09-08 12:36:13 -07:00
PatR
a48b4aa8ba fix #K1963 - warning after placing worm tail
Report described this as a panic triggered by the sanity_check
option, but that's because it was running under the fuzzer, which
escalates any impossible() to panic(), rather than because nethack
panicked.

I couldn't find anything wrong--which doesn't mean that there
isn't something wrong--with place_worm_tail_randomly() and
random_dir().  They use xchar for map coordinates which should be
fine as long as no negative values are generated and I couldn't
discover any such.  The suggested fix of changing xchar to int
might indicate a compiler bug (although the odds of that are low).
The bogus coordinate of -15000 in the report suggests that
 typedef short int schar;
(which changes xchar too) is being used in the configuration but
I don't recall having any problems attributable to that.

This switches from xchar to int as a side-effect of replacing the
offending code entirely.  The new code might produce an 'ny' of -1
before goodpos() rejects it, so xchar would be inappropriate now.
The old code is commented out via #if 0 _after_ changing it from
xchar to int.

This also adds an extra sanity_check for worm tails, unrelated to
the current bug.  I'm not aware of any instance where it fails.
EXTRA_SANITY_CHECKS needs to be defined for it to do anything.
2020-09-08 03:03:03 -07:00
PatR
f20a6bb491 special level's lit state when changing terrain
Part of pull request #308:  when using des.terrain to set terrain,
default for lit state becomes 'unchanged' rather than 'unlit'.
des.replace_terrain already operates that way.  Replace lit state
magic numbers -1 and -2 with SET_LIT_RANDOM and SET_LIT_NOCHANGE.

Also change SET_TYPLIT() to not operate on map column 0 and move
it from rm.h to sp_lev.h.  It never belonged there, is only used
in sp_lev.c, and now because of the SET_LIT_ macros it couldn't be
used anywhere else unless sp_lev.h gets included too.
2020-09-06 16:17:33 -07:00
PatR
b48ebbfe15 update unix Makefile hints 2020-09-05 13:28:46 -07:00
PatR
bce7834f71 polearm context
Move clearing of polearm context from migrate_to_lev() to lower
level relmon().  Add missing transfer of polearm context from
old mon to new mon in replmon().  These days it seems to only be
used for creating a monster from saved traits, so polearm context
in it should be moot.
2020-09-05 11:35:28 -07:00
PatR
13cf558e6b more hunger checks
I don't know what I was thinking before.  'moves + rn2(20)' can
be simplified to just rn2(20) and ignore moves altogether.
2020-09-04 15:29:22 -07:00
PatR
bf3697c122 hunger checks
Eliminate the feasibility of micro-managing ring hunger by swapping
back and forth between a pair of rings of slow digestion.  Wearing
one at a time causes normal ring hunger (wearing both at once just
increases such hunger), but being able to put on the second ring
and take off the first just before the 1 out of 20 turns where it
affects hunger, then vice versa a few turns later, is an insanely
tedious way to avoid any hunger at all, made possible by the 'time'
option.  Make the turns where extra hunger get imposed be randomized
so that that can't be done reliably.

Also closes githib issue #336:  hunger caused by melee attacking
adds ring and amulet hunger a second time for that turn.  That has
always been intentional behavior; now the amount varies for any
given attack due to the randomization, but on average is the same
as before.

Closes #336
2020-09-04 14:31:44 -07:00
PatR
152187870c Qt input overhaul
Enable existing wc_popup_dialog option.  Use it in yn_function()
instead using a mystery value which apparently used to live in Qt
Settings but isn't there anymore so couldn't be turned on or off.
Also replaces conditional USE_POPUPS which isn't defined anywhere
either so presumably came from CFLAGS and only supported "yn?",
"ynq?", and "rl?" with hardcoded Qt popups rather than using
NetHackQtYnDialog.

Doing that revealed that the popup dialog for ynaq was in pretty
bad shape.  It's functional but still needs a lot of work, beyond
the limited Qt/C++ capability I possess.  The KeyPress issue which
accepts <shift> as input, thereby preventing <shift>+<character>
from being typed during ynaq prompting, is particularly nasty.

Append the ynaq dialog's response to the message line containing
the corresponding prompt similar to what's now done for regular
yn_function().

Add getlin() prompt+response to the message window.
2020-09-03 19:01:36 -07:00
PatR
aaa4c1d37c potential infinite loop on hangup (ring prompt)
Core issue noticed while working on some Qt stuff.  If hangup
occurred while prompting for "right or left?" ring finger, the
hangup yn_function() would return ESC and the accessory-on routine
would not see '\0', 'r', or 'l' so reprompt.  Endlessly.
2020-09-01 04:11:01 -07:00
PatR
a2782d47f5 Qt without tiles again
"Qt without tiles" (commit ae4c180cf6)
two weeks ago accidentally took out a line that should have stayed.
2020-08-31 15:47:49 -07:00
PatR
2a762ab641 Qt prompt responses in message window
When Qt issues a prompt string in the message window, update it
with the player's response once that has been obtained.
2020-08-31 00:30:36 -07:00
PatR
1f953fa959 Qt message [un]highlighting
The Qt interface highlights the last message issued (using a
mechanism for selection, as if for copy+paste or similar operation)
but it was staying highlighted until another message was eventually
given.  Having an old message seem to stick around is annoying and
is particularly bad when the message is a prompt.  If the player's
answer doesn't cause a message to be shown then it seems as if the
prompt is still pending.

This removes the highlighting (by bulk unselecting) once the player
gives another input keystroke or mouse click.

It would be much better if the selecting/highlighting was for all
messages issued since last time highlighting was cleared.  Figuring
out how to do that correctly is more effort than I want to expend.
2020-08-30 22:50:02 -07:00
PatR
3cd21e1d4f Qt keyboard fixups
Make ASCII control characters ^[, ^\, ^], ^^, and ^_ work on Qt,
at least partly.  Mainly for ^[ to be treated as ESC, which works
if you're aborting a count on the map but doesn't cancel out of
menus [yet?].  I didn't attempt to make ^@ send NUL.

Also, fix the hardcoded macros (activated by F1: rest 100 turns,
F2: search 20 times, and Tab: ^A to do-again).  The first two sent
'n' before the count so wouldn't work as intended with number_pad
off, and the third was executing twice as if Tab sent two ^A's
instead of just one.  Resting and searching might have been getting
duplicated too; I don't know how to simulate the relevant keys.
(I temporarily swapped definitions for F2 and Tab to test the
number_pad fix but hadn't done that earlier when I discovered the
Tab bug.)
2020-08-30 16:44:39 -07:00
PatR
0902d83d52 qt_win.cpp cleanup
Started out fixing a comment typo and ended up removing a bunch of
unnecessary stuff, plus a little bit of lackluster reformatting.
2020-08-30 16:00:18 -07:00
PatR
fae20ad3e2 Qt menu fix
Menus have [ok], [cancel], [all], [none], [invert], and [search]
buttons across their top but the [all], [none], and [invert] choices
didn't redraw the menu after making changes to the pending selections
so it seemed as if they weren't doing anything.  Subsequently picking
[ok] revealed otherwise.

[search] is broken (instead of accepting a search string, the letters
I type are being used to toggle individual entries as I type).  This
doesn't attempt to address that.
2020-08-28 17:31:33 -07:00
PatR
1df2fdca44 fix pull request #379 - is_displacer()
A couple of places which could/should have been using existing
is_displacer() macro weren't.

No change in behavior.

Fixes #379
2020-08-27 17:38:11 -07:00
PatR
3f81bd5af6 fix pull request #380 - turning into slime
The turn-to-slime countdown is one of the ones that uses turns/2
to stretch the sequence out longer and it was displaying the hero
as green slime when there was another turn before it happened.
(In theory anyway.  I could not get my hero to be shown as slime
and still have one move left, even when hasted.)

Make the hero mimic green slime starting on the last turn before
being polymorphed instead of next to last.

Fixes #380
2020-08-27 16:14:17 -07:00
PatR
1a11d67d58 fix commented-out debugging code
I was actually using fprintf(stderr,...) when testing and didn't
retry this bit after changing it to raw_printf(...).  It's commented
out but needs fixing.
2020-08-26 14:47:02 -07:00