Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen 2e8adda028 Clouds cannot have engravings in them
... so delete the existing engraving if a cloud is put on the map.
2023-11-09 18:08:00 +02:00
Pasi Kallinen 8dc7a4882a Make spell menu work with repeat command 2023-11-05 13:49:04 +02:00
Pasi Kallinen f720e1e548 Themeroom: Cloud room 2023-11-05 13:08:43 +02:00
Pasi Kallinen 2bb7239867 Fix iron bars dissolving turning floor into doorway 2023-11-04 13:41:12 +02:00
Pasi Kallinen 738c2239c9 Lightning has a small chance of melting iron bars 2023-11-04 13:04:27 +02:00
Pasi Kallinen 56f4657041 Simplify add_menu, part 10 2023-11-03 22:37:50 +02:00
Pasi Kallinen 4dd9602f4b Simplify add_menu, part 9 2023-11-03 22:32:36 +02:00
Pasi Kallinen ee27757b60 Simplify add_menu, part 8 2023-11-03 22:23:46 +02:00
Pasi Kallinen 06235b7841 Simplify add_menu, part 7 2023-11-03 22:04:55 +02:00
Pasi Kallinen 70c47c4054 Simplify add_menu, part 6 2023-11-03 21:48:46 +02:00
Pasi Kallinen 93fd946ff6 Simplify add_menu, part 5 2023-11-03 21:41:26 +02:00
Pasi Kallinen 175d167896 Simplify add_menu, part 4 2023-11-03 21:27:22 +02:00
Pasi Kallinen 7592ce81f4 Simplify add_menu, part 3 2023-11-03 21:09:34 +02:00
Pasi Kallinen 2fd177ddb5 Simplify add_menu, part 2 2023-11-03 21:01:17 +02:00
Pasi Kallinen a6051dae81 Simplify adding menu headings 2023-11-03 19:07:15 +02:00
Pasi Kallinen 852f8e4996 Dropping items disturbs buried zombies 2023-11-02 20:31:51 +02:00
Pasi Kallinen e6993f2ef1 Digging down on a magical trap causes it to explode 2023-11-02 19:18:18 +02:00
Pasi Kallinen 4b70213677 #saveoptions fixme comment 2023-10-31 18:16:56 +02:00
Pasi Kallinen 1d9726f821 More #saveoptions and cond_ options
Only save the cond_ options that are different from the default.
2023-10-31 14:57:36 +02:00
Pasi Kallinen 03ee609ca0 Saving grace stops multi-turn actions, sleeping, and fainting 2023-10-29 18:01:28 +02:00
Pasi Kallinen 16ed7e49c3 Separate level flags for premapped and sokoban 2023-10-29 12:35:32 +02:00
Pasi Kallinen 638c487c59 Split deadbook undead pacify effect into separate function
Also make the monster chain iterator functions more robust,
in case the called function changes the next monster pointer.
2023-10-28 19:01:46 +03:00
Pasi Kallinen 7bf3888118 Shopkeepers consider monster type for some items
Tins, eggs, and corpses will now cost different amounts
based on what intrinsics the monster type could give
2023-10-25 18:45:16 +03:00
Pasi Kallinen 48b10a1c8d MSDOS: example hilite_status in default config 2023-10-25 09:50:47 +03:00
Pasi Kallinen 614e6c9d5e MSDOS: implement inverse text attribute 2023-10-24 18:34:15 +03:00
Pasi Kallinen 76471e890b MSDOS: Fix VESA mode text background color 2023-10-24 09:37:36 +03:00
Pasi Kallinen 79496b079a Fix splitting monster being killed twice
Fuzzer encountered "m_detach: monster already detached?"

A monster hit a black pudding that split. The clone was
created on top of a rolling boulder trap, which triggered,
the boulder hit the original black pudding, and killed it.
The dead pudding then retaliated (as the code didn't check
if it was dead) and a passive attack of the other monster
tried to kill the already dead pudding.

I think one of these checks would be enough, but adding the
DEADMONSTER check just in case.
2023-10-21 19:49:49 +03:00
Pasi Kallinen ff4f81af1b Make rolling boulders hit walls and trees
While testing something else, I noticed rolling boulders
just ignored walls and trees; in normal play this isn't
a problem - but should probably make boulders handle other
terrain too.  Lava and water is already handled correctly.
2023-10-21 18:42:43 +03:00
Pasi Kallinen 9ea4a3a329 Don't set getdir_click unless we've requested it
This allowed eg. throwing the iron ball anywhere on the map,
by first throwing something else, using the "simulated mouse click"
to select any map location, and then throwing the iron ball and
also using the mouse click feature to select any location.

Currently the only function that actually uses the simulated
mouse click feature is #therecmdmenu
2023-10-21 16:13:22 +03:00
Pasi Kallinen 69a4853851 Fix "no monster to remove" when tame nymph attacked
A tame nymph attacked another monster, stole an item and teleported
away, but dog_move() wasn't passed the information that the nymph
was done, and tried to move the nymph from the old location.

Same with a tame leprechaun.
2023-10-21 16:05:15 +03:00
Pasi Kallinen 72016b1f17 Don't iterate over off-map monsters 2023-10-16 11:28:01 +03:00
Pasi Kallinen 13ad9561f3 Buff scroll of confuse monster 2023-10-11 20:22:56 +03:00
Pasi Kallinen dfac5fbf67 Buff blessed potion of monster detection 2023-10-11 19:52:31 +03:00
Pasi Kallinen 38546778d5 Bigroom 3 may have some walls replaced with other terrain 2023-10-06 12:07:07 +03:00
Pasi Kallinen 90ec36bcd6 Reduce land mine weight
They were simply too heavy to lug around; now they weigh
the same beartraps.
2023-10-04 21:43:28 +03:00
Pasi Kallinen 76de4f6ee9 Ice devils get a slowing touch 2023-10-04 20:06:12 +03:00
Pasi Kallinen 93b9467c08 Balrogs prefer bullwhip is hero is wielding something 2023-10-04 19:48:21 +03:00
Pasi Kallinen 3946c5a01d Give barbed devils a sticking attack 2023-10-04 11:09:25 +03:00
Pasi Kallinen f83a57c5bf Tweak wand of make invisible and potion of invisibility
Wand of make invisible doesn't make you permanently invisible,
just for a short duration.  Potion of invisibility makes you
invisible for much longer period, or if blessed, has a small
chance of giving permanent invisibility.

This makes the wand actually useful, and improves the spell
too.
2023-10-03 21:04:15 +03:00
Pasi Kallinen 2402e6ad4d Decommission Juiblex Express 2023-10-03 10:57:29 +03:00
Pasi Kallinen f0698e1dca Bone devils summon skeletons
Skeletons are extremely rare, and not generated at random,
and bone devils are basically just a speed bump when they appear.
Make both more interesting.

Idea by copperwater <aosdict@gmail.com>
2023-10-02 20:25:58 +03:00
Pasi Kallinen 9b4eaafe8c Fog clouds maintain any gas clouds 2023-10-02 13:05:15 +03:00
Pasi Kallinen cf0eb8dfa0 Steam vortices leave steam clouds behind
Code via xnethack by copperwater <aosdict@gmail.com>
2023-10-01 20:30:54 +03:00
Pasi Kallinen 412a996da8 Wand of probing reveals tin contents 2023-10-01 14:49:00 +03:00
Pasi Kallinen ac9be58970 Sitting on cream pies destroys them 2023-09-30 23:27:47 +03:00
Pasi Kallinen 6e09c980d2 Use #monster to make dragon steed breathe 2023-09-30 22:44:46 +03:00
Pasi Kallinen b1e3863b43 Stop occupation when timed levitation or choking issues a message 2023-09-30 21:15:20 +03:00
Pasi Kallinen 086f68187f Coughing due to stinking cloud wakes up neighbors 2023-09-29 10:56:17 +03:00
Pasi Kallinen 0ecb0547e6 Reset getdir_click when exiting therecmdmenu early
This was causing a really annoying to track down bug where
the fuzzer threw the attached iron ball and it could end up
anywhere on the level, emitting a sanity check error.
2023-09-28 18:19:53 +03:00
Pasi Kallinen 56159742c2 Prevent segfault for non-existent trap
If a buried zombie under stairs revived
2023-09-23 17:25:24 +03:00
Pasi Kallinen 44a649b0b4 Wand of probing reveals map locations in ray path 2023-09-18 19:20:01 +03:00
Pasi Kallinen ef296e7ad9 Change wall of water color to bright blue
Differentiates it from a pool of water, with the same logic as
wall of lava is different from pool of lava.
2023-09-10 20:48:41 +03:00
Pasi Kallinen 50084750c4 Ring of hunger prevents choking on food
... but you will not be prompted to stop eating,
and you will vomit enough to be hungry afterwards.
2023-09-03 18:27:00 +03:00
Pasi Kallinen b5a43a60f2 Asmodeus' cold magic attack when hero is resistant
Asmodeus kept using the cold magic attack when hero was cold resistant.
The distance magic attack already considered hero resistances, so
use the same logic for the close-up magic attack.
2023-08-25 10:58:11 +03:00
Pasi Kallinen e407af4477 Allow defining random-teleport exclusion zones in lua
Adds a new lua command

  des.exclusion({ type = "teleport", region = { x1,y1, x2,y2 } });

which allows defining "exclusion zones" in the level, areas where
random teleports (or falling into the level) will never place the hero.
Does not prevent targeted teleportation into the area.

Breaks saves and bones.
2023-08-24 18:38:39 +03:00
Pasi Kallinen 0794a64b9d Fix lua object added to container error
The reference count of the deleted object was changed,
instead of the object that it was merged into.
2023-08-24 09:22:57 +03:00
Pasi Kallinen 491cc9933f Unhide a water monster using a polymorph trap 2023-08-08 16:49:03 +03:00
Pasi Kallinen 39530f9228 Fix the mind flayer attacking without knowing your location
This was caused by the mind flayer mind blasting polymorphed hero,
causing them to revert back to human form, and dropping into a pool,
doing an automatic teleport to save them from drowning.
After that the mind flayer tried to hit them in melee, but the hero
was far away.

Recalculate the nearby and inrage variables after mind blast.
2023-05-23 19:24:19 +03:00
Pasi Kallinen a54b6ba75c Split object init out of mksobj
Move the random erosions in there, as those should only be done if
the object is getting a random initialization.
2023-05-13 12:12:36 +03:00
Pasi Kallinen f4f74b2e07 Purple worm burp wakes up monsters 2023-05-12 09:17:09 +03:00
Pasi Kallinen 91257e00c7 Werewolf howling wakes up monsters 2023-05-11 18:48:02 +03:00
Pasi Kallinen 8c8acee423 Fix hero trapped in nonexistent pit
If hero was trapped in a pit, and a monster threw a boulder
at that location, the boulder filled the pit but hero was still
trapped in it.
2023-05-11 16:00:57 +03:00
Pasi Kallinen 81884a92e0 Don't show error when monster in lava cannot tele away
... due to the level being full of monsters.
2023-05-10 18:43:35 +03:00
Pasi Kallinen ead2f94d6e Fix genetic engineer poly hit killing the defender
The polymorph hit can kill the monster, but this info wasn't
propagated back.  If the defending dead monster retaliated,
the game issued an impossible.
2023-05-10 09:34:28 +03:00
Pasi Kallinen 9ca1c5fb56 Fix dmonsfree warning caused by knockback
When a monster being attacked was knocked back into a level
teleport trap, the attacker could still hit the defender.
If the second hit then killed the defender, this could result
in dmonsfree warning.
2023-05-07 22:12:56 +03:00
Pasi Kallinen 3ffb69bf2f Fix another "no monster to remove" impossible
Pet ranged attack code was using the same variable for
both pet attacking a monster and then the monster's possible
retaliation attack. The retaliation obviously overwrote the
pet attack return code, allowing pet to move afterwards.
In certain case this could result in "no monster to remove"
warning.
2023-05-07 22:12:56 +03:00
Pasi Kallinen e18548c821 Fix knockback impossible
When monster attacked another monster, and the retaliation attack
knocked back the attacking monster, the variables holding the
attacking monster coordinates were out of sync and caused
"no monster to remove" warning.

Propagate back the knockback hit, so the current monster cannot
do anything further.
2023-05-07 12:57:09 +03:00
Pasi Kallinen 5023e4bfad Fix tame soldier being angry
Wizard-mode created tame soldier got angry when another
soldier played a bugle.
2023-05-06 23:12:59 +03:00
Pasi Kallinen fe3dcb4416 Genetic engineer uses up turn when polying a monster
The fuzzer encountered a "no monster to remove" impossible,
this should fix it, even though I did not manage to reproduce
it manually.
2023-05-06 20:16:28 +03:00
Pasi Kallinen d036116dee Fix hiding under nonexistent obj
Zapping a wand of teleportation at a location with object and
a monster hiding under it, but with the level full of monsters,
the monster would stay hidden even when the object was moved.
2023-05-06 20:13:10 +03:00
Pasi Kallinen 6e218cd7ef Fix zapping cancellation at magical trap
The exploding magical trap did not cause problems before just by
being a magical explosion by accident; adding an object caused
the cancellation wand ID to change, and the explosion now had
an impossible explosion type.

Hardcode trap explosions to generic magical blasts.
2023-05-01 17:46:16 +03:00
Pasi Kallinen 80a8eaf7e6 Prevent calling doaltarobj twice
My change to make items thrown by monsters landing on altar
caused doaltarobj being called twice when hero dropped an item
on it. Call the newer instance only when monsters are moving.
2023-04-23 07:47:46 +03:00
Pasi Kallinen 8a85f1d92c Fix minetn-6 map generation errors
Two error cases with the map generation in minetn-6:

first one was the lregion placement impossible, caused by randomly
generated mines not going past the map either left or right, and
the stair generation being restricted outside the fixed map.

second was one side of the map being unreachable, because the
mines layout joined to the other side right at the edge of map
behind the small room with the "x" mapchars.
2023-04-22 19:05:45 +03:00
Pasi Kallinen 659fc2feb3 Tutorial: travel 2023-04-22 12:17:24 +03:00
Pasi Kallinen a725447d65 Corpse-eating monsters will home in on corpses
Also allow non-tame ghouls to eat corpses.
2023-04-20 18:56:26 +03:00
Pasi Kallinen 200cc21fb3 Allow some monsters to break boulders
... if the boulder is in a position they want to move to.
Shopkeepers, priests, and the quest leader can break one boulder
and then need to take several turns before being able to break
another.  Riders can break a boulder every turn.
2023-04-19 14:37:55 +03:00
Pasi Kallinen b04ab80cad Allow annotating other levels via #overview
Change the #overview to use a menu, so the player can change
the annotations on levels other than where they currently are.
2023-04-18 09:40:12 +03:00
Pasi Kallinen cfe60aed8d Dismounting a trapped steed
Riding a steed into a trap and dismounting also untrapped
the steed. Try to keep the steed in the trap.
2023-04-17 18:47:05 +03:00
Pasi Kallinen 945e65a19f Move bgcolors option to the map section 2023-04-17 17:07:23 +03:00
Pasi Kallinen 0ac9309e1e Simple options menu shows help for each entry 2023-04-17 15:47:50 +03:00
Pasi Kallinen 6fcce6e135 Redo the portal breakage for the fuzzer 2023-04-17 11:09:58 +03:00
Pasi Kallinen d3e48dfad1 Tutorial: going down and up stairs
Adds the second tutorial level, tut-2.lua
2023-04-16 10:46:03 +03:00
Pasi Kallinen 83ed647a3e Fixes entry 2023-04-16 09:46:37 +03:00
Pasi Kallinen 36f1596c02 Shop door entrance placement
If for some reason a shop room has multiple doors, try all of them
to find a good shop door, instead of just the first one, and failing
if it wasn't a good one.

This only matters for wizard-mode with SHOPTYPE environment var.
2023-04-15 14:25:52 +03:00
Pasi Kallinen 51ebfb2f0b Fix tutorial breaking other portals 2023-04-15 13:25:43 +03:00
Pasi Kallinen 25bf9d2a49 Prevent conflicted shopkeeper moving on top of hero
Peaceful, but conflicted, shopkeeper could move on top
of the hero, if hero was standing on the free spot inside shop.
2023-04-13 21:20:29 +03:00
Pasi Kallinen ad4c71fab3 Avoid placing random niches into subroom walls
Wizmode testing shop generation, I encountered impossible
"Where is shopdoor" - the room that was being turned into
a shop had a subroom sharing the outer south wall with
the parent room, with a random niche placed such that it was
actually in the subroom wall. The niche door was still added
to the parent room, and the shop generation was trying to use
that door as the shop entrance.

As random niches are only used in room-and-corridor style
levels, subrooms aren't that common, so I just opted to
skip the niche generation if it was going to be placed
without being directly attached to the room it wanted.

The niche generation could be changed at a later date to actually
add the niche door to the correct room instead, if we ever feel
it's necessary to have random niches in subrooms.

As an interesting side note, I had no idea random niches were
only placed in the south or north walls of rooms, never to
east or west.
2023-04-13 18:50:31 +03:00
Pasi Kallinen 8b32ae98e9 Add petless conduct
Breaks saves.
2023-04-11 14:21:06 +03:00
Pasi Kallinen ffb61612e3 Option to create the character deaf
Allows creating your character permanently deaf,
for that added challenge.

Breaks saves.
2023-04-11 13:23:30 +03:00
Pasi Kallinen 699473e03f Moving to water is not dangerous if already underwater 2023-04-10 12:23:43 +03:00
Pasi Kallinen cb73cbedb7 Tutorial: backup and restore struct you 2023-04-09 18:15:31 +03:00
Pasi Kallinen 79bdab1f03 Tutorial: puton and remove 2023-04-09 18:00:08 +03:00
Pasi Kallinen 3a3be46624 Bigrm-5 may have patches of ice or cloud 2023-04-09 11:56:35 +03:00
Pasi Kallinen 23ef6e558e Make bigrm-4 terrain symmetrical 2023-04-09 11:12:02 +03:00
Pasi Kallinen 82bb61532c Bigrm-4 fix and variation
The "butterfly" shaped bigroom was missing the four fountains
in the corners of the room - this was due to my copy-paste error
when converting the bigrooms from des to lua.

Also add some variation to the bigroom.
2023-04-09 11:09:53 +03:00
Pasi Kallinen b61aa235c7 Items thrown by monsters landing on an altar 2023-04-08 21:24:10 +03:00
Pasi Kallinen ce1f4788cd Angering monsters hit by items from exploding bag of holding 2023-04-08 18:25:45 +03:00
Pasi Kallinen 3296fc729e cmd_from_func prefers printable key over ctrl combination
If command is bound to multiple keys (like #kick), cmd_from_func
prefers to return the key in the printable range over a ctrl-key
combo.
2023-04-08 11:25:07 +03:00
Pasi Kallinen 6c2d7c3695 Tutorial: twoweapon and swap weapons 2023-04-06 19:30:54 +03:00
Pasi Kallinen a39716ae13 Hellfill: multiple prefabs per level 2023-04-06 13:54:40 +03:00