Commit Graph

1149 Commits

Author SHA1 Message Date
nethack.allison
10066ff08e guidebook autopickup_exceptions
autopickup_exceptions is no longer in the experimental section of config.h
2006-04-30 17:55:09 +00:00
jwalz
0a939c0e99 Update dungeoneers for data.base entries. 2006-04-23 17:22:46 +00:00
nethack.rankin
a506c32e8c fix #H79 - steed disintegration
From a bug report, a steed hit by disintegration
breath survived via life-saving, but the program was confused about whether
the hero could still ride and issued some impossible warnings.  The code
to disintegrate a monster's inventory didn't bother to unwear worn items as
it destroyed them, presumeably assuming that the monster was sure to die,
so steed was left with a flag bit set claiming it was saddled even though
the saddle was gone.  This fixes that, and the rider will end up being
dismounted as the saddle gets destroyed, regardless of whether the steed
ultimately survives.  [Since the steed is still present at the time of
dismounting, the hero will get bumped to some other location, possibly to
the next spot about to be hit by the same black dragon breath attack which
just vaporized the steed.  That's suboptimal, to put it mildly....]

     I couldn't test the circumstances of the original report.  Post-3.4.3,
ki-rin has been marked no-hands and is no longer capable of wearing armor
or amulets.  I looked to see whether any other potential steed could wear
an amulet of life-saving and couldn't find one.  But the original bug also
applied to conferred properties of special armor worn by non-steed monsters
too, so the fix was needed anyway.

     The branch and trunk patches are different.  For the trunk, I moved a
big chunk of code out of buzz() into a seperate routine.  That actual fix
is the same in both variants.
2006-04-18 05:26:00 +00:00
nethack.rankin
fc9c337e27 more munstone fixes
Move part of the recent "munstone fixes" patch to the branch code
since one of those fixes prevents accessing freed memory.  The part that
lets monsters eat tins of lizard meat or tins of acidic monsters in order
to get the same benefit as the corresponding corpse has been left out.
2006-04-18 03:41:05 +00:00
nethack.allison
f55210be79 code change - oextra
move oattached and oname and other things that vary
the size of the obj structure into a separate
non-adjacent oextra structure, similar to what has
already been done for mextra. The obj structure
itself becomes a fixed size.

New macros:

#define ONAME(o)	((o)->oextra->oname)
#define OMID(o)		((o)->oextra->omid)
#define OMONST(o)	((o)->oextra->omonst)
#define OLONG(o)	((o)->oextra->olong)
#define OMAILCMD(o)	((o)->oextra->omailcmd)

#define has_oname(o)	((o)->oextra && ONAME(o))
#define has_omid(o)	((o)->oextra && OMID(o))
#define has_omonst(o)	((o)->oextra && OMONST(o))
#define has_olong(o)	((o)->oextra && OLONG(o))
#define has_omailcmd(o)	((o)->oextra && OMAILCMD(o))

changed macros:
has_name(mon) becomes has_mname(mon)  to correspond.

The CVS repository was tagged with
	NETHACK_PRE_OEXTRA
before commiting these, and
tagged with
	NETHACK_POST_OEXTRA
immediately after. The diff
between those two tags is this oextra patch.

The associated mail daemon changes to use an oextra
structure instead of a hidden command located in the
name after the terminating NUL, have not been tried
or tested.
2006-04-14 16:23:56 +00:00
nethack.allison
b9db663de1 drum of earthquake - monster portion
<Someone> wrote:
> When applying a drum of earthquake, should you "fall into a chasm" if
> you're already at the bottom of a pit? (Likewise monsters.)

monster already in a pit won't "fall into a chasm" from drum of earthquake
2006-04-14 14:33:01 +00:00
nethack.allison
914c66b10a drum of earthquake - hero portion
<Someone> wrote:
> When applying a drum of earthquake, should you "fall into a chasm" if
> you're already at the bottom of a pit? (Likewise monsters.)

hero already in a pit won't "fall into a chasm" from drum of earthquake
2006-04-14 13:53:33 +00:00
nethack.rankin
a157ceae1b munstone fixes (trunk only)
From a bug report, a monster who eats a lizard
corpse in order to cure confusion was treated the same as one who did so
to cure petrification, losing intrinsic speed in the process.  In the same
report by <l>, monsters wouldn't eat lizard corpses to cure being stunned,
and those who ate them for another reason weren't cured of stunning, even
though the hero gets that benefit.  While fixing those, I added some code
to let monsters who are carrying tins of lizard or acidic monster use them
if they're also carrying a tin opener, dagger, or knife.  I don't think
any monsters except for nymphs are willing to pick up tins, so it won't
have much effect.  It now works for nymphs though.

     Examining the code while testing showed that mon_consume_unstone()
has been accessing the potion (acid) or corpse (lizard or acidic monster)
after the item had been used up, so that has been fixed too.  I never saw
any detectable problems due to this, but folks using a debugging malloc
implementation which overwrites freed memory may have not been suffering
collateral acid damage or receiving intended confusion cure, or perhaps
did get either or both of those effects when they shouldn't have.  Since
it only applied to monsters it wouldn't have been easy to observe.
2006-04-13 07:10:48 +00:00
nethack.allison
cc31b25634 don't reveal surface when Blind and levitating
<email deleted> wrote the following on April 10, 2006:
> When blind and levitating, you can produce a message - "You try to feel what
> is lying here on the ice. But you can't reach it!" - which reveals too much
> about the terrain below you.
2006-04-11 02:00:38 +00:00
nethack.rankin
51d60d9721 digging land mines & bear traps (trunk only)
<Someone> suggested that digging down on a land mine with a pick-axe ought
to set if off.  I agree; this implements that and also for bear traps.  In
the bear trap case, if you dig down once trapped, you will destroy that
trap explicitly rather than replace it with a pit, so it's now possible to
escape from one without leaving another trap in your wake.  Once the bear
trap is gone, further digging there will make a pit as usual.  While stuck
in one, digging down poses a modest risk of harming yourself.

|You now wield a pick-axe.
|You start digging downward.  A bear trap closes on your foot!
|You start digging downward.  You destroy the bear trap with your pick-axe.
|You continue digging downward.  You dig a pit in the floor.
|You start digging downward.  You dig a hole through the floor.
|You fall through...

[It seems a bit strange that finishing a pit discards all digging context,
so that resuming within the pit in order to make a hole "starts" digging
rather than "continues" it.]

     Digging down with a wand or spell will disarm these two types of traps
and then leave the corresponding object (which may or may not fall through
the resulting hole, like any other object there).  Digging to the side via
magic while trapped in a pit will also disarm such traps when it encounters
them.  (When not in a pit, a digging beam which simply passes over an armed
bear trap or land mine won't have any effect on the trap.)  Digging to the
side via tool behaves somewhat oddly ("no room for the rubble"?) and will
probably need some tweaking before eventual release; at present it doesn't
reach adjacent traps so didn't need any land mine or bear trap handling.

     I put the fixes entry in the new features section.
2006-04-08 06:55:15 +00:00
nethack.rankin
27dcb8e34a silver vs poly'd hero (trunk only)
<Someone> reported that thitu() was adding d20 damage for silver object
hitting silver-hating hero even though all the callers were using dmgval()
which also does that, resulting in doubled silver bonus/penalty.  This
fixes that (including for boomerangs thrown by player, which weren't using
dmgval(), to handle a hyptothetical silver boomerang).  While testing it,
I noticed that there was no "the silver sears your flesh" message when a
monster hit you with a wielded silver weapon, so this fixes that too.
(How did we miss that?  And how did <Someone>? :-)
2006-04-06 05:57:50 +00:00
nethack.rankin
820f3f70d9 autopickup during failed #untrap attempt (trunk only)
From a bug report, moving into a trap
during a failed untrap attempt didn't autopickup any objects there or
report about objects which aren't picked up.  Although that appears to have
been intentional, change move_into_trap() to behave more like a regular
move.  (I wrote this bit of code and don't remember whether the no pickup
aspect was deliberate; I suspect it might have been to avoid the redundant
"there is a trap here" message which you get when pickup checking is done
but not everything on the spot gets picked up.  This patch suppresses that
message.)
2006-04-06 04:55:07 +00:00
nethack.rankin
8ed2748d52 #terrain (trunk only)
I've been using this for a while; it is occasionally handy.  #terrain
is a new wizard mode command which brings up a text display where the map
topology is revealed, similar to the obscure #wmode command but showing
different information.  Also, #wmode has been tweaked a little so as to
actually overlay the tty-mode map exactly, rather than being off by one
line and one column.  (That shouldn't really matter for other windowing
schemes where the map and a text rendition of it aren't very likely to
have a given location be displayed at the exact same screen position.)

     The line of formatted flags info below the terrain display probably
belongs in a separate debugging command altogether where it wouldn't have
to be displayed in such a terse fashion.
2006-04-01 05:48:55 +00:00
nethack.rankin
f94b832fc9 shattering monster's weapon stack
Something I encountered while playing slash'em a while back, but
relevant to nethack:  "Its orcish spears shatter from the force of your
blow!".  I was using a two-handed weapon (at skilled or expert level) to
fight an invisible monster which was wielding a stack of multiple spears
(slash'em gives them out in groups of 3 for monsters' starting inventory).
After killing it, I found 2 orcish spears along with an invisible corpse
of somebody-or-other the Kobold King.  The message suggested that the
whole spear stack had been destroyed (and the weapon shattering code in
hmon_hitmon() clearly expects that to be the case), but only one of them
had actually gotten used up.

     I can't recall whether "shatter" was actually given as singular or
plural at the time; nethack handles that aspect correctly.  Only object
destruction needed tweaking.
2006-03-30 05:52:28 +00:00
nethack.rankin
08e9280201 swallowed time (trunk only)
From a bug report, making engulf time longer for high AC
didn't make sense for non-digestion attacks:  taking longer to die from
being digested (high AC lets you last longer there) is much different from
being stuck inside a vortex or elemental and suffering extra buffettings
or whatever.  Calculate swallow time differently for non-digestion than
for digestion.  (The adjustment based around level 25 doesn't make much
sense either, but I left that in.)

     If you survive total digestion via life saving, you get a message
about the monster not liking your taste.  I don't think that's appropriate,
but haven't tried to figure out how to fix it.
2006-03-28 04:57:40 +00:00
nethack.allison
ecb98e019c eating gold in front of the vault guard (trunk only)
<email deleted> wrote:
> Eating gold in a vault (or polymorphing a pile of gold into 1 gold piece)
> doesn't anger the guard.

This addresses the eating part of that report, but the hero
has to get caught doing it.
2006-03-26 05:23:46 +00:00
nethack.allison
62b430601f wording bit in fixes35.0 2006-03-26 03:56:37 +00:00
nethack.allison
280823536c clear pits in temporary corridor
From a bug report, then leave the corridor (causing it to
> vanish), the pit will be embedded in rock instead of being removed.

clear any pits that the hero digs in the vault guard's temporary corridor
2006-03-26 03:52:46 +00:00
nethack.allison
05ce448135 prevent possible minor MAIL abuse
<email deleted> wrote:
> * MAIL Abuse: one can polymorph into a gelatinous cube, send themselves lots of
> scrolls of mail, and eat them, gaining free nutrition.
2006-03-25 21:06:49 +00:00
nethack.rankin
5e79d10377 wizard mode level teleport (trunk only)
Responding with '?' to the "what level?" prompt when using ^V in
wizard mode brings up a menu of special level destinations that lets you
move across dungeon branches.  But getting in and out of Fort Ludios
didn't work, and jumping to the endgame forced you to arrive on the Plane
of Earth.  Now Fort Ludios will not be selectable in the menu until after
the portal ordinarily used to reach it has been created (so you'll need a
level between Bigroom and Medusa with a vault on it to be created before
you can bypass the magic portal and jump directly to the Fort), and you
can go directly to any of the elemental planes, including Astral, without
stopping at Earth first (the Wizard will be there to greet you, whichever
level you pick).  Also, this limits the menu to endgame entries once you
are in the endgame.  (Previously, picking a non-endgame level would yield
"you can't get there from here"; you can still get that, if you really
want to see it for some reason, by giving a destination level number
outside the range of -1 to -5 instead of using the menu.)

     I hadn't realized that this feature has been around since 3.4.2 until
I couldn't find any new feature entry for in the current fixes file....
2006-03-25 05:16:24 +00:00
nethack.allison
6ef8efcefb digging conjoined pits (trunk only)
This one turned out to be more effort than I had
originally anticipated.

We had a bug report requesting that zapping a wand of digging
laterally while in a pit should dig beside you. That seemed
like a reasonable enough request, but this ended up with
the following results:
- needed to check where this should not be permitted, or at
  least where there should be special-case code because there is
  something such as furniture on the surface above the dig
  point.
- now tracks conjoined pits through new fields in the trap
  structure, hence the pathlevel increment. The array of
  8 boolean values represents each of the 8 directions
  around a pit.
- Previously, pits could be adjacent to each other as two
  individual pits, in which case moving between them
  results in a fall as you went into the next pit. That
  behavior is preserved.
- Pits created either by zapping a wand of digging
  laterally while in a pit, or by "clearing debris"
  between two adjacent pits via a pick-axe, sets the
  conjoined fields for those two pits. You cannot
  create a brand new adjacent pit via pick-axe, only
  with the wand.
- The hero can pass between conjoined pits without
  falling.
- dighole() was hijacked for adjacent pit digging,
  so the ability to pass coordinates to it and
  its downstream functions was added (dig_up_grave()
  for example). dighole() does pretty much everything
  appropriately for this adjacent digging, more so
  than calling digactualhole() directly.
- moving into a conjoined pit that has spikes still
  does damage, but less so that "falling" into the
  spiked pit, and you "step on" the spikes rather
  than falling into them.
- Not done: should pits with the conjoined fields
  set be referred to as 'trenches' rather than pits
  in messages and identifications?
2006-03-19 23:59:03 +00:00
nethack.allison
3299e318ca digactualhole() bit
I'm pretty sure this check at_u should be included since x,y
can be passed to digactualhole().  The lack of any related
bug reports suggest that at_u is currently always
true for any code that calls digactualhole().
2006-03-19 23:13:11 +00:00
nethack.allison
b56187f1b9 cancelled nurse #chat
On May 17, 2005, <email deleted> wrote:
> Cancelled nurses shouldn't say "Relax, this won't
> hurt a bit."
2006-03-14 23:53:22 +00:00
nethack.rankin
e1ef0f1042 filling antholes
From a bug report:  when creating a
level, anthole rooms can be generated even when no ants are left, unlike
beehives which get suppressed once killer bees are gone.  Also, if some
ants are available but the type chosen for the current level isn't (in his
case, soldier ants had been genocided), the anthole was filled will random
monsters instead of picking another type of ant.  This fixes both issues.
Random monsters will only occur if the last type of ant gets used up while
filling an anthole that was started when some ants were available, same as
how monster generation for beehives and barracks works.
2006-03-09 05:39:38 +00:00
nethack.allison
354f4254bc wand of locking message (trunk only)
<email deleted> wrote:
> BUGS TO REPORT:
>
> * Zapping a wand of locking at an open door with an object on it probably
> shouldn't give a "Something's in the way." message - especially if the wand is
> unidentified.

avoid "Something's in the way" message with unidentified wand of locking
2006-03-08 23:08:25 +00:00
nethack.allison
71ed473cf6 broken wand of striking vs door (trunk only)
<email deleted> wrote:
> * Doors absorb the blast of a broken wand of striking. What's more, the message
> reads "The door absorbs your bolt!" rather than "blast".

passes wand type to explode() as a negative value for the case
where the wand type isn't mapped to an AD_* explosion type.

Then explode() converts it to a positive and passes it to zap_over_floor().
2006-03-07 03:10:58 +00:00
nethack.allison
3e8725ed95 magicbane grammar
I don't know for sure what all the possible values of hittee passed to
Mb_hit() are, but this checks to see if it matches the name of the
mdef monster and forces the word "is" if it does.
2006-03-06 04:11:36 +00:00
nethack.allison
8dec47ee60 make disappearing scroll trick trunk only 2006-02-26 00:40:13 +00:00
nethack.allison
8308afc75c disappearing scroll trick
<email deleted>
> * When you read a charging scroll, it "disappears", but when you are
> selecting the object to charge, the scroll itself remains in your
> inventory listing until you make your selection.
2006-02-25 00:43:39 +00:00
nethack.allison
a732a87ee2 tame hidden monster message
<email deleted> wrote:
> * Searching next to a tame hidden monster gives the message "You find a
> <kraken>." It should be "your <kraken>."

While I don't consider this a bug, the change seems appropriate.
2006-02-24 02:54:58 +00:00
nethack.rankin
d83513b471 leather spellbook revisited
Change the description of leather spellbook to leathery.  Eating it
does not violate vegan or vegetarian conduct.  [By shear coincidence, I got
``Blecch!  Rotten paper!'' for it while testing this.]
2006-02-23 05:10:21 +00:00
nethack.rankin
6bcfa8f88b [baby] long worms
Between the addition of worm body parts and the phrasing of engulfing/
digesting status, I remembered an oddity with the vanquished monster list:
it shows baby long worms right next to adult long worms; both were defined
as level 8 monsters.  It also turns out that babies dealt more damage per
attack than adults; that was counterintuitive, to put it mildly.  Boost
long worms from level 8 to 9; drop baby long worms from level 8 to 5, half
rounded up just like the relationship between baby and adult purple worms
(who are levels 8 and 15, respectively).  And increase the damage for adult
long worm attack (was 1d4, now 2d4); drop it for baby (was 1d6, now 1d4).
2006-02-21 06:32:53 +00:00
nethack.rankin
b6b522398d fix part of #H43 - probing feedback when engulfed
From a bug report, feedback of the form

Status of the fog cloud (neutral):  Level 2  HP 5(5)  AC 0, engulfed you.

sounds odd.  "Engulfing you" seems a little odd as well, since the engulf
has already taken place, but I think it works out better.  For symmetry,
replace "swallowed you" by "swallowing you".  But that one will never
occur, because all the animals with engulfing attacks will now yield the
more precise and much more significant "digesting you".

     The code formatting is strange.  Lining up the text parts works out
a lot better than attempting to fit the associated tests within the space
left after the large indentation being used.
2006-02-21 06:07:22 +00:00
nethack.allison
b6eff2405a leather spellbook
<Someone> wrote:
> * Eating a leather spellbook doesn't violate
> vegetarian conduct. I suggest you rename it to
> something else. (May I suggest "bark"?) Also, I refuse
> to consider "leather" to be a colour or texture.
> * While as a water nymph in water, seducing an unseen
> monster on dry land sometimes gives away its identity.
> * When submerged iron golem monsters residually
> "rust", and the rust damage kills them, it doesn't
> report their death.
> * Drum of Earthquake says "the entire dungeon shakes
> around you" even when you're in the Endgame or the
> Quest's top level.
> * Wishing for a statue of a guard, then destoning it,
> then chatting to it, makes it say "drop that gold"
> without context. This could probably be extended to
> other cases, too (like Croesus?)

This corrects only the first complaint in the list above.
2006-02-21 03:28:57 +00:00
nethack.allison
75a4885cb9 Guidebook update - thank you to Ron Van Iwaarden 2006-02-20 00:01:49 +00:00
nethack.allison
f65d0710b6 confused scroll of light
Implement the following suggestion by <email deleted>
- Reading a scroll of light while confused should
create a hostile yellow light (black light if cursed).

It only creates the light monster effect 1 out of 5 times.
2006-02-19 23:28:38 +00:00
nethack.allison
8dc30e25f2 fixes35.0 update 2006-02-19 22:40:52 +00:00
nethack.allison
abb47e6fc6 frying water elementals
Subject: Some problems to report!
Date: Tue, 17 May 2005 07:01:40 -0700 (<email deleted>
<email deleted>

[...]
- When polymorphed into a water elemental, falling
into lava still says "you burn to a crisp."
[...]
2006-02-19 22:35:23 +00:00
nethack.allison
3ea07e2ef0 anatomy bits
Subject: Some problems to report!
Date: Tue, 17 May 2005 07:01:40 -0700 (<email deleted>
<email deleted>

Hi. I'm a sourcediver but not a source compiler.
I use the Mac carbon port under Mac OS X. But enough
about me; I noticed these things:

	Polyself/Anatomy Bugs:

- Mimics are amorphous, so they should have jelly
parts rather than animal parts.
- Piercers, trappers and lurkers above have animal
parts, including "head," but they are M1_NOHEAD.
- All elementals have vortex body parts. This should
only be the case for air elementals.
(Remember: stalkers, unlike the other elementals, have
heads.)
- Krakens ought to have tentacles, like jellyfish. ("A
gush of water hits the kraken's left fin!")
- Worms have snake body parts, but they shouldn't have
scales.
[...]

 This patch:
- adds worm_parts
- gives krakens tentacles
- ensures that stalkers have a head
2006-02-19 21:57:54 +00:00
nethack.rankin
ff553c6995 latent level arrival message bug (trunk only)
Something I noticed during a level change in slash'em:
        You hear the sounds of civilization.  You fly down the stairs.
The first message ought to follow the second.  Our only arrival messages
that are handled via the special level loader occur in the endgame where
travel is by magic portal, and the transit message given for portals is
for entering one rather than exiting at the far side, so this sequencing
problem can't currently be noticed in nethack.  But sooner or later there
will be levels reachable by stairs and having entry messages, or there'll
be some feedback added when magic portal transport finishes, and then we'd
get bitten by this.

     Tested by adding an arrival message to each of the bigroom variants.
2006-02-16 07:35:00 +00:00
nethack.rankin
73e9225d88 scroll usage; also spell of ID (trunk only)
Make a not-very-robust fix for the report from <email deleted> about
being told a scoll disappears as you read it, then for the case of cursed
remove curse being told that the scroll disintegrates.  He missed similar
case for scroll of fire erupting into flames after it had disappeared.
This suppresses the "disappears" part of the scroll reading message for
those two cases, but won't be very reliable if other scroll messages
referring to the scroll itself get introduced in the future.  [Several
paths through scroll of fire won't report that it burns, and now it doesn't
give the disappears message any more.  I don't think that's worth worrying
about; the scroll leaving inventory after burning up is implicit.]

     Also cut down on redundant feedback for several scrolls (genocide,
charging, identify, stinking cloud) that start off by informing the player
what they are.  That's only needed when the the player doesn't already
know the type of scroll.  I've always felt it silly to be told that I've
"found a scroll of genocide" when I'm intentionally reading a known scroll
of genocide.  All these types of scroll give a subsequent prompt which
makes them recongizable if you somehow manage to choose the wrong object
when picking the one to read.

    Lastly, make spell of identify behave like ordinary uncursed scroll of
identify by default instead of ususally ID'ing multiple items.  Now you'll
need to be skilled or better in divination spells skill in order to get the
blessed scroll effect out of it.  And give some feedback if the spell is
cast when not carrying any inventory; it was just silently moving on to the
user's next command in that case.
2006-02-16 06:44:24 +00:00
nethack.rankin
6a892dbf0c ghoul fodder (trunk only)
I doubt if many players in nethack ever have pet ghouls (in slash'em
they're the necromancer's starting pet), but if so, provide them with a
portable food source by letting ghouls eat dead eggs in addition to tainted
corpses.  Also, let them eat fresher varieties of either when they're about
to starve to death.  Treat lizard & lichen corpses as always fresh since
they never become tainted (probably ruining slash'em necromancers' present
pet food of choice, though they'll still be able to eat lizard corspes if
starving).

     I set the omnivore flag in their monster definition.  Previously they
had been left as non-eaters despite the fact that they need to eat.  When
the flag wasn't set, a hero who poly'd into one and then put on an amulet of
unchanging could go a very long time (thousands of turns) before the hunger
imposed by wearing an amulet finally made him/her become hungry.  (Same as
with any other truely non-eating monster, so not really a big deal.)

     Also, avoid the expression &mons[obj->corpsenm] for objects where the
corpsenm field isn't applicable, in case the default value ever changes from
0 (PM_GIANT_ANT) to NON_PM (-1).
2006-02-14 05:27:16 +00:00
cohrs
57c3fa60b7 C343-3 creation of the Ranger quest start level
Normal maze levels are initialized from x == 3 thru COLNO-1.  However,
levels that use the INIT_MAP spec go thru mkmap, which initializes the level
starting at x == 1.  This usually makes no difference, but does in the case
of levels that also use GEOMETRY:left.  This was the case with the Ranger
start level and caused the leftmost 2 locations to be room locations but
unreachable.  The Juiblex level actually had the same behavior, but this
was harmless because the MAP in that case was smaller.

Fix is to set the xstart=1 for levels with INIT_MAP and GEOMETRY:left.
The rest of sp_lev works just with this (when INIT_MAP was used, that is).
2006-02-12 01:45:54 +00:00
nethack.rankin
3096fc47dc spell retention feedback (trunk only)
Instead of just marking forgotten spells with an asterisk, add a new
column to the '+' spell menu which gives an estimate of how well the spell
is remembered.  Precision of the estimate depends upon the hero's skill in
the category of spell; expert gets the most detail with a low-to-high range
spanning just 2%, such as 19%-20% or 75%-76%; skilled sees 5% ranges; basic
10%, and unskilled the least detail with 25% ranges (ie, one of 1-25, 26-50,
51-75, or 76-100 for percentage of time left available for the spell).
[The tab-separator variant for the menu is untested.]

     This fixes an off by one bug for spell retention.  It got set to 20000
as intended when a spellbook was read, but then it would be decremented to
19999 before the player had a chance to do anything else, cheating him out
of 1 turn of memory.  Spells known at game start last exactly 20000 turns.

     Also, adjust the point at which you're allowed to reread a spellbook
and refresh your memory of the spell.  When the current spell system was
instituted, that was 10% of the retention period (1000 turns or less left
out of 10000); when retention got doubled to 20000 turns, the relearn point
was left as is.  Increasing it to 10% (ie, doubling to 2000) makes it fit
better with the displayed retention percentages.  Otherwise expert casters
would be left to guess when they've hit that point (1000 is 5%, falling
within their 5%-6% range, which really indicates (4%+1) to 6%).  At 10%,
it's the threshold for the 9-10 range for experts, 5-10 range for skilled,
and 1-10 range for basic so the player can see when it has been reached;
only unskilled, with a bottom range of 1-25, is left to guess.  Players
will likely prefer to wait until later, when the spell is nearly expired,
to refresh, but if they're about to abandon their books on the way to the
endgame then being able to re-read sooner is beneficial.
2006-02-11 06:35:41 +00:00
nethack.rankin
5d732c47a3 partial fix for #H38 - hallucination of personal names (trunk only)
This fixes the monnam() family of functions so that hallucinated
personal names, such as Barney, won't be prefixed by "the".  It uses the
same hack as is used for shopkeeper names:  single character prefix on
names which warrant some handling other than the default.  rndmonnam()
strips that off, so unmodified callers (which is almost all of them...)
retain the same behavior has before.

     There are several capitalized names that I have no idea whether need
to be treated as personal names:
  Evil Iggy - name, or type of monster named after someone?
  Totoro    - no clue
  Invid     - ditto
  Vorlon    - just guessing that it's a species rather than an individual.
I couldn't remember whether Godzilla was baby Godzilla's mother or father,
so I went with female there.  So far, no callers of rndmonnam() care about
gender so it doesn't make any difference.  Because of that, I didn't look
though the non-capitalized names to see whether any should be all male or
all female and need one of the other prefix codes.

     I've added "were-rabbit" from the Wallace & Gromit movie.  The recent
ads for its DVD release reminded me that I was going to add that back when
the movie first came out.  I haven't seen it but the creature name fits.

     I also fixed Smokey Bear.  Smokey the Bear is a common misspelling;
I thought we had fixed that ages ago, back when people still had some clue
as to who in the world he was.
2006-02-09 06:12:00 +00:00
arromdee
3f493c2518 fireproof candles 2006-02-09 03:40:26 +00:00
arromdee
83807a84f5 patch: #defines
This is a fairly trivial code change but should have been done long ago...
2006-02-09 03:26:59 +00:00
cohrs
cf05c21190 not really a typo
revert to "persecuted", add a comment
2006-02-05 17:09:57 +00:00
cohrs
88a5b95e65 inappropriate polyself spit attacks
Submitted by <Someone> 12/3/05.  player poly'd as guardian naga produced a
different attack than a real guardian naga.  The fix causes an algorithm
similar to that used in spitmnu to be used in dospit.
2006-02-05 03:29:45 +00:00
cohrs
dfb1d04b6a inappropriate "lamp flickers" message while blind
From a bug report.  Add missing !Blind check.
2006-02-05 02:06:24 +00:00