Commit Graph

955 Commits

Author SHA1 Message Date
Pasi Kallinen
5a42ce4040 Unify boulder dropping on player
... and if you're swallowed, make the dropped boulder hit the monster.
(Changes from UnNetHack)
2015-04-22 20:22:55 +03:00
Pasi Kallinen
ed164ad324 Fix typo in func decl 2015-04-22 13:24:51 +03:00
Pasi Kallinen
bd69677933 Unify stumbling on door mimic 2015-04-22 09:23:54 +03:00
Pasi Kallinen
75e7d837e6 Unify food-related conducts when eating a monster 2015-04-22 09:16:49 +03:00
Pasi Kallinen
6d4aa312e6 Unify hero free hand check and msg 2015-04-22 09:02:38 +03:00
Pasi Kallinen
171e8284cd Unify monster gender setting 2015-04-22 08:58:04 +03:00
Pasi Kallinen
3bf2d17e2c Unify iron ball unwielding 2015-04-22 08:53:13 +03:00
Pasi Kallinen
34d5a4c1f9 Unify file removed -trickery 2015-04-22 08:45:03 +03:00
Pasi Kallinen
2783157f95 Unify "You are rooted" message 2015-04-22 08:35:14 +03:00
Derek S. Ray
0bef94cfde Make coalescence message be smart about status
- honor blindness and hallucination
- honor ability to see one of the mergees
- provide audible feedback if appropriate
- merging inside pack gets special-cased so player knows something
  different/unusual is happening
2015-04-21 21:47:33 -04:00
Pasi Kallinen
c9bb75eaf3 Unify dropping boulder on monster 2015-04-21 22:40:27 +03:00
PatR
6cad21e4e8 tribute in-game bonus
Give 20 experience points the first time the hero reads a passage
from a tribute novel.  It's enough to go from level 1 to 2 or from
2 to 3.  By the time a book store is found, that's too trivial for
most to care about, but it's potentially useful to a pacifist.
2015-04-20 00:05:00 -07:00
nhmall
0fdcea70c6 suggested booktribute mods
Changes to be committed:
	modified:   include/extern.h
	modified:   src/files.c
	modified:   src/objects.c
	modified:   src/spell.c

- charge a little more.
- no free read in the bookstore.
2015-04-18 17:45:27 -04:00
Pasi Kallinen
8c41a962a7 Fix saving xlogfile realtime 2015-04-17 10:35:05 +03:00
Pasi Kallinen
647a072b62 Move triplicate defines into single place 2015-04-14 20:33:30 +03:00
Pasi Kallinen
cd3b0efe5d Unify description of hero's visage into single function 2015-04-14 19:41:44 +03:00
Pasi Kallinen
879f6d55c2 Add Auto open doors -patch 2015-04-13 21:11:44 +03:00
Pasi Kallinen
1c970b171e Some monsters can eat through iron bars
Any monster with rusting or corrosion attack can eat through
the bars. This includes rust monsters, grey oozes, and black puddings.

Original patch by Malcolm Ryan
2015-04-13 19:41:51 +03:00
Pasi Kallinen
6209d458f9 A camera may contain a picture-painting demon
Original patch by Leon Arnott
2015-04-13 18:54:24 +03:00
Pasi Kallinen
eba5bf7d5e Add litmus test
Original patch by Dylan O'Donnell
2015-04-13 18:30:53 +03:00
Sean Hunt
80aa109855 Use extern.h for regexes.
I was planning to do this anyway, but it created an include loop that
was breaking it on Windows.
2015-04-12 11:46:54 -04:00
Sean Hunt
b86ad06d6b Implement a new system-based matching harness.
The intent is to look for platform-specific facilities for regex
matching, to provide portable MENUCOLORS configuration files.

This is a prototype implementation being committed to see if Windows can
use the POSIX regex implementation provided with the C++11 standard
library. If this works, I will write a harness for POSIX regexes and for
pmatch(), and those can be linked in by platforms as appropriate.

pmatch() should be used only as a very last resort, because it breaks
compatibility between platforms.
2015-04-12 11:46:26 -04:00
nhmall
11560933cc Merge branch 'master' into nhmall-booktribute
Conflicts:
	doc/fixes35.0
	include/extern.h
	src/mkobj.c
	src/mon.c
	src/objnam.c
	win/share/objects.txt
2015-04-12 10:02:17 -04:00
PatR
5974ae5700 new pmatch variations
Add pmatchi() to perform case-insensitive wildcard matching, and
pmatchz() which is also case-insensitive and ignores spaces, dashes,
and underscores like the type of matching done during wish parsing.
At the moment, neither is being used, although DEBUGFILES handling
uses pmatch and needs to be taught to distinguish between case-
sensitive and case-insensitive filenames so will eventually use
pmatchi when appropriate.
2015-04-11 19:39:59 -07:00
Pasi Kallinen
eb77c57a6c Allow disabling savefile UID checking in sysconf 2015-04-11 21:07:57 +03:00
PatR
91fc8dc69c obj_nexto_xy lint 2015-04-10 18:31:11 -07:00
Derek S. Ray
9fc9a86d34 lock MENU_COLOR_REGEX away since it isn't Win32 yet 2015-04-10 17:08:31 -04:00
Derek S. Ray
32619fa8cc Merge branch 'master' into derek-farming
Reverse merge before final reintegration.

* master: (40 commits)
  Fix magic mapped dark room symbols
  Disclose extinct species alongside genocided ones
  ...

Conflicts:
	doc/fixes35.0
	src/do.c
	src/files.c
	src/invent.c
	src/objnam.c
	sys/share/pcmain.c
2015-04-10 16:56:30 -04:00
nhmall
7e098c0c4e Merge branch 'master' into nhmall-booktribute 2015-04-10 12:15:14 -04:00
PatR
71d7eff0a7 revisit variable arguments in new lev_comp
The previous USE_OLDARGS worked with gcc on Intel, but was inherently
unsafe.  This method is completely safe, just obnoxiously intrusive.
It you disliked debugpline*(), you're bound to hate this....
2015-04-10 01:39:55 -07:00
Sean Hunt
f523055746 Make WALLIFIED_MAZE into a level flag.
It should now be randomly disabled for a 3rd of Gehennom, to make things
a tad more interesting there. It's also disabled in Baalzebub's lair,
to make things a little more interesting.

Still don't know why the beetle is disappearing.
2015-04-09 13:27:44 -04:00
Pasi Kallinen
92a7962399 Add sortloot -patch
Adds the "sortloot" compound option, with possible values
of "none", "loot", or "full".  It controls the sorting of
item pickup lists for inventory and looting.
2015-04-09 18:23:54 +03:00
PatR
9072e80085 support pre-ansi varargs in new lev_comp
Remove the requirement for <stdarg.h> that was introduced to lev_comp.
USE_STDARG still works.  USE_OLDARGS required hackery but has been
tested and actually works, although I wouldn't trust it on platforms
where 'long' and 'char *' aren't the same size.  USE_VARARGS didn't
require any hackery--aside from the conversion to core's pline code--
but has not been tested:  <varargs.h> supplied with OSX won't compile,
with an #error directive that basically says "switch to <stdarg.h>".

I changed several printf formats of %i and %li to %d and %ld because
I'm not sure how widespread the 'i' variant was back in days of yore.
[TODO:  avoid use of snprintf since pre-ANSI systems won't have it.]
2015-04-09 03:09:00 -07:00
Pasi Kallinen
c967dabc0b Clive Crous' Dark Room patch
This patch adds a new glyph that represents dark parts of room,
splitting the dual functionality of the "unexplored/dark area" glyph.
2015-04-07 21:01:21 +03:00
Pasi Kallinen
1c2f2af357 Indicator glyph for good target positions
Add a new glyph, S_goodpos, to indicate valid locations
instead of reusing the camera flash beam glyph.
2015-04-07 18:18:54 +03:00
nhmall
06227ec0d3 Merge branch 'master' into nhmall-booktribute 2015-04-06 17:47:11 -04:00
nhmall
3d6fabf730 nhclose
Changes to be committed:
	modified:   include/extern.h
	modified:   src/bones.c
	modified:   src/do.c
	modified:   src/files.c
	modified:   src/music.c
	modified:   src/restore.c
	modified:   src/save.c
	modified:   sys/share/pcmain.c
	modified:   sys/share/pcsys.c
	modified:   sys/share/pcunix.c

In order to get level file locking correctly again post 3.4.3
with the newer compilers for windows, I had to funnel close()
calls to an intercepting routine.

I had two choices:

1. Surround every close() in at least 9 source files with messy:
	#ifdef WIN32
		nhclose(fd);
	#else
		close(fd);
	#endif

OR

2. Replace every close() with nhclose() and
   deal with the special code in the nhclose()
   version for windows, while just calling
   close() for other platforms (in files.c).

   It is also possible, although not done in this commit,
   to
	#define nhclose(fd) close(fd)
   in a header file for non-windows, rather than funnel
   though a real nhclose() function in files.c.
2015-04-06 10:12:10 -04:00
Derek S. Ray
07e0bc592c fire effects should burn green slime globs, too
On floor, in inventory, whatever. This probably needs to be extended to
support a much wider group of objects, but this will do to start.
2015-04-05 21:56:15 -04:00
Pasi Kallinen
71401a7db8 Add poison cloud glyph, fumaroles to fire plane.
When a gas cloud that deals damage is created, it uses
a poison cloud glyph instead of the cloud glyph.
(A bright green '#', or a bright-green recolor of the
cloud tile)

The plane of fire has random "stinking clouds", or
fumaroles, centered on lava pools.

Also make poison cloud glyph override lava, pool and
moat glyphs.
2015-04-05 12:31:55 +03:00
nhmall
b383cc6a2c update book tribute
Changes to be committed:
	modified:   doc/fixes35.0
	modified:   include/extern.h
	modified:   src/do_name.c
	modified:   src/objnam.c

This pretty much completes the code portion of the book tribute.
- The book will appear in the rare books shop.
- When you read the book, a random passage is drawn for a
  tribute file (suggested by Mike).
- The book cannot be renamed because it already has a
  name (observed/suggested by Sean).

The data file (dat/tribute) has a few test passages, but needs to be
filled out. Sean and Mike Stephenson have indicated that
possibly they may be able to help contribute to that. Ideally,
there should be at least one passage from each of the books.
2015-04-04 21:20:34 -04:00
Derek S. Ray
0b4383e32e clean up handling, roll everything into merged()
it should be possible to wish for globs now; also hero's
inventory, containers, ground, monster inventories will all
honor the globbiness.

basically, any way you bring two globs together (adjacent on floor,
same inventory, same bag) should cause them to merge, combining
weight and nutrition as appropriate.

20 seems low-ish on nutrition for a pudding (kelp fronds are 30!)
at first glance but this is easy enough to fix later; don't really
want players to be able to stock up on food _this_ way and accidentally
obsolete all the other food-generation methods.
2015-04-03 13:03:55 -04:00
nhmall
7a3e7aaf64 missed a conflict 2015-04-02 19:24:10 -04:00
nhmall
c43e8f9d31 Merge branch 'master' into nhmall-booktribute
Conflicts:
	include/context.h
2015-04-02 19:19:50 -04:00
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
Derek S. Ray
af5ed436b8 Merge branch 'master' into derek-farming
* master: (160 commits)
  Add doors correctly
  bug fixes for nhsub
  Generate oracle monsters after subroom
  Generate minetown guards after subrooms
  ...

Conflicts:
	src/do.c
	src/files.c
	src/hack.c
	src/mon.c
	src/vision.c
2015-04-01 17:40:25 -04: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