Fix C343-341: Stuck in minetown room

Bustling Town can be generated with inaccessible areas outside the
top edge of the fixed town map.  If you end up in one of those area
without any way to dig or teleport, you're stuck.

This adds a new level flag "inaccessibles" to force checking for
such inaccessible areas, and add secret doors, holes/trapdoors,
or some random escape item into the areas.
This commit is contained in:
Pasi Kallinen
2015-10-13 19:00:18 +03:00
parent 1703818a11
commit 65a30d2ba7
4 changed files with 182 additions and 21 deletions

View File

@@ -30,6 +30,8 @@
*/
#define SOLIDIFY 0x00000400L /* outer areas are nondiggable & nonpasswall */
#define CORRMAZE 0x00000800L /* for maze levels only */
#define CHECK_INACCESSIBLES 0x00001000L /* check for inaccessible areas and
generate ways to escape from them */
/* different level layout initializers */
#define LVLINIT_NONE 0
@@ -291,6 +293,7 @@ struct sp_coder {
int n_subroom;
boolean exit_script;
int lvl_is_joined;
boolean check_inaccessibles;
int opcode; /* current opcode */
struct opvar *opdat; /* current push data (req. opcode == SPO_PUSH) */