When making a random door into a random wall or random position
in a room, keep trying harder to find a location that doesn't
have solid wall behind it.
Fixes the Wizard tower door.
grammar for messages about a monster removing items from a container was bad
some new status conditions didn't always update when they should
fix flipping non-existent stairs and ladders (github #311)
+fix door created into random wall or position opening into solid wall
Platform- and/or Interface-Specific Fixes
y = broom->ly - 1;
x = broom->lx
+ ((dpos == -1) ? rn2(1 + (broom->hx - broom->lx)) : dpos);
- if (!isok(x,y - 1))
+ if (!isok(x,y - 1) || IS_ROCK(levl[x][y - 1].typ))
goto redoloop;
goto outdirloop;
case 1:
y = broom->hy + 1;
x = broom->lx
+ ((dpos == -1) ? rn2(1 + (broom->hx - broom->lx)) : dpos);
- if (!isok(x,y + 1))
+ if (!isok(x,y + 1) || IS_ROCK(levl[x][y + 1].typ))
goto redoloop;
goto outdirloop;
case 2:
x = broom->lx - 1;
y = broom->ly
+ ((dpos == -1) ? rn2(1 + (broom->hy - broom->ly)) : dpos);
- if (!isok(x - 1,y))
+ if (!isok(x - 1,y) || IS_ROCK(levl[x - 1][y].typ))
goto redoloop;
goto outdirloop;
case 3:
x = broom->hx + 1;
y = broom->ly
+ ((dpos == -1) ? rn2(1 + (broom->hy - broom->ly)) : dpos);
- if (!isok(x + 1,y))
+ if (!isok(x + 1,y) || IS_ROCK(levl[x + 1][y].typ))
goto redoloop;
goto outdirloop;
default: