Commit Graph

3066 Commits

Author SHA1 Message Date
jwalz
eade95f3ea And another handful of submitted entries. 2006-05-03 23:01:02 +00:00
nethack.allison
a3b216e475 work around win32 rumor issues (#H80)
With makedefs changed to open the files as binary, the
rumors generation and retrieval seems to work consistently.

win32tty
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"

win32gui
T start=000067 (000043), end=020658 (0050b2), size=020591 (00506f)
F start=020658 (0050b2), end=043641 (00aa79), size=022983 (0059c7)
T 000067 A blindfold can be very useful if you're telepathic.
F 020658 "So when I die, the first thing I will see in heaven is a score list?"
2006-05-02 22:10:54 +00:00
nethack.allison
e80408bec2 wizrumorcheck update for trunk 2006-05-02 12:50:09 +00:00
nethack.allison
376f9ba047 debug mode #wizrumorcheck
Provide a command to easily verify that the rumor true/false
boundary offsets are correct for the rumors file.
If the boundary is pointing mid-line, the rumor at the boundary
won't decrypt properly.
2006-05-01 01:49:18 +00:00
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
3f401e10dc Yet more of the <email deleted> entries. 2006-04-29 23:13:18 +00:00
jwalz
0c8c38a04c And another batch from <email deleted> 2006-04-28 22:28:48 +00:00
jwalz
497dd4bea0 The next few from <email deleted> 2006-04-27 22:35:41 +00:00
jwalz
3d3aa36eda The next <email deleted> batch. 2006-04-26 23:02:25 +00:00
jwalz
f0a3911e62 Another batch from <email deleted>
And some space removal after I noticed some on incoming entries.
2006-04-25 20:46:31 +00:00
cohrs
c654fef3ff gcc compilation warning bits
some rather complex boolean operations needed more parentheses to avoid
warnings.  I think I put them in the right places.
A couple other items: naked assignments in if stmts, and an extra function decl
2006-04-25 04:08:22 +00:00
nethack.allison
3e2f7f946d fix W343-1 open win32 bug from known bugs page
W343-1 Redirecting score output through a pipe doesn't work.
2006-04-25 01:16:54 +00:00
jwalz
f0963e3fb6 Next batch from <email deleted> 2006-04-24 20:00:11 +00:00
jwalz
1c6e2c2d27 First batch from <email deleted> 2006-04-23 18:51:39 +00:00
jwalz
0a939c0e99 Update dungeoneers for data.base entries. 2006-04-23 17:22:46 +00:00
nethack.rankin
234fe26ab1 digging land mines sequel (trunk only)
Axes can't dig through the floor, but attempting to dig down with one
shouldn't just "scratch the floor" if there is an armed land mine present.
Have it set off a land mine or bear trap, in addition to the possibility
of chopping your way out of being stuck in a bear trap (a recent change).
2006-04-22 04:39:17 +00:00
nethack.rankin
0478af02b8 dungeon overview build fix 2006-04-22 04:22:08 +00:00
nethack.allison
660d3589c5 experimental - dungeon overview (trunk only)
Add Hojita Discordia's Dungeon Map overview as
conditional code for experimentation and testing.
Everything is guarded by
#ifdef DUNGEON_OVERVIEW
#endif

The notes that accompanied the original patch follow.

Dungeon Map Overview Patch for Nethack 3.4.3
Version 3
=============================================================================
Changelist:
    v3: Changed #level to #annotate to avoid #levelchange collision.  Fixed
        handling of elemental planes and astral plane (oops).  Changed
	formatting to be slightly closer to print_dungeon()'s.  Should be
	"final" version for 3.4.3.
    v2: Added tracking of trees.  Changed ctrl-m command to ctrl-o.  Portals
        displayed as "sealed" instead of "closed".
    v1: First release.
    (Note: all versions are mutually save compatible.)
=============================================================================
This patch creates a dungeon map overview that is recorded as the player
explores the dungeon.  I was tired of returning to a game a few days later
and having no idea what the dungeon looked like.  Trying to name pieces
of armor with shorthand didn't work so well as an intermediate solution
either, especially around nymphs.

It can be assumed that this map is in the mind of the hero and thus
can't be stolen, can be read when blind, or when buried, or when the hero
doesn't have any hands, or eyes, or hands free, or...etc. On the other hand,
this implies that the hero doesn't remember all of the details ("a fountain",
"some fountains", "many fountains") and that the map is subject to amnesia
when applicable.

This overview tracks fountains, altars, stores, temples, sinks, thrones,
trees, and dungeon branches.  It attempts to not spoil the player nor
reveal more information than the hero knows.  For this reason, it only
tracks dungeon features found in the guidebook and dungeon branches.

This patch breaks save file compatibility.  Sorry.

Added commands
=============================================================================
#overview (ctrl-o, if not in wizard mode) - displays overview
#annotate (ctrl-n, if using numpad) - names current level

Example Output From #overview
=============================================================================
The Dungeons of Doom: levels 1 to level 15
   Level 1:
      A fountain
   Level 3: (My stash.)
      An altar, some fountains
      Stairs down to The Gnomish Mines
   Level 7:
      Many fountains
   Level 8:
      Stairs up to Sokoban, level 7
   Level 15:
      A general store
      Sealed portal to The Quest
The Gnomish Mines: levels 4 to level 7
   Level 7: <- You are here
      Many stores, some fountains, a temple

More Details
=============================================================================
The overview shows only levels that have anything interesting to display and
doesn't show branches that don't have any interesting levels.

To avoid the map revealing more information than the hero knows, the overview
only displays things that the hero has seen or touched.  (If the hero
blinds herself, levitates above a known fountain, and obliterates it with a
wand of digging, the overview will still say that there is a fountain.)

This is done, sadly, by adding 6 bits to the rm struct to track the last
known dungeon type.  On the other hand, this change could potentially allow
a window port to do something like drawing an item and a fountain on the same
square.

Things That Could Be Better And Maybe Some Feedback Would Help
=============================================================================
"<- You Are Here" is pretty goofy
    -...but an indicator of some sort is nice.
=============================================================================
Many thanks to all the kind folks on r.g.r.n. who had very good feedback
about this patch, in particular L (for the trees), <Someone> Papaganou (for the
#annotate suggestion and some formatting feedback), and <Someone> (for the suggestion
of just overriding ctrl-o instead of using the very broken ctrl-m.)
=============================================================================
20060311. Hojita Discordia. (My usenet email is bogus. Sorry.)
2006-04-20 00:57:45 +00:00
nethack.allison
08d4a0c0fa comment bit (trunk only) 2006-04-20 00:50:37 +00:00
jwalz
2b391cddb0 Starting with a formatting sweep, including adding Pat's [] breaks. 2006-04-19 22:20:54 +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
857a46c295 another safe_oname() bit (trunk only) 2006-04-15 15:49:00 +00:00
nethack.allison
78ef9ef991 safe_oname (trunk only)
There were routines that were passed the
object name as an argument.  Before the oextra
patch, ONAME() always returned a valid pointer
to a location within the obj struct. The oextra
patch worked around those cases by
using a temporary variable that was either set
to ONAME (if the obj passed the has_oname() test),
or to ""  (pointer to an empty string) if no name was
present.

Since that might be a common thing to do, provide
the safe_oname() routine that you can use as a
function parameter without having to worry about
about whether ONAME(obj) is valid, and without
the need for the temporary variable.
2006-04-15 15:40:27 +00:00
nethack.allison
c16a87d367 increment editlevel
That last merge update should have included this.
2006-04-15 13:40:11 +00:00
nethack.allison
d156b95e0d oextra follow-up - merging (trunk only)
It seemed inappropriate to allocate and tack on an oextra
structure just to mark it as unmergable, and the oextra
struct itself wouldn't be released until a save/restore took
place.

This uses one of the freed up oattached bits to prevent the merge.
2006-04-15 13:37:58 +00:00
nethack.allison
e7948e258c oextra obj.h follow-up (trunk only)
Just add some notes to obj.h around oextra.
2006-04-15 13:09:57 +00:00
nethack.rankin
5501922aa8 omailcmd (trunk only)
The revised newmail() wouldn't compile (Strncpy doesn't exist, `buf'
was an array of pointers rather than of char).  Simplify it substantially,
and adjust the one caller (vms) that relied on the old convoluted bit.
2006-04-15 02:14:36 +00:00
nethack.allison
b76a0fe091 drum of earthquake follow-up 2006-04-14 17:01:18 +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
f9314448f7 hostile prisoner chat
<email deleted> wrote:
> * #chatting to hostile prisoners gives "This will teach you not to disturb me!"
> This only makes sense for djinn and water demons.

I don't have a clue what they should say, this only deals with
what they shouldn't say.
2006-04-14 15:26:45 +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
2c0a072ef1 main() reorganization (trunk only)
Move some internals-related code out of port-specific main so that
it isn't duplicated a bunch of times.  One minor side-effect of this
change is that if you auto-pickup something at the very start of a game,
it will happen after any full moon/new moon/Friday 13th message rather
than before.  There's a second change for some:  the shared main() used
by several of the micro ports had a small difference in game play--if you
saved a game while on an engraving, it would automatically be read when
you resume--that will now occur for everybody [Elbereth weenies rejoice!].
pcmain() was also calling update_inventory() at start of play.  That's
unnecessary for new games, where inventory initialization triggers a call
to it for each item added to your pack; but I wasn't sure about restored
games, so everybody gets it there now.

     The Mac and BeOS ports evidently haven't been touched it some time;
they still referenced flags.move which got replaced by context.move quite
a while back.  The Windows GUI code has a declaration for mswin_moveloop()
which appears to be non-existant, but I left it alone.  I assume that the
Qt interface uses the existing main() routines; at least I couldn't find
any start of game code specific to it.  vmsmain's revised main() is the
only one which has been tested.
2006-04-02 07:35:30 +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.allison
e063031f00 digging conjoined pits follow-up (trunk only)
Pat Rankin wrote:
>      Isn't an array of booleans overkill?  A single byte bitmap
> could achieve the same result.
2006-03-25 18:59:53 +00:00
nethack.rankin
a0156b9278 vms Makefile bit
Old copy/paste typo.  This alternate target obviously doesn't get much use.
2006-03-25 05:22:56 +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.rankin
8370782a13 chameleon/genocide fix (trunk only)
While testing some pending teleport changes, I was baffled by having
my adjacent pet sometimes vanish when accompanying me on a level teleport.
Tracing through parts of execution:  keepdogs() kept it; losedogs() called
mon_arrive() which called place_monster() for it, but then right after that
kill_genocided_monsters() removed it.  Turns out that `kill_cham' was left
uninitialized for the first iteration through the fmon loop (and pet had
always just been inserted as first entry of the fmon list).

     No fixes entry; this revises a post-3.4.3 revision.
2006-03-25 04:43:07 +00:00