cut trees and dug walls replaced by corridor symbols
- In various places, cutting down a tree would result in a corridor symbol showing up, although trees are generally found in room-like areas. Added the missing checks. - Trees were diggable except on mazelike levels. Added the missing check. - In a cavernous town like minetn-6, digging a wall would result in a corridor symbol being displayed instead of a doorway. This looked strange, especially in the town. Added a check for this, making use of the new meaning of in_town(); non-town parts of this level still do CORR replacement as expected.
This commit is contained in:
18
src/dig.c
18
src/dig.c
@@ -350,7 +350,8 @@ dig()
|
||||
}
|
||||
if (level.flags.is_maze_lev) {
|
||||
lev->typ = ROOM;
|
||||
} else if (level.flags.is_cavernous_lev) {
|
||||
} else if (level.flags.is_cavernous_lev &&
|
||||
!in_town(dpx, dpy)) {
|
||||
lev->typ = CORR;
|
||||
} else {
|
||||
lev->typ = DOOR;
|
||||
@@ -1095,7 +1096,8 @@ register struct monst *mtmp;
|
||||
add_damage(mtmp->mx, mtmp->my, 0L);
|
||||
if (level.flags.is_maze_lev) {
|
||||
here->typ = ROOM;
|
||||
} else if (level.flags.is_cavernous_lev) {
|
||||
} else if (level.flags.is_cavernous_lev &&
|
||||
!in_town(mtmp->mx, mtmp->my)) {
|
||||
here->typ = CORR;
|
||||
} else {
|
||||
here->typ = DOOR;
|
||||
@@ -1222,6 +1224,13 @@ zap_dig()
|
||||
} else if (!Blind)
|
||||
pline_The("rock glows then fades.");
|
||||
break;
|
||||
} else if (IS_TREE(room->typ)) {
|
||||
if (!(room->wall_info & W_NONDIGGABLE)) {
|
||||
room->typ = ROOM;
|
||||
unblock_point(zx,zy); /* vision */
|
||||
} else if (!Blind)
|
||||
pline_The("tree glows then fades.");
|
||||
break;
|
||||
}
|
||||
} else if (IS_ROCK(room->typ)) {
|
||||
if (!may_dig(zx,zy)) break;
|
||||
@@ -1231,13 +1240,16 @@ zap_dig()
|
||||
shopwall = TRUE;
|
||||
}
|
||||
watch_dig((struct monst *)0, zx, zy, TRUE);
|
||||
if (level.flags.is_cavernous_lev) {
|
||||
if (level.flags.is_cavernous_lev && !in_town(zx, zy)) {
|
||||
room->typ = CORR;
|
||||
} else {
|
||||
room->typ = DOOR;
|
||||
room->doormask = D_NODOOR;
|
||||
}
|
||||
digdepth -= 2;
|
||||
} else if (IS_TREE(room->typ)) {
|
||||
room->typ = ROOM;
|
||||
digdepth -= 2;
|
||||
} else { /* IS_ROCK but not IS_WALL or SDOOR */
|
||||
room->typ = CORR;
|
||||
digdepth--;
|
||||
|
||||
@@ -382,12 +382,15 @@ still_chewing(x,y)
|
||||
digtxt = "chew a hole in the wall.";
|
||||
if (level.flags.is_maze_lev) {
|
||||
lev->typ = ROOM;
|
||||
} else if (level.flags.is_cavernous_lev) {
|
||||
} else if (level.flags.is_cavernous_lev && !in_town(x, y)) {
|
||||
lev->typ = CORR;
|
||||
} else {
|
||||
lev->typ = DOOR;
|
||||
lev->doormask = D_NODOOR;
|
||||
}
|
||||
} else if (IS_TREE(lev->typ)) {
|
||||
digtxt = "chew through the tree.";
|
||||
lev->typ = ROOM;
|
||||
} else if (lev->typ == SDOOR) {
|
||||
if (lev->doormask & D_TRAPPED) {
|
||||
lev->doormask = D_NODOOR;
|
||||
|
||||
Reference in New Issue
Block a user