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
This commit is contained in:
@@ -354,6 +354,7 @@ struct dgn_topology { /* special dungeon levels for speed */
|
||||
xint16 d_tower_dnum;
|
||||
xint16 d_sokoban_dnum;
|
||||
xint16 d_mines_dnum, d_quest_dnum;
|
||||
xint16 d_tutorial_dnum;
|
||||
d_level d_qstart_level, d_qlocate_level, d_nemesis_level;
|
||||
d_level d_knox_level;
|
||||
d_level d_mineend_level;
|
||||
@@ -386,6 +387,7 @@ struct dgn_topology { /* special dungeon levels for speed */
|
||||
#define sokoban_dnum (gd.dungeon_topology.d_sokoban_dnum)
|
||||
#define mines_dnum (gd.dungeon_topology.d_mines_dnum)
|
||||
#define quest_dnum (gd.dungeon_topology.d_quest_dnum)
|
||||
#define tutorial_dnum (gd.dungeon_topology.d_tutorial_dnum)
|
||||
#define qstart_level (gd.dungeon_topology.d_qstart_level)
|
||||
#define qlocate_level (gd.dungeon_topology.d_qlocate_level)
|
||||
#define nemesis_level (gd.dungeon_topology.d_nemesis_level)
|
||||
|
||||
Reference in New Issue
Block a user