Commit Graph

1339 Commits

Author SHA1 Message Date
cohrs
fe43698867 Q387 - grammar fixes in Samurai quest
"Wakarimasu?" should be "Wakarimasu ka?"
2007-02-10 16:31:14 +00:00
nethack.rankin
7c64dbaf83 fix #Q404 - monster wielding cursed corpse
From a bug report, applying a bullwhip
towards a monster to try to steal its weapon would report that a cursed
cockatrice corpse was welded to the monster's hands even though corpses
wielded by the player never become welded.  Code for monsters deciding
what to wield knew that corpses don't weld; everywhere else seems to
assume that they only wield weldable weapons.  Add a routine to check
whether a wielded item is welded, similar to what's done for the hero.  I
fixed a couple of other spots besides use_whip() but didn't hunt all over.
2007-02-10 05:14:22 +00:00
nethack.rankin
4168718d5d fix #Q159 - segfault with super long item names
From a bug report, putting an object with
really long specific and type names into a container with really long
specific and type names caused the program to crash.  pline() overflowed
the buffer it formatted into, and even though it was able to send that
for output and trigger a --More-- prompt, eventually a segfault occurred.
Give vpline and vraw_printf a much bigger working buffer, then truncate
the formatted text to BUFSZ - 1 characters so that we don't just push the
long line trouble into the separate interfaces.
2007-02-10 04:05:47 +00:00
nethack.allison
a83e2ba4a4 Q416 kicking gold (trunk only)
<email deleted> on Monday, January 29, 2007:
>Hero is able to kick a pile of gold (say, 100) and have the entire pile move at
>once in the same direction; very easy to avoid gold on traps.  Kicking gold
>should probably scatter the pieces in multiple directions or at least not be
>quite so easy.
2007-02-10 02:02:49 +00:00
nethack.rankin
eabf0f649e fix #Q367 - tinning Rider corpse when level is full
From a bug report:  if you try to tin a
Rider's corpse and revival fails, you still get the gimicky message about
War not preserving his enemies.  Give the suggested alternate message in
that case:  The corpse evades your grasp.  I hope that we can do better
than that, but I'm too burned out to think of anything.
2007-02-09 01:35:41 +00:00
nethack.rankin
c2a3a3a38b fix #H239 - doppleganger/mimic bug
From a bug report:  a shapechanger
which becomes a mimic would always stay as 'm' rather than take on object
or furniture shape.  Same applied to monsters which hide in other ways.
The code did that deliberately, but I don't think that it's actually
necessary so this lets them mimic/hide when they're in the right shape.
If they change form to non-mimic/hider while concealed, concealment ends.

     It would be fun to have shapechangers-as-mimics actually change their
mimicked shapes periodically, but this doesn't do that.  They'd probably
change to non-mimic quicker than they'd mimic something else so it's not
worth the effort.
2007-02-09 00:25:47 +00:00
nethack.rankin
1fe4018f3b fix #Q295 - post-choking food side-effects
From a bug report, but
just received:  if you choked while eating a cockatrice egg and survived,
the turn-to-stone sequence wouldn't be initiated.  For such eggs, turning
to stone starts when the food is finished rather than when it's started,
and fpostfx() wasn't called for food that triggered choking so the egg
went away without actually being finished.  Fortune cookies, lumps of
royal jelly, and a few other things suffered from the same situation.
2007-02-08 23:33:14 +00:00
nethack.rankin
e46663e456 weapon rustproofing status
From a bug report, hitting a rust monster with a
fireproof--but not identified as fireproof--weapon caused the rknown bit
to become set, identifying the item as fireproof.  That would also happen
for a monster's anything-proof weapon if it hit a rust monster, whether
you could see it happen or not.  The code involved is convoluted; I hope
this fix is correct.
2007-02-08 07:06:39 +00:00
nethack.rankin
128ed0f0be fix #Q117 - vomiting by rodents & more
From a bug report:  you could vomit when polymorphed into a rat but real life
rats can't/don't vomit.  The latter was confirmed by <Someone> and <Someone>.
While testing a fix for this, I discovered a couple of other problems.
Healing magic which cured sickness failed to heal Vomiting (potion or
spell; unicorn horn deals with them separately).  Enlightenment failed to
report Vomiting (it's not shown on the status line).  Most significant was
that vomiting_dialogue() called vomit() twice (also make_confused() and
make_stunned() three times for every once intended).  It was dividing the
remaining turns by 3 and then using that value to decide what to do, but
only message display took into account that the same divided value would
occur on 3 consecutive turns (or just 2 for the final countdown to 0,
because dialog routine gets called before timed-property decrement).
2007-02-06 04:35:50 +00:00
nethack.rankin
8465f87d2f fix #Q108 - adding candles to Candelabrum while underwater
From a bug report, but just received:
you can't affix candles to the candelabrum while underwater, because the
underwater check (can't light candles while underwater) is made too soon.
If you somehow managed to get a lit lamp, candle, or candelabrum while
underwater, you wouldn't be able to extinguish it for same reason.  The
bug report included a URL for a fix, but I didn't look at that.  This
changes use_candle() to rely on use_lamp() for underwater handling, and
changes use_lamp() and use_candelabrum() to check for extinguishing
before making the underwater check.
2007-02-04 05:34:59 +00:00
nethack.rankin
dc6a38fe32 fix #Q94 - quest portal bug
From a bug report.  (Michael forwarded a newsgroup posting about it back
then, but I had trouble reproducing it and didn't figure it out until
trying again now.)  If hangup occurred while entering the quest, the magic
portal could be rendered inactive for the hero but still work for monsters.
That's because the hangup save stored the old value of u.uz0 before
goto_level set it to the new u.uz, and a magic portal won't operate when
u.uz0 differs from u.uz (to prevent a pair of portals from getting stuck
sending the hero back and forth).  The problem could also occur going from
the quest back to the dungeon, or either direction for Ft.Ludios, but the
--More-- prompt when the quest entry text is being displayed makes hangup
during level change most likely to occur during initial quest entry.

     This is just a bandaid, and the SAFERHANGUP config wouldn't be hit
by this situation.
2007-02-04 04:26:35 +00:00
nethack.rankin
1e705189f2 more engraving with empty wands (#Q85)
#Q85: Bug: wrest a wand in one turn through engraving
From a bug report:  engraving with an empty wand while not levitating, then using
ESC to abort when asked for the text to write, let you attempt to wrest
the last charge without using up a turn.  Between the time this report was
sent and received, someone else reported similar issue with levitation,
where no prompting occurs.  The fix for it also fixed the original problem.
Somewhat inadvertently though, since you can now no longer write in the
dust with a empty wand.  I'm going to leave it this way; all that's needed
is some feedback about failing to engrave.
2007-02-04 04:01:33 +00:00
nethack.rankin
42444d0db5 m-prefix groundwork (trunk only)
Set up to be able to use the m command prefix to request menu mode
for commands other than just pickup.  As a side-effect, a hardcoded ','
referencing that command is eliminated.  Also, the command handling for
pickup was accepting the other prefix characters (F,g,G,M,numpad 5) as
synonyms for m; this reverts all but 'm' to movement modifiers only (it
may be reasonable to retain M and 5, but this doesn't).
2007-02-03 03:41:22 +00:00
nethack.rankin
e7cb81fe7b acid vs iron bars (trunk only)
Make yellow dragon breath destroy iron bars (unless their wall_info
is marked as non-diggable, which I think is currently impossible for bars).
The shop handling is untested; no shop has iron bars for its walls or
includes them as interior obstacles.  (The latter would require changes
to shop repair because lost bars will become solid wall if/when rebuilt.)

     Thrown potions of acid and spat or thrown splashes of acid venom
don't affect bars--at least so far--because those always pass through
without hitting.  Monsters who have a non-ranged attack which does acidic
damage can't use such attacks against iron bars.
2007-01-28 04:39:14 +00:00
nethack.rankin
5b88c67d97 engraving with empty wand
From a bug report:  if you
attempted to engrave with an empty wand while levitating, it wouldn't use
a turn unless you successfully wrested an extra charge out of the wand.
So you could always get such charge in a single elapsed turn of game time
if you didn't care about zapping in any particular direction; extremely
useful for wishing.

     Noticed when checking this:  when you did wrest the extra charge,
the engraving code accessed freed memory for the wand after it had been
used up.

     Lastly, wands producing certain effects always become discovered,
even when you don't yet know what they look like.  (This part of the patch
is trunk-only since it utilizes the routine which fixes similar case for
zapping.)
2007-01-27 05:50:10 +00:00
nethack.rankin
e2fffafb7c kicking off edge of map
From a bug report:  if you
were at one of the map edges and kicked away from map center while blind,
you'd get impossible("show_glyph: bad pos ...").  That was due to calling
feel_location() for the out of bounds location, which occurred after the
kick code had made use of invalid data so other problems might occur too.

     Now you kick "nothing" as if it was something (hence possibly wounding
your leg, taking some damage, potentially dying).  I didn't want to try to
classify the surrounding terrain as rock or air or whatever, and the thing
being kicked only shows up if the kick is fatal.
2007-01-27 04:33:16 +00:00
nethack.rankin
c36712aabe eating artifacts while poly'd
From the newsgroup:  if polymorphed into a metallivore, you could eat
artifacts that you couldn't touch with your hands.  Now you can't eat ones
which evade your grasp, and you take some damage from other touchy items
on--actually, prior to--the first bite.  (Those still "taste delicious" if
you survive; I'm not sure whether this ought to be changed.)
2007-01-25 06:24:39 +00:00
nethack.rankin
0bd89ff28d Confused #loot (trunk only)
Attempting to loot while suffering from confusion and not on top
of a container will drop gold if hero is carrying some, but it behaved
differently for GOLDOBJ config (gold dropped over a hole or down stairs
always stayed on current level) than for !GOLDOBJ (gold had a chance to
fall to lower level) when done at some location other than a throne.
This makes GOLDOBJ use dropx() instead of dropy(), same as !GOLDOBJ.

     And with access to a throne it can be used to repeatedly summon
monsters until they're extinct.  This makes it check for confusion before
finding containers, but the chest/exchequer code doesn't always kick in
so can't be attempted as many times before confusion expires, throttling
summoning a little.  Also, when placing hero's gold into a chest, it now
clears the contents-known flag and relocks the chest.
2007-01-25 05:01:01 +00:00
nethack.rankin
151dcad8fa hangup revamp (trunk only)
[See cvs log for src/cmd.c for more complete description.]

     This turns clearlocks() into a no-op during the period when the UNIX
port is asking the user to confirm whether to overwrite an existing game.
Also, this removes the duplication of code and function between hangup()
and end_of_input(), and it simplifies the check for whether hangups are
supported by adding new macro HANGUPHANDLING.  (I don't think global.h is
the best place to be defining that but I couldn't figure out where else
it would fit, other than repeating for individual xxxconf.h files.)  And
adds a couple more done_hup checks to try to cope with situations where
rhack() is being bypassed.  Lastly, having readchar() return EOF was
ignored for non-UNIX configs; now everybody gets ESC instead of letting
EOF be seen further inside the core.
2007-01-16 04:54:38 +00:00
nethack.rankin
187b8dec9f need hands to throw
From the newsgroup:  slash'em lychanthrope character could throw
while in wolf form.  That came straight from nethack; any animal capable
of manipulating an object--possibly with its mouth--could throw things.
Now hands are required.  This doesn't require free hands, although it
probably should; it's kind of tough to imagine making a competent throw
while your hands are stuck to a cursed two-handed weapon.
2007-01-11 05:15:33 +00:00
nethack.rankin
7c93acbaf8 shopkeeper/priest movement
From a bug report:  shopkeeper
wouldn't move to block his doorway if there was a grave at that location.
Nothing supernatural; shopkeeper and temple priest movement was too
specific about what sort of terrain might be present and didn't know that
room floor might be replaced by a grave.
2007-01-07 05:11:09 +00:00
nethack.rankin
15122d269c gold in menus fix (tty; GOLDOBJ for branch, both GOLDOBJ/!GOLDOBJ for trunk)
A recent change to force gold in inventory (during multi-item Drop or
applying/looting containers) to have '$' for its inventory letter for the
!GOLDOBJ configuration has revealed a bug which 3.4.3 has for the GOLDOBJ
configuration.  Specifying a count followed by '$' to use a subset of
carried gold didn't work under tty; the $ was treated as a group accelator
and overrode the count, so full stack was always used.  (The code a few
lines above this which counts the occurrences of group accelators already
includes this same fix:  ignore an item's group accelator when it matches
the selector.)

     I wouldn't be surprised if other interfaces are subject to the same
problem; since I can't test those I'm not attempting to fix them blindly.
2007-01-06 04:39:49 +00:00
nethack.rankin
448b7cc7b6 streamlined container interface (trunk only)
Reduce the number of questions issued when applying or looting a
container, and offer the opportunity to put things inside before taking
things out.  Instead of "Do you want to take something out?  [:ynq]",
followed by "Do you want to put something in? [ynq]", this gives just one
prompt; the result is similar to menustyle:full where you start out by
choosing between out, in, and both.  There are now two additional choices:
reversed, for both in the opposite order, and stash, to put a single item
inside.  Prompt phrasing is rather clumsy; I wanted to keep it short:
"Do what with <the container>? [:oibrsq or ?]", where picking '?' pops
up a brief help window.  Inappropriate choices (like 'o'and 'b' when
container is empty) are suppressed from the prompt but still acceptable as
input; " or ?" is suppressed if the cmdassist option has been toggled off,
but entering '?' still works to get help.

     Menu mode wouldn't allow 'b' when inventory was empty, despite the
fact that first taking things out might change that.  Now 'b' is a viable
choice if the container isn't empty, and the new 'r' is a vialble choice
when inventory isn't empty even if the container is.
2007-01-04 06:15:25 +00:00
nethack.rankin
c45ce7a999 container groundwork / splitting welded weapons (trunk only)
Some miscellaneous changes preparatory to enhancing the container
interface.  This also fixes a minor inconsistency in object manipulation:
askchain() wouldn't let you split a stack of welded weapons but getobj()
would, so you couldn't get rid of part of the stack using 'D' or #loot,
but you could with 'd' (and post-3.4.3, with #adjust).  Now getobj() will
behave like askchain(); if you have 3 cursed daggers welded to your hand,
you won't be able to drop 1 or 2 of them anymore.
2007-01-04 05:46:14 +00:00
nethack.rankin
f411d303ea monster ranged attacks (trunk only)
Newsgroup posts mention "boulder forts" from time to time, where the
player surrounds the hero with boulders in order to prevent the majority
of monsters from being able to attack.  Since the hero can shoot or throw
or zap over/around/through boulders, monsters ought to be able to do so
too.  This makes the test for whether a monster is lined up properly for
its ranged attacks try harder when the original line-of-sight check fails.
If there aren't any terrain obstacles found, it allows a chance to attack
based on the number of locations in the path that contain any boulders.
Giants and any monster carrying a boulder-destroying wand of striking get
to ignore boulders, overriding the random chance.
2006-12-28 02:45:38 +00:00
nethack.rankin
f93b3837d8 statue trap activation
Make monsters created by statue trap activation start out awake and
hostile in addition to being unhidden.
2006-12-24 04:09:32 +00:00
nethack.rankin
e26d9ffee0 endgame trap fix
Someone in the newsgroup claims to have reported this in mid-October,
but he uses a fake address in news and maybe he did so with his mail too,
resulting it not being delivered.  Anyway, arming a land mine on the Plane
of Air, then setting it off, produced a pit in the air.  This fixes that
directly, in case someone manages to do it again, and it also prevents
land mines and bear traps from being armed in midair in the first place.
Ditto for Plane of Water; water/pool locations were already covered (can't
arm there), and the bubbles ought to be treated similarly to Plane of Air.

     When testing this, I managed to get a crash while restoring a saved
game.  I had worn a blindfold and armed a land mine on the water level
(with just the no-pit part of the patch in place), then saved.  When
restoring, I got a crash in restore_waterlevel() at one or the other of
these lines (traceback pointed at the first, but it has to have actually
been the second; an access violation from an address derived by applying
a small offset to a null pointer):
	ebubbles = b;
	b->next = (struct bubble *)0;
After that, I couldn't reproduce it with a wished-for trap and couldn't
stay in one place long enough again to successfully arm a trap object.
So there may be a nasty bug still present, perhaps now hidden by no longer
being able to create a new trap on that level.
2006-12-22 04:05:13 +00:00
nethack.rankin
fb07e9d06f boomerang path (trunk only)
Thrown boomerangs travelled in a clockwise path, appropriate for
left-handed throwing.  But nethack heroes are treated as right-handed by
the weapon wielding and shield wearing code, so make boomerangs travel
counterclockwise instead.  Switching is straightforward, in case we ever
implement user-specified or random handedness.
2006-12-21 04:03:33 +00:00
nethack.rankin
5ce14e99fc final? multi-shot throwing (trunk only)
Make worm teeth and crysknives be stackable.  Positively enchanting
a stack of multiple worm teeth produces a single crysknife, negatively
enchanting a stack of multiple crysknives produces a single worm tooth.
A dropped stack of N fixed crysknives has 90% of remaining N crysknives,
10% of becoming a stack of N worm teeth, rather than produce an average
of 0.9*N crysknives and 0.1*N worm teeth.  (The code which handles that
transformation operates on loose objects so cannot handle stack splitting
because it wouldn't have any idea of what to do with extra objects.)

     Terminate multi-shot volley throwing of boomerangs if one comes back
and isn't caught.  The sequence throw-catch-throw-catch is odd, but would
take a substantial amount of code and effort to be changed to the more
intuitive (for rapid volley throwing) throw-throw-catch-catch.  Even if
feasible, doing that for underused boomerangs would be a waste of effort.
2006-12-19 05:07:53 +00:00
nethack.rankin
124040bcb9 multi-shot bug
Reading the comments in the previous patch, I realized that keeping
the old behavior for monsters who are shooting multiple missiles was
leaving an obscure but potentially serious bug.  I haven't attempted to
trigger it but 3.4.3 is bound to be vulnerable.
2006-12-17 06:26:08 +00:00
nethack.rankin
212623962e multi-shot throwing for knives & spears (trunk only)
Make all stackable weapons capable of multi-shot volleys when thrown.
Affects knives, spears & javelins, and boomerangs; requires advanced skill
assignment (skilled:  1-2 missiles per throw, expert:  1-3 missiles) or
role-specific bonus (ranger class's general +1 bonus is the only one that
applies to any of these weapon types).  For monsters, prince-caste get 1-3
missiles and lord-caste get 1-2, as before, with fake player monsters now
also getting 1-2; those counts apply to all stackable weapons regardless
of whether the species or role ordinarily uses whatever is being thrown.

     Related changes:  monks now get a role-based +1 count for shuriken,
throwing 1-2 instead of just one (they're only allowed to achieve basic
skill so won't reach any higher volley count).  Monster monks and ninjas
get that too; ninjas now get the same for darts and they're guaranteed
weapons in starting inventory.  Also, fake player rogues now sometimes
get orcish daggers instead of short sword, providing a decent chance to
occasionally have Grimtooth be randomly generated on the Astral level.

     Potentially controversial:  wizards can still become expert in dagger
skill and receive the to-hit and damage bonuses for that when throwing as
well as when wielding, but the number of missiles for them has now been
reduced to 1-2 (in other words, going from skilled to expert no longer
improves the max count for the volley amount for wizard role).  They're
supposed to be spellcasters; being able to throw up to three +7 daggers
at a pop was a big temptation for resorting to brute force, particularly
since they'll already want highest dagger skill for wielding Magicbane.

     To do:  throwing multiple boomerangs either needs to behave as if
they're all in flight before the first returns, or else the volley needs
to be cut short if one comes back and isn't successfully caught.  The
latter is a lot easier to do but the former fits better with what multi-
shot volley is supposed to represent.  Another alternative is to change
them to no longer be stackable, then this sequencing issue goes away.

     To do too:  make worm teeth and crysknives become stackable like the
other knife-skill weapons.
2006-12-17 05:47:17 +00:00
nethack.rankin
54bbb38ee0 merge javelin and spear skills (trunk only)
Part of "multi-shot throwing proposal" last January.  Unfortunately
some of the bits that I had implemented back then have vanished, so I'm
doing it over from scratch.  There were three main parts:
1) allow multi-shot volley throwing for all stackable weapons (affects
   knives, javelins, spears, and boomerangs; other weapons either don't
   stack or are already multi-shot);
2) make worm teeth and crysknives be stackable like ordinary knives;
3) merge spear and javelin skills, so that allocating skill points to
   their use becomes more attractive and they might get used more.
This patch only does #3.

     Since the monk skill set shrinks by more than any of the other roles,
I bumped max skill for escape spells (haste self, invisibility, jumping,
levitation, and teleport away) from basic to skilled; that's the only
skill adjustment included here.  For the couple of roles had different
max values for spear and javelin skill; this keeps the higher of the two.
2006-12-15 04:54:22 +00:00
nethack.rankin
1c70b6f777 engraving vs drawbridge
From the newsgroup:  ``Something is engraved here on the water.''
An engraving written on a lowered drawbridge would be transfered to the
underlying terrain when the bridge was raised.  The coverse was also true;
if you plugged the moat and then engraved on the ground, that engraving
would remain visible--and touchable if blind--when the bridge was lowered
to cover its spot.  Rather than try to handle two different engravings at
the same coordinates (with one of those two changing locations when the
bridge is raised or lowered), this just wipes out any engraving at both
span and portcullis locations whenever the bridge state changes, like is
done for traps.
2006-12-15 03:11:14 +00:00
nethack.rankin
f16db6f5f6 tty_askname() fix [#if UNIX || VMS]
Typing a response at the "Who are you?" prompt didn't allow digits in
the character's name under Unix and VMS; something like "arc15" came out
as "arc__".  This allows them to be used anywhere except for the first
character.  "arc15" now works; "15arc" ends up as "_5arc" so that there
still won't be a leading digit abutting the uid value when they're joined
to form the save file name.
2006-12-12 05:15:07 +00:00
nethack.rankin
a00a69ba26 crossbow range and rate (trunk only)
From a bug report:
crossbow shot range shouldn't depend upon strength.  Make it fire for a
distance of BOLT_LIM regardless of whether if would have gone shorter or
longer by using the normal ranged calucations.  However, strength is
necessary to load crossbows, so make characters with low strength be less
capable of launching multi-shot volleys.
2006-12-09 02:39:34 +00:00
nethack.rankin
1505e3e7d7 sacrificing tune-up (trunk only)
There was code to give feedback if you attempted to offer the Amulet
on a regular altar instead of the final high altar, but that code was
unreachable; getobj() yielded "that's a silly thing" whenever you picked
an amulet while not on the Astral (or recently changed, Sanctum) level.
This allows you to try to offer the real or fake Amulet of Yendor on any
altar, but they'll only be listed as likely candidates when on the Astral
level.  Conversely, it no longer lists carried corpses as likely candidates
at the Astral high altars; they're still acceptable but not what the hero
is supposed to be fiddling with there.  Also, allow corpses on the floor
to be offered on high altars, fixing a complaint we've gotten a few times
over the years.  (Unfortunately there's no way to suppress them as likely
candidates on the high altars while still allowing them to be sacrified.)
2006-12-08 04:44:25 +00:00
nethack.rankin
79ced450e7 engraving in inaccessible locations
Also from the newsgroup (2nd from "Three bugfixes for Xorns" [I got
the subject wrong on the previous spell of protection patch]):  when
phazing through walls or rock you could engrave as if it was ordinary
floor.  Again I didn't use the user's patch; it left closed doors, raised
drawbridge, and iron bars as locations where engraving was still feasible
and said "you can't write in solid rock" even if you were inside a tree.
[The 3rd of "3 xorn fixes" was for misleading feedback when attempting to
engrave while underwater; we've already fixed that one.]

     There was a suggestion that you should be able to engrave within solid
rock if you use a wand of digging, and that seems like a pretty good idea,
but the check for location comes before the check for writing instrument so
would be tricky to implement.
2006-12-07 06:28:16 +00:00
nethack.rankin
a29b06ac2f spell of protection feedback
From the newsgroup (subject: "3 xorn fixes"):  casting spell of
protection would report "the air around you begins to shimmer" even when
you were embedded in rock or swallowed.  It included a pointer to a patch;
I looked at that but ended up not using it.
2006-12-07 05:27:18 +00:00
nethack.rankin
1bb8545563 endgame: high altars, offering the Amulet to Moloch (trunk only)
Several small related changes that ended up being not quite so small:

     Allow the Amulet of Yendor to be offered on the altar in the temple
of Moloch's Sanctum level; doing so is fatal.  Fake ones can be offered
too, but that doesn't do anything special (they act the same as they do in
the temples on the Astral level).  Unlike in the endgame, the Amulet and
its fakes aren't listed as likely candidate for #offer's pick-an-object
prompt; like the endgame, corpses must be carried rather than being on
the altar in order to be sacrificed.

     Prevent non-chaotics from destroying the chaotic high altar on the
Astral level via same-race sacrifice.  From a bug report.  (Chaotics converting non-chaotic high altars
via same method was already handled.  I think the behavior for ordinary
altars if wrong here; why should a chaotic altar be destroyed this way?)

     Prevent demon princes and demon lords from being summoned in the
endgame.  Lesser demons answer instead.  Mostly prevents Yeenoghu from
being summoned by a chaotic who performs same-race sacrified on the
chaotic high altar, but might affect the Wizard and arch-liches too.

     Identify (via ':', ';', '/') altars in temples on the Astral and
Sanctum levels as "high altars" rather than just as "altars".  '/' and ';'
commands now work on those when you're adjacent, like they do when used on
adjacent high priests; from farther away, the altars' alignment is still
suppressed.
2006-12-05 03:09:13 +00:00
nethack.rankin
cbd61ce625 poly'd quantum mechanic feedback
From a bug report:  if swallowed and blind
and in quantum mechanic form, hitting the engulfer would yield "the <mon>
disappears" even though you were still swallowed by <mon>.  The pre-teleport
criteria for whether you knew the target was there were different from the
post-teleport ones.  Make them match; swallower will remain sensed by touch
and won't be described as disappearing.
2006-12-03 03:05:46 +00:00
nethack.rankin
b99f8a0ebb stone-to-flesh on corpse-wielding golem (trunk only)
A couple of months ago Michael forwarded a thread from the newsgroup
about how wielding a cockatrice corpse without gloves while polymorphed
into something capable of that would leave you wielding that corpse
bare-handed if you changed form, turned to stone, then got life-saved.
That got fixed; the corpse becomes unwielded.  However, one of the
messages in that described a different bug:  if you were wielding such a
corpse as a stone golem and cast stone-to-flesh at yourself, you would
continue to wield it bare-handed as a flesh golem.  This makes you revert
back to stone golem once the first transformation has finished.

     This also fixes an attribute exercising bug in polymon().  It was
being done after the polymorph was completed, so the attempt to exercise
Con didn't do anything because exercise() of anything other than Wis has
no effect when the hero is polymorphed.
2006-12-02 04:44:56 +00:00
nethack.rankin
5a9b766e74 lava, slime, bones
From a bug report:  entering lava cures sliming,
but if you got [re-]afflicted by green slime after becoming stuck in lava,
#sit failed to cure it.  Fix that, and have sinking farther into lava cure
it too (although not necessarily right away).

     Also, suppress leaving the corpse in a bones file for death caused by
being dissolved in lava.  Lastly, suppress the "you rise from the dead as
a <monster>" message during bones creation when the game ends due to being
turned into green slime since you transformed rather than died (and sliming
timeout gives "you have become green slime" just prior to that).
2006-12-01 07:38:18 +00:00
nethack.rankin
58a9bcf893 moveloop() vs lava
Something's wrong with the way lava was being handled in moveloop().
If you were trapped in lava (ie, moved into some but didn't die on the
spot thanks to fire resistance), you could sink and ultimately die without
ever taking another actual turn (typing ``i<space>'' repeatedly is an easy
way to reproduce).  [`didmove' was only being checked for the sinking
deeper case and not for the decrement which ultimately leads to the fully
sunk case.]  On the other hand, if you could manage to start an occupation
and avoid being interrupted, you would never sink while it was in progress.
[Lava handling followed ``if (multi && occupation) { ...; continue; }''.]

     While testing some other code (lava vs slime, coming shortly) I ended
up with the cursor sitting on the status line while the game was waiting
for me to enter my next move.  I don't really understand what's going on
there, and moving the lava handling before bot() might have hidden that
particular problem now by changing the point at which Slime will get taken
off the status line, but this attempts to fix it anyway.
2006-12-01 06:42:25 +00:00
nethack.rankin
17f8482e73 dipping and greasing (trunk only)
From a bug report:  you
can dip a worn item such as shirt or suit into a potion of polymorph and
it will become unworn--but as of a couple of days ago, unworn only if the
transformed object's new form can't be worn in the same slot--even if it
is covered by a cursed worn item (suit or cloak).  It didn't seem like
trying to fix that special case would be very worthwhile; this fixes the
more general situation of "you could dip worn items even though they were
covered up by other worn items".

     In the same report:  you could apply grease to rings while wearing
cursed gloves.  The code already prevented greasing a suit when it was
covered by a cloak (regardless of whether that cloak was cursed), and a
shirt when it was covered by a suit or cloak or both.  This moves that
code into a separate routine which is used for dipping as well as for
applying grease, and now handles rings vs gloves.

     Since covered rings, shirt, or suit are no longer eligible to be
dipped or greased, this also makes "?" for the pick-an-item prompt leave
such things out of the list of likely candidates.
2006-11-30 05:54:47 +00:00
nethack.rankin
e80970dccf north-south drawbridge
From a bug report:  zapping a wand of striking or locking or spell of
force bolt or wizard lock up or down when standing at an open drawbridge's
portcullis didn't affect the bridge if the portcullis was positioned north
of the open span.  One of the two drawbridges on the Valkyrie quest goal
level has that orientation.  is_drawbridge_wall()'s name is somewhat
misleading; it isn't boolean and returns -1 rather than 0 for "no".
2006-11-30 02:18:49 +00:00
nethack.rankin
8d86a87a7b polymorphing worn items (trunk only)
From a bug report.  That's hard to fix in the general case because armor
and tools might not fit back into the same equipment slot, but most other
types of worn items can be re-worn after being transformed.  This makes
any transformed worn item stay worn if it is wearable in the same slot.
2006-11-28 05:06:13 +00:00
nethack.rankin
95729beb4a inappropriate resistances
Noticed when examining resists_magm() while working on anti-magic
traps:  if you were polymorphed, you would be granted magic resistance by
keeping a cloak of same or gray dragon scales/mail in your quiver slot,
your alternate weapon slot, or main weapon slot (ie, by wielding it).  And
you obtained light-based blindness resistance regardless of whether you
were polymorphed if you carried a potion of blindness in any of those slots.
2006-11-25 04:57:33 +00:00
nethack.rankin
23e1970db3 anti-magic trap (trunk only)
Make anti-magic fields do something against targets which have magic
resistance, expanding the functionality of that trap type and giving a
minor drawback to the most valuable intrinsic in the game.  Make them work
against monsters too.

     Heroes who lack magic resistance lose spell energy as before, except
that if they drop below 0 they don't take as hard a hit against max spell
energy as they used to.  Monsters with spell or breath attack and lacking
magic resistance get their ability-last-used field bumped up a little bit,
so they can't cast or breathe for a few turns.  Heroes and monsters who
have magic resistance take HP damage instead.  I retained the concept of
feeling lethargic when being hit by something which normally drains enery,
and also tried to make it be the inverse of a "magical explosion":  the
message refers to torpor/lethargy/sluggishness and cause of death if the
damage happens to be fatal is "anti-magic implosion".  The latter suggests
some sort of compression, so creatures who can pass through walls (xorns
and ghosts) have been given partial resistance and take reduced damage.
2006-11-25 02:29:39 +00:00
nethack.rankin
f834fdbdd0 more Riders (trunk only)
If a Rider's corpse revival timer ends with failure (presumeably
because the level has become entirely filled with monsters), give it a big
chance to try again in a few turns instead of always rotting the corpse
away.  Also, if there is another monster standing on the corpse when it's
due to revive, try to bump that monster out of the way to let the Rider
revive in place instead of having it be diverted to some other location.
2006-11-23 04:17:48 +00:00
nethack.rankin
dd4f4efb59 Rider strengthening
High resistance made the Riders unlikely to be polymorphed, but
they were susceptible to being turned into green slime (and then never
reviving if killed in that state).  Now they'll be immune to both types
of transformation.
2006-11-23 03:32:53 +00:00