]> granicus.if.org Git - nethack/log
nethack
5 years agoUse 8 bit mode if available
Ray Chason [Sat, 25 Jan 2020 18:38:02 +0000 (13:38 -0500)]
Use 8 bit mode if available

This was not previously done because the palette was not correctly set
up, and QEMU gave incorrect colors. The palette setup function now
falls back to the standard BIOS function if the VESA BIOS function
fails, which resolves the issue with QEMU. The mode selection logic now
favors 8 bit color if the tile set is compatible.

Using 8 bit mode means fewer writes to memory and fewer uses of the
BIOS window function.

5 years agomore wizard mode wishing for terrain
PatR [Sun, 26 Jan 2020 20:23:50 +0000 (12:23 -0800)]
more wizard mode wishing for terrain

Try a lot harder to keep terrain/level flags in a sane state.  They're
overloaded so it's not simple.

Creating a fountain or sink incremented the corresponding counter (for
controlling ambient sounds) but removing one by wishing for something
else in its place didn't decrement.

Allow wish for "disturbed grave" to create a grave with the 'disturbed'
flag set, similar to existing "magic fountain" and 'blessedftn' flag.
(I didn't add "looted throne", "looted tree", and several other things
that use the 'looted' overload of 'rm.flags'.)

Automate block_point (tree, cloud, secret corridor, or secret door in
open doorway) and add unblock_point (use Pass_wall to move into wall
or tree or stone, or just walk onto a cloud, then make iron bars or
almost any other wishable terrain to replace the blocking feature).

5 years agoleft out of "limit rate of long worm growth"
PatR [Sun, 26 Jan 2020 13:12:55 +0000 (05:12 -0800)]
left out of "limit rate of long worm growth"

5 years agolimit rate of long worm growth
PatR [Sun, 26 Jan 2020 12:57:13 +0000 (04:57 -0800)]
limit rate of long worm growth

Make long worms grow more slowly (although that didn't seem to make
as much a difference as expected) and limit the amount of HP they
acculate if they shrink and then re-expand.  Shrinking doesn't take
away max HP but growing used to always add to max.  Now it won't add
to max HP unless the number of segments is at that worm's peak, so
shrinking will inhibit the exhorbitant HP expansion that idle worms
have had.

5 years agoCloud wish should block vision
Pasi Kallinen [Sun, 26 Jan 2020 12:33:11 +0000 (14:33 +0200)]
Cloud wish should block vision

5 years agoAllow wizmode wishing for cloud terrain
Pasi Kallinen [Sun, 26 Jan 2020 12:05:11 +0000 (14:05 +0200)]
Allow wizmode wishing for cloud terrain

5 years agoachievement tracking oversight
PatR [Sun, 26 Jan 2020 10:58:18 +0000 (02:58 -0800)]
achievement tracking oversight

obj->record_achieve_special (overlay of obj->corpsenm) is no longer
used.

5 years agoworm.c cleanup
PatR [Sat, 25 Jan 2020 22:12:10 +0000 (14:12 -0800)]
worm.c cleanup

Mostly removing 'register', but also clear stale wgrowtime[] values
at the time they become obsolete instead of waiting for initworm()
to replace them when eventually re-used.

5 years agodisclose achievements
PatR [Sat, 25 Jan 2020 01:00:49 +0000 (17:00 -0800)]
disclose achievements

When disclosing conduct at end of game (but not during except in
wizard mode), display achievements too.  They're also included in
dumplog if it's enabled.  Previously they were only output as an
extra field in xlogfile.

5 years agosimplify achievement tracking for special objects
PatR [Fri, 24 Jan 2020 21:54:23 +0000 (13:54 -0800)]
simplify achievement tracking for special objects

This turned out to be a lot more work than I anticipated, but it is
definitely simpler (other than having #wizmakemap take achievements
away if you replace the level that contains the 'prize', which wasn't
handled before).

I cheated and made Mine's End into a no-bones level because the new
flagging scheme for luckstone, bag, and amulet can't carry over from
one game to another.  It probably should have been no-bones all along.
Sokoban didn't have this issue because it's already no-bones.

Existing save files are invalidated.

5 years agoloading Lua scripts
PatR [Fri, 24 Jan 2020 21:26:01 +0000 (13:26 -0800)]
loading Lua scripts

When loading a Lua script, modify it with a comment containing the
file name (or DLB module name) so that error reporting doesn't just
show the first 60 bytes of the script.  Also, don't assume that it's
possible to load an entire script in one fread().  Unfortunately
that got way out of hand and the result isn't pretty.  But something
of the sort is necessary.  (Reading the script into one string first
and then applying modifications while copying it into a second one
would probably be a lot cleaner than mixing the two operations.)

If a script starts with a comment or a blank line, the insertion of
the file name comment won't disturb the line number reported in an
error message.  But if the script starts out with code on its first
line, error reports will be off by one for the line number.  Showing
the file name is more useful than keeping that number accurate.

5 years agoLua error reporting buffer overflow
PatR [Fri, 24 Jan 2020 20:52:35 +0000 (12:52 -0800)]
Lua error reporting buffer overflow

nhl_error() was clobbering the stack.  I assume that the 'source'
field in the Lua debugging structure is normally a file name, but
nethack loads an entire Lua script into one long string because it
usually comes out of the DLB container, and 'source' contained the
full string.  That would overflow the local buffer in nhl_error()
if nethack encountered a Lua problem and tried to report it. (In
my case, the problem was in a level description file modification.)

[Not something under user control unless user can modify dat/*.lua
and put the result into $HACKDIR/nhdat.]

5 years agowizard mode un-polymorph
PatR [Wed, 22 Jan 2020 02:29:23 +0000 (18:29 -0800)]
wizard mode un-polymorph

When already polymorphed, polymorphing into 'human' (or character's
species) to revert to normal when at low level has the infuriating
tendency to yield "your new form isn't healthy enough to survive".
Allow specifying your own role as a way to rehumanize() instead of
going through newman() and level/sex/characteristics randomization
which that performs.

5 years agohalf poison gas damage from wearing a wet towel
PatR [Wed, 22 Jan 2020 01:03:54 +0000 (17:03 -0800)]
half poison gas damage from wearing a wet towel

Make wearing a wet towel confer new attribute Half_gas_damage in
addition to the usual blindness.  It reduces damage from being inside
a gas cloud region and from being hit by poison gas breath attack.
It also fully blocks breathing of potion vapors.

Might make the Plane of Fire easier although overcoming its blindness
with telepathy won't reveal elementals.  Definitely has the potential
to make blind-from-birth conduct easier which wasn't the intent and
probably isn't significant.

5 years agono more headless eyewear
PatR [Tue, 21 Jan 2020 23:36:33 +0000 (15:36 -0800)]
no more headless eyewear

Noticed while working on something else:  hero kept wearing a towel
after polymorphing into a form without any head.  And when not already
wearing one, could put on a blindfold/towel/lenses while in a headless
form.

5 years agowielded tin opener
PatR [Tue, 21 Jan 2020 23:11:59 +0000 (15:11 -0800)]
wielded tin opener

For simplified weapon description (used by ^X and a few other places),
show "tin opener" instead of generic "tool" for that item since there
are cases where it is expected to be wielded.

Also, don't describe a wielded "glob of <foo>" as "food".

5 years agoadd some long worm comments
PatR [Tue, 21 Jan 2020 14:20:45 +0000 (06:20 -0800)]
add some long worm comments

and keep the remove_monster()+place_monster() followed by worm_move()
operations together.  No change in behavior.

5 years agotravis-ci bits: try to avoid failure-flagging on transient connectivity issues
nhmall [Mon, 20 Jan 2020 16:10:16 +0000 (11:10 -0500)]
travis-ci bits: try to avoid failure-flagging on transient connectivity issues

Attempt to test whether Lua fetch succeeded (and pdcurses for windows
and msdos as well)

If those prerequisite fetches and untars didn't work, just exit without
marking the travis-ci build as a failure so that the development team
isn't notified about something transient that they don't need to fix
in the code.

5 years agoThis is cron-daily v1-Jan-19-2020. manpages updated: nethack.txt
nhw_cron [Mon, 20 Jan 2020 04:17:10 +0000 (23:17 -0500)]
This is cron-daily v1-Jan-19-2020.  manpages updated: nethack.txt

5 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Mon, 20 Jan 2020 04:11:31 +0000 (23:11 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

5 years agodoc bit; closes #287
nhmall [Mon, 20 Jan 2020 04:09:53 +0000 (23:09 -0500)]
doc bit; closes #287

closes #287

5 years agoFix warning on nonexistent quest.lua text
Pasi Kallinen [Wed, 15 Jan 2020 18:17:02 +0000 (20:17 +0200)]
Fix warning on nonexistent quest.lua text

Cavemen don't have goal_alt message - before lua, that one
fell through into goal_next message, but now it tried to
load the "common" message. Add ability to define message fallbacks,
and make goal_next the fallback for goal_alt.

Also prevent issuing quest.lua errors twice.

5 years agolosing via #offer to Moloch
PatR [Sun, 19 Jan 2020 02:47:01 +0000 (18:47 -0800)]
losing via #offer to Moloch

Recently added "you hear an invisible choir chant in Latin ..."  is
jarring.  Unfortunately, something like "in an archaic language" would
make the message too long so just take out "in Latin".

Also a few reformatting bits for pray.c.

5 years agoimplicit_uncursed, mention_walls
PatR [Fri, 17 Jan 2020 12:03:14 +0000 (04:03 -0800)]
implicit_uncursed, mention_walls

Move 'implicit_uncursed' and 'mention_walls' from iflags to flags to
make their current setting persist across save/restore.  Invalidates
existing save files.

5 years agofix #K188 - trying to move past edge of level
PatR [Fri, 17 Jan 2020 10:43:32 +0000 (02:43 -0800)]
fix #K188 - trying to move past edge of level

Trying to move into a wall or solid rock fails and doesn't do anything
(unless the 'mention_walls' option is On) and doesn't use a turn, and
trying to move off the edge of the map window also doesn't do anything
(except for 'mention_walls') but that did use a turn.  Don't.

5 years agocloses #282
nhmall [Wed, 15 Jan 2020 04:50:06 +0000 (23:50 -0500)]
closes #282

closes #282

5 years agoThis is cron-daily v1-Jan-14-2020. files updated: Files
nhw_cron [Tue, 14 Jan 2020 16:17:46 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  files updated: Files

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: recover.txt
nhw_cron [Tue, 14 Jan 2020 16:17:43 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: recover.txt

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: nethack.txt
nhw_cron [Tue, 14 Jan 2020 16:17:43 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: nethack.txt

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: mnh.txt
nhw_cron [Tue, 14 Jan 2020 16:17:43 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: mnh.txt

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: mn.txt
nhw_cron [Tue, 14 Jan 2020 16:17:43 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: mn.txt

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: makedefs.txt
nhw_cron [Tue, 14 Jan 2020 16:17:43 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: makedefs.txt

5 years agoThis is cron-daily v1-Jan-14-2020. manpages updated: dlb.txt
nhw_cron [Tue, 14 Jan 2020 16:17:42 +0000 (11:17 -0500)]
This is cron-daily v1-Jan-14-2020.  manpages updated: dlb.txt

5 years agofix #K166 - role selection filtering
PatR [Mon, 13 Jan 2020 20:34:01 +0000 (12:34 -0800)]
fix #K166 - role selection filtering

pick_role() had a 5 year old copy+paste error where a pair of lines
were cloned multiple times but one of the resulting lines didn't get
the intended revision, preventing OPTIONS=align:!chaotic or !neutral
or !lawful from working as intended when letting the game choose role
randomly.  The bad line should have been calling ok_align() but that
routine turned out to have a bug too.

Fixing those lead to other less obvious problems with role selection,
particularly the tty menu version for picking manually.  Roles and/or
races which should have been excluded by partial specification weren't
always kept out.  Also, if any filtering was specified, trying to
disable all filters (via choosing 'reset filtering' and de-selecting
everything in the menu) was a no-op.  Once any filtering was in place
you had to leave at least one role or race or gender or alignment
flagged as not acceptable in order to change any of the filtering.
When that was fixed and it was possible to turn off all filtering,
there was no way to turn it back on because the menu choice to reset
the filters wasn't offered unless there was some filtering in place
(that was intentional but turned out not to be a good idea).

I checked curses and X11; they both offer less versatile selection
capability that don't seem to need the tty-specific fixes.

5 years agomore giant walking onto boulder feedback
PatR [Mon, 13 Jan 2020 11:46:51 +0000 (03:46 -0800)]
more giant walking onto boulder feedback

autopick_testobj() needs to bypassed during move-without-pickup as
well as when autopicked is disabled.  I hope this is finally right.

5 years agornd_class()
PatR [Mon, 13 Jan 2020 06:16:49 +0000 (22:16 -0800)]
rnd_class()

Guard against potential bad arguments:  first index greaer than last.
Return STRANGE_OBJECT instead of hardcoded 0 if it ever fails (which
should be impossible with good arguments).

5 years agoupdate novel fixes entry
PatR [Mon, 13 Jan 2020 06:15:37 +0000 (22:15 -0800)]
update novel fixes entry

5 years agomore random novels
PatR [Mon, 13 Jan 2020 06:02:36 +0000 (22:02 -0800)]
more random novels

Give statues 'real' spellbooks only.

Provide mkobj() a way to accomplish that instead of resorting to
mksobj(rnd_class()).

5 years agorandonly occurring Discworld novels
PatR [Sun, 12 Jan 2020 19:00:38 +0000 (11:00 -0800)]
randonly occurring Discworld novels

Give 'novel' a 1 in 1000 chance of being created in place of each
random spellbook (except for hero's initial inventory and NPC
priests' monster inventory and divine reward for prayer--those all
force regular spellbooks; statue contents aren't among the
exceptions--those books can now be novels).  Shop inventory (where
first book or scroll shop created is guaranteed one novel) hasn't
been touched.  If there is any other special spellbook handling
somewhere, I've overlooked it.

5 years agospell maneuver correctly
PatR [Sun, 12 Jan 2020 17:19:17 +0000 (09:19 -0800)]
spell maneuver correctly

5 years agofix github issue #279 - boulder feedback
PatR [Sun, 12 Jan 2020 13:05:24 +0000 (05:05 -0800)]
fix github issue #279 - boulder feedback

Polymophed into a giant and moving onto a boulder's location could
yield "you easily pick it up" (without actually doing so) followed
by "you see a boulder here".  It would happen if autopickup was Off,
or if the 'm' move-without-autopickup prefix was used, while either
boulder was included in pickup_types (including when that is set
for 'all') or hero had thrown that particular boulder and
pickup_thrown was On.  The check for whether auto-pick should try
on an object relied on its caller verifying that autopickup was On.
pickup() does that for
 pickup() -> autopick() -> autopick_testobj()
but moverock() wasn't doing that for
 moverock() -> autopick_testobj()
so the logic controlling moverock's message was subverted.

I first thought that logic itself was incorrect and changed the
message.  This keeps the new message even though it turned out not
to be cause of the problem.

Fixes #279

5 years agosupport haggis when pluralizing thus avoiding haggi
nhmall [Sun, 12 Jan 2020 01:04:32 +0000 (20:04 -0500)]
support haggis when pluralizing thus avoiding haggi

5 years agoRestrict the teleportation notification to actual teleportations
Patric Mueller [Sat, 11 Jan 2020 11:24:02 +0000 (12:24 +0100)]
Restrict the teleportation notification to actual teleportations

teleds() is used for more than just teleportations, the teleportation message
was also given when mounting a steed.

Trying out a new bit flags method parameter design pattern.

5 years agohallucinatory water and lava terrain
PatR [Sat, 11 Jan 2020 17:34:01 +0000 (09:34 -0800)]
hallucinatory water and lava terrain

When browsing the map while hallucinating and looking at a pool, a
moat, or 'other' water or at molten lava, report with hallucinatory
liquids rather than the ordinary substance.  Likewise when browsing
self on map or using ^X would report "sinking into lava".

5 years agodata.base lookup fix
PatR [Sat, 11 Jan 2020 16:45:45 +0000 (08:45 -0800)]
data.base lookup fix

Changing data.base lookup to accept leading spaces as an alternative
to the normal leading tab ended up adding an invalid integrity check.
Lines without any leading space or tab were considered to be in error
but empty lines are present so need to be accepted.

5 years agofix github issue #277 - repeat door open failure
PatR [Fri, 10 Jan 2020 21:13:36 +0000 (13:13 -0800)]
fix github issue #277 - repeat door open failure

The change to make "ouch! you bump into a door" use up a turn didn't
end running, so when it happened while running useless turns took
place and that message was delivered repeatedly until some other
action interrupted the hero.  It didn't matter whether autoopen is
enabled.

Fixes #277

5 years agosilence a warning about use of potentially uninitialized variable
nhmall [Fri, 10 Jan 2020 20:10:47 +0000 (15:10 -0500)]
silence a warning about use of potentially uninitialized variable

5 years agomore trap feedback
PatR [Fri, 10 Jan 2020 14:53:48 +0000 (06:53 -0800)]
more trap feedback

When trapped in lava, change the text from "stuck in the lava" to
"sinking into lava" to describe the situation much more accurately.
Instead of doing that twice, move the u.utraptype feedback into a
separate routine that both enlightenment and self-lookat can use.

5 years agoescaping buried iron ball
PatR [Fri, 10 Jan 2020 12:36:28 +0000 (04:36 -0800)]
escaping buried iron ball

Noticed while testing the look-at-self feedback for traps.  When
punished and the iron ball gets buried, hero becomes "tethered to a
buried object".  It is possible to simply walk away (like from a pit,
bear trap, web, stuck in floor by solidified lava or sinking into
molten lava) but that requires many tries.  Once the escape happens,
"you finally wrench the ball free" and are supposed to have it
reattached to a replacement chain.  However, buried_ball() wouldn't
look at buried objects if the trap countdown timer was 0 (which is
the case when finally wrenching free).  So hero got a new chain to
drag around but it had no heavy iron ball attached.

I didn't turn on sanity checking but that would have complained about
this.  Normal dragging didn't care but I wouldn't be surprised if
various actions that checked Punished and picked up the ball in order
to put it down again elsewhere would have had possibly serious trouble.

5 years agorandomized trap names
PatR [Fri, 10 Jan 2020 02:45:06 +0000 (18:45 -0800)]
randomized trap names

Use trapname() in several more places.  I wasn't systematic about it.

trapname() could generate a random value of 0 and attempt to use
"real trap #0" but 0 is NO_TRAP.  So it ended up with "water" from
the preceding block of entries in defsyms[].  Treat 0 as an extra
chance for the actual trap instead of an hallucinatory one.

Add a couple more hallucinatory traps.  "Roach Motel" is trademarked
but like Spam and Band-Aid, general usage has trampled over it.  I
included "(tm)" anyway.  Also, sometimes generate "<role> trap" or
"<rank> trap" on the fly.  Why should tourists get all the fun?

5 years agoenhanced look-at-self
PatR [Fri, 10 Jan 2020 00:59:30 +0000 (16:59 -0800)]
enhanced look-at-self

^X reports whether you're caught in a trap, but neither looking at
yourself (via '//' or ';' or other getpos autodescribe) nor looking
"here" (via ':') said anything about that.  Make looking at yourself
do so.

5 years agoreadobjnam() tidying
PatR [Thu, 9 Jan 2020 02:01:04 +0000 (18:01 -0800)]
readobjnam() tidying

Move wizard mode wishing for traps and terrain from readobjnam() to a
separate routine.

5 years agomore wishing for Amulet of Yendor
PatR [Thu, 9 Jan 2020 01:21:47 +0000 (17:21 -0800)]
more wishing for Amulet of Yendor

Make wish for "amulet of yendor" be the same as "real amulet of yendor"
instead of preserving the 3.6.x behavior of having a 50% chance of it
yielding "fake amulet of yendor".

Both the "real" and "fake" prefixes are still accepted, but "real" has
become a no-op:
 !real and fake, real and fake => fake
 real and !fake, !real and !fake => real
so fake vs !fake always decides the result.

5 years agoUnpaid globs showed weight info unconditionally outside of wizmode
Patric Mueller [Wed, 8 Jan 2020 10:26:40 +0000 (11:26 +0100)]
Unpaid globs showed weight info unconditionally outside of wizmode

globwt() didn't check for wizmode, so unpaid globs would be shown with weight
information even for normal player.

Eliminated globwt() completely and consolidated the output of aum in one place
as we don't really care about the ordering of debug info in wizmode.

5 years agofix #K112 - fumbling vs autoopen
PatR [Wed, 8 Jan 2020 01:57:38 +0000 (17:57 -0800)]
fix #K112 - fumbling vs autoopen

Report complained that having autoopen not work when fumbling was
inconvenient and mentioned that the "ouch! you bump into a door"
result didn't take any time.  This updates the documentation to
state that autoopen won't work while fumbling (so the inconvenient
behavior persists) but changes movement so that bumping into a door
now takes time.  (Despite "ouch!", it doesn't inflict any damage.)

Also, document the recently added autounlock option.

5 years agotethered aklys description
PatR [Tue, 7 Jan 2020 12:40:20 +0000 (04:40 -0800)]
tethered aklys description

Recent object formatting changes for wielded weapon put some pline
arguments in the wrong order.
 a - aklys (weapontethered  in hand)
or worse, when dual-wielding
 a - aklys (wieldedtethered  in right hand)
Change back to
 a - aklys (tethered weapon in hand)
or
 a - aklys (tethered weapon in right hand)

I considered (tethered weapon wielded in right hand) for the two-
weapon case, but I think that's too verbose.

5 years agofix #K119 - wishing for Amulet of Yendor
PatR [Tue, 7 Jan 2020 10:59:25 +0000 (02:59 -0800)]
fix #K119 - wishing for Amulet of Yendor

Wizard mode wishing for "Amulet of Yendor" has a 50% chance of
yielding a cheap plastic imitation.  Allow asking for "real Amulet
of Yendor" and "fake Amulet of Yendor" to provide precise control.
Asking for "real Amulet of Yendor" in normal play will be accepted
but then overridden with the fake amulet as usual.

Without the prefix, there's still a 50:50 chance for either amulet.
"real fake amulet of yendor" and "fake real amulet of yendor" both
yield a fake one.

When handling "amulet of yendor", any of "cheap", "plastic",
"imitation", "cheap plastic", "cheap imitation", and "plastic
imitation" are now recognized to mean "cheap plastic imitation".
Unlike prefixes such as "blessed rustproof" vs "rustproof blessed",
these two-word ones (or the three-word whole thing) need to be in
specific order and after the general prefixes.  Also, any of those
force "fake" even if an explicit "real" prefix came before them.

5 years agoAdd missing NULLs to lua function reg array
Pasi Kallinen [Tue, 7 Jan 2020 06:44:36 +0000 (08:44 +0200)]
Add missing NULLs to lua function reg array

5 years agoFixes for degenerate RNG
Pasi Kallinen [Mon, 6 Jan 2020 09:48:16 +0000 (11:48 +0200)]
Fixes for degenerate RNG

Assume a degenerate RNG that always returns the same number.
With these fixes, the game starts and is almost playable.
There are still some places that will go into infinite loop, eg.
the mines level generation.

5 years agofix #K125 - autounlock vs touching artifacts
PatR [Mon, 6 Jan 2020 07:54:11 +0000 (23:54 -0800)]
fix #K125 - autounlock vs touching artifacts

Apply makes a touch_artifact check on the tool being applied, but
autounlock would pick an unlocking tool to use without doing that.
Noticed while fixing that:  autounlock took no time.

Since picking an artifact unlocking tool might now blast the hero,
change the tool selection.  First choice: any key except another
role's quest artifact; second: any lock-pick except another role's
quest artifact; third: any credit card except another role's quest
artifact; fourth, fifth, sixth: other roles' quest artifact key,
lock-pick, or credit card.  The fifth category (artifact lock-picks)
is empty.  Rogues will pick non-cursed Master Key over any other
key (special case for first choice).  Tourists will pick a key or
a lock-pick over their PYEC (first and second choices over third).

5 years agoMerge branch 'copperwater/sokoban_penalties' into NetHack-3.7
Patric Mueller [Mon, 6 Jan 2020 00:00:46 +0000 (01:00 +0100)]
Merge branch 'copperwater/sokoban_penalties' into NetHack-3.7

Closes #260

5 years agoRemove Sokoban luck penalties for things you can't cheat with
copperwater [Tue, 11 Sep 2018 15:57:24 +0000 (11:57 -0400)]
Remove Sokoban luck penalties for things you can't cheat with

Jumping, Newton's 3rd Law hurtling, and throwing an iron ball:
attempting to do any of these in such a way that you would diagonally
pass between boulders/walls causes the Luck penalty. However, none of
these actually get you through the diagonal gap, thus they can't be used
to cheat and the penalty doesn't make sense.

5 years agoMove enhance_tip into context and don't show tip if #enhance has been used before
Patric Mueller [Sun, 5 Jan 2020 15:10:50 +0000 (16:10 +0100)]
Move enhance_tip into context and don't show tip if #enhance has been used before

Breaks save and bones compatibility.

5 years agowizard mode wishing for secret doors
PatR [Sun, 5 Jan 2020 21:13:21 +0000 (13:13 -0800)]
wizard mode wishing for secret doors

Allow wishing for secret doors and secret corridors.  It's a bit
more strict about where the wish is performed than wishing for
furniture.  Implemented in order to test drum of earthquake effects.

I spent a lot of time figuring out SDOOR details that somebody
already knew at some point but evidently didn't document--you can't
specify D_CLOSED for them or the display code will issue impossible
warnings about wall mode angles.

5 years agomore earthquake
PatR [Sun, 5 Jan 2020 19:30:38 +0000 (11:30 -0800)]
more earthquake

When a drum of earthquake targets a secret door, reveal it (which
is always followed by collapsing the door), and when it targets a
secret corridor, reveal that corridor.  Both situations also place
a pit at the location.

5 years agoUnify random light state for rooms or level
Pasi Kallinen [Sun, 5 Jan 2020 11:30:25 +0000 (13:30 +0200)]
Unify random light state for rooms or level

5 years agofix #K105 - earthquake chasms
PatR [Sun, 5 Jan 2020 09:20:15 +0000 (01:20 -0800)]
fix #K105 - earthquake chasms

Drum of earthquake can try to destroy fountains, thrones, altars,
sinks, and graves but it wouldn't do so because maketrap() had been
changed to prevent clobbering furniture with traps.  So you might get
"the throne falls into a chasm" but the throne would remain intact.

Change furniture to be floor before trying to create a pit.  The gist
of the patch is the 'if' after 'do_pit:' and also some changes to the
revealing of hidden monsters.  The rest is reformatting.

5 years agotwoweapon tweaks
PatR [Sun, 5 Jan 2020 02:22:04 +0000 (18:22 -0800)]
twoweapon tweaks

Don't allow dual-wielding if either wielded or alternate weapon
(or both) is a launcher:  bow, crossbow, or sling.  (I thought that
this had been addressed ages ago.)

Refine the "can't twoweapon" feedback.  The message for having
either or both hands empty is the same, but sentence construction
is different.  The not-a-weapon feedback is slightly different, now
mentioning whether it's the wielded or alternate weapon which isn't
allowed.  The case where neither are acceptable still just reports
uwep; mentioning both it and uswapwep would be too verbose.

Make more things be described as "(wielded)" instead of "(weapon in
hand)".  It was just stacks with quantity more than 1.  That's now
joined by ammo and missiles (any stack size, but in reality just 1
since greater was already being caught here) and any quantity of
non-weapon, non-weptool.  It's overridden if dual-wielding so that
right/left stay matched.

When dual-wielding, list primary as "(wielded in right hand)" and
secondary as "(wielded in left hand)" instead of "(weapon in hand)"
and "(wielded in other hand)".  The vaguer wording was better for
bows since they're held in the off hand but now that they can't be
dual-wielded that doesn't matter.  (Single-wielding a bow is still
"(weapon in hand)".)

When not dual-wielding, the item in the alternate weapon slot is
still described as "(alternate weapon; not wielded)" even if it's
not actually a weapon.  I couldn't think of better phrasing.

5 years agocandelabrum vs candles bit
PatR [Sun, 5 Jan 2020 01:22:18 +0000 (17:22 -0800)]
candelabrum vs candles bit

Move declaration to start of block so that C99 isn't required.

5 years agoApplying a spellbook hints about read charges left
Patric Mueller [Sat, 4 Jan 2020 12:17:18 +0000 (13:17 +0100)]
Applying a spellbook hints about read charges left

Applying a spellbook allows the player to flip through the pages, providing an
indication of how many reads it has left before turning blank.

Originally from UnNetHack but code almost completely refactored and updated
for post 3.4 changes like deafness and novels.

5 years agoWhen hallucinating, see hallucinated currencies instead of bits for an ale
Patric Mueller [Sat, 4 Jan 2020 13:55:55 +0000 (14:55 +0100)]
When hallucinating, see hallucinated currencies instead of bits for an ale

5 years agoMerge branch 'copperwater_consolidated_pull_request_265'
Patric Mueller [Sat, 4 Jan 2020 22:12:34 +0000 (23:12 +0100)]
Merge branch 'copperwater_consolidated_pull_request_265'

This includes most commits from GitHub pull request #265 with some code
adjustment and documentation in doc/fixes37.0.

5 years agoUpdate fixes37.0
Patric Mueller [Sat, 4 Jan 2020 22:03:45 +0000 (23:03 +0100)]
Update fixes37.0

5 years agoShow the teleportation messages only with flags.verbose
Patric Mueller [Sat, 4 Jan 2020 21:46:58 +0000 (22:46 +0100)]
Show the teleportation messages only with flags.verbose

5 years agoAlways print a message when the hero level teleports
copperwater [Tue, 12 Jun 2018 15:33:36 +0000 (11:33 -0400)]
Always print a message when the hero level teleports

For much the same reason as the horizontal teleport message: various
forms of level teleportation produce no message indication at all that
you just ended up somewhere else.

5 years agoAlways print a message when the hero teleports
copperwater [Tue, 29 May 2018 02:12:47 +0000 (22:12 -0400)]
Always print a message when the hero teleports

It's useful to get a message as indication you suddenly moved somewhere.
For instance, MSGTYPE=stop can be used on this to avoid bumbling in the
wrong direction after a spontaneous uncontrolled teleport.

5 years agoTeach non-mindless monsters about the Castle trapdoors
copperwater [Fri, 1 Feb 2019 17:21:42 +0000 (12:21 -0500)]
Teach non-mindless monsters about the Castle trapdoors

This feature is originally from SliceHack, but the original code
directly edited the monmove code, whereas I thought it was cleaner to
use the existing mtrapseen code. Thus, this commit just marks trapdoors
as "seen" for all non-mindless monsters generated in the Castle level
(the same way all monsters in Sokoban are marked aware of pits and
holes).

This change prevents these Castle monsters from moving onto trapdoors
97.5% of the time. (A determined player can still patiently sit and wait
for everyone in the castle to plunge like lemmings into the trapdoors,
but it will now take 40 times as long.) Also unlike SliceHack, this only
excludes mindless monsters - not all non-humanoids. There are plenty of
intelligent non-humanoid monsters generated right next to the trapdoors,
after all.

This is aimed at better flavor (the inhabitants of the castle should
know about the traps in their own area) and better scenery in the Valley
(doesn't seem as much of a valley of the dead if there are hordes of
soldiers milling around down there).

I considered sticking an in_mklev condition onto this if statement, so
that monsters spawned into the Castle after its creation will fall down
the trapdoors, but ultimately decided against it.

5 years agoDefault shk sell prompt to N
copperwater [Tue, 12 Jun 2018 13:36:54 +0000 (09:36 -0400)]
Default shk sell prompt to N

It can get annoying when you accidentally sell something you didn't mean
to by hitting space or enter at this prompt.

5 years agoUnderwater fire scroll causes vaporization regardless of confusion
copperwater [Fri, 25 Jan 2019 20:57:09 +0000 (15:57 -0500)]
Underwater fire scroll causes vaporization regardless of confusion

This is originally from the variant SliceHack. Rationale: there's still
fire being summoned, so it should vaporize some water.

5 years agoBetter reporting directions for impossible()
copperwater [Thu, 19 Dec 2019 03:25:12 +0000 (22:25 -0500)]
Better reporting directions for impossible()

Rather than just informing the player that saving and reloading might
fix the problem, they are now encouraged to report the problem to the
value of DEVTEAM_EMAIL. If the sysconf specifies SUPPORT, that is also
presented as an option.

5 years agoAdd a default message for chatting to gnomes
copperwater [Tue, 5 Feb 2019 03:45:45 +0000 (22:45 -0500)]
Add a default message for chatting to gnomes

Message is a reference to The Silver Chair. Most of the other races had
their own messages already, but gnomes would just default to discussing
dungeon exploration, which doesn't make that much sense most of the
times when you would be chatting to them in their own mines.

The quotation is edited from the source to reflect the dungeon
environment, but the sentiment is actually pretty spot-on given the
average player's win ratio.

Note: this doesn't interfere with the South Park gnome speech added to
3.6 a while ago; that only occurs when hallucinating and this only
occurs when not hallucinating.

5 years agoCall potion bottles by nonsensical names if hallucinating
copperwater [Fri, 25 Jan 2019 14:27:55 +0000 (09:27 -0500)]
Call potion bottles by nonsensical names if hallucinating

From SliceHack. Note that this refers to the description of the physical
bottle; it's a substitute for "phial", "carafe", "flask", etc. such as
are seen when a potion crashes on someone's head. They don't obscure the
randomized appearance or actual potion identity.

The SliceHack version evidently went through several revisions; just
take the current one.

5 years agoNeutral sacrifices disappear in a cloud of smoke
copperwater [Sat, 22 Dec 2018 14:38:40 +0000 (09:38 -0500)]
Neutral sacrifices disappear in a cloud of smoke

The general idea here came from SpliceHack -- give each alignment a
unique effect in what happens to its sacrifices -- but the "puff of
smoke" in Splice seemed too small.

5 years agoGive player message informing them they can use #enhance
copperwater [Sat, 8 Dec 2018 18:51:23 +0000 (13:51 -0500)]
Give player message informing them they can use #enhance

Triggers when you feel more confident in your skills. This is to address
a problem I have heard about several times from newer players: unless
you pay close attention to the guidebook, nothing in the game actually
indicates that you can level up your abilities and how to do it.

Experienced players don't need this message, of course; they can hide it
via MSGTYPE if they really hate it, but I additionally added a clause
that prevents this message from being displayed more than once per game
session. (It didn't seem important enough to make a save field for.)

5 years agoSuppress "Unknown command" messages in the dumplog.
copperwater [Thu, 13 Sep 2018 18:27:06 +0000 (14:27 -0400)]
Suppress "Unknown command" messages in the dumplog.

Backported from TNNT. Only affects dumplog pline history, not any other
form of pline history.

The impetus for this is to avoid dumplogs full of "Unknown command foo."
messages which don't provide any value for people reading the file. In
many cases, these messages crowd out the actual message history, making
it hard to reconstruct what happened.

5 years agoRemove "iron hook" unidentified description
copperwater [Tue, 24 Apr 2018 03:09:40 +0000 (23:09 -0400)]
Remove "iron hook" unidentified description

It's confusing and served no purpose; a spoiled player knew what it is,
an unspoiled player might think it was a hook-hand or something. Now
they all show up as grappling hook.

5 years agoChoir chanting, bathing in darkness before Moloch snuffs out your life
copperwater [Wed, 6 Dec 2017 02:27:06 +0000 (21:27 -0500)]
Choir chanting, bathing in darkness before Moloch snuffs out your life

Inspired by a Dudley's Dungeon strip. No gameplay change, just flavor.

5 years agoShow "You feel very comfortable here" message when crowned
copperwater [Tue, 23 Jan 2018 19:34:59 +0000 (14:34 -0500)]
Show "You feel very comfortable here" message when crowned

5 years agoCandelabrum now reads "(n of 7 candles attached)"
Patric Mueller [Sat, 4 Jan 2020 12:08:08 +0000 (13:08 +0100)]
Candelabrum now reads "(n of 7 candles attached)"

It wasn't obvious enough before that the Candelabrum has seven candle
slots. This makes it show it clearly.

5 years agoOnly output candelabrum tip if candles are in inventory
Patric Mueller [Sat, 4 Jan 2020 11:59:09 +0000 (12:59 +0100)]
Only output candelabrum tip if candles are in inventory

5 years agoApplying a candelabrum with no candles gives a tip
copperwater [Sun, 1 Jul 2018 15:51:55 +0000 (11:51 -0400)]
Applying a candelabrum with no candles gives a tip

"This candelabrum has no candles. To attach candles, apply them instead
of the candelabrum."

5 years agoReplace awful "You feel cold" message for freezing a door you can't see
copperwater [Mon, 2 Jul 2018 12:03:47 +0000 (08:03 -0400)]
Replace awful "You feel cold" message for freezing a door you can't see

That message implied something to do with an effect happening to the
hero that causes them to feel cold, such as taking cold damage.
Change it to "You hear a deep cracking sound" instead.

5 years agoFix unused param warning
Pasi Kallinen [Sat, 4 Jan 2020 15:26:53 +0000 (17:26 +0200)]
Fix unused param warning

5 years agoAdd some player lua methods
Pasi Kallinen [Sat, 4 Jan 2020 14:55:50 +0000 (16:55 +0200)]
Add some player lua methods

Adds u.clear_inventory() and u.giveobj(new.obj("rock")) and some other minor stuff.

5 years agofix inaccuracies in comment
nhmall [Sat, 4 Jan 2020 12:35:53 +0000 (07:35 -0500)]
fix inaccuracies in comment

5 years agodisplay of data.base entries
PatR [Sat, 4 Jan 2020 11:35:11 +0000 (03:35 -0800)]
display of data.base entries

Make data.base display perform a couple of extra data integrity
checks and meet tabexpand()'s expectation about buffer size.

Also be a little more forgiving in case someone uses spaces instead
of a tab to indent new text lines.

5 years agoadd some bullet-proofing to tabexpand()
PatR [Sat, 4 Jan 2020 11:33:57 +0000 (03:33 -0800)]
add some bullet-proofing to tabexpand()

Include some bounds checking for tabexpand, but it assumes caller
passes a BUFSZ buffer rather than having that caller pass the actual
size.

5 years agoUpdate map glyph when placing obj on map via lua
Pasi Kallinen [Sat, 4 Jan 2020 09:35:17 +0000 (11:35 +0200)]
Update map glyph when placing obj on map via lua

5 years agoold bits in doc files
nhmall [Wed, 1 Jan 2020 16:59:43 +0000 (11:59 -0500)]
old bits in doc files

5 years ago2020
nhmall [Wed, 1 Jan 2020 15:12:16 +0000 (10:12 -0500)]
2020