summaryrefslogtreecommitdiff
path: root/npc/maze0
diff options
context:
space:
mode:
Diffstat (limited to 'npc/maze0')
-rw-r--r--npc/maze0/config.txt35
1 files changed, 18 insertions, 17 deletions
diff --git a/npc/maze0/config.txt b/npc/maze0/config.txt
index 32a55894a..07bc3222d 100644
--- a/npc/maze0/config.txt
+++ b/npc/maze0/config.txt
@@ -191,7 +191,7 @@ function script ParseMaze {
// Can we do this?
// Case 1: We're in the edge
- if (.@y == MAZE_MY)
+ if (.@y == MAZE_MY-1)
return false;
// Case 2: Down direction is invalid?
@@ -206,7 +206,7 @@ function script ParseMaze {
// Can we do this?
// Case 1: We're in the edge
- if (.@x == MAZE_MX)
+ if (.@x == MAZE_MX-1)
return false;
// Case 2: Right direction is invalid?
@@ -260,7 +260,7 @@ function script GenerateMaze {
MAZEMAPTYPE_DEADS, MAZEMAPTYPE_DEADE,
MAZEMAPTYPE_CURVESE;
// NE edge
- else if (.@x == MAZE_MX)
+ else if (.@x == MAZE_MX-1)
setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
MAZEMAPTYPE_DEADS, MAZEMAPTYPE_DEADW,
MAZEMAPTYPE_CURVESW;
@@ -273,7 +273,7 @@ function script GenerateMaze {
// Case 2: Right column
- } else if (.@y == MAZE_MY) {
+ } else if (.@y == MAZE_MY-1) {
// SW edge
if (.@x == 0)
@@ -281,7 +281,7 @@ function script GenerateMaze {
MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADE,
MAZEMAPTYPE_CURVENE;
// SE edge
- else if (.@x == MAZE_MX)
+ else if (.@x == MAZE_MX-1)
setarray getd(MazeVar(.@x, .@y, "_ALLOWEDTYPES")),
MAZEMAPTYPE_DEADN, MAZEMAPTYPE_DEADW,
MAZEMAPTYPE_CURVENW;
@@ -367,21 +367,22 @@ function script GenerateMaze {
// Sanity Check
- for (.@y=0; .@y < MAZE_MY; .@y++) {
- for (.@x=0; .@x < MAZE_MX; .@x++) {
- .@mid=getd(MazeVar(.@x, .@y, "_ID"));
- .@v$=MazeVar(.@x, .@y);
- .@n$=getd(.@v$+"$["+MAZENORTH+"]");
- .@w$=getd(.@v$+"$["+MAZE_WEST+"]");
- .@e$=getd(.@v$+"$["+MAZE_EAST+"]");
- .@s$=getd(.@v$+"$["+MAZESOUTH+"]");
- debugmes "\t%s\t\t\t", .@n$;
- debugmes "%s|%s|%s", .@w$, .@s$, .@e$;
+ if ($@GM_OVERRIDE) {
+ for (.@y=0; .@y < MAZE_MY; .@y++) {
+ for (.@x=0; .@x < MAZE_MX; .@x++) {
+ .@mid=getd(MazeVar(.@x, .@y, "_ID"));
+ .@v$=MazeVar(.@x, .@y);
+ .@n$=getd(.@v$+"$["+MAZENORTH+"]");
+ .@w$=getd(.@v$+"$["+MAZE_WEST+"]");
+ .@e$=getd(.@v$+"$["+MAZE_EAST+"]");
+ .@s$=getd(.@v$+"$["+MAZESOUTH+"]");
+ debugmes "\t%s\t\t\t", .@n$;
+ debugmes "%s|%s|%s\t\t", .@w$, .@s$, .@e$;
+ }
+ debugmes "%s (%d)", .@v$, .@mid;
}
- debugmes "%s (%d)", .@v$, .@mid;
}
-
freeloop(false);
debugmes "[STATUS] Finished";
end;