Commit Graph

3140 Commits

Author SHA1 Message Date
PatR
35cabe53bf wear/remove commands, P & R vs W & T
Allow 'P' and 'R' commands to accept armor and wear/take-off the chosen
item, and 'W' and 'T' commands to accept accessories and put-on/remove
the item.  The which-object prompt only lists the type(s) of items that
traditionally go with each command, as does an inventory menu if the
user picks '?', but items of the alternate type(s) can be chosen, by
unshown letter or by the inventory menu given for '*'.

There shouldn't be much difference if you continue picking items that
go with the original commands, although you will somestimes get
"which object? [*]" when the only choices are for alternate command.
And you won't see the all-four-accessories-are-already-worn message
for 'P' unless you also have something worn in all seven armor slots.

The Guidebook.mn changes have been tested (that's how/why I noticed
the preface glitch) but the corresponding Guidebook.tex ones haven't.
2015-08-03 18:38:38 -07:00
Sean Hunt
ff823095ee Revert "Add tombstone tribute to S.T.P. for 3.6.0"
This reverts commit 64dfb4fcc8.
2015-08-03 12:56:32 -04:00
PatR
5e909d3b44 obj bypass: move vs turn
Reported by ais; clearing object bypass bits once per turn isn't often
enough.  Clear them after the hero moves (which might be more than once
in a turn) and before each monster moves (ditto) and after last monster
moves.  This might not be optimal but that shouldn't matter since it's
usually a no-op.
2015-08-02 01:54:51 -07:00
PatR
9034e2a7e5 W_WEAPON, W_ACCESSORY
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.
2015-07-25 19:19:58 -07:00
Sean Hunt
64dfb4fcc8 Add tombstone tribute to S.T.P. for 3.6.0
I've added build files for unices, but other platforms will need to define
NH360_DEDICATION on their own.
2015-07-19 12:42:23 -04:00
Sean Hunt
bda16a1703 A little bit more tribute.
Also clean up a pline->pline1 in the tribute code.
2015-07-19 12:34:25 -04:00
PatR
2b2ee0fbab formatting fixup (1 of 2)
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.
2015-07-12 19:35:06 -07:00
Pasi Kallinen
f05f716dbc 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.

Reported by both Boudewijn and Pat.
2015-07-10 16:17:04 +03:00
Pasi Kallinen
c1ef2e19df Fix more dark_room and nocolor
Fixes for example the case of searching while blind, as
reported by Boudewijn.
2015-07-10 16:04:04 +03:00
Pasi Kallinen
864fb1e203 Fix nocolor messing with dark_room on levelchange
As reported by Pat:
> After leaving a level and then returning, I'm seeing lit
> room squares as blank
> Options all have their default settings

OPTIONS=nocolor is the default; we should probably change this
sometime, because nearly everyone plays with color.
2015-07-10 15:49:33 +03:00
PatR
72303206fc questpgr: plural neuter pronoun
%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.
2015-07-10 01:00:07 -07:00
PatR
63736ba33b '/' enhancement
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....
2015-07-06 19:07:26 -07:00
PatR
fe09f7156d vampshifter messages
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.
2015-07-06 18:24:13 -07:00
PatR
c64036c97b \#overview quest feedback
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.
2015-07-04 20:06:31 -07:00
PatR
60de579757 another do.c formatting bit 2015-07-04 17:49:47 -07:00
PatR
b1d8ce0993 do.c formatting
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.
2015-07-04 17:07:41 -07:00
PatR
8f758cce25 boot weights
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).
2015-07-04 16:28:08 -07:00
Pasi Kallinen
fe073055b6 Comment typofix 2015-06-25 08:08:39 +03:00
nhmall
5df350d548 separate option to toggle hilite_pile
Beta tester report.

The use of use_inverse meant that you couldn't selectively
choose to hilite pets but not piles. Add its own option.
2015-06-22 15:51:43 -04:00
nhmall
3ba5def8f1 fix windows console bug reveals monster (console tty) 2015-06-22 15:06:00 -04:00
nhmall
735539461c Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-06-21 22:41:43 -04:00
Derek S. Ray
8798392e78 try not to miss ! marks 2015-06-21 20:59:17 -04:00
nhmall
993ea2e41f update beta #
I cut a new windows binary for one of the beta testers.
2015-06-21 15:51:40 -04:00
Derek S. Ray
2224df66f0 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.
2015-06-21 15:16:22 -04:00
Pasi Kallinen
866b5caee0 Text tombstone overflow and helpless
Betatesters noticed the death message could overflow the text tombstone,
because the helpless reason was also shown there.

So don't show the helpless at all in the tombstone.  The helpless is
still put in the record, logfile, and as a separate while-field in xlogfile.
2015-06-21 17:57:17 +03:00
nhmall
d07e92f882 Merge branch 'master' into win32-x64-working 2015-06-20 08:40:13 -04:00
Pasi Kallinen
c574df1239 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.
2015-06-20 14:15:08 +03:00
nhmall
cba799172f I'm also told "no quotation marks" in the books for Death
Changes to be committed:
	modified:   src/sounds.c
2015-06-19 17:47:38 -04:00
nhmall
5fb16cfe0f typos 2015-06-19 17:27:57 -04:00
nhmall
d167f86f1d I'm told Death is absent from two titles 2015-06-19 17:23:51 -04:00
nhmall
876b96c5ae I'm told that Death does not appear in two titles.
Changes to be committed:
	modified:   src/sounds.c
2015-06-19 17:17:40 -04:00
PatR
60e974e9f1 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.
2015-06-18 19:07:43 -07:00
nhmall
33b948e452 increment the beta version number 2015-06-18 19:17:29 -04:00
Pasi Kallinen
2094aa16ad 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.
2015-06-18 20:55:19 +03:00
Pasi Kallinen
6bbf7c9444 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.
2015-06-18 20:18:44 +03:00
nhmall
72a0841dbb Merge branch 'master' into win32-x64-working 2015-06-17 19:39:24 -04:00
PatR
da1ae4a7da 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.
2015-06-16 19:23:43 -07:00
nhmall
5dc0a5747a majority opinion on cppregex.cpp declaration 2015-06-16 21:45:59 -04:00
nhmall
2939a28aa1 avoid complaints regarding "and" placement 2015-06-16 21:37:12 -04:00
nhmall
833d308c7e Merge branch 'master' into win32-x64-working
Conflicts:
	include/flag.h
2015-06-16 06:34:05 -04:00
nhmall
b33c3381e6 update master's version of display.c
Incorporate a few pieces of in-progress code into master
so that it isn't left in an odd state, thus prompting
patches.
2015-06-16 06:23:28 -04:00
nhmall
fccf0e8c23 Merge branch 'master' into win32-x64-working
Conflicts:
	src/display.c
2015-06-16 05:59:07 -04:00
PatR
f6e46d286d another recent bit of lint 2015-06-16 02:42:17 -07:00
PatR
1547e676f3 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.
2015-06-16 02:29:22 -07:00
nhmall
666e4976b5 fix another logic error for nowin_buf read_tribute 2015-06-15 23:28:41 -04:00
nhmall
d196965397 logic bit
Fix a logic mistake in the nowin_buf scenario
of read_tribute.
2015-06-15 22:44:38 -04:00
nhmall
0353207f02 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.
2015-06-15 22:22:56 -04:00
PatR
710a8fb0e2 rising from the dead during panic
Prevent rising from the dead as a giant ant if the game panics during
initialization.
2015-06-15 15:47:47 -07:00
nhmall
5c6a849d2d Merge branch 'master' into win32-x64-working 2015-06-15 16:49:31 -04:00
PatR
29f9a8a33d #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.
2015-06-14 18:14:14 -07:00