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.
PatR [Fri, 12 Jun 2015 01:47:57 +0000 (18:47 -0700)]
role selection: priest/priestess' prompt
Change "Shall I pick your priest/priestess' race, gender, ..." prompt
to "... priest/priestess's ...".
Unfortunately that makes it long enough to push the cursor onto the
next line for basic 80 column display. If caveman/cavewoman's wasn't
already longer I think I would have left the clumsier phrasing/spelling.
PatR [Fri, 12 Jun 2015 01:19:09 +0000 (18:19 -0700)]
characteristics disclosure
Change end of game disclosure's display for strength, dexterity, &c to
always show the maximum possible value instead of only when the final
value was less than maximum. For both end of game and ^X, change the
description from "limit" to "innate limit" if the current value exceeds
limit due to worn items (gauntlets of power, +N ring of adornment, &c).
Alex Kompel [Thu, 11 Jun 2015 02:18:56 +0000 (19:18 -0700)]
win32_gui: flicker mitigation
- do not invalidate window area if tile has not actually changed
- do not erase backround when invalidating the tile
- use NO_GLYPH for uninitialized map areas (as opposed to -1)
PatR [Wed, 10 Jun 2015 23:23:19 +0000 (16:23 -0700)]
tribute passage 'summary'
When reading a passage from a tribute novel, put the final attribution
line "[$TITLE, by Terry Pratchett]" into message history, comparable to
the summary line for deliver-by-window quest messages.
PatR [Wed, 10 Jun 2015 07:54:07 +0000 (00:54 -0700)]
tribute: The Last Hero
Flesh out _The_Last_Hero_. Due to its publishing history (no ordinary
paperback, some lists of "other books by this author" miscategorize it
as being co-written by the illustrator) it's most likely not as widely
read as the other Discworld books.
nhmall [Wed, 10 Jun 2015 01:33:08 +0000 (21:33 -0400)]
default to original background
Changes to be committed:
modified: src/display.c
The work for getting this working fully is now moving to the background_tiles branch.
In master, we just return the standard lit room tile for now, no change in behavior.
No ports utilize the new parameter as yet.
Pasi Kallinen [Tue, 9 Jun 2015 13:54:44 +0000 (16:54 +0300)]
TTY: Hilight piles of objects
Add MG_OBJPILE flag, which windowports can use to check if a location
has more than one object stack. If use_inverse is on, TTY will use
inverse to show such piles. If a boulder is the topmost item on a pile,
then the object pile flag is not used; mainly because boulders are "solid",
boulders dropped by monsters are nearly always over other objects, and so
that special levels such a Sokoban can "hide" items under the boulders.
TODO: a "pilemark", analogous to "petmark", perhaps a green plus sign,
which can be used by windowports with tiles.
Tiles on tiled ports always looked odd on places like the plane of air
where the background color of the tile didn't match the general background
of the surrounding area.
3.6 made that even worse and more glaringly noticeable with the introduction
of darkened room tiles.
The code to actually send something useful through the new parameter
for window ports to take advantage if they want will follow.
PatR [Sat, 6 Jun 2015 06:37:02 +0000 (23:37 -0700)]
lookat again
Remove second 'alt_i' initialization, which was first in implementation.
Superseded by the preceding line, which came later. Works either way,
but the conditional initalization avoids the two extra loop iterations
when they're not useful.
PatR [Sat, 6 Jun 2015 03:19:18 +0000 (20:19 -0700)]
lookat issues for unknown/solid rock/dark room
Fix two things with the ';' and '/' commands, both for looking at blank
space. The list of possibilies included "a dark part of a room or the
dark part of a room" even though the code involved goes out of its way
to avoid redundant clauses. S_stone let dark part be prefixed by 'a',
S_room and S_darkroom forced it to be 'the' which is better phrasing
but outsmarted the redundancy check. Make S_stone's use of "dark part
of a room" force 'the' too.
That's trivial; this is more complicated: the new maze variations
exposed/aggravated an issue that's been there all along. In a non-
WALLIFIED maze, doing look-at on the solid stone in-place-of-wall
next to you reported "dark part of a room" which is clearly wrong when
you can tell it's not a room. (The same thing happens in any ordinary
corridor, but players rarely try to identify blank space next to them
it that circumstance so it hasn't mattered very much.) This change
results in look-at listing "unexplored" and "stone" as additional
possibilities when looking at blank spots. Final description will be
"unexplored" instead of dark room if you haven't seen the spot, "stone"
if you have and that's what it is, or "dark part of a room" otherwise.
PatR [Sat, 6 Jun 2015 01:18:19 +0000 (18:18 -0700)]
remove use of __FUNCTION__
The special level loader has been using __FUNCTION__ in error messages
for a few months now, but that is a gcc extension (evidently picked up
by other compilers since only Borland had an issue so far). The
standard way to do the same thing is with __func__, but that's C99 so
we should avoid it. (__FUNCTION__ came earlier; gcc supports both.)
This switches to convential C code to achieve the same effect, using
the name 'nhFunc' rather than __FUNCTION__:
void foo()
{
static const char nhFunc[] = "foo";
... code that might report problem in nhFunc ...
return;
}
This has only been added to the functions which actually reference it,
not a blanket intrusion into every routine. In special level loader's
case, the reference is hidden in the opvar_free() macro which is used
quite a lot.
At first I used a macro:
void foo()
{
#define nhFunc "foo"
... code that might report problem in nhFunc ...
return;
#undef nhFunc
}
but using an actual variable avoids duplicate copies of the function
name string when used more than once inside a given function, and it
can't accidentally carry over into the next function due to missing or
misspelled #undef.
If we someday switch alloc() to give more specific information than
__FILE__, the macro variation would be better since the function name
won't be used most of the time (ie, when MONITOR_HEAP isn't defined).