fix github issue #1070 - Minetown achievement

Issue reported by vultur-cadens:  arriving on the Mine Town level
via falling or level teleport won't register the "entered Minetown"
achievement if hero doesn't arrive inside a room.

Reorder some code in check_special_room() so that town entry will be
tested before the early return if no room entry has occurred.  This
adds 'level.flags.has_town' to make the town test be cheaper when
the hero hasn't attained the achievement yet and is wandering around
the mines.

Fixes #1070
This commit is contained in:
PatR
2023-07-06 13:18:19 -07:00
parent 2bba306348
commit 60a3263a85
6 changed files with 40 additions and 13 deletions

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 87
#define EDITLEVEL 88
/*
* Development status possibilities.

View File

@@ -410,13 +410,15 @@ struct levelflags {
Bitfield(is_maze_lev, 1);
Bitfield(is_cavernous_lev, 1);
Bitfield(arboreal, 1); /* Trees replace rock */
Bitfield(has_town, 1); /* level contains a town */
Bitfield(wizard_bones, 1); /* set if level came from a bones file
which was created in wizard mode (or
normal mode descendant of such) */
* which was created in wizard mode (or
* normal mode descendant of such) */
Bitfield(corrmaze, 1); /* Whether corridors are used for the maze
rather than ROOM */
* rather than ROOM */
Bitfield(rndmongen, 1); /* random monster generation allowed? */
Bitfield(deathdrops, 1); /* monsters may drop corpses/death drops */
Bitfield(noautosearch, 1); /* automatic searching disabled */
Bitfield(fumaroles, 1); /* lava emits poison gas at random */
Bitfield(stormy, 1); /* clouds create lightning bolts at random */