Commit Graph

2267 Commits

Author SHA1 Message Date
PatR
906818f5cb wishing for containers
Noticed while investigating the broken chest whose lock was already
broken:  wishing for locked, unlocked, or broken chest (or large box)
was treated as asking for something unknown.  Add support for those
three prefixes, although they only have meaning for chest and box.
If more that one is specified in the same wish, whichever one comes
last overrides the others.

Also, "empty" was already an accepted prefix (for tins); honor it for
containers too.

Lastly, wishing for "box" failed.  Give a large box instead.  I went
back and forth about whether to do the same for "small box" and ended
up not including it, but turns out that small/medium/large prefix for
globs ends up making "small box" and "medium box" match "box" which
has now become a synonym for "large box".  I'm not sure whether that
is a bonus or a bug; small box is clearly not the same thing as large
box, but getting the only available box when asking for any box seems
better than claiming not to understand the request.
2018-03-19 17:59:24 -07:00
PatR
0419f097f1 fix #H6960 - redundant feedback for '#force'
When using #force at a spot which has a broken or unlocked chest (or
large box) whose lock state has been previously discovered, avoid
|There is a broken chest here, but its lock is already broken.
|There is an unlocked chest here, but its lock is already unlocked.
by suppressing "broken"/"unlocked" from the chest description for
that particular message.

We might still want to change "broken chest" to "damaged chest" but
I don't think there should be any reference to its lock as the reason
it's broken or damaged.  The fact that #loot, #force, and applying a
key still treat it as a container is sufficient to reveal that it
functions as one.
2018-03-19 15:48:46 -07:00
nhmall
7238803b25 revert box naming 2018-03-19 07:13:07 -04:00
nhmall
8ce08d3cf9 3rd time fixes36.1 2018-03-18 09:09:08 -04:00
nhmall
168d5171b7 typo in fixes36.1
locks -> lock
2018-03-18 08:52:34 -04:00
nhmall
e7ed6508cd more message adjustments to chests with broken locks 2018-03-18 08:49:25 -04:00
nhmall
e07c6b5b77 broken large box wording change
> When you try to #force a large box or chest whose lock is already broken from a
> previous #force, the game tells you "There is a broken large box here, but its
> lock is already broken." It's minor, but this implies that the box being broken
> is separate from the lock being broken (as well as that the box itself *can* be
> broken).

change the wording to "lock-damaged box" and suppress
", but its lock is aleady broken" when "lock-damaged box" has
already been displayed.

(Nobody particularly likes the wording "lock-damaged box" either, but at least
it seems less misleading)
2018-03-17 23:05:52 -04:00
PatR
877f403734 fix plural of box
"boxen" may be hacker slang for plural of "box", but "foxen" is
definitely not the plural of "fox".  Restrict the "ox"->"oxen"
entry to full word "ox", not "*ox" suffix.
2018-03-15 13:05:08 -07:00
Pasi Kallinen
aac0a21a7e Make graves white
Making them easy to distinguish from walls.
2018-03-15 18:42:25 +02:00
Pasi Kallinen
a785663c58 Attempting to open down or at yourself is same as #loot
Trying to open at the same location as you did nothing,
make it loot instead. Apparently #looting is also annoying
when using vi-keys.

Based on code by aosdict
2018-03-14 20:15:21 +02:00
PatR
c28b44c27c prevent pline() segfault
The use of debugpline() in tty_curs() got me wondering what would
happen if debugpline() was called while pline() is in progress.  I
don't know how to trigger the bad coordinate situation, so I put an
unconditional debugpline() in the NHW_MESSAGE case of tty_putstr()
and used DEBUGFILES=wintty.c to enable it.  Instant segfault, and
the backtrace was short and not useful so the stack might have been
clobbered.  I didn't spend any time trying to figure where or why
the segfault occurred.

Change pline() so that if it is called while the previous pline()
hasn't finished yet (ie, recursively), use raw_print() and return
early.  The raw_print message isn't very useful--it pops up wherever
the cursor happens to be, just like the cursor position bug that has
been an issue recently--but does get delivered without any segualt
and isn't completely useless if DUMPLOG is enabled and you save or
quit before the message buffer gets recycled.  Message readability
situation could be improved but avoiding the segfault was my goal.

Putting any debugpline() into *_raw_print() would be inadvisable....
2018-03-13 11:27:04 -07:00
PatR
152d9e7705 fix #H6955 - wielded potion 'object lost' panic
Report classified this as 'segfault' but it's actually a controlled
panic().  When hero has lycanthropy and is wielding a potion of unholy
water while in human form, if that potion is boiled then it triggers
a transformation to beast form which in turn causes wielded weapon to
be dropped.  When the code unwinds back up through potionbreathe() to
destroy_item(), the boiled potion won't be found in inventory any more
and useup() -> useupall() -> freeinv() -> extract_nobj() panics.
2018-03-11 12:39:01 -07:00
nhmall
6fc324798e H5239 not hypocrisy to speed up your own pet
H5239 1100
2018-03-10 13:17:21 -05:00
PatR
4328cf49ef fix prayer infinite loop
Reported internally, if a prayer resulted in 'fix all troubles' and
one of those was TROUBLE_STUCK_IN_WALL but safe_teleds() couldn't find
any place to relocate the hero to, nothing was done and STUCK_IN_WALL
would be found again as the next trouble to fix.  Since safe_teleds()
eventually resorts to trying every single spot on the map, there was
no other result possible than failing to find an available spot again,
nothing would be done, and next trouble would be STUCK_IN_WALL, ad
naseum.

I started out with a fix that looked for secret corridors to expose
and doors to open, to make more space available, then try to move a
monster off the level, then try digging out rock and/or walls and
smashing boulders.  None of those guarantee success and I got bogged
down by the digging case.  This was going to be a last resort if all
of those still failed to make somewhere to move the hero, but for now,
at least, I'm skipping all that other stuff and going directly to the
last resort:  give the hero Passes_walls ability for a short time, and
let him or her find own way out of trouble.  The next trouble to fix
won't be STUCK_IN_WALL because Passes_walls makes that a non-issue.

I'm not thrilled with the new messages involved but want to get this
behind me.
2018-03-03 16:46:39 -08:00
nhmall
27a7538e38 enable USE_WIN_IOCTL code unless explicitly avoided
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/unixconf.h
	modified:   sys/share/ioctl.c

github pull request #19 made reference to resulting code behaviour
being better when windows were resized when USE_WIN_IOCTL was defined.

The logic for including the necessary enabling code in the build in
sys/share/ioctl.c was an explicit "opt-in" strategy, so anything not
deliberately and explicitly listed was not able to take advantae
of the potentially useful code. The need to add #defines to that
list would have been perpetual as new platforms came online, and
unnecessarily restrictive for everything else.

This switches the logic to include the code by default now,
and thus
unless there is an explicit "opt-out" by uncommenting
AVOID_WIN_IOCTL in include/unixconf.h

Some platforms, and we have no way of knowing which ones, may have
to ensure that AVOID_WIN_IOCTL is #define'd.
2018-03-03 12:58:53 -05:00
nhmall
4029e2580a interim dungeoneer, README update 2018-03-03 10:19:47 -05:00
Pasi Kallinen
68523fe88c Add catch-all database entry for the polearms 2018-03-03 16:15:20 +02:00
Pasi Kallinen
d136ffbba6 fixes typo bit, pt3 2018-03-02 16:56:18 +02:00
Pasi Kallinen
fc74b77c94 fixes typo bit, pt2 2018-03-02 16:38:52 +02:00
Pasi Kallinen
a7df3ce4c7 fixes typo bit 2018-03-02 16:32:29 +02:00
PatR
b73d45fd66 throw-and-return for aklys
The comment I added to data.base--to explain that despite what the
short description says, an aklys wouldn't return to sender after being
thrown--was bugging me, so I've made aklyses behave like Mjollnir.
If thrown when wielded as primary weapon, it will usually return and
usually be re-wielded.  I also added a new message when either thrown
Mjollnir or thrown aklys is expected to return and fails to do so.

Most of the diff to dothrow.c is a change in indentation level.  The
amount of code needed was quite small.

Autopickup for thrown Mjollnir which had failed to return was putting
it into the quiver slot if that was empty.  Note quite an outright bug,
but it started wielded and can't be thrown if quivered, so exclude it
from the stuff that will auto-fill the quiver slot when added to invent
(post-3.6.0 issue).
2018-02-26 11:18:29 -08:00
PatR
f3aaee792f fix #H4997 - "Congratulations" -> "Well done"
Reported suggested that "congratulations" was too modern for use by
your god during ascension and that the longer phrases which were
shortened to yield it were too modest for the god to use.  Make the
suggested change.
2018-02-26 08:35:33 -08:00
keni
ef0448dd79 Merge githash 2018-02-26 09:03:12 -05:00
nhmall
8db8a14429 fixes36.1 catch-up bit for deaf whistling 2018-02-25 17:52:33 -05:00
PatR
f44ff54c7f fix #H6861 - whatis behaves weirdly with plurals
Report indicated that looking up "more info?" for "kittens" would show
the data.base entry for "kitten" and then when the display window was
dismissed, another "--More--" prompt for a empty second display window
would occur.  Looking up "2 arrows" from a closely-seen object on the
map behaved similarly.  User correctly diagnosed that the two-pass
lookup left the 'found_in_file' flag set from the first pass during
the second but that just clearing that resulted in "I have no info
about such things" on the second pass.  The code is on the convoluted
side and needed an extra flag to handle 'seen on first pass' in
addition to clearing found flag after the first pass.  I also added a
check to skip the second display if primary and secondary keys don't
match each other but both find the same entry.  To test it, I tried
"a +0 aklys named aclys".  That found the aclys entry but failed to
find "+0 aklys", so I added another change to have the key massaging
remove +/-N after removing "a", "an", or "the".

If "Want to see more info \"" + lookup string + "\"?" was too long,
the prompt buffer passed to yn() was being left uninitialized.  Also,
test for too long was based on BUFSZ but yn() complains (to paniclog)
if the prompt is longer than QBUFSZ.  Make checkfile() construct a
truncated prompt if the lookup string is too long.

I untangled some spaghetti by making all the 'goto's be forward.  It
didn't help a lot but did simplify a few early returns by having them
jump to a common exit instead of replicating the file close.
2018-02-24 19:35:56 -08:00
keni
cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
nhmall
65655d2cee Incorporate some git information into NetHack
Incorporate some git information into NetHack so that it
is potentially visible to a player. That's useful when
collecting details about the version that they are
running and, if the gitinfo is present, it can tie the
code to a specific git commit in the repository.

This modifies 'makedefs -v' to check for the presence of a data file
called dat/gitinfo.txt and if it is there, parse out its
contents, then write additional lines to include/date.h beyond
what 'makedefs -v' was previously putting in there, similar to
this sample:

      #define NETHACK_GIT_SHA "0c84e564c78e2024e562d39539376ce2e21eec8e"
      #define NETHACK_GIT_BRANCH "NetHack-3.6.0"

The contents of an appropriate dat/gitinfo.txt are as follows,
and trailing/leading whitespace is not significant:

      githash = 0c84e564c78e2024e562d39539376ce2e21eec8e
      gitbranch = NetHack-3.6.0

It also adjusts the contents of the 'v' version information to
include the additional git info when available.

Also adds some hooks DEVEL/hooksdir and a perl file to DEVEL
for simplifying and automating the deposit of dat/gitinfo.txt
so that it generally reflects the most current git commit.

DEVEL/gitinfo.pl can be used to build dat/gitinfo.txt at any
time without doing a commit, merge, or checkout.
    	perl DEVEL/gitinfo.pl

command line --version and -version support

To complement the extra information being provided in the
version by the 'v' command, this also adds support for the
following new command line arguments:
    --version
     -version            Output the NetHack version string then exit.

    --version:paste      Output the NetHack version string and also copy it to
     -version:paste      the platform's paste buffer for insertion somewhere,
                         then exit.

If the paste variation of -version is requested on a platform that
hasn't incorporated any support for the capability, it will deliver
the version info then an error message, prior to exiting.

To support the extended -version:paste variation, a port needs to:
    - provide a port-specific routine to perform
      the paste buffer copy in a port code file.
    - #define RUNTIME_PASTEBUF_SUPPORT in the include/portconf.h header file.

    --skeleton--
    void port_insert_pastebuf(buf)
    char *buf;
    {
    	/* insert code to copy the version info from buf into
    	   platform's paste buffer in a supported way */
    }

macosx and Windows have both added support for RUNTIME_PASTEBUF_SUPPORT
2018-02-23 19:34:44 -05:00
PatR
7a3ff2be54 fix "wonky secret door" in Cav quest
The earlier fix for hoizontal vs vertical doors would have worked for
the Cav quest (lower left in leader's chamber) where door handling
occurs before wallification, but it wasn't working for minend-3 (east
wall of entry room) which already had walls.  The more recent fix
solved the second case but broke the first one.  I think this actually
solves both modes of door classification.  I hope....
2018-02-23 07:25:37 -08:00
PatR
094c7f5c1b fix #6870 - clairvoyance feedback
Forwarded to the contact form from a github "issue":  in some
circumtances clairvoyance lets you move the cursor around to examine
the revealed map, and when doing so starts with "for instructions
type '?'".  When extended clairvoyance periodically kicks in, as
opposed to explicitly casting the spell, there wasn't sufficient
context to figure out what it was prompting for (unless you actually
answer '?' to get instructions).  Depending upon the most recent
message, it could seem like quite a strange prompt.  Explicitly give
a clairvoyance-specific message prior to that.

Also, the getpos() help was including suggestions for targetting
monsters that aren't appropriate when it's being used for detection.

do_name.c has had quite a bit of formatting rot slip in since 3.6.0.
This fixes up the stuff I spotted by manual inspection.
2018-02-21 22:44:15 -08:00
nhmall
25d17eb62c fix some typos mentioned downstream 2018-02-19 21:32:54 -05:00
nhmall
f72f72f863 update fixes36.1 with the docall() prompt string overrun 2018-02-19 15:42:18 -05:00
PatR
859ef823d6 fix #H6867 - mail buffer overrun
Web contact report of a github pull request.  A previous fix from
same user dealt with potential crash caused by freeing mailbox data
when the mailbox came from getenv("MAIL").  getenv() doesn't return
a value obtained by malloc so freeing it was bad.  The fix was to
allocate memory to hold a copy of getenv("MAIL") so that free() was
valid.  Unfortunately it didn't allocate enough space to hold the
terminating '\0' so potentially corrupted malloc/free bookkeeping
data.  And the alloc+copy was being performed every time the mailbox
was checked, resulting in leaked memory from the previous check (if
MAIL came from player's environment).  Fortunately the recheck only
takes place after new mail is actually detected and reported to the
player so the leak was probably small for most folks.

This compiles for the set of conditionals that apply to me (after
taking out -DNOMAIL that the hints put in my Makefile) but I can't
test that it actually works since mail is never delivered to this
machine.
2018-02-19 11:59:14 -08:00
PatR
b5b513fb44 'Iu' vs unknown container contents
An inventory of unpaid items where more than one was present would
show
|> bag's contents    N zorkmids
if any of the items were inside a container whose contents aren't
known.  But if there was only one item (so container must be owned
by hero) the 'Iu' output menu was skipped for pline and yielded
|> scroll of magic mapping   133 zorkmids
Force the menu display if the lone unpaid item is inside a container
whose contents are unknown.

I'm not sure whether a hero-owned container can have both unknown
contents and an unpaid item in normal play.  I managed it while
trying to fix a reported problem--except I can no longer find the
relevant report--where itemized shop billing also revealed unseen
container contents (for any number of items, not just 1).  That isn't
fixed yet, but I want to get the simpler 'Iu' part out of the way.
2018-02-07 17:31:44 -08:00
PatR
e95a709663 fix #H4459 - shopkeeper/scare monster bug
Reported about 18 months ago:  standing on a scroll of scare monster
while next to a shopkeeper who was blocking the shop entrance because
hero was carrying unpaid shop goods would yield "<shk> turns to flee"
but <shk> wouldn't move.  This was a side-effect of making standing
on scrolls of scare monster be stronger than on "Elbereth" when the
latter was nerfed.  Make shopkeepers inside their own shops and temple
priests inside their own temples be immune to the effect of hero
standing on scare monster.

Also, make the Wizard, lawful minions, Angels of any alignment, the
Riders, and shopkeepers and priests in their own special rooms (ie,
all creatures that now ignore standing on scare monster) be immune to
the fright effect of tooled horns.  Innate magic resistance usually
prevented them from being scared anyway, but make it explicit.

Reading a scroll of scare monster or casting the spell of cause fear
still rely on innate resistance to avoid chasing away those monsters.
I'm not sure whether they should have the same adjustment.
2018-02-05 16:36:35 -08:00
PatR
32890d1bc1 fix 'makedefs -z' for config using FILE_PREFIX
Apply user-contributed patch to make do_vision() handle FILE_PREFIX
correctly.  It was putting that value into the filename buffer, then
overwriting it with the ordinary filename instead of appending.

Deletion of just-made vis_tab.h when creation of vis_tab.c fails would
have failed too if FILE_PREFIX had been working.

The patch was against 3.4.3 and didn't apply cleanly to current code,
but it is a staightforward fix, although the file deletion case was
buggy (failed to clear "vis_tab.c" from buffer before reconstructing
"vis_tab.h" via appending stuff).  FILE_PREFIX seems to be Amiga-only
so I've only tested the usual case where it isn't defined.
2018-01-23 00:52:57 -08:00
PatR
a40f0788bc fix object pickup
Mentioned in the newsgroup:  picked up items have stopped merging with
compatible stacks in inventory.

The commit 0c51555849 by me on January 5
|
| fix #H6713 - unpaid_cost: object not on any bill
|
| Stealing a shop object from outside the shop with a grappling hook
| would result in that item being left marked 'unpaid' after the shop's
| bill was treated as being bought and not yet paid for.  This led to
| "unpaid_cost: object wasn't on any bill" every time inventory was
| examined.  The problem was caused by handling the shop robbery after
| removing the object from the floor but before adding it to inventory,
| so it couldn't be found to have its unpaid bit cleared.
|
inadvertently caused that.  The effect was actually deliberate but it
wasn't intended to be so widespread.  Handle extract/bill/addinv/rob
sequencing differently instead of overriding inventory merging.
2018-01-21 16:30:58 -08:00
PatR
0c51555849 fix #H6713 - unpaid_cost: object not on any bill
Stealing a shop object from outside the shop with a grappling hook
would result in that item being left marked 'unpaid' after the shop's
bill was treated as being bought and not yet paid for.  This led to
"unpaid_cost: object wasn't on any bill" every time inventory was
examined.  The problem was caused by handling the shop robbery after
removing the object from the floor but before adding it to inventory,
so it couldn't be found to have its unpaid bit cleared.

When investigating this I came across a more severe bug:  if the hero
had never entered the shop, the shopkeeper's bill wasn't initialized
properly and add_one_tobill() could crash while attempting to execute
    bp->bo_id = obj->o_id;
because 'bp' was Null.
2018-01-05 01:23:56 -08:00
PatR
66242a0691 fix #H6707 - double "gush of water hits" messages
When polymorphed into an iron golem (or gremlin with 2/3 chance),
triggering a rust trap would give "a gush of water hits <you or some
body part>" and then give a second "a gush of water hits you" when
dealing with golem or gremlin effects.  That made it seem as if the
trap was hitting twice.  This removes the redundant messages.  (Rust
trap against monster iron golem or gremlin didn't have them.)
2018-01-01 17:14:37 -08:00
PatR
46da4b5e90 fix #H6704 - appearance of mimic's replacement
If mimics were genocided before loading a special level which
contained mimics with specific appearances, whatever random monsters
took their place also end up having their intended appearance.
monst->cham uses NON_PM rather than 0 to mean "not a shapechanger".
2017-12-31 03:38:29 -08:00
PatR
9f12aeb8ab uncursing prayer vs helm of opposite alignment
Implement the suggestion that hero's current god not uncurse a worn helm
of opposite alignment when prayer result is fix-worst-cursed-item or
uncurse-all-cursed-items since doing so makes it easy for hero to switch
to another god.  The second boon will still uncurse non-worn helms of
opposite alignment since that has no effect on how easy or hard it is
for the hero to change alignments.  (The first boon only applies to worn
items plus luckstones and loadstones; non-worn helms aren't applicable.)
2017-12-29 16:20:05 -08:00
PatR
860cdf6625 playing music while impaired
Newsgroup discussion mentioned that it was possible to open the castle
drawbridge with musical notes even while confused.  There was already
some handling for confusion:  improvisation treats magical instruments
as their mundane equivalents.  This takes if farther:  when stunned
or confused or hallucinating you'll always improvise instead of being
given a chance to choose notes.  Being stunned now behaves the same
as being confused in regards to magical instruments (possibly/probably
it should prevent playing music altogether).  Hallucination gives
different feedback at start but still allows magical playing.
2017-12-28 15:40:11 -08:00
PatR
6857372f45 fix #H6624 - missile miss message redundancy
Excess verbosity for multi-shot throwing/shooting by monsters.
 The Green-elf shoots 2 elven arrows.
 You are almost hit by the 1st elven arrow.  The 1st elven arrow misses.
 You are almost hit by the 2nd elven arrow.  The 2nd elven arrow misses.
Just give one or the other of the miss messages.  If it reaches the
hero's location, give the first.  If it lands somewhere else, give the
second.  (It might be possible to get both if hero is displaced and
the monster thinks he/she is behind his/her actual location.  I'm not
sure.)

Also, only say "you are almost hit" if it is true:  the dieroll nearly
got past your armor.  Otherwise, say "The Nth arrow misses you."
2017-12-24 14:00:49 -08:00
PatR
062748c695 fix #H6648 - can't wear via 'W' but can via 'P'
More fallout from allowing W/T on accessories and P/R on armor without
combining them outright.  If poly'd into verysmall or nohands critter,
'W' yields "don't even bother" before even prompting what to wear, but
'P' would prompt for an accessory and then wear armor if that was what
got picked.  Now 'P' will still prompt, in case it's for an accessory,
but picking a piece of armor no longer wears that armor.

'W' still doesn't even prompt, so won't allow accessories as well as
no armor.  I'm not sure whether that should be changed.
2017-12-23 15:42:20 -08:00
PatR
f296c6605d fix #H6628 - secret doors display as wrong wall
A relatively recent change to make secret doors within horizontal walls
become horizontal doors after discovery was making some secret doors
that should have remained vertical become horizontal too.  While still
hidden, they got displayed as horizontal wall segments in the midst
of vertical walls.  Example was the "Catacombs" (minend-3) variant of
mines' end.  The hidden door on the east wall of the entry room was
shown as horizontal, while another one on the west wall of that same
room was correctly vertical.  This fix uses different criteria to
decide horizontal vs vertical, partly because I couldn't understand
how the previous code was supposed to work.

Hidden doors now seem to display as correctly oriented walls and once
discovered seem to become correctly oriented doors.  I tested by
checking quite a few special levels (and some regular ones)--but not
all--with '#terrain d'.  Plus some searching to unhide secret doors
while using a custom symbol set that displayed closed horizontal doors
(S_hcdoor) as '=' and vertical ones (S_vcdoor) as '"'.
2017-12-21 10:04:18 -08:00
PatR
c2fb384a5d rehumanizing while Unchanging
When hero poly'd into paper golem "burns completely" he is rehumanized
even if he has the Unchanging attribute.  A comment states that that is
intentional, but there was no explanation given to the player.  Report
that "your amulet of unchanging failed" when rehumanization despite
Unchanging happens.  (Don't ask me how or why it fails; I don't know.)
2017-12-14 16:39:21 -08:00
PatR
892f210c1e fix #H6610 - completely burnt paper golem
When a monster killed a paper golem with a fire attack, the player was
told that the golem "burns completely" yet it might still leave some
blank scrolls as 'corpse'.  The fix for that was one-line, but several
other death-by-fire situations which didn't report "burns completely"
were also leaving scrolls:  fireball spell or scroll of fire or other
fire explosions (if any), also wand of fire.  Fire trap and poly'd
hero with fire attack were already suppressing 'corpse'.
2017-12-14 16:22:36 -08:00
PatR
20accd4bb7 fix #H6597 - genocide exploit
Self-genocide (own role or race) while polymorphed sets u.uhp to -1
so that you'll be killed during rehumanization.  I found a couple
of places which were testing (u.uhp < 1) without checking polymorph
state, and one of those was where monster movement decides whether or
not to attack.  This bug seems to have been present since start of
the second cvs repository, so has been around for quite a long time
without anybody letting on that they'd noticed.  So it probably isn't
a very effective exploit, although it would certainly make ascending
without wearing armor become much more feasible.

There are bound to be other places which examine u.uhp directly
instead of '(Upolyd ? u.mh : u.uhp)' but I only checked m*.c.
2017-12-09 00:36:19 -08:00
PatR
99f5bbc59e fix #H5590 - pets not shown on dumplog map
When ascending or escaping from the dungeon, adjacent pets are moved
onto the 'mydogs' list so that they can be included in the score and
mentioned as being with hero in the final messages.  But keepdogs()
was caled to do that before the known portion of the map was drawn
in the dumplog file, so adjacent pets were missing.  Defer that until
after the map has been dumped so that pets will still be present.
2017-12-08 23:06:25 -08:00
PatR
3f9522041c fix #6598 - monster briefly rendered as hero
When swapping places with a pet, the hero's coordinates are changed
before some tests which might disallow the swap, and if the pet was
a hidden mimic or was trapped and became untame, the attempt to draw
the revised pet or former pet would actually draw the hero and have
that mistake be visible during the message about not swapping.  That
last bit only occurred when the pet couldn't move diagonally (due to
being a grid bug or to being unable to squeeze through a tight space).
Also, spoteffects for arriving at a new location took place even
though the hero hadn't changed position.
2017-12-08 14:12:35 -08:00
PatR
d7f26afba8 more #adjust (#H6571)
Make the suggested change that only adjusting something into its own
slot be the way to collect/merge compatible stacks with it, instead
of any #adjust without a split count.  This removes the previous
special case for a count that matches the stack size.  Having to
know the exact count was not a burden on the player, but being able
to move things around without merging with other stacks makes more
sense than the original behavior or the hack to work-around that
behavior.
2017-12-05 03:38:23 -08:00