Commit Graph

10493 Commits

Author SHA1 Message Date
Pasi Kallinen
596ba4bb8a Fix des tests 2020-03-21 14:03:03 +02:00
PatR
abb492007e 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.
2020-03-20 19:01:34 -07:00
Pasi Kallinen
6227bdf438 Prevent setting boulder symbol to a control character 2020-03-20 21:04:16 +02:00
Pasi Kallinen
a65fc97b44 Prevent zombies in trees in priest quest start 2020-03-20 18:37:01 +02:00
PatR
24f0aa2dc9 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;
|                            ^
2020-03-19 15:08:43 -07:00
Alex Smith
dd6ebbacea 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.
2020-03-19 19:56:16 +00:00
Pasi Kallinen
a142ac8140 Unify special level c code for stairways 2020-03-19 21:23:55 +02:00
PatR
126743ac0c 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
2020-03-18 18:46:21 -07:00
Alex Smith
c698b5654c Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-03-18 23:02:04 +00:00
Alex Smith
564dd1db8d 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.
2020-03-18 23:00:31 +00:00
Pasi Kallinen
9ab6994eae 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.
2020-03-18 09:16:26 +02:00
PatR
3546b2f016 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.
2020-03-17 15:04:54 -07:00
Pasi Kallinen
750d2fe560 Alias "kirin" for "ki-rin" 2020-03-17 19:06:32 +02:00
Pasi Kallinen
a57894cedb Prevent monsters in trees in monk quest start 2020-03-17 18:09:33 +02:00
PatR
40d19525c3 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.
2020-03-16 17:32:12 -07:00
PatR
8ccc9773aa 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.
2020-03-16 15:40:52 -07:00
Pasi Kallinen
15019248ae 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.
2020-03-16 22:17:15 +02:00
Pasi Kallinen
44ba4a9e96 Don't flip column 0 2020-03-16 22:10:37 +02:00
Pasi Kallinen
712f545119 Move, rename, and comment out unused function 2020-03-16 11:46:08 +02:00
Patric Mueller
9862d2c934 Use correct archaic form for "thine audience"
Closes GitHub issue #313.
2020-03-16 10:33:31 +01:00
Pasi Kallinen
408321b4f7 Use TAINT_AGE for old corpses instead of hardcoded value 2020-03-16 11:28:09 +02:00
PatR
f6a282ec99 botl fixes
Add a couple of missing status updates.
2020-03-16 02:19:28 -07:00
Pasi Kallinen
abbfabd498 Prevent ogres in trees in barbarian quest start 2020-03-16 08:58:07 +02:00
Pasi Kallinen
04c59fff0a 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.
2020-03-15 11:57:34 +02:00
Pasi Kallinen
b0e645a650 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.
2020-03-14 21:49:18 +02:00
Pasi Kallinen
dc9fe0d8bc 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.
2020-03-14 21:04:08 +02:00
PatR
3cd9d1afd8 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
2020-03-14 03:47:27 -07:00
Pasi Kallinen
55bfc8115a 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.
2020-03-14 11:28:32 +02:00
Pasi Kallinen
961b2a11ff 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.
2020-03-13 19:32:47 +02:00
nhmall
5c3670b1f0 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")
                                                    ^
2020-03-13 10:48:17 -04:00
Pasi Kallinen
2ff8523481 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.
2020-03-12 19:17:06 +02:00
Pasi Kallinen
a6c600fd61 Handle gone portal for migrating monsters
If the quest portal was gone, due to hero expulsion, migrating monsters
caused an impossible.
2020-03-11 19:52:12 +02:00
Pasi Kallinen
9adb11238a 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.
2020-03-11 19:25:52 +02:00
PatR
e7b301537f 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.
2020-03-11 04:40:51 -07:00
PatR
5d2f719b02 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.
2020-03-10 15:59:01 -07:00
Pasi Kallinen
f664e83070 Handle gone portal when going back in quest 2020-03-10 21:49:38 +02:00
Pasi Kallinen
ae471e71b2 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.
2020-03-10 18:11:30 +02:00
Pasi Kallinen
67d3cd31f8 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.
2020-03-10 08:02:12 +02:00
PatR
a2cb638236 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.
2020-03-08 16:02:22 -07:00
PatR
debeadfbbe 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.
2020-03-08 14:51:22 -07:00
Pasi Kallinen
9ea2fb7422 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.
2020-03-08 20:01:41 +02:00
PatR
feb85ad83c ^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'.
2020-03-08 10:29:39 -07:00
Pasi Kallinen
f18b5bb59b 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.
2020-03-08 14:08:32 +02:00
nhw_cron
7b226a12cb This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-03-07 18:56:07 -05:00
Pasi Kallinen
aca240c928 Limit wizgenesis to max 255 monsters 2020-03-08 00:15:28 +02:00
Pasi Kallinen
fcfa5dc267 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.
2020-03-07 22:38:33 +02:00
nhmall
ba534a337a Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-03-07 14:36:24 -05:00
nhmall
97cf78d0e6 merge bit 2020-03-07 14:36:03 -05:00
Pasi Kallinen
f5d9324f28 Fix wizmakemap to consider monster birth counts and uniques
Also add a new wizmode command #wizborn to show those.
2020-03-07 21:35:26 +02:00
PatR
2a37fe5a3b 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....
2020-03-07 11:20:45 -08:00