Commit Graph

802 Commits

Author SHA1 Message Date
nhkeni
1663ecf85d Add --version:copy, deprecate --version:paste. 2023-08-03 21:51:25 -04:00
PatR
085594ac04 more PR #1051, take II
I realized that the previous attempt was misusing the item's locked
state when attempting to create the chest that the item would go into,
which was absurd.  I hadn't realized that I was also misspelling
"olocked" as "locked".

This fix was already in progress before the mail about the previous
commit.  I did try switching to 'lckd = nil' for the attempt to retain
the chest's random locked/unlocked state but that resulted in all the
chests being created locked.  Using separate box=... expressions does
work as intended.  Doing something with totable() doesn't seem to be
necessary.

The indentation seems to be messed up compared to the rest of the
file (initial indent of 5 with increments of 4 rather than 3 and 3);
I have't done anything to try to fix it.
2023-07-21 23:09:39 -07:00
PatR
d99b549bb0 more PR #1051 - water-vault escape item
When generating an "escape item" inside one of the chests in the
"water-surrounded vault" theme room, make sure that the chest is not
locked if the item is made of glass or crystal.  Otherwise kicking the
chest to get access to its contents might destroy the item.

I imagine that this could be done more cleanly, but after quite a bit
of thrashing about I have something which seems to work.  To test, I
temporarily modified object shuffling to force wand of digging to be
made out of crystal and gave the water-vault a very high generation
frequency.
2023-07-21 15:00:54 -07:00
Michael Meyer
95b410ee94 Provide escape item in water-surrounded vaults
Water vaults are one of the few places that can/will generate completely
sealed off in a normal level.  Other such spots are designed to provide
a guaranteed means of escape (vault guard, scrolls of teleportation in
niches, etc) -- water vaults were an exception that didn't do this, so a
hero who fell into one from above could have ended up in a position
where she had no choice but to wait to starve to death or #quit. Provide
an escape item in one of the vault's chests to give a hero more options
in that position.

Also fix a minor mistake (I'm pretty sure, though I'm not a Lua expert
enough to be certain) in an nhlib.c comment describing how to use
obj.addcontent() -- when called as box.addcontent(contents) as the
comment suggested it produces an error, but works OK when called as
box:addcontent(contents) or obj.addcontent(box, contents).
2023-07-07 09:42:43 -07:00
Kufat
66d0c47951 Add true rumor re. intrinsics/extrinsics
Some extrinsics (telepathy, speed) are more powerful than their intrinsic versions.
2023-07-04 22:09:20 -07:00
PatR
b1d30fbce9 address github issue #303 - paranoid_confirm:pray
An issue from nearly three years ago, reported by Anerag:  asking
player whether to really pray isn't paranoid enough because it
accepts 'y' rather than requring "yes".

This changes it to require "yes" followed by <return> or <enter> if
paranoid_confirm:Confirm is also set.  (A side-effect of that is
explicit "no<return|enter>" is required instead of just 'n' to
decline--for all the paranoid confirmations, not just for prayer.)
This extension of paranoid:Confirm applies to paranoid:AutoAll too.

A comment asks why paranoid_confirm:pray is different from the other
paranoid questions in the first place.  The answer is that when it
isn't set, no confirmation prompt is issued at all.  The others all
have y/n confirmation prompts when the corresponding paranoid option
isn't set.

Once upon a time there was a boolean option called 'prayconfirm' that
issued "really pray?" prompt when True.  It was added after players
whinged about typing Alt+p when they meant to type Alt+o.  When the
more advanced 'paranoid_confirmation' was introduced, paranoid:pray
superseded prayconfirm, but it still only issues a confirmation
prompt where there normally wouldn't be one rather than change an
existing one to require "yes<return|enter>" instead of 'y'.

Closes #303
2023-06-24 16:12:54 -07:00
PatR
0cd337c78b address issue #1065 - Auto-select every item
Issue most recently reported by Xdminsy (previously reported by
others):  it is too easy to accidentally pick choice 'A' in object
class selection menus for menustyle:Full.  Previous change relevant
to this was to exclude choices 'A' and 'a' from being set by '.'
(choose all entries) and '~' (toggle all entries).  That was an
improvement but doesn't help with pressing shift when meaning to
type 'a' by those who type faster than they cogitate.

This implements a suggestion by janne-hmp:  add new choice for the
paranoid_confirmation option, 'Autoall' (synonym 'Autoselect-all').
If the player sets this and includes 'A' among the choices for
class selection, prompt to confirm whether to honor it.  Like
confirmation for praying, it adds an extra y/n prompt rather than
change an existing y/n prompt into a yes/n or yes/no one.  If the
player declines, then nothing is selected and the operation is
cancelled rather than putting the menu back up to choose again.

OPTIONS=paranoid_confirm:autoall requires at least two letters
('au') even if the 'a' is capitalized.  paranoid_confirm:a means
confirm attacking peaceful monsters.  And it should be
OPTIONS=paranoid_confirm:autoall pray swim
if someone just wants to add autoall to the default paranoid bits.

The Guidebook hasn't been updated to describe the new choice since
it seems likely that it might undergo adjustments.

Closes #1065
2023-06-24 01:15:44 -07:00
PatR
cd9f145dba fix leaving the tutorial levels
While running the tutorial, the Save command is disabled.  When the
tutorial was extended to two levels, stashing and restoring the
hero's equipment stopped working as intended if player entered the
second level.  The attempted fix for that broke re-enabling Save
even if the player left the tutorial without entering its second
level.

This seems to fix things, but I'm flailing around with barely a clue
here.  A couple of simpler attempts didn't work and I haven't figured
out why, so this is a bit more complex than what I wanted.

Reorganizing nhl_callback() isn't part of the fix, just avoids use
of some redundant code.
2023-06-23 15:19:36 -07:00
PatR
8fd8d1defa Mitre of Holiness
If the priest quest artifact Mitre of Holiness (a helm of brilliance,
so crystal helmet) is acquired via the quest (rather than by wishing)
make it start out tempered (aka crackproof|erodeproof).
2023-06-17 13:27:40 -07:00
PatR
c4c31ae6a8 fix issue #1025 - stuck in Mines' End
Issue reported by AndrioCelos:  if you arrived at the Wine Cellar
variation of Mines' End by falling or by level teleportion instead
of via the stairs, you could end up in the treasure chamber.  If
you lacked a way to dig or to level teleport, you would be stuck.
Since most of that level is undiggable, it would likely fill up with
monsters before one that could dig would appear close enough to dig
to you and you'd eventually starve.

The initial report suggested including an escape item in the treasure
chamber.  This adds a teleport region to control hero's arrival spot
instead.  There was a suggestion fix things this way from copperwater
but I didn't notice that until I had already chosen this method....

Fixes #1025
2023-06-10 01:49:55 -07:00
PatR
e475dca209 add 'montelecontrol' option (wizard-mode only)
Add a new debugging option, 'montelecontrol', that allows a wizard-
mode player to choose a teleporting monster's destination.  If player
picks a bad spot, confirmation will be requested.  If accepted, the
spot will be used even though the consequences could be bad; that's
on the player.  If rejected, the destination will be assigned as if
no control had been attempted rather than try again.

The fuzzer isn't allowed to override a bad spot if it tries to pick
one.  That would probably trigger a sanity_check warning; the fuzzer
causes impossible warnings to behave as if panic, so accepting a bad
spot would just be fuzzer suicide.  It is allowed to randomly set the
option and maybe--though extremely unlikely--randomly pick a valid
controlled destination.
2023-06-09 00:56:53 -07:00
PatR
a5a11c19c9 update data.base 'cat' entry
The first paragraph for cat/feline is obviously not from Lovecraft, so
insert an entry attribution line between it and the second paragraph.
2023-06-05 13:58:45 -07:00
PatR
2bbfed2183 fix github issue #1046 - tutorial anomalies
Reported by Noisytoot:  going from level tut-1 to tut-2 returned the
hero's starting equipment too soon, and exiting the tutorial from
tut-2 let the hero keep any equipment acquired within the tutorial.

Entering and leaving the tutorial was being handled by lua code in
the level description of tut-1 and adding a second level messed that
up.  I didn't see any way of handing that with level-specific lua
code so I made it become the core's responsibility.  gotolevel()
knows when the hero is moving from one dungeon branch to another so
it can recognize entry to or exit from the tutorial easily.

While fixing this, prevent #invoke of the Eye of the Aethiopica from
offering the tutorial as a candidate destination (was feasible if it
had been entered at start of game).

Not fixed:  levels visited in the tutorial become part of #overview.

Show location as "Tutorial:1" instead of "Dlvl:1" on status lines.
Only tested with tty; some interfaces handle location themselves and
may need their own fixup for this.

Fixes #1046
2023-06-03 16:39:12 -07:00
PatR
0a16638fe4 data.base entry for "combat"
16 years ago the "combat" entry got inserted in between a comment and
the "cope" entry, making the comment end up being out of place.  Move
that and add a bit more detail.
2023-05-29 05:09:21 -07:00
PatR
1851c7ca88 update Medusa's data.base entry
The second paragraph about Medusa is an excerpt from Bulfinch's
Mythology, but first paragraph is not.  Insert an empty attribution
line between them.  Also, remove the reference to Graeae from the
introduction since it contradicts Bulfinch, which describes them as
"three sisters who were gray-haired from their birth" and Gorgons as
"monstrous females with huge teeth, brazen claws, and snaky hair".
2023-05-13 11:23:49 -07:00
PatR
7a18387ff2 Fix github issue #1016 - buried zombie theme room
Reported by vultur-cadens:  it was possible to encounter ettin zombies
and giant zombies at shallow levels if those levels were generated
with the "buried zombies" theme room.

This uses a simpler fix than the suggestion(s); it's only applicable
to the zombie room though.

Also, vary the zombify_mon timeout.  If the hero happened to be in
the room at the time that that expired, they would all claw their way
out of the ground at once.  The new variation is quite small so they
still escape burial as a group, but over the span of 21 turns rather
than all on one turn.

Fixes #1016
2023-05-01 15:37:30 -07: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
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
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
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
Pasi Kallinen
916aefc78c Hellfill: vertical breaks 2023-04-06 13:30:48 +03:00
Pasi Kallinen
12dd5323c8 Tutorial: eating food
Also document the lua timers a bit more.
2023-04-04 13:04:39 +03:00
Pasi Kallinen
52f5f6b11a Juiblex level temperature 2023-04-01 17:48:03 +03:00
Pasi Kallinen
ba60bfac25 Themeroom: buried zombies
- add a themeroom with random buried zombifying corpses
- disturbing buried zombies makes them revive much faster
- lua des.object() now returns the object it created
2023-04-01 14:05:18 +03:00
copperwater
4542d14d23 Make "cookie-only" rumors explicit in rumors file
The prior behavior was an ugly kludge that treated rumors as
only-eligible-to-appear-from-fortune-cookies if they contained the
string "fortune" or "pity". This commit gets rid of that system and
introduces a system where each rumor can be specified as such by
prefixing it with "[cookie]".

In order to avoid changing existing behavior, I have applied the
[cookie] prefix to all the rumors which were affected under the old
rules. However, several rumors seem like they were misclassified under
the old rules, and I am in favor of changing them as follows:

Should be made cookie-only (they only really make sense in context of
eating a fortune cookie):
- "Ouch. I hate when that happens."
- "PLEASE ignore previous rumor."
- "Suddenly, the dungeon will collapse..."
- "Unfortunately, this message was left intentionally blank."

Should be made non-cookie-only (they make sense if they appear as
engravings, Oracle messages, or artifact whispers):
- "They say that a gypsy could tell your fortune for a price."
- "They say that fortune cookies are food for thought."
2023-04-01 10:13:01 +03:00
copperwater
4126eb3cbe Remove the manual 50% vertical swap of doors in Baalzebub level
This was added before level flipping, and its purpose effectively was to
randomize the interior secret door layout (and thus the entire level,
because the rest is vertically symmetric) by manually flipping it.
Now that the entire level can be flipped and produce this same effect,
this is no longer necessary.
2023-04-01 10:10:34 +03:00
Pasi Kallinen
4194b01c17 Tutorial: run prefix 2023-03-28 20:30:53 +03:00
Pasi Kallinen
73f1dd2aee Tutorial: blacklist commands
Just block saving.
2023-03-18 19:02:25 +02:00
Pasi Kallinen
c4265fb80c Tutorial: add yet another hidden portal 2023-03-18 16:53:26 +02:00
Pasi Kallinen
2a7be0b050 Tutorial: hunger and eating food
Reset hunger when exiting the tutorial.
Add an optional second parameter to lua pline, forcing a more-prompt.
2023-03-18 14:08:13 +02:00
Pasi Kallinen
633487849b Tutorial: looting containers, zapping wands 2023-03-18 12:07:46 +02:00
Pasi Kallinen
20dbd989f1 Tutorial: Firing missiles and quiver 2023-03-18 11:48:19 +02:00
Pasi Kallinen
3f3c275ed5 Tutorial: throwing items 2023-03-18 11:04:27 +02:00
Pasi Kallinen
aa83dadc1e Add stormy level flag
Which makes clouds create lightning bolts at random.
This flag is used on the plane of air.

Breaks saves and bones.
2023-03-17 20:13:32 +02:00
Pasi Kallinen
4799fc937a Add level flag for plane of fire fumaroles
Also reduce the size of the gas clouds.

Breaks saves and bones.
2023-03-17 19:36:00 +02:00
Pasi Kallinen
90906ed05a Hellfill: Pillars of lava or water 2023-03-16 12:30:45 +02:00
Pasi Kallinen
441d498300 Tutorial: being burdened, dropping items 2023-03-16 07:44:29 +02:00
Pasi Kallinen
bf3a5ec3ed Hellfill: Fort 2023-03-15 20:55:38 +02:00
Pasi Kallinen
8e6cf385b1 Fix subroom doors
Doors weren't getting added to the correct subrooms in certain cases.

Also fix one of the themerooms, because doors have to be added
after subrooms; there was a possibility of no door to the subroom(s)
in that themeroom, because the subrooms overwrote the doors in
the parent room.

Test case for the subroom doors:

Large room, with a medium subroom, with a tiny subroom inside that.
The doors go from outermost room <-> tiny innermost room <-> middle room.

des.room({ type = "ordinary", x = 1, y = 1, w = 10, h = 10,
   contents = function()
      des.room({ type = "ordinary", w = 6, h = 6, x = 2, y = 2,
         contents = function()
            des.room({ type = "ordinary", w = 2, h = 2, x = 0, y = 0,
               contents = function()
                  des.door({ state="random", wall="south", pos = 1 });
               end
            });
            des.door({ state="random", wall="north", pos = 1 });
         end
      });
   end
});

Before this fix:

ROOM: ndoors:1, subrooms:1
  SUBROOM: ndoors:1, subrooms:1
    SUBROOM: ndoors:1, subrooms:0

after this fix:

ROOM: ndoors:1, subrooms:1
  SUBROOM: ndoors:1, subrooms:1
    SUBROOM: ndoors:2, subrooms:0
2023-03-07 09:43:44 +02:00
nhmall
32ca917d2c sym-changes - add engravings to the map
1. Add "engraved room floor" pchar sym (S_engroom). The symbol that
displays at the engraved part of a room (not a corridor though).
The default symbol is '`' which is currently never shown if people
have defined the boulder symbol to '0' and statues are displayed as
monster symbols. It is bright blue.

Add some stylized variations of the S_engroom symset to some of
the symsets.

2. Add "engraved corridor" pchar sym (S_engrcorr). The symbol that
displays at the engraved part of a corridor. The default symbol is
'#', and it matches the symbol for corridor from for whatever the
current symset uses. It is bright blue to match the color of the
S_engroom symbol. Using the normal corridor symbol for display
preserves the lines of the corridor so is not as visually-disruptive
as a smaller symbol would be. Explicit entries that match the S_corr
symbol have been added to the symset file.

Magic mapping and clairvoyance impacts yet to be determined.

The Guidebook updates will come later.
2023-03-05 17:35:49 -05:00
Pasi Kallinen
c2d6bde9cd More tutorial level
Add more stuff to the tutorial level:
 - closing a door
 - cursed armor
 - taking off armor
 - shuffled descriptions
 - removing curses
 - reading scrolls
2023-03-05 16:38:24 +02:00
Pasi Kallinen
2c092bb641 Tutorial: pushing boulders 2023-03-03 16:14:22 +02:00
Pasi Kallinen
3b519c7023 Minor tutorial tweak
Remove the autoopen setting, as it alraedy defaults to on.
Add an engraving mentioning some actions may take multiple tries.
2023-03-03 09:57:49 +02:00
Pasi Kallinen
fc7a32b86e Tutorial level
Add a tutorial level to teach commands to new players.
Very much a WIP.

Breaks save and bones compat.
2023-03-01 14:00:29 +02:00
Kufat
b435cd840a Bogusmon from The Culture (Iain M. Banks)
Add the antagonistic undecagonstring from The Hydrogen Sonata as a hallucinatory monster.
2023-02-25 23:54:07 -08:00