Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen dc09a991fe Fix some warnings from clang's static code analyzer 2015-11-18 22:54:28 +02:00
Pasi Kallinen acc883f122 Comment typofix 2015-11-16 11:46:45 +02:00
Pasi Kallinen 807f994d9b Update Guidebook.txt 2015-11-16 10:24:16 +02:00
Pasi Kallinen 8a07e2cdc5 Fix use of data from deleted vault teleport trap 2015-11-15 18:55:09 +02:00
Pasi Kallinen b2ab8f2504 Update precompiled lev_comp lex and yacc files 2015-11-15 09:09:45 +02:00
Pasi Kallinen 9eb14f684c Extract guard gold before disposing it
If the gold is still in monster inventory, dealloc_obj will panic.
2015-11-14 17:41:31 +02:00
Pasi Kallinen ffcc6f1bc2 Remove the useless FUN STUFF section
The fun stuff section in config.h contains nothing fun anymore,
so let's remove it. Move SCORE_ON_BOTL to the next section,
and add couple other defines there too.
2015-11-14 10:29:50 +02:00
Pasi Kallinen 739b6708ee Fix enexto complaint when morguemon returned null 2015-11-14 09:59:35 +02:00
Pasi Kallinen 4387bde968 Clear thrownobj when punished and swallowed
As per Pat's suggestion, this actually does work correctly;
I have no idea why I thought it didn't ...
2015-11-13 00:07:47 +02:00
Pasi Kallinen 489d56d4bb Fix hiding under nothing when corpse rotted away 2015-11-13 00:06:07 +02:00
Pasi Kallinen ca02f00208 Prevent buffer overflow 2015-11-12 22:01:47 +02:00
Pasi Kallinen c1e34f17f7 Prevent a rnd(0) call 2015-11-12 20:11:45 +02:00
Pasi Kallinen 8451f67dff Fix wallification and wallify catacombs mine end 2015-11-12 18:29:33 +02:00
Pasi Kallinen 0bcb713b4f Fix special level loader memory leaks 2015-11-12 18:00:55 +02:00
Pasi Kallinen fad2eab749 Fix infinite looping when bound digging on solid map 2015-11-11 21:47:51 +02:00
Pasi Kallinen 2c0f24896f Unify blind feel_location or newsym info single func 2015-11-09 21:37:28 +02:00
Pasi Kallinen 7132f56901 Unwrap t-shirt and apron texts, and add one t-shirt msg 2015-11-09 13:24:40 +02:00
Pasi Kallinen d195052796 Remove trailing whitespaces 2015-11-09 13:06:19 +02:00
Pasi Kallinen df101a5eda Add quote for cream pie 2015-11-08 15:28:19 +02:00
Pasi Kallinen 47938fc339 Add quote for blue jelly 2015-11-08 11:13:14 +02:00
Pasi Kallinen 3b83b2bd50 Add a quote for bullwhip 2015-11-07 23:50:40 +02:00
Pasi Kallinen 86de7f4a19 Add boomerang quote 2015-11-07 21:56:18 +02:00
Pasi Kallinen bf6a61ddf5 Make status hilites show none instead of empty in options 2015-11-07 11:55:12 +02:00
Pasi Kallinen 8bfa1579e7 Remove stray character 2015-11-07 10:59:43 +02:00
Pasi Kallinen 464bb3a1f4 Rephrase version number in comment 2015-11-07 09:06:13 +02:00
Pasi Kallinen 99925ff155 Update version numbers in source comments 2015-11-06 16:05:36 +02:00
Pasi Kallinen e37e89edcd Fix one version number in the Guidebooks 2015-11-06 15:56:47 +02:00
Pasi Kallinen a159226a9f Remove a leftover ifdef REINCARNATION 2015-11-06 15:49:29 +02:00
Pasi Kallinen 2104bc63d6 Clean fixes file and lev_comp docs tiny bit 2015-11-06 15:42:36 +02:00
Pasi Kallinen aa1646a75d Update the linux README 2015-11-06 15:35:38 +02:00
Pasi Kallinen 8f3d91785d Free allocated temporary lregion 2015-11-05 21:03:57 +02:00
Pasi Kallinen 2ee06dda5a Allow some variance in corridors and reduce predictability
The corridors used to head towards the goal using the straightest
possible line, often making a zig-zag beeline. Allow some slight variance,
sometimes going straight instead of turning, reducing the predictability,
and making those monotonously turning corridors less likely.
2015-11-04 21:13:39 +02:00
Pasi Kallinen 91369e7a76 Revert the created inventory nhwindow destruction
At least perm_invent (and other stuff?) causes problems with this.
2015-11-02 22:23:18 +02:00
Pasi Kallinen acd7396f46 Change version number of the help file 2015-11-02 11:23:10 +02:00
Pasi Kallinen ab521ca574 Change Porting file version number to 3.6 2015-11-02 09:30:36 +02:00
Pasi Kallinen 7a517dea36 Destroy created inventory nhwindow 2015-11-01 21:59:56 +02:00
Pasi Kallinen e022486cdc Actually destroy the character selection window 2015-11-01 20:49:32 +02:00
Pasi Kallinen 9181f06dab Fix crystal ball use after being destroyed
Crystal ball can be destroyed when used, so pass the object parameter
back as null in that case.
2015-11-01 18:49:43 +02:00
Pasi Kallinen bdb5cb2b73 Free the compiled regex buffer 2015-11-01 10:23:11 +02:00
Pasi Kallinen b44486e7cc Prevent array underflow 2015-11-01 01:44:10 +02:00
Pasi Kallinen 6399347d9f Prevent string underflow in fruit name matching 2015-11-01 01:42:57 +02:00
Pasi Kallinen 0261bbf727 Add missing regex_frees 2015-11-01 01:38:12 +02:00
Pasi Kallinen c6832a4d57 Free the venom object, even if it is not thrown 2015-11-01 01:36:18 +02:00
Pasi Kallinen 4f616a932c Prevent out of array access
As index() can match with the string terminator, that would make
the xdir etc array references out of bounds.
2015-11-01 01:32:24 +02:00
Pasi Kallinen b0e4357c32 Fix lev_comp memory leaks 2015-11-01 00:28:28 +02:00
Pasi Kallinen 1a133be123 Fix makedefs memory leaks 2015-11-01 00:12:38 +02:00
Pasi Kallinen 3ff3f6d2de Use our dupstr instead 2015-10-30 23:27:19 +02:00
Pasi Kallinen 4aac554b66 Fix trying to look up curse state of deleted object 2015-10-30 20:54:45 +02:00
Pasi Kallinen e6ed35b8f7 Free the allocated special level coder 2015-10-30 20:16:10 +02:00
Pasi Kallinen 230cd0abed Fix syntax error in MacGraphics conditional part 2015-10-30 10:15:28 +02:00
Pasi Kallinen 9008ba321b Fix uninitialized variable 2015-10-29 21:45:35 +02:00
Pasi Kallinen 2d83b83cc2 Fix uninitialized variable 2015-10-29 20:26:25 +02:00
Pasi Kallinen 530ba8e3d3 Add sanity checking for light sources 2015-10-27 18:36:07 +02:00
Pasi Kallinen ec58bfaa22 Pass LFLAGS from hints file to util Makefile 2015-10-27 18:13:35 +02:00
Pasi Kallinen 3fd92e3ef8 Fix mon weapon inconsistency when monster got disintegrated
This happened when the monster, who was wielding a weapon, got hit
by a disintegration blast, and then lifesaved by a worn amulet.
2015-10-24 09:30:38 +03:00
Pasi Kallinen 581b1830ff Fix segfault when chameleon form fails on the Rogue level 2015-10-20 17:28:16 +03:00
Pasi Kallinen fb14c41bd4 Add more hallu monsters 2015-10-18 18:11:56 +03:00
Pasi Kallinen 95983f6ae6 Use macros for monster appearances 2015-10-18 13:55:11 +03:00
Pasi Kallinen 857225ad0f Use existing function for stumbling on door mimic 2015-10-18 09:57:07 +03:00
Pasi Kallinen af1c77808b Comment typofixes, pt 4 2015-10-17 18:47:31 +03:00
Pasi Kallinen 66dd87454b Comment typofixes, pt 3 2015-10-17 13:47:25 +03:00
Pasi Kallinen f056bdb429 Comment typofixes, pt 2 2015-10-17 13:15:46 +03:00
Pasi Kallinen f8b48490aa Comment typofixes 2015-10-17 12:28:52 +03:00
Pasi Kallinen f4ec27ea13 Comment typofix 2015-10-17 09:01:50 +03:00
Pasi Kallinen f1c1f3cb8a Add missing thrownobj clears when the obj is destroyed 2015-10-15 14:56:42 +03:00
Pasi Kallinen 7e46c4924c Fix segfault when the Wiz fails to reappear due to makemon failing 2015-10-13 22:02:02 +03:00
Pasi Kallinen 60df7b2d3b Fix infinite loop if god cannot fix your trouble
For example, if safe_teleds cannot land you in a safe spot,
because level is full of monsters.
2015-10-13 20:36:40 +03:00
Pasi Kallinen 65a30d2ba7 Fix C343-341: Stuck in minetown room
Bustling Town can be generated with inaccessible areas outside the
top edge of the fixed town map.  If you end up in one of those area
without any way to dig or teleport, you're stuck.

This adds a new level flag "inaccessibles" to force checking for
such inaccessible areas, and add secret doors, holes/trapdoors,
or some random escape item into the areas.
2015-10-13 19:00:22 +03:00
Pasi Kallinen 1703818a11 Wet towels deal more damage
Dipping a towel into a potion, fountain, or some other water source
makes the towel wet.  Hitting with a wet towel deals up to 6 points
of damage, but every hit reduces wetness, as does throwing or applying
the towel.  You can also wish for a moist or wet towel.
2015-10-13 16:28:01 +03:00
Pasi Kallinen 2f54ed8eae Fix the makemon random coord picking again
This time try random locations up to 50 times, then start going
through the map in order to find a good position. First round
tries to pick a location not in sight, if that fails, it might
try stair or ladder location. If that fails, then it will pick
any good position, whether in sight or not.

Outside field of vision restriction and trying stair or ladder
locations does not happen when the monster is placed from special
level code.
2015-10-12 12:00:51 +03:00
Pasi Kallinen 1e8f4ee0b1 Fix segfault when tripping over something
If you tripped over something, and there were no rocks on
that place, the otmp object variable was set to null but used
later for checking if it was a corpse.
2015-10-11 21:53:40 +03:00
Pasi Kallinen 05adaa2a75 Extra checks when freeing objects and monsters
Just in case, so we don't leave objects or monsters inaccessible
by accident.
2015-10-11 21:41:55 +03:00
Pasi Kallinen f0220c4203 Add monster data sanity checking 2015-10-11 20:36:28 +03:00
Pasi Kallinen 751fab7a59 No need to sanity check objects of a dead monster 2015-10-11 19:06:37 +03:00
Pasi Kallinen c318f627a4 Ensure null nobj pointer when object is extracted from list 2015-10-11 19:03:01 +03:00
Pasi Kallinen 16018ac824 Put monsters into limbo if they cannot be placed
Whenever mnearto tries to displace a monster from underneath
another, and the displaced one cannot be placed anywhere,
make it drop special objects and put it into migration, with
the current level as the target.

This should be a good enough stopgap measure - it's not going
to happen unless the level is (nearly) full of monsters.

And it seems to cure a near-impossible-to-track data corruption,
with monster list pointing to garbage.
2015-10-11 18:52:27 +03:00
Pasi Kallinen 185515e1c7 Fix infinite loop in makemon if no goodpos available
If the level was full of monsters, goodpos never returns TRUE,
and tryct would not get incremented.
2015-10-11 16:18:13 +03:00
Pasi Kallinen cee766eb71 New true rumors, one new hallu mon 2015-10-09 10:26:38 +03:00
Pasi Kallinen e995d88997 Fix cursed scroll of light on the rogue level
Being blind and engulfed, reading cursed scroll of light did still darken
the room on the Rogue level.  This also changes the logic a bit, so that
cursed scroll of light will douse lamps in your inventory, even when
swallowed.
2015-10-09 08:00:47 +03:00
Pasi Kallinen 8212ddd69e setmnotwielded should always MON_NOWEP
Instead of making the caller remember to use MON_NOWEP, make
setmnotwielded handle that automatically.  This fixes the
"bad monster weapon restore" errors I've been seeing.

Also adds sanity checks for this.
2015-10-06 18:47:55 +03:00
Pasi Kallinen 1fe0f03f8c Document persistent options
Some options are applied from config file only to new games,
so document those.
2015-10-01 13:33:19 +03:00
Pasi Kallinen 59af4e9a49 Refer to relevant config options in the Guidebook
Give the reader a hint what to look for if they want to configure
the message line.
2015-09-30 12:41:03 +03:00
Pasi Kallinen d9bc2fb621 Add paranoid option for breaking a wand
Add OPTION=paranoid_confirm:wand to prevent accidental
wand breaking - suggested by scorchgeek
2015-09-27 19:13:20 +03:00
Pasi Kallinen 798b2e76f9 One more scroll name, a tongue twister 2015-09-17 19:32:28 +03:00
Pasi Kallinen c48b3c4556 Jump-and-bump should wake up monsters
It was possible to wake up single monsters by jumping at the monster.
Make such bumping somewhat noisy.
2015-09-15 16:17:16 +03:00
Pasi Kallinen 6ba0baa4cd Improve wand of nothing randomizing
As per Sean's suggestion, just use rn2. This means the line
can also be moved to better place, with the other object
init stuff.
2015-09-13 08:53:23 +03:00
Pasi Kallinen 0ee1f31601 Make wand of nothing zap ID harder
Just to mess with zap identification, make wands of nothing
either ask for direction or not, determined at game start.
2015-09-11 18:42:06 +03:00
Pasi Kallinen 9a4d29b365 Add new scroll names
via UnNetHack, with some slight changes:

1) Folded the two Portal references into one
2) Removed "ACHAT SHTAYIM SHALOSH" ("One Two Three" in Hebrew and apparently
   Uri Geller's catchphrase) - I know nothing about Hebrew nor Geller, or
   whether this would be appropriate to add.
3) Added "XOR OTA" ("Atorox", reference to Finnish fandom and early scifi)
2015-08-30 21:29:08 +03:00
Pasi Kallinen 25ea071aaa Fix typo "promt" 2015-08-30 20:34:07 +03:00
Pasi Kallinen 50eb826c0f Add a chroot install hints file for linux
This makes installing NetHack on a public server much easier.
Required some minor changes to the unix top-level Makefile, and
the other hints files; Makefile variable HACKDIR may not be a
full path anymore, use INSTDIR instead.
2015-08-13 16:30:57 +03:00
Pasi Kallinen 3db39ca221 Properly define NH360_DEDICATION in Makefiles 2015-07-31 15:51:01 +03:00
Pasi Kallinen f05f716dbc Fix dark_room glyphs when restored from save
If color or dark_room options were toggled during gameplay, and then
the game is saved and restored with different options, the dark room
glyphs were wrong.

Reported by both Boudewijn and Pat.
2015-07-10 16:17:04 +03:00
Pasi Kallinen c1ef2e19df Fix more dark_room and nocolor
Fixes for example the case of searching while blind, as
reported by Boudewijn.
2015-07-10 16:04:04 +03:00
Pasi Kallinen 864fb1e203 Fix nocolor messing with dark_room on levelchange
As reported by Pat:
> After leaving a level and then returning, I'm seeing lit
> room squares as blank
> Options all have their default settings

OPTIONS=nocolor is the default; we should probably change this
sometime, because nearly everyone plays with color.
2015-07-10 15:49:33 +03:00
Pasi Kallinen fe073055b6 Comment typofix 2015-06-25 08:08:39 +03:00
Pasi Kallinen 9dc979d414 TTY: Separate hilite_pile option 2015-06-23 07:43:52 +03:00
Pasi Kallinen bf9bd54b4a Force full-level wallify for orctown
Betatesters noted the "Orc town" variant of minetown had
"black" (solid stone) walls, so fix those.
2015-06-22 18:44:29 +03:00
Pasi Kallinen 866b5caee0 Text tombstone overflow and helpless
Betatesters noticed the death message could overflow the text tombstone,
because the helpless reason was also shown there.

So don't show the helpless at all in the tombstone.  The helpless is
still put in the record, logfile, and as a separate while-field in xlogfile.
2015-06-21 17:57:17 +03:00
Pasi Kallinen c574df1239 Prevent unique monsters waking up prematurely
Reported by Stefan:
> I just did the valkyrie quest. When I arrived on quest goal, I took only
> a few steps away from the upstairs and Lord Surtur jumped me. One of the
> monsters in his lair had stepped on one of the guaranteed squeaky boards

Squeaky boards (and other noisy things) woke up monsters that were
meditating. Unfortunately this also woke up such meditating monsters
as the Wiz, or the quest nemesis.

Prevent unique monsters with waiting strategy being woken up by the noise.
2015-06-20 14:15:08 +03:00
Pasi Kallinen 2094aa16ad Fix default boulder symbol
Previous boulder symbol fix unearthed another problem:
When no boulder symbol was defined in config file, the default
iflags.bouldersym null value was used as a symbol.
2015-06-18 20:55:19 +03:00