Commit Graph

1452 Commits

Author SHA1 Message Date
nethack.rankin
655a340f69 fix #H1733 - fainting doesn't behave like falling (trunk only)
Suggested by <Someone> <email deleted>, fainting from lack
of food while wielding a cockatrice corpse should fall on that corpse
and be fatal, like triggering a pit or moving down stairs while too
heavily encumbered.  I put the fixes entry in the new features section
even though it probably qualifies as a bug.
2008-11-14 00:38:28 +00:00
nethack.rankin
2cbc40caf7 fix #H1749 - kick that misses didn't reveal concealed mimic
From a bug report, getting "your
clumsy kick does no damage" when attempting to kick the location of a
concealed mimic or hidden monster didn't bring the target out of hiding.
2008-11-13 23:24:00 +00:00
nethack.rankin
fd799733c2 [part of] #H1743 - sleeping victim of theft (trunk only)
Mentioned by <email deleted> in his report about
sound anomalies, it was possible for a sleeping hero to "gladly start
removing armor" when attacked by a nymph or succubus.  The code
explicitly wakes up the hero if he has fainted from lack of food because
"can't charm without waking you" (according to the existing comment),
but it didn't handle other forms of sleep and paralysis.  You could get
 |You fall asleep.
 |The wood nymph charms you.  You gladly start removing your armor.
 |The combat awakens you.
Now in the same situation you'll get
 |You fall asleep.
 |You wake up.
 |The wood nymph charms you.  You gladly start removing your armor.
2008-11-02 23:12:21 +00:00
nethack.rankin
83eb72c0fd hand slip when naming objects (trunk only)
From a bug report, the text change applied
when you try to give an artifact's name to am item of that artifact's type
would choose a letter from 'a' through 'y' when replacing the randomly
selected target letter.  Rather than fixing the off by one bug which
prevented 'z' from being chosen, this switches to the existing routine
used for mangling engravings.  (Unfortunately the fix is not as simple as
first expected, because wipeout_text() doesn't guarantee to change text
which has spaces in it and all the quest artifact names have those.)
2008-11-02 22:26:56 +00:00
nethack.rankin
bb5820b493 monsters eating green slime corpses (trunk only)
From a bug report, pets able to eat
acidic and poisonous corpses (black naga was the case cited) would eat
green slime corpses without turning into green slime, unlike the hero.
This prevents such monsters from eating green slime unless they're
starving, implements transformation into green slime for the case where
it does get eaten, and prevents non-pet gelatinous cubes from devouring
such corpses.  meatobj() is reorganized to hopefully become clearer, and
it removes the assumption that the object eater is a g.cube in case we
ever adopt slash'em's "tasmanian devil" monster.

     Monsters with digestion attacks who swallow green slime monsters
are turned into green slime, but ones who swallow hero poly'd into green
slime are not.  This doesn't address that.
2008-10-25 01:04:04 +00:00
nethack.rankin
3425a19dff '[' vs embedded dragon scales (trunk only)
When dragon scales or dragon scale mail becomes embedded in poly'd
hero's skin, the '[' command would report "you are not wearing any armor"
but the '*' command showed "a set of <color> dragon scales (embedded in
your skin)".  The '[' feedback is more accurate but the '*' feedback is
probably more useful.  This changes '[' to be more specific when lack of
worn armor is accompanied by embedded dragon scales/scale mail.

     I put the fixes entry in the new features section since the old
behavior wasn't a bug.
2008-10-20 05:18:31 +00:00
nethack.rankin
6870660aba more breaking wands (trunk only)
If breaking a wand of polymorph uses up any floor objects, give a
"you feel shuddering vibrations" message like happens when zapping.
2008-10-20 04:07:40 +00:00
nethack.rankin
b0478ecef8 breaking wands (trunk only)
From a bug report, polymorph of self due to
breaking a wand also polymorphed various items that were dropped in the
process, unlike the case of zapping polymorph at monsters which excludes
dropped items from being poly'd.  This polymorphs the pile at the hero's
feet before polymorphing the hero.  I first tried to handle it using
obj->bypass like with monsters, but that didn't work.  Post-3.4.3, the
bypass handling is also used for polyself (by retouch_equipment()) and
it was getting reset at an inconvenient time.

     He also complained that he failed to get "you feel shuddering
vibrations" when some polymorphed objects got destroyed.  That message
is issued by weffects() which do_break_wand() doesn't call.  It ought to
be fixed, but this patch doesn't address it.

     Lastly, add code to prevent objects guarded against polymorph via
obj->bypass from getting used up when creating polypile golems.
2008-10-20 00:57:16 +00:00
nethack.rankin
1179bb964c monsters putting on shirts
From the newsgroup:  code intended to prevent a monster who's wearing
a suit from putting on a shirt didn't work due to faulty logic.
2008-09-04 20:21:06 +00:00
nethack.rankin
5d690ae073 force fruit name to be singular (trunk only)
Inventory formatting for a single slime mold object would be strange
if the user entered a plural word or phrase for fruit name.  Forcing the
user-specified value to be singular as it's being set up as current fruit
avoids that.  [Something like <Someone>'s "bunch of grapes" is unaffected;
it's already singular and correctly handled as such by makesingular().]
This may have a side-effect of limiting the creativity of some players
who try to trick others via bones files gimickery, but I think the extra
consistency in object naming during ordinary play is worth it.

     According to the cvs log info, this issue was actually mentioned in
a patch I made ("fix M203...") in October, 2005.  I have no recollection
of that at all....
2008-08-23 01:17:41 +00:00
nethack.allison
60b7b2c0f0 change of fruit name
From a bug report:
The following steps do not yield the expected fruit:
  1) start nethack in explore mode (with a wand of wishing)
  2) change fruit name to "tomato"
  3) save/restore
  4) change fruit name back to "slime mold"
  5) save/restore
  6) wish for a fruit; you get a tomato
  7) check options; fruit name is set to "slime mold"

If you specified a fruit name that already existed in the list,
fruitadd() always set current_fruit to the fruit with
the highest fid encountered in the list to that point, instead
of the fid of the matching entry.
2008-07-19 22:56:37 +00:00
keni
998c399543 some updates to make nethack.6 less dated. 2008-07-10 11:08:59 +00:00
nethack.rankin
e053cb3447 first divine gift artifact (trunk only)
From the newsgroup:  if no co-aligned artifacts are available when
attempting to give the first divine gift for an offered corpse, nothing
would be given.  Since the gift counter stayed at 0, subsequent attempts
to select one would still treat it as first gift and always fail again.

     The first divine gift from offering corpses must match the hero's
alignment; after that, nonaligned artifacts (Frost Brand, Giant Slayer, &c)
are added to the pool of choices for further divine gifts.  It's pretty
easy for a chaotic character to use up the co-aligned artifacts before
getting any divine gift.  There aren't many chaotic ones and some are
inelgible due to being race-specific items.  Wishing for Stormbringer--or
loading a bones file which contains it--and creating Sting and Orcrist
via naming will do the trick for an elven hero.

     This patch expands the pool of candidates to include nonaligned
artifacts during first gift selection if no co-aligned ones are available.
2008-07-07 03:01:30 +00:00
keni
bb43b56eac first conditionalized docs (TRUNK ONLY)
plus various related missing bits and tids
2008-06-26 15:08:54 +00:00
nethack.rankin
9dce52ea98 fix #H1662 - temporary vs permanent sleepiness (trunk only)
From a bug report, wearing
(or removing) an amulet of restful sleep was overriding permanent
sleepiness which had been obtained previously via eating another amulet.
The setting of timeout clobbered the non-timeout bits for that intrinsic.

     This also adds the timeout counter for sleepiness to enlightenment
feedback in wizard mode.  Unrelated:  rephrase enlightenment feedback for
adornment to more accurately describe what that does.
2008-05-26 05:46:21 +00:00
nethack.rankin
d5ca34a45b initial sling skill
From a bug report, archeologists were
inadvertently starting out at basic skill level in sling because of their
carried touchstone, which is flagged as being sling ammo.
2008-05-08 03:50:44 +00:00
nethack.rankin
17f63949bc probing while swallowed (trunk only)
Reported recently by <Someone>:  probing feedback while engulfed
shouldn't claim that the monster is not carrying anything when the hero
is inside of it.  The simple case where it's not carrying anything else
was a trivial one line change; handling inventory plus hero was trickier
and I wouldn't have bothered if I'd realized what it was going to take.
But it's done now; trivial case
        The purple worm is not carrying anything besides you.
and harder case
        The purple worm's possessions:
        Weapons
        a - an uncursed dagger
        Swallowed Creature
        > - human archeologist called wizard
2008-03-21 03:12:14 +00:00
nethack.rankin
2d1eb28e67 aborting key/pick usage (trunk only)
From the newsgroup:  applying a key and then using ESC at direction
choosing prompt was using up a move even though hero didn't do anything.
2008-03-08 03:45:26 +00:00
nethack.rankin
6e07a2ffe1 display/map glitch in C quest temple
From a bug report:  in the irregularly
shaped temple on the C quest home level (the room where the leader is
located), the lit south wall contained a dark spot where a secret door
is located.  It stayed blank until you got right next to it rather than
just until you got to a good angle facing it.  (Magic mapping hides the
problem by showing that spot as a wall instead of leaving it as unseen;
you have to walk or teleport to that room in order to see the problem.)
The code that lights walls and doors which border lit rooms neglected
temporary walls produced by secret doors.
2008-03-01 08:10:53 +00:00
nethack.rankin
f2e3953914 vitamin deficiency (trunk only)
Implement something <Someone> suggested a long time ago:  eating a
disenchanter corpse has a chance to remove an intrinsic.  Uses the same
routine as nighttime gremlin attacks, which chooses an intrinsic randomly
and attempts to remove it, so has no effect if it chooses one the hero
lacks.  This can be used to remove "aggravate monster" but is much more
likely to target something the player wants to keep.  [By the way, a lot
of potential candidates are missing:  sleep, shock, and disintegration
resistance and teleport control come immediately to mind.]

     Also, it has been bugging me that you can get both strength and
fire/cold/shock resistance from the same fire/frost/storm giant corpse.
The code prevents mind flayer corpses from conferring both intelligence
and telepathy, so strength handling was inconsistent (even though it
predated mind flayers...).  This causes strength boosting to be treated
as an extra candidate when selecting an intrinsic to confer, so you'll
either get strength or resistance (which might be a no-op) but not both
from those giants.  And it special cases the other giants to have the
same 50% chance for boosting strength, even though the alternative in
their case is to do nothing instead of trying to confer something else.
Lastly, it now gives a message when you succeed in gaining strength.
2008-02-22 01:44:57 +00:00
nethack.rankin
a023e8188f fix #M57 - alchemical potion explosion fails to wake monsters
From a bug report,
the message when dipping one stack of potions into another triggers an
explosion says "BOOM" yet nearby sleeping monsters remained undisturbed.
2008-02-21 06:18:08 +00:00
nethack.rankin
e8624a3285 eel hiding behavior (trunk only)
From a bug report:  an exposed eel in an isolated
pool--swamp rooms sometimes produce those--would never re-hide no matter
how long you left its vicinity.  Re-hiding is part of post-move handling
and an eel with no adjacent water to move into would never reach that bit
of code since it didn't move anywhere.  The code used to re-hide monsters
when you return to a previous level was ignoring eels altogether.  Give
unhidden eels a chance to hide earlier during monster movement and also
when the hero returns to their level.

     Also a really minor bit to slow down hit point loss of eels out of
water.  I don't think anybody reverse genocides krakens to get experience
any more since they don't provide a big bonus when they're out of water,
so this change won't have much of an affect.
2008-02-21 05:52:08 +00:00
nethack.rankin
da172c5773 identify_pack (trunk only)
Three years ago <email deleted> reported that
stepping off the end of inventory via typing space to go to the next menu
page wasted his identify scroll.  He suggested that some people might do
that because they don't know how to back up in a multi-page menu.  I
pointed out the Guidebook section that describes < and ^ to go back one
page or back to start and left things at that.  However, traditional mode
reprompts if you step through all of inventory without choosing something,
so this changes identify-via-menu to do likewise.  You can dismiss the
menu with ESC to really avoid choosing anything.

     This also makes identification of N items when you're carrying N or
fewer unID'd things behave the same as identify all:  identify everything
without any prompting.
2008-02-16 02:31:34 +00:00
nethack.rankin
0d03958adf imitation spelling (trunk only)
I'm not a contender to win any spelling bees.  (Mimicker does't
seem to even be a real word; I'm not sure if it ought to end in "or"
instead of "er".  But changing it to "mime" would be too weird.)
2008-02-11 00:23:06 +00:00
nethack.rankin
b14eb06c69 done_in_by shapechanger (trunk only)
Augment killer reason when slain by a shapechanged creature:
"killed by a foo" becomes "killed by a chameleon immitating a foo" or
"killed by a vampire in foo form" or "killed by the Wizard of Yendor
disguised as a foo" (after double-trouble, when the clone starts out
mimicking something).

     I put the fixes entry in the new features section.
2008-02-10 02:54:53 +00:00
nethack.rankin
b4474e1e22 #monpolycontrol of unseen monsters and of vampires (trunk only)
I was testing something with #monpolycontrol enabled and got a
series of "Change it into what kind of monster? [type the name]" prompts
when I went to a new level.  It was asking about monsters that were being
created (in this case, multiple vampires for top level of Vlad's Tower)
and naturally I couldn't see them since the level wasn't finished yet.
This switches to noit_mon_nam() to at least be informed about the type
of creature you're being asked to specify a shape for, and adds the map
coordinates so that it doesn't appear to be reprompting for the same
monster over and over when multiple similar ones are being created.

     In the process I discovered that #monpolycontrol would let you give
any type of monster for the shape of vampires.  Unlike chameleons, they
don't change into arbitrary shapes so that was inappropriate.  [And
trying to test the fix for this is what led to the previous ^G patch.]
2008-02-08 03:19:09 +00:00
nethack.rankin
d3b9d28f06 exercise/abuse while polyd (trunk only)
Three years ago <Someone> reported that even though exercise of
attributes other than wisdom is suppressed while the hero is polymorphed,
attribute gains or losses due to pre-existing exercise can still take
place in that situation.  Since it's an entirely different set of attrs
which will be replaced upon rehumanizing, there's not much point.  (The
same is actually true for wisdom, but I didn't change how exercise works
for it.)  Adopt his one-liner fix:  old exercise won't cause attribute
changes while polymorphed; it will silently fade as it does when its
magnitude is insufficient to trigger a change.

     While checking that out, I noticed that exerchk() was using `/= 2'
to fade out old exercise/abuse.  That will produce platform-dependent
results for negative values (ie, for the abuse case) since C's integer
division doesn't specify whether to truncate towards zero or towards
negative infinity.  In particular, -1 / 2 could yield -1 rather than 0
as the code expected.  (Its impact on play was negligible though.)

     This reduces the code for displaying the messages which accompany
attribute gain/loss.  A few were repharsed in order to simplify that.
2008-02-03 06:42:25 +00:00
nethack.rankin
d8a45a57b5 ring discovery (trunk only)
Picking up and putting on a +1 ring of protection while blind
resulted in having a "+1 ring (on {left|right} hand)" in inventory and
having ring of protection show up in the discoveries list.  The problem
is the same as the one for wands which has been previously addressed
(but not 100% fixed...):  when using an item whose effect is observable,
the item's type became discovered based upon that observation even if the
item itself had never been seen.

     The code for removing ring of protection lacked its break statement
and fell into the case for removing ring of protection from shapechangers,
but didn't cause any noticeable problem.
2008-01-29 04:17:03 +00:00
cohrs
28a6a8df9f H1406: jellyfish have no head
I did some research, and technically, a jellyfish does indeed have no head
(and, technically, no brain, just a "nerve net").  The part on top is a
"bell" used for buoyancy, not a head.
2008-01-25 16:58:48 +00:00
nethack.rankin
3d1772a13b fix #1586 - stale alignment record after changing alignment type (trunk only)
From a bug report, putting on a helm of opposite
alignment wipes out divine protection (regardless of which god originally
bestored it) but leaves piety level towards the old god in place for the
new one.  Reset alignment record to 0 when changing alignment type.  Yes,
that means that the helm can now be used to clear a negative alignment,
which I think is in keeping with having subtle positive uses for bad items.

     Permanent alignment change did try to tweak alignment record, but
I'm not sure that it worked as intended.  Lawfuls changing away from law
got a bonus for their new alignment, neutrals retained their old record,
and chaotics changing away from chaos took a penalty to their record, all
without regard to what the new alignment became.  The magnitude of the
bonus or penalty was half the record limit (which gradually increases with
turn count) so could be very big, but I don't think it made much sense.
Reset alignment record to 0 for permanent conversion same as for temporary
conversion.  It's simpler and reflects the fact that you haven't yet done
anything to bolster or weaken your new alignment.
2008-01-22 05:31:19 +00:00
nethack.rankin
bef9b86e0a enlightenment revamp, part III (trunk only)
Replace the old ^X output with integrated enlightenment feedback.
Expands enlightenment output into four sections:  Background and
Characteristics in addtion to previous Status and Attributes.  Final
disclosure and ^X in wizard or explore modes show all four; potion/wand
of enlightenment and throne insight show the last two to give traditional
enlightenment, near enough; and ^X in normal mode shows the first three,
encompassing the 3.4.x ^X display in streamlined form plus providing
details about bottom line information.

     I think I'm done with enlightenment for the time being, except for
the desire to move it (plus associated conduct feedback) to end.c or
perhaps its own file.  It has grown very long and doesn't particularly
fit in cmd.c; I don't think it ever belonged there at all unless wizard
mode ^X predates potion of enlightenment.
2008-01-22 04:42:29 +00:00
nethack.rankin
d0a7d15023 drain energy attack (trunk only)
During some recent newsgroup discussion, <Someone> posted an entry from
his personal bug list:  energy draining damage from ordinary attacks is
implemented even though there are no monsters with that capability and it
was not implemented for engulf attacks even though energy vortices have
the capability.  This implements energy drain engulf attacks against the
hero and also both modes of energy drain attacks for monsters and poly'd
hero against spellcasting monsters.  Since monsters don't have energy,
they lose access to their special abilities (their spells, that is) for a
few turns, same as a post-3.4.3 change done for anti-magic traps.
2007-12-20 23:02:47 +00:00
nethack.rankin
faa3543063 long worm tail hit by potion thrown by monster (trunk only)
From the newsgroup:  when a monster throws a potion at the hero and
it hits a long worm's tail, you'd get "The bottle|flask|&c crashes on the
long worm's _head_ and breaks into shards."  The relevant code changes
"head" to "body" when appropriate, but monster throwing wasn't setting up
`notonhead' so that alteration only kicked in for player throwing.
2007-12-17 23:43:31 +00:00
keni
59e64a1d40 First pass at a hints-based build system to augment (not replace) the existing
build system.

Anyone who wants to do a build from sys/unix and doesn't want to figure this
out just needs to do:
	sh setup.sh hints/unix
instead of:
	sh setup.sh
and then continue on as usual.

New files:
sys/unix/NewInstall.unx - the new directions
sys/unix/hints/* - the hints files.  There will be more later.
sys/unix/mkmkfile.sh - helper for setup.sh

Summary of changes:
see NewInstall.unx for info on the new build system
introduction of various preprocessor symbols to turn options off that
 are defaulted on historically
comment out nethackrc (and similar) entries that still use the old symbol
 syntax.
commenting out of Makefile.* lines that now come from hints/unix
GAMEDIR is replaced with HACKDIR so the Makefiles and the C source agree.
  Note that I have NOT changed the docs and/or Makefiles for be, msdos, os2,
  vms, or winnt.  If port maintainers don't then I will, but I can't test
  those ports.
nethack.sh now handles the font path automatically
2007-12-13 20:17:11 +00:00
nethack.rankin
e2eba2ae9a endgame portal detection (trunk only)
In the newsgroup about three weeks ago someone described trying to
use the Bell of Opening to find the magic portal on the Plane of Water
and not succeeding.  It's supposed to work like a wand of secret door
detection to mark nearby traps as known.  And does, but it turns out
that the wand wasn't working as expected there either.  They both require
line of sight, and since the water outside of the bubbles blocks that
they only found the portal if it was within the same bubble as the hero.
(Clouds on the Plane of Air posed a similar problem, although monster
activity usually reveals the portal on that level so this wasn't much of
an issue there.)  Since the detection magic doesn't require the hero to
see the traps--wand and Bell both work while blind--this patch overrides
the line of sight requirement on the Planes of Water and Air.  As long as
hero is within the detection magic's range, the portals on those levels
will get marked as having been seen and when the hero gets into the right
bubble or out of the clouds the portal traps will be shown on the map.

     The line-of-sight override code is simple-minded and lets players
find traps through boulders when/if those are present (but the found
traps won't be seen yet since vision still controls the map display).
Also, it assumes that only water/air/cloud terrain is present so could
potentially yield strange results if any other terrain gets introduced on
either of those two levels.
2007-11-25 23:03:47 +00:00
nethack.rankin
645461d750 shop gold vs hangup
From the newsgroup:  hangup save while picking up gold from the
floor in a shop would duplicate that gold in the save file.  First the
gold amount was being added to hero's gold, then two messages were given
[pline() or prinv() about pickup followed by one from costly_gold() about
shop credit], and lastly the floor gold would be removed.  The second
message could trigger --More-- and provide a controllable interruption
point between giving the gold to the hero and removing it from the floor.
Change this to do the removal step before feedback.
2007-11-18 19:52:44 +00:00
nethack.rankin
44c1677ac1 open/close while blind (trunk only)
From a bug report, attempting to open or close
a door while blind didn't always update the map display after telling the
player that a remembered-closed door was already open or a remembered-open
door was already closed.  And in the cases where it did update the map to
reflect a change in door state, it didn't use up a turn.  Now always update
the display and use up a turn when 'o' or 'c' reveals any new information.
2007-11-16 06:53:23 +00:00
nethack.rankin
44a7f87c08 fix #H1419 - missing object sanity checks for nested containers (trunk only)
From a bug report, wizard mode's sanity_check
option has a check for container contents but wasn't using it recursively
for nested containers, so the contents of the latter weren't checked.
This fixes that, and also adds a check for objects carried by migrating
monsters.  And it now formats objects and monsters fully even if the hero
happens to be blind or hallucinating at the time.

     Tested by using a debugger to poke in various bits of invalid data.
2007-11-13 21:48:01 +00:00
nethack.rankin
7c860335c1 0 gold pieces (trunk only)
Newsgroup discussion about the devnull tournament which started
today has pointed out that ``d4294967296$'' would cause getobj() to create
a gold piece object with quantity 0 which then got dropped to the floor.
(It's specific to gold; other types of objects don't behave that way.)
Also, wrapping which went past negative and zero all the way to positive
again (like 429496729*10+7, yielding 1) wasn't detected.
2007-11-01 19:24:19 +00:00
nethack.rankin
408a36bc5f shapechanger's inventory (trunk only)
Newsgroup discussion points out that a chameleon which starts out
in nymph form also starts out with nymph's inventory (50% chance each for
mirror and potion of object detection).  That's not right; shapechanging
shouldn't manufacture items.  Also, the post-3.4.3 code to initialize
vampires was overly complicated in order to preserve chameleon behavior,
but the old chameleon initialization which used rndmonst() instead of
selecting a preferred shape was just that way by accident (says the
person who implemented preferred shapes however long ago and completely
overlooked that at the time...).

     This is tricky to test; ^G these days forces a created shapechanger
to start out in its natural form.  That's a bit odd to begin with (a side-
effect of transforming requests for uniques and other special monsters
into doggelgangers), but downright strange when monpolycontrol is enabled;
a prompt to pick monster shape is issued, then the player's choice gets
overridden.  I'm not sure which aspect, if any, of all this should be
changed to fix a wizard mode quirk.
2007-10-31 09:02:31 +00:00
nethack.rankin
a675cc6ed7 vms file access
Fix the problem From a bug report.  His system has a logical name "DATA" pointing at some disk, and
when the dlb utility tried to open "data" for inclusion in the library
being built at install time, it attempted to access the wrong thing and
failed.  He then attempted to fix it in a manner which let dlb finish, by
modifying dlb_main.c to append "." to file names that lack a dot, but
then nethack couldn't access "dungeon" in the library because string
comparison didn't match the altered dlb directory entry of "dungeon.".

     NetHack was working around this unintended interaction with the
environment issue in fopen_datafile(), and dlb was doing so for fopen()
but not open().  This moves nethack's fixup out of src/files.c and into
sys/vms/vmsfiles.c, adds another routine there so that both open() and
fopen() are covered, and updates the vms Makefiles so that the various
utility programs all link with vmsfiles.  (The build script vmsbuild.com
puts object files into a library and gets that last bit for free.)
2007-10-28 09:37:56 +00:00
nethack.rankin
cac2dd4d33 enlightenment feedback for sight-based properties (trunk only)
"You can see invisible" is misleading when you can't see anything,
so use alternate phrasing for See_invisible when blind.  Also, add extra
wizard mode feedback when blindness is overridden by the monk's Eyes
artifact, when invisibility is blocked by worn mummy wrapping, and when
clairvoyance is blocked by worn cornuthaum.  And fix end-of-game disclosure
for blindness; it was only being shown if/when caused by worn blindfold.
2007-10-26 02:24:22 +00:00
nethack.rankin
bdb0930316 invisibility vs blindness
Reported a month ago by <email deleted>, putting on
a cloak of invisibility while blind and then using ';' or '/' to examine
yourself revealed that you had become invisible.  This fix just changes
the lookat() output when you can't see that you can't see yourself.  :-)
Probing and stethoscope still reveal invisibility, as will any message
which uses x_monnam() to identify the hero.  (First part is intentional;
last part seems not worth bothering about--I'm not even sure that the
player can arrange to trigger it.)
2007-10-26 02:00:43 +00:00
nethack.rankin
9df113a973 covetous mons vs temple priests (trunk only)
Prevent monsters who kill other monsters to obtain the Amulet from
targetting a priest inside his temple.  Blocks players from just staying
on the Sanctum stairs while a teleporting arch-lich or Asmodeus fetchs the
Amulet from Moloch's high priest for them.  A previous post-3.4.3 change
prevented monsters from targetting the Wizard; this extends that (and
assumes that we can ignore the possibility of other temple priests ever
handling the Amulet).  The earlier patch went into the branch code, but
inhistemple() isn't available there so this one is trunk only.
2007-09-13 01:00:05 +00:00
nethack.rankin
01f954a855 fix #H1378 - vault guard interaction while swallowed
From a bug report, if you're swallowed
while in a vault and the guard arrives, he'll ask your name even though
you're hidden within the engulfer.  This makes him give a message and
then leave, as is already done if you're mimicking an object or unable to
speak.

     This also suppresses his repeated "Move along!" message if you're
swallowed or held since it's silly to keep telling you to move when you
obviously can't.
2007-09-01 01:12:34 +00:00
nethack.rankin
47c9aa0ff6 fix pet feeding feedback (trunk only)
From a bug report, unseen pet sensed by
telepathy was referred to as "it" in the message given when it ate food.
This code is subtly convoluted and has now been changed at least four or
five times over the years.  This patch changes the terse comment to try to
spell out the intent.  Whether or not the new code actually matches that
intent remains to be seen....
2007-08-20 23:32:42 +00:00
nethack.rankin
86fccb4e1a re-fix #H1371 - dead monster fleeing
From a bug report, a monster which
died by moving into a trap which was next to the hero standing on Elbereth
resulted in "The <mon> is killed!  The <mon> turns to flee!".  An earlier
change made monflee() return if it's given a dead monster, so the fleeing
message is no longer given.  This fixes the place where monflee() was
inappropriately being called for a dead monster in the reported situation.
2007-08-20 00:05:24 +00:00
nethack.rankin
6bf7c5a1eb tin access (trunk only)
From the newsgroup:
	The tin opens like magic!
	<some interruption occurs>
	You stop opening the tin.
Either it opens immediately or it doesn't, so the "opens like magic"
message is inaccurate.  Rather than simply changing the phrasing, this
gives blessed tins a 50% chance to really open immediately so that their
contents are available for eating on the same turn, and 50% to behave as
before but with a message which is suitable for the single turn delay.
Hero poly'd into a metalivore always gets the same-turn case when eating
any tin.  Use of a tin opener has a chance to do so (always when blessed,
50/50 for same-turn vs 1 turn delay when uncursed, 33/33/33 same-turn or
1 or 2 turn delay when cursed).

     Overall, blessed tins are better than they used to be, since half
of the time you'll save a turn, but they're still not reliable to eat in
the midst of combat since sometimes you'll need another turn and will be
likely to get interrupted in that situation.  Uncursed tin openers still
give the same behavior as opening blessed tins, so are also better than
they used to be.  Blessed tin openers are now superior, and cursed ones
are slightly inferior in addition to being welded to hero's weapon hand.
2007-08-09 03:20:24 +00:00
nethack.rankin
1c545eb678 drawbridge feedback (trunk only)
The open and close commands had some feedback when player attempted
to use them on a drawbridge, but they didn't handle all the permutations.
2007-08-03 01:49:33 +00:00
nethack.rankin
4c83db0294 fix #H1232 - hole in ice is described as moat [1 of 2] (trunk only)
From a bug report, when ice on the Valkyrie
quest home level was melted and a boulder filled the resulting pool, that
pool was described as a moat.  This was actually a terrain issue rather
than a formatting glitch, so instead of tweaking waterbody_name() with an
extra special case, extend the level compiler to allow specifying ice as
frozen pool instead of always being frozen moat.  There's no provision
for having both types of ice on the same level, just a level-wide flag to
control which of the two applies for ice on that level.

     This change has a side-effect for the V quest levels:  once ice has
been melted, a second blast of fire will now boil away the pool and leave
a pit.  The unfrozen water locations on the home level already behaved
that way (ie, they are pools rather than moats) so this should be ok.  I
also added <Someone>'s suggestion to make one of the two drawbridges
on the goal level start in random state instead of always being open.
2007-08-03 01:05:50 +00:00