Add macros W_WEAPON and W_ACCESSORY, similar to existing W_ARMOR, bitmask
of all the relevant worn bits. Just for code readability; there should
be no change in behavior.
Also, reformat the "ugly checks" portion of getobj(). Slightly better
readability and fewer continuation lines, but only a modest improvement.
I have several psssages for Maskerade too, but after the time and effort
spent fixing up the ones already present for that book, they'll have to
wait until some other occasion.
Replace instances of strings split across lines which rely on C89/C90
implicit concatenation of string literals to splice them together
with single strings that are outdented relative to the code that uses
them. It's uglier but it won't break compile for pre-ANSI compilers.
This covers many files in src/ that only have one or two such split
strings. There are several more files which have three or more. Those
will eventually be '(2 of 2)'.
Noticed along the way: the fake mail message/subject
Report bugs to devteam@nethack.org.
wasn't using its format string of "Report bugs to %s.", so would have
just shown our email address. Doesn't anybody enable fake mail anymore?
I modified that format to enclose the address within angle brackets and
made a similar change for the 'contact' choice of the '?' command.
Pasi Kallinen [Fri, 10 Jul 2015 13:17:01 +0000 (16:17 +0300)]
Fix dark_room glyphs when restored from save
If color or dark_room options were toggled during gameplay, and then
the game is saved and restored with different options, the dark room
glyphs were wrong.
%o[hij] relied on makesingular() converting "the Eyes of the Overworld"
into "the Eye of the Overworld" to recognize when it should use
they/them/their instead of it/it/its, but makesingular() was changed to
keep "eyes" intract instead of stripping the 's'. So qtext_pronoun()
needs to check for "Eyes" itself.
Add summary lines for the deliver-by-window messages of the Healer
quest. Also, replace a bunch of hard-coded pronouns for leader,
nemesis, and in one case, patron deity in the Healer messages plus
the three roles which precede it (Arc, Bar, Cav).
The breakfast+coffee+doughnut one is by the far the longest we've had,
but I decided not to try trimming any of it out. It was at the start
of a 10 page stretch that has six good passages, but I've only included
three of them.
I've got passages for two more books queued up, but transcribing and
proofreading is a chore....
Add new entries to the menu used for the '/' command: describe nearby
monsters, describe all shown monsters, describe nearby objects, and
describe all shown objects. It makes a text window listing monsters--
or objects--currently displayed on the map, showing lines of
X r,c monster-or-object description
where 'X' is symbol (monster or object class letter for tty), 'r,c' is
row and column separated by comma, and description is similar to what
using '/y' or ';' manually would provide (how-seen info is omitted
when listing monsters).
Originally intended for blind players using screen readers to describe
what is displayed, but will probably get used by other players too.
The map doesn't use a separate set of glyphs for objects which are the
tops of piles, so the information that there are additional objects
beneath the ones shown isn't available to '/' and ';'. That feels like
a bug to me....
If you've just received the "dead bat revives as a vampire" message,
suppress the rather obscure "Maybe not..." message given when an unseen
creature gets life-saved since it ends up being out of sequence. You
could get them both when the death/revival was sensed via telepathy
without being in sight.
Also, some formatting cleanup and a couple miscellaneous code tweaks.
Implement the requested feature to have an automatic annotation on the
dungeon level with the quest entry portal where you sense the leader
summoning you. It stays even after entering the portal (which results
in another automatic annotation of "portal to quest"), up until you
return to that level after having completed the quest.
Add a second one for the quest home level once the leader has given
you the go ahead to start the quest. After completing the quest that
one remains but its wording is changed.
This ought to haved incremented EDITLEVEL but I decided to risk leaving
current save files viable. That should work ok for anyone who isn't
overriding the default definition of Bitfield(), although odd behavior
could conceivably occur. New games have nothing to worry about.
Fix a couple of instances of a mis-indented block comment which happens
to be immediately preceded by an end-of-line comment. Change a couple of
| if (condition)
| something;
| else {
| other_stuff;
| }
to have braces around the 'then' part. Remove some gratuitous 'register'
declarations.
Make both pairs of iron boots weigh the same (kicking boots become
heavier). Make boots of water walking weigh the same as levitation
and elven boots (slightly lighter; 3/4 as much as speed, fumbling,
and mundane high boots).
Derek S. Ray [Sun, 21 Jun 2015 19:16:22 +0000 (15:16 -0400)]
Slight improvement to handless pets' pickup changes
Allow one item to be taken out of a pile, and leave framework in place
for partial splits so that all monsters will take up to their capacity,
rather than leaving the whole pile if it's too big to take all at once.
nhmall [Sat, 20 Jun 2015 12:50:32 +0000 (08:50 -0400)]
more pilemark and win32 changes
Changes to be committed:
modified: Files
deleted: sys/winnt/Makefile.bcc
modified: sys/winnt/Makefile.gcc
modified: win/win32/winMS.h
Since borland Makefile isn't operational, remove it for
this release as recommended.
Pasi Kallinen [Sat, 20 Jun 2015 11:15:02 +0000 (14:15 +0300)]
Prevent unique monsters waking up prematurely
Reported by Stefan:
> I just did the valkyrie quest. When I arrived on quest goal, I took only
> a few steps away from the upstairs and Lord Surtur jumped me. One of the
> monsters in his lair had stepped on one of the guaranteed squeaky boards
Squeaky boards (and other noisy things) woke up monsters that were
meditating. Unfortunately this also woke up such meditating monsters
as the Wiz, or the quest nemesis.
Prevent unique monsters with waiting strategy being woken up by the noise.
PatR [Fri, 19 Jun 2015 02:07:43 +0000 (19:07 -0700)]
reformat objects.c
Manually reformat objects.c so that it's a bit easier to work with,
prior to possibly modifying it. I wrote objects[] and obj_descr[].*
to files before and after and they were byte-for-byte identical, so
the revised objects.c hasn't introduced any changes. It was done
from scratch rather than reverting to the pre-clang-format edition.
There was nothing particularly wrong with the uniform spacing
produced by the automated reformat, but organizing things in columns
and/or controlling where the line splits occur make changes and
comparisons easier.
artilist.h and monst.c should probably be redone too, but I don't
think I going to get around to tackling them.
Pasi Kallinen [Thu, 18 Jun 2015 17:55:09 +0000 (20:55 +0300)]
Fix default boulder symbol
Previous boulder symbol fix unearthed another problem:
When no boulder symbol was defined in config file, the default
iflags.bouldersym null value was used as a symbol.
Pasi Kallinen [Thu, 18 Jun 2015 17:18:39 +0000 (20:18 +0300)]
Fix boulder symbol changing
Boulder symbol could not be changed in config file with
"SYMBOLS=S_boulder:0" because the glyph code was checking
iflags.bouldersym; that is only set if boulder symbol
is changed with the deprecated "OPTIONS=boulder:0" way.
Pasi Kallinen [Wed, 17 Jun 2015 10:43:59 +0000 (13:43 +0300)]
Lights are floaters
From Boudewijn:
> y a light (tame yellow light called Snertkat) [seen: normal vision,
> infravision]
> Snertkat deliberately jumps onto a polymorph trap!
PatR [Wed, 17 Jun 2015 02:23:43 +0000 (19:23 -0700)]
Make #tip at a location which has multiple containers honor menustyle
rather than always use a menu. Only affects menustyle:traditional and
can be overridden at the time by using the 'm' prefix before the #tip
command.
When using the menu, add an explicit pick-from-inventory choice. The
behavior there stays the same: ask about inventory if no floor container
is chosen.
PatR [Tue, 16 Jun 2015 09:29:22 +0000 (02:29 -0700)]
finish implementing pmatchregex
I started out cleaning up a bit of lint in the recent run-time options
handling and discovered that pmatchregex wasn't finished. Finish it and
also deal with the version lint. Argument declarations for function
definitions in pmatchregex.c have been switched to K&R style. (The ones
in posixregex.c have been left in ANSI style.)
There wasn't any build rule for pmatchregex.o; now there is (for Unix).
posixregex.o is still the default.
There isn't any build rule for cppregex.o (again, for Unix); the change
to cppregex.cpp is untested.
nhmall [Tue, 16 Jun 2015 02:22:56 +0000 (22:22 -0400)]
a couple more tribute easter eggs
Changes to be committed:
modified: include/context.h
modified: include/extern.h
modified: src/files.c
modified: src/invent.c
modified: src/sounds.c
modified: src/spell.c
Add a couple more tribute easter eggs.
- can lead to a remark by Death if you happen to have a pratchett book on
your person, as suggested by M. Stephenson (fat chance you will, or
think to #chat if you do, but it could be a tournament novelty or something
obscure to strive for).
- can draw some additional Death quotes from the tribute file. (There's two
in there right now. If anyone wants to add or suggest some more, please go
ahead. The Death quotes are at the end of the tribute file. One-liners
only please or the code will only pull the last line.
PatR [Tue, 16 Jun 2015 01:16:03 +0000 (18:16 -0700)]
tribute: Lords and Ladies
It's a lot of passages, even when leaving out ones about Cresote and
King Midas (or whatever name his Discworld analog has), Nanny Ogg's cat,
Ridcully's custom made wizard hat, and the mention of a law which
requires that bystanders be warned before commencing to play folk music.
PatR [Mon, 15 Jun 2015 01:14:14 +0000 (18:14 -0700)]
#overview, level difficulty
Three fixes, the first leading to the need to fix the second, and that
fix making dealing with the third be straightforward.
First, make the furthest level reached in any given branch be considered
interesting by #overview, even if no interesting features have been
encountered. This will result in listing Gnomish Mines and their first
level when someone goes down the stairs and immediately back up. It will
also produce a reminder of how far you've been--in each branch--after
retreating for any reason, without the need to manually add an annotation.
Second, #overview was suppressing the range of level numbers for Sokoban
because the author realized that the values were wrong. The record of
the furthest level reached was incorrect for builds-up branches, always
sticking with the deepest level even though it was the entrance. The
overview patch neglected to do the same suppression for Vlad's Tower and
the level range ("36 to 38" or similar) there was wrong. This fixes the
furthest level reached problem and also fixes #overview's level range
handling for builds-up branches.
Third and last, a long-standing issue which I don't think has ever been
formally reported: the level difficulty calculation used for monster
creation treated the upper (harder to get to) levels of builds-up branches
as if they were easier since they're closer to the surface as the gopher
burrows. So sokoban generated easier monsters on its final level than on
the ones leading up to that. Make depth for difficulty purposes account
for descent to the entrance and then ascent to the level of interest.
There was a distressing amount of trial and error involved. The dungeon
layout structures are not exactly easy to work with, and I never managed
to get builds_up() based on branch data to work correctly. Basing it on
dungeon data works as intended provided the branch has more than one
level, but it will yield incorrect result if we ever add a single-level
branch reached via stairs up rather than stairs down.
nhmall [Sun, 14 Jun 2015 22:33:32 +0000 (18:33 -0400)]
try to add pilemark support
Changes to be committed:
modified: Files
modified: sys/winnt/Makefile.msc
modified: win/win32/mhmap.c
new file: win/win32/pilemark.uu
modified: win/win32/resource.h
modified: win/win32/winMS.h
modified: win/win32/winhack.rc
Pasi Kallinen [Sun, 14 Jun 2015 07:40:20 +0000 (10:40 +0300)]
Shapechangers got a completely random form
mtmp->cham was NON_PM, which select_newcham_form interpreted as a completely
random form. This also resulted Vlad getting a random shape, and not getting
the Candelabrum, making the game unwinnable.
nhmall [Fri, 12 Jun 2015 23:23:18 +0000 (19:23 -0400)]
support for link-time option in #version
Changes to be committed:
modified: src/version.c
modified: sys/share/cppregex.cpp
modified: sys/share/pmatchregex.c
modified: sys/share/posixregex.c
modified: util/makedefs.c
Some options in 3.6.0 are determined by what you link with.
The choice of regex support is one.
Let #version show that linked option along with the compile-time options.