Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
6c2d7c3695 Tutorial: twoweapon and swap weapons 2023-04-06 19:30:54 +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
4194b01c17 Tutorial: run prefix 2023-03-28 20:30:53 +03:00
Pasi Kallinen
c4265fb80c Tutorial: add yet another hidden portal 2023-03-18 16:53:26 +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
441d498300 Tutorial: being burdened, dropping items 2023-03-16 07:44:29 +02: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