Commit Graph
100 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
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
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
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
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
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
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
Pasi Kallinen ac5b92d348 Greased saddle is slippery 2022-07-29 12:27:08 +03:00
Pasi Kallinen cb9044c23f Make failed polearming or jumping return correct value 2022-07-28 22:10:08 +03: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
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
Pasi Kallinen f0774e0da4 Fix monster hiding under consumed candle 2022-07-26 22:53:57 +03:00
Pasi Kallinen f07f065f7d Allow cutting a known spider web by force-fighting it
Original code from xNetHack by copperwater <aosdict@gmail.com>.
2022-07-25 18:06:10 +03:00
Pasi Kallinen 63997a6fe5 Call it "danger sense" when warning finds a monster 2022-07-24 19:14:41 +03:00
Pasi Kallinen 82f0b1e8ea Scared hostile monster which cannot move away will attack 2022-07-21 20:21:10 +03:00
Pasi Kallinen 8747d2ddce Sitting on amorphous corpse 2022-07-21 18:27:50 +03:00
Pasi Kallinen 8a52716936 Wielding Giantslayer prevents knockback from monsters 2022-07-20 14:44:15 +03:00
Pasi Kallinen ced920df54 Adjust Demonbane invoke ability
Demon lords and princes have a chance to resist the effect.
Demons in quest when nemesis is alive have a very high chance
of resisting.
When invoked in Gehennom, teleports the demons within the same
level.
2022-07-20 09:42:28 +03:00
Pasi Kallinen b1a5a9c390 Demonbane changes
Demonbane is now a mace, the first sac gift for priests,
and gets an invoke ability to banish demons.
2022-07-19 21:23:26 +03:00
Pasi Kallinen d713c1826b Buzz macros and related stuff
Add macros to convert AD_foo, WAN_foo, and SPE_foo to relative values
for passing to BZ_U_foo and BZ_M_foo macros.

Change some return values in monster spellcasting function from
magic numbers to MM_MISS or MM_HIT.

Make buzzmu consider hero resistances - previously the
monster with innate zapping ray (Angels and Asmodeus) would
just keep doing that attack, but they will now just curse if
it saw the hero resist the attack.
2022-07-19 15:14:55 +03:00
Pasi Kallinen 0bca93be87 Large monster can knock back smaller ones
When a monster at least two sizes larger hits another one,
there's a chance the smaller defender will be knocked back.

This applies also to hero, attacking when polymorphed to
a large monster, or defending from a large monster.

Most of the monsters that can knock back are giants and dragons.

Idea and some of the code from EvilHack.
2022-07-18 23:01:11 +03:00
Pasi Kallinen 7bf02ade48 Bigroom 2 can have ice floor in unlit areas 2022-07-18 17:58:45 +03:00
Pasi Kallinen e4cb3f0832 Rangers always succeed in disarming bear traps 2022-07-18 17:22:19 +03:00
Pasi Kallinen 88ec641770 Allow entering a known pit without taking damage 2022-07-18 17:00:20 +03:00
Pasi Kallinen aa09f3eef5 Use macro unhideable_trap 2022-07-18 13:27:39 +03:00
Pasi Kallinen 06efa695be Abort wiztelekinesis if changing levels 2022-07-18 13:14:11 +03:00
Pasi Kallinen a4ef5ee533 timed_delay doc bits 2022-07-18 08:33:10 +03:00
Pasi Kallinen 7c96825525 Demote elf-queen to a lady 2022-07-17 21:47:32 +03:00
Pasi Kallinen 823a6f247b Unify picking crawl goodpos 2022-07-17 21:37:31 +03:00
Pasi Kallinen 6fe0f7c132 Unify impaired movement direction checks 2022-07-17 12:23:49 +03:00
Pasi Kallinen 1ae2bc7063 Wielding a bec de corbin makes ravens generate peaceful 2022-07-17 09:04:15 +03:00
Pasi Kallinen 94c1e94d20 Move mtrack push and clear to separate functions 2022-07-16 18:43:22 +03:00
Pasi Kallinen 486ed29077 Blessed potion of polymorph asks user for monster to poly into
... unless there's some other form that would override the choice,
such as a worn dragon armor, lycanthropy, or vampirism.

The polymorph will be in effect for 10-24 turns.
2022-07-14 14:04:27 +03:00
Pasi Kallinen a1ca981907 Grid bugs don't have hands
Fixes #799
2022-07-13 11:21:21 +03:00
Pasi Kallinen c09ae332c8 Valkyries start with a spear instead of a long sword
Long swords are overused, and Knights already start with a long sword.
No other roles start with a spear. Lawful Valks shouldn't have an easy
way to get Excalibur.

There's also historical precedence for valkyries with spears, see eg.
Wagner's Ring Cycle.

This makes Valks early game damage slightly lower, although dwarven spear
does the same damage to small monsters as long sword, and there should be
plenty of chances to get one from the mines. Spears can also be thrown.

This change has been done in several variants, eg. xNetHack and Fourk.
2022-07-12 23:05:46 +03:00
Pasi Kallinen 81d54f15ce Applying a cursed lamp can make your hands slippery 2022-07-12 22:12:52 +03:00
Pasi Kallinen e339f8a1fa More message variation on eating palatable corpses 2022-07-12 21:51:41 +03:00
Pasi Kallinen 40b1e55801 Always give a message when dipping an item into a fountain 2022-07-12 21:10:19 +03:00
Pasi Kallinen 5c7c9d10ae Rejigger anti-magic traps
My changes were too drastic, so reduce the drain and damage so it
matches all the other traps. Now the anti-magic trap will always
ding your max energy a bit, in addition to the physical damage done
if wearing magic resistance.
2022-07-12 20:24:30 +03:00
Pasi Kallinen 314715038d Praying on an altar with pet corpse on it can revive the pet 2022-07-10 12:56:20 +03:00
Pasi Kallinen 1dcd14bffd Make sure getdir return values are in range
u.dx and u.dy should be [-1, +1]
2022-07-10 11:00:27 +03:00
Pasi Kallinen f3e2f08b54 Unhide monster when object is dropped through hole
Monster hiding under an object on a hole, the object got
knocked down the hole, the monster kept hiding.
2022-07-09 18:44:35 +03:00
Pasi Kallinen c4bd9db98c Fix monster hiding under candle burning away
Reveal the monster when the candle it was hiding under burned away.
2022-07-08 13:39:28 +03:00
Pasi Kallinen 96f6c52082 Trapped monster cannot move to swallow another
The swallower kept their trapped-state, but could be moved to
another location. Just deal with it by not letting a trapped monster
swallow.
2022-07-08 10:47:14 +03:00
Pasi Kallinen 4c343d079a Untrap monster when lregion removes the trap
This check really should go in deltrap itself, but that would require
more effort than I have spoons for right now.
2022-07-07 12:29:03 +03:00
Pasi Kallinen 640b6d6ce5 Untrap monster in trap on melting ice
Monster trapped in a trap on melting ice, the monster stayed
trapped even as the trap was removed when the ice melted.
2022-07-06 20:16:24 +03:00
Pasi Kallinen 134363cead Fire trap on ice can indirectly kill a monster via drowning
Make the trap routine claim the trap killed the monster even
though it was drowning that did it, otherwise callers cannot
rely on the trap routine return value.
2022-07-05 12:17:50 +03:00
Pasi Kallinen 361e6a924a Fix segfault with fire trap on ice and monster triggering it
When a monster with innate teleporting stepped on a fire trap on ice,
the ice melted and the monster teleported away before falling
into the pool. If the monster's new location had a trap, the code
tried to access the deleted fire trap.
2022-07-05 10:51:28 +03:00
Pasi Kallinen c6a3ae5c6c Curses: Obey timed_delay option 2022-05-19 18:40:15 +03:00
Pasi Kallinen 8532b8d990 Add missing void 2022-05-18 18:59:01 +03:00
Pasi Kallinen 2a801538fa Fix warnings, add newline before function braces 2022-05-02 12:46:02 +03:00
Pasi Kallinen 71c55e4285 Remove extra full stop from SOUND error 2022-04-30 16:53:47 +03:00
Pasi Kallinen c3c60b0b2c When setting user sounds, allow also setting a MSGTYPE
The SOUND lines now have an optional msgtype parameter:

   SOUND=MESG hide "^You miss the " "swing.wav" 75

Fixes #571
2022-04-27 13:32:34 +03:00
Pasi Kallinen 5d20140b74 Qt: To play user sounds with volume, replace QSound with QSoundEffect 2022-04-27 12:40:59 +03:00
Pasi Kallinen 4cffa9700e Split trap statue creation into separate function 2022-04-26 18:09:36 +03:00
Pasi Kallinen 99efeafec7 Split trap note choosing into separate function 2022-04-26 14:00:09 +03:00
Pasi Kallinen f10cdc2d9c Use get_mleash to find the leash attached to monster 2022-04-26 08:46:55 +03:00
Pasi Kallinen 9c2ca1577f Unify probing an object chain 2022-04-25 18:11:32 +03:00
Pasi Kallinen 9b1872ba05 Couple more monster iterator uses 2022-04-25 12:53:04 +03:00
Pasi Kallinen 4a01c8fbd7 Monster list iterator
Add some basic functions to iterate through the monster list,
ignoring dead monsters. Mainly just to allow splitting up code
into discrete functions.

Not quite happy with the get_iter_mons_xy - should probably have
a pointer to iterator data struct, which gets passed through instead,
but this works for now.
2022-04-24 13:03:47 +03:00
Pasi Kallinen af7db2f8f1 Fix panic on thrown potion of acid when swallowed
When you're swallowed and throw a missile that kills the swallower,
the thrown missile is picked up by the swallower before death.
This caused a panic when you threw a potion, which was first picked up
by the swallower, which upon death dropped the potion on the floor,
but then throw code was trying to destroy the potion ...
2022-04-19 15:00:00 +03:00
Pasi Kallinen 262e178243 Unify mhitm magic attack negation checks 2022-04-18 19:14:40 +03:00
Pasi Kallinen d7eb95cbf0 Minor code dedup in sp_lev 2022-04-18 13:38:01 +03:00
Pasi Kallinen cb02ce88c5 Revisit the Valkyrie goal level hack
Instead of hardcoding the lava terrain change in core, if the stairs
are created in a fixed location, force the terrain to room floor first.
Move the surrounding lava changing to room floor to the Val-goal lua
file.
2022-04-15 18:52:49 +03:00
Pasi Kallinen 43856fe023 Fix uninitialized var in dip 2022-04-14 18:59:03 +03:00
Pasi Kallinen 28e416da3a Add moving on the trap to the mouse menu 2022-04-11 15:08:50 +03:00
Pasi Kallinen 503b85b1cf Add spell casting to mouse menu 2022-04-11 14:54:12 +03:00
Pasi Kallinen 32fa807050 When autopicking objects, you can count to two
Show "two" instead of "a few" when autopicking up objects, and
there's some left you didn't pick up.
2022-04-11 11:31:32 +03:00
Pasi Kallinen 24d3c96c1d X11: set menu entries to same length
While testing the new mouse action menus, it was quite annoying
to try and hit some shorter entries. Make all the selectable entries
the same maximum length, and with text left justified.
2022-04-10 16:09:43 +03:00
Pasi Kallinen a1f2000afd Fix castle engraving and scroll
Fixes #723
2022-04-10 14:30:58 +03:00
Pasi Kallinen ec4fafcf53 Fix erroneous test_move params 2022-04-10 12:52:39 +03:00
Pasi Kallinen e53a4c0abd Context sensitive item usage from inventory
Allow selecting an item from inventory and show a menu of actions
applicable for that particular item. Some of the entries might
be slightly spoilerish (eg. it'll reveal that you can read T-shirts),
but the improved usability for new players is more than worth it.

Generally known as "item actions", this was first implemented
in AceHack by Alex Smith.
2022-04-09 15:28:23 +03:00
Pasi Kallinen 093f7452af Some more therecmdmenu
If on, therecmdmenu handles clicking anywhere on the map,
not just on or next to hero.  Add throwing items to the menu.
2022-04-08 19:48:01 +03:00
Pasi Kallinen 77cf464836 Add chat and offer to herecmdmenu 2022-04-07 18:06:31 +03:00
Pasi Kallinen 10fd0deab2 When levitating, hide drink and dip from herecmd_menu 2022-04-07 16:44:16 +03:00
Pasi Kallinen eb9c7d77d4 Improve therecmdmenu
Turning on herecmd_menu and clicking with mouse is now actually
somewhat playable.
2022-04-06 21:23:27 +03:00
Pasi Kallinen e260c9ded5 Fix mouse travel and look
Looks like I broke mouse travel and clicklook a while back, and
no-one noticed...
2022-04-05 15:03:20 +03:00
Pasi Kallinen 16d813b44a Give a message when stinking cloud is created on top of hero 2022-04-03 20:43:04 +03:00
Pasi Kallinen 92c21b588b Ask to kick a locked door open, if hero has no unlocking tool 2022-04-03 13:58:50 +03:00
Pasi Kallinen 565a3cf0a9 Reverse the unique requirement 2022-04-03 08:55:09 +03:00
Pasi Kallinen 38a6cee1ab Don't pacify unique monsters when untrapping them from web 2022-04-02 19:38:50 +03:00
Pasi Kallinen 6977aef436 Fix stuck travel for good
My fixes to the travel stuck oscillation did not fix all of them,
and I've even seen a 3-step loop - which my fixes cannot detect.
I guess there could be arbitrary-sized loops too.

To definitely fix this, keep track of all the map locations travel
has moved the hero through, and if it tries to go on a location already
used, stop travel and give the unsure -message.
2022-04-02 18:27:53 +03:00
Pasi Kallinen f45e79e1a0 Fix medusa levels
My recent commit broke medusa-3 and medusa-4, so fix those.

Make des.stair and des.ladder also accept hash-coordinate:
  des.stair("up", {8, 10});
2022-04-01 08:53:15 +03:00
Pasi Kallinen 476e47b2cd Use correct findtravelpath param value 2022-03-31 17:50:00 +03:00