Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen 8b11bda6cb Open cavern -style Gehennom filler level 2024-12-22 18:14:12 +02:00
Pasi Kallinen 0079bf87bb fixes update 2024-12-21 18:19:42 +02:00
Pasi Kallinen 6b0e21dc1a Wish alias "tripe" for tripe ration 2024-12-21 14:11:00 +02:00
Pasi Kallinen f7e86aa150 Add a new bigroom variant "two hexagons" 2024-12-21 12:19:26 +02:00
Pasi Kallinen e7a714849e luahelper doc nit 2024-12-21 12:06:20 +02:00
Pasi Kallinen cc31017265 Use NO_MATERIAL instead of a magic number 2024-12-20 19:39:16 +02:00
Pasi Kallinen 5de7f986a0 Forget obj trap known in bones file 2024-12-19 15:29:29 +02:00
Pasi Kallinen 87694e1a95 Hero remembers trapped boxes
After finding a trap on a chest or a large box, remember it
as trapped: "You see here a trapped large box."
Randomly generated chests and boxes can be obviously trapped.
Allow defining obviously trapped containers via lua.

Invalidates saves and bones.
2024-12-19 13:11:25 +02:00
Pasi Kallinen faf2267aba Use correct variables, not where we are trying to go 2024-12-18 10:35:54 +02:00
Pasi Kallinen 80a0a309ea Don't advance spell skills when using wizcast 2024-12-17 22:55:22 +02:00
Pasi Kallinen 20c456cbbb Avoid using doopen return value in test_move
We can't rely on doopen_indir return value to
check whether hero moved and opened a door.
Instead, explicitly check whether the door is still
closed, and whether hero moved.
2024-12-17 20:58:02 +02:00
Pasi Kallinen 0381e61624 Fix out-of-bounds in test_move
Hero was on the top-left of an open map at (1,0), and
a monster was trying to knock them back to (0,-1).
2024-12-17 18:23:01 +02:00
Pasi Kallinen e778d95ace Accessibility: more message locations pt 7 2024-12-14 16:37:49 +02:00
Pasi Kallinen 79affad312 Accessibility: more message locations pt 6 2024-12-14 16:28:20 +02:00
Pasi Kallinen 141d24bdeb Accessibility: more message locations pt 5 2024-12-14 16:19:14 +02:00
Pasi Kallinen 1849985214 Accessibility: more message locations pt 4 2024-12-14 15:51:55 +02:00
Pasi Kallinen 369f1ff959 Accessibility: more message locations pt 3 2024-12-14 15:36:05 +02:00
Pasi Kallinen 055c0d5954 Accessibility: more message locations pt 2 2024-12-14 15:30:12 +02:00
Pasi Kallinen 8e186fd5e6 Accessibility: more message locations 2024-12-14 15:24:24 +02:00
Pasi Kallinen 7fa38eb7b3 Use pline_mon instead of pline_xy
Forgot about this function. Whoops.
2024-12-14 15:20:17 +02:00
Pasi Kallinen 4f37795f96 Accessibility: pet message locations 2024-12-14 15:00:46 +02:00
Pasi Kallinen fd23463941 Sparkle shield effect and accessibility
When sparkle is turned off, there are some places where
a monster resisting the effect did not give any message.

This fixes some of those.
2024-12-14 14:34:22 +02:00
Pasi Kallinen cbb0f9079d Wand of striking strikes the ground
... if dropped while levitating/flying.
2024-12-09 14:36:14 +02:00
Pasi Kallinen 57abae29e8 Don't switch away from polearm if monster in range
Using 'f', if hero is wielding a polearm, and a monster is in range,
don't switch away even if we do have ammo in quiver and a launcher
in the inventory.
2024-12-08 22:19:36 +02:00
Pasi Kallinen dafd854993 Gelatinous cubes eat organic objects inside them 2024-12-08 17:57:59 +02:00
Pasi Kallinen 78289a7f83 Archeologists' fedora is lucky 2024-12-08 16:17:35 +02:00
Pasi Kallinen a3f0b54aea Healers gain experience by healing pets 2024-12-07 12:50:59 +02:00
Pasi Kallinen 9d68d171fb Typofix 2024-12-07 11:37:15 +02:00
Pasi Kallinen 863d455e1d Tourists gain experience by using camera flash on monsters
This counts as seeing the monster up close, so the tourist
doesn't need to get next to the monster
2024-12-07 11:24:30 +02:00
Pasi Kallinen 12228cac49 Tourists gain experience by going to new dungeon levels 2024-12-06 22:10:17 +02:00
Pasi Kallinen 89c4c3a722 Tourists gain experience by seeing new types of creatures up close
Experience equivalent to killing a monster is gained when starting a turn
adjacent to and being able to see the monster.

Breaks saves.

Idea and parts of code via dNetHack
2024-12-06 21:30:23 +02:00
Pasi Kallinen 5eb7566eba Prevent two possible ways to die in the tutorial 2024-12-06 17:36:34 +02:00
Pasi Kallinen d318d2a489 Code formatting nit 2024-12-06 16:58:01 +02:00
Pasi Kallinen e23e6ef235 Blessed scroll of destroy armor asks which armor to destroy
via xNetHack with some slight modifications.
2024-12-06 11:09:27 +02:00
Pasi Kallinen 9b4f38eebe Blessed scroll of taming increases tameness of pets 2024-12-05 16:44:05 +02:00
Pasi Kallinen 4b15085bb1 Avoid naming Vlad's entourage if vampires are genocided 2024-12-05 16:16:55 +02:00
Pasi Kallinen b73581b745 Looking around the map in tutorial 2024-12-05 15:42:15 +02:00
Pasi Kallinen 08be1bafdd Explain ctrl-key combos in tutorial
When tutorializing a command that uses a ^X notation, show Ctrl-X
instead.  Also show an explanation of the ^X nearby.

The only ctrl-key combination that can currently happen in the tutorial,
without rebinding keys, is the kick-command.

Fixes #1327
2024-12-05 15:36:30 +02:00
Pasi Kallinen b96c59e9b1 Angry god may remove an intrinsic 2024-12-04 20:54:47 +02:00
Pasi Kallinen c868119a33 Add missing full stop 2024-12-04 16:46:05 +02:00
Pasi Kallinen 53f43ab00b Qt: show main window normally instead of maximized
Sidenote: The main window size calculations are getting stupid.
It would be better to find out the widget sizes and shift
the splitter up, instead of letting it just take up half of the main window.

Idea and part of the code by Richard Henschel
2024-12-03 19:52:30 +02:00
Pasi Kallinen 62971c6f09 Qt: add support for the palette config option
Depends on CHANGE_COLOR compile-time option.
2024-11-14 17:25:44 +02:00
Pasi Kallinen 945ccff1ff Allow changing command autocompletions via #optionsfull 2024-10-19 14:46:11 +03:00
Pasi Kallinen 696af89299 Change MSGHANDLER from compile-time to sysconf 2024-10-19 10:47:53 +03:00
Pasi Kallinen d35aa35c3f Don't put the unknown command message into history
Even with Norep, it was cluttering the message history buffer.
2024-10-18 17:54:05 +03:00
Pasi Kallinen 0530ca0758 Fix the undiggable/nonpasswall stuff
wall_info (aka flags) is overloaded with other stuff.
2024-10-18 16:52:29 +03:00
Pasi Kallinen c33a6e7c0b Wizmode wishing for undiggable/unphaseable walls 2024-10-18 14:20:24 +03:00
Pasi Kallinen f12635ccd9 Prevent monster generation in the sokoban trap hallway
Makes Sokoban far less tedious when you don't have to worry about
monsters randomly popping up in the trap hallway while you're pushing
the boulder.

Adds a new exclusion zone for monster generation, and the goodpos
routine avoids the zones when GP_AVOID_MONPOS is used.
2024-10-18 13:30:51 +03:00
Pasi Kallinen 9e4b2c121b Improve the exclusion zone code
I forgot to add the code to flip the exclusion zones when implementing them.
Also improve the zone coordinates so they're correct outside of map contents.
2024-10-17 12:34:06 +03:00
Pasi Kallinen d746060d6e Boomerangs should not mulch
I think this is a regression, but I didn't bother compiling an older
version to check.
2024-09-28 17:50:14 +03:00
Pasi Kallinen d126ae9a42 Reduce crystal plate mail weight 2024-09-18 21:39:55 +03:00
Pasi Kallinen 6f64ed90ed Curses: prevent menu search without menu options
First noticed this when watching someone livestream, and managed
to figure it out from there: The window that pops up when looking
at a pile of objects under you by pressing ':' is marked as a menu,
but has no selectable options.  Curses still allowed you to use the
menu-search command (':') on it.

Prevent the menu search command in windows with no selectable entries.
2024-09-08 20:29:58 +03:00
Pasi Kallinen 96fc77cc70 add pauper to fixes 2024-08-30 19:20:31 +03:00
Pasi Kallinen e645c0b4bb Allow starting game as pauper, without any inventory
And also without spells, skills, or preidentified items.
This also implies nudist.

Breaks saves and bones.
2024-08-29 20:51:13 +03:00
Pasi Kallinen cf44c3046e Join wall spines with walls of water and lava 2024-07-09 18:08:19 +03:00
Pasi Kallinen d4ac146c5f Pets avoid a possible boulder pushing location in Sokoban 2024-07-06 23:12:19 +03:00
Pasi Kallinen 078e22be2e Query menu for hide or spin web monster ability 2024-06-17 18:12:12 +03:00
Pasi Kallinen 78bf0db5b3 Fix copypaste error 2024-06-15 19:04:57 +03:00
Pasi Kallinen 89ea47f702 Monsters can track hero through fixed teleport traps
Also make fixed teleport traps always trigger when entered.
2024-06-15 18:44:30 +03:00
Pasi Kallinen 951401e52a Allow fixed-destination teleport traps
Add a theme room with multiple visible teleportation traps
which will always teleport to specific locations in the same level.

Teleport trap change from xNetHack by copperwater <aosdict@gmail.com>.
2024-06-14 19:50:20 +03:00
Pasi Kallinen a8099edca6 Accessibility: message locations 2024-06-14 13:33:48 +03:00
Pasi Kallinen 30d2eeea41 Accessibility: more monster message locations, pt 2 2024-06-13 19:41:41 +03:00
Pasi Kallinen 6c1a883f90 Accessibility: more monster message locations 2024-06-13 19:27:34 +03:00
Pasi Kallinen a72b95e4bc Accessibility: more message locations
Add a new pline_mon() which sets the message location
to the monster location.

Add locations to several trap messages.
2024-06-13 19:04:33 +03:00
Pasi Kallinen 4e29c9b282 Fix eating non-pyrolisk egg effect 2024-06-03 17:40:50 +03:00
Pasi Kallinen 2bec685bae Pyrolisk eggs explode when broken 2024-06-02 10:50:58 +03:00
Pasi Kallinen 2ba42cf78c Fix accessing freed landmine trap
Landmine blew up, scatter exploded a potion of oil, which melted
the ice on which the landmine was, resulting in the landmine trap
being deleted.  The code then tried to access it to make a pit.
2024-05-31 10:28:44 +03:00
Pasi Kallinen 0490f7736c Fix couple cases of boulders over pits
When a zombie claws itself out of the ground.
When a polymorph is zapped on a pile of objects over a pit,
and one of them turns into a boulder.
2024-05-31 07:46:55 +03:00
Pasi Kallinen 5b94745658 Fix only flying monsters able to evade some traps 2024-05-30 17:51:56 +03:00
Pasi Kallinen 61e54c2a87 Fix monster hp being above max hp
If the monster took damage from a fire trap, got killed, and then
lifesaved, the trap effect then reduced the map hp below the hp.
2024-05-28 20:58:03 +03:00
Pasi Kallinen 2ebbd13f79 Fix boulder over a hole or a pit dug by a monster
When a monster digs down and creates a pit or a hole,
drop the boulder at the location into it.
2024-05-28 19:10:36 +03:00
Pasi Kallinen 800b3b4b4b Fix swallower being in the same location as hero
A monster swallowed hero, hero teleported the monster away, but the level
was full of monsters, so the swallower ended up not moving anywhere,
so it was in the same location as hero, but hero wasn't swallowed by it.
Move the monster into limbo instead.
2024-05-28 18:12:55 +03:00
Pasi Kallinen 5fe872bf98 Pet titan killed itself with a boulder
A pet titan dropped a boulder over a pool, and the code killed
the titan, because the code was considering the titan to be in
the water.

If a flyer or a floater is over the pool, don't kill them off
if a boulder is dropped in there.  Also make the pet movement
code handle the case where the pet might've died while dropping
items.
2024-05-28 17:57:16 +03:00
Pasi Kallinen 9df851d5da Fix split monster with 0 max hp
A gremlin first hit a fire trap, reducing its max hp to 1, and
then it plunged into water, making the split gremlin have 0 max hp.
2024-05-25 18:32:37 +03:00
Pasi Kallinen 38a5dac08c Tutorial: add farlooking 2024-05-20 17:51:56 +03:00
Pasi Kallinen 016ff166c0 Slightly more variance to hellfill maze v5 2024-05-11 10:02:23 +03:00
Pasi Kallinen ed5c7114ab Untrapping containers or doors gives some experience 2024-05-08 20:10:32 +03:00
Pasi Kallinen a6c5d967d2 Fix bhit/mbhit hitting destroyed objects
A monster zapped a wand of striking, hitting a burning potion
of oil, which destroyed items in the same square, and the ray was
checking destroyed item.  Similar thing with a ray done by hero.

The code currently stops checking the objects in the location
if a next object in the chain was destroyed - an improvement
would be to gather all the objects into an array and iterate
over that instead of relying on the nexthere pointer.
2024-05-07 16:05:00 +03:00
Pasi Kallinen 7139ee7446 Move light source and timer types so zero means none
Breaks saves and bones.
2024-05-06 19:58:21 +03:00
Pasi Kallinen dba37fa768 Zero out freed timers and light sources 2024-05-06 19:17:07 +03:00
Pasi Kallinen 1a58ed8de9 Rework object deletion
Make object deletion work similarly to monster deletion:
it's marked for deletion (by setting the where-field to OBJ_DELETED
and moved to specific deleted-objects chain), but they're actually
freed at the beginning of turn.

This may need some more tweaking, especially in places that iterate
over object chains, but fuzzing did not find any obvious problems.

Fix a case of accessing freed memory: a monster breathed at hero,
destroying some items.  The code stored the next item in the chain
(a cloak), but a ring of levitation was destroyed, causing hero to
plop down into lava, destroying the cloak.  The item destruction
code then tried to access the destroyed cloak object.
Make the code check the object where-field - which will be different
if the object was marked for deletion.  Also removed an extra loop
going through the whole object chain looking for the items to
destroy.
2024-05-06 17:57:47 +03:00
Pasi Kallinen 312a4bcd26 Fix weight of merged partially eaten food
Due to integer rounding, merging two partially eaten food rations
will have wrong weight if we add the old weights together.
Recalculate the weight instead.

quan = 1, weight = 6  (6.675)
quan = 2, weight = 13 (13.35)
2024-05-06 12:06:33 +03:00
Pasi Kallinen cc6d04519c Fix mind flayer missing wildly impossible
A mind flayer blasted a polyed hero on a pool, who reverted back
to human.  The hero teleported to safety, but the mind flayer was
still thinking hero was at the old location, and tried to attack there.
2024-05-03 17:57:21 +03:00
Pasi Kallinen 9b9d9d1a13 Fix getloc filter looking outside the map 2024-05-01 11:15:31 +03:00
Pasi Kallinen 575d8c0696 Prevent boomerang going out of map 2024-05-01 10:12:51 +03:00
Pasi Kallinen a0256ef5cb Fix monster vs monster breath attacks
The same routine handles both monster-vs-hero and monster-vs-monster
breath attacks, but the code was considering what the attacker knows
about hero's resistances even when attacking another monster.

Also unconditionally prevent the monster breath attack if the monster
knows about hero reflecting - previously the monster could use the breath
if it were just far enough from hero, even when hero had reflection.
2024-04-27 21:18:58 +03:00
Pasi Kallinen 26c8cbc931 Fix drawbridge checking outside map 2024-04-26 07:59:42 +03:00
Pasi Kallinen ab0a98072b Prevent kicking an object accessing out of map location 2024-04-25 22:58:37 +03:00
Pasi Kallinen 5fa6e6bd8d Prevent explosions moving objects out of map 2024-04-25 22:28:21 +03:00
Pasi Kallinen 472cb7f7fa Prevent throwing gold out of the map 2024-04-25 12:39:02 +03:00
Pasi Kallinen 94dd316e80 Make saveoptions save changed autocompletions 2024-04-25 10:13:08 +03:00
Pasi Kallinen 91ecf2b167 Fix level regions accessing outside map 2024-04-24 23:35:55 +03:00
Pasi Kallinen 3ec8eb59de Fix off-map monster doing things
m_move could make monster go off-map (by eg. using a trap),
but the return values don't reflect that
2024-04-22 16:38:59 +03:00
Pasi Kallinen b76a96bf40 Add missing break
A rolling boulder hitting a wall or a tree could keep going,
possibly going out of map bounds
2024-04-22 14:46:18 +03:00
Pasi Kallinen a429eed984 Add Garden themeroom
Contains some wood nymphs and fountains, and the room walls are trees.

Adds a new lua hook for themeroom generation, "post_level_generate",
which is called last when generating the level.
2024-04-20 19:27:48 +03:00
Pasi Kallinen 4f271c912f Fuzzer vs repeat deaths, again
Even 100 deaths wasn't enough, as the fuzzer was still quitting.
If we're in wizmode, just execute wizmakemap to recreate the level,
getting rid of whatever was blocking hero from teleporting to safety.
2024-04-18 18:10:40 +03:00
Pasi Kallinen 08588a14f8 Prevent error when vault guard fails to relocate monster 2024-04-18 17:12:28 +03:00
Pasi Kallinen bb3b9b7271 CHANGE_COLOR: Save the palette with #saveoptions 2024-04-18 09:24:34 +03:00
Pasi Kallinen 7db8f7c6a5 Fix mention_map and hiders causing a light source error
Prevent glyph change messages while loading a level file.
Otherwise a monster hiding under an item triggered a vision recalc
before light sources were linked to their sources, leading into
strange errors looking like pointer corruption.

getlev -> hide_monst -> hideunder -> newsym -> show_glyph ->
 pline_xy -> vision_recalc -> do_light_sources -> get_obj_location

Add in_getlev program state variable, analogous to in_mklev
2024-04-18 09:01:11 +03:00
Pasi Kallinen bad63a0d36 Hallu Banana 2024-04-14 10:14:27 +03:00