Commit Graph

31 Commits

Author SHA1 Message Date
jwalz
c845548c36 Make enhanced ammo last longer.
Since traps can no longer provide an infinite supply, and people were
complaining that they always ran out of ammo before, make it less likely
to break enchanted and blessed ammo, and more likely to break eroded
ones.
2003-05-28 21:54:37 +00:00
cohrs
ac3746d055 B03003 - throwing short swords
<Someone> pointed out a disagreement between the comment and code in
throwing_weapon(): comment says daggers & knife can be thrown, but
code also allowed short swords.  Assuming the comment was correct, changed
the code to match.
2003-05-21 22:08:22 +00:00
cohrs
66ece5d870 B01006 - containers hitting the floor
<Someone> noted that if you dropped a box while levitating, nothing would
break.  This is true for sacks too, which shouldn't be immune either.
Throwing didn't break contained objects either, not mentioned in his report.

Refactored out the code in kick_object that handled damage for objects
contained in normal containers and added calls in hitfloor and throwit.
kick_object still only calls it for boxes, but other callers will call it
for any object letting it decide if damage is required.  BoH objects aren't
affected, since traditionally the inside of the BoH is "somewhere else".
2003-03-29 03:31:51 +00:00
cohrs
7fa28ea693 jumping over sokoban pits
reported to the list.  The code in hurtle_step was returning FALSE one
step too early, resulting in the player not actually ending up in the pit.
2003-03-24 21:56:59 +00:00
cohrs
cff0fb7870 B01002 - tame dwarf won't eat
<Someone> reported that a tame dwarf wouldn't eat food tossed at it.
He also reported that it wouldn't eat off the ground, which I couldn't
reproduce nor see in a problem in the code.  The code in thitmonst didn't
allow for sharing food with non-domestic, already tame monsters.
2003-03-24 07:30:49 +00:00
nethack.allison
176d31c980 buried punishment ball
Prevent burying a ball from ending your punishment.

When you bury the ball, internally NetHack Punishment
ceases, but a new trap type of TT_BURIEDBALL  immediately
kicks in (acting similar to TT_INFLOOR in some ways).
You can eventually work the ball free (or teleport, etc.),
but that will just return you back to normal Punishment.
2003-03-11 03:40:17 +00:00
cohrs
d1fdc497d2 U162 - killing shopkeeper with unpaid thrown objects
While an object is being thrown, it isn't on any list.  This means that
killing a shopkeeper with an unpaid object wouldn't be able to clear the
unpaid bit.  By the time the object lands, the shopkeeper is gone, and then
it's too late.  Added a new global to track a thrown object, set it and later
clear it in throwit(), also clear it as needed in dealloc_obj(), and check
it in setpaid().  It should be possible to use this global to avoid losing
thrown objects during hangup saves as well.  But that can wait.
2003-02-13 07:52:49 +00:00
nethack.allison
c2c72d11e7 B18009 animate figurine over water
>More worrying is the fact that applying a figurine over water lets
>the monster wait until its next move before it drowns (giving
>you time to teleport it to safety, or whatever) [...]
>Should there be a minliquid() check as part of make_familiar()?

Applying at the water location next to you was easy. But
applying it at your own location (triggering BY_YOU)  could
end up placing the figurine at the far side of the level if
there was lots of water.

Correcting that required the ability to pass a flag from
make_familiar to makemon() telling it to not rule out
water locations as good positions.  The flag had to
be passed on down to goodpos() and enexto().

The bulk of this patch is just adding an additional
argument to goodpos() in all of the callers.
2003-02-09 05:39:32 +00:00
nethack.rankin
b9f9a6415b fix B17005 - autoquiver bug
hold_another_object() will try to quiver the object being held if
it's a weapon (or gem/rock ammo) and the autoquiver option is enabled and
the quiver is empty.  It was doing that even if the object had just merged
with primary or secondary weapon, resulting in it being equipped in two
slots at once.  (Easiest way to reproduce it is via wish+wield+wish for
similar item, but it could also occur when stealing while in nymph form.)

     This also addresses one of the old items on <Someone>'s list:  if you
carry a sling equipped in the alternate weapon slot, include gems and
rocks as likely candidates for quivering same as when wielding a sling.
This extends that to autoquivering; ammo appropriate for your alternate
is now given preference over arbitrary weapons (ammo for your wielded
weapon and arbitrary missiles still take precedence over alternate ammo).

     Bug?  pickup_object() is not autoquiver aware, hence autopickup isn't
either.

     Bug too (perhaps moot if the above is changed)?  Snagging a monster's
weapon with a bullwhip uses hold_another_object() so possibly autoquivers;
snagging an object off the floor with a grappling hook uses pickup_object()
so doesn't.
2003-01-25 04:46:11 +00:00
nethack.allison
0814d95040 B15005 narrow openings and hurtling
Narrow openings are currently not checked for by hurtle_step() or
mhurtle_step. This has the consequence that you can jump or use
Newton's 3rd to get through somewhere you can't get through on the
ground, and monsters can stagger or be jousted through somewhere
they wouldn't attempt under their own steam.

This patch fixes hurtle_step().  It does not address mhurtle_step.
2003-01-11 03:46:56 +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
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
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
cb38d0882d B14001 - Stinking clouds in bonesfiles
Incorporate a fix from <Someone> that resets the timestamp on
stinking clouds left in bones files.  This does allow the cloud's ttl to
restart.  Extended it to reset the player_inside flag.

Then noticed that the only placed that called in_out_region was domove().
Added calls when changing levels (which causes player_inside to be set
correctly if the cloud covers the location where the player starts on the
bones level), teleporting, and inside hurtle_step.  There are still other
places that fail to call in_out_region, which others may choose to tackle.

I split out the remaining stinking cloud bug reported in the same e-mail
into a separate betabug.  That one probably cannot be addressed without
changing the level file format to track the creator.
2002-10-16 06:30:36 +00:00
nethack.allison
67c7c79d66 melon bit and comment
Melons should break when thrown.
Add objects.c comment about "gray stones"
2002-07-14 13:37:48 +00:00
nethack.allison
40940991bb change GOLD_CLASS to COIN_CLASS 2002-07-08 23:25:53 +00:00
cohrs
b0cef1a0e2 R883 - disappearing thrown money
this is a !GOLDOBJ bug, the money was not put back into ugold in this
case when it was not thrown
2002-05-20 05:03:13 +00:00
nethack.rankin
11b1874090 more wielded/quivered iron ball
There was at least one more special case aside from throwing
(jetisoning items to reduce weight after falling in water) which
have needed the same extra code.  This is a more general fix.
2002-03-30 09:50:59 +00:00
cohrs
a997e11e00 wielded ball and chain
- a wielded/quivered ball would still be marked as wielded/quivered
after you threw it
2002-03-29 20:35:22 +00:00
jwalz
3e6e2ff7c6 Lint part 2, mostly parameters. 2002-03-10 04:05:59 +00:00
nethack.rankin
6f90e5bc8c Another artifact damage update
Make being hit by an artifact which does fire, cold, or
lightning (or magic missiles, since the code is there) affect
inventory even when the target resists the damage him-/her-/itself.
This removes the need for the redundant fire vs slime handling that
I put in yesterday.  Unfortunately it also means that Valkyries who
throw Mjollnir will inevitably end up destroying all their mettalic
wands and rings, so I reduced the chance of it hitting upon its
return.
2002-02-23 10:55:43 +00:00
nethack.rankin
6ce22770c9 Fire Brand vs sliming
Being hit by Fire Brand now stops the sliming process if you're
being turned into green slime.  And throwing an artifact up will give
artifact hit effects when it falls back down, making it possible to
hit yourself with Fire Brand (among other things).  Hitting yourself
with Vorpal Blade or the Tsurugi of Muramasa will never behead or
bisect you; hitting yourself with Stormbringer will drain levels.
(I hope the latter doesn't make it too easy for players to manipulate
their experience level.)

     This doesn't add artifact_hit() handling to mthrowu.  If monsters
ever start throwing artifacts that will need to be added.
2002-02-22 03:51:14 +00:00
cohrs
91c5521009 verb agreement
add and use new APIs, Tobjnam, otense and vtense, is_plural
to determine tense/form of verbs and a few pronouns as well
2002-02-09 00:24:49 +00:00
nethack.allison
7d1e6f7d57 from Yitzhak
Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
2002-02-05 13:21:43 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
cohrs
3fc3ef8537 another vision-related message
don't just say "the knife misses" when you can actually see the monster
with infravision by testing using the correct function
2002-01-24 02:34:52 +00:00
kmhugo
629f0897d6 Jousting follow-up
Fix an oversight.
2002-01-20 06:26:33 +00:00
kmhugo
bb88bd1a4a Jousting
Players wielding a lance while riding will "joust" monsters
they attack.

Note that monsters don't get pushed into inaccessable tiles such
as walls, doors, iron bars, water, or lava; they stay at the edge.
Further refinements are possible for these cases.
2002-01-20 05:44:46 +00:00
kmhugo
d25f67cd0d Autoquiver fix
Implement a patch which <Someone> posted on the newsgroup back in September:
"If I had my druthers, daggers would be chosen over other
weapons if there's no missiles or suitable ammo available, and weapons
not designed for throwing wouldn't be chosen at all."
2002-01-19 05:34:34 +00:00
cohrs
c77073be31 sync changes since last snapshot 2002-01-07 02:12:04 +00:00
jwalz
e80ae68c9e *** empty log message *** 2002-01-05 21:05:48 +00:00