]> granicus.if.org Git - nethack/log
nethack
5 years agoset_uinwater() bit
PatR [Fri, 3 Apr 2020 18:39:40 +0000 (11:39 -0700)]
set_uinwater() bit

Assignment target is a one bit wide bitfield; callers only pass 0 or 1
but guarantee that value fits so that no compiler has reason to complain.

5 years agoMake hezrous stink
Pasi Kallinen [Fri, 3 Apr 2020 18:05:45 +0000 (21:05 +0300)]
Make hezrous stink

5 years agoFlip poison gas clouds
Pasi Kallinen [Fri, 3 Apr 2020 17:41:46 +0000 (20:41 +0300)]
Flip poison gas clouds

5 years agomention_decor vs Underwater or drowning escape
PatR [Fri, 3 Apr 2020 17:41:30 +0000 (10:41 -0700)]
mention_decor vs Underwater or drowning escape

Avoid redundant
|You are on solid land again.
|You are back on floor.
when walking or teleporting out of water with the mention_decor option on.

5 years agoCheck for levl typ STONE explicitly
Pasi Kallinen [Fri, 3 Apr 2020 10:10:08 +0000 (13:10 +0300)]
Check for levl typ STONE explicitly

... instead of expecting 0 to be STONE (or unused space in this case)

5 years agogroundwork: u.uinwater manipulation
PatR [Fri, 3 Apr 2020 08:04:27 +0000 (01:04 -0700)]
groundwork: u.uinwater manipulation

Toggle u.uinwater on or off in just one place.

5 years agoRemove workarounds for ancient compilers
Pasi Kallinen [Fri, 3 Apr 2020 05:21:08 +0000 (08:21 +0300)]
Remove workarounds for ancient compilers

5 years agowarning fix
PatR [Thu, 2 Apr 2020 19:48:27 +0000 (12:48 -0700)]
warning fix

Fix a warning about mixing || and && without parentheses where
parentheses were present but a closing one was misplaced.

Also, isok() was redundant in 'isok() && is_pool()' because is_pool()
starts off with its own isok() check.

5 years agoUnify checking if monster is ok in poison gas
Pasi Kallinen [Thu, 2 Apr 2020 15:15:13 +0000 (18:15 +0300)]
Unify checking if monster is ok in poison gas

5 years agopartial fix for S_unexplored
PatR [Wed, 1 Apr 2020 22:49:28 +0000 (15:49 -0700)]
partial fix for S_unexplored

I've been sitting on this for a while but have decided that I'm not
likely to make any further progress.

SYMBOLS=S_stone:8,S_unexplored:9
on tty reveals that S_stone works as intended but S_unexplored does
not.  Unexplored was being drawn as spaces, and detected or sensed
monsters moving around unexplored areas left a trail of S_unexplored
characters behind them.  ^R reverted those to spaces.

This is only a partial fix that works when the map is initially drawn
or fully redrawn.  But after tty erases parts of lines (when deleting
a menu that overlaid the map or when clearing a message line that
wrapped onto the top line of the map), unexplored locations show up
as space rather than as S_unexplored.

5 years agorestore 'use_inverse' option
PatR [Wed, 1 Apr 2020 21:58:40 +0000 (14:58 -0700)]
restore 'use_inverse' option

'use_inverse' used to be unconditionally present but conditionally
had default value True for WIN32 and False for others.  The options
changes that moved things to optlist.h made it present for WIN32 and
absent for others.  Put it back, and change the default value to be
unconditionally True.

5 years agomoat vs water
PatR [Wed, 1 Apr 2020 21:22:47 +0000 (14:22 -0700)]
moat vs water

Far-look and getpos's autodescribe feedback described the castle moat
as "water" and Juiblex's swamp similarly.  Describe them as "moat"
and as "swamp" instead.

5 years agoLevel compiler creates correct novel with supplied name
Patric Mueller [Wed, 1 Apr 2020 20:36:30 +0000 (22:36 +0200)]
Level compiler creates correct novel with supplied name

Before this commit, the name of a novel in the level files was ignored for
setting novelidx. But the name was set nevertheless, so you got a named novel
that showed quotes from a different novel.

Now, 'des.object({ id = "novel", name="Raising Steam"});' will work as
expected.

5 years agoquiet windows x86 warnings
nhmall [Wed, 1 Apr 2020 16:58:36 +0000 (12:58 -0400)]
quiet windows x86 warnings

nhlua.c(628): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data
nhlua.c(644): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data
nhlua.c(646): warning C4244: 'function': conversion from 'lua_Integer' to 'int', possible loss of data

5 years agoFix iron ball being deallocated when saving
Pasi Kallinen [Wed, 1 Apr 2020 09:20:14 +0000 (12:20 +0300)]
Fix iron ball being deallocated when saving

When swallowed by an air elemental, going down into a pit
placed the attached iron ball on the floor. Saving (or
using #wizmakemap) then deallocated the iron ball.

Check being swallowed before trying to go down.

5 years agoFix birth statistics for pets after #wizmakemap
Pasi Kallinen [Tue, 31 Mar 2020 17:19:29 +0000 (20:19 +0300)]
Fix birth statistics for pets after #wizmakemap

5 years agoFix lua selection error
Pasi Kallinen [Tue, 31 Mar 2020 16:07:21 +0000 (19:07 +0300)]
Fix lua selection error

There was a rare selection bug where selection was freed by the gc
but it was still in use. Don't remove the selections from the stack
while we're handling them.

5 years ago'submerged' status condition
PatR [Tue, 31 Mar 2020 09:38:12 +0000 (02:38 -0700)]
'submerged' status condition

Setting up the flag for the submerged condition was unnecessarily
complicated.  The display code distinguishes between being inside
water on Plane of Water and being underwater elsewhere (I'm not
sure why...) but as far as hero and player are concerned, being
submerged in water is the same on the Water level as anywhere else.
It actually is different; levitation and flying can't take the hero
above the surface because there isn't one, but that doesn't mean
that 'submerged' should be suppressed from status there.

5 years agotweaks for #wizlevelflip
PatR [Mon, 30 Mar 2020 11:58:28 +0000 (04:58 -0700)]
tweaks for #wizlevelflip

For interactive level flip, flip cached travel destination and
interrupted digging position.

Also, ball and chain handling wasn't right if the ball was carried.
The fix for that is untested because I don't know how to judge where
the flip area starts and stops and this code is for the case where
that boundary is straddled rather than having hero and ball and chain
all inside or all outside the flip area.

5 years agoFix monsters overflowing out of rooms in special levels
Pasi Kallinen [Sun, 29 Mar 2020 08:17:37 +0000 (11:17 +0300)]
Fix monsters overflowing out of rooms in special levels

In a special level, creating more monsters inside room contents
than was space in the room placed monsters outside the room,
possibly inside walls of rooms created afterwards.

Prevent monster creation if inside room contents and there's no
space for the monster.

5 years agoFix polymorphing monster trying to dig undiggable wall
Pasi Kallinen [Sat, 28 Mar 2020 13:43:00 +0000 (15:43 +0200)]
Fix polymorphing monster trying to dig undiggable wall

Not sure if this can actually happen in a non-modified game, but
my fuzz testing stopped here, so deal with it.

If a polymorphing monster turns into an earth elemental or other
wall-phasing monster, it can wander into a non-diggable area, and
then turn into a tunneling monster.
This caused mdig_tunnel to issue an impossible.

5 years agoFix purple worm ending up in solid wall
Pasi Kallinen [Sat, 28 Mar 2020 09:40:39 +0000 (11:40 +0200)]
Fix purple worm ending up in solid wall

If you're in a vault, the vault guard enters, and your tame purple worm
swallows and kills the guard, the worm ended up inside the vault wall.
Instead return the attacker to the old location, if the defender's
position isn't good.

5 years agofix #K669 - 'nasty' monster summoning
PatR [Sat, 28 Mar 2020 02:05:52 +0000 (19:05 -0700)]
fix #K669 - 'nasty' monster summoning

Report complained about multiple Archons causing his character to
be swarmed by monsters on the Plane of Fire.  I don't think that
the behavior has changed significantly from how it worked in 3.4.3.
Nobody can summon an Archon directly because they're excluded from
the nasties[] list.  But whenever summoning picks a genocided
'nasty', the result gets replaced by random monster of appropriate
difficulty for the level (which could be an Archon for a high level
character in the endgame).  [Note that that won't pick an Archon
in Gehennom or at arch-lich outside of there because the random
monster creation honors the only-in-hell and never-in-hell flags;
picking from the nasties[] list doesn't.]

This prevents that for any creature (except arch-lich or the Wizard)
casting the summon nasties spell.  If a replacement creature is a
spellcaster it now has to have lower difficulty than the summoner.
If not, it will be discarded even though its difficulty is classified
as appropriate.  So to summon an Archon, the summoner has to have
higher difficulty than an Archon; arch-lich and the Wizard are the
only ones meeting that criterium.  When summoner is an arch-lich,
it can't summon another arch-lich (since that wouldn't have lower
difficulty than the summoner) and can summon (via replacement for
genocided type, and only if outside of Gehennom) at most one Archon.
When summoner is the Wizard, he could summon an arch-lich (when in
Gehennom; demoted to master lich elsewhere--see below) or an Archon
(outside Gehennom only), but at most one per summoning.

For post-Wizard harassment, which effectively has infinite
difficulty level, it could still happen.  However, each instance of
harassment is only allowed to create at most one Archon or arch-lich
now, so chain summoning should be lessoned.  Also if it tries to
pick an arch-lich when outside of Gehennom it will switch to master
lich instead (which won't be allowed to summon an Archon or an arch-
lich or even another master lich).

(The monmove.c bit is unrelated, just some comment formatting that
I had laying around that got mixed in.)

5 years agoreformat monflag.h
PatR [Sat, 28 Mar 2020 00:47:07 +0000 (17:47 -0700)]
reformat monflag.h

I started out fixing some strangeness near the very bottom then
ended up redoing the whole thing.

5 years agoFix flipping while punished
Pasi Kallinen [Fri, 27 Mar 2020 15:19:27 +0000 (17:19 +0200)]
Fix flipping while punished

... if either you, the ball, or the chain are outside the flip area.
Just unplace the b&c and then put it down under the hero.
This can only happen via #wizlevelflip, as normal level flipping
is done when creating the level and b&c are not on the map.

5 years agoFix wizmakemap and teleport region
Pasi Kallinen [Fri, 27 Mar 2020 06:48:29 +0000 (08:48 +0200)]
Fix wizmakemap and teleport region

5 years agoteleds() vs ball&chain
PatR [Thu, 26 Mar 2020 08:31:46 +0000 (01:31 -0700)]
teleds() vs ball&chain

I think this should fix #K672 but without a test case I can't be sure.
The ball and chain handling in teleds() was a bit convoluted and this
streamlines it a bit.

There is still the situation that one place uses 'can't drag ball if
dist > 1' and another uses 'no need to move ball if dist <= 2'.  That
seems contradictory but I want to prevent my head from spinning so
haven't tried to puzzle it out.  Instead of relying on multiple flag
variables to decide whether to call placebc(), the ball and chain (or
just chain when ball is carried) will be replaced if they were on the
map before moving the hero and aren't there after assigning hero's
new location

5 years agoFix teleporting not unhiding polyed hero
Pasi Kallinen [Wed, 25 Mar 2020 17:57:21 +0000 (19:57 +0200)]
Fix teleporting not unhiding polyed hero

5 years agoExpose core random number functions to lua
Pasi Kallinen [Wed, 25 Mar 2020 10:24:02 +0000 (12:24 +0200)]
Expose core random number functions to lua

Expose nh.rn2() and nh.random() to lua.
Add a math.random() compatibility shim to nhlib.lua

5 years agoTry to fix pet location inconsistency again
Pasi Kallinen [Tue, 24 Mar 2020 19:56:19 +0000 (21:56 +0200)]
Try to fix pet location inconsistency again

5 years agobit
nhmall [Sun, 22 Mar 2020 11:39:44 +0000 (07:39 -0400)]
bit

5 years agofix github issue #304 - #offer old corpses
PatR [Sun, 22 Mar 2020 10:19:28 +0000 (03:19 -0700)]
fix github issue #304 - #offer old corpses

Same race corpses, deceased pet corpses, wraith corpses, and unicorn
corpses could be sacrificed even when otherwise too old.  This
prevents that for wraith and unicorn corpses but leaves the same
race and dead pet cases as is.  I'm not sure that this is the right
way to resolve things but at least has the virute of being simple.

This also lets chaotics get the trivial bonus for sacrificing a
wraith corpse even though alignment matches.  Alignment doesn't
matter for anything else (except unicorns) and giving up a wraith
corpse that isn't too old to eat is a tangible sacrifice.  Unless
the hero is vegetarian (or the supersets vegan and foodless) since
giving up a corpse that won't be eaten isn't worthy of a bonus.
(It will still retain regular sacrifice value in that situation.)

Fixes #304

5 years agofix github issue #315 - "Moving Pictures" typo
PatR [Sun, 22 Mar 2020 09:38:21 +0000 (02:38 -0700)]
fix github issue #315 - "Moving Pictures" typo

Transcription typo:  had "or", should have been "of".

5 years agoFix des tests
Pasi Kallinen [Sat, 21 Mar 2020 12:03:03 +0000 (14:03 +0200)]
Fix des tests

5 years agopraying on unaligned altar outside Gehennom
PatR [Sat, 21 Mar 2020 02:01:34 +0000 (19:01 -0700)]
praying on unaligned altar outside Gehennom

From a reddit thread, praying on the altar in orctown behaved like an
ordinary prayer directed at Moloch rather than being an exceptional
event.  Make it always be rejected.  The penalty is very trivial.

5 years agoPrevent setting boulder symbol to a control character
Pasi Kallinen [Fri, 20 Mar 2020 19:04:16 +0000 (21:04 +0200)]
Prevent setting boulder symbol to a control character

5 years agoPrevent zombies in trees in priest quest start
Pasi Kallinen [Fri, 20 Mar 2020 16:37:01 +0000 (18:37 +0200)]
Prevent zombies in trees in priest quest start

5 years agowarning fix
PatR [Thu, 19 Mar 2020 22:08:43 +0000 (15:08 -0700)]
warning fix

This one is more interesting that most....

|sp_lev.c:3745:9: warning: declaration shadows a variable in the
|      global scope [-Wshadow]
|boolean ladder;
|        ^
|../include/rm.h:538:20: note: expanded from macro 'ladder'
|#define ladder     flags /* up or down */
|                   ^
|../include/flag.h:428:29: note: previous declaration is here
|extern NEARDATA struct flag flags;
|                            ^

5 years agoCorrect timing when attaching lit candles to the candelabrum
Alex Smith [Thu, 19 Mar 2020 19:56:16 +0000 (19:56 +0000)]
Correct timing when attaching lit candles to the candelabrum

Before this commit, attaching a lit candle would reduce the amount
of fuel in the candelabrum to 0, 15 or 75 turns due to a failure to
account for time stored in the candle's burn timer. Fixing this is
very important because a time of 0 turns on the candelabrum is not
supposed to be possible.

5 years agoUnify special level c code for stairways
Pasi Kallinen [Thu, 19 Mar 2020 19:23:55 +0000 (21:23 +0200)]
Unify special level c code for stairways

5 years agoX11 fancy status overloaded conditions
PatR [Thu, 19 Mar 2020 01:46:21 +0000 (18:46 -0700)]
X11 fancy status overloaded conditions

Add 'tethered' and 'holding' as displable status conditions for X11.
For tty-style status, they're ordinary.  For 'fancy status', tethered
is displayed in the 'trapped' slot (since they'll never both be shown
at the same time) and holding is displayed in the 'held' slot (same
situation).

It's more proof of concept for overloading of status conditions than
adding useful specific conditions.  This was the third iteration; the
first two were either too fragile or used even more code.  It could
probably be simplified by making some mutally exclusive conditions be
more like hunger and encumbrance instead of being distinct flags

5 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
Alex Smith [Wed, 18 Mar 2020 23:02:04 +0000 (23:02 +0000)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

5 years agoSafety valve against candelabrum's .age becoming 0
Alex Smith [Wed, 18 Mar 2020 23:00:31 +0000 (23:00 +0000)]
Safety valve against candelabrum's .age becoming 0

This may have happened in a 3.7 game on Hardfought. Even if it didn't,
I'm still uncomfortable with the potential for the game to potentially
become unwinnable as a consequence of age field corruption. Add an
impossible() for when this situation happens, and code after the
impossible() to repair the game by removing the candles.

5 years agoMake Juiblex resist magical digging from inside
Pasi Kallinen [Wed, 18 Mar 2020 07:16:22 +0000 (09:16 +0200)]
Make Juiblex resist magical digging from inside

Juiblex should be a little bit harder to beat than zapping a digging
wand once you've gotten swallowed and then whacking him once.

Make his HP halve every time you zap digging instead of setting it
to 1.

Change via UnNetHack.

5 years agoX11 'fancy' status condition highlighting
PatR [Tue, 17 Mar 2020 22:04:54 +0000 (15:04 -0700)]
X11 'fancy' status condition highlighting

X11's "fancy status" does its own highlighting that predates
STATUS_HILITES, showing things which have changed in inverse video
for a turn.  However, it excluded conditions plus hunger and
encumbrance.  Make it highlight those similarly when they come On
(and when they change from one non-blank state to another in the
case of hunger or encumbrance).  There's no corresponding
unhighlight when going Off because they're blanked out instead.

5 years agoAlias "kirin" for "ki-rin"
Pasi Kallinen [Tue, 17 Mar 2020 17:06:32 +0000 (19:06 +0200)]
Alias "kirin" for "ki-rin"

5 years agoPrevent monsters in trees in monk quest start
Pasi Kallinen [Tue, 17 Mar 2020 16:09:33 +0000 (18:09 +0200)]
Prevent monsters in trees in monk quest start

5 years agoupdating 'time' status
PatR [Tue, 17 Mar 2020 00:32:12 +0000 (17:32 -0700)]
updating 'time' status

Handling botl updates for 'time' was inconsistent.  Set the flag to
do that when moves is incremented (where the update is suppressed if
running) or when running stops short.

losehp() would cancel running/traveling if called when in normal form
but not if called when polymorphed, so theoretically you could take
damage and keep on running.  I don't have a test case to verify that.

5 years agofix #K608 - ball and chain distance warning
PatR [Mon, 16 Mar 2020 22:40:52 +0000 (15:40 -0700)]
fix #K608 - ball and chain distance warning

This fixes the reported situation of recoiling from a throw while
levitating and carrying the ball not bringing the chain but it might
introduce other problems.  If it does, drag_ball() would be the place
to fix that, not hurtle_step().

Separate bug (not fixed):  throwing while the ball is on the floor
ought to let you recoil to as far as the chain will reach but it just
yields "you feel a tug from the ball" and you don't recoil at all.

5 years agoFix pet location inconsistency
Pasi Kallinen [Mon, 16 Mar 2020 20:13:17 +0000 (22:13 +0200)]
Fix pet location inconsistency

... if the pet attacked hero or another monster by eg.
swallowing them, the pet's location might've changed
during that attack. Count it as movement, so return
immediately.

5 years agoDon't flip column 0
Pasi Kallinen [Mon, 16 Mar 2020 20:10:37 +0000 (22:10 +0200)]
Don't flip column 0

5 years agoMove, rename, and comment out unused function
Pasi Kallinen [Mon, 16 Mar 2020 09:46:08 +0000 (11:46 +0200)]
Move, rename, and comment out unused function

5 years agoUse correct archaic form for "thine audience"
Patric Mueller [Mon, 16 Mar 2020 09:32:09 +0000 (10:32 +0100)]
Use correct archaic form for "thine audience"

Closes GitHub issue #313.

5 years agoUse TAINT_AGE for old corpses instead of hardcoded value
Pasi Kallinen [Mon, 16 Mar 2020 09:27:33 +0000 (11:27 +0200)]
Use TAINT_AGE for old corpses instead of hardcoded value

5 years agobotl fixes
PatR [Mon, 16 Mar 2020 09:19:28 +0000 (02:19 -0700)]
botl fixes

Add a couple of missing status updates.

5 years agoPrevent ogres in trees in barbarian quest start
Pasi Kallinen [Mon, 16 Mar 2020 06:58:07 +0000 (08:58 +0200)]
Prevent ogres in trees in barbarian quest start

5 years agoMajor amnesia revamp
Pasi Kallinen [Sun, 15 Mar 2020 09:29:32 +0000 (11:29 +0200)]
Major amnesia revamp

Instead of forgetting maps and objects, make amnesia forget skills.
Forgetting maps and objects could be circumvented with taking notes,
or by using an external tool to remember the forgotten levels.

Forgetting skills allows the player to optionally go down another
skill path, if they trained the wrong weapon in the early game.

Amnesia still forgets spells.

As a replacement for the deja vu messages when entering a forgotten
level, those messages will now indicate a ghost with your own name
existing on the level, given only when the level is entered for
the first time.

These changes based on fiqhack, with some adjustments.

5 years agoLock castle chest
Pasi Kallinen [Sat, 14 Mar 2020 19:46:06 +0000 (21:46 +0200)]
Lock castle chest

Just to keep the wand in the chest. Even if the soldiers pick up
the chest, they won't open it, and the wand is better protected.

5 years agoTone down scare monster by excluding humans and uniques
Pasi Kallinen [Sat, 14 Mar 2020 19:02:25 +0000 (21:02 +0200)]
Tone down scare monster by excluding humans and uniques

Scroll of scare monster completely shut down most of the actual
challenging monsters, such as uniques. Tone it down, so you can
use it to ignore the smaller threats while dealing with uniques,
or get most of the effect in the early game when you're usually
dealing with normal monsters.

5 years agoX11 status overhaul
PatR [Sat, 14 Mar 2020 10:47:27 +0000 (03:47 -0700)]
X11 status overhaul

I started out adding a few new status conditions to X11's "fancy status"
(the default) to gauge how difficult it was going to be.  In the process
I found several latent bugs.  After fixing those, I decided that the same
status conditions should be added to the alternate "tty-style status".
Lots more latent bugs, some of the same nature, others different.  Things
spiraled until the code change is very substantial.

Code for the old two-line status is still present but I don't know how
to activate it.  Unlike tty-style status, it composes and displays two
lines of text and isn't capable of highlighting portions of that text,
so it would be considered deprecated anyway.

All testing was done with the default NetHack.ad (except when turning
'fancy_status' off) so I don't know whether the new code might override
previously customizable status settings.  I'm not sure whether this list
covers all the fixes....

both tty-style and fancy
  add new status conditions 'grabbed' (by eel), 'held', 'trapped', and
    'sinking-into-lava' (others will eventually follow); grab and lava
    are on by default, the others have to be enabled via options

both tty-style (not handled) and fancy (faulty boolean logic)
  polymorphing didn't change Xp to HD (silver lining: rehumanizing
    didn't need to reverse it)

tty-style only; fancy was ok
  force white text (on black background) instead of settling for gray
  turning on optional showexp, showscore, and/or time worked but turning
    them back off again didn't remove the relevant fields
  polymorphing when showexp was on didn't suppress Exp-points

tty-style only; fancy uses different layout
  condense conditions into simple left-to-right space separated list
    instead of giving them specific locations and having gaps of blank
    space for conditions that aren't in effect

tty-style only; not applicable for fancy (status_hilites not implemented)
  all highlights stuck if 'statushilites' was reset to 0 to disable them
  displaying anything with bold attribute stuck; it wouldn't revert to
    normal text if a different highlight rule without bold was used for
    subsequent updates
  avoid inverting leading space that separates from preceding field when
    highlighting with inverse video attribute
  add support for 'dim' attribute using gray foreground (only viable
    after the fix for white foreground)

fancy only
  reorganize the field layout so that things line up nicely instead of
    having columns with six, seven, or eight lines be spread over same
    amount of vertical space
  line up the values of the six characteristics, similar to how vertical
    status works in curses: all two digits; when exceptional strength is
    present, the '18' lines up and rest goes past implicit right margin
  use status conditions as provided by core instead of duplicating them
    (other fields still duplicate stuff done in botl.c); doing this
    required forcing 'VIA_WINDOWPORT()' if built without STATUS_HILITES

5 years agoFlip timed effects
Pasi Kallinen [Sat, 14 Mar 2020 09:28:29 +0000 (11:28 +0200)]
Flip timed effects

In wizard mode, freezing some water on the ground, then
flipping the level did not flip the coordinate of the ice
thawing timed effect. This could cause an impossible complaint.

5 years agoFix vault guard leaving monsters encased in stone
Pasi Kallinen [Fri, 13 Mar 2020 17:28:56 +0000 (19:28 +0200)]
Fix vault guard leaving monsters encased in stone

For some reason the vault guard fake corridor code checked
if the hero was outside the corridor before removing monsters.
But the vault end of the corridor usually gets sealed off
even while you're still in the corridor. This left monsters
stuck in solid rock.

5 years agomsdos build fix
nhmall [Fri, 13 Mar 2020 14:48:17 +0000 (10:48 -0400)]
msdos build fix

../include/optlist.h:510:62: error: macro "NHOPTC" requires 10 arguments, but only 9 given
                 "color mappings for internal screen routines")
                                                              ^

../include/optlist.h:562:52: error: macro "NHOPTP" requires 10 arguments, but only 9 given
                 "prefix for old micro IBM_ options")
                                                    ^

5 years agoFix priest generated inside temple wall
Pasi Kallinen [Thu, 12 Mar 2020 17:13:08 +0000 (19:13 +0200)]
Fix priest generated inside temple wall

In a rare case, a random room's width can be 2 tiles, and if
that room was converted into a temple, the priest ended up
inside the wall. Try to put the priest on a random valid position
around the altar, or on it.

5 years agoHandle gone portal for migrating monsters
Pasi Kallinen [Wed, 11 Mar 2020 17:52:09 +0000 (19:52 +0200)]
Handle gone portal for migrating monsters

If the quest portal was gone, due to hero expulsion, migrating monsters
caused an impossible.

5 years agoFlip locations only if inside the flip area
Pasi Kallinen [Wed, 11 Mar 2020 17:21:38 +0000 (19:21 +0200)]
Flip locations only if inside the flip area

Objects and hero outside the level area (embedded in undiggable
rock by eg. polying into earth elemental) cannot be flipped.

5 years agofountain vs perm_invent
PatR [Wed, 11 Mar 2020 11:40:51 +0000 (04:40 -0700)]
fountain vs perm_invent

From a reddit thread.  Quaffing from a fountain can curse some of
hero's inventory, but when doing so it wasn't updating the persistent
inventory window if that was enabled.

It could also set the cursed flag on goid pieces; so could dipping.

5 years agoball and chain panic when teleporting
PatR [Tue, 10 Mar 2020 22:59:01 +0000 (15:59 -0700)]
ball and chain panic when teleporting

"remove_obj: obj not on floor" when trying to move the iron ball.
For the circumstances involved, the ball wasn't supposed to be
moved anyway, just the chain.

I could reproduce the problem using the steps specified.  I didn't
track down the precise point of failure but after this fix the
panic can't be reproduced anymore.

5 years agoHandle gone portal when going back in quest
Pasi Kallinen [Tue, 10 Mar 2020 19:49:38 +0000 (21:49 +0200)]
Handle gone portal when going back in quest

5 years agoMake sure random doors don't open into solid wall
Pasi Kallinen [Tue, 10 Mar 2020 16:08:40 +0000 (18:08 +0200)]
Make sure random doors don't open into solid wall

When making a random door into a random wall or random position
in a room, keep trying harder to find a location that doesn't
have solid wall behind it.

Fixes the Wizard tower door.

5 years agoPrevent wizmode panic
Pasi Kallinen [Tue, 10 Mar 2020 06:02:08 +0000 (08:02 +0200)]
Prevent wizmode panic

In wizard mode, if you angered your quest leader and got expelled from
the quest (which removes the quest portal from the dungeon), then used
the wizmode level teleport menu to teleport back to the quest start and
talked with the angry leader, you would get booted back to the dungeon,
and the game panicked because the dungeon end of the portal didn't
exist anymore.

5 years agofixes37.0
PatR [Sun, 8 Mar 2020 23:02:22 +0000 (16:02 -0700)]
fixes37.0

Remove the entry about creating Guidebook.dat on Unix since it got
moved to 3.6.6.

The orc town raiders were introduced in 3.6.2, not to-be-3.7, so the
fixes entry for unintentionally giving orc zombies and orc mummies
clan names should be in the general fixes section rather than the
exposed by git section.

5 years agominor #wizmakemap fix - revoked achievements
PatR [Sun, 8 Mar 2020 21:51:22 +0000 (14:51 -0700)]
minor #wizmakemap fix - revoked achievements

When replacing Mines' End or top of Sokoban, the achievement for
finding the special prize there is reset.  But the code to do so was
accidentally inside the monster processing loop and got repeated for
each monster on the old instance of the level (essentially a no-op
after the first one though).  That code had been updated more than
once without noticing.  Move it out of the loop.

5 years agoFix flipping some monsters
Pasi Kallinen [Sun, 8 Mar 2020 18:01:39 +0000 (20:01 +0200)]
Fix flipping some monsters

Don't flip the guard waiting to be disposed of.
Don't flip the occasional monster (usually an earth elemental)
outside the level bounds.

5 years ago^G limit
PatR [Sun, 8 Mar 2020 17:29:39 +0000 (10:29 -0700)]
^G limit

Relax the count limit from 255 to ROWNO*(COLNO-1) so that it can
be big enough to fill an entire level yet remain small enough to
not churn away seemingly forever if an absurd amount is specified
for 'random' or for a class rather than a type.  (By-type already
gives up as soon as failure occurs, so is implicitly limited to a
count matching the available space on the level.)  Also impose the
same limit on 'count ^G monster' as '^G count monster'.

5 years agoMake special levels generate objects with genocided monster classes
Pasi Kallinen [Sun, 8 Mar 2020 12:03:47 +0000 (14:03 +0200)]
Make special levels generate objects with genocided monster classes

If a special level explicitly requests eg. a statue with a genocided
monster class, allow generating it.

Rationale is that those objects were generated before the monsters
became extinct. Also fixes a lua error.

5 years agoThis is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt
nhw_cron [Sat, 7 Mar 2020 20:24:04 +0000 (15:24 -0500)]
This is cron-daily v1-Jan-20-2020.  guidebook updated: doc/Guidebook.txt

5 years agoLimit wizgenesis to max 255 monsters
Pasi Kallinen [Sat, 7 Mar 2020 22:15:28 +0000 (00:15 +0200)]
Limit wizgenesis to max 255 monsters

5 years agoFail fetch-lua in Unix Makefile more gracefully
Pasi Kallinen [Sat, 7 Mar 2020 20:38:23 +0000 (22:38 +0200)]
Fail fetch-lua in Unix Makefile more gracefully

If missing curl or failing to download the lua tarball,
don't try to untar the nonexistent file.

5 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Sat, 7 Mar 2020 19:36:24 +0000 (14:36 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

5 years agomerge bit
nhmall [Sat, 7 Mar 2020 19:36:03 +0000 (14:36 -0500)]
merge bit

5 years agoFix wizmakemap to consider monster birth counts and uniques
Pasi Kallinen [Sat, 7 Mar 2020 19:33:31 +0000 (21:33 +0200)]
Fix wizmakemap to consider monster birth counts and uniques

Also add a new wizmode command #wizborn to show those.

5 years agoremove mhitm.c's 'otmp'
PatR [Sat, 7 Mar 2020 19:20:45 +0000 (11:20 -0800)]
remove mhitm.c's 'otmp'

Get rid of a couple of variables that were file scope and then
incorporated into 'g'.  This should prevent the situation where
attacking a shade gave bogus feedback about glorkum although I
never did reproduce that.

This eliminates g.otmp and g.dieroll but leaves a couple of others.
g.vis really should go away....

5 years agoMerge NetHack 3.6 updates into NetHack-3.7
nhmall [Sat, 7 Mar 2020 19:08:40 +0000 (14:08 -0500)]
Merge NetHack 3.6 updates into NetHack-3.7

5 years agomon's glorkum pass harmlessly through the shade
PatR [Sat, 7 Mar 2020 18:47:51 +0000 (10:47 -0800)]
mon's glorkum pass harmlessly through the shade

I couldn't reproduce the problem; it appears to depend upon whether
the file-scope variable 'otmp' has a stale value, and that might
happen after a monster has tried to steal mon's saddle.  However,
the code pointed out in the report is clearly wrong.  This prevents
feedback of "glorkum" (with plural verb since quantity of 0 isn't 1),
but the potential stale value hasn't been dealt with.

5 years agoupdate visual studio props file
nhmall [Sat, 7 Mar 2020 16:45:35 +0000 (11:45 -0500)]
update visual studio props file

5 years agoclear travis boolean prerelease flag as well
nhmall [Sat, 7 Mar 2020 16:38:42 +0000 (11:38 -0500)]
clear travis boolean prerelease flag as well

5 years agoupdate .travis.yml
nhmall [Sat, 7 Mar 2020 16:32:50 +0000 (11:32 -0500)]
update .travis.yml

5 years agofixes doc bit
Pasi Kallinen [Sat, 7 Mar 2020 15:18:19 +0000 (17:18 +0200)]
fixes doc bit

Previous commit should've been:

Fixes #311

5 years agoFix flipping non-existent stairs
Pasi Kallinen [Sat, 7 Mar 2020 15:05:39 +0000 (17:05 +0200)]
Fix flipping non-existent stairs

If the stair or ladder x coord is 0, it doesn't exist.
Flipping it, caused "u_on_newpos: trying to place hero off map <80,0>"
when coming back up from the valley into the castle, and the
castle was flipped.

Fixes #331

5 years agolua special level feature flags
Pasi Kallinen [Fri, 6 Mar 2020 18:17:23 +0000 (20:17 +0200)]
lua special level feature flags

Allow des.feature() to set rm flags for the special features.

5 years agofix #H4545 - stack of scrolls of scare monster
PatR [Fri, 6 Mar 2020 17:24:33 +0000 (09:24 -0800)]
fix #H4545 - stack of scrolls of scare monster

Reported 3.5 years ago.  Specifying a count for pickup to pick up a
subset of a stack was processed after scrolls of scare monster were
handled, so a whole stack of those got picked up or crumbled to dust
whether you gave a count or not.  Also, if you were too encumbered to
pick up the full stack, they still all crumbled or all changed state
to crumble next time, then for the latter case you picked up as big a
subset as you could handle.

5 years agoone more redundant entry
nhmall [Fri, 6 Mar 2020 17:01:59 +0000 (12:01 -0500)]
one more redundant entry

5 years agoremove redundant entries that are now in fixes36.6
nhmall [Fri, 6 Mar 2020 16:58:23 +0000 (11:58 -0500)]
remove redundant entries that are now in fixes36.6

5 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Fri, 6 Mar 2020 16:24:07 +0000 (11:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

5 years agoThis is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt
nhw_cron [Fri, 6 Mar 2020 16:24:08 +0000 (11:24 -0500)]
This is cron-daily v1-Jan-20-2020.  guidebook updated: doc/Guidebook.txt

5 years agomerge bits
nhmall [Fri, 6 Mar 2020 16:30:39 +0000 (11:30 -0500)]
merge bits

5 years agoamiga .gitattributes bit
nhmall [Fri, 6 Mar 2020 16:04:24 +0000 (11:04 -0500)]
amiga .gitattributes bit

5 years agoREADME bit
nhmall [Fri, 6 Mar 2020 16:00:51 +0000 (11:00 -0500)]
README bit

5 years agoMerge March 2020 changes into NetHack 3.7
nhmall [Fri, 6 Mar 2020 15:59:50 +0000 (10:59 -0500)]
Merge March 2020 changes into NetHack 3.7