]> granicus.if.org Git - nethack/log
nethack
17 years agocharging rings
nethack.rankin [Fri, 20 Apr 2007 01:43:42 +0000 (01:43 +0000)]
charging rings

     Reported--more or less--by <email deleted>:
chargeable rings don't show up as likely candidates in the "what do you
want to charge?" prompt.  They're supposed to be there once the type has
been discovered but it was using the wrong field so basing that on whether
the player had assigned a name to the type instead.  (Picking a chargeable
ring's letter even though it wasn't listed did work correctly though.)

17 years agolosing saddle while riding
nethack.rankin [Tue, 17 Apr 2007 03:43:17 +0000 (03:43 +0000)]
losing saddle while riding

     Noticed while looking at something else:  zapping a wand of opening
or spell of knock downwards while riding causes your steed's saddle to
fall off, which in turn causes the hero to fall and take some damage.
If that damage was fatal, the saddle would be left worn in bones data.
This reorganizes mdrop_obj() to defer until last the part that ultimately
makes the hero fall off, and changes bhitm() to call that instead of
handling saddle removal inline, also gives new saddle-off feedback there.

17 years agofix water handling in the #H260 lava fix
nethack.rankin [Tue, 17 Apr 2007 03:13:08 +0000 (03:13 +0000)]
fix water handling in the #H260 lava fix

     The patch made a month ago to handle remaining at a lava or pool
location without moving had a problem with being in pools of water.  It
was yielding "But you don't drown.  You touch bottom." if you had magical
breathing and took actions other than moves.  I think it's fixed now.

[New bug, or rather newly noticed old bug:  slowly sinking while being
stuck in lava doesn't notice if you lose fire resistance and ought to be
burned up immediately.  Also, fully sinking into lava doesn't appear to
burn up equipment--unless it's done in the bones handling--the way that
falling directly in without fire resistance does.]

17 years agomsummon,nasty result counts (trunk only)
nethack.rankin [Mon, 16 Apr 2007 03:58:30 +0000 (03:58 +0000)]
msummon,nasty result counts (trunk only)

     Reported in Dec'04 by <email deleted>, the
monster spell "summon nasties" could mistakenly give a message of "a
monster appears" instead of "monsters appear" when more that one monster
gets summoned.  Some of the candidate monsters for nasty() can produce a
group from makemon(), as can ones for msummon() which nasty() sometimes
calls in Gehennom.  Compare the number of monsters before and after the
creation attempt(s) instead of assuming makemon() creates one at a time.

     I don't know whether other routines face the same mis-count issue,
but I suspect there may be several.

17 years agoMUSE of green slime, anti-stoning tins (trunk only)
nethack.rankin [Mon, 16 Apr 2007 03:04:54 +0000 (03:04 +0000)]
MUSE of green slime, anti-stoning tins (trunk only)

     Reported in Dec'04 by <email deleted>,
salamanders are capable of using items and of eating green slime corpses
without being transformed into slime, but would not pick up nor eat such
corpses to recover from being turned into stone.  Now they will.  Also,
monsters who are able to open tins (mainly via carrying a dagger or knife)
will pick up tins of lizard and of acidic monsters in order to use those
to be cured from stoning.  The latter is already covered by this new
feature entry in fixes35.0 which previously applied only to nymphs:
"some monsters can eat tins in addition to corpses to cure some ailments".

17 years agokicker kicking
nethack.rankin [Mon, 16 Apr 2007 03:03:08 +0000 (03:03 +0000)]
kicker kicking

     Reported in Dec'04 by <email deleted>, an
unpoly'd hero or a hero poly'd into monster form which lacks a kick
attack both get bonus from rings of increase damage when kicking, but
a hero poly'd into monster form which has a kick attack did not.

17 years agolast #U1233 - doppelganger shapes (trunk only)
nethack.rankin [Sat, 14 Apr 2007 02:38:56 +0000 (02:38 +0000)]
last #U1233 - doppelganger shapes (trunk only)

     My last fix from the Dec'04 report sent by <email deleted>.  Many of its remaining observations/complaints are
about things which aren't bugs.  This implements the suggestion that
doppelgangers should take on humanoid form, although it doesn't take away
the 1/7 chance for pick_nasty() and it can still fall back to arbitrary
shapes when it doesn't pick a humanoid within 5 tries.  This also allows
doppelgangers to take on the shape of the various quest guardian monsters
[mostly the quest leaders' attendants, although there is at least one
extra foe (ninja)].  It excludes the quest guardian for the player's own
role, and I don't think there are any cases where it can yield unexpected
quest guardian behavior.

     This also allows specifying monster class (via description or letter)
when #monpolycontrol asks for type of monster to give to a polymorphing/
shapechanging monster.

17 years agomore #U1233 - taming feedback (trunk only)
nethack.rankin [Thu, 12 Apr 2007 05:31:25 +0000 (05:31 +0000)]
more #U1233 - taming feedback (trunk only)

     One of the complaints included in the Dec'04 report from <email deleted> was that spell of charm monster doesn't give
any feedback.  This makes that spell, and scroll of taming, always give a
message.  And the scroll will become discovered if a visible or sensed
monster gets converted from hostile or peaceful to tame, or from hostile
to peaceful.

     Scroll of taming/spell of charm monster didn't hit steed when hero
is mounted; now it does.  I don't know whether that matters though.  You
can saddle a non-tame monster, but you can't ride one even in wizard mode.
However, I'm not sure whether a tame steed you're already riding can
become untame, let alone if it can do so without throwing you.  If latter
is possible then re-taming while still mounted has now become feasible.

17 years ago^G (trunk only)
nethack.rankin [Tue, 10 Apr 2007 04:24:17 +0000 (04:24 +0000)]
^G (trunk only)

     Change controlled monster creation to support specifying monster
by class name in addition to by class letter and the usual type name.

17 years agomore #U1233 - specifying mon class instead type for polyself (trunk only)
nethack.rankin [Tue, 10 Apr 2007 03:39:52 +0000 (03:39 +0000)]
more #U1233 - specifying mon class instead type for polyself (trunk only)

     Another item from the Dec'04 report sent in by <email deleted>.  When prompted for a type of monster to polymorph
into, giving a monster class description like "dog or other canine" (or
single letter like 'd'), triggered "I've never heard of such monsters".
Instead of adjusting the message, this chooses a member from the class.

     I put this into the fixes file as a new feature.

17 years agogenocide bit (trunk only)
nethack.rankin [Tue, 10 Apr 2007 02:27:22 +0000 (02:27 +0000)]
genocide bit (trunk only)

     Simplify a recent change.

17 years agofixes typo (trunk only)
nethack.rankin [Sun, 8 Apr 2007 04:40:12 +0000 (04:40 +0000)]
fixes typo (trunk only)

17 years agoname_to_monclass (trunk only)
nethack.rankin [Sun, 8 Apr 2007 04:35:19 +0000 (04:35 +0000)]
name_to_monclass (trunk only)

     Move the code for determining monster class from user's input string
out of do_class_genocide() and into new routine name_to_monclass().  I'm
planning to use it when name_to_mon fails to match anything for controlled
polymorph (not ready for prime time yet).

     Also, avoid getting stuck in a loop if hangup occurs while prompting
player for class of monster to genocide.  ESC, whether deliberate or fake
input after hangup, will now be the same as specifying "none", throwing
away the genocide opportunity.

17 years agofix #U1233 - controlled polymorph by hero with lycanthropy (trunk only)
nethack.rankin [Sun, 8 Apr 2007 01:51:57 +0000 (01:51 +0000)]
fix #U1233 - controlled polymorph by hero with lycanthropy (trunk only)

     <email deleted> reported a long list
of inconsistencies and suggestions.  This attempts to address the ones
about werecritters and vampires.

> Polymorphed player does not get werecreature changes. (intentional?)
> Player in were form does not turn into werehuman form, ever.  (Previous
> bugged behavior was that player turned into a plain human)
> Player afflicted with a were cannot polymorph into werecreature or
> werehuman form.

     The first guess is right; being polymorphed blocks lycanthropy state
changes.  The second is not a bug either; hero is either a <werecritter>
when in beast form or a <role> when in human form, never human werecritter
monster.  The last one feels more like a bug though; it happened because
all lycanthrope monster entries are marked NOPOLY.  This patch extends
an earlier post-3.4.3 change to allow player with polymorph control to
explicitly specify werecritter when in role form or human werecritter when
in beast form to toggle shape.  It also allows closely related monsters
to toggle from role to beast (ie, "giant rat" yields wererat).

> Vampire or Werecreature changing form may change sex.

     Now the three semi-controlled changes--becoming a dragon due to armor,
toggling were form, and vampire into various critters--are prevented from
having the 10% chance of sex change kick in.  For monsters, lycanthropy
didn't apply (sex never toggles) and vampire shifting is now covered but
turning into a dragon due to scales/mail remains susceptible to sex change.

     Also, post-3.4.3 code made polymorphing into a vampire enable the
#monster command but neglected to tell the player.

17 years agofix #H174 - ice effects on corpses are miscalculated
nethack.rankin [Thu, 5 Apr 2007 02:47:43 +0000 (02:47 +0000)]
fix #H174 - ice effects on corpses are miscalculated

     Reported in August by <email deleted>, the code that handles
slower rotting for corpses on top of or buried under ice is misusing its
ROT_ICE_ADJUSTMENT factor such that a value other than the current 2 would
produce incorrect results.  Instead of multiplying by 1/N it needs to use
(N-1)/N, which happens to be the same when N is 2.  In a second message he
asked about why putting a corpse on ice starts out by subtracting from its
age to make it older, and it took me a while to decide that that is correct
behavior.

     No effect on game play since ROT_ICE_ADJUSTMENT remains set to 2.

17 years agoice timeout (trunk only)
nethack.rankin [Wed, 4 Apr 2007 02:31:14 +0000 (02:31 +0000)]
ice timeout (trunk only)

      Zapping cold at an ice location which has a melt timer would set
new timeout to a random value which could actually cause that ice to melt
sooner.  Make sure the new value is always at least as big as the old one.
Also, MAX_ICE_TIMEOUT wasn't actually the maximum ice timeout; now it
is--if the generated value is higher, omit the timer so that that ice is
permanent.  No fixes35.0 entries necessary; this is post-3.4.3 code.

17 years agofix #Q431 - water elemental caught in beartrap (trunk only)
nethack.rankin [Tue, 3 Apr 2007 05:11:44 +0000 (05:11 +0000)]
fix #Q431 - water elemental caught in beartrap (trunk only)

     Reported two months ago by <email deleted>,
having a water elemental become trapped in a bear trap seems pretty
strange.  Fixed by marking water elementals as M1_UNSOLID (like air and
fire elementals), which has a side-effect of making them immune to webs
as well.  Tweaked some unused digging code which checks unsolid(), added
unsolid() to the types allowed to bar through iron bars, and brought the
check for whether a monster is willing to enter a bear trap location up
to date.  That code also needed an update to reflect the change made to
anti-magic traps last year.  Lastly, there was another report which
suggested that being hit by a bear trap should dish out some damage
(along with a suggestion that wand of opening should work to escape such
traps, which has already been done).  This makes bear trap do 2d4 damage
(on entry, not when trying to pull out after becoming stuck).

17 years agoBARGETHROUGH tweaks (trunk only)
nethack.rankin [Tue, 3 Apr 2007 03:46:14 +0000 (03:46 +0000)]
BARGETHROUGH tweaks (trunk only)

     Prevent monster with barge-through capability--currently only the
astral Riders--from swapping places with another monster which has that
same capability.  Otherwise, if the target one moves after the barger,
it might just repeat the maneuver, undoing the first swap.  If there's
no room to move anywhere else--maybe they've barged through a crowd into
a narrow spot--they could get stuck swapping and re-swapping every turn.

     I've also allowed swapping with baby long worms and with adult ones
which lack a tail.  When testing that, something strange happened and
the displacer was drawn on the map as a long worm tail.  mdisplacem()'s
place_worm_seg() must have been responsible, but I don't understand how
the bit of code involved could kick in for a worm without tail segments.
I've reorganized mdisplacem() to avoid this occurrence, I hope....

     Also, barge-through swapping with a mimic exposes it as a mimic;
swapping with an eating pet causes the meal to end.  No fixes entries;
this is post-3.4.3 code.

17 years agofix #H165 - sokoban "flaw" (trunk only)
nethack.rankin [Tue, 3 Apr 2007 03:20:27 +0000 (03:20 +0000)]
fix #H165 - sokoban "flaw" (trunk only)

     Back in <email deleted> complained
that randomly generated giants in Sokoban would drop boulders when killed,
interfering with the puzzle solution.  He suggested that giants either
be disallowed or be generated without inventory in that dungeon branch.
This doesn't go that far; it just rejects giants on the first pass during
random monster selection, making them much less likely to appear there
but still allowing them if giant is chosen two times in a row.  (Existing
boulders aren't an issue here; giants can't pick them up in Sokoban.)

17 years ago2007
nethack.allison [Sun, 1 Apr 2007 06:39:50 +0000 (06:39 +0000)]
2007

17 years agooption order
nethack.rankin [Sun, 1 Apr 2007 04:33:50 +0000 (04:33 +0000)]
option order

     From a bug report, the `splash_screen' boolean
option was out of alphabetical order.

17 years agocouple of comments
nethack.rankin [Sun, 1 Apr 2007 04:23:47 +0000 (04:23 +0000)]
couple of comments

17 years agostone-to-flesh vs golem statues and figurines
nethack.rankin [Sun, 1 Apr 2007 03:36:30 +0000 (03:36 +0000)]
stone-to-flesh vs golem statues and figurines

     Back port the trunk fix that prevents stone-to-flesh on self when
wielding a figurine from leaving stale worn object pointer and eventually
triggering a panic or crash.  Branch only except for fixes34.4 update.

17 years agostone-to-flesh vs golem statues and figurines (trunk only)
nethack.rankin [Sun, 1 Apr 2007 03:32:53 +0000 (03:32 +0000)]
stone-to-flesh vs golem statues and figurines (trunk only)

     Back in <email deleted> in #U1216
suggested that statues of stone golems which are hit by stone-to-flesh
spell should leave flesh golem corpses instead of meatballs.  But they
should actually have revived as flesh golems.  Stone-to-flesh revival of
golem statues and golem figurines didn't work as intended because golems
other than flesh or leather were considered to be vegan/vegatarian, which
caused them to produce meat rather than living monsters.  Also, S-to-F of
a leather golem statue worked as intended and created a flesh golem, but
S-to-F of a leather golem firugine created a leather golem out of stone
object.  This fixes it so that any type of golem statue or golem figurine
revives as a flesh golem.

     Two other bugs noticed and fixed:  (1) S-to-F cast on self while a
figurine of a non-veggy monster was "worn" in one of the three weapon
slots triggered an "extract_nobj: object lost" panic similar to several
similar cases which were recently fixed (that was 3.4.3; for development
code, it gave "obfree: deleting worn obj" warning instead).  (2) S-to-F
activating a shop-owned figurine didn't charge for it.

17 years agorevived unicorn horns (trunk only)
nethack.rankin [Sun, 1 Apr 2007 01:20:57 +0000 (01:20 +0000)]
revived unicorn horns (trunk only)

     Back in Nov'04, <Someone> pointed out that even with only 5%
chance for dropping a horn upon the death of a unicorn which has been
revived from corpse, it's still possible to produce a nearly unlimited
number of them for polypile fodder.  This bumps the chance for a horn up
to 50%, but flags the horn as coming from a revived corpse and makes such
horns be treated by polymoprh as if they're non-magic (which practically
guarantees that they'll poly into mundane tools instead of magic ones).

17 years agofix #H261 - bias in Bresenham's algorithm in walk_path
nethack.rankin [Thu, 29 Mar 2007 04:03:35 +0000 (04:03 +0000)]
fix #H261 - bias in Bresenham's algorithm in walk_path

     From a bug report, walk_path() was
favoring orthogonal steps at beginning of the path and diagonal ones at
end, when intermixing diagonal and orthoganal produced a more accurate
representation of the real path.  Only mattered for long distance jumps
3x2 or 3x1 steps away; hurtling always moves in a straight line and short
(2x1 knight) jumps aren't affected by the patch supplied with the report.

17 years agofix #H172 - inconsistent damage calculation for negative AC
nethack.rankin [Tue, 27 Mar 2007 04:30:01 +0000 (04:30 +0000)]
fix #H172 - inconsistent damage calculation for negative AC

     Reported last August by <email deleted>:  the code
that decided whether hero poly'd into a pudding would be split when being
hit by an iron weapon always reduced damage by u.uac if armor class is
negative, whereas the normal amount is -rnd(-u.uac).  So player pudding
with good armor always got maximum reduction.  Probably had little actual
effect on game play; puddings can't wear armor so would need to be using
rings and/or spell of protection and/or have eaten rings of protection
while in some previous metallivoric form in order to get good enough AC
for this to matter.

17 years agokicking shop food to tame dog (trunk only)
nethack.rankin [Tue, 27 Mar 2007 03:35:31 +0000 (03:35 +0000)]
kicking shop food to tame dog (trunk only)

     From a bug report, kicking unpaid
food in a shop at a tameable monster resulting in taming the monster
without charging for the used-up food.  This forces kicked objects that
are owned by shops to be put on the shop bill and flagged as unpaid, which
is normally reserved for carried items but makes kicked ones behave like
thrown ones.  (If they land inside the shop without breaking, they're
removed from the bill.)  So kicking food to make a pet now results in the
item being moved from the shop's unpaid bill to its used-up bill, same as
for thrown food.  Although the latter kept billing consistent, it lacked
shop billing feedback; this fixes that too.

17 years agokicking vs throwing vs polearms (trunk only)
nethack.rankin [Sun, 25 Mar 2007 05:31:13 +0000 (05:31 +0000)]
kicking vs throwing vs polearms (trunk only)

     Wielding a bow while kicking arrows gave a shooting bonus.  Also,
From a bug report:  applying a
polearm to hit at range never caused a pudding to split because the attack
gets treated as throwing.  Likewise, confuse monster effect (hands glowing
red) didn't kick in for applied polearms.

17 years agofixes bit for poly'd quest leader
nethack.rankin [Sat, 24 Mar 2007 05:19:54 +0000 (05:19 +0000)]
fixes bit for poly'd quest leader

17 years agopolymorphed quest leader
nethack.rankin [Sat, 24 Mar 2007 04:45:24 +0000 (04:45 +0000)]
polymorphed quest leader

     From the newsgroup:  player chatted with leader and was ejected for
not being high enough level, then when he came back later there was no
leader to be found, but there was a polymorph trap on quest home level.
This makes quest leaders and nemesis be aware of all trap types--rather
than just having leaders be aware of magic portals--so they'll be able to
avoid polymorph traps.  It also makes chatting with a polymorphed leader
work as long as the new form is able to speak (use same criteria as with
poly'd shopkeepers:  can't be in a form that's limited to animal sounds).

17 years agomore object deletion bookkeeping
nethack.rankin [Sat, 24 Mar 2007 03:57:50 +0000 (03:57 +0000)]
more object deletion bookkeeping

     Monster breaking out of armor triggered the object-still-worn warning
that was added to object deletion a couple of days ago.  Update m_useupall()
to clear owornmask.

17 years agoobject deletion bookkeeping
nethack.rankin [Thu, 22 Mar 2007 04:23:55 +0000 (04:23 +0000)]
object deletion bookkeeping

     After the apply-wielded-pie-to-blind-self (quite a while back) and
quivered-candle-burns-out (a week or two ago) bugs where object deletion
left dangling worn-object pointers, add a general check to try to catch
such things at the time of deletion.  Also, clear thrownobj and kickobj
pointers at the time corresponding object is deleted.  (This doesn't add
any checks for them becoming null during process of throwing or kicking,
where I'm not sure that the possibility of missile going away is being
adequately tracked).

17 years agoH206 - passive fire damage affecting weapons (trunk only)
cohrs [Tue, 20 Mar 2007 20:08:09 +0000 (20:08 +0000)]
H206 - passive fire damage affecting weapons (trunk only)
<email deleted> reported back on 8/31/06 that elven weapons were not
affected when he poked a fire elemental with them.  This is true, but
moreover, there was no code to have passive fire to affect attackers.
Now erode_obj() supports all the same damage types as rust_dmg(), and added
the connecting code to allow passive fire attacks do something.
There probably should be macros for the damage types used by rust_dmg
and erode_obj, and possibly these functions should be combined, but they
are slightly different and dealing with that requires more thought.

17 years agogcc compilation bit, missing type
cohrs [Tue, 20 Mar 2007 19:21:38 +0000 (19:21 +0000)]
gcc compilation bit, missing type

17 years agoworn gear after polymorph alignment change [2 of 2] (trunk only)
nethack.rankin [Tue, 20 Mar 2007 04:38:29 +0000 (04:38 +0000)]
worn gear after polymorph alignment change [2 of 2] (trunk only)

     Extend rotouch_equipment() to cover all items in use, worn/carried/
invoked in addition to wielded.  Done when you change alignment, change
shape, or catch lycanthropy.  No-longer-touchable items inflict modest
damage; worn/wielded ones will be unworn/unwielded.  For the shape change
and lycanthropy cases, unwieled weapons are also dropped.  Other unworn
stuff stays in inventory, as do weapons for the alignment change case.

     It ought to force off gloves if worn silver--or hypothetical
artifact--ring has become untouchable and gets unworn.  Instead it just
curses the gloves, if necessary, so that there's some plausibility to
having the ring come off.

17 years agoworn gear after polymorph alignment change [1 of 2] (trunk only)
nethack.rankin [Tue, 20 Mar 2007 03:58:27 +0000 (03:58 +0000)]
worn gear after polymorph alignment change [1 of 2] (trunk only)

     Make polymorphing or changing alignment perform a touch check (as is
done when catching lycanthropy) on wielded weapon(s) to see whether the
hero can still use them in his new form.  Part [2 of 2] will update
retouch_equipment() to check all items in use rather than just weapon(s).
(A comment or two in part 1 already refers to expected behavior of part 2.)

17 years agokicking coins bit (trunk only)
nethack.rankin [Tue, 20 Mar 2007 02:47:06 +0000 (02:47 +0000)]
kicking coins bit (trunk only)

     While looking into the ``NH343 bug - tamed a dog in a shop by kicking
food without being charged'' report (it's reproducible with current code),
I spotted a problem with some post-3.4.3 code.  Ancient compilers can't
handle initializers on auto arrays; this was probably meant to be static in
the first place.

17 years agostill more silver - untouchable objects (trunk only)
nethack.rankin [Sun, 18 Mar 2007 04:23:42 +0000 (04:23 +0000)]
still more silver - untouchable objects (trunk only)

     When retouch_object() prevents hero to wielding or wearing a silver
object, dish out some damage.  Do the same for <foo>bane if hero is a <foo>.

17 years agomore silver vs lycanthropy (trunk only)
nethack.rankin [Sun, 18 Mar 2007 03:43:10 +0000 (03:43 +0000)]
more silver vs lycanthropy (trunk only)

     I had intended to put the Hate_silver patch into the branch as well
as the trunk, but hit too much nonmatching context.  When switching it to
be trunk only, I neglected to put the fixes entry into the proper file.

17 years agosilver vs lycanthropy (trunk only)
nethack.rankin [Sun, 18 Mar 2007 03:26:43 +0000 (03:26 +0000)]
silver vs lycanthropy (trunk only)

     Monster werecritters are vulnerable to silver when in human form as
well as when in beast form, but hero inflicted with lycanthropy was only
vulnerable while in beast form.  Add pseudo-property Hate_silver to handle
that correctly.  Also, add silver vulnerability to enlightenment feedback.
Lastly, hero vulnerable to silver had Con abused if hit by silver missile
but not when hit hand-to-hand; add an exercise() call to the latter.

17 years agomore artifact name formatting
nethack.rankin [Sun, 18 Mar 2007 02:46:58 +0000 (02:46 +0000)]
more artifact name formatting

     killer_xname() was adversely affected by yesterday's change to
obj_is_pname() that required artifacts to be fully identified in order to
use just their name.

17 years agonon-monster kick target
nethack.rankin [Sun, 18 Mar 2007 02:14:59 +0000 (02:14 +0000)]
non-monster kick target

     My "kicking off edge of map" patch on 2007/01/27 had a typo/braino
which caused messages--including death reason--which intended to say
"kicking <an object>" end up using "kicking something weird" instead.

17 years agoartifact name formatting
nethack.rankin [Sat, 17 Mar 2007 01:50:45 +0000 (01:50 +0000)]
artifact name formatting

     Many (most?) non-weapon artifacts show up in inventory and messages
as "the <foo> of <bar>" even when their underlying object type hasn't been
discovered yet.  For types which don't use the `known' bit, obj->known is
forced to 1; obj_is_pname() checked that but not the oc_name_known flag
for the type.  So you'd see things like "the Heart of Ahriman" instead of
"a luckstone named <the H of A>" or "a gray stone named <the H of A>" even
though it hadn't been identified yet, unintentionally hiding the artifact's
object type from the player.

17 years agofigurine/familiar starting inventory
nethack.rankin [Fri, 16 Mar 2007 03:09:52 +0000 (03:09 +0000)]
figurine/familiar starting inventory

     While testing the figurine timer patch, I observed
The goblin wields a crude dagger.
You see a goblin drop out of your pack!

Rather than try to get the sequencing right, just prevent monsters made
by figurine activation or by the create familiar spell start without any
inventory.  This will have a side effect of making wishes for a blessed
figurine of an archon be less powerful, because the subsequent pet A won't
come equipped with a shield of reflection and an artifact--or at least
rustproof--long sword anymore.

17 years agomore #H267 - cursed figurine auto-activation
nethack.rankin [Fri, 16 Mar 2007 02:40:21 +0000 (02:40 +0000)]
more #H267 - cursed figurine auto-activation

     Figurine activation timer had the same problem as burning objects:
it didn't clear up worn object pointers when destroying the object.

17 years agofix #H267 - wielded object burning up panic/crash
nethack.rankin [Fri, 16 Mar 2007 01:56:43 +0000 (01:56 +0000)]
fix #H267 - wielded object burning up panic/crash

     From a bug report:  having a lit
candle or potion of oil be wielded or "worn" as alternate weapon or quiver
at the time it finished burning up would leave a stale worn object pointer
which could trigger a panic or crash.  Need to call useup() instead of
obj_extract_self()+obfree() for objects in inventory, similar to the way
hatching eggs are handled.

17 years agofix #H265 - applying wielded towel fails with odd message
nethack.rankin [Thu, 15 Mar 2007 06:04:08 +0000 (06:04 +0000)]
fix #H265 - applying wielded towel fails with odd message

     From a bug report:  attempting to apply
a towel which is currently "worn" in the weapon, alternate weapon, or
quiver slot fails with "you cannot use it while you're wearing it".  The
message sounds odd when the towel is wielded, and there's no reason why
you shouldn't be able to use it when it's in any of those weapon slots.
Compare it with current blindfold rather than checking its owornmask.

17 years agore-do the #H260 lava fix
nethack.rankin [Thu, 15 Mar 2007 05:24:45 +0000 (05:24 +0000)]
re-do the #H260 lava fix

     Instead of duplicating the bits of spoteffects() which are relevant
to pools of water and lava when standing still, split spoteffects in two
in order to call the relevant half directly.

17 years agoH264 - FreeBSD compilation bit
cohrs [Thu, 15 Mar 2007 04:20:12 +0000 (04:20 +0000)]
H264 - FreeBSD compilation bit
I cannot currently verify this myself, but it seems likely to be correct.

17 years agofix #H260 - escaping lava let you stay there indefinitely
nethack.rankin [Tue, 13 Mar 2007 03:13:09 +0000 (03:13 +0000)]
fix #H260 - escaping lava let you stay there indefinitely

     <email deleted>, escaping from being stuck
by lava via jumping--or simply walking--got you out of the lava while being
at the same location.  You could then stay there for as long as you liked
without falling back in.  This makes a lava and water check on turns where
time passes but hero hasn't moved, performing a subset of spoteffects().
I think the water case only matters when using wizard mode to wish for a
pool or moat, which gets created at hero's feet without making him fall in
(unlike wishing for lava, where hero does immediately fall in).

17 years agoheld artifacts evading your grasp (trunk only)
nethack.rankin [Sat, 10 Mar 2007 05:54:17 +0000 (05:54 +0000)]
held artifacts evading your grasp (trunk only)

     From a bug report, trying
to invoke a wielded artifact after changing alignment resulted in "the
<artifact> evades your grasp" but it remained wielded, contradicting the
message.  This adjusts the message in touch_artifact() if the object is
already in inventory, and adds retouch_object() to handle cases where
failing to be able to touch ought to force unwearing/unwielding.

17 years agofix #H254 - stethocoping mimics (trunk only)
nethack.rankin [Thu, 8 Mar 2007 05:42:15 +0000 (05:42 +0000)]
fix #H254 - stethocoping mimics (trunk only)

     From a bug report, applying a stetoscope to
a mimic which was hiding would report that mimic's stats but not bring it
out of hiding, unlike the behavior for other types of hiding monsters.

17 years agomore score file processing
nethack.rankin [Thu, 8 Mar 2007 03:14:20 +0000 (03:14 +0000)]
more score file processing

     Reduce the amount of stack space needed for the new local variables in
readentry() by about half, from 3.5K to a bit over 1.75K.  Also, reorganize
writeentry(), mostly hiding NO_SCAN_BRACK handling from the actual output.

17 years agofix #Q101 - score file bullet proofing
nethack.rankin [Tue, 6 Mar 2007 03:33:49 +0000 (03:33 +0000)]
fix #Q101 - score file bullet proofing

     Guard against buffer overflows when reading in score entries, in case
`record' has become corrupted or been maliciously modified.  This addresses
the part of "#Q101: Security bug in nethack 3.4.3" that we have control
over.  A Gentoo bug tracking discussion pointed out to us by <email deleted>, describes how that particular Linux
distribution makes users be members of the games group, allowing them to
modify files in nethack's playground directory when it has been set up in
the usual ``setgid games'' manner, thus making score processing in that
environment be vulnerable to buffer overrun exploits.

17 years agotruncating string copy
nethack.rankin [Tue, 6 Mar 2007 03:00:05 +0000 (03:00 +0000)]
truncating string copy

     The majority of our calls to strncpy are in the form
  (void) strncpy(dst, src, n);
  dst[n] = '\0';
so add a new routine, copynchars, which does that.  A few calls care
about strncpy's return value and at least one relies on it only copying a
substring without also terminating the output, but most don't care about
either and none seem to care that `n' ought to have type size_t instead of
int.  The new routine matches our usage better, but I haven't gone through
to change the existing strncpy calls.

18 years agorevised ascension bonus (trunk only)
nethack.rankin [Sun, 4 Mar 2007 02:18:59 +0000 (02:18 +0000)]
revised ascension bonus (trunk only)

     Part of the final score is doubled for ascension.  Some players use
helm of opposite alignment in order to offer and ascend at the first astral
altar they reach.  This limits the score doubling to ascending with your
original alignment intact, penalizing (for the subset of players who care
about score) alignment manipulation.  Converting to a second alignment and
then using a helm of opposite alignment to switch back and offer to hero's
original deity yields a smaller bonus (one-and-a-half instead of doubling).
Offering to either of the other deities (either via permanent conversion
or temporarily switching via helm or both) gets no score bonus.

18 years agopets accompanying ascension or dungeon escape
nethack.rankin [Sat, 3 Mar 2007 06:20:14 +0000 (06:20 +0000)]
pets accompanying ascension or dungeon escape

     There was a report recently about "<pet> is still eating" coming out
on the console at end of game for player using X11 or Qt.  That happened
because the end-of-game pet handling takes place after the message window
has been closed.  It won't happen with the dev code any more because eating
no longer prevents pets from accompanying on final ascent or escape.  But
a pet carrying the Amulet should still fail to tag along and yield similar
result.  However, levl_follower() was changed (probably by me...) to have
pets not attempt to follow when they carried the Amulet, rendering code
in keepdogs()--which reported them as being confused--unreachable.  This
reverts levl_follower() to have Amulet-carrying monsters other than the
Wizard try to accompany the hero during level changes (and keepdogs still
prevents them from succeeding).  It also reorganizes keepdogs() a bit,
giving trapped followers an extra chance to escape from their trap and
preventing those who fail that chance from tagging along (previously,
non-pets ignored being trapped).

     After doing that, I got tty to behave similarly to the X11/Qt report:
a message behaved strangely.  In my case, it was delivered between a pair
of clearings of the screen and only visible by using terminal emulator's
scrolling buffer.  I think there's a wait_synch() missing somewhere, but
haven't tried to figure out where.  Instead, this makes the end-of-game
call to keepdogs() take place sooner, while pline() still works normally.

18 years agodecl.{c,h} bookkeeping tidbit
nethack.rankin [Sat, 3 Mar 2007 05:07:53 +0000 (05:07 +0000)]
decl.{c,h} bookkeeping tidbit

     Move the declaration of `current_wand' to where the other struct obj
pointers are, after decl.h's `#include "obj.h"'.

18 years ago questpgr followup
nethack.rankin [Sat, 3 Mar 2007 04:56:33 +0000 (04:56 +0000)]
 questpgr followup

18 years agoquestpgr support for special level arrival messages (trunk only)
nethack.rankin [Sat, 3 Mar 2007 04:51:47 +0000 (04:51 +0000)]
questpgr support for special level arrival messages (trunk only)

     Suggested by <email deleted>.  The level compiler allows
MESSAGE directives to provide text given upon initial entry to particular
levels.  Modify the code that delivers them to support quest pager text
substitution.  It could also be tweaked to support deliver-by-popup-window
in addition to deliver-by-pline, but I didn't go that far.

     He also suggested revising the message for the Plane of Air, but it
seems ok to me.  Instead, I've changed the message for the Astral Plane to
announce that it holds "the High Temple of <your deity>" rather than the
quite lame "the High Temples of the aligned gods".

18 years agoshop bones
nethack.rankin [Fri, 2 Mar 2007 03:28:25 +0000 (03:28 +0000)]
shop bones

     Dying at a shop doorway, or at the free spot one step in, while not
owing the shopkeeper anything would yield "<shk> gratefully inherites all
your possessions" but leave those possesions where the next hero could
just pick them up for free.  Move them all the way inside the shop, as
happens when the hero dies while owing the shk.  Also, if hero has gold
left after shopkeeper takes any payment owed, force it to go into shk's
inventory instead of having it end up in the pile of other stuff.

     finish_paybill() duplicated much of drop_upon_death(), but not the
two-weapon hack to avoid curse() causing hero's secondary weapon to be
dropped while in the midst of removing it from inventory (but unlike the
old 3.4.1 panic for that, this one just triggered a warning about nonzero
worn mask).  It also lacked the named fruit fixup, whatever that does.
Make finish_paybill() call drop_upon_death() instead of copying it.

18 years agohangup revisited (trunk only)
nethack.rankin [Thu, 1 Mar 2007 03:33:12 +0000 (03:33 +0000)]
hangup revisited (trunk only)

     More SAFER_HANGUP tweaking.  Delay its kicking in until main command
loop has been reached, and shut if off again once program is terminating.

18 years agowizard mode wishing - moat & traps
nethack.rankin [Tue, 27 Feb 2007 04:59:25 +0000 (04:59 +0000)]
wizard mode wishing - moat & traps

     When wishing for terrain, allow type "moat" as well as "pool".  And
when wishing for a trap, verify that trap creation succeeded instead of
always reporting that the requested type was made.

18 years agoexploding potion of acid left in bones
nethack.rankin [Sat, 24 Feb 2007 05:45:34 +0000 (05:45 +0000)]
exploding potion of acid left in bones

     Noticed while looking at the dipping code:  #dip at a pool location
gives the chance to dip into the pool, and dipping a potion of acid into
such causes the acid to explode, causing damage and posibly killing the
hero.  Use-up handling was being done after the dip had finished, so the
potion would remain in final inventory during disclosure and end up in
the resulting bones file if there was one.

18 years agomind flayer vs ghost (trunk only)
nethack.rankin [Sat, 24 Feb 2007 04:59:43 +0000 (04:59 +0000)]
mind flayer vs ghost (trunk only)

     There's newsgroup discussion about a mind flayer sucking the brains
of a ghost, plus speculation that the fix for C343-121 has already taken
care of it.  I agree with them that ghost's brains are too insubstantial
to be hit by brainsuck damage from mind flayers' tentacles.  C343-121 is
vague enough to cover this; the corresponding fixes entry was more specific
and is augmented here.

18 years agosaved game memory initialization (dev only)
cohrs [Fri, 23 Feb 2007 03:44:50 +0000 (03:44 +0000)]
saved game memory initialization (dev only)
Qt windowport crashed on startup because a couple alloc() calls in files.c
were not zero'ing out the memory afterward.  This resulted in uninit'd
memory access if there were no saved games.  This bug is in new dev code.

18 years agofix #H248 - 'speed monster' zap message not always necessary
nethack.rankin [Fri, 23 Feb 2007 03:13:37 +0000 (03:13 +0000)]
fix #H248 - 'speed monster' zap message not always necessary

     From a bug report:  zapping wand
of speed monster (or slow monster) at an immobile monster would give the
usual '<mon> is moving faster" (or slower) message even though the monster
couldn't move at all.  This fixes that for monsters who can never move
and also for monsters who are temporarily paralyzed or asleep, although I
wonder whether speed change magic ought to also snap the latter out of it.

18 years agostatus hilite bits
cohrs [Thu, 22 Feb 2007 16:19:04 +0000 (16:19 +0000)]
status hilite bits
I noticed an unused array and missing ifdef in generic hilite code.

18 years agodirections (trunk only)
nethack.rankin [Thu, 22 Feb 2007 05:24:05 +0000 (05:24 +0000)]
directions (trunk only)

     Some groundwork useful for the interface code I've been working on.
If we already have some direction to name-of-direction code somewhere, I
couldn't find it.

18 years agocouple of #tipping bits (trunk only)
nethack.rankin [Thu, 22 Feb 2007 05:16:58 +0000 (05:16 +0000)]
couple of #tipping bits (trunk only)

     Adjust some post-3.4.3 code.  Give feedback if you try to use #tip
on a statue--since it's a form of container, simple "nothing happens"
seems inappropriate.  (Unfortunately, the alternative used here isn't
much better.)  Also, you can use #tip to empty an inventory container
while swallowed; it was giving inappropriate levitation and drop-on-altar
behavior in that situation.

18 years agolockpicking while engulfed
nethack.rankin [Tue, 20 Feb 2007 02:32:50 +0000 (02:32 +0000)]
lockpicking while engulfed

     You can't begin or resume locking or unlocking a chest on the floor
while swallowed by a monster, but you could lock or unlock an adjacent
door in that situation.

18 years agosurviving drawbridge destruction
nethack.rankin [Tue, 20 Feb 2007 01:45:19 +0000 (01:45 +0000)]
surviving drawbridge destruction

     From a bug report:  you could end up
standing on water/lava if you survived being on an open drawbridge while
it was destroyed.  This fixes the bridge destruction case; opening and
closing are handled differently and I left them alone.

18 years ago#force fixes
nethack.rankin [Sun, 18 Feb 2007 05:54:15 +0000 (05:54 +0000)]
#force fixes

     Trunk and branch, noticed while working on an interface enhancement:
you could use #force to break the lock of a chest that's on the floor
while you're engulfed, also while levitating or mounted w/o riding skill.

     Trunk only:  refine an earlier fix that bills for breaking the lock
of a shop-owned chest.  The item which the hero is forced to buy showed
up in the bill as unlockable, which is accurate after the fact but didn't
reflect the shop's item.  Fix by billing for chest before altering it.

18 years ago#tipping empty bag of tricks bit (trunk only)
nethack.rankin [Sun, 18 Feb 2007 05:29:21 +0000 (05:29 +0000)]
#tipping empty bag of tricks bit (trunk only)

     Check in something from a month ago before I manage to lose it.

18 years agoexplore/wizard mode docs (trunk only)
nethack.rankin [Sun, 18 Feb 2007 04:49:19 +0000 (04:49 +0000)]
explore/wizard mode docs (trunk only)

     Update the brief explore mode section (it hasn't been a conditional
feature for quite some time, there's an extra way to access it now, and
new game started with -X is different from switching via the 'X' command)
in the Guidebook, and add a short debug mode subsection there.

18 years agopolyself weapon drop feedback
nethack.rankin [Sun, 18 Feb 2007 03:33:43 +0000 (03:33 +0000)]
polyself weapon drop feedback

     Don't say "you must drop your weapon" when it doesn't actually get
dropped.  And make "weapon" be more specific, comparable to the handing
for slippery fingers.

18 years agomore wielded, in-use leash
nethack.rankin [Sun, 18 Feb 2007 03:24:58 +0000 (03:24 +0000)]
more wielded, in-use leash

     Slippery fingers would cause a wielded, in-use leash to be dropped
without first unleashing.  The fixes entry for the polyself case applies
to this one too:
dropped wielded, in use leash should remain in inventory, since it's in-use

18 years agoprobing vs Schroedinger's Cat (trunk only)
nethack.rankin [Sun, 18 Feb 2007 02:20:59 +0000 (02:20 +0000)]
probing vs Schroedinger's Cat (trunk only)

     Someone in the newsgroup complained about zapping probing at a large
box dropped by a quantum mechanic and being told that it was empty rather
than that it held a corpse or live cat.  This sidesteps the issue by
reporting "the box seems empty" instead of "the box is empty", and not
setting its contents-known flag.  (That message is the main difference
between probing and the assorted other methods of observation [telepathy
and monster detection and possibly Warning for live cat, object detection
and food detection for dead cat's corpse] which might be expected to
trigger the cat's fate but don't.)  This also makes probing of self and
of monsters set the contents-known and locking-known flags for containers
in inventory, same as is done for probing which hits objects.  (Display of
container contents still only occurs for loose objects, not in inventory.)

18 years agonethack -X vs normal game (trunk only)
nethack.rankin [Sat, 17 Feb 2007 05:43:18 +0000 (05:43 +0000)]
nethack -X vs normal game (trunk only)

     Reported to the beta-testers list by <Someone> last April:
restoring a normal game save file in explore mode let you keep the file,
then after exploring and quitting without saving, you could restore it
again in normal mode and take advantage of whatever information you'd
gained.  This makes nethack -X (or playmode:explore) defer the switch to
explore mode when used while restoring a normal mode save file.  It now
performs a normal restore (with save file deletion) and then acts as if
the user had given the 'X' command interactively, requiring confirmation
to actually switch into explore mode.

18 years agoyet more wizard mode handling (trunk only)
nethack.rankin [Sat, 17 Feb 2007 05:25:36 +0000 (05:25 +0000)]
yet more wizard mode handling (trunk only)

     Reorganize the recent wizard mode control:  move set_playmode() from
xxxmain.c to the core, and have it call new authorize_wizard_mode() to do
the port-specific part.  If the set_playmode() call during startup doesn't
result in running in wizard mode (either because not allowed or user
didn't request it), it will be called again during restore if the save
file is from a wizard mode game.

     For ports which check character name for authorization, players will
have to use `nethack -u whatever -D' (or options for name and playmode) to
restore a wizard mode save file if WIZARD has been changed from "wizard".
plname[] from a wizard mode saved game will always have that value, so if
it's not the right one players will need to get authorized by the startup
code before loading the save file.

18 years agomore wizard/explore mode control (trunk only)
nethack.rankin [Fri, 16 Feb 2007 02:35:30 +0000 (02:35 +0000)]
more wizard/explore mode control (trunk only)

     Wizard mode or explore mode can be forced on (via -D or -X on the
command line, or now via OPTIONS=playmode:debug|explore) when restoring
a saved game; explore mode handling was confined to restgamestate(), but
wizard mode handling was replicated in every main().  Treat `wizard' the
same as `discover'.  Also, prevent a new game started when restore fails
from using the old game's option settings if partial restore attempt got
far enough to load the flags struct.  And update bemain.c and macmain.c
to catch up with the others modified by the playmode patch.

18 years agoOPTIONS=playmode:normal|explore|debug (trunk only)
nethack.rankin [Thu, 15 Feb 2007 05:22:54 +0000 (05:22 +0000)]
OPTIONS=playmode:normal|explore|debug (trunk only)

[see cvs log for src/options.c for some additional info]
     Relief for the command-line impaired.  Allow player to request
explore or wizard mode via run-time config file or NETHACKOPTIONS.
Validation is left to xxxmain() and has been updated for Unix, VMS, and
ports which share pcmain.  Mac and Be appear to allow any user to access
wizard mode, and may not need any modification, although they'll continue
to have the old buglet of running with both wizard and discover flags set
if player uses `nethack -X -D'.  This may or may not work as-is for the
Qt interface depending upon whether it goes through one of the xxxmain()'s
mentioned above [someone needs to make sure that it doesn't allow Qt on
Unix to bypass the (username == WIZARD_NAME) test when user requests
wizard mode].

18 years agoOPTIONS=playmode:normal|explore|debug (trunk only)
nethack.rankin [Thu, 15 Feb 2007 05:21:24 +0000 (05:21 +0000)]
OPTIONS=playmode:normal|explore|debug (trunk only)

     Relief for the command-line impaired.  Allow player to request
explore or wizard mode via run-time config file or NETHACKOPTIONS.
Validation is left to xxxmain() and has been updated for Unix, VMS, and
ports which share pcmain.  Mac and Be appear to allow any user to access
wizard mode, and may not need any modification, although they'll continue
to have the old buglet of running with both wizard and discover flags set
if player uses `nethack -X -D'.  This may or may not work as-is for the
Qt interface depending upon whether it goes through one of the xxxmain()'s
mentioned above [someone needs to make sure that it doesn't allow Qt on
Unix to bypass the (username == WIZARD_NAME) test when user requests
wizard mode].

     playmode:discov[ery] is a synonym for explor[e] and playmode:wizard
is one for debug.  Using -X or -D on the command line overrides any
config file or environment playmode value.  (We might want to add -N or
something to force normal mode when config/env specifies something else.)

     This suffers from the same bug as `nethack -X' and `nethack -D':  a
player can save a game in normal mode, then restore in explore or debug
mode and choose to retain the save file, obtain information about the
current game (identifying inventory or using enlightenment or mapping out
previously visited levels and so on), quit, then restore the original save
file normally in order to take advantage of the undeserved information.

18 years agowielded leash, monster bullwhip use
nethack.rankin [Tue, 13 Feb 2007 04:54:35 +0000 (04:54 +0000)]
wielded leash, monster bullwhip use

     Simplify <Someone>'s patch (the part for the secondary weapon wasn't and
still isn't needed since dual-wielding can only occur when both primary
and alternate weapon slots contain weapons or weapon-tools, but we might
as well keep it).  There was at least one other case where wielded in-use
leash could be removed from inventory without becoming unleashed first:
a bullwhip-wielding monster could snatch it away.

     That lead to some other whip issues:  monsters who select disarming
via bullwhip as miscellaneous strategy had 80% chance of not using it on
any given turn, but had no chance to select another misc strategy on such
turns--they always resorted to ordinary nonMUSE behavior and usually just
attacked.  The adjacency check missed diagonal locations, also would aim
the disarm attempt accurately even when displacement or invisibility made
the hero's precise location unknown.  [I took the easy way out here and
only let them try to disarm when they know the hero's location.  It's
tempting to aim at the guessed location and sometimes accidentally disarm
a nearby monster, but disarming is an action which targets a particular
weapon rather than just a location.]  Lastly, disarming always targetted
hero's primary weapon, never a dual-wielder's secondary one.

18 years agopolymorph dropping in-use wielded leash part 2
cohrs [Mon, 12 Feb 2007 21:40:16 +0000 (21:40 +0000)]
polymorph dropping in-use wielded leash part 2
forgot to handle the twoweapon case, and messed up the test logic (which
appeared to work in previous, incomplete testing)

18 years agopolymorph dropping in-use wielded leash
cohrs [Mon, 12 Feb 2007 21:25:52 +0000 (21:25 +0000)]
polymorph dropping in-use wielded leash
From a bug report, if you polymorph into
something, like a killer bee, that causes you to drop your weapon, but the
weapon is a wielded, in-use leash, the leash would be dropped but retain
it's in-use state.  However, the leash was tied to you, so it seems it
should remain attached, just unwielded, just as it would if it hadn't been
wielded.  I've changed the behavior to do this.  I wonder whether one
should be able to wield an in-use leash.

18 years agofix #Q417 - gelatinous cubes can engulf Rider corpses
nethack.rankin [Sun, 11 Feb 2007 03:59:08 +0000 (03:59 +0000)]
fix #Q417 - gelatinous cubes can engulf Rider corpses

     From a bug report:  gelatinous cubes
could engulf Rider corpses, allowing g.cube and cargo to be teleported
away without triggering corpse revival, or to be hit with theft attack by
poly'd hero to get the corpse into inventory so it could then be put into
a container in order to prevent revival (or to be destroyed via bag of
holding explosion or cursed access).

18 years agoumpteenth hangup bit
nethack.rankin [Sun, 11 Feb 2007 03:36:15 +0000 (03:36 +0000)]
umpteenth hangup bit

     From a bug report:  hangup during
screen updating at tail end of successful restore didn't create a new
save file when disconnecting.  Use his suggestion for moving the setting
of program_state.something_worth_saving sooner, before the save file is
deleted.  To do that, restlevelstate() needs to come sooner too.  I think
this is safe enough to include in the branch code.

     For the trunk, I'm not sure whether the SAFERHANGUP config will work
well here.  It has to survive long enough under autopilot to enter moveloop
before the chance to save kicks in.

18 years agomore jumping (trunk only)
nethack.rankin [Sun, 11 Feb 2007 01:50:56 +0000 (01:50 +0000)]
more jumping (trunk only)

     Allow jumping via spell when hero or steed has wounded legs.
Otherwise the previous fix for immobilized steed--and the existing code
requiring limbs for physical jump but not for spell jump--is inconsistent.

18 years agofix #Q382 - jumping possible while riding a sleeping pet (trunk only)
nethack.rankin [Sun, 11 Feb 2007 01:33:26 +0000 (01:33 +0000)]
fix #Q382 - jumping possible while riding a sleeping pet (trunk only)

     From a bug report:  when riding,
#jump command and jumping spell didn't check whether steed is able to move.
This makes #jump command, either magic boots or knight's innate ability,
fail if the steed can't move.  Spell still succeeds; its magic overrides
steed's immobility.  Fix is trunk only since it relies on a function that
isn't in the branch.

     Also, tweak hero movement to avoid an extra function call per move
when not riding.

18 years agosleeping gas trap vs steed
nethack.rankin [Sun, 11 Feb 2007 01:23:28 +0000 (01:23 +0000)]
sleeping gas trap vs steed

     Noticed while checking out the report that you can #jump when riding
a sleeping steed:  hero's sleep resistance or magical breathing prevented
sleeping gas traps from hitting steed.  "You are enveloped in a cloud of
gas" but your steed is untouched?  That didn't make sense.

18 years agogcc compilation warning bits
cohrs [Sat, 10 Feb 2007 17:37:17 +0000 (17:37 +0000)]
gcc compilation warning bits

18 years agoH238 - spelling of Dr Dolittle
cohrs [Sat, 10 Feb 2007 17:30:24 +0000 (17:30 +0000)]
H238 - spelling of Dr Dolittle

18 years agoQ387 - grammar fixes in Samurai quest
cohrs [Sat, 10 Feb 2007 16:31:14 +0000 (16:31 +0000)]
Q387 - grammar fixes in Samurai quest
"Wakarimasu?" should be "Wakarimasu ka?"

18 years agofix #Q404 - monster wielding cursed corpse
nethack.rankin [Sat, 10 Feb 2007 05:14:22 +0000 (05:14 +0000)]
fix #Q404 - monster wielding cursed corpse

     From a bug report, applying a bullwhip
towards a monster to try to steal its weapon would report that a cursed
cockatrice corpse was welded to the monster's hands even though corpses
wielded by the player never become welded.  Code for monsters deciding
what to wield knew that corpses don't weld; everywhere else seems to
assume that they only wield weldable weapons.  Add a routine to check
whether a wielded item is welded, similar to what's done for the hero.  I
fixed a couple of other spots besides use_whip() but didn't hunt all over.

18 years agotypo in previous patch
nethack.rankin [Sat, 10 Feb 2007 04:19:41 +0000 (04:19 +0000)]
typo in previous patch

18 years agofinish_map prototype
nethack.rankin [Sat, 10 Feb 2007 04:18:52 +0000 (04:18 +0000)]
finish_map prototype

     There's a newsgroup posting about building for Windows using minGW
(gcc) within the cygwin Unix emulation environment, and it includes diffs
for the changes used.  One of the items being patched is a straight source
bug triggered by altering the definition of `boolean'.  finish_map()'s
prototype doesn't match its definition (uses boolean args but has XCHAR_P
in the prototype).

18 years agofix #Q159 - segfault with super long item names
nethack.rankin [Sat, 10 Feb 2007 04:05:47 +0000 (04:05 +0000)]
fix #Q159 - segfault with super long item names

     From a bug report, putting an object with
really long specific and type names into a container with really long
specific and type names caused the program to crash.  pline() overflowed
the buffer it formatted into, and even though it was able to send that
for output and trigger a --More-- prompt, eventually a segfault occurred.
Give vpline and vraw_printf a much bigger working buffer, then truncate
the formatted text to BUFSZ - 1 characters so that we don't just push the
long line trouble into the separate interfaces.

18 years agoQ416 kicking gold (trunk only)
nethack.allison [Sat, 10 Feb 2007 02:02:49 +0000 (02:02 +0000)]
Q416 kicking gold (trunk only)

<email deleted> on Monday, January 29, 2007:
>Hero is able to kick a pile of gold (say, 100) and have the entire pile move at
>once in the same direction; very easy to avoid gold on traps.  Kicking gold
>should probably scatter the pieces in multiple directions or at least not be
>quite so easy.