Commit Graph

736 Commits

Author SHA1 Message Date
PatR
24c9f79aa5 fixes entry for Qt6 support
I had a minor merge issue when incorporating Ray's Qt6 port from
github.com/chasonr/NetHack/Qt6 but it got resolved.  This still builds
with Qt5 (and that's the only aspect I've been able to test) but is
supposed to work with Qt6 too.  It adds a new hints file for OSX and
someone might need to create a comparable one for linux.  Or maybe
the differences can be folded into the existing hints as conditional.

Closes #525
2021-12-30 11:06:29 -08:00
Pasi Kallinen
fa41d5fe66 Apply a wielded polearm with fire-command
Wield a polearm and use 'f'ire to automatically hit with it,
if there's a single valid target.
With fireassist-option, will swapweapon to a polearm.
This only applies if quiver is empty and autoquiver is off.
2021-12-29 19:40:26 +02:00
PatR
9daefde0c4 fix #K3503 - boulder-carrying monster killed twice
A giant that is carrying a boulder and standing on ice who drowns when
the ice gets melted could die a second time if the resulting pool gets
plugged by the boulder.  It results in an impossible from dmonsfree()
about bookkeeping inconsistency when dead monsters are removed at the
end of the turn.  The fuzzer escalates that to a panic.
2021-12-26 09:44:10 -08:00
Pasi Kallinen
4b525374d0 Make vrocks emit a poison cloud when they flee 2021-12-25 10:51:20 +02:00
PatR
4eb0592959 sickness countdown
Give messages when sickness countdown has nearly expired to warn
player that hero is dying and also so that death at the end doesn't
seem so abrupt after an arbitrary period with just "TermIll" and/or
"FoodPois" on the status line.

Also, abuse constitution each turn when Sick (either variation, but
not a double amount if both).
2021-12-22 19:36:52 -08:00
PatR
29cadc0452 curses: fix "---" separators in ^P output
This one has me baffled, first how/when it happened and then why no
one reported it.  The line
 current_mesg->turn = g.moves;
vanished from mesg_add_line() at some point.  It is visible in diff
context of commit 99ed00012e from March,
2019 but I can't find any commit since that time which removed it.

[I've been using
 git log --no-min-parents --no-max-parents --patch win/curses/cursmesg.c
and then searching within the pager.  Maybe that's flaky, but if so,
things wouldn't be any less strange.]

The missing line resulted in mesg->turn being uninitialized, so when
^P compared consecutive messages to decide whether they were issued on
the same turn, arbitrary junk made them all seem to be from different
turns so "---" got inserted before every message.  I suppose that if
someone uses a malloc that zeroes the memory it hands out, mesg->turn
field would always be 0 and ^P would behave as if all messages were
from the same turn, so not show any "---" separators.  Then players
might not be aware that "---" between groups of messages was intended.

[The messages ought to be grouped by move rather than by turn, but
that's something the core would have to provide.]
2021-12-22 11:33:35 -08:00
Pasi Kallinen
b1ed92abad Apply runmode to multiturn actions 2021-12-21 17:37:48 +02:00
PatR
f08c7f2101 bullwhip and polearm attack feedback
When testing the urgent message for having weapon be snagged by a
bullwhip, in between the occasional weapon grabs (which mention
flicking the bullwhip) I saw lots of regular attacks that said
"<mon> swings his bullwhip."  That is accurate but seems odd, so
change it to "<mon> lashes his bullwhip."  Do same for the hero.

While working on that, I discovered that monsters using a polearm
for a ranged attack always showed "<mon> thrusts <a polearm>" even
for ones that aren't defined as piercing so should be swung rather
that thrust.  And they're allowed to do that when adjacent where
there isn't enough room to thrust or swing a long polearm.  Now it's
"<mon> bashes with <a polearm>" in that situation.
2021-12-21 02:56:59 -08:00
Pasi Kallinen
ef1eeed755 Give dragon armor extra effects
Dragon scales and dragon scale mails will provide some extra effects
when worn:

 - blue:   very fast speed
 - black:  level-drain resistance
 - green:  sickness resistance
 - gold:   hallucination resistance
 - orange: free action
 - red:    infravision
 - white:  slow digestion
 - yellow: stoning resistance

gray and silver don't have extra effects - those two are already the
best ones, so don't need any.
2021-12-20 23:30:27 +02:00
PatR
7ccc195155 fix #K3496 - leash description when pet changes
If persistent inventory is displayed and contains an entry for a leash
attached to a pet and the pet's type or name changes, the perm_invent
window didn't get updated to reflect the new leash information:
 x - leash (attached to <mon>)
Report was for polymorph but applied to growing into bigger form and
to being (re-/un-)christened as well.
2021-12-19 09:30:07 -08:00
PatR
9f41ab7bfe Qt paper doll fix
This fixes the broken paper doll display.  Changes for new glyphs
added code to an 'if' but not to the corresponding 'else'.

Showing map column 0 as something other than blank is still a problem.

The splash window shows a red dragon and says "loading".  I'm pretty
sure that that used to be a crisp image but it is now a fuzzy one.
It doesn't use glyphs or their tiles so shouldn't have been affected
by changes to them.
2021-12-19 03:46:21 -08:00
PatR
c5544a8011 'urgent' messages for curses
Have curses catch up with tty.  Some particular messages override
message suppression after --More-ESC (tty) or >>ESC (curses).
2021-12-18 11:07:23 -08:00
PatR
420d121f93 'urgent' messages
Follow up on some old groundwork.  For tty, if the core has designated
a message as 'urgent', override any message suppression taking place
because of ESC typed at the --More-- prompt.  Right now, "You die"
messages, feedback about having something stolen, feedback for
"amorous demon" interaction (mainly in case of armor removal), and
exploding a bag of holding are treated as urgent.

The "You die" case is already handled by a hack in top-line handling;
I left that in place so the conversion of 3 or 4 pline("You die.*")
to custompline(URGENT_MESSAGE, "You die.*") was redundant.  There
are probably various non-You_die messages which precede done() which
should be marked urgent too.

Other interfaces might want to do something similar.  And we ought to
implement MSGTYPE=force or MSGTYPE=urgent to allow players to indicate
other messages that they want have to override suppression.  But I'm
not intending to work on either of those.  I mainly wanted to force
the magic bag explosion message to be shown since a sequence of "You
put <foo> into <bag>." messages is a likely candidate for --More--ESC.
2021-12-17 17:46:49 -08:00
PatR
420afb6b1f fixes entry for pull-req #643 - historic statues
monstone() was using a hardcoded value when flagging the statue of
a unique monster as historic and didn't get updated when the corpse
and statue flags kept in obj->spe were changed last June by commit
04a8ddcce1.

Closes #643
2021-12-17 16:29:53 -08:00
PatR
f10ef7aba8 attrcurse() on 'see invisible'
If hero has intrinsic see-invisible and a gremlin steals that, the
map wasn't being updated to hide invisible monsters (until the next
iteration of moveloop() after other monsters finished current turn).
2021-12-12 11:32:09 -08:00
Pasi Kallinen
f6b7be49f4 Accessibility: give a message when teleporting a monster
Teleporting a monster only updated the map. Give a message
so blind players can get the same information.
Making a monster invisible gives the same message, if you
cannot detect invisible.
Several other places where monsters teleported themselves
now also give the same message.
2021-12-12 16:50:49 +02:00
PatR
ba255875cd shrink_glob bug when when glob is totally gone
When a wielded glob shrank away to nothing, an impossible warning:
"obfree: deleting worn obj" would be issued.

If a glob is quivered or wielded or set up as swap weapon when it
shrinks away to nothing, clear the relevant weapon slot before
destroying the glob.

Won't happen for monsters since they never wield globs.  Also won't
happen for migrating objects (which overload obj->owornmask) because
they have to have arrived somewhere in order to have their shrink
timer execute.
2021-12-10 20:16:30 -08:00
PatR
a80969f280 wizard mode polyself to "priest"
When polymorphing while already polymorphed, picking your own role
will rehumanize (wizard mode only; restores old characteristics and
experience level, unlike becoming a new man which can change those
and even be fatal if level drops below 1).  But it didn't work if
you were a priest or priestess because name_to_mon() yields aligned
cleric monster rather than cleric role.
2021-12-08 16:08:57 -08:00
PatR
5ce53f4d17 shape change while strangling
Polymorphing into a vulnerable form while wearing an amulet of
strangulation says "your amulet still constricts your neck" if your
previous form was also vulnerable or "your amulet beings constricting
your neck" if previous form wasn't vulnerable.  But a change nearly
6 years ago to have the status line be updated to say "Strangling"
during the message--instead of next status update after it--caused
the "still constricts" variation to always be given even when the
"begins constricting" was appropriate.
2021-12-08 15:31:06 -08:00
PatR
936be565d9 tracking peak maximum HP and energy
Keep track of the highest value that u.uhpmax and u.uenmax have
attained, in new u.uhppeak and u.uenpeak.  They aren't used for
anything yet.  u.mhmax (max HP while polymorphed) isn't interesting
enough to track.

Not save and bones compatible so increments EDITLEVEL.
2021-12-04 05:19:45 -08:00
PatR
c3dc95f926 commit ccb10489aee5f2af752177b0f8451790140292e2
Author: PatR <rankin@nethack.org>
Date:   Fri Dec 3 18:35:12 2021 -0800

    showrace when hero can't see self

    This supersedes pull request #644 by entrez, "Fix: expanded-glyphs
    hero color regression".  The code to change color for the hero in
    special circumstances (for 'showrace' and for some PC rogue stuff)
    was relying on the hero's map coordinates rather than verifying
    that the hero was shown at that spot.  When the hero is invisible
    and lacks see invisible, he isn't shown.  But the color of whatever
    could be seen beneath him was incorrectly having its color changed
    (to HI_DOMESTIC for showrace or to YELLOW for PC rogue).

    Closes #644
2021-12-03 18:45:53 -08:00
PatR
dbc8a70271 bullwhip inconsistencies
Reported by entrez:  applying a bullwhip towards a medium or small
peaceful monster used to be an attack but that stopped working when
'safepet' was extended to peacefuls in order for the hero to be able
to swap places which those.  Also, side-effects were different when
hero applied the whip from within a pit compared to when not in one.

This allows the hero trapped in a pit to try to snag furniture or a
boulder even when a small or medium is present, and escaping that
pit if successful.  (It still snags big monsters in preference to
furniture/boulder at their location.)  When no such non-monster
target is available, it attacks the monster if hostile or peaceful
but not when tame.  When revealing a previously unseen monster it
prevents snagging that monster's wielded weapon because hero couldn't
possibly target the weapon in that situation.

This makes other changes, mostly dealing with finding and exposing
concealed monsters, which may introduce some new bugs.

Since I was already in the right place, implement snagging an item
off the floor while flying.  It isn't necessary since a flyer can
pick things up off the floor directly, but there isn't any pressing
reason to disallow it.  Supersedes the commit in pull request #632
by RojjaCebolla.

Closes #632
2021-12-03 04:34:08 -08:00
PatR
c8c69b0cc5 fixes entry for pull request #642 - shk name vs it
3.6.1 changed a bunch of messages in shk.c to give the actual shk
name even when a the shopkeeper couldn't be seen, to avoid things
like "You owe It <N zorkmids> for <item>."  But there are various
messages issued outside of shk.c which were overlooked.  Fix those.

Closes #642
2021-12-01 18:49:48 -08:00
PatR
35ac9a09e2 miscellaneous tweaks
Simplify a glob handling bit in a recent shrink_glob change used when
catching for lost time upon returning to a level.

Revise a clumsily worded fixes entry.

Fix a comment typo in makedefs that's been there for a bunch of years
now.  It's been within the diff context for several recent patches
and I still hadn't noticed it until just now.
2021-11-30 14:04:00 -08:00
PatR
0c69fd9afc fixes entry for pull request #640 - zoo monsters
Populating some of the types of special rooms can pick monsters that
sometimes come in groups, and getting a group could have some members
spill out of the room (or inhibit other random choices by filling some
spots that haven't been populated yet, preventing subsequent monster
creation there).

The misbehavior isn't new so it seems surprising that no one has ever
previously reported this.

Closes #640
2021-11-30 13:01:17 -08:00
PatR
ec5f7bce16 tribute update: Monstrous Regiment and A Hat Full
of Sky

Add a page citation for Monstrous Regiment passage 1 and add four new
passages, bringing its total to 12.

Add two new passages to A Hat Full of Sky, bringing its total to 13.
2021-11-27 17:40:48 -08:00
PatR
03476a7c78 get_rnd_text() for rumors and other stuff
Solve the uneven distribution situation that has been present for
picking random rumors for a long time and for random engravings,
epitaphs, and hallucinatory monster names since 3.6.0.  This relies
on the previous partial solution where short lines have been padded
to a longer length.  When that length is N and random seek lands in
a long line of length L, retry if the position is in the first L-N
characters.  Put differently, it if takes more than N characters to
reach the next newline, reject that random seek and try again.  This
effectively makes long lines behave as if they had the same length
of N as the short lines have been padded to and when all lines are
the same length, all entries have the same chance to be chosen.
2021-11-27 12:23:01 -08:00
PatR
59beebcbcc get_rnd_text() selection distribution
While testing 'the("Capitalized Hallucinatory Monster")' I noticed that
some hallucinatory monsters showed up more often than others.  When
the random engravings, epitaphs, and bogus monsters were converted from
hard-coded arrays to data files accessed by random seek (3.6.0), they
became subject to the same distribution irregularites that rumors suffer
from.  The chance that an entry will be chosen depends upon the chance
that a random seek will hit somewhere in the line which precedes it, so
entries that follow long lines are more likely to be chosen and entries
that follow short lines are less likely.  We improved that for rumors
by having makedefs pad the shortest lines.  Distribution still isn't
uniform but is much better than it was (and could be further improved
with a longer padding length at the cost of making data files bigger so
possibly slower to access; both overall size and access speed mattered
back when floppy discs were supported but are probably irrelevant now).

Start doing the same thing for the newer files:  pad the shortest lines
to increase the chance that seek will find them.  The tradeoff is that
the data files become bigger.  Rumors, engravings, and epitaphs lines
are all at least 60 characters now; bogus monsters are at least 20.
These are the data file sizes I see (in bytes:  old, new; padding for
rumors was already in use so its size hasn't changed):
  bogusmon    4449    7211
  engrave     1326    2894
  epitaph    14159   24075
  rumors     49173   49173

The only place that padding is noticeable in-game is #wizrumorcheck.
2021-11-25 17:57:37 -08:00
PatR
c0228d1a74 shrinking globs vs shop bill
A shop-owned glob picked up by the hero was added to shop's bill
and if that shrank to nothing it moved from the unpaid portion to
used-up portion as intended.  But once there it retained obj->owt
of 0 and if 'sanity_check' was enabled, that triggered a warning
every move until finally paid for.  Both the 'Ix' list of used-up
items and itemized shop billing revealed a weight of 0 aum if
'wizweight' was enabled.

Keep track of the weight a glob had when it becomes unpaid, then
reset from 0 to that amount if it becomes used-up.  This overloads
the obj->oextra->omid field which is an unsigned int previously
only used for corpses.  Now for globs it is pre-bill obj->owt which
is also unsigned int.  I didn't add new oextra access functions for
it; it is only used in two places and existing omid ones suffice.
2021-11-25 00:47:45 -08:00
PatR
01b2bcff75 artifact fruit
Reported by entrez:  when fruit name is given the name of an artifact
that doesn't use "the" at the start of its name, messages about the
artifact could be altered.  Example was fruit=Excalibur causing usual
 |You are blased by Excalibur's power!
to unintentionally change to
 |You are blased by the Excalibur's power!
because of a false match during special handling for named fruit in
function the().

This fixes that, and also changes basic inventory formatting.  Former
 |f - an Excalibur
will now be
 |f - Excalibur
for a fruit that has been assigned that name.  When sort pack in On,
as it is by default, that will be listed under Comestibles rather than
under Weapons so really shouldn't fool anyone.  And
 |f - 2 Excaliburs
also breaks the illusion.

This formatting change only affects named fruits.  User assigned names
for object types or for individual objects behave the same as before.
2021-11-24 17:17:40 -08:00
PatR
f0f9701a37 attempting to polymorph into a unique monster
Noticed while testing revised "the" handling and trying to trigger
"you can't polymorph into [the] Oracle", if the character was human
it would turn into a new man or woman instead of having the unique
form be rejected.
2021-11-24 00:46:44 -08:00
PatR
b2d4b77d3a fix pull request #636 - the("Capitalized Monster")
Function the() wasn't supposed to be used for monsters because many
of the ones with capitalized names confuse it, but over time multiple
instances of the(mon_nam()) have crept into the code.  Instead of
ripping those out, modify the() to handle that situation better.

Pull request #636 by entrez dealt with this with one extra line of
code, but could end up scanning all the names in mons[] repeatedly
if the("Capitalized string") gets called a lot.  This uses a similar
one line fix but calls a whole new routine that scans through mons[]
once collecting all the relevant special case names.  As a bonus,
it does the same for hallucinatory monster names which name_to_mon()
couldn't handle.

Fixes #626
2021-11-24 00:24:56 -08:00
PatR
274290bcdf fixes entry for #635 - magical breathing w/ gills
Fixes entry for pull request by entrez.  If poly'd hero is wearing
an amulet of magical breathing, avoid gradually losing hit points
while out of water when in aquatic form.  You won't be able to put
on an amulet of magical breathing if already in aquatic form, but
you could have one carry over from being worn in some other form.

Implemented for monsters too but won't have any effect during play
for them because they never use that particular type of amulet.

Closes #635
2021-11-18 18:55:18 -08:00
PatR
d26537c4c9 fix github issue #608 - #untrap vs web
Reported by Vivit-R, the chance of freeing a monster from being
trapped in a web was very small and failure resulted in creation of
a new web at the hero's spot, eventually making it impossible to
attempt to #untrap the monster (if hero escaped the new web and moved
to another spot adjacent to trapped monster, eventually surrounding
it with webs).  [That's actually misleading.  Escaping the new web
but staying at the same spot lets the player try again; repeat as
needed....  But chance of failure still seemed way too high.]

This reduces the chance of failure from 29/30 to 6/7 and makes the
chance of spreading the web after failure be 1/3 instead of 100%.  It
also supplies missing feedback about the monster still being trapped
if the attempt to make a new web fails.

Closes #608
2021-11-18 18:30:19 -08:00
PatR
05a843826d shrink_glob while away from level
If the hero left a level that had globs on the floor or in floor
containers or being carried by monsters and stayed away for a
while, returning to the level only shrunk them by one unit of
weight.  Account for all the time away.  The complexity of this
has steadily grown; I hope its peak has been reached.
2021-11-12 23:05:55 -08:00
PatR
90aded3648 weight of gold
I had wizweight On when testing glob changes and noticed
|Slasher drops a gold piece (0 aum).

Coins are supposed to weigh 1/100 of a unit, and the calculation
rounds rather than simply truncates any fraction, but that still
yielded 0 for quantities of 1..49.  Force any non-zero stack of
gold to weigh at least 1 unit.

Also, add a check for attempting to weigh a quantity 0 or less
(of anything, not only for gold) just in case.
2021-11-07 13:27:44 -08:00
nhmall
e8acc185ad proceed further into dochat() when deaf 2021-11-07 09:19:03 -05:00
PatR
e2ca016484 decaying globs of {ooze,pudding,slime}
Globs never rotted away but did become tainted after a relatively
short while, which seemed like a contradiction.  Change them to never
be tainted but shrink by 1 unit of weight approximately every 25
turns.  An ordinary glob (one that hasn't combined with any others)
starts out weighing 20 units, so it takes about 500 turns to vanish.
That's roughly twice as long as a corpse takes to rot away.

Shrinking globs give feedback when in hero's invent or in a container
in hero's inventory, but rarely (when going from an exact multiple
of 20 weight units; that is, from integral number of N globs to
N-1 + 19/20, or if weight reduction triggers an encumbrance change).
When a glob goes away completely, there is feedback for those two
circumstances and also for seeing the glob vanish from the floor.

I haven't touched how much nutrition eating a glob confers.  I have
changed formatting of glob names to use "small", "medium", "large",
"very large" instead of "small", [no adjective], "large", &c.  You
still need to have at least five globs coalesced together for the
adjective to become "medium", same amount as before.

I don't think EDITLEVEL needs to be modified but have incremented it
anyway to play things safe.
2021-11-06 18:24:36 -07:00
PatR
1f31f1ff81 tribute update: Night Watch and The Wee Free Men
Add a page citation to passage #1 of Night Watch, and add five new
passages, briging the total to 12.

Add four new passages to The Wee Free Men, bringing the total to 13.
2021-10-30 19:16:35 -07:00
nhmall
e0e8fced7c bad cast making sp_lev chameleon light source
Closes #625
2021-10-28 18:19:07 -04:00
PatR
d736cbd751 fix github issue #603 - guarding prize items
Reported by Vivit-R with comments by several others.  The prize item
in one of the closets off the Sokoban treasure zoo is sometimes
missing, most likely picked up by an elf who won't be dissuaded by
the presence of engraved Elbereth or a scroll of scare monster.

This fix prevents monsters from targetting the mines' and sokoban's
prizes for pickup (or for eating).  Once the hero picks either of the
prizes up, they stop being prizes and will be ordinary monster fodder
if dropped/stolen/stashed.

One of the comments by copperwater suggested this approach as a
possible way to fix things.  I had already implemented it from scratch
before noticing that.  It handles the usual monster behavior toward
items, but there could easily be some unusual cases still susceptible
to taking the prize before the hero gets to it.  Those are the breaks.

Fixes #603
2021-10-28 01:05:18 -07:00
PatR
5b91f81533 more baalz - digging in front of the "eyes"
like the leg hackery, if the baalz level gets flipped during creation
the fixup that modifies the locations in front of the eyes to allow
digging needs to deal with that too.
2021-10-27 16:21:03 -07:00
PatR
a5d3e03b3e fixes entry for pull request #598 - baalz level
If the baalz level got transposed during creation, the fixup for
a decorative portion of the map didn't work properly.  Monsters
eligible to be created at pool locations could end up trapped in
a couple of inaccessible locations.

[To be fair, the baalz hackery predates level flipping....]

Closes #598
2021-10-27 15:52:01 -07:00
PatR
da859c5eb8 fix github issue #623 - soldiers and mattocks
Reported by eakaye.  Selection of equipment when creating a soldier
or watchperson can pick a polearm, but random selection among those
had a chance to choose dwarvish mattock which doesn't use polearms
skill and isn't appropriate for a human soldier or watchperson.
Not mentioned, but lance was in the same boat.

Change the selection to only pick something which uses polearms
skill, then make that moot by moving lance and dwarvish mattock out
of the midst of the polearms so that they're no longer candidates
for special case rejection.

A couple of other things which might have had a similar issue were
already ok.  Giving a polearm when creating a troll selects between
a few choices rather than among all the polearms.  And wishing for
"polearm" only considers items which use polearms skill.

While changing objects.h to reorder the two non-polearms, I removed
a bunch of tabs that were present in the scroll definitions.

EDITLEVEL is incremented due to objects[] reordering, so existing
save and bones files will be invalidated.

Fixes #623
2021-10-27 15:36:32 -07:00
PatR
6b882609ac commit message for pull request #599 - artifacts
Explicitly un-create a randomly generated artifact if it gets
rejected (too big to include as a treasure drop with a small corpse)
so that it remains eligible for creation later.  And when generating
random contents for a new container, explicitly avoid artifacts
(which were already implicitly avoided).

Closes #599
2021-10-26 12:09:36 -07:00
PatR
cffeecee26 fix #K3474 - "you detect it where <foo> was"
A vampire in bat form was seen via infravision or possibly telepathy,
then when it changed into fog cloud form the feedback was
|You now detect it where the vampire bat was.
The message substitutes "detect" for "see" when the new form can't
be seen and the monster name formatting yields "it" for that case.

Give a vanish message instead since that is effectively what happens.
2021-10-26 03:11:55 -07:00
PatR
b4908f6928 fix pull request #621 - potential divide by 0
The pull request by argrath changes weight_cap() to never return a
value less than 1 because try_lift() divides by that return value
and a 0 would trigger a crash.  The code involved is used when
attempting to pull a monster out of a pit via #untrap.

I'm fairly sure that weight_cap() can never produce a value that's
less than 1 already, but have put in a variation of the PR's fix.
I've also implemented a different fix that removes the division
from try_lift().  The original code seems to have gone out of its
way to avoid calculating inv_weight() twice, but doing the latter
(for the once in a hundred games where it might happen) greatly
simplifies things by removing details of carrying capacity.

Fixes #621
2021-10-25 14:51:26 -07:00
PatR
6edadc4884 fix github issue #614 - applying polearm at doors
Reported by G7Nation; attacking walls and such with a polearm just
gave lackluster "you miss; nobody's there" feedback.

Make applying a polearm at some non-monster locations give feedback
similar to using 'F'orcefight with melee weapons.  Was
|You miss; there is no one there to hit.
now
|You uselessly attack the closed door.

Also, extend the supported locations to include dungeon furniture.
Was
|You attack thin air. ('F')
now
|You harmlessly attack the throne. ('F')
|You uselessly attack the throne. ('a')

This doesn't address #613:  attempting to hit non-visible locations
with an applied polearm.

Closes #614
2021-10-24 10:06:30 -07:00
PatR
b97df3e9e4 closed door descriptions 2021-10-23 17:33:39 -07:00
PatR
37e63f6829 breaking wielded fragile item against iron bars
Reported by entrez, wielding something fragile (potion of acid
perhaps), and using F to smash it against iron bars called breaktest()
directly, then a second time indirectly through hero_breaks() via
hit_bars().  There is a random chance to resist breaking (99% for
artifacts, 1% for other items) so breaktest() might say that something
will break on the first call and that it will not break on the second
call, or vice versa.  That could remove uwep from inventory then leave
it in limbo without destroying it, or destroy uwep without removing it
from inventory first triggering impossible "obfree: deleting worn obj".
2021-10-22 19:11:51 -07:00