Commit Graph

901 Commits

Author SHA1 Message Date
Pasi Kallinen
c8e781c418 Add menucolors
-Add a boolean option menucolors to toggle menu color
-Add MENUCOLOR -config file option

TODO:
-Better support for win32
-Support more windowports
-Update Guidebook
-Allow changing menucolor lines in-game
2015-04-02 20:16:25 +03:00
Pasi Kallinen
884d9d4be5 Record in xlogfile if any bones were loaded 2015-04-02 13:06:45 +03:00
Pasi Kallinen
fa4dda377d Move isqrt into hacklib, other minor fixage 2015-04-01 16:38:56 +03:00
Pasi Kallinen
323b8b4038 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
Conflicts:
	src/trap.c
	sys/winnt/Makefile.msc
2015-04-01 16:09:53 +03:00
Pasi Kallinen
ca80675d59 Allow admin to disable explore mode
Some public servers want to disable explore mode, so
make it configurable in sysconf.
2015-03-31 18:14:16 +03:00
PatR
f0eae55d34 add .gitignore entries: tile.h, NetHack.ad
Add a couple of missing .gitignore entries for files put into
place when building.  include/tile.h is genearated for tiles
and dat/NetHack.ad is copied for X11 resource definitions.
2015-03-31 00:18:00 -07:00
Pasi Kallinen
84a067a016 Options to create the character blind or nudist
For those pro players who really want to try their hand
at that zen samurai, without needing to reroll thousands
of times to start with blindfold.  Nudist starts without
any armor, and keeps tabs whether you wore any during
the game, for even more bragging rights.

Also makes the Book of the Dead readable even while
blind, for obvious reasons.
2015-03-30 22:12:54 +03:00
Pasi Kallinen
411ee58593 Add more explicit helpless reasons
Instead of just "while helpless", the death reason will tell
more explicitly why the player was helpless.  For example:
"while frozen by a monster's gaze"
2015-03-29 22:12:19 +03:00
Pasi Kallinen
1e49567937 Use dark gray color for black glyphs in TTY
This is Michael Deutschmann's use_darkgray -patch.
Adds a boolean option use_darkgray, settable in config file.

This patch has been in use on NAO for years, and I have heard
once someone say their terminal didn't support the dark gray
color.
2015-03-29 15:51:11 +03:00
nhmall
c035402c14 flavor enhance zap downwards/upwards when hiding
Changes to be committed:
	modified:   doc/fixes35.0
	modified:   include/extern.h
	modified:   src/apply.c
	modified:   src/zap.c

    On 3/23/2015 6:41 PM, a bug reporter wrote:
    > When you're hiding under an item (e.g. via garter snake polyform), and
    > that item gets polyshuddered into nonexistence, you continue hiding
    > (under nothing).
    This was addressed previously.

    > (Incidentally, it's a bit weird that you use > to aim at items that are
    > flavorwise above you at the time.)

    This addresses the flavorwise concern.
2015-03-28 11:20:44 -04:00
Pasi Kallinen
2fce0074b3 Show legal polearm hit positions
User can press $ to display valid positions when asked
for a position to pick, and the positions will be hilighted
2015-03-28 13:32:24 +02:00
Pasi Kallinen
5bb4a02ffe Remember position of monster you hit with polearm
If you hit a monster with a polearm, following polearm applications
will try to automatically suggest the monster's position
2015-03-27 23:34:13 +02:00
Pasi Kallinen
870b124f14 Allow reading many more items
You can now also read alchemy smocks, credit cards, cans of grease,
magic markers, gold, the Orb of Fate, and candy bars.
2015-03-27 21:04:18 +02:00
Pasi Kallinen
2e2d020a59 Show t-shirt text at end of game inventory disclose
Restricting the text display only to the end of game disclose,
so it doesn't clutter the inventory during gameplay and so that
the readability of t-shirts is not given away.
2015-03-27 16:08:06 +02:00
Pasi Kallinen
f41c51aef0 Show object symbols in menu headings
... in menus where those object symbols act as menu accelerators.
Toggleable via "menu_objsyms" boolean option, defaults to off.
2015-03-25 22:13:28 +02:00
Pasi Kallinen
d787f45dcb Add an option to give feedback when bumping walls
Boolean option "mention_walls", defaults to off.
Useful for blind players.
2015-03-24 22:01:29 +02:00
Pasi Kallinen
2d6f9686a7 Merge branch 'paxed-new_lev_comp' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
Conflicts:
	include/obj.h
	include/patchlevel.h
	src/topten.c
	src/trap.c
	sys/winnt/Makefile.msc
2015-03-24 19:59:40 +02:00
Pasi Kallinen
0a9248c7f1 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
Conflicts:
	doc/fixes35.0
	include/extern.h
	include/ntconf.h
	include/obj.h
	include/patchlevel.h
	src/dig.c
	src/do.c
	src/files.c
	src/fountain.c
	src/mklev.c
	src/objnam.c
	src/options.c
	src/potion.c
	src/rumors.c
	src/save.c
	src/topten.c
	src/trap.c
	src/wield.c
	sys/share/pcmain.c
	sys/unix/unixmain.c
	sys/winnt/Makefile.msc
	util/lev_main.c
	util/makedefs.c
2015-03-24 19:46:38 +02:00
nhmall
74c5f489ae adjust PREFIXES_IN_USE for SYSCF 2015-03-22 11:11:41 -04:00
nhmall
c3c968f87c options and config file handling
With SYSCF, the SYSCF_FILE name was overwriting the
default config file name making it unavailable for
subsequent user config file options handling.

- Keep the name of the last config file successfully opened.
- Do it without orphaning the default config file name needed
  for the next pass.
2015-03-22 10:44:36 -04:00
nhmall
41ac4aef92 fix SYSCF so that things build when first defined
Things won't build for ports that first
define SYSCF.

This moves assure_syscf_file() from unixmain.c
to files.c and adjusts extern.h to get it
out from under #ifdef UNIX.

The call to assure_syscf_file() in options.c was
only #ifdef SYSCF, SYSCF_FILE and not UNIX,
so new ports #defining SYSCF would get an erro.

assure_syscf_file() will be utilized by mswin
when SYSCF is defined.
2015-03-21 15:38:31 -04:00
Pasi Kallinen
2649cb385c Merge branch 'master' into paxed-new_lev_comp
Conflicts:
	.gitignore
	doc/fixes35.0
	include/obj.h
	include/patchlevel.h
	src/dig.c
	src/mklev.c
	src/rumors.c
	src/save.c
	src/topten.c
	src/trap.c
	sys/winnt/Makefile.msc
	util/makedefs.c
	win/win32/levstuff.mak
2015-03-21 19:39:48 +02:00
nhmall
e3eb74166f obj change to support some upcoming work
This is an enabling patch for upcoming work. It breaks
save/bones so editlevel is incremented.

I'd like to a second overloadable int field in struct obj,
instead of just the one that is typically overloaded - corpsenm.

The second one can be used for things that are being tallied
up as opposed to a static one time assignment for reference/linkage
purposes.

The differentiation will allow both uses to co-exist for the
same object.
2015-03-21 10:46:11 -04:00
Pasi Kallinen
2ec4ff0b8c Fix C343-108 (e- leaves prompt on screen)
You'll get "You mime eating something."
2015-03-20 19:25:24 +02:00
Derek S. Ray
7f03ee4216 Changes for Win32; update precompiled files
Also fix Orctown probabilities; fixed support for snprintf;
update Win32 makefile to allow level compiler use

Conflicts:
	win/win32/levstuff.mak
2015-03-20 15:14:31 +02:00
Pasi Kallinen
3cc3709d95 Save xlogfile time_t fields correctly 2015-03-19 17:41:14 +02:00
Pasi Kallinen
debdf7ca48 Move some hard-coded string arrays into data files.
Random epitaphs, engravings and hallucinatory monsters now
live in text data files.
2015-03-18 22:05:10 +02:00
Pasi Kallinen
27add21e7e Merge branch 'paxed-xlogfile' 2015-03-18 18:57:52 +02:00
Pasi Kallinen
56699486a0 Catch up with post-343 lev_comp changes
- Iced pools vs. iced moats
- allow making map outer edges nonpasswall & nondiggable,
  so eg. xorns cannot be teleported there
2015-03-17 18:57:39 +02:00
Pasi Kallinen
c9d5bb9d68 Fix some level flags, sokoban premapping 2015-03-17 18:52:53 +02:00
Pasi Kallinen
47bb9abace New level compiler: code changes 2015-03-17 18:52:42 +02:00
PatR
d4467fc594 allow DEBUGFILES to be overridden via getenv()
If getenv("DEBUGFILES") yields a value then it takes precedence over
sysconf.DEBUGFILES or sys.c's #define DEBUGFILES.  (It probably should
only be controlled via environment since it is not a system-wide
attribute, but I haven't taken out the SYSCF handling for it.)
2015-03-17 18:47:38 +02:00
PatR
77dbb1080d free 'sysopt' strings upon termination 2015-03-17 18:47:36 +02:00
PatR
058299aa3a DEBUG/debugpline() fixup
* Replace variadic debugpline() with fixed argument debugpline0(str),
   debugpline1(fmt,arg), and so on so that C99 support isn't required;
 * showdebug() becomes a function rather than a macro and handles a
   bit more;
 * two debugpline() calls in light.c have been changed to impossible();
 * DEBUGFILES macro (in sys.c) can substitute for SYSCF's DEBUGFILES
   setting in !SYSCF configuration (I hope that's temporary).
2015-03-17 18:47:31 +02:00
nhmall
3e5d6bf68f catch up on half-physical damage docs
This is catching up on some things that were changed
in development years ago that Dave C. suggested be
documented.

For the record:
-The things that were evaluated and ruled out
are now documented in include/youprop.h so they don't
come up again.

- The things that were evaluated and deemed to be susceptible
to the intrinsic and thus led to a modification in the code
are listed below in this commit message.

Modifications:
- A crystal ball exploding on being applied
- Artifacts' blasting
- Being a fish out of water
- Being hit by Mjollnir on the return
- Being thwacked by an iron ball chained to you
- Boiling/freezing potions
- Broken wands
- Bumping head on ceiling by cursed levitation
- Burning (un)holy water
- Chest/door/tin traps
- Dipping a lit lamp into a potion of oil
- Exploding rings and wands (under all circumstances)
- Exploding spellbooks
- Falling downstairs
- Falling into a (spiked) pit
- Falling off or failing to mount a steed
- Falling on a sink while levitating
- Getting squished in a pit under a boulder
- Hitting your foot with a bullwhip
- Hitting yourself with your pick-axe
- Hooking yourself with a grappling hook
- iron-ball-pulling yourself out of a bear trap
- Jumping/Newton's-Thirding into something solid
- Kicking something that makes you go "Ouch!"
- Land mine explosion
- Sitting in a spiked pit
- Stinking cloud damage
- Thrown potion (bottle)
- Zapping yourself with a wand, horn or spell
- Jumping yourself out of a bear trap
2015-03-17 18:47:29 +02:00
Pasi Kallinen
232d4e69bb Death talks in CAPITAL LETTERS 2015-03-17 18:47:29 +02:00
Pasi Kallinen
73b944037a Fix warnings 2015-03-17 18:47:26 +02:00
Pasi Kallinen
36995448fb Add MAX_STATUENAME_RANK sysconf setting
MAX_STATUENAME_RANK tells how many score file entries to use
for random statue names.
2015-03-17 18:47:24 +02:00
Pasi Kallinen
770a92d259 Add boolean option "bones"
Setting bones off prevents saving and loading bones files.
2015-03-17 18:47:22 +02:00
Pasi Kallinen
c92c8ab9d1 Define for generic usernames which prompt for name
Instead of hard-coding the "play", "player", etc. usernames
which will prompt the user for their name, allow defining
the names in config.h
2015-03-17 18:47:19 +02:00
Pasi Kallinen
66a1f0ced4 Implement fcntl(2) file locking
If you run a server, then you know of the somewhat annoying perm_lock
errors that creep up, requiring your attention before anyone else can
start a game.

This patch properly implements fcntl(2) locking on systems that can
handle it (*nix systems), that results in the lock being automatically
released on program termination, whether abnormal or not.

Original patch by Drew Streib, update by Edoardo Spadolini
2015-03-17 18:47:17 +02:00
Pasi Kallinen
ff7230a159 Fix TTY crashing when a location has more than 32k items 2015-03-17 18:47:14 +02:00
Sean Hunt
b98fd27f9d Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
2015-03-17 18:47:10 +02:00
Sean Hunt
d58a9bb56e Fold get_wet() into water_damage().
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
2015-03-17 18:47:08 +02:00
Sean Hunt
cd83f7e802 Rename rust_dmg() to erode_obj(). 2015-03-17 18:47:07 +02:00
Sean Hunt
04a0331ccc Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-17 18:47:04 +02:00
Sean Hunt
4e05b9a1ec A lot more cleanup to rust and water. 2015-03-17 18:47:01 +02:00
Sean Hunt
5532600f1a Cover a couple of corner cases with rust_dmg(). 2015-03-17 18:47:00 +02:00
Sean Hunt
48b048f921 Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-17 18:46:58 +02:00
Sean Hunt
2b1820a67b Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should
probably be looked at at some point.
2015-03-17 18:46:57 +02:00