Noticed while doing rudimentary testing of the mnearto() fix for
mimics. #migratemons wouldn't add monsters to migrating_mons if
getlin() was compiled with EDIT_GETLIN defined unless you manually
deleted the invisible default value that wiz_migrate_mons() was
passing. It took a while to puzzle that one out.
The command list has conditional description of what #migratemons
does and it was using the wrong spelling of the macro used to
control that. So '# ?' described the behavior of #migratemons as
it operates without DEBUG_MIGRATING_MONS enabled even when that is
enabled, adding to the getlin() confusion.
When mnearto() places a monster, it might remove another one to make
room, then try to put that second one back. If it can't do that, it
puts that other monster onto the migrating monsters list. But having
it already be off the map interferred with regular take-mon-off-map
handling that happens when setting up a migration.
If the other monster was a hider or concealed mimic, it wouldn't be
brought out of hiding. With 'sanity_check' enabled, that triggers
a warning when the occupants of migrating_mons get checked.
Testing this requires more effort than I'm willing to expend so there
might be unexpected consequences.
Issue reported by chadministratorwastaken: persistent inventory
window didn't update if reading a spellbook caused that book to fade
to blank paper.
Issue was reported for 'curses' but it was general. The core made
the possibly-revised book type become discovered but that wouldn't
update perm_invent unless the type of book hadn't been discovered.
So if plain spellbook wasn't known yet, the persistent inventory
window did update as intended, but if spellbook of blank paper was
already discovered, the window continued to show the old book type
instead of changing to reflect the revised type (until subsequent
activity triggered another perm_invent update).
Fixes#1246
|w - wield this item in your hands
is "suboptimal" when poly'd into some form which lacks hands. Don't
offer 'w' as a choice if in a form what can't wield anything, and
substitute "claws" for "hands" when in forms that warrant it.
Include iron ball as a type of item leading to 'w - wield as weapon'
instead of falling through to 'w - wield in hands'.
Since inventory actions can be used as teaching aids for regular
command usage, change picking a potion in inventory from
|q - Quaff this potion
to
|q - Quaff (drink) this potion
When picking the uquiver item in inventory, add
|f - {Shoot|Throw} this item
and for the shoot case, tack on "with wielded <launcher>".
That makes 't - {Shoot|Throw} this item' nearly redundant (but only
for an item in uquiver slot) so tack on "(same as 'f')".
For the 'Q' choice (only offered for weapons or rocks/gems), have it
mention what the quiver is for rather than just that choosing that
menu entry would put the stack in the quiver slot.
For 'E - Write on the floor with this object', change the verb to
"Engrave" when the object is a bladed weapon, hard gem, hard gem
ring, or wand. It also changes 'floor' to surface() which might
need some refinement.
For non-weapons, change 'w - Hold this tin opener...' and 'w - Hold
this item in your hands' to 'w - Wield this...'. The concept of
holding an item in hero's hands isn't applicable in general, and in
particular any "held" item replaces wielded weapon.
For a bunch of instances of "this item", when the quantity of the
selected inventory entry is more than 1, change to "one of these
items" or "this stack" depending on how the specified action deals
with stacks.
Coming up to medusa-3 from the level below revealed that Perseus's
statue was not there. It was placed randomly in one of the three
chambers where Medusa might be rather than in the one where she
actually was. Medusa-4 behaved similarly.
Initially I was forcing the statue to be adjacent to Medusa rather
than on her spot, but medusa-1 and medusa-2 don't do that so I've
gone with a simplified revision.
Wake up a sleeping target that gets hit by chain lightning. Also,
bring mimics and hiders out of hiding.
Don't let chain lightning pass into the water on Plane of Water (or
water-wall elsewhere); not sure whether that makes sense physics-wise
but it would have feedback problems due to visibility issues. Do let
it pass over lava.
For curses, behave like tty by keeping a count of messages issued via
raw_print, then if that is non-zero issue a prompt and require the
player to acknowledge them before it erases the screen. Mainly so
that complaints during RC file processing will be seen.
For tty, force getret() to be an unconditional routine instead of
sometimes a routine, sometimes a macro which calls another routine.
Give alternate shop type names for most of the shop types that didn't
already have such. "General store" is the last remaining exception.
Only matters for automatically generated annotations for #overview.
Using #invoke on wielded or carried Sunsword and picking direction
'>' or '<' lights the hero's spot. But setting levl[u.ux][u.uy].lit
was too simplistic. Lighting on the Rogue Level operates on full
rooms when done inside a room and doesn't to anything with done in a
corridor.
litroom() gave inappropriate messages in a couple of special cases.
Reason: The following concern was raised:
"The trademark indicators were not out of sync. The Guidebook
uses footnotes for that, 'history' uses "(tm)" in the text which
works better when nethack displays the text."
@Umbire wrote:
Very simple change code-wise - if he's gonna use a yumi a hunter of his expertise should presumably have the projectiles match.
Closes#1213.
This may be useful for some build environments to avoid parallel make
issues, and artificially-concocted order dependencies, leaving the ordering
up to that specified in the Makefile.
The related makedefs options are now:
‐s Generate the bogusmon , engrave and epitaph files.
‐1 Generate the epitaph file.
‐2 Generate the engrave file.
‐3 Generate the bogusmon file.
Also resolves an existing issue encountered in doc/makedefs.6 where "and epitaphfiles"
was being produced in the result.
Have magic mapping add special rooms to known overview data. Only
affects shops and temples because they're the only rooms tracked.
Most other special rooms revert to normal rooms as soon as they're
entered so there wasn't any point in tracking them. That might no
longer be the case.
Wand of probing zapped at or through a shop door or even at a shop
wall will add the shop annotation to the overview data. That works
differently for normal shops than for subrooms in the twin business
theme rooms. I'm not sure whether any fixing is needed there since
the shop type information gets suppressed as soon as more than one
shop becomes known on a level.
Add the shop type variations used for automatically generated
annotations to the shop structure and get rid of the switch that
has been being used to pick them.
The medusa-3 and medusa-4 levels each have four possible locations
for Medusa. medusa-3 forced the downstairs to have the same location
but medusa-4 was choosing Medusa's location independently from the
stair location. So it was likly that the hero could go down to the
next level without having to deal with her.
Give a different message from "obj not free" if attempting to delete
an already deleted object. Also, skip sanity checking of in_use/
bypass/nomerge bits for deleted objects instead of clearing them when
going onto the objs_deleted list.
Eating from a stack while inventory is full drops the partly eaten
food. If over lava and it is flammable it gets used up without the
eating code being aware of that. (Dropping into a hole or trap door
shouldn't have the same problem because the dropped object is still
accessible via the migrating objects list.)
Have touchfood() return NULL if the food item gets used up due to
being dropped. By itself, that wasn't enough. Callers needed to be
updated to handle that.
I didn't look at other callers of dropx/dropy/dropz; they might have
similar issues. Perhaps they should return the dropped object or
take a pointer to an obj pointer so that there can be just one check
for obj->where==OBJ_DELETED after dropping, but their callers would
still need to updated to cope with that.
Teach obj_sanity_check() and clear_bypasses() about the new obj list.
It should always be empty when sanity checks are performed. That
might not be the case when obj bypasses are cleared, although failing
to clear bypasses for deleted objects wouldn't make any difference,
so this is mainly cosmetic.
Some code to stop a monster's zap of a wand of striking short if it
gets destroyed by hitting and destroying a drawbridge is no longer
needed with the new deferred obj deletion.
[PR #1243. Cherry picked with new commit log message. PatR]
Fixes issue where room_discovered was never called for shops
unless #overview was called while inside the shop, fixes#1241.
Issue #1241 reported by mark-mcknight-oncorps.
Triggered by commit e4026d55fb
last December: Lazy evaluation of overview info.
Closes#1243Closes#1241
A monster zapped a wand of striking, hitting a burning potion
of oil, which destroyed items in the same square, and the ray was
checking destroyed item. Similar thing with a ray done by hero.
The code currently stops checking the objects in the location
if a next object in the chain was destroyed - an improvement
would be to gather all the objects into an array and iterate
over that instead of relying on the nexthere pointer.
Pull request from disperse: moving diagonally from an intact doorway
isn't allowed but if there was a known trap at the destination and
parnoid_confirm:trap was set, player would be asked whether to move
onto the trap before not being allowed to move diagonally.
There was similar misbehavior if a trap had been armed or web spun
in a doorway and you tried to move diagonally into that doorway, not
just out of one. The pull request's one-line change fixes that too.
I modified the file manually rather than keep the PR's commit. This
also adds a couple of unrelated reformatting bits.
Closes#1242
Make object deletion work similarly to monster deletion:
it's marked for deletion (by setting the where-field to OBJ_DELETED
and moved to specific deleted-objects chain), but they're actually
freed at the beginning of turn.
This may need some more tweaking, especially in places that iterate
over object chains, but fuzzing did not find any obvious problems.
Fix a case of accessing freed memory: a monster breathed at hero,
destroying some items. The code stored the next item in the chain
(a cloak), but a ring of levitation was destroyed, causing hero to
plop down into lava, destroying the cloak. The item destruction
code then tried to access the destroyed cloak object.
Make the code check the object where-field - which will be different
if the object was marked for deletion. Also removed an extra loop
going through the whole object chain looking for the items to
destroy.
Due to integer rounding, merging two partially eaten food rations
will have wrong weight if we add the old weights together.
Recalculate the weight instead.
quan = 1, weight = 6 (6.675)
quan = 2, weight = 13 (13.35)
A mind flayer blasted a polyed hero on a pool, who reverted back
to human. The hero teleported to safety, but the mind flayer was
still thinking hero was at the old location, and tried to attack there.
Issue reported by Shrigis1: the tile for Ixoth depicts a demon that
resembles Nalzok but it ought to be a red dragon.
The issue entry included a binary tile attachment. Rather than try
to deal with that, I've cloned red dragon and included the old tile's
eyes. The issue describes them as green but they look gray to me.
(Ordinary red dragon has white eyes.)
3.4.3 had same issue. I don't remember whether Ixoth was originally
a demon but his tile seems to have always shown one.
Fixes#1239