Commit Graph

499 Commits

Author SHA1 Message Date
nethack.rankin
9988440b2e artifacts in final score
Fix the problem From a bug report.  An earlier fix (3.3.1)
made them be listed during final disclosure, but the points shown for
them actually got left out of the total due to misplaced brackets.
Rather than just fixing the brackets, merge the two inventory scanning
loops so that both passes will always be synchronized with each other.
2003-01-08 22:07:06 +00:00
nethack.allison
cebd0ccbab B14004 Cloaks of invisibility
There's no feedback message nor item discovery when you see a monster
	disappear as it puts on a cloak of invisibility.
2003-01-05 03:57:21 +00:00
nethack.allison
a26514bd61 mimic orange follow-up 2003-01-04 16:54:48 +00:00
nethack.rankin
4fb26adf87 fix B16006 - cancelled monster-monster attacks
Various damage types which wouldn't work when a cancelled monster
attacks the player were working when it attacked other monsters instead.
Besides attempting to fix that, this also makes cloaks and other magic
blocking armor ("magic cancellation factor") work for monsters similar
to the way it works for the player.

     Most types of damage appear to revert to physical damage when the
attacker is cancelled; I'm not sure that's appropriate in many of the
instances.  The leg-pricking case was clearly wrong, since it gives
messages about the attack failing yet still hurt the character.

     This really needs a lot more testing than I have energy for.  I've
tried to clean up various inconsistencies and may have made some typos
in the process.
2003-01-04 02:29:35 +00:00
nethack.allison
38c3e5a9f9 fix B14022
> You're equally unlikely to be wishing for spellbooks by colour,
> but I note that 'grey' for 'gray' only works for dragonscale and
> stones, not the spellbook description.
2003-01-03 04:40:27 +00:00
nethack.rankin
133566ff1b new data.base entries
Add the caveman, healer, and monk data.base entries supplied by
<Someone>, plus the healer one from <Someone>'s list of outstanding bugs and
requests.  Every role now has its own entry.  I left "dwarven caveman"
and "gnomish caveman" pointing at the generic dwarf and gnome entries
respectively, because the caveman quote feels to me to be more human-
specific than the earlier role ones have been.

     I added blank lines to the monk quote to break it into paragraphs,
and made two minor tweaks to the text.  I hope we can find or invent a
separate entry for Master Kaen though.  Getting a quote that refers to
Buddhism for him seems wrong to me, but leaving the generic human one
now that there's a monk-specific one didn't feel right either.

     I've moved a few quest guardians around this time.  Deciding which
of them should yield the corresponding role entries and which shouldn't
involves judgement calls and I don't claim that the current situation
is now perfect.
2002-12-31 04:31:38 +00:00
nethack.allison
e72dbb7c59 buglist fix: gnomish wizard
<Someone> wrote: If you polymorph into a gnomish wizard (even if you *are* a gnomish
wizard), you shrink out of your armour.
2002-12-31 03:30:33 +00:00
nethack.allison
e8ca725e92 buglist entry: hobbits and elven mithril armour
<Someone> wrote: "Also, hobbits can't wear armour,
at least, you can't wear armour when polymorphed into a hobbit, even
though hobbits do tend to be carrying elven mithril-coats.
It's tempting to suggest adding an explicit exception in
sliparm() for elven mithril just to keep the Tolkienness."

- added a general routine for adding race-based /object
combination exceptions.
- hobbits can wear elven mithril-coats
2002-12-29 23:55:58 +00:00
nethack.rankin
df07fd4b90 fix buglist entry - artifact bow wielded by monsters
The Longbow of Diana (ranger quest artifact) confers reflection
to the hero when wielded but didn't do the same for monsters when they
wielded it.
2002-12-27 03:40:57 +00:00
nethack.allison
70d60e16d2 beta 16
- also fix typo that Pat noticed
2002-12-26 16:43:38 +00:00
nethack.rankin
0b2e205117 artifact invisibility fixes
Invoking the archeologist's Orb of Detection gave "you feel a surge
of power, but nothing seems to happen" if you were able to see invisible,
but various other ways of toggling invisibility give fade/unfade messages
in that situation.  Also, you would get false reports of invisibility
changes if you invoked the artifact while temporarily invisible due to
potion or spell or while wearing a mummy wrapping.
2002-12-19 02:24:13 +00:00
cohrs
aabc54549e U189 - killing an engulfing monster over water allows waterwalking
- The code in xkilled failed to call spoteffects after killing the monster
that was engulfing you.  Being expelled already worked correctly.
- While testing this, I discovered that removing a ring of levitation or
similar while engulfed would call spoteffects when it shouldn't.  Fixed
that too.
2002-12-19 01:57:10 +00:00
nethack.rankin
f210367c13 fix B15003 - behavior of bribe-able demons
Prevent a demon who is carrying the Amulet of Yendor from being
removed from the game when player meets his demand for a bribe since
that was effectively destroying the Amulet.  There are various ways
to accomplish this; I chose to make the bribe demand be for an amount
that the player cannot possibly satisfy in that case.
2002-12-18 18:15:55 +00:00
nethack.rankin
28e8ff7561 invisibility bit
Make timeout of temporary invisibility consistent with other
forms of toggling that state:  you notice it even when you are able
to see invisible.  (Invoking the archeologist's quest artifact is
still inconsistent in this regard.)
2002-12-18 17:51:02 +00:00
nethack.rankin
eba488996f fix U193 - digging feedback for undiggable trees
> Zapping a wand of digging at trees in ranger's quest gives a message
> "rock glows then fades".

     There was code to handle this, but it didn't work due to the
definition of IS_TREE making checks for STONE be sensitive to code
ordering (STONE was checked first in this case).

#define IS_TREE(typ)    ((typ) == TREE || \
                        (level.flags.arboreal && (typ) == STONE))

Why is it defined this way?  Shouldn't STONE simply be converted
into TREE when arboreal levels get created?
2002-12-18 17:38:57 +00:00
nethack.allison
b5c7d31bfd synch Guidebook with drawing.c 2002-12-17 11:19:45 +00:00
cohrs
bcf47b7663 missing altar drop messages
Most callers of dropx did not check for altars, but should have.  Rather
than add such checks, I moved the check from drop to dropx.  I also found
several callers of dropx that could generate out-of-order messages for some
cases (not new) and fixed them. FYI - callers of dropy don't seem to want
altar checks or already do them.
2002-12-17 03:36:42 +00:00
nethack.rankin
137bd330e4 fix B14021 - inconsistent menu styles
Menu styles `partial' and `full' will let you remove any type of
item from the three weapon slots via the 'A' command, but `traditional'
and `combination' would only do that for the primary weapon slot.  For
the alternate weapon and quiver slots, the item in question had to be
one which can normally be wielded or worn, otherwise when choosing the
object class letter you'd be told that it was "Not applicable."  And
for wearable items, you needed to be really wearing one of that class
(besides the quivered one) or else you'd get "not wearing any amulet"
or similar.
2002-12-14 11:53:22 +00:00
nethack.rankin
5fcbf50f2c fix B14020 - unquivering with 'A'
Ahe 'A' command would not let you remove a cursed item from the
quiver or alternate weapon slot.  But other commands such as drop or
quiver would let you get rid of such things since they aren't considered
to be welded in place the way a wielded weapon is.

     This seemingly minor bug is more significant than first appears
because it opens a loophole to allow you determine whether any held item
is cursed:  quiver it, try to remove it with 'A' and possibly be told
that it's cursed, really remove it with 'Q' if so.
2002-12-14 11:22:10 +00:00
cohrs
ed39497b21 tty autocomplete
Change tty extended command autocomplete, based loosely on <Someone>'s
patch, to allow you to type autocompleted characters.  That is, you can type
characters the autocompleter inserted without invalidating the command.
I haven't looked closely, but at least some other windowport extended
command readers seem to already behave similarly.
2002-12-12 06:16:39 +00:00
cohrs
d013f95679 B14006 - monsters and lava
- water elementals now get a special message when they land in lava
- rather than track down all places where non-moving monsters can end up in
lava (or water, not that it currently matters), add a check to mcalcdistress
to catch all such cases, once per turn.
2002-12-12 04:28:28 +00:00
cohrs
aec4a1aa8e no renaming of unique monsters with proper names
Not all leaders and nemeses have M2_PNAME set, so they require an extra
check to result in the expected behavior.
2002-12-12 02:41:05 +00:00
cohrs
de45cdcc61 various message cleanups
As From a bug report.
- tengu is plural, some true rumors spelled it "tengus"
- Caveman quest messages shouldn't contain the word "human" since not all
cavemen are human, changed such messages in various ways
- fix a typo in a Wizard quest message
2002-12-12 02:35:44 +00:00
cohrs
5abb2e2a3d B14016 - monster detection of mimics
When display_monster was changed in 3.4.0 to take multiple sightflags, the
mimic case was not updated completely.
2002-12-10 06:22:22 +00:00
cohrs
7f50893e13 bouncing zaps
As From a bug report, don't let bounces go past the edge of closed
doors.  His suggested patch included some redundancy, which I've removed.
2002-12-09 02:07:29 +00:00
cohrs
167231f9ad B14017 - skeletons and initial armor
Add another check to m_dowear to allow skeletons to wear the leather armor
they're created with.
2002-12-09 01:29:04 +00:00
nethack.rankin
b57bc61a80 jousting
Part I:  it's possible to use two-weapon combat while wielding a
lance (which seems odd to me); the second weapon would hit even if the
the first delivered a lance jousting blow that knocked the target away.

     Part II:  always getting the joust knockback effect when hitting
with a lance while mounted was too powerful; implement a suggestion
from the newsgroup that it be a random chance based on skill level.

     Related:  it's now possible to break your lance when hitting; when
adding that, I noticed that it was theoretically possible (didn't try
to reproduce) for a shattered boomerang or mirror to yield the stagger
bonus sometimes given for unarmed attacks.
2002-12-05 02:07:20 +00:00
cohrs
9b1b13ef1d fix up several death messages
<Someone> reported several incorrect death messages
1) "petrified by deliberately gazing at Medusa's hideous countenance" is
too long and won't fit on the tombstone.  I reworded it, which also better
reflects that Medusa's gaze is really an active attack.
2) "killed by war hammer named Mjollnir" for partly identified Mjollnir now
says "killed by a war hammer named Mjollnir".
3) "using a magical horn on himself" was missing the "killed by" prefix
4) there were supposedly cases the the a/an article was missing after being
killed by a monster.  I didn't see where this was occuring (eg AoLS resets
killer_format before it returns), but now done_in_by always resets
killer_format, which should address any such cases.
2002-11-28 20:44:54 +00:00
cohrs
bc88e8440e effect of webs while mounted
Prompted by a message to the list from <Someone> which noted that your
strength controls the traps effect, not the steed's strength, although the
messages say otherwise.  Changed this case to use mintrap to determine what
happens.
2002-11-23 18:36:54 +00:00
cohrs
f155a4b0d3 U154 - crash on teleport from engulfing mon
teleds now needs to handle the case where an uncarried ball starts out
inactive, but becomes active as a result of teleporting out of a monster
while engulfed.
2002-11-22 03:55:48 +00:00
cohrs
d3e2f53910 B14014: soft hats and piercers
Soft "helmets" don't protect against falling rocks, but did protect against
piercers.  Update the checks so only hard (metallic) helmets provide this
protection.  The same report quibbled about using the word "helmet" for
soft head coverings.  This patch does not address that quibble.
2002-11-21 18:05:48 +00:00
nethack.rankin
7b9f2f6e3e stealing heaven
Fix the reported problem of getting impossible warnings for unpaid
inventory items during final disclosure if you level teleport out of
the dungeon while holding shop goods.  The fix makes you trigger a shop
robbery first; that required a minor end of game change to prevent the
shopkeeper from seeming to tag along (shk would take your possessions
as if you'd died on the shop level).
2002-11-21 00:47:12 +00:00
nethack.rankin
5701729bc1 fix B14013 - experience calculation
Put in the missing parentheses that <Someone> reported; I don't know
how much that's going to impact experience calculations.  Also, update
some related code that didn't reflect the increase in default speed
from 10 to 12 back in 3.3.0.
2002-11-20 22:44:15 +00:00
nethack.allison
abd3df2871 get_adjacent_loc()
use get_adjacent_loc() rather than getdir() directly for some things where
you want to ensure valid adjacent coordinates are returned

<email deleted> wrote:
>>> [...]
>>> I've noticed that the loot adjacent spot code doesn't have any
>>> isok(x,y) test, so will risk crashing if used at the edge of
>>> the screen (whether deliberately, or accidentally due to being
>>> confused or stunned when picking the direction).

>> Would this not be a problem elsewhere, such as use_leash() too?

> Yes, that looks like the same risk. getdir() doesn't validate
> that the <u.ux+u.dx, u.uy,u.dy> is safe and neither does m_at(),
> so their callers need to.
>
> I did manage to provoke a crash with #loot on the plane of earth,
> although an accidental case would be a lot less likely to happen.
2002-11-17 18:43:45 +00:00
cohrs
eb906b1b8f shopkeeper falling thru a hole left unpaid objects unpaid
Reported to the list.  Player breaks a wand of digging causing the
shopkeeper to fall.  This didn't clear unpaid items.  For now, this can
only occur due to player action, so added a call to make_angry_shk to
handle this situation.
2002-11-15 07:32:52 +00:00
cohrs
d2476b5151 level teleport and sleeping steed
If you level teleported while on a sleeping steed, a panic and possibly a
crash would occur.  I believe the same would occur by digging a hole.  This
was due to keepdogs avoiding keeping sleeping pets.  In these cases, it
seems there's no reason for the sleeping steed to _not_ accompany you.
Since other ways of changing level (eg stairs) don't allow this, just added
a check to keepdogs to allow the steed to go with you.
2002-11-15 04:58:28 +00:00
nethack.rankin
e3b20b8a9f de-sparkling explosions
From the newsgroup:  explosions handle their own shield effect
display for resisting monsters and it was ignoring user's negation
of the sparkle option to suppress shield effect.
2002-11-13 23:08:04 +00:00
nethack.rankin
e639c09f58 fix B14012 - polymorph of monster possessions
Forwarded from the newsgroup:  when a monster gets hit by wand or
spell of polymorph, any armor that fell off was protected from being
hit by that same zap, but a dropped weapon wasn't.  Nor was the whole
dropped inventory in the case where the monster is killed by system
shock rather than transformed.  Protect its entire inventory.
2002-11-08 12:45:58 +00:00
cohrs
52d1737294 teleport control, confusion and stunned
Being Stunned now disallows teleport control.  Confusion may affect ability
to control level teleports, but only after asking for the destination.
Made confused level teleport failures based on luck too.
2002-11-07 18:52:00 +00:00
cohrs
f2cc8a0dbf salamanders have no legs
However, they could ride.  Marilith is similar, but since it's MZ_LARGE,
that check disallowed riding.  Added a check for slithy(), like
canwearobj() already has.
2002-11-07 18:24:31 +00:00
nethack.rankin
836d600080 remove curse tweak
When reading an uncursed scroll of remove curse, don't uncurse
an item "worn" in the quiver slot unless it is actually ammo or other
missile weapon.
2002-11-07 03:55:51 +00:00
nethack.rankin
46db4cb5a4 high temple entry
From the newsgroup:  temples attended by high priests on the Astral
Plane (also in Moloch's Sanctum, although that one doesn't really matter)
give a different entry greeting than usual in order to conceal the altar's
alignment, but they were including the patron deity in the priest name
given as presenter of the message ("The high priest of Offler intones:").
2002-11-07 03:27:37 +00:00
nethack.rankin
4d145fac06 fix B14011: vault wall repair
From the newsgroup:  traps created on the location of dug out vault
walls would be left in place when/if the vault guard repaired the walls.
Since known traps get precedence over walls when drawing the map, this
produced a display oddity in addition to the topological one.

     It also appears that monsters in affected spots wouldn't be handled
correctly if they happened to be in a direct horizontal or vertical line
with the guard.  I don't know whether that matches any of the assorted
unresolved old vault bugs.

     This eliminates a chunk of redundant code by merging two loops.
2002-11-07 02:56:19 +00:00
cohrs
e3b9c00826 B13009 - Teleport Control and confusion
Only allow level teleports to be controlled when not confused, just like
regular teleports.
2002-11-04 22:11:35 +00:00
cohrs
4af82192bc B14010 - nausia and reading spellbooks
Pulled out the code that handles reading spellbooks while confused into a
new function that can be called from learn() to handle the timed onset of
confusion starting while you're reading.
2002-11-04 22:07:23 +00:00
arromdee
f7075b2cd2 cancelled yellow lights
Someone reported this one to us.
2002-11-04 06:55:55 +00:00
warwick
d82393d891 Apelike creatures now have a sensible category. 2002-10-31 08:39:17 +00:00
cohrs
ff8512b36b is_lminion should only match lawful minions
When Angels were introduced, they were always lawful.  Somewhere along the
line, non-lawful angels were added, but is_lminion and uses of it was never
updated to address this change.  Among other things, this resulted in
non-lawful angels delivering messages via #chat that are only appropriate
for lawful angels.  That is addressed simply by changing the definition of
is_lminion, which must take a struct monst, not a permonst, to return valid
results.  Also, non-lawful angels should summon appropriate monsters, not
lawful minions.
2002-10-24 04:13:56 +00:00
nethack.rankin
fc558bfff4 fix B14003 - "bashing" with mounted polearms
Attacking with a polearm while mounted behaves differently than
while on foot, so make mounting and dismounting when wielding one adjust
weapon status accordingly.  Don't give a bashing message on first attack
if you mount with a polearm already wielded; do give one on your next
hand-to-hand attack if you just dismounted with one wielded.
2002-10-21 10:20:29 +00:00
nethack.rankin
31259d35c9 wizard mode mapping
Override confusion and hallucination when revealing the map with
<ctrl/F> in wizard mode.  This also renames the `#poly' extended command
to `#polyself' and adds several one-line comments.
2002-10-21 08:57:39 +00:00