Commit Graph

4642 Commits

Author SHA1 Message Date
keni
32ed364086 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-20 20:49:51 -04:00
keni
04f6fe8e51 Developer.txt: add notes about branches 2015-04-20 20:49:18 -04:00
Pasi Kallinen
bac7654a75 Make sure can't chat out of the map 2015-04-20 18:09:59 +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
09920871f2 invalid escape
Changes to be committed:
	modified:   win/share/tiletext.c
2015-04-19 18:56:49 -04:00
nhmall
0827c0df9d Update the tile RGB values and mappings
Changes to be committed:
	modified:   win/share/monsters.txt
	modified:   win/share/objects.txt
	modified:   win/share/other.txt
	modified:   win/share/tile2bmp.c
	modified:   win/share/tiletext.c
2015-04-19 17:17:03 -04:00
nhmall
56c4475c20 extend the tty statue patch to tiles
Changes to be committed:
	modified:   doc/fixes35.0
	modified:   win/share/gifread.c
	modified:   win/share/monsters.txt
	modified:   win/share/objects.txt
	modified:   win/share/other.txt
	modified:   win/share/tile2bmp.c
	modified:   win/share/tilemap.c

The tty code already had the statue patch included, where
statues are represented by stone versions similar in
appearance to their monster likeness.

This extends it to tiles.

A new pass through the monsters.txt file is done
in tile2bmp to include new modified tiles to the output
file that are gray-scaled versions for mapping to the
NetHack statue glyphs.
2015-04-19 13:31:59 -04:00
Pasi Kallinen
460538b618 Fix dark room glyphs when searching
Searching while blind showed room glyphs as lit even when
dark_room option was on.
2015-04-19 10:47:05 +03:00
PatR
7ba63a868a fix "bad fruit #0"
When minimal_xname() set up a dummy object containing as few details
as possible, it wasn't setting up the fruit id field, so xname()
couldn't figure out what type of fruit it had and issued a warning.

I haven't managed a test case that uses minimal_xname so testing of
the fix is less than comprehensive.  [Pasi got it through dopay, but
that only resorts to minimal_xname if the formatted name is really
long and would otherwise cause the shopkeeper's prompt to overflow.
Long fruit name combined with long individual object name wasn't
long enough to trigger that.  Maybe uncursed, greased, rustproof
the like, or possibly just a longer shopkeeper name than I had?]
2015-04-18 20:18:43 -07:00
PatR
8246c1b7c7 revisit the forcefight crash fix
The previous fix prevents the crash from 'the()' when NO_GLYPH was
used as an index into the defsyms array, but it resulted in giving
feedback of "you attack thin air" regardless of what was at the
target location, reverting to the situation that the buggy code was
attempting to address in the first place.  Handle that differently
by removing the unseen monster glyph sooner.  Also, the underwater
handling wasn't working as intended.

I blamed Derek's pudding farming patch for introducing the problem,
but all that did was replace the offending line(s) with different
indentation.  The older post-3.4.3 patch which produced the problem
was mine.  Sorry, Derek.
2015-04-18 20:02:40 -07:00
PatR
ce05d14e74 revert unneeded lookat() change
The enclosing switch statement is only reached when `glyph_is_cmap' is
known to be true, so remove the redundant extra test.
2015-04-18 18:50:38 -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
nhmall
78b012a680 prevent a couple of reported array index segfaults
Changes to be committed:
	modified:   src/hack.c
	modified:   src/pager.c

Don't use glyph_to_cmap as an array index into
the defsyms[] array unless it really is a cmap.

Recent situation: glyph_to_cmap will return
NO_GLYPH for the unknown monster glyph 'I', which
is not a valid index for the defsyms[] array.
2015-04-18 15:29:37 -04:00
Pasi Kallinen
323b7bba2c Allow wishing for polearm or hammer
which gives a random weapon with the matching skill,
so a random polearm, or a war hammer, respectively.
2015-04-18 17:25:56 +03:00
Pasi Kallinen
8c41a962a7 Fix saving xlogfile realtime 2015-04-17 10:35:05 +03:00
nhmall
e1155aca6f add an initializer 2015-04-17 00:46:54 -04:00
nhmall
f6bf9f9999 protect against bad dates
A recent fault on mingw32 revealed that faulty
code which passes a bad or out-of-range date
value could have game-fatal consequences.
Add some protection.
2015-04-17 00:31:22 -04:00
nhmall
d52c6a208d date verification 2015-04-17 00:12:53 -04:00
Pasi Kallinen
38bdb175cc Prevent divide by zero in newman
...which happened when your max power was 0
2015-04-15 21:05:46 +03:00
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