Commit Graph

2063 Commits

Author SHA1 Message Date
nethack.rankin
ea61a13add number_pad:3,4,-1 (trunk only)
[See the cvs log from flag.h for comments pertaining to iflags.num_pad
and Cmd.num_pad, Cmd.commands[], Cmd.serialno.]
2005-11-26 02:34:23 +00:00
nethack.rankin
cd4e6a8f1a wishing bit (trunk only)
The code let you wish for trapped containers in wizard mode and tried
not to let you do so in normal mode.  But it handled the trapped attribute
by overloading the poisoned one, so wishing for a "poisoned chest" would
produce a trapped chest in any mode.  This fixes that by removing the
overloading.  You can wish for a trapped box/chest (or tin) in wizard mode
and you can now also explicitly wish for an untrapped one in any mode.
Asking for trapped in normal mode--most likely hoping to seed a dangerous
bones file--just negates any preceding "untrapped" handled earlier within
the same wish, and specifying "poisoned" for a container no longer has any
effect.
2005-11-19 04:38:42 +00:00
nethack.rankin
bdf85bfa84 magically detecting chest traps (trunk only)
(Nothing to do with the recent suggestion that the search command be
extended to find traps on adjacent containers.)  When a crystal ball or
confused/cursed gold detection performed trap detection, it found trapped
chests on the floor but not any which were buried or carried by the hero
or by monsters.  This fixes that.

     Still needs fixing?  The message "your toes stop itching" when the
only trap on the level is at the hero's current location is pretty strange
if that trap happens to be carried rather than stood over, but I don't
know what to change it to.  I guess it's always been strange if there was
a ceiling trap rather than a floor trap involved.
2005-11-17 04:51:13 +00:00
nethack.rankin
dce306df5b fix #Q227 - cancelling items in shop entrance (trunk only)
From a bug report:  cancelling objects
in a shop doorway or one step inside would cause the shopkeeper to brand you
a thief.  The relevant code is trying to handle the case where you're inside
one shop and zap a wand or spell from there into another one; it didn't cope
with being in the neutral area of a single shop.
2005-11-17 03:51:16 +00:00
nethack.rankin
179e30b2fe X11 typo
From a bug report:  fix a typo for mouse
position handling in set_button_values().  I have no way to test this,
nor can I tell whether it could have ever impacted anyone.  The old code
clearly had a mistake and the fix is obvious.
2005-11-13 05:55:32 +00:00
nethack.rankin
75c4576668 gas spore explosions while hallucinating (trunk only)
From a bug report:  when hallucinating,
messages for affected monsters and/or hero referred to "the gas spore's
explosion" instead of supplying random monster names.  This is a little bit
tricky; since it can be displayed multiple times for one explosion, it needs
to be constructed on the fly in explode().  (Caller couldn't have handled
this anyway since it's using the value for killed-by reason which mustn't
be distorted by hallucination.)
2005-11-13 03:20:20 +00:00
nethack.rankin
d5be1ff3f1 plug luckstone identification hole (trunk only)
From the newsgroup:  when you pick up a gray stone, you can determine
whether it is a luckstone by attempting to name it "the Heart of Ahriman".
Your "fingers slip" if it is, they don't if it isn't.  That's way too
cheesy for my tastes.  This patch will make the finger slipping occur for
any item that has the same description rather than just for the exact type.
Now you won't be able to name any type of gray stone "the Heart of Ahriman"
(nor an elven broadsword "Stormbringer"; however, assuming that you manage
to acquire a non-artifact runesword, you can still uselessly name it
"Orcrist" if you want).
2005-11-12 05:30:11 +00:00
nethack.rankin
90a9978c33 fix #Q221 - inappropriate vault guard message when embedded gold reached
From a bug report:  when a guard who's
leading the character out of a vault comes across gold (from mineralize()
usually, but a player could deliberately seed the area in xorn form), the
message "the guard calms down and picks up the gold" was given even though
the guard wasn't angry.  Pick up such gold as soon as temporary corridor
reaches it so that on his next move the guard won't mistakenly think that
the hero has just dropped it.
2005-11-12 03:19:22 +00:00
nethack.rankin
fa708fe73b chest trap bit
From a bug report, the "you stagger"
message when a trapped chest releases a cloud of gas shouldn't include the
inaccurate phrase "and your vision blurs" if hallucination is blocked by
Grayswandir.  Suppress it in that case.
2005-11-02 02:35:31 +00:00
nethack.rankin
0defd00b4b fix #Q211 - inappropriate vault feedback
From a bug report, you'd get the message
"the corridor disappears" whenever a vault guard was killed, even if the
temporary vault corridor was already gone due to leaving its vicinity.  This
fix seems to work ok, but I don't pretend to understand how the convoluted
vault code actually works.
2005-10-29 04:07:21 +00:00
nethack.rankin
1f5c035b3b makeplural/makesingular support for foo-at-bar (trunk only)
Suggested by Janet, after inhaling paint fumes.  Unlike mother-in-law,
which is an entry in the hallucinating monsters list and would be pluralized
if chosen as a tin description, I think the rank title man-at-arms will only
ever go through plural/singular handling if used as a fruit name.  But since
the man/men part was already implemented for pluralization, adding the -at-
part is trivial.  Also adds men/man singularization for the general case
where -at- isn't involved.
2005-10-25 01:47:03 +00:00
nethack.rankin
297eadd67d fix M203 - grammar for tin of hallucinated "mother-in-law" (trunk only)
From a bug report, (is that name just
a coincidence, or is it our Matt?), "this tin smells like mother-in-laws"
should be "this tin smells like mothers-in-law".  That led to a small can
of worms when I tried experimenting with mother-in-law as the named fruit.
Naming your fruit "pomegranates" would result in "pomegranateses" if you had
more than one.  These changes are mostly just band-aids for that; I think
the proper solution is to singularize the user's value when fruit name is
being assigned.  Force it into lower case at the same time, then some other
special casing could be eliminated.  There's no particular reason to keep
"grapes" and "grape" as separate entries, nor "matzot" and "MATZOT" either.

     One of the non foo-in-bar changes prevents "grapefruit" from getting
a false match against named fruit "grape".  (Are there any legitimate cases
where trailing text should be ignored?  I couldn't think of any.)  Another
results in a wish for "kumquats"--when fruit name "kumquat" exists--yielding
two instead of a random amount, the way that specifying plural works with
other sorts of objects.  And if you're strange enough to name your fruit
"kumquats" in the first place, asking for "kumquat" will produce exacly one.

     This patch applies cleanly to 3.4.4 but I don't think it's been tested
adequately enough to be included there.
2005-10-22 06:38:41 +00:00
nethack.rankin
c1393e508f key use by pets
Spotted when fixing the Rogue level digging/phasing bug:  pet movement
was setting up the wrong flag for pets who happened to be carrying a key.
This wasn't particularly noticeable because they tended to drop keys right
after picking them up.  And apparently the checks elsewhere in movement
prevented that wrong flag from having any effect; once I changed it so that
pets would hang on to keys, I never saw them break a door down with one.
Now they'll keep keys, similar to unicorn horns and pick-axes, and use them
properly.  The door unlocking message needed a tweak because it assumed
that the opener was on the far side trying to reach you and looked quite
odd when you could see the action taking place.

     I've put this into the fixes file as a new feature rather than a fix.
2005-10-11 04:22:18 +00:00
nethack.rankin
fb6cbd37e7 fix C343-3 / #U793, tame h and U don't dig on Rogue level
From a bug report, 2003:  a
pet who normally would dig could pass through walls and solid rock on the
Rogue level without leaving a tunnel in its wake.  Monsters are explicitly
prohibited from digging on the Rogue level, but pet movement ignored that
and specified that locations accessible via digging were valid destinations;
actual movement bypassed the digging step so it acted like passthru.
2005-10-11 03:47:27 +00:00
nethack.rankin
8f8538e527 fix SC343-9, bones handling for corpse/statue of unique monster (trunk only)
The logic in cant_revive() was a little off, so reviving a unique
corpse or statue on a bones level would recreate that unique monster instead
of making a doppelganger who's imitating it.  Fixing that was simple but had
the unintended side-effect of making it impossible to deliberately create
unique monsters with ^G in wizard mode.  So create_particular() has been
modified to let the user override the zombie or doppelganger conversion.
And then when not overriding, shapechangers took on random appearance, so
this also changes create_particular() to override shape changing.  And that
has the side-effect of making chameleons or vampires start out as themselves
instead of as random critters or bats/fog clouds.  [Better stop now! :-]

    resetobjs() also needed to have extra corpse handling when saving bones
because the fix for revival wouldn't prevent you from turning to stone by
eating apparent-Medusa's corpse.  Statues of uniques and corpses of special
humans like vault guards and shopkeepers didn't need anything extra; they
can retain original form until an attempt at revival is tried.

    I'm not going to try to adapt this for 3.4.4.
2005-10-08 04:19:31 +00:00
nethack.rankin
7b1b472c33 alignment of Angels
From a bug report, the probing/stethoscope code assumed that all Angels
(the specific monster type, not the whole 'A' class) used the epri extension
to hold alignment, but that's not true for randomly generated ones.  So
monster status feedback gave erroneous results, and it would vary based on
pet behavior if the random Angel had been tamed.  Also, touch_artifact()
didn't know about special alignment handling for Angels and aligned priests
so always used their default alignment.

     There are other problems with Angels--such as whether they should even
be allowed to be generated randomly in the first place--that this doesn't
attempt to address.  The patch for that was starting to sprawl all over the
place so I pulled this simpler bit out for a first cut.  Probing now shows
the Wizard of Yendor as unaligned instead of lumping him in with chaotics.

     Another Makefile update needed:  pline.[c,o] no longer needs epri.h.
2005-10-05 05:15:46 +00:00
nethack.rankin
f1fe8c1600 mind flayer brain attacks (trunk only)
Fix a couple of problems From a bug report.  Eating a Rider corpse is fatal, but eating a live Rider's
brain was not--now it will be, both for monster mind flayers and for player
poly'd into one.  Also, there was no check for cannibalism when poly'd hero
eats brains--now there is.  Not mentioned in the report:  eating Medusa's
brains will now be fatal just like eating her corpse.  And pet mind flayers
who eat the hero's brains will gain some nutrition like they do when eating
monster brains.

     Creating a common eat_brains() routine turned out to be something of
a mistake; there is only a tiny amount of overlap among the u-vs-m, m-vs-u,
and m-vs-m cases.

     Makefiles need a dependency update to add edog.h for eat.c.
2005-10-01 05:14:19 +00:00
nethack.rankin
fa7fd20cae handling of {DEC,IBM,MAC}graphics options
Fix the problems From a bug report.  So having
  OPTIONS=IBMgraphcs
  OPTIONS=noDECgraphics
would yield an ASCII display instead of showing IBMgraphics, but IBMgraphics
flag in the Options list would falsely show as on.  Manually toggling it off
put things back into sync.

     Avoiding the false setting is completely trivial.  And fixing the
inappropriate override turns out to be easy too, unless I've bungled this.
One thing it does not do is try to warn about attempts to set conflicting
options like
  OPTIONS=IBMgraphcs
  OPTIONS=DECgraphics
Fixing that seems to be too messy to bother with, particularly since the
game runs ok (leaving the setting handled last in place).
2005-09-24 04:21:50 +00:00
nethack.rankin
7828cb3687 level drain while polymorphed (trunk only)
Noticed when incorporating the "vampire dancing" patch:  losing a level
while polymorphed would subtract from your normal hit points but didn't
affect your monster hit points.  Now they'll lose d8 from max and current,
similar to the amount they increase when gaining a level.

     This also addresses an issue from the newsgroup a few weeks back:
someone mentioned an assumption that Stormbringer drained an amount other
than d8 for monsters who use some other formula for their hit points.  It
wasn't true, but now it will be (approximately).  Most monsters with unusual
hit points aren't subject to level drain, so it shouldn't have much impact.
2005-09-22 06:02:08 +00:00
nethack.rankin
7ec0d054a4 fix #M178 - mirror feedback for unID'd looking glass
From a bug report, applying a
mirror at sleeping Medusa yielded "too tired to look at your mirror" even
even though the item being used was listed in inventory as "looking glass".
Several other messages and any target monster would produce similar things.
Perhaps they should auto-ID when applied, but I changed messages to use
the description if real name isn't known.

     This also treats incubi identically to succubi regarding mirrors:
they like to see their own image and will take the mirror away when one is
applied at them.
2005-09-22 04:57:48 +00:00
nethack.rankin
5bc6f1444e HP and Pw multiplication (trunk only)
Fix the problem pointed out by <email deleted>
where polymorphing into a new man at level 1 could be used to approximately
double or triple your hit points and spell power.  With means to drain
level back down to 1 and with amulets of life saving to survive those times
you lose levels instead of gain, you could do this repeatedly and end up
with HP and Pw values in the millions.

     This uses the earlier patch that records the HP and Pw increments from
level gains.  Now when polymorphing into a new man, level based HP and Pw
are removed from the current values, remainder get multiplied by 80%, 90%,
100%, or 110% (average 95%, so tend to drop slightly), then a brand new set
of level gain increments (reflecting new man's Con and Wis) are added in.

     Code for calculating spell energy is moved from pluslvl() and u_init()
into new routine newpw().  It and newhp() take over responsibility for
remembering the level based increments from pluslvl() which didn't deal
with the initial amount (stored in slot [0]; earlier patch didn't need it).
2005-09-21 05:31:42 +00:00
nethack.rankin
25a9c0ca4b "vampdance" patch for avoiding unlimited HP and Pw gain (trunk only)
<email deleted> sent a report with
subject "Vampire-dancing can give you unlimited maxhp/maxmp" about how you
can manipulate your hit points and spell energy by using equipment to
lower Con and Wis prior to deliberately losing a level, then switching to
alternate gear to raise them prior to gaining the trivial 1 XP needed to
regain the lost level.  With Stormbringer (to toss up so that it falls on
your head) or spell of drain level (to cast at yourself), you can do this
level toggling as much as you like since it doesn't consume any resources
in the process.  All you is a supply of non-threatening monsters to kill
for the regaining half.

     In March he sent "vampire-dancing (patch)" which didn't include a
patch but did give a URL ( http://nethack.angband.pl/vampdance.patch )
for one.  That contained his suggested fix:  recording the hit points and
energy points given each time you gain a level and then using those exact
amounts when you lose the corresponding level.  It's still possible to
manipulate HP and Pw by losing multiple levels after you've boosted Con
and Wis to ascension ready status (you'll lose the original values but can
expect to get better ones when gaining levels back), but can only gain a
modest improvement and repeating it doesn't augment the effectiveness.
Plus it's much harder to regain multiple levels than it is to get just one.

     His patch had a couple of bugs which I've fixed.  I suppose that there
could be additional potential problems but the idea and its implementation
are both pretty straightforward.  (This doesn't address the other recently
reported situation of using polymorph into "new man" while at level one to
multiply HP and Pw.)
2005-09-13 05:09:17 +00:00
nethack.rankin
1c290666a6 choking on gold
From a bug report:  "choked on an a very rich meal".
2005-09-10 02:40:51 +00:00
nethack.rankin
6e987c27af gems vs snoozing unicorns
From the newsgroup three or four weeks ago:  sleeping or pararlyzed
unicorns would catch thrown gems despite being unable to move.  Now they'll
magically dodge instead--in other words, thrown gems will always simply
miss the target (and land at its feet) when a unicorn is unable to move.
The unicorn won't be angered or awakened by the attempt.
2005-09-07 04:51:56 +00:00
nethack.rankin
d129f6760e fix vision bug - moving a subset of boulders from a location
From a bug report.  Pushing one
boulder from a location which had more than one would open up line of sight
at that spot as if all boulders there were gone.
2005-09-04 03:06:20 +00:00
nethack.rankin
e3f1716da9 consistent level change messages
From a bug report: #M30: 3.4.2 bugs and ideas); describe
flyers (poly'd hero or riding flying steed) as flying when they use ladders
or jump down holes.  This also gives feedback when using the stairs in the
ordinary up or down case, where no message was previously given.
2005-09-03 05:36:40 +00:00
nethack.rankin
545239f4b1 fix M167 - hero lycanthrope vulnerable to level drain
From a bug report, player's character inflicted
with lycanthropy doesn't gain level drain resistance when in normal form
even though lycanthrope monsters do have it when in their human form.  The
report claimed that the character didn't gain it when in beast form either,
but the code--and testing--suggests otherwise.

     The same resist_drli() call used for monsters is used for the hero,
but the is_were() check there isn't able to recognize a lychanthrope hero
since youmonst->data doesn't track that when in human/normal form.  This
adds another more specific check to handle that case.
2005-09-02 06:29:15 +00:00
nethack.rankin
8ce7216a0c fix M159 - crash at end of prayer
Fix the crash caused by division by zero (attempt to compute rn2(0))
when deciding prayer boon for a character whose Luck went negative during
the course of the prayer.  <email deleted> triggered it
by killing a shopkeeper with the ongoing damage from a scroll of stinking
cloud; his non-chaotic character was branded a murderer and lost two points
of Luck after the prayer was already in progress.  (Prayers fail when Luck
is already negative, so the code to pick a boon expects non-negative values;
the fact that is always adds at least +2 leads to me to suspect that someone
already realized that luck timeout on Friday 13th could result in Luck of -1
at the end of a successful prayer--that value doesn't trigger this crash.)
2005-09-02 06:00:44 +00:00
nethack.rankin
bbc825f9d9 grammar for graveyard sounds
For "the hair on the back of your neck stands up" or "the hair on
your head seems to stand up" make subject and verb agree when poly'd into
forms where "hair" is replaced by something explicitly plural like "scales"
or "cilia".
2005-08-30 05:14:07 +00:00
nethack.rankin
dc1b1e1ce4 tourist leader's greeting
Fix typo From a bug report.
2005-08-27 04:49:16 +00:00
nethack.rankin
32baec7bb1 steed corpse
Fix the problem From a bug report.  Presumeably the corpse exclusion at <u.ux,u.uy>
was intended to be for killing your way out of an engulfer, but there wasn't
any comment to that effect.  The exclusion still applies if you were inside
the monster when it died; ridden steed is the only other way I can think of
to have a monster die at your location, so it should be the only case which
gets affected.  Neither steed nor engulfer is allowed to generate a random
item when upon death; you already know what was carried in those cases.

     The bulk of the diff is from reorganizing the relevant `if' and
subsequent indentation changes.
2005-07-26 04:55:57 +00:00
nethack.rankin
921361d1bc pudding farming (trunk catchup) 2005-07-17 05:21:48 +00:00
nethack.rankin
d7a0044056 farmed pudding (trunk only)
I've gotten tired of seeing newsgroup claims along the lines of
"since devteam is aware of this and has chosen not to eliminate it, they
must endorse it", so weaken the tactic of "pudding farming".  It is still
possible to gain unlimited experience (past level 15 or so there's not
much point), but will be less effective for gaining items and for providing
sacrifice fodder.  Keep track of which monsters have been created via
cloning (mostly puddings; gremlins and blue jellies are affected too but
nobody's likely to care much about them) so that they can receive special
handling.  Make cloned monsters progressively less likely to leave corpses
as the number killed for a particular type goes up, and also much less
likely to drop random items at death.  This is sure to need some tuning
once hard core farmers point out how they can still abuse it.  For the
absurdly extreme case, see

http://scavenger.homeip.net/farmbot/HomePage

FYI, farmbot/PuddingFarmingHOWTO includes an impressive screen shot of a
dungeon level where rampant farming is taking place.
2005-07-17 05:00:25 +00:00
nethack.rankin
a1b4bce87c fix #M132 - Sunsword glows after its wielder dies
When lit due to being wielded by a monster, Sunsword continued to emit
light after that monster was killed.  This was fixed by <Someone> in 3.4.1 but a
change I made for 3.4.3 broke that fix.  When mdrop_obj() was split out of
relobj(), relevant unwielding code ended up only being executed for monsters
who were still alive.
2005-07-15 02:57:21 +00:00
nethack.rankin
5243a5137d scum bug
Fix the reported bug about an inappropriate space in the message
  "For you, scum ; only N zorkmids for that foo."
when an angry shopkeeper quotes a price for an item which has just been
picked up.  Also, suppress "only" in that case; just include it when the shk
isn't angry.  And the word "zorkmids" was actually missing, so I added it.
I think the semi-colon should actually be a comma, but I've left that as is.
2005-07-07 04:53:52 +00:00
nethack.rankin
dc25ffb83c castle tune prayer result
From <Someone>, half a year or so ago:

> When you've already entered the Castle, I think your God shouldn't be
> giving you the two Castle-related messages anymore.
>
> This might be difficult to track, I realise that.

It already suppressed the tune delivery feedback if you had opened the
drawbridge with music or if that drawbridge had been destroyed.  And if
you've entered the castle by the back door or via wand of opening/spell of
knock, learning the tune could still be useful, so I didn't try to extend
dungeon tracking to the point of "entered the castle".  However, if you've
already passed beyond the valley below then you most likely no longer have
much interest in the drawbridge, so add a check for that to the prayer
feedback suppression.

     <Someone>'s real concern was probably more about the message phrasing
than the "useless" prayer boon (since it says "to enter the castle" rather
than "to open the castle drawbridge"), and that does make the god sound a
bit silly if you've already entered the building.  It would make sense to
skip the first of the two messages if you make it inside without opening or
destroying the bridge, but this patch doesn't attempt to address that.
2005-06-26 05:18:25 +00:00
nethack.rankin
7364f73ce7 entering gehennom
When you first attempt to walk down the stairs from the Valley of the
Dead to the second level of the Gehennom branch, the game prompts you about
whether you really want to proceed.  But if wasn't keeping track of whether
you had previously level teleported past that point (which is possible when
starting from the Valley rather than from higher up), so would still issue
that once-only prompt if you used the stairs later.  Mark the prompt as if
it has already given whenever you reach a Gehennom level beyond the Valley.
2005-06-26 05:10:49 +00:00
nethack.rankin
3e3ec4ebe5 fix #M100 - mind flayer's psychic blast during prayer
From a bug report:  the invulnerability conferred
during the multi-turn delay for a successful prayer was not protecting
against damage inflicted by hostile mind flayer's "wave of mental energy".
2005-06-26 04:02:24 +00:00
nethack.rankin
ce6c2e3a4d praying for health (trunk only)
Make it easier for a low level character with ordinary Max HP to get
the healing result from a successful prayer.  Mid level characters are the
same as before:  will be healed if at 1/7 (or worse) of max.  High level
characters, or anyone with Max HP really high for their level, will need
to wait until current HP is lower before being able to obtain that result.
This mainly affects spoilers; the actual impact for any player who doesn't
know the old formula is fairly small.  The exception is for "protection
racketeers" who manage to build up a high HP without gaining any levels;
a level 1 character will only get healed when at HP 5 or less, regardless
of what percentage of max their current hit points are.

     Under the old system you could get healed at 6 HP if you had 42, at
7 HP out of 49, and so forth.  Now you'll need to be at least level 2 to
get healed at 6 HP out of 30 or more, at least level 3 for 7-9 out of 35-45.
"Normal" max is capped at 15 times level and anyone above normal is treated
as if their max was that lesser normal value.  Levels 1 to 5 use a new
threshold of current HP being 1/5 (or worse) of max, levels 6-13 use 1/6,
14-21 retain old 1/7 threshold, 22-29 now use 1/8, and level 30 uses 1/9.
The somewhat odd level break points are based on where rank titles change.
2005-06-25 04:31:02 +00:00
nethack.rankin
ebc20fa560 fix #M108 - seeing while asleep
I think being asleep or unconscious ought to override vision the way
that being blinded does, but that's a more ambitious change than I care to
tackle.  This replaces You("see ...") with You_see("..."), comparable to
You_hear().  It catches the reported door case and several variations of
light sources burning out while on the floor rather than in inventory, but
it probably misses some other cases.  zap_over_floor() in particular is
highly suspect.
2005-06-23 03:48:14 +00:00
cohrs
b72967f6a6 avoid crash when thrown potion hits bars before a monster
From a bug report. <Someone> as slashem-Bugs-883643 on 1/24/2004.  To avoid
using the possibly invalid object pointer after calling bhit(), changed as
suggested to add another level of indirection allowing bhit to null the
object pointer before returning.  Callers that are affected update their
object pointers after bhit returns.
2005-06-21 18:51:48 +00:00
nethack.rankin
a092740e67 fix #M107 - blindness and secret doors
From a bug report:  zapping force
bolt broke an adjacent potion of blindness (possibly carried by the monster
he was attacking) which caused "it suddently gets dark" but further course
of the bolt resulted in now blinded hero recieving "a door appears in the
wall".  make_blinded() was deferring vision recalculation until next pass
through moveloop() (or until next pline()--if the "gets dark" message had
been delivered after the call to make_blinded() instead of before, this
wouldn't have been noticeable).  Fix is trivial:  just recalculate vision
immediately when temporary blindness is toggled.  [It might also be needed
for involuntary blindfold removal, although I suspect that that is always
accompanied by corresponding pline() which gets vision back into synch.]
2005-06-16 03:37:25 +00:00
nethack.rankin
c967266d6f growing into genocided form
<Someone> recently reported that after lieutenants had been genocided,
he saw a sergeant drink a potion of gain level and then vanish, leaving
behind its gear but no corpse.  The message about growing into a lieutenant
and subsequently dropping dead would only be given if the monster could
be sensed via telepathy, not when it occurred in plain sight.  I'm not
absolutely sure that this was unintentional, since sensing the dying
monster's mind might be giving additional information about what was
happening.  But there was no comment stating that and I think such behavior
violates the principal of least surprise, so seeing it happen will now give
the message too.
2005-06-14 04:42:16 +00:00
nethack.rankin
0f0a85d0bd breaking polyselfless conduct
Because the description seen by the player is "you have never changed
form" rather than "you have never polymorphed yourself", make death by fully
turning into green slime (even if that death is avoided via lifesaving)
violate the conduct.  Suggested by <Someone> 9-Dec-2004.  Likewise, eating
a mimic corpse and temporarily turning yourself into a pile of gold also
violates that conduct.  Mentioned by someone--probably <Someone>, or possibly in
the newsgroup--a long time ago.
2005-06-12 04:46:59 +00:00
nethack.rankin
ff54d82b00 pettype=horse
Accept OPTIONS=pettype:horse quietly instead of issuing "unrecognized
pet type 'horse'" message.  It doesn't actually do anything from player's
perspective--knights always get a pony and other roles always get a cat or
dog, as before.

     I had a much more elaborate version which recognized "pony" (plus
"kitten", "little dog", "puppy" and assorted other variations of the
acceptable types), but it was absurd overkill for something that never
come up during actual play.  If someone tries to specify "kitten" and gets
"unrecongized type", it shouldn't take him longer to figure out "cat" is
what's needed even without resorting to actually reading the Guidebook.

     Can someone generate an up to date Guidebook.txt and check it in?
2005-06-01 04:11:55 +00:00
nethack.rankin
be61667b31 reviving quest leader
<email deleted>, attempting to #chat
with quest leader who was raised from the dead yielded "impossible: invalid
quest character".  The code attempted to handle that but the conditional
logic for preserving the m_id field was backwards.  3.4.3 only dealt with
the corpse revival case; dev code tried to support it for statue animation
too but still had the same problem.

     Several apparent bugs remain:  if the leader is angry (perhaps hero
killed him before reviving him) he won't give an angry response if the
player initiates #chat rather than wait for adjacent leader to do so.  If
it's an archeologist reviving the statue of petrified Lord Carnarvon, hero
gets a rather ironic message about feeling guilty for destroying historic
statue.  Lastly, shouldn't there be a comparable quest_status.nemesis_m_id
so that if one player lugs the corpse or statue of his quest nemesis back
into the main dungeon and another one revives that, it won't start behaving
like 2nd player's nemesis?  Live nemesis is explicitly kept out of bones
but I don't think the corpse or statue of one is blocked and its monster
behavior after revival is based on mon->data->msound==MS_NEMESIS rather
than on m_id of current game's active nemesis monster.
2005-05-19 04:11:41 +00:00
nethack.rankin
669eec4997 autopickup exception tweaks
1) in the autopickup exception sub-menu from 'O', change the selector for
   "exit" from 'e' to 'x' so that the entries occur in alphabetical order.
   Also frees up 'e' for some hypothetical future "edit" entry (I'm not
   planning on attempting to implement anything along those lines though).
-1) I wanted to make 'x' start out preselected to show that it's the default
   choice, but that doesn't work correctly--at least for the tty interface.
   PICK_ONE menus don't know how to deal with having a preselected item and
   in this case it ended up returning 'x' no matter what choice I made.
   Even if that aspect gets fixed, it might have trouble with explicitly
   picking the preselected entry since that would probably be toggled off
   in the process.  So the preselection bit of this menu is commented out.
2) at the prompt for adding new exceptions, quit adding instead of giving
   "invalid syntax" warning if user enters empty input.
3) allow <ESC> in the "list" or "remove" submenu to quit all the way out of
   the upper menu too.
4) simplify the way magic numbers are used for action_titles[] menu setup.
5) greatly simplify return value of special_handling().
6) avoid a potential for getlin() or strcat() buffer overflow if getlin()
   were ever to be changed to return BUFSZ-1 characters instead of COLNO or
   whatever its narrower current limit is.

I'm pretty sure that I've run into the issue of being unable to have a
preselected entry in a PICK_ONE menu before, but I can't recall if I ever
mentioned it.  Fixing that looks like it'd be pretty messy and would need
to be done for all the interfaces.  Ick.
2005-05-15 06:13:20 +00:00
nethack.rankin
06bb86e63b more ^R
> clear stale prompt
[...]
> Can someone who understands the relevant windowing code fix ^R in getpos()?

     I still don't understand why it wasn't working as expected, but moving
the existing cursor positioning after flush_screen() instead of before now
makes ^R work ok during getpos().  It doesn't restore the top line text so
isn't a transparent redraw but it now displays a prompt string there instead.
Likewise after typing '?' for help so that it should be move evident that
nethack is still waiting for you to move the cursor somewhere.

     Also add support for ^L in numpad mode.  I almost never use that and
didn't think of it the first time around.
2005-05-08 04:22:53 +00:00
nethack.rankin
bb19016785 clear stale prompt
From the newsgroup:  applying various types of tools (example was a
mirror; figurine is another case) and then typing <ESC> at the "In what
direction?" prompt would leave the prompt displayed.  User complained that
he tried to answer the no longer valid prompt--even though the cursor had
correctly moved back to the '@' on his map--and ended up walking into lava
instead.  Suggested fix in the newsgroup was to use pline("Never mind.")
the way many commands already do, but it's simpler and more robust to clear
the message window before getdir() returns.  Callers can issue Never_mind
feedback on a case by case basis as before; I haven't added any here.
Perhaps getpos() should get passed an extra argument telling it to issue
that message; then a dozen or so pline(Never_mind) calls could be removed.

     I also was annoyed that ^R gave me the command assist display instead
of redrawing the screen with the prompt intact.  This fixes it for getdir().
The corresponding fix for getpos() doesn't work correctly; it successfully
redraws the screen but leaves the cursor at the end of the 2nd status line,
despite the fact that it is followed by an existing cursor position call.
Can someone who understands the relevant windowing code fix ^R in getpos()?
(Easiest test case is probably just ^T in wizard mode.)  I have't added an
entry for ^R to the fixes file since it isn't fixed yet.  And I didn't look
to see whether yn_function() ought to handle ^R too; it might be used in
contexts where map redraws don't make sense.
2005-05-07 03:52:52 +00:00
nethack.rankin
632afa4979 followup to fix for M63 - magic lamp wishes
This uses Michael's suggestion for keeping the display up to date when
removing a djinni or water demon in advance of granting a wish (so that it
won't be present in a bones file if the wish is fatal--problem with earlier
fix was that player could notice monster was already gone while responding
to the wish prompt).  It's not quite as straightforward as I was hoping for
and would get a lot messier if it needed to cope with Warning & Warn_of_mon.
2005-04-28 04:45:20 +00:00