Implement wishing for walls in wizmode

This commit is contained in:
Pasi Kallinen
2021-07-30 20:50:45 +03:00
parent d463a9e258
commit de73a32d7d
2 changed files with 11 additions and 3 deletions

View File

@@ -983,7 +983,7 @@ when hallucinating, see hallucinated liquids when looking at water or lava
applying a spellbook hints about read charges left
wizard mode wishing for level topology can now create hidden doors (ask for
"secret door" when at a door or wall location), hidden corridor
spots ("secret corridor" at a corridor location), and clouds
spots ("secret corridor" at a corridor location), clouds and walls
tiny chance for randomly created spellbooks to be Discworld novels instead
of having only one in the first book or scroll shop created (won't
occur in hero's initial inventory or NPC priest inventory or be

View File

@@ -3211,8 +3211,16 @@ wizterrainwish(struct _readobjnam_data *d)
}
} else if (!BSTRCMPI(bp, p - 4, "wall")
&& (bp == p - 4 || p[-4] == ' ')) {
pline("Wishing for walls is not implemented.");
badterrain = TRUE;
schar wall = HWALL;
if ((isok(u.ux, u.uy-1) && IS_WALL(levl[u.ux][u.uy-1].typ))
|| (isok(u.ux, u.uy+1) && IS_WALL(levl[u.ux][u.uy+1].typ)))
wall = VWALL;
madeterrain = TRUE;
lev->typ = wall;
fix_wall_spines(max(0,u.ux-1), max(0,u.uy-1),
min(COLNO,u.ux+1), min(ROWNO,u.uy+1));
pline("A wall.");
} else if (!BSTRCMPI(bp, p - 15, "secret corridor")) {
if (lev->typ == CORR) {
lev->typ = SCORR;