Commit Graph

13915 Commits

Author SHA1 Message Date
Pasi Kallinen
0a3d02b9d4 Pyrolisk stops gazing if it sees you resist 2022-08-06 10:45:11 +03:00
Pasi Kallinen
6bc796028d Make hitting with a wielded potion hit you far less
Hitting a monster with a wielded potion of paralysis or sleep
was practically useless, because it almost always also hit you.
Negate the chance and make it depend on your dex.
2022-08-06 08:28:39 +03:00
PatR
a84025c36c more abandoned migrations when entering endgame
The earlier commit just removed monsters from migrating_mons and left
them orphaned.  Also it ignored migrating objects.

Actually release the monsters that can no longer arrive at their
migration destinations.  Release their inventories too.

Release objects that can no longer arrive at migration destinations.
2022-08-05 16:55:05 -07:00
PatR
7a3c11ec6b more Wizard of Yendor
The earlier attempt to prevent the Wizard from immediately teleporting
(and giving a vanishes and reappears message before the player has had
a chance to see the level) when you arrive on the Plane of Earth ended
up being worse.  He just stayed put, so no vanish and reappear but no
other activity either.
2022-08-05 15:05:10 -07:00
PatR
dc381d0560 discard migrating monsters when entering endgame
When the hero enters the planes branch, all the rest of the dungeon
gets discarded since it can no longer be reached.  At the time that
that takes place, throw away any migrating monsters waiting to arrive
on any of those levels.
2022-08-05 14:36:11 -07:00
PatR
393283f05c Wizard of Yendor entering endgame
When entering the Plane of Earth (or level teleporting directly to
another endgame level in wizard mode), if the Wizard came off the
migrating_mons list instead being re-created from scratch, he would
be placed randomly on the level instead of next to the arrival point.
If his mstrategy field still had the STRAT_WAITFORU bit set and you
didn't move to where he could see you, he might never come after you,
at least until some future harassment event chose 'resurrect'.
2022-08-05 14:22:27 -07:00
Pasi Kallinen
b01d81277e Increase buffer size for saving menucolors
The '"regex"=color&attr' is max BUFSZ, so prefixing with MENUCOLOR=
and adding a newline overflowed the temp buffer when saving the
menucolors.
2022-08-05 18:19:07 +03:00
nhmall
958a8aa297 quiet a warning that appeared today
src/cmd.c(2867) : warning C4701: potentially uninitialized local variable 'win' used
2022-08-05 10:31:54 -04:00
Pasi Kallinen
07184c9640 Don't give fake Demonbanes to angels
Demonbane is a mace now, so trying to generate a long sword made
fake Demonbanes. Just don't give Demonbane at all to random angels.
2022-08-05 13:43:39 +03:00
Pasi Kallinen
fa1b326e31 Save changed key binds to config file 2022-08-05 13:07:26 +03:00
Pasi Kallinen
45613ea771 Experimental #saveoptions command
Add a #saveoptions extended command, to allow saving configuration
settings from within the game. This is still highly experimental,
and gives plenty of warnings before asking to overwrite the file.

Lack of option saving is one of the biggest complaints new players
have, so this should help with it.  More experienced players with
highly customized config file should not use this feature, as it
completely rewrites the file, removing all comments and non-config
lines.
2022-08-05 10:33:55 +03:00
PatR
e5ddf400c6 'O' tweaks
Reformat most of optlist.h.  In the process, fix a couple of
conditionally included items which were mis-classified as set_in_game
when excluded.  Add "permablind" as an alias for the "blind" option.
[I don't understand the size value of 70 for #if BACKWARD_COMPAT
{curses,DEC,IBM,Mac}_graphics but didn't alter that.]

Include 'pickup_types' in the behavior section; it's useful from
turn 1 and does get adjusted from time to time during play.

Include 'color' in the map section, but hide it for wc_tiled_map.

Include 'showscore' and 'statuslines=2|3' in the status section.
I didn't rebuild with SCORE_ON_BOTL enabled so the showscore part
hasn't been tested.
2022-08-04 16:53:31 -07:00
PatR
908a8a132f m_digweapon_check()
Some streamlining that I left out of the recent commit for maybe
avoiding exclamation mark when a monster wields a tool or weapon
to dig or chop.
2022-08-04 14:26:12 -07:00
PatR
672ef846fa condition mask option's menu
Not related to changes to 'O' but noticed because of those.  The menu
for selecting which status conditions to include on the status line
starts with a special entry for sorting that shouldn't be selected by
the select all and toggle all actions.
2022-08-04 14:09:19 -07:00
Pasi Kallinen
c8bd39c748 Simple options: guard against boolean being null 2022-08-04 20:08:19 +03:00
Pasi Kallinen
b3822cd94d Fix roguesymset substitution in options 2022-08-04 17:05:26 +03:00
Pasi Kallinen
4ff9537b0d Rudimentary key rebinding in game options
Currently shown only in the full options list, as it's not
quite complete. (For example, it doesn't handle movement commands,
or the getpos keys)
2022-08-04 14:42:45 +03:00
Pasi Kallinen
b5acfc5c3f New options: swap symset to roguesymset on rogue level 2022-08-04 09:48:58 +03:00
Pasi Kallinen
dd28f8b405 Minor tweaks to post-option screen refresh 2022-08-04 09:39:21 +03:00
Michael Meyer
fec7c724a3 More Guidebook formatting 2022-08-04 09:01:19 +03:00
Pasi Kallinen
691c727d0a Flush screen when toggling map-related option 2022-08-03 19:57:57 +03:00
Pasi Kallinen
bfd262ebe8 Add optionsfull extended command
This is the previous, full options list. Adding it as
an extended command, so users can do

BIND=O:optionsfull

to go back to the old behaviour.
2022-08-03 19:18:44 +03:00
Michael Meyer
adf451e421 Guidebook fixes/formatting 2022-08-03 16:42:11 +03:00
Pasi Kallinen
f3591ea07d User-friendly options menu
Make the default options menu only show the most important
options, split into categories. The full, traditional menu
can be accessed by using the m-prefix.
2022-08-03 14:08:31 +03:00
PatR
c7a467701f fix github issue #832 - "nethack --nethackrc=file"
Issue reported by schauveau:  when the command line specifies the
'--nethackrc=file' option (Unix, including linux and OSX, only) the
value of 'file' was set in pointer g.cmdline_rcfile and the options
parsing made a copy of that pointer rather than of what it pointed
to, then freed g.cmdline_rcfile before using the copy.  So it ended
up using a pointer to freed memory.

Stick with copying the pointer but defer freeing the original until
after its copy is no longer needed.

Fixes #832
2022-08-02 15:07:20 -07:00
Pasi Kallinen
f4d0e99fad Reset map x/y start/size in single place 2022-08-02 17:02:25 +03:00
Pasi Kallinen
24e94b70d4 Windows: Default boulder symbol to 0
Set the boulder symbol to 0 in the Windows config template file.
2022-08-02 13:09:25 +03:00
Pasi Kallinen
fd3b4384c3 Prevent walking into water or lava by default
Make paranoid_confirmation:swim the default, because it is far more
beginner friendly.
2022-08-02 09:15:32 +03:00
Pasi Kallinen
09cf464816 Potions of healing, extra healing, and lifesaved heal amount
Make potions of healing and extra healing more useful in the early
game, by upping the average amount of health restored.

Make amulet of life saving restore between 60 and 170 health,
depending on constitution. Previously life saving was the best way
to heal back up to full, even if you had thousands of hp.
2022-08-02 01:11:14 +03:00
Pasi Kallinen
e5b8fc86eb Make explosions burn monster armor 2022-08-01 22:30:43 +03:00
nhmall
cf352377a9 Windows stubs.c follow-up 2022-08-01 02:03:38 -04:00
nhmall
174a7e5e78 Windows stubs.c fix 2022-08-01 01:52:55 -04:00
PatR
8a9dc00cde don't negate new moon with a lizard corpse
The only effect of a new moon was to make hearing a cockatrice's
hissing (whichs happens with 1 in 3 chance) always start the turn to
stone sequence instead just having a 1 in 10 chance to do so, but
that was negated by carrying a lizard corpse.

Keep the hiss-always-starts-petficiation part and remove the
carrying-a-lizard-corpse-negates-that part.  So the effect of a new
moon no longer gets controlled by the contents of hero's inventory.
2022-07-31 16:12:40 -07:00
PatR
2e983f354d monster eating stalker corpse
Extend 8d2407f1f2
"Monsters can gain resistances by eating corpses"
to include invisibility from stalker corpses.
2022-07-30 18:30:16 -07:00
PatR
a6d85f9d36 dwarf + pick-axe feedback
When you see a dwarf wield a pick-axe,
|The dwarf wields a pick-axe!
avoid the exclamation point if that dwarf just intends to dig.
|The dwarf wields a pick-axe.
2022-07-29 16:11:35 -07:00
PatR
34db0b0dd3 \#wizkill tweak
If wizard mode player targets 'I' with #wizkill and there is no
monster there, remove that 'I'.
2022-07-29 15:55:53 -07:00
PatR
23e6a054ee fixes entry for PR #796 - MUSE digging
Pull request from entrez:  nothing happened--except spending a wand
charge--if a monster zapped a wand of digging down at a spot where
holes can't be dug.  If a pit can be dug there, dig one and then trap
the monster in it.  No-op if a pit or other trap is already present.

Closes #796
2022-07-29 15:08:27 -07:00
Michael Meyer
a18859ddb5 Let fleeing monsters dig pits in undiggable floor
When the hero zaps a wand of digging down in an undiggable level, it
creates a pit.  When a fleeing monster did the same thing, it had no
effect.  Bring this closer to the behavior experienced by the hero: if a
monster tries to use a wand of digging to create a hole in an undiggable
floor, a pit will be made (and the monster will fall into it, if not a
flyer).
2022-07-29 15:05:55 -07:00
Pasi Kallinen
ac5b92d348 Greased saddle is slippery 2022-07-29 12:27:08 +03:00
PatR
a9fec4e0ae github issue #828 - confuse monster effect when \
hero is invisible without being able to see invisible

Issue reported by EndHack:  you could see your hands glow red when
reading a scroll of confuse monster or casting the spell of confuse
monster even if you were unable to see yourself.

Switch to the blind feedback (tingling instead of glowing red) if
invisible without see invisible.

Also, have uncursed scroll or low skilled spell confer 1..2 turns
of glowing hands instead of always just 1.  (Blessed/highly skilled
stays at 2..9 turns.)

Fixes #828
2022-07-28 13:42:35 -07:00
Pasi Kallinen
cb9044c23f Make failed polearming or jumping return correct value 2022-07-28 22:10:08 +03:00
PatR
f0705526d4 update 'mydogs' comment 2022-07-28 08:16:23 -07:00
Pasi Kallinen
bae221d0c3 Grappling location feedback 2022-07-28 13:50:57 +03:00
Pasi Kallinen
0517974b6d Spell location feedback
Casting some spells at high enough skill allows picking for
the spell location. Say which locations are out of range
when picking the location.
2022-07-28 13:15:41 +03:00
PatR
e13e514556 fix broken migrating monster arrival
If the first monster on the migrating_mons list couldn't arrive and
was put back on the list to try again later, 'later' would happen
immediately and the program looped forever trying and failing to
bring that monster to the level.

Defer repeat attempts at migration until losedogs() has been through
the whole migrating_mons list.  mon_arrive() now populates a new
list called failed_arrivals and losedog() moves its contents, if any,
to migrating_mons prior to returning.
2022-07-28 00:51:18 -07:00
PatR
1a367c7ff5 \#migratemons
Extend the wizard mode #migratemons command.  Instead of just asking
for how many random new monsters to be sent to the next level, first
describe how many migrating monsters there already are, then if that's
non-zero ask whether to show them.  Choices are 'c' for ones scheduled
to arrive at the current level if hero leaves and returns, 'n' for
ones aimed at the next level, 'o' for ones that aren't in either of
those two categories, 'a' for all migrating monsters, and 'q' to skip.
After that, ask how many to make for the next level.  The default for
that is still zero.

For the 'o' and 'a' cases, they're displayed in the reverse order of
when they went onto migrating_mons, not sorted by destination level.
2022-07-28 00:34:31 -07:00
Pasi Kallinen
05761bada6 Holes and trapdoors have predetermined exit level
Same hole/trapdoor will always take you to the same level.
2022-07-27 22:51:17 +03:00
Pasi Kallinen
543a3c1b9a comment typofix 2022-07-27 13:14:00 +03:00
Pasi Kallinen
0da356c540 Enable migrating mons debugging 2022-07-27 12:21:07 +03:00
Pasi Kallinen
810744a27d Fix knockbacked monster migrating or killed
Fix a case where a monster knocked back another monster into a trap,
and the trap either killed or migrated the monster, then the actual
damage dealing later could try to detach the already detached monster.

If the monster migrated, the monster is gone before the damage from
the hit is dealt to the monster.
2022-07-26 23:20:54 +03:00