The enchantment spells were skewed towards lower spell levels,
and didn't seem to correspond with the spell effectiveness or
power. Adjust the spell levels:
- Confuse monster is probably the least powerful enchantment, and
also requires touch to work, so make it the new level 1 spell.
- Sleep is quite powerful, and ray, bump it to level 4.
- Charm monster is even more powerful so make it level 5.
(Considering that create familiar is level 6)
old new
sleep 1 4
confuse monster 2 1
slow monster 2 2
cause fear 3 3
charm monster 3 5
Also swap sleep and confuse monster generation probability.
Pull request from argrath: the code that decides whether to add 'B'
for blessed items, 'X' for unknown bless/curse state and so forth
when setting up prompting for the 'I' command was counting up the
recently introduced "just picked up" category using an uninitialized
variable. So it might erroneously include 'P' as a choice when no
such items were present.
Closes#683
I've seen complaints how looting containers is tedious, and
since multiple containers in the same location are now (and have
been for a while) handled with a menu, the yes-no-quit prompt
for a single container doesn't really mean anything.
Remove that prompt, and remove the "open carefully" message too,
so when you're looting a location with a single container, the
command will drop straight into the loot-in-out -menu. Also
adjust one looting message to explicitly mention the container
if there are other objects on top of it.
Removing the prompt means you can't loot a saddle from a tame
monster with plain loot when standing on a container - you need
to prefix the loot command with 'm' prefix in that case.
Reordering "killed for the first time" and "hit with a wielded weapon
for the first time" was done by moving the latter to hmon(). Hitting
with an applied polearm also gave the first-hit message since it
bypassed the routine that had been doing so. But the throwing code
that handles applied polearms calls hmon() for damage, so after that
reordering, the first-hit log message became duplicated if triggered
by polearm usage.
Also, fix a quibble with the wizard mode conduct message given after
never-hit-with-wielded-weapon conduct has been broken. The message
said "used a wielded weapon N times" when it meant "hit with a wielded
weapon N times". "Used" is misleading if that wielded weapon happens
to be a pick-axe, so change the message to say "hit with".
Move a bunch of stuff out of main() into new early_options(): '-dpath'
playground directory handling, '-s ...' show scores instead of playing,
and the 'argcheck()' options: --version, --showpaths, --dumpenums,
and --debug (not to be confused with -D). Also introduce
| --nethackrc=filename
| --no-nethackrc
to control RC file without using NETHACKOPTIONS so that that is still
available for setting other options. They can start with either one
or two dashes. --no-nethackrc is just --nethackrc=/dev/null under the
hood. '-dpath' can now be '--directory=path' or '--directory path'
but the old syntax should still work. '-s ...' can be '--scores ...'.
Basic call sequence in unixmain relating to options is now
|main() {
| early_options(argc, argv[]);
| initoptions(); /* process sysconf, .nethackrc, NETHACKOPTIONS */
| process_options(possibly_modified_argc, possibly_modified_argv[]);
|}
Options processed by early_options() that don't terminate the program
are moved to the end of argv[], with argc reduced accordingly. Then
process_options() only sees the ones that early_options() declines to
handle.
Most early options were using plain exit() instead of nh_terminate()
so not performing any nethack-specific cleanup. However, since they
run before the game starts, there wasn't much cleanup being overlooked.
chdirx() takes a boolean as second argument but all its callers were
passing int (with value of 1 or 0, so it still worked after being
implicitly fixed by prototype). Change them to pass TRUE or FALSE.
argcheck() was refusing (argc,argv[]) with count of 1 but then it was
checking 0..N-1 rather than 1..N-1, so it tested whether argv[0] was
an argument instead of skipping that as the program name. Change to
allow count of 1 with modified argv that has an option name in argv[0].
That happens to fit well with how early_options() wanted to use it.
From EvilHack, under the basis that anyone trained in martial arts (or
is in a powerful kicking polyform or wearing kicking boots) should be
immune from landing such a poor kick. This bypass used to happen only
50% of the time; now it happens all the time.
Note that this only averts the "Your clumsy kick does no damage" case:
it remains possible for a powerfully kicking player to kick clumsily and
have the monster evade or block, for example if they are fumbling or
wearing bulky armor.
Also, documentation: I added a comment explaining what the incredibly
dense and confusing logic is with i and j happening here, for the next
poor soul that has to read that code.
When hallucinating, use nonsensical names for the rays
(wands, spells, and breath weapons), and random ray glyphs.
Original code from xNetHack by copperwater <aosdict@gmail.com>,
inspired by a YANI by Kahran042.
For nethack.6, include the recently added 'optmenu' help file among
the list of files.
I didn't do anything about '-windowtype=xyzzy' though; there are some
other command line changes in the pipeline. The existing '-w' that
the new longer form enhances isn't in there either.
I took my name out for the claim of copyright. I've barely ever
touched this file. We see if that breaks the automated processing.
From argrath, have com_pager_core() check for null return from
nhl_init() to pacify some code checker. If nhl_init() ever fails,
the program will never get far enough to try to use com_pager().
Closes#677
In the name of accessibility: Prevent moving into dangerous liquids.
Now with themed rooms, water and lava are more common, and it's
unreasonable to expect blind players to check every step for those.
With paranoid:swim, just prevent normal walking into those liquids,
unless you prefix the movement with 'm', or if the liquid would not
harm you.
Doesn't completely prevent an accidental dunking - for example
if the hero is impaired or couldn't see the liquid.
This comes from xNetHack by copperwater <aosdict@gmail.com>
with some changes to the code.
When testing the menu/incomplete map situation I noticed that <return>
didn't work to dismiss the "list autopickup exceptions" menu. <space>
or <escape> was required. That was clearly intentional but doesn't
seem reasonable. Make <return> behave the same for PICK_NONE as it
does for other menu modes in tty and as it does for other interfaces.
Sometimes tty left part of the screen blank after covering the entire
screen with a menu and then switching to a smaller menu that should
have redrawn the map as background. To reproduce:
| O - puts up a big menu
| : - enter a search string: "autopickup exception"
| <return> - dismiss the menu after the search makes one match
The autopickup exceptions sub-menu will be shown, with a small border
of map around it but most of the screen blank. (This behavior was
present before 3.6.0 but may not have been noticed because when the
discovered map doesn't extend to the corner menu's area, the blank
map probably seemed to be intentional. But if a fringe of map gets
drawn around the menu, that clearly isn't intended.) The incomplete
map is temporary; once menu is dismissed, it gets redrawn properly.
This adds a flush_screen() call after one particular docrt() call.
Perhaps docrt() should end with its own flush_screen() instead, but
that would require a lot more testing.
Closes#673
In a curses menu, if you type a digit to start a count, the cursor
jumps to the spot on the screen where the hero is. Strange and very
noticeable if that spot is covered by the menu, although I didn't
notice it when working on digits as group accelerators (changes for
that didn't trigger this).
Despite the cursor_on_u location, it isn't related to the recent
flush_screen/cursor_on_u changes either. In 3.6.x, curses used it's
own count entry code. Early on with to-be-3.7 it was changed to use
the core's get_count(), so uses a different routine to get next input
character. And the curses edition of that routine deliberately
positions the cursor at the hero's location on the assumption that
it only gets called when the map window is active.
When a thrown item lands in a pool of water, it immediately
rusts - but don't give that message unless the hero is at the same
location and also under the water. My reasoning: hero can't see items
under water, and by the time the item rusts, it's in the water.
Have curses catch up with tty, X11, and Qt: if a menu of objects has
any heavy iron balls, their entries can be toggled on or off by using
'0' as a group accelerator. That's been supported by tty and X11 for
ages and by Qt since yesterday. This also supports having any digit
as a group accelerator so that the 'O' hack to pick number_pad mode by
typing the digit that matches the value description works (except for
menu entry for mode -1; '5' happens to work for that one but doesn't
match its description).
Have Qt catch up with tty and X11: in a menu, when not already
entering a count and player types a digit, check whether it is the
group accelerator for any of the menu entries. If so, toggle their
selection state; if not, begin counting for the next item the player
eventually picks.
Call growl even if you are deaf, because growling also
wakes up nearby monsters. Just make growl not show the message
if you can't hear or see the monster.
Log game events, such as entering a new dungeon level, breaking
a conduct, or killing a unique monster, in a new "Major events"
chronicle. The entries record the turn when the event happened.
The log can be viewed with #chronicle -command, and the entries
also show up in the end-of-game dump, if that is available.
This feature is on by default, but can be disabled by
defining NO_CHRONICLE compile-time option.
This also contains "live logging", writing the events as they
happen into a single livelog-file. This is mostly useful for
public servers. The livelog is off by default, and must be
compiled in with LIVELOG, and then turned on in sysconf.
Mostly this a version of livelogging from the Hardfought server,
with some changes.