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.
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.
'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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.)
... 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.
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
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
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.
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;
| ^
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.
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
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.
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.
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.
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.
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.
... 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.