nethack.allison [Sun, 12 Mar 2006 04:43:28 +0000 (04:43 +0000)]
chameleon behaviour
- restore intended behaviour of kill_genocided_monsters().
It has been incorrect since the chameleon overhaul in June 2004.
- eliminate CHAM_ORDINARY and use NON_PM instead.
nethack.rankin [Thu, 9 Mar 2006 05:39:38 +0000 (05:39 +0000)]
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.
nethack.allison [Wed, 8 Mar 2006 23:08:25 +0000 (23:08 +0000)]
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
nethack.allison [Tue, 7 Mar 2006 03:10:58 +0000 (03:10 +0000)]
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().
nethack.allison [Mon, 6 Mar 2006 04:11:36 +0000 (04:11 +0000)]
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.
nethack.rankin [Sat, 4 Mar 2006 06:11:11 +0000 (06:11 +0000)]
minor scroll overhaul (trunk only)
The recently revised scroll of charging left out making it become
discovered. When fixing that I decided to remove all the early returns
from seffects(), so that its logic is easier--at least for me--to follow.
I think the return values of seffects(), chwepon(), and the various
xxx_detect() routines are backwards (True denotes failure, False indicates
success), but they're all consistent with each other so I left those alone.
nethack.rankin [Thu, 2 Mar 2006 05:54:04 +0000 (05:54 +0000)]
luck confusion
Remove a couple of false comments about Luck, and an unreachable
switch case based upon them. I don't know if the comment in you.h was ever
true, but it was false by the time Kevin brought across assorted changes
from slash'em however many years ago. Full moon does not change the range
of possible Luck values, and ``rn2((Luck + 6) >> 1)'' produces a value
between 0 and 8 for prayer result, never 9. Natural luck is always within
the range of -10 to +10, and extra luck from carrying blessed or cursed
luckstone can add or subtract another 3. Full moon and Friday the 13th
change the equilibrium point for luck timeout but do not change the overall
range of possible values, which remains at -13 to +13.
nethack.rankin [Sat, 25 Feb 2006 06:48:52 +0000 (06:48 +0000)]
hero location bookkeeping bit
On the first move of the game and the first move after each level
change, the "previous position's coordinates" <u.ux0, u.uy0> had bogus
values: zero at start, last location on old level otherwise. They're
never used to undo a level change, so the last location on the old level
isn't interesting. Set them to match current location, as if you'd just
rested on the new spot. I'm not aware of any bugs attributable to this.
nethack.allison [Sat, 25 Feb 2006 00:43:39 +0000 (00:43 +0000)]
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.
nethack.rankin [Thu, 23 Feb 2006 05:10:21 +0000 (05:10 +0000)]
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.]
nethack.rankin [Tue, 21 Feb 2006 06:32:53 +0000 (06:32 +0000)]
[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).
nethack.rankin [Tue, 21 Feb 2006 06:07:22 +0000 (06:07 +0000)]
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.
nethack.allison [Tue, 21 Feb 2006 03:28:57 +0000 (03:28 +0000)]
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.
nethack.allison [Sun, 19 Feb 2006 23:28:38 +0000 (23:28 +0000)]
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.
nethack.allison [Sun, 19 Feb 2006 21:57:54 +0000 (21:57 +0000)]
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
nethack.rankin [Sun, 19 Feb 2006 05:47:57 +0000 (05:47 +0000)]
scroll of identify fix (trunk only)
My recent patch included a typo in a pline() call which broke compile,
and much worse, was accessing scroll of identify after using it up. Cache
scroll->otyp, scroll->blessed, and scroll->cursed instead of re-re-ordering
the identify scroll/spell code.
nethack.rankin [Thu, 16 Feb 2006 07:35:00 +0000 (07:35 +0000)]
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.
nethack.rankin [Thu, 16 Feb 2006 06:44:24 +0000 (06:44 +0000)]
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.
nethack.rankin [Tue, 14 Feb 2006 05:27:16 +0000 (05:27 +0000)]
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).
nethack.rankin [Sun, 12 Feb 2006 06:34:09 +0000 (06:34 +0000)]
Evil Iggy (trunk only)
A bit of web searching quickly reveals that Evil Iggy was a unique
monster added to Moria after a player using a character named Iggy refuted
the author's claim that the new version (of that time, early '80s) was
unbeatable. So flag our hallucinatory monster Evil Iggy as a personal name
so it won't get formatted as "the Evil Iggy".
nethack.rankin [Sun, 12 Feb 2006 06:24:25 +0000 (06:24 +0000)]
couple of spell bits (trunk only)
Move NO_SPELL and MAX_SPELL_STUDY from hack.h to spell.h. I didn't
even remember that the latter existed when I put MAX_SPELL_STUDY in the
former recently.
Add a couple of new "spell is almost gone" messages that occur when
casting spells. One matches up with yesterday's change for when you can
re-read a spellbook to reinforce memory of a known spell.
When "too hungry", you can't cast any spells, except detect food so
that you can find something to eat. When "too weak" you couldn't cast any
spells at all; now you can cast restore ability so that you can recover
lost strength. [We still need to come up with a better crowning bonus for
monks than spellbook of restore ability.] I couldn't think of a reasonable
exception for the "can't cast when carrying too much" restriction. If we
can come up with one (levitation?), then remove curse could/should become
an exception for the "no free hands" restriction.
cohrs [Sun, 12 Feb 2006 01:45:54 +0000 (01:45 +0000)]
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).
nethack.rankin [Sat, 11 Feb 2006 06:35:41 +0000 (06:35 +0000)]
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.
nethack.rankin [Thu, 9 Feb 2006 06:12:00 +0000 (06:12 +0000)]
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.
nethack.rankin [Tue, 7 Feb 2006 05:35:29 +0000 (05:35 +0000)]
wildmiss refinement (trunk only)
> This makes monsters marginally smarter--independent of their defined
> intelligence levels--by skipping their remaining attacks when the first
> turns out to be targetted at nothing. The exception is for monsters with
> both melee and spell attacks; they'll keep going in case they end up
> choosing a spell which doesn't need a target location. (It's rather
> ironic that the most intelligent monsters are the ones who'll foolishly
> continue swinging at thin air. This could be improved by forcing then to
> skip ahead to their spell attack.)
This implements the improvement for spellcasters. After they make
a wildmiss, they'll skip any further physical attacks but eventually try
their spell. (Titans have multiple physical attacks followed by a spell;
other high-end monsters probably do too.)
nethack.rankin [Tue, 7 Feb 2006 05:20:16 +0000 (05:20 +0000)]
`spestudied' manipulation again (trunk only)
Refine last week's change dealing with polymorphing spellbooks: when
a spellbook has faded to blank after multiple readings, randomize its
spestudied value so that it doesn't always polymorph into another blank
book on the first subsequent transformation attempt.
cohrs [Sun, 5 Feb 2006 03:29:45 +0000 (03:29 +0000)]
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.
cohrs [Sun, 5 Feb 2006 00:58:13 +0000 (00:58 +0000)]
M164: finding saved games in QT nethack start
Only 5 months old. The Unix code to find saved games, currently only enabled
for Qt use, fails to use fqname and SAVEPREFIX, so it doesn't find saved
games when prefixes are in effect.
cohrs [Sat, 4 Feb 2006 23:51:26 +0000 (23:51 +0000)]
Xorns in stone outside Sokobon and other special levels
First reported 12/13/2003, I think, but my archives contain more recent reports
too. Special level specs like NON_PASSWALL and NON_DIGGABLE only apply
to the map sections for which they are specified. So, on special levels of
Sokobon, the large surrounding area is stone, but have no special flags set.
So, it was possible to teleport a Xorn and have it appear in this outer area.
Addressed this by checking the perimeter of the map(s) and if all are
nondiggable and nonpassable, propagate this to the surrounding stone.
This appears to be the intent on such levels, so there is no need to
force the affected special levels to explicitly specify this.
cohrs [Sat, 4 Feb 2006 20:34:26 +0000 (20:34 +0000)]
gender and size of leaders and nemeses
Combo fix based on several reports and additional research.
In quest.txt and/or data.base, the Grand Master, Arch Priest, Ixoth, Master
Kaen, Nalzok, Scorpius, and the Master Assassin are all referred to as male
via reference: his or him. Ideally, there would be a way to parameterize
this in the quest.txt, but I don't see a clear way to do that at this time.
For the time being at least, set the M2_MALE flag for these monsters.
The Dark One was referred to via "his" once in the quest.txt. This case
I was able to modify the offending text rather than forcing a gender.
Orion and Norn are referred to as a giant in data.base but their size did
not correspond. I left the symbol as S_HUMAN although perhaps it should
be S_GIANT. Finally, Orion, the Norn, Cyclops and Lord Surtur, as
giant-types, should be able to tear webs.
nethack.rankin [Sat, 4 Feb 2006 06:11:44 +0000 (06:11 +0000)]
`spestudied' manipulation for polymorphed spellbooks (trunk only)
From a bug report... some
special case handling for polymorph of spellbooks never worked as intended.
It's possible to polymorph a spellbook, use it to learn a new spell, and
then repeat as many times as you like unless/until you run out of polymorph
magic or the small chance of "object shuddering" causes it to be destroyed.
Polymorph was incrementing the book's ``number of times read'' field with
the intent that it would fade to blank after being read 3 times (which
turns out to the 4 times since the check is actually for re-reading 3 times
after the first). That didn't work because the spestudied field was ignored
when learning a new spell, only checked when relearning a known spell.
Now it will be checked when learning a new spell, and also the book
tweaking during polymorph is slightly more elaborate. If you happen to
get a blank book during the item selection, it will have a read counter
of 0 and can be re-polymorphed into something readable. But if you get
some other book, its read counter will be set to one greater than than the
original book's (same as before). And then the counter will be checked
to see if it has gone over the limit, in which case the book will be made
blank and its counter will be reset to a random value. Re-polymorphing
that blank book again has 1/4 chance apiece among the following cases
book gets blanked again; goto step 1...
book is non-blank but too faint to read; reading attempt will fail
book can be read normally and then re-read once
book can be read normally and then re-read twice
which is more inline with the intent of the original special case code.
It's actually slightly nastier since you'll occasionally get a book for a
spell you don't know yet but then not be able to learn it from that book.
nethack.rankin [Sat, 4 Feb 2006 04:06:16 +0000 (04:06 +0000)]
fix #Q251 - reading engravings while asleep
From a bug report, floating down onto an engraving
due to levitation timeout would yield "You read: <engraving text>" even if
you were asleep at the time. Random teleport while asleep could produce a
similar result. The problem was actually a little bigger: you'd also get
"You see <object> here" if there was an object instead of or in addition to
an engraving.
nethack.rankin [Thu, 2 Feb 2006 07:20:08 +0000 (07:20 +0000)]
monsters with multiple attacks missing wildly (trunk only)
Reduce verbosity for monsters with multiple attacks who "swing wildly
at you and miss" or "miss your displaced image" due to their confusion or
your invisibility or displacement. It's aggravating to sit through that
three times for claw/claw/bite or swing/swing/kick when those longer
descriptions of why such missing happened guarantee multiple --More--
prompts. (Can't simply use Norep() to deal with this because wildmiss()
varies its messages.)
This makes monsters marginally smarter--independent of their defined
intelligence levels--by skipping their remaining attacks when the first
turns out to be targetted at nothing. The exception is for monsters with
both melee and spell attacks; they'll keep going in case they end up
choosing a spell which doesn't need a target location. (It's rather ironic
that the most intelligent monsters are the ones who'll foolishly continue
swinging at thin air. This could be improved by forcing then to skip ahead
to their spell attack.) Exploding monsters aren't affected because they
don't have multiple attacks. Offhand I can't think of any other situation
where a wild miss on the first of N attacks could still yield a successful
result on any of the other N-1 actions.
Monsters attempting ranged attacks who get multiple shots (due to
multiple weapon attacks per turn rather than to multi-shot volley during
a single attack) will end up conserving ammo when they stop after seeing
that the first shot didn't find a target. Note that trying to attack you
but accidentally attacking some other target isn't affected since that
doesn't yield the wild miss outcome. Intelligent monsters probably ought
to recognize that their attack against you ended up hitting someone else
and refrain from repeating that mistake N-1 more times. Whether feedback
from that ought to carry over to their next turn is not so clear cut.
nethack.rankin [Thu, 2 Feb 2006 06:15:13 +0000 (06:15 +0000)]
zapping unseen wands (trunk only)
Noticed recently when a user reported that an unseen monster zapping
an unseen wand caused wand of striking to become discovered. [That was
because the zap also hit a door and the code for the latter didn't check
whether the wand had been seen, and it got fixed a couple of weeks ago.]
When the player zaps wands while the hero is blinded, it was discovering
(for the cases where the effect can be observed without sight) the wand
even though the wand's description was unknown (showed in inventory as
"a wand"). This replaces the calls to makeknown() in zap.c with calls to
new learnwand(), which checks whether the wand description is known; you
no longer discover something you've never seen. Reverse effect has also
been added: if the type of wand has been discovered earlier, zapping an
unseen wand (another of the same type, picked up when blind and zapped
while still blind) will now mark it as seen (to show up in inventory as
"a wand of <whatever>" instead of just a "a wand"). The latter aspect
really ought to be independent of prior discovery, but we currently have
no way to record "we know what this particular item does even though we
don't know what type of item it is yet". [If we add that, it would be
applicable to potions (when operating on stacks) and rings too.]
Minor change: zapping yourself with wand of opening or spell of
knock will remove attached ball&chain rather than give a "chain quivers"
message. Explicitly zapping the chain already did that; if the unlocking
magic works on the chain connected to your leg then it really should also
work on your leg connected to the chain. Zapping unlocking at yourself
probably should also scan inventory to check for carrying locked chests,
but I didn't add that. (If added, then locking magic will need to be
augmented likewise.)
This also fixes <Someone>'s recent complaint: zapping an unknown
wand of teleportation at yourself didn't make it become discovered.
Now it will be, under the same circumstances as when you're riding: if
teleport control causes you to be prompted for destination, or if random
destination moves you more than jumping distance away from your original
position. (The Stunned exception to teleport control, which was missing
in zap_steed, perhaps ought to be moved into the macro definition of
Teleport_control itself so that all code always handles it consistently.)
nethack.rankin [Sun, 29 Jan 2006 04:32:04 +0000 (04:32 +0000)]
fix #H30 - rn2(0) from off by 1 bug in special level door creation
From a bug report, the placement
of random doors by the code that loads special levels would attempt to
evaluate rn2(0) and either get a divide by zero crash (normal build) or an
impossible warning (DEBUG enabled when compiing rnd.c, done automatically
when BETA is defined). The problem was only noticable for random door in
a 1x1 room; none of our distributed levels specify such a thing so regular
users won't have encountered this bug. It's a one line fix.
Altar placement in temples also had a quirk of a similar nature. It
wouldn't trigger rn2(0) problems but would always place the altar to left
of mid-point in rooms with even width and above the center point in ones
with even height. Now the placement is randomized so that sometimes it'll
be to the right and/or below mid-point in such cases.
This also simplifies a couple other instances of similar expressions
that I spotted.
nethack.rankin [Sat, 28 Jan 2006 06:46:19 +0000 (06:46 +0000)]
reduce temple verbosity (trunk only)
Cut down on the excessive verbosity generated when entering a temple.
The first time you enter a particular temple (or more accurately, the
temple attended by a particular priest), you still get the three message
sequence
The <priest of foo> intones:
Pilgrim, you enter a sacred place!
You have a strange forbidding feeling...
or
You experience a strange sense of peace.
except that the last one doesn't say "strange" any more. On subsequent
visits to the same temple, you usually won't get the first introductory
message any more, often won't get the second entry one, and sometimes
won't even get the final one, depending upon how much time has elapsed
since the previous entry. The old verbosity could really be infuriating
when attempting to lug corpses to the altar before they spoil. Even
though the messages don't affect the passage of time, it always felt as
if they were slowing you down. And even when you weren't in any hurry,
it required at least one and often 2 or even 3 responses to --More--
depending upon the length of the deity's name and whether some other
message was also delivered on the same turn (fairly common in minetown).
Saving and restoring, or leaving the level and returning, resets
the priest's memory of when the messages were last given, so the next
entry after that behaves similar to the very first. This was initially
intended for cleanup prior to saving bones data, but it seemed reasonable
to have it apply to the current game too. Unattended temples now also
have a 25% chance of not giving any message when entering. That one is
random rather than based on the passage of time since last entry; there's
no priest available to track the latter data.
cohrs [Tue, 24 Jan 2006 07:17:41 +0000 (07:17 +0000)]
knight quest message bit
I noticed this a while back while inspecting an unrelated report.
It seems to me the breath of a dragon is more like broiling than baking
and thought the message wasn't consistent with this.
nethack.allison [Sat, 14 Jan 2006 17:02:22 +0000 (17:02 +0000)]
wiz_identify change (trunk only)
This patch alters wiz_identify so that it displays an
inventory menu with all items shown identified
without actually identifying them.
You can just press ^I (or whatever the wiz_identify command
is) a second time, while the menu is displayed to actually identify
them (tested with TTY menus only).
nethack.rankin [Thu, 12 Jan 2006 06:24:23 +0000 (06:24 +0000)]
priest/minion bits (trunk only)
Cleanup up a couple of priest and minion allocation/conversion bits.
Also, restrict minion naming so that "guardian <foo>" is only applied when
<foo> is an Angel. (That restores old behavior from before a change I made
last October; it prevents the guardian Angel from being recognized while
hallucinating. It probably affects slash'em too, where they have tame
minions besides the astral level's guardian Angel.)
nethack.rankin [Thu, 12 Jan 2006 06:06:33 +0000 (06:06 +0000)]
mextra.h comments (trunk only)
Add an introductory comment for each type of extension. Also move
ANGRY/NOTANGRY shopkeeper macros from old eshk.h out of the common header
and into shk.c so that their use doesn't end up spreading into other code.
Not fixed: entry #9 in the block comment at the top is truncated
mid-sentence.
nethack.allison [Thu, 12 Jan 2006 03:23:05 +0000 (03:23 +0000)]
tin details (trunk only)
Reveal more tin details at end of game disclosure.
b - an uncursed carrot
c - an uncursed tin of broiled kobold meat
d - an uncursed tin of stir fried fox meat
e - 4 uncursed tripe rations
f - 4 uncursed food rations
g - an uncursed cream pie
n - 4 uncursed tins of spinach
o - 3 uncursed tins of pureed newt meat
p - an uncursed homemade tin of fox meat
Note that in the case of homemade and rotten
it sounded better to have the term before the
word tin, rather than after:
homemade tins of newt meat
rather than:
tins of homemade newt meat
The wishing code should probably be
changed to reflect this so people can wish for
a "homemade tin of newt". As it stands, they must
wish for a "tin of homemade newt" which differs
from the final display. That is not included.
nethack.rankin [Sun, 8 Jan 2006 06:37:22 +0000 (06:37 +0000)]
another mextra bit (trunk only)
Replace the fixes entry with one which mentions the magic word "panic".
That'll make it easier to find in the future when looking back for the
nasiest bugs (which I seem to end up doing periodically).
nethack.rankin [Sun, 8 Jan 2006 06:19:42 +0000 (06:19 +0000)]
mextra tweaks (trunk only)
Add new_mname/free_mname functions to make monster name handling be
more like the other extended data and to hide mextra details a bit more.
Add some casts where int and unsigned are being intermixed. Simplify
christen_monst(); it ought to be changed to have type `void' but I wanted
to avoid modifying another ten or so files.
nethack.allison [Fri, 6 Jan 2006 05:46:03 +0000 (05:46 +0000)]
mextra changes
Note: The CVS repository was tagged with NETHACK_PRE_MEXTRA
prior to application of this patch to allow easy withdrawal if necessary.
Adds a new mextra structure type that has a set
of pointers to various types of monster structures
including:
mname, egd, epri, eshk, emin, edog
Replaces the mextra bits in the monst structure
with a single pointer called mtmp->mextra of type
(struct mextra *).
The pointer can be null if there are no additional
structures attached. The mextra structure is not
adjacent to the monst structure.
Reduces the in-memory footprint of the monst that
has no other structures attached, at the cost
of adding 6 extra long ints per monster to
the save file
The new mextra structure has the mextra fields
independent of each other, not overlapping as was
the case with previous NetHack versions.
This patch doesn't do anything to capitalize on
that difference however.
Consolidates vault.h, epri.h, eshk.h, emin.h and edog.h
into mextra.h
Adds a macro for checking for whether a monster has
a name:
has_name(monst)
This fixes the magic trap panic
expels() -> spoteffects() -> dotrap() ->
domagictrap() -> tamedog()
because the monst no longer varies in size so no
replacement is required.
nethack.rankin [Thu, 5 Jan 2006 03:50:08 +0000 (03:50 +0000)]
fix #H12 - unseen wand of striking becoming known
From a bug report: while hero
was blinded, monster zapped him with a not-yet-discovered wand of striking
and the wand type became discovered. The report was slightly off; the
described case is already handled correctly. However, if the zap happened
to hit a door, the wand would incorrectly be made known even when not seen.
nethack.rankin [Tue, 3 Jan 2006 05:28:13 +0000 (05:28 +0000)]
fix #H11 - forcing lock with mattock
From a bug report: dwarvish mattock was
subject to breaking when attempting to force a lock, because it is treated
as a bladed weapon. So is pick-axe; they're both defined as blunt (WHACK
attack mode), but the definition of is_blade() erroneously includes them
since P_PICK_AXE falls between P_DAGGER and P_SABER. That skill should be
renumbered, but I haven't investigated what else might happen when that's
done so this fix uses a special case instead.
I noticed that there was an unnecessary old check for rubber hose;
it's excluded along with whip by the skill > P_LANCE test. When fixing
that up, I realized that the obscure feature of forcing via statue was
broken; it always failed the skill < P_DAGGER test. Also, I took away the
exception for aklys; even though designed as a throwing weapon, it is used
as a club. I wasn't sure about the exception for flail; it is perfectly
capable of bashing things but the code apparently excludes it for use as
a prying implement. Switching its check to P_FLAIL catches grappling hook
along with it.
nethack.rankin [Sat, 31 Dec 2005 06:19:04 +0000 (06:19 +0000)]
genociding mindflayers
When looking at name_to_mon() to teach it how to cope with possessive
suffices, I discovered that it already knows how. But while looking at
it, I remembered a newsgroup complaint from a while back by someone who
accidentally committed suicide by attempting to genocide "master mindflayers"
(when he meant "master mind flayers"). name_to_mon() didn't recognize that
misspelling but it did match "master" as a role title. Unfortunately for
the player, his character was a monk; the game allowed him to genocide his
own role and he died. That's kind of harsh for such a likely misspelling.
(I don't think a monk is very likely to ever use "master thief" as a mistake
for "master of thieves", but catch that one too just in case. Conversely,
recognize "master of assassins" as an alternate for "master assassin".)
Also, wishing for "the <something>" strips off "the" and finds (or not)
<something>, but genociding didn't. You could specify "a wolf" to wipe out
all wolves, but "the wolf" yielded "such creatures don't exist", and ^G had
similar unfriendly behavior. This extends name_to_mon() to handle it.
nethack.rankin [Fri, 30 Dec 2005 06:08:20 +0000 (06:08 +0000)]
corpse_xname overhaul (trunk only)
Extend the capabilities of corpse_xname() so that various callers can
be simplified. It can how handle an article prefix, effectively turning it
into corpse_doname() (not quite; still need doname() to see a count when
quantity is more than one, or to see bless/curse state). It can also handle
inclusion of adjectives like "partly eaten" or "bite-covered". For unique
monsters those come out in the form
the Chromatic Dragon's partly eaten corpse
instead of the old
partly eaten Chromatic Dragon corpse
[so wishing probably needs to be taught about potentially finding a monster
name before assorted adjectives such as blessed; also, name_to_mon() needs
to learn how to cope with the possessive suffix].
A sizeable chunk of this patch deals with consolidating some of the
redundant "petrified by a cockatrice corpse" handling. It may be possible
to consolidate all remaining instances together since they're quite similar,
but I didn't think about that until just now and I want to get this patch
over with.
nethack.rankin [Tue, 27 Dec 2005 03:45:27 +0000 (03:45 +0000)]
you summoned it!
From a bug report, "You have summoned it!" (when human
sacrifice brings a demon which you can't see) is poorly worded, to put it
mildly. I'm sure there are plenty of other places where "it" seems odd,
but this one is now fixed....
nethack.rankin [Fri, 23 Dec 2005 04:35:24 +0000 (04:35 +0000)]
diagonal blockage exceptions
From a bug report, amorphous creatures can fit underneath
closed doors but could still be considered too big to fit through diagonal
gaps. Let them and several other shapeless or flexibly shaped critters
squeeze through provided that they pass the not-carrying-too-much check.
nethack.rankin [Fri, 23 Dec 2005 02:51:06 +0000 (02:51 +0000)]
fix #H4 - remote recognition of Astral Plane high priests
From a bug report: the Call command's
prompt is careful not to include "of <deity>" when asking what name to give
a high priest on the Astral level, but the resulting rejection message of
"the <unique monster> doesn't like to be called names" did not, resulting
in feedback of "the high priest of <deity>" and giving away which temple it
is from afar.
nethack.rankin [Sat, 17 Dec 2005 05:01:27 +0000 (05:01 +0000)]
"can't reach from steed" message bits
These should have been included with a "#dipping from steed" patch
three years ago. I don't know whether I missed them outright, neglected
to cut diffs at the time, or just forgot to apply the diffs to my cvs
directory prior to committing the rest of that patch.
nethack.rankin [Thu, 15 Dec 2005 07:07:25 +0000 (07:07 +0000)]
gold theft while mounted (trunk only)
From a bug report, "The leprechuan quickly snatches some
gold from between your feet!" doesn't make much sense when you're riding.
Fix started out simple, but "between" isn't right if you're above the floor,
and "rear hooves" for horse or "rear claws" for dragon didn't sound right
for steed (or poly'd hero), so it got a little more complex. Complicated
even more due to requiring two copies; ick.
A minor side-effect of this change is that somewhat naughty sounding
"The leprechaun quickly snatches some gold from between your rear regions!"
won't occur anymore. :-}
nethack.rankin [Thu, 15 Dec 2005 05:33:15 +0000 (05:33 +0000)]
shopkeeper names when hallucinating (trunk only)
A bug report complained that Izchak is identifiable when the hero is
hallucinating. That's true but it wasn't particular to him; all shop
transactions were giving accurate shk name regardless of hallucination.
This is a quick fix that avoids changing shk message handling: pick some
shk name at random each time one is used. I didn't intend for it to also
force Izchak to use the general chat response instead of his set of special
messages, but that ends up happening due to randomized name not matching
his, so you really can't recognize him when hallucinating anymore.
The almost never seen names now have a chance to come into play....
nethack.rankin [Thu, 15 Dec 2005 04:20:23 +0000 (04:20 +0000)]
levitation timeout
Forwarded from the newsgroup by Michael: giving a count before '.' to
rest many turns wouldn't be interrupted by having levitation end (despite
autopickup taking place at the time, which is what the thread is about but
not all that relevant to this particular issue). Stopping counted activity
is easy, so that's all I've done. Stopping a timed occupation would be a
lot harder due to message sequencing; I'm not going to attempt it.
nethack.rankin [Thu, 15 Dec 2005 03:48:09 +0000 (03:48 +0000)]
redundant includes
Remove several duplicate includes I discovered while reconciling the
vms Makefile. All of these are already being brought in via hack.h so don't
need to be explicitly included after it.
nethack.rankin [Thu, 15 Dec 2005 03:39:20 +0000 (03:39 +0000)]
vms Makefile (trunk only)
I couldn't find the original depend.awk (which started out on vms) and
didn't feel like attempting to recreate it, so did this the old fashioned
way (grep,&c of src/*.c). I think that all of the various Makefiles need
one or more of these changes. Adding context.h to the hack.h dependencies
and emin.h to monst.{o|obj} are the most significant ones.
nethack.rankin [Sun, 11 Dec 2005 03:09:05 +0000 (03:09 +0000)]
in_lava_effects (trunk only)
The in_lava_effects flag should never be saved and restored; putting
it into the context struct was a mistake. Move it to the iflags struct
(where the branch code already has it). I haven't bumped the EDITLEVEL
setting. Save and bones files from more that a few days ago were breifly
invalid but should be viable again. Save and bones files from the past
couple of days are now no good; sorry about that.
nethack.rankin [Sat, 10 Dec 2005 05:39:24 +0000 (05:39 +0000)]
killer_xname changes (trunk only)
Have killer_xname() handle corpses properly and also avoid having it
use user-supplied fruit names as per <Someone>'s suggestion. Also make
a start at eliminating the umpteen inconsitent checks for whether a monster
type (like "Oracle") ought to be prefixed by "the ".
I used a stub which looped over all object types, all artifacts, and
corpses of all monster types to print the output of killer_xname() for each
one; its prefix choice among {[no article], a, an, the} looked right.