Commit Graph

71 Commits

Author SHA1 Message Date
Bart House
be5cdcf77a killer, level and rooms move to instance globals. 2018-12-24 19:50:08 -08:00
Bart House
572ee347b9 Another round of instance globals changes. 2018-12-24 16:43:50 -08:00
Bart House
74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
Bart House
3645e415e3 Moved more globals to instance_globals. 2018-12-19 20:01:55 -08:00
Bart House
912886a73f First set of changes to move globals to instance_globals. 2018-12-19 20:00:35 -08:00
nhmall
ca84486133 clean master after moving of newer content to feature branch 2018-12-10 22:16:08 -05:00
nhmall
f147d692e2 Merge branch 'NetHack-3.6.2' 2018-11-24 16:11:58 -05:00
PatR
cc5bb44a9a fix #H7591 - migrating monsters vs full levels
During level change, when a monster from mydogs (monsters accompaying
hero, usually pets) couldn't be placed because the level was full, it
was set to migrate to that level (in order to get another chance to
arrive if hero left and returned).  The code sequence
 mon_arrive()-> mnexto()-> m_into_limbo()-> migrate_to_level()-> relmon()
tried to remove the monster from the map, but it wasn't necessarily on
the map (depending upon whether it couldn't arrive at all, or arrived
at the hero's spot and couldn't be moved out of the hero's way).  The
EXTRA_SANITY_CHECKS for remove_monster() issued impossible "no monster
to remove".  relmon() now checks whether monster is already off the map.

While investigating that, I discovered that pets set to re-migrate
to the same level to try again on hero's next visit didn't work at all.
migrating_mons gets processed after mydogs so moving something from
the latter to the former after arrival failure just resulted in
immediate second failure when the more general list was handled during
the hero's current arrival.  And failure to arrive from migrating_mons
would kill the monster instead of scheduling another attempt.

The sanest fix for that turned out to be to have all monsters who
can't arrive be put back on the migrating_mons list to try again upon
hero's next visit.  Pets still fail twice but are no longer discarded
during the second time, and now do arrive when hero leaves and comes
back provided he or she has opened up some space before leaving.  If
there's still no space on the next visit, monsters who can't arrive
then are scheduled to try again on the visit after that.

Recent fix for invalid corpses becomes moot.  Monsters aren't killed
during arrival failure so there are no resulting corpses to deal with.
2018-11-24 01:45:09 -08:00
nhmall
7ad3f32e16 Revert "Renamed instance_variables to global_variables and iv to g."
This reverts commit f9a0db6c44.
2018-11-23 22:17:07 -05:00
Bart House
f9a0db6c44 Renamed instance_variables to global_variables and iv to g. 2018-11-23 15:22:53 -08:00
Pasi Kallinen
80d1aae8a5 ifdef, not if 2018-11-23 15:15:04 +02:00
nhmall
1ac28dd6de Merge branch 'NetHack-3.6.2' 2018-11-20 22:50:52 -05:00
nhmall
03ef9da591 Merge branch 'macosx-curses-fall2018' into NetHack-3.6.2-beta01 2018-11-20 21:01:48 -05:00
Pasi Kallinen
b54dda5624 More monster location sanity checks
Placing a monster over already existing one will now complain.
Define EXTRA_SANITY_CHECKS to check monster removal too.
2018-11-19 22:38:16 +02:00
nhmall
cb43061076 curses changes to existing files 2018-11-16 20:51:22 -05:00
nhmall
3c25703576 Merge branch 'NetHack-3.6.2' 2018-09-26 17:39:20 -04:00
PatR
3a62075070 fix #H7136 - iron bars vs non-diggable walls
Iron bars can be destroyed in some circumstances (hit by yellow
dragon breath or thrown potion of acid, being eaten by rust monser
or black pudding, or by poly'd hero in those forms) and should act
like walls for diggable/non-diggable purposes.  But they aren't
walls, so the non-diggable flag was not being set for them by the
special level loader.  Even once that was changed, they weren't
being handled consistently.  Some places checked for non-diggable
directly (zap_over_floor of acid breath, potion of acid hitting bars)
and started working as intended, others used may_dig() to check
non-diggable (poly'd hero attempting to eat iron bars) but it doesn't
handle iron bars, and still others didn't check at all (bars-eating
monster who moved onto bars location in expectation of eating those
next).
2018-09-25 16:43:06 -07:00
nhmall
0e2555881a Merge branch 'NetHack-3.6.0' 2018-04-25 18:15:49 -04:00
keni
d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
keni
e1743da677 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-11-04 16:31:11 -04:00
Pasi Kallinen
bf0223fd9f Fix door orientation in des-files
Doors in des-files were always generated vertically.
This wasn't visible unless you had separate symbols for
closed vertical and horizontal doors, or used tiles.
2017-10-26 22:00:50 +03:00
Bart House
6322aec829 Win32TTY: Fix using a console font with wide glyphs
Added support to detect when the current console font has glyphs
that are too wide and will cause rendering errors in the console.
If detected, we warn the user and change the code page to 437
and the font to Consolas. At exit, if we had changed the font
and code page then we will restore to the original font and code page.
2017-10-25 10:59:11 +03:00
keni
88ed50523d Merge remote-tracking branch 'origin/NetHack-3.6.0' 2017-08-15 07:59:38 -04:00
Pasi Kallinen
439028dcae Add whatis_filter option to filter eligible map locations for travel
Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
2017-07-31 16:58:23 +03:00
keni
0724fe98cf Merge remote-tracking branch 'origin/NetHack-3.6.0' 2016-10-23 15:21:59 -04:00
Pasi Kallinen
ecf1500b6c Use even more enums 2016-10-10 21:55:23 +03:00
Pasi Kallinen
552647fb36 Use more enums
We're already using enums, so convert some already existing defines.
2016-10-10 16:18:20 +03:00
keni
5c6da25c56 Merge remote-tracking branch 'origin/NetHack-3.6.0' 2016-10-09 15:56:50 -04:00
Pasi Kallinen
efd7526194 Accessibility: Pick travel/cursor targets from a menu
Adds two new configurable keys to the cursor targeting: 'A' (getpos.menu)
and 'a' (getpos.menu.cansee). First one shows a menu of all interesting
glyphs on the map, second one shows only those in sight.

Travel command also now obeys the "request menu" -prefix, showing
the menu with interesting targets in sight, and then traveling there.

Idea via the NetHack accessibility research by Alexei Pepers.
2016-10-06 13:10:13 +03:00
keni
8ff16b07c1 Merge branch 'NetHack-3.6.0' 2016-06-21 10:29:14 -04:00
keni
83a0c37d13 Conway 2016-06-16 13:32:50 -04:00
Pasi Kallinen
d51db5a992 Make getpos for doors also target drawbridges 2016-05-27 18:47:56 +03:00
Pasi Kallinen
f8b48490aa Comment typofixes 2015-10-17 12:28:52 +03:00
Pasi Kallinen
4c43b88732 Renumber glyphs for vibrasquare trap conversion 2015-05-29 22:42:11 +03: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
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -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
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
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
Pasi Kallinen
47bb9abace New level compiler: code changes 2015-03-17 18:52:42 +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
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
eca41ae060 Make DUNGEON_OVERVIEW unconditional. 2015-03-17 18:46:12 +02:00
Sean Hunt
9759f5bf6d Make STEED unconditional. 2015-03-17 18:45:49 +02:00
keni
25cd007c48 Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-03-17 18:45:12 +02:00
nethack.rankin
ec966362a6 #overview enhancements too (trunk only)
I accidentally left his out of yesterday's commit.
2012-02-16 23:06:00 +00:00
nethack.rankin
b88c51deae bones tracking (trunk only)
Quite a long time ago, the developer/administrator of the 'hearse'
bones respository asked to have bones files augmented so that they could
be correlated with logfile entries.  He was forced to approximate it by
comparing file date+time with logfile date, which won't work well if there
are multiple deaths at roughly the same time, or perhaps even on the same
day.  This adds character name plus role, race, gender, alignment, the
cause of death, and date plus time of death to the bones file when it is
saved, and reads that data in when a bones file is loaded, then retains
it as part of that level for the remainder of the game.  Dying on a level
that was loaded from bones will chain the new dead hero info to whatever
was there from the previous one(s).  It's written as fixed length strings
padded with spaces before writing the map and its messy details, making
it easy to spot with a simple file browsing tool rather than requiring
something which can interpret nethack level files.  This may need to be
tweaked if players start shelling out of nethack to see whether the
checkpoint file for a newly entered level contains bones info, but at the
moment I'm not going to worry about that.

     TODO:  I wanted the bones and topten date to match, so am obtaining
the current date+time in done() and passing it to both of those and also
to outrip().  Hence the latter now has an additional argument.  So far only
genl_outrip() and hup_outrip() in src and the three outrips in win/chain
have been taught about that; interfaces that supply their own outrip()
need to be updated and probably won't compile right now.  Also, code for
formatting the cause of death has been moved from topten() into a separate
routine so that the new bones code can share it.  genl_outrip() now calls
it too; the various other outrip() routines should be changed to call it
instead of continuing to duplicate that core code.  (I probably should
have made topten.c's killed_by_prefix[] be static in order to force that,
but haven't done so.)

     TODO too:  there ought to be some way of viewing the data for a loaded
bones file from within nethack.  I'll probably add something to the dungeon
overview code to treat it as an implicit annotation, as least in wizard mode.
Showing it in normal play once a level is sufficiently discovered would be
useful, but I'm not sure what criteria should control that.  Neither ghost
nor grave is guaranteed to be present, particularly for levels that were
saved as bones, loaded into a subsequent game, then became new bones when
the second hero died there, which can occur an arbitrary number of times.
2012-01-23 10:41:57 +00:00