Modify win/share/tilemap.c so that generated source file src/tile.c
uses similar formatting to the other sources. Mainly, avoid tabs and
use 4 columns indentation instead of 8 columns in the short routine
near the end.
tilemap.c still treats STATUES_LOOK_LIKE_MONSTERS as conditional.
The main sources made that unconditional prior to release of 3.6.0.
Make being trapped in/on/over floor block Levitation and Flying, the
way that being inside solid rock already does, and the way levitating
blocks flight.
Blocked levitation still provides enhanced carrying capacity since
magic is attempting to make the hero's body be bouyant. I think that
that is appropriate but am not completely convinced.
One thing that almost certainly needs fixing is digging a hole when
trapped in the floor or tethered to a buried iron ball, where the
first part of digactualhole() releases the hero from being trapped.
If being released re-enables blocked levitation, the further stages
of digging might not make sense in some circumstances.
I recently realized that being held by a grabbing monster is similar
to being trapped so should also interfere with levitation and flying.
Nothing here attempts to address that.
Save files change, but in a compatible fashion unless trapped at the
time of saving. If someone saves while trapped prior to this patch,
then applies it and restores, the game will behave as if the patch
wasn't in place--until escape from trap is achieved. (Not verified.)
revisit display artifact appearing to the right of status line
The prior fix for this was a bit flawed. It was only considering
the length of the last field, but what it really needed to do was
consider the placement of the last character of the last field
on the row relative to the placement of the last character of
the last field on the row previously.
If the new placement of that last character of the last field
is left of the previous placement, some clearing must be done.
Fix the situation of Flying hero failing to untrap a bear trap that
was resulting in the trap becoming hidden. Previous fix prevented
hero from moving onto the trap's location so that the reason for
hiding it didn't occur. This moves the hero and forces the trap,
so it will become unhidden again before there's any chance to notice
that it had been hidden.
Status 'Flying' conflicts with being trapped at floor level, but that
is a separate, known issue. I'll have to resurrect my unfinished fix
for that sooner rather than later.
For the searching capability offered by '# ?', use ':' instead of 's'
to activate it. Otherwise, if the player typed ':', menu processing
would handle that and would search the few menu entries (for selectors
'a', 's'--now ':', and maybe 'z') when we're interested in searching
the data displayed via many separator lines.
I left 's' as the selector for "show all, clear search" once a search
has been performed, but perhaps that ought to be switched to ':' too.
Demote #monpolycontrol and #wizdebug_traveldisplay from commands to
simple boolean options. The former has the same name, the latter
is called travel_debug. Rename #wizdebug_bury to #wizbury; it
shouldn't matter that it goes away when compiled without DEBUG.
There are now five wizard-mode boolean options: monpolycontrol,
sanity_check, and wizweight are documented in the Guidebook;
menu_tab_sep and travel_debug are commented out there.
Guidebook.mn has been tested; Guidebook.tex has not.
There's a BL_CHARACTERISTIC (-3) defined in the botl.h header file,
but it is not used in wintty.c and is now screened out along with
everything lower and everything MAXBLSTATS and above.
Description for use when an item hasn't been seen up close yet falls
back to real name if there is no separate description, but was doing
so before real name substitution for samurai.
actualn = foo;
dn = description ? description : actualn;
if (Samurai)
actualn = bar;
So player saw a flail (via 'dn') until dknown bit got set, then
nunchaku (via 'actualn' after it got set to samurai-specific value).
Wait until after substitution of Japanese real names before falling
back to real name when there's no description.
Iron bars can be destroyed in some circumstances (hit by yellow
dragon breath or thrown potion of acid, being eaten by rust monser
or black pudding, or by poly'd hero in those forms) and should act
like walls for diggable/non-diggable purposes. But they aren't
walls, so the non-diggable flag was not being set for them by the
special level loader. Even once that was changed, they weren't
being handled consistently. Some places checked for non-diggable
directly (zap_over_floor of acid breath, potion of acid hitting bars)
and started working as intended, others used may_dig() to check
non-diggable (poly'd hero attempting to eat iron bars) but it doesn't
handle iron bars, and still others didn't check at all (bars-eating
monster who moved onto bars location in expectation of eating those
next).
Get rid of bold/non-bold distinction in #wizidentify inventory menu
by only showing items which aren't yet fully identified instead of
full inventory with bold for unID'd. Support for bold text might
be lacking.
I was considering this even before the report that X11 menus ignore
attribute. The "_ - (use ^I for all)" menu entry is still present,
but it could be discarded in favor of '.' to pick everything via
ordinary menu selection.
Most shop messages accurately identify the shopkeeper even when he
or she can't be seen, but some also include a pronoun reference that
ended up as "it" or "its" when not seen. Extend pronoun selection
so that visibility can be ignored: noit_mhe(mon), noit_mhim(mon),
and noit_mhis(mon). Note that despite being called noit_foo(),
those will still return "it" if mon is neuter.
"Accurately identify shopkeeper" is misleading if the hero is
hallucinating; a random shopkeeper name is used then. noit_foo()
yields the pronoun applicable to the actual shopkeeper and might
not match the gender of a hallucinatory name. That could be fixed
in a couple of ways (add shk_mhe()/shk_mhim()/shk_mhis() and either
pass them the randomly chosen name so that they can figure out the
appropriate gender, or just have them use a random gender whenever
hallucinating) but I don't think that's worth bothering with.
A bunch of shop messages needed noit_foo(); only a couple of those
have actually been tested. A bunch more were using shkname() at
the beginning of a sentence where Shknam() should be used instead.
(All the existing shk names are already capitalized so there's no
noticeable difference.)
The three places outside shk.c and vault.c which directly use
pronoun_gender() have been successfully tested.
known bear trap forgotton by player polymorphed into a flyer
The original report stated:
"I located a bear trap as a human and just ignored it
for the time. I polymporphed into a Vampire Lord, then
went to #untrap the bear trap. On the first attempt,
I stood beside the trap and attempted to #untrap. I
received the 'Whoops!' message and automatically moved
onto the trap square as a result. The bear trap vanished!
I obviously wasn't trapped since I'm polymorphed into a
flying monster, but the trap glyph was no longer present.
The glyph looked like regular floor - as if I had
untrapped the bear trap and taken the trap with me."
The trap was actually still there but became hidden intentionally
for other valid scenarios, but was an unintended side-effect for
this scenario.
Fix it by failing the #untrap operation for a Flyer earlier on,
and in a more benign manner, since the Flyer ultimately doesn't
end up in the trap anyway. You'll still get the "Whoops!",
followed by a message, but that's as far as the "failed" #untrap
attempt will go under the circumstances.
drum of earthquake causing deafness inappropriately
Address a drum of earthquake inconsistency reported 2017-03-23:
"Drum of earthquake does not make you deaf. Leather drum or depleted
drum of earthquake does."
BL_RESET usage for window port status line updating
Like BL_FLUSH, only send BL_RESET if the window port has
indicated it wants them via setting the appropriate WC2
bits in its window_procs structure. Update documentation.
Fixing rnd_otyp_by_namedesc() for use by get_shiny() broke its use
by readobjnam(). Make the chance for 0% generation objects to have
non-zero chance of being selected be a parameter.
fix github issue #134 - display of migrated objects
Fixes #134
An invisible hero (who can't see invisible and doesn't have autopickup
enabled) going down stairs to an object which fell down those stairs
will see the stairs instead of the object on them. Missing newsym()
in obj_delivery() when objects aren't being passed through scatter().
The wishing code uses 'oc_prob + 1' so that probability 0 (never
random) objects are eligible to be selected if their name matches
a wish; collecting 'shiny' objects shouldn't do that. (No effect
on play since there aren't any shiny objects with 0% random chance.)
rn2() takes int, and total oc_prob for entire objects[] array is
15000, so don't accumulate the target probability in a long.
The original report complained that gremlins seemed impervious to
Sunsword's light yet a flash from a camera caused them to cry out in pain
despite "The long sword named Sunsword begins to shine brilliantly!"
This commit does two things:
1. A dmg bonus is applied against gremlins using a lit Sunsword.
2. Gremlins will generally avoid the light emitted by Sunsword.
There's a few minor flavor bits thrown in also.
It is understood that this effectively makes Sunsword provide
"gremlin-proofing", but the gremlin myth and Sunsword's characteristic
feature pretty much demand it.
This outstanding bug was complicated slightly because the same
code was used for a sleeping mon as for a paralyzed mon so
message phrasing was called into question.
Just flip the phrasing to be about what you are able to discern
under those circumstances, which is very little, and don't have
the sleeping or paralyzed monster react to the mirror.
include some fixes files from older versions in the distribution
new file: doc/fixes23.e
new file: doc/fixes30.pl01
new file: doc/fixes30.pl02
new file: doc/fixes30.pl03
new file: doc/fixes30.pl04
new file: doc/fixes30.pl05
new file: doc/fixes30.pl06
new file: doc/fixes30.pl07
new file: doc/fixes30.pl08
new file: doc/fixes30.pl09
new file: doc/fixes30.pl10
This is based on the commit for github pull request #132, which
indicates that the 'grow' pattern is reversed from what the .des
file specifies. I don't understand how this is really supposed
to work and the only place nethack uses it is on the Valkyrie Home
level, which seems to be created roughly the same both before and
after this change.
Change the phrasing when a pet grows up into another monster type:
(old) "The pony grows up into a horse."
(new) "Your pony grows up into a horse."
No effect if it has been assigned a name:
(before and after) "Foo grows up into a horse."
Eliminate a few warnings: array name used as boolean is always true,
parameter 'flags' shadows (blocks access to) global struct 'flags',
initializer discards 'const' (assigning string literal to 'char *').
Plus a couple of simplifications.
Wishing for "orange" might grant an orange, but it might give an
orange gem, orange potion, or orange spellbook instead (but never
orange dragon scales or orange dragon scale mail). Force the food
object to be an exact match so wishing always produces an orange.
This commit is an attempt to address the complaints about
the orc town variation taking away lots of stuff that is
normally available in mine town. The statement in the level
description says "A tragic accident has occurred in Frontier
Town...It has been overrun by orcs."
The changes in this commit attempt to uphold that premise,
while making things a bit more interesting and perhaps
more palatable for the player.
This update does the following in keeping with the mythos:
- While many of the orcs still remain to wander about the
level, many of the orcs took off deeper into the mines with
some of the stuff that they plundered. You may now be
able to hunt some of it down.
- Adds some appearance of this particular horde of marauding
orcs working as part of a larger collective.
- This evolves the Orc Town mine town variation into a
a feature over multiple levels of The Gnomish Mines,
rather than just the single-level "feature" that it was
previously.
- You may have to work longer and a bit harder for some
things than other mine town variations, but at least with
these changes, there is hope that some of it may be found
elsewhere.
Game mechanics notes (maybe spoily?)
- Add mechanism to place objects into limbo (okay, really
place them onto the migrating_objs list for transferring
between levels etc.) and destine them
to become part of the monster inventory of a particular
species. In this particular usage case, it's using the
M2_ORC flag setting to identify the recipients.
- At present, there is no mechanism in the level compiler
for placing objects onto the migrating objects, nor
with more sophisticated landing logic, so a somewhat
kludgy hard-coded fixup and supporting routines were used.
Some day the need for that might change if additional
capabilities move to the level compiler.
This is a NetHack-3.6.2-beta01 update. Please give it a workout.
A polymoprh zap which creates a long worm can hit and transform the
same monster again depending upon tail segment placement. Similar
behavior occurs if monpolycontrol is set in wizard mode and player
chooses 'long worm' for what to transform an existing one into (in
which case polymorph fails and zap might hit that same worm again
in another segment, prompting player to choose its new shape again).
Simplest fix would be to make tail segments be immune to polymorph,
but that would prevent players from deliberately attacking the tail
(for polymorph attacks only). Next simplest would be to make long
worms M2_NOPOLY so that polymorph can't create them, then just live
with multiple promptings when monpolycontrol is set. This fix
tracks whether a long worm has just been created via polymorph (or
explicitly retained its shape via monpolycontrol) and makes further
hits on same creature on same zap have no effect. It does so by
setting mon->mextra->mcorpsenm to PM_LONG_WORM when a long worm is
result of polymorph, and setting context.bypasses to get end-of-zap
cleanup. (It doesn't bother discarding mon->mextra if reset of
mcorpsenm leaves mextra empty.)
try to coax an error code for display on tile_file failure
If the underlying error is that Windows LoadImage() just
wasn't happy with the format of the image file, you'll just
get a 0x0 result, which won't help much.
If, however, it shows a 0x2 result that means it couldn't
find the file to load it.
The report was "doesn't kill even if unchanging", but it does cause
rehumanize() when not Unchanging, the same thing that happens when
you die due to loss of hit points. But losing the activating word(s)
and then having Unchanging retain the clay golem shape does seem
wrong, so make losing the word(s) while being unable to revert to
normal form be fatal.
Poly'd hero (without Unchanging) reverts to normal when cancelled,
so make monsters behave that way. Previously, only werecritters in
beast form were forced to human form. This changes cancellation to
make shapechangers and hiding mimics take on normal form too.
Cancelled shapechangers now behave as if the hero has the
Protection_from_shape_changes attribute and will be unable to change
their shape (after having been forced into normal form). Getting
polymorphed in any fashion uncancels them prior to giving new shape.
[There may be some newcham() situations that should be disallowed
when cancelled rather proceeding and consequently uncancelling.]
Bug report #H7156 listed three items, all relating to perm_invent:
1) it shouldn't persist across save/restore since restore might be
on a system which doesn't have enough room to display it (report
actually complained that config file setting was ignored when
restoring old games, which is an expected side-effect for options
that persist across save/restore);
2) permanent inventory wasn't updated when using scroll of charging;
3) attempts to update permanent inventory during restore could lead
to crash if it tries to access shop cost for unpaid items.
Items (2) and (3) have already been fixed. This fixes (1).
Replace 'flags.perm_invent' with a dummy flag, preserving save files
while removing it from flags. Add 'iflags.perm_invent' to hold the
value of the perm_invent option.
The win32 files that are updated here haven't been tested. Whichever
branch contains the curses interface needs to be updated; ditto for
any other pending/potential interfaces which support perm_invent.
Monsters who lost an amulet of life saving while having their life
saved wouldn't attempt to put on another amulet unless/until they
picked up some object. Likewise if they had a worn item stolen.
(There are probably other events which should re-check worn gear.)
The suggested commit had a life-saved monster re-check equipment
during life-saving which might have led to reports about them
effectively getting extra moves, especially if two-weapon fighting
or zap rebound with sequence of kill/life-save/kill-again allowed
the target to put on a replacement amulet of life-saving prior to
the second kill. It also wasn't amenable to dealing with stolen
equipment. This alternate fix sets a flag to have monster check
its equipment on its next move.
Jumping performs the placement of the last step after using hurtle()
to move to the destination, so if hurtle() triggered a trap then it
would happen twice. Report was for a Sokoban pit but it would happen
for fire traps too. Other traps would yield "you pass over <trap>"
while hurtling and then trigger the trap when landing. Have
hurtle_step() ignore a trap for the last step of a jump, leaving it
to the jump's landing to handle.
Also, give feedback when hurtling over water or lava, similar to what
happens when passing over a previously seen trap which doesn't
activate.
tty column placement of BL_HUNGER and BL_CAP could collide
Change the placement of the code that makes a replica of the
current status fields for later comparison.
A loop shortcut was causing it to be skipped under some
circumstances and that was negatively impacting the placement
of status field values that were further to the right.