Commit Graph

3687 Commits

Author SHA1 Message Date
PatR
a21b6534db X11 vs S_unexplored
X11 was still initializing a blank map to 'stone' instead of to
'unexplored'.  When the core started forcing 'unexplored' as part
of cls(), you could see the S_stone background show up and then be
overwritten with S_unexplored.

Also, X11 is [still] drawing unused column 0.  That was also 'stone'
but has been changed to 'nothing' so is now blank for both tiles map
and text map (regardless of S_unexplored value).  The extra useless
column doesn't look too bad normally but does if a vertical scroll
bar is added to support a clipped map.
2020-04-05 13:37:06 -07:00
copperwater
a9dd7a5a46 Don't interrupt tin opening if being slimed and tin is chameleon
Another SliceHack feature. It's possible for you to eat the chameleon
tin and turn into a fiery monster that burns off the slime in its
natural form, either extremely luckily at random or if you have
polymorph control.
2020-04-05 16:10:33 +03:00
copperwater
1b945bf60a Blessed teleport scrolls now give a single controlled teleport
This buffs the blessed effect of the teleport scroll by providing the
reader control over their destination even if they lack teleport
control. This seems like it makes the blessed/uncursed distinction
actually meaningful, rather than mostly pointless.
2020-04-05 16:08:22 +03:00
copperwater
f54485b913 Pets will not eat shapeshifter corpses except in extreme circumstances
Ported from SpliceHack, and generalized to all shapeshifters (Splice
only implemented it for chameleons). It's very aggravating when your
powerful but hungry pet chows down on a shapeshifter before you can stop
them and then turns into something much more useless, so this aims to
prevent that.

The extreme circumstances under which a pet will eat a shapeshifter are:
  1. The pet is starving, and prefers polymorph to starvation
  2. The pet's tameness is 1

The reasoning behind the second condition is that if you mistreat your
pet almost to the point of untaming it, it might want to take a chance
on turning into something that might get some more respect from you.
Practically, whenever this happens, this will result in the player now
owning a newly polymorphed and *still* nearly feral pet.
2020-04-05 16:01:39 +03:00
copperwater
30ad8eed84 Make demon lords hostile if wielding Demonbane as well as Excalibur
This makes a lot of sense. Why would they hate one artifact sword so
much and not really care about the one that is especially designed to
kill their type personally?
2020-04-05 15:42:38 +03:00
copperwater
e13b1833cc Scroll of remove curse becomes learned when items' curses are removed
The scroll of remove curse is trivially identified by checking inventory
after reading it to see whether anything became uncursed. This leads to
annoying tactics like remembering which scroll you just read so you can
go call it "remove curse" on the discoveries list.

This simply autoidentifies it when an item that was known to be cursed
has its curse removed.
2020-04-05 15:40:21 +03:00
copperwater
da3afd39d2 Deliberate level teleporter activation ignores magic resistance
This is aimed at providing a little quality of life in the form of not
having to divest yourself of your sources of magic resistance before
using a level teleporter. The player is already able to use regular
teleport traps while Antimagic; there's no reason why it should be
different for level teleporters.

This ultimately comes from "Stevie-O's level teleporter jump patch", by
way of SliceHack. I simplified it a bit: deliberately jumping onto the
trap always takes time even if it fails to levelport you (which would
only happen with level teleporters in the End Game, which don't exist).
2020-04-05 15:34:20 +03:00
copperwater
63d3d7b688 You may survive food poisoning with a Con/100 chance
Another feature from SliceHack. Randomly averting an instadeath might
seem a little too generous, but the only time you get food poisoning is
if you're a new player who hasn't learned about tainted corpses yet or
if you just did something stupid. So, be a little nicer in those
scenarios.

If you survive, your Con silently decreases by 1. Hey, it's better than
dying.
2020-04-05 15:15:30 +03:00
copperwater
4129706a4c Potions of hallucination can give enlightenment
This is also from SliceHack, but with the odds of enlightenment toned
down a bit, to 4/9 for a blessed potion and 1/6 for an uncursed potion
(SliceHack had it at 50% blessed, 20% cursed, and strangely, 0%
uncursed). It gives a much-needed use to one of the potions that's
commonly blanked or discarded.
2020-04-05 15:06:43 +03:00
Pasi Kallinen
1ba1422eba Confused scroll of light conjures tame cancelled lights
Tame cancelled lights are actually quite interesting and useful: they
are a mobile light source that will follow you around, and because they
are cancelled they won't explode at hostile monsters.

This replaces the existing confused scroll effect of creating an area of
darkness (the cursed scroll of light still produces this effect). If you
are confused *and* the scroll is cursed, it summons black lights instead
of yellow ones.

Original change by copperwater <aosdict@gmail.com>, added with
formatting and some functional changes.
2020-04-05 13:21:54 +03:00
Pasi Kallinen
cf1c725148 Purple worm changes
Shriekers only spawn purple worms when they're appropriate difficulty.
Non-tame Purple worms eat corpses off the ground.
Baby purple worms attack shriekers.
Hero polyed into baby purple worm is warned against shriekers.

Original changes by copperwater <aosdict@gmail.com>, added with some
formatting adjustments and consolidation.
2020-04-05 12:44:25 +03:00
PatR
c8044a202b switch_terrain() logic bug causing status updates
When moving onto a different terrain type, the logic for whether to
block or unblock levitation and flying (for the case of moving in
or out of walls and solid stone with Passes_walls while levitating)
was correct but the XOR logic for whether to do a status update
because of such a change was incorrect.  So stepping from room floor
to furniture or to doorway and vice versa or from corridor to doorway
and vice versa was requesting a status update when there was no need
for one.

Some other code must be requesting a status update when it is needed
for this (or possibly even more often than that?) because the status
line does seem to show the current state of Lev and Fly accurately.
Otherwise this should have been noticed when switch_terrain() was
first implemented.
2020-04-04 02:41:13 -07:00
Pasi Kallinen
e34f123698 Make hezrous stink 2020-04-03 21:05:49 +03:00
PatR
689c3e67fe 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.
2020-04-01 14:58:40 -07:00
PatR
616029561b 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.
2020-04-01 14:22:47 -07:00
Patric Mueller
acf6f5fdff 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.
2020-04-01 22:36:30 +02:00
Pasi Kallinen
62538f8e62 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.
2020-04-01 12:20:18 +03:00
Pasi Kallinen
b8668da3ea 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.
2020-03-28 11:40:42 +02:00
PatR
3eed500886 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.)
2020-03-27 19:05:52 -07:00
Pasi Kallinen
75a24d2846 Fix teleporting not unhiding polyed hero 2020-03-25 19:57:25 +02:00
Pasi Kallinen
eec9c2e209 Expose core random number functions to lua
Expose nh.rn2() and nh.random() to lua.
Add a math.random() compatibility shim to nhlib.lua
2020-03-25 12:24:32 +02:00
PatR
549f6fba52 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
2020-03-22 03:19:28 -07:00
PatR
ade91fd119 fix github issue #315 - "Moving Pictures" typo
Transcription typo:  had "or", should have been "of".
2020-03-22 02:38:21 -07: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
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
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
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
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
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
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
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
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
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
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
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
nhmall
d2009bc8d0 Merge NetHack 3.6 updates into NetHack-3.7 2020-03-07 14:08:40 -05:00
PatR
44b6612fdc 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.
2020-03-07 10:47:51 -08:00
Pasi Kallinen
d89b9c8c1a fixes doc bit
Previous commit should've been:

Fixes #311
2020-03-07 17:18:30 +02:00
Pasi Kallinen
2fc9c02f88 lua special level feature flags
Allow des.feature() to set rm flags for the special features.
2020-03-06 20:30:15 +02:00
PatR
3f377b9405 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.
2020-03-06 09:24:33 -08:00
nhmall
6c57144a0e one more redundant entry 2020-03-06 12:01:59 -05:00
nhmall
d8b1d19137 remove redundant entries that are now in fixes36.6 2020-03-06 11:58:23 -05:00
nhw_cron
3fbdfe788f This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-03-06 11:31:52 -05:00