Commit Graph

4623 Commits

Author SHA1 Message Date
Pasi Kallinen
5a08671fc0 Prevent illegal positions for tmp_at
It seems like m_throw() can call tmp_at() with !isok coordinates,
so prevent those in both functions
2015-04-15 20:35:52 +03:00
Pasi Kallinen
97f6834730 Prevent infinite loop
...if the map is filled with monsters, and for some reason
the drowning just won't kill you.

Infinite looping cannot currently happen, because no-one who
can drown can keep surviving the drowning once their amulet
of life saving is used up.
2015-04-15 20:13:30 +03:00
Pasi Kallinen
35e0027328 Prevent out-of-bounds coords when closing a door 2015-04-15 19:43:53 +03:00
Pasi Kallinen
e77ea2ae61 Prevent segfault when looking around inside monster
A recent change by me introduced a segfault when
counting swallowed hero as a monster inventory item.
2015-04-15 17:06:44 +03:00
Pasi Kallinen
647a072b62 Move triplicate defines into single place 2015-04-14 20:33:30 +03:00
Pasi Kallinen
dc7d8eb244 YAFM for magic flute 2015-04-14 20:04:46 +03:00
Pasi Kallinen
cd3b0efe5d Unify description of hero's visage into single function 2015-04-14 19:41:44 +03:00
Pasi Kallinen
9b2c298fec Sinks may be teleported or polymorphed by rings
Original patches by Leon Arnott and me.
2015-04-14 19:21:37 +03:00
Pasi Kallinen
f1a5de16d9 Guard against merge segfaults
Trying to throw a quivered object resulted in a segfault, when
the code tried to merge the quivered object into itself.
2015-04-14 08:55:47 +03:00
Pasi Kallinen
31eed002c3 YAFM for dragon sitting on gold 2015-04-14 08:45:29 +03:00
PatR
615b25f5fc lint bits 2015-04-13 17:50:17 -07:00
PatR
cf74f1cfd8 regex lint
For the POSIX regexp interface, move local declaration to beginning
of block to avoid requiring C99.  Also switch to alloc() from bare
malloc() so that MONITOR_HEAP won't log a free which doesn't match
up to any allocation.  This results in a change in behavior:  if
the allocation fails, nethack will panic rather than report an
option parsing error.  In practice there will be no difference
because nethack is not going to run out of dynamic memory during
initial options processing.
2015-04-13 17:21:59 -07:00
keni
b490b10b0f Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-13 19:33:26 -04:00
keni
4e45cf3e7f nhsub: handle git add/commit options that take an argument 2015-04-13 19:32:51 -04:00
Pasi Kallinen
879f6d55c2 Add Auto open doors -patch 2015-04-13 21:11:44 +03:00
Pasi Kallinen
1dd43be266 Inaccessible niches occasionally have iron bars 2015-04-13 19:55:10 +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
Pasi Kallinen
0b0c769a05 Use our dupstr instead of strdup 2015-04-13 10:07:12 +03:00
Pasi Kallinen
ee5002210f Fix gitignored 2015-04-13 08:30:47 +03:00
nhmall
636da9887b more regex integration bits 2015-04-12 13:27:36 -04:00
nhmall
5dd00aca54 Makefile bit following merge 2015-04-12 12:16:59 -04:00
nhmall
a66224f9dc Add some new files to top level Files 2015-04-12 11:46:56 -04:00
Derek S. Ray
38861c1e0d add cppregex.cpp to NetHackW so it'll link properly 2015-04-12 11:46:56 -04:00
Sean Hunt
c7578b7c34 Add POSIX implementation of regex.
This also includes documentation of the regex engine in posixregex.c,
because I couldn't think of anywhere better to put it.
2015-04-12 11:46:56 -04:00
Sean Hunt
302ad5025f Catch regex matching errors to avoid crashing. 2015-04-12 11:46:56 -04: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
Sean Hunt
a3387432ac Document wallification changes. 2015-04-12 11:45:29 -04:00
nhmall
7da3ed32e1 tribute post-merge smoothing
Changes to be committed:
	modified:   src/mon.c
	modified:   win/share/objects.txt
2015-04-12 10:31: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
nhmall
a7b4309cc1 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-12 08:58:16 -04:00
nhmall
ea96cdd547 More Guidebook
Changes to be committed:
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
2015-04-12 08:57:41 -04:00
PatR
8b9ce73c31 revised menu searching
Convert search in tty menus from pmatch to case-insensitive pmatchi;
convert search in X11 menus from substring strstri to wildcard pmatchi.

tty bug:  if the menu is full screen, the search prompt and subsequent
user input clobbers the menu header.
2015-04-12 01:48:01 -07:00
nhmall
be5fa68bde Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-12 00:34:06 -04:00
nhmall
816589e626 windows team update 2015-04-12 00:33:30 -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
PatR
cd9e67a12a color of mithril armor
From a bug report two years ago, mithril armor should have color
HI_SILVER rather than HI_METAL.  Tolkien describes mithril as "like
silver which never tarnishes".  (The bug report had a more precise
quote, and a github URL for a patch which I've ignored.)  The Amulet
of Yendor has material set to MITHRIL but I haven't changed its color.
All amulets are HI_METAL, so if any modification is needed for it,
change the material rather than the color.

Mithril-coats are displayed as cyan both before and after this patch,
so it's hard to tell whether any change actually happened.
2015-04-11 18:51:03 -07:00
nhmall
1a8cfeaef3 Files correction 2015-04-11 21:07:02 -04:00
nhmall
2f4e7b601d text file error corrections
Changes to be committed:
	modified:   DEVEL/code_features.txt
	modified:   Files
	modified:   dat/history

On 4/11/2015 6:45 PM, Dion Nicolaas wrote:
> Errors in text files:
> - DEVEL/code_features.txt, line 10: 'alterting' should be 'alerting'

fixed

> - dat/history: Is it intentional that I'm no longer mentioned as
> maintaining the Windows port? I am for 3.4, but not for 3.6.

fixed

> - Files: The Files file is incomplete. Notably, the new files in dat/
> are missing (bogusmon.txt, engrave.txt, epitaph.txt),

fixed

> the DEVEL directory, doc/Guidebook.*

> - Some files in Files have the wrong case: NetHack.sln,
> NetHackW.vcxproj. I know it doesn't matter on windows but it looks wrong.

fixed
2015-04-11 21:02:11 -04:00
Pasi Kallinen
eb77c57a6c Allow disabling savefile UID checking in sysconf 2015-04-11 21:07:57 +03:00
Pasi Kallinen
4771ce5499 Fix comment typo 2015-04-11 20:45:37 +03:00
PatR
91fc8dc69c obj_nexto_xy lint 2015-04-10 18:31:11 -07:00
Derek S. Ray
5c919d6930 restore accidentally consumed tmp_config 2015-04-10 18:18:05 -04:00
Derek S. Ray
8398e30dd1 turn off annoying warnings in Visual Studio 2015-04-10 17:14:41 -04: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
Pasi Kallinen
04dd85e138 Fix magic mapped dark room symbols 2015-04-10 22:43:13 +03:00
Pasi Kallinen
dc63af1396 Disclose extinct species alongside genocided ones 2015-04-10 22:00:33 +03:00