Commit Graph

854 Commits

Author SHA1 Message Date
nethack.rankin
37e8d540a9 another pre-ANSI bit
Another vintage compiler (not as old as the previous one...) didn't
like the assignment `nlp = shkgeneral;' when nlp had been declared using
array syntax.  It didn't used to mind that, until an extra `const' was
inserted by the "move stuff to read-only area" patch submitted by someone
a while back.  The prototype is already using pointer syntax here.
2003-01-10 04:18:32 +00:00
nethack.allison
c34d7af1eb B16002
The complaint states:
It still won't let you unwield a cursed secondary weapon while
two-weaponing, even though you can drop such a weapon without problem.

You aren't supposed to be able to two-weapon
with a cursed alternate weapon at all.  It appears that there are some
checks to prevent twoweaponing if uswapwep is cursed when you try.
This patch ensures that two-weaping stops if uswapwep gets cursed
while two-weaponing.  I think this means the 'A' command will never
encounter the situation now in the complaint now.

The rules in wield.c state
 The secondary weapon (uswapwep):
 1.  Is filled by the x command, which swaps this slot
     with the main weapon.  If the "pushweapon" option is set,
     the w command will also store the old weapon in the
     secondary slot.
 2.  Can be field with anything that will fit in the main weapon
     slot; that is, any type of item.
 3.  Is usually NOT considered to be carried in the hands.
     That would force too many checks among the main weapon,
    second weapon, shield, gloves, and rings; and it would
     further be complicated by bimanual weapons.  A special
     exception is made for two-weapon combat.
 4.  Is used as the second weapon for two-weapon combat, and as
     a convenience to swap with the main weapon.
 5.  Never conveys intrinsics.
 6.  Cursed items never weld (see number 3 for reasons), but they also
     prevent two-weapon combat.
2003-01-10 04:00:37 +00:00
nethack.rankin
62700747c8 another lint bit
The heros_fault() macro added to region.h relatively recently causes
a K&R vintage compiler to choke on the heros_fault variable in dothrow.c.
Although the latter has been around longer, changing it was a little bit
simpler.
2003-01-10 03:44:09 +00:00
nethack.rankin
3c49f7a941 fix B15007 - boomerangs used hand-to-hand
Hitting with a wielded boomerang was supposed to have a chance to
break it, but the code was located in a spot that would never be reached
when bashing with a missile weapon.  Also, its rnl() usage would have
made the bad effect--losing your weapon--be more likely to occur when
you had good luck and less likely when you had bad luck.  And it wasn't
setting `unweapon', so you wouldn't have gotten a bashing with barehands
message on the next attack after the weapon had been destroyed.
2003-01-10 03:33:03 +00:00
nethack.rankin
ea400a778d some lint cleanup
Building with an old version of gcc with various warnings enabled
generated a lot of noise.  Most of it was due to not guarding string
literals with `const', but there were a couple of actual problems too.
2003-01-09 09:18:14 +00:00
nethack.allison
5336419465 more mimic follow-up bits
Address some complaints about an earlier patch.
2003-01-09 02:37:03 +00:00
nethack.rankin
f9b5bf82c5 build fix
I checked in the wrong diff earlier today.
2003-01-09 01:32:26 +00:00
nethack.rankin
f52b94336f hats vs horns
Some recent newsgroup discussion claiming that a pet ki-rin was
wearing a helmet (I think poster was hallucinating) caused me to look
at some of the hat handling code.  There were a couple of noticeable
problems and one latent one in code added for 3.4.1.  Polymorphing
into a minotaur pushes hard helmets off hero's head, but nothing
prevented you from putting one right back on.  Helmet wearing monsters
who polymorphed into minotaurs weren't affected at all.  And message
handling always assumed multiple horns even though we have some singled
horned monsters, but since all those have no hands they can't wear any
armor and that potential pluralization issue wasn't noticeable.
2003-01-09 01:20:49 +00:00
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
601b3b56d3 mimic follow-up bit 2003-01-06 11:51:48 +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
06812e0ce7 adornment
<email deleted> on Saturday, January 4, 2003 at 12:16:29
comments: I just noticed that, while wearing a -1 ring of adornment, a potion
of enlightenment gave the intrinsic "You are adorned."  Shouldn't it be more
accurately, "You are unadorned." or something similar?
2003-01-04 22:12:55 +00:00
nethack.allison
b4a65cab8f silver dragon colour
Back in 2000 "Pat Rankin" wrote:
>      From a user (in a message which had several unrelated things):
>
> > I think the colour of silver dragon scales / scale mail should not be
> > SILVER (which is not a colour), but HI_SILVER. Of course the colour of
> > silver dragons would have to be adjusted to match this.
>
> I don't normally have access to a color display, so I hadn't noticed
> that silver dragons are CLR_BRIGHT_CYAN.  It is pure coincidence
> that material SILVER happens to have the same numeric value as that.
> Is bright cyan intentional, to make them distinguishable from gray
> dragons (since color HI_SILVER is defined to be the same as CLR_GRAY)?
> Or was it done for the monsters just because the corresponding objects
> accidentally had the wrong value?  It seems to me that they ought to
> be the same shade of silver (ie, gray) as other silver things, even
> if that makes them look identical to gray dragons.

Using the material value SILVER in the "color"
field was wrong, no matter what the reason. I
suspect it was probably a mistake originally.

This patch does not alter the displayed colour for the
bug-fix release, but does correct the misuse of the
material.
2003-01-04 17:37:09 +00:00
nethack.allison
886749e21b mimic orange follow-up 2003-01-04 16:28:21 +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
bd77bb85cc urban legend 2003-01-03 05:56:45 +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.allison
70ae2d2162 fix B16001 handlessness inconsistency
[forwarded from newsgroup]
When polymorphed into a handless monster, you can't loot a chest
that's on the ground but you can pick it up and then apply it when
it's in your inventory.
2003-01-03 03:54:07 +00:00
nethack.allison
98414a8291 B14023 More shade-related japery
>	You hit the shade with an egg.  Splat!
>	The cream pie splashes over the shade's face!
>	Your venom burns the shade! [But it doesn't.]
>	A mirror breaking I could possibly see, since the silvering is the
>	important part there.
2003-01-03 02:16:05 +00:00
nethack.allison
06ad5107dc Allow msg_window option to be silently ignored by non-tty ports. 2003-01-02 12:21:48 +00:00
nethack.allison
ec3b1bf40e revert B14005 cmdassist font fix 2003-01-02 04:00:46 +00:00
nethack.allison
da912b0780 B14005 cmdassist font
<Someone> wrote:
	I happened to be playing under X11 for a change this weekend, and I
	noticed that, since the direction help of cmdassist uses (sort of)
	ASCII art, it looks rather peculiar in a proportional font. Could it
	be made to use the menu font instead?
2003-01-02 03:07:46 +00:00
nethack.allison
642cc45bd4 gnomish wizard follow-up to follow-up
By request, withdraw the limitation and revert
back to preventing all player species from
polymorphing into variants of that same species.
2002-12-31 04:11:38 +00:00
nethack.allison
a349b60743 gnomish wizard follow-up
Limit the race restriction to gnomes  to avoid
unanticipated problems with other species.
2002-12-31 03:48:03 +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
bbfd597a80 raceptr()
Add a routine for returning a ptr
to the correct race of monst.
Compensates for polyd and non-polyd player.
2002-12-30 01:42:36 +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.rankin
b9f66bb4c2 fix B15006 - breaking lances with jousting
Post 3.4.0 bug: "Your a lance (weapon in hand) shatters on impact!"
Use xname() instead of doname() to get "lance" instead of "a lance" here.
It also wasn't giving "you start bashing with your bare/gloved hands" on
the next attack after losing the weapon.
2002-12-27 03:29:46 +00:00
nethack.allison
676df2da62 more beta
BETA_INFO was being used in win32 code but
it is only defined in version.c
2002-12-26 17:14:34 +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
a8c7164162 B15004 - Master Assassin's attack
hitmu was trying, and failing, to re-implement parts of x_monnam().  Changed
it to use Monnam(), which produces more detailed messages than before in
some cases, but seems better since its messages are now more consistent
with hitmsg() and prints "The" in this specific case.
2002-12-19 02:09:35 +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
3c98250c96 data.base revision
Add the wizard entry submitted by <Someone>.  It doesn't fit
perfectly but seems better than getting the generic human (or other
race) entry.  It pointed out that "gnomish wizard" is ambiguous between
a type of monster and a player character race/role combination.  I had
to add a special case to the code to make that work out right.

     This also makes all the roles that have the their entry match any
race; conversely, match the race's monster for roles that don't have an
entry (caveman, healer, monk, priest, and samurai; we really should get
them their own).  Previously many of the non-human ones yielded "I don't
have any information on such things" and at least one (elven priest)
yielded the generic human entry.
2002-12-18 20:09:33 +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
cohrs
78e3efabcb B15002 - scorpions and spiders
tweak the description for the 's' symbol to include all its current members
2002-12-17 05:24:55 +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
nethack.allison
6b121e3231 monsters and lava follow-up bit
"aways" is not a word.
2002-12-12 11:30:04 +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
nethack.allison
98eab9a37f beta15 2002-12-11 03:22:38 +00:00
nethack.rankin
b90f50075d fire attack messages
Make sure the three instances of special fire effects stay
synchronized in the future by moving the relevant code into its own
routine.

     Shouldn't fire vortices and fire elementals also yield "already
on fire"?  How about ice vortices "melting"?
2002-12-10 10:21:28 +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
68cfa968dd B14019 - pyrolisk vs flaming sphere
A 3.4.0 report, currently only the mdamagem gaze case caused the strange
"on fire" message for flaming spheres, but other attacks seemed like they
might result in a similar message, so I updated the damageum and hitmu
cases as well.
2002-12-10 05:07:09 +00:00
nethack.rankin
08ebae982a build fix 2002-12-09 07:03:22 +00:00