Commit Graph
100 Commits
Author SHA1 Message Date
Sean Hunt f48fcf7a9d Style cleanup.
This fixes indentation and spacing issues. Some too-long lines were kept
because I didn't want to wokr on reorganizing the code to make them
wrap.
2016-06-20 00:15:58 -04:00
Sean Hunt 587ec223b9 Add fixes entries for recent merges 2016-04-12 21:32:34 -04:00
Sean Hunt bca851d711 Merge remote-tracking branch 'github/tung/shop-floor-nested-loot' into NetHack-3.6.0 2016-04-12 21:32:10 -04:00
Sean Hunt 148a7cb26f Merge remote-tracking branch 'github/tung/tty-menu-enhancements' into NetHack-3.6.0 2016-04-12 21:26:06 -04:00
Sean Hunt f5019b231e Merge remote-tracking branch 'github/tung/shkp-anger-bill-fix' into NetHack-3.6.0 2016-04-12 21:16:38 -04:00
Sean Hunt ef621d2e6c Merge remote-tracking branch 'github/tung/randline-rng-fix' into NetHack-3.6.0 2016-04-12 21:08:31 -04:00
Sean Hunt 36c3a1c665 Merge remote-tracking branch 'github/UniQP/trap' into NetHack-3.6.0
Also update fixes file
2016-04-12 20:58:25 -04:00
Sean Hunt 1e47807302 Merge remote-tracking branch 'github/UniQP/break' into NetHack-3.6.0 2016-04-12 20:52:13 -04:00
Sean Hunt e687023e77 Merge remote-tracking branch 'github/UniQP/rcnt' into NetHack-3.6.0 2016-04-12 20:51:28 -04:00
Sean Hunt 23b6a04ad5 Correct citation of Adventure. 2015-12-08 00:01:41 -05:00
Sean Hunt 7959648024 Avoid referencing a real mental disorder. 2015-10-12 14:43:11 -04: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
Sean Hunt 9f0c9b4a0b Revert "Properly define NH360_DEDICATION in Makefiles"
This reverts commit 3db39ca221.
2015-08-03 12:56:26 -04: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
Sean Hunt c447088538 Remember novel titles in bones. 2015-05-27 22:17:17 +09:00
Sean Hunt 2174d26c47 More wishing nits. 2015-05-26 09:06:41 +09:00
Sean Hunt 58052f88ad Count only stacks when listing container contents.
By popular demand of the beta testers.
2015-05-26 09:04:04 +09:00
Sean Hunt 9c827ad231 Provide feedback when one of your items gets wet. 2015-05-26 09:00:33 +09:00
Sean Hunt 6df9d25a09 Add clang-formatting file.
This should be in the repository, even though nobody can use it yet.
2015-05-25 09:21:31 +09:00
Sean Hunt 1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
Sean Hunt 8b57d96fd2 Reformat .h files.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
2015-05-25 09:21:15 +09:00
Sean Hunt 26ee7dc370 Convert the vibrating square to a trap
Patch due to ais523 in NetHack 4.

This is not ready to be merged yet; the vibrating square needs a tile
image for tiles builds.
2015-05-25 09:19:20 +09:00
Sean Hunt b6f32e7eff Warning cleanup. 2015-05-24 11:12:58 -04:00
Sean Hunt b8bea3af20 Make the wand of wishing chest immune to trapping
This eliminates a source of very random, unpreventable frustration to
players.
2015-05-24 11:12:41 -04:00
Sean Hunt b5513b7db0 Make long worms unleashable.
Fixes a bug reported by ais523. Rather than account for individual
segments, I opted just to make them unleashable, because it's not very
useful behaviour anyhow.
2015-05-24 11:12:27 -04:00
Sean Hunt 4cd43fdaa2 Clean up ceiling nits.
Fixes C343-102.
2015-05-24 11:12:12 -04:00
Sean Hunt cc50ecda67 Provide documentation for the regex engine.
The guidebook entries could do with more detailed descriptions, but this
will do for now.
2015-05-24 10:19:32 -04:00
Sean Hunt 84d63e169b Use the common regex engine in more places.
In particular, in autopickup_exceptions and user sounds.
2015-05-24 10:17:58 -04:00
Sean Hunt 49b9f6c926 Modify makedefs to use dynamic buffers for reading.
This will prevent crashing due to excessively long lines.
2015-05-24 10:17:28 -04:00
Sean Hunt 44f4bc240c Add pmatch-based regex engine.
As mentioned, this is not tested. It should be simple though.
2015-05-24 09:42:56 -04:00
Sean Hunt a67759cbc3 Audit rloc()
Most of the time, rloc() is used for teleporting monsters and it's not a
big deal if they can't find somewhere to go. In a few cases, it is. I
went through all the callsites and made calls to rloc() not cause
impossible()s if they don't need to.

Fixes a bug/suite of bugs reported by ais523.
2015-05-24 09:31:40 -04:00
Sean Hunt 80703597c0 Clean up a rare corner case with mnearto().
With this fix, if the second mnearto fails, we don't accidentally strand
othermon at (0,0).
2015-05-24 09:24:52 -04:00
Sean Hunt 6aaece4ba7 Fix sleep explosion causing impossible().
Also clean up come ternaries while I'm here.

My first attempt to fix was to add AD_SLEE to explode(), but that failed
because do_break_wand() already does the sleeping portion. I don't
generally like the duplication between explode() and do_break_wand as a
result, but I consider that issue a project for another day.
2015-05-24 09:24:11 -04:00
Sean Hunt dc08561ddb Replace tabs with spaces. 2015-05-09 14:45:43 -04:00
Sean Hunt 82ea1472f4 Add a coding style document.
I've put my best approximation of what the style should be in here. I
don't intend for this to be prescriptive, except as the DevTeam has
agreed, so I do encourage discussion on the mailing list. I would also
appreciate if people with other editors could include the appropriate
configuration recipes.
2015-05-09 14:45:01 -04:00
Sean Hunt 97d6fade74 Reformat all C files.
I'll push a formatting guide at some point. There may still be
outstanding changes, but please feel free to resolve those as you arrive
a them.

To the best of my knowledge, there is no changes to the actual code
content, but the formatter does have the occasional bug. If you run into
an issue, please fix it!
2015-05-09 13:43:16 -04:00
Sean Hunt 167800afdf Fix type compatibility warning. 2015-05-09 13:07:49 -04:00
Sean Hunt 8c0c587fd7 Restore lost executable bits. 2015-05-06 23:23:48 -04:00
Sean Hunt b7c5b33173 Add a funny message for when a burrower eats food. 2015-05-06 19:25:23 -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
Sean Hunt 0edd645384 Fix Sanctum phasing bug. 2015-04-10 09:14:23 -04:00
Sean Hunt 6a116ee59c Restore the insect legs on Baalzebub's level. 2015-04-10 09:14:23 -04: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
Sean Hunt 951de70b36 Do not clean tribute file on Unix. 2015-04-07 20:44:54 -04:00
Sean Hunt 05c284b2e8 Add quotes for Eric and Moving Pictures. 2015-04-07 12:48:55 -04:00
Sean Hunt 4e8e1889ef Add some quotes.
Please correct the formatting if need be.
2015-04-04 00:39:24 -04:00
Sean Hunt d5a2dcf8c7 Fix the Unix build. 2015-04-04 00:39:11 -04:00
Sean Hunt 2a9c913c1c Add new hallucinatory gods. 2015-03-29 19:10:46 -04:00
Sean Hunt 94256853c6 Fix a compiler warning. 2015-03-29 18:20:26 -04:00
Sean Hunt 907a2dfee0 Fix a memory leak on termination.
Found by Alex Smith.
2015-03-25 14:34:28 -04:00
Sean Hunt e41b3f7143 Fix use-after-frees on dipped objects. 2015-03-23 11:42:36 -04:00
Sean Hunt f8baf4bd8e Make a few fixes to code that was confusing indent 2015-03-17 18:47:14 +02:00
Sean Hunt b4fa80ec7d Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d
in order to prevent players from using hangups during the destruction
messages to save themselves.
2015-03-17 18:47:12 +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
Sean Hunt 07da4a740e Fix some warnings on the unconditionals branch. 2015-03-17 18:46:48 +02:00
Sean Hunt 5fb3fea9c6 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-03-17 18:46:45 +02:00
Sean Hunt fb46fed99d Make EXP_ON_BOTL unconditional. 2015-03-17 18:46:44 +02:00
Sean Hunt f27d319e68 Make REDO unconditional. 2015-03-17 18:46:41 +02:00
Sean Hunt 11d11c5de3 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-03-17 18:46:39 +02:00
Sean Hunt 3481ec6589 Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-03-17 18:46:37 +02:00
Sean Hunt 8798197d85 Make BARGETHROUGH unconditional. 2015-03-17 18:46:35 +02:00
Sean Hunt dcc2f8ba93 Make SEDUCE unconditional. 2015-03-17 18:46:32 +02:00
Sean Hunt 05f7a63728 Make GOLDOBJ unconditional. 2015-03-17 18:46:23 +02:00
Sean Hunt cc7ab4a2da Make WIZARD unconditional. 2015-03-17 18:46:17 +02:00
Sean Hunt eca41ae060 Make DUNGEON_OVERVIEW unconditional. 2015-03-17 18:46:12 +02:00
Sean Hunt ffd201495c Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-03-17 18:46:08 +02:00
Sean Hunt bb647dc33c Make TOURIST unconditional. 2015-03-17 18:46:01 +02:00
Sean Hunt 44ca9fc16a Make SINKS unconditional. 2015-03-17 18:45:58 +02:00
Sean Hunt 161070ce56 Make KOPS unconditional. 2015-03-17 18:45:56 +02:00
Sean Hunt 9759f5bf6d Make STEED unconditional. 2015-03-17 18:45:49 +02:00
Sean Hunt aba6ecb7b3 Make ELBERETH unconditional. 2015-03-17 18:45:45 +02:00
Sean Hunt b777aff284 Add fixes notes for the recent lava changes. 2015-03-17 18:44:58 +02:00
Sean Hunt 0fcd4c0093 Remove the 'nul' variable. 2015-03-17 18:44:58 +02:00
Sean Hunt 38964dc56c Clean up lava messages a little.
This change has two parts.

First, the Book of the Dead now has a special message in lava. This was
originally added by Steve Melenchuk (aka Grunt) as a precaution against the Book
burning up. While I'm pretty sure that the Book can't burn up in the current
codepath, the message is a nice touch and it doesn't help to add a safety check.

Second, always print the inventory destruction messages. The reason for this is
fairly subtle, but relates to the timing. By not printing the messages when
dying, the visible effect to the player is that if they have lifesaving, the
items burn up before they die, but if they do not, they burn up after they
die---the fact that they do burn up is visible in the dump or bonesfile.
2015-03-17 18:44:57 +02:00
Sean Hunt c6628bcbff Clean up the lava code a little. 2015-03-17 18:44:56 +02:00
Sean Hunt 9644ec781a Destroy water walking boots on lava first.
This avoids a player being left standing on lava if their boots are burned up and
they survive the damage.

This change is originally due to Steve Melenchuk, fixed up by Derrick Sund.
2015-03-17 18:44:56 +02:00
Sean Hunt e95bd8ec5b Fix warning with verbalize1 2015-03-17 18:44:56 +02:00
Sean Hunt 07cf4e9657 Replace && with & in blindness timeout check.
Caught by clang.
2015-03-17 18:44:55 +02:00
Sean Hunt 01756b33fa Fix a few compiler (clang) warnings. 2015-03-17 18:44:54 +02:00
Sean Hunt ea46c93b88 +x .sh files in unix dir; ignore Makefiles 2015-03-17 18:44:52 +02:00
Sean Hunt f64e530bff Make a few fixes to code that was confusing indent 2015-03-02 13:25:41 -05:00
Sean Hunt bd62873ee2 Print lava item destructions only if surviving.
This partially reverts commit 72c2ae233d
in order to prevent players from using hangups during the destruction
messages to save themselves.
2015-03-02 12:52:04 -05:00
Sean Hunt 777328bd5c 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-02 12:50:03 -05:00
Sean Hunt 3acd3c4a00 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-02 12:50:01 -05:00
Sean Hunt 57dcad3774 Rename rust_dmg() to erode_obj(). 2015-03-02 12:50:01 -05:00
Sean Hunt 3a049cf66e Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-02 12:50:00 -05:00
Sean Hunt 7e0d552b06 A lot more cleanup to rust and water. 2015-03-02 12:49:59 -05:00
Sean Hunt d588210a77 Cover a couple of corner cases with rust_dmg(). 2015-03-02 12:49:57 -05:00