I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.
The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
Change how overview data is handled if/when you get expelled from
the quest: mark quest levels as unreachable rather than discarding their
overview data, so that it can be included in end of game disclosure (and
can be revived if you manage to return to your quest branch by invoking
the W quest artifact).
Order of endgame levels was odd: earth followed by astral, water,
fire, and air, because the code didn't know how to insert in front of the
first one visited. Now it does. Placement of endgame levels was sub-
optimal: since that has the highest internal dungeon branch number, it
came out last. Now it is forced to come out first, so that it appears
above the dungeon. And use "Plane of Earth" for level name rather than
"Plane 1", and so on for the others, when in the endgame.
Since I'm bumping EDITLEVEL due to adding mapseen.flags.unreachable,
I am also inserting u.uevent.uvibrated now so that it won't trigger another
EDITLEVEL increment. At the moment it doesn't do anything except get set
when you receive the "you feel strange vibrations <under you>" message.
The level where that occurs will eventually have an automatic annotation
of some sort.
1) add graves to the dungeon features being tracked;
2) report on known bones (determined by seeing map spot(s) where previous
hero(es) died since there's no guarantee of graves or ghosts);
3) add automatic annotations for oracle, sokoban, bigroom, rogue level,
Ft.Ludios, castle, valley, and Moloch's sanctum. For bigroom and rogue
level you just need to visit that level, for the others you need to get
far enough along to learn something specific (oracle: her room, sokoban:
annotation is either "solved" or "unsolved" depending upon whether all
the holes and pits have been filled, fort and castle: see the drawbridge,
valley and sanctum: see inside the tended temple). Discovering the
relevant locations via magic mapping counts as "far enough along".
There should probably also be automatic annotations for Medusa and the
vibrating square but I'm not sure what criteria should be used for the
former or what phrasing to use for the latter. Demon lord/prince lairs fall
into similar category as Medusa.
TODO: add final #overview as an end of game disclosure option. (I was
planning this even before I saw that nitrohack has implemented it....)
Redo the $WIZKIT overflow handling from a few days ago. Instead of
having two migration codes which both mean "with the hero", combine them
and add a mask flag to control scattering at the destination to be able to
get the alternate behavior.
Wizard mode's $WIZKIT can specify an unlimited number of items to
add to starting inventory and they'd be put there without regard to the
number of slots in use, potentially resulting in an arbitrary number of
'#' slot items. Cap at 52 slots, same as when picking up, and put any
excess items at the hero's feet. It's slightly tricky because the level
hasn't been created yet at the time the wizkit gets processed.
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.)
Allow migrated objects to break on arrival. Added code to obj_delivery to
cause this, along with a flag to keep breakage from occurring. The new
flag isn't used yet, because all the current object migration involve
objects that were moving/dropping. To help make this change, rloco now
returns whether the object was placed or not, so caller can know if an obj
pointer is still valid or not.
Making the breakage messages for MIGR_NEAR_PLAYER objects show up after the
new level is displayed required some effort (rather than while the old level
was still displayed, which was confusing), due to the needs of goto_level.
- obj_delivery now has 2 passes, one for before player arrives, another after,
allowing the two cases to be treated differently
- goto_level calls obj_delivery twice (run_timers is not called twice,
since the run required before the level is displayed will have already run
any timers on migrating object)
- kill_genocided_monsters now kills eggs on the migrating_objs list too
> NetHack feedback form submitted by
> <email deleted>
> on Tuesday, September 9, 2003 at 06:41:34
> Hi, Just thought I'd point out a sort of inappropriate word
> choice or typo that I came across in Juiblex's Swamp. I got this
> message, after pushing a boulder into the swamp: There is a large
> splash as the boulder falls into the moat. Obviously it's a swamp
> and not a moat so that sounds a bit wrong. It says the same sort
> of thing when I #dip a scroll in the swamp as well.