Convert the vibrating square to a trap

Patch due to ais523 in NetHack 4.

This is not ready to be merged yet; the vibrating square needs a tile
image for tiles builds.
This commit is contained in:
Sean Hunt
2015-05-25 00:32:45 +09:00
parent 0e1a0d9bd9
commit 26ee7dc370
12 changed files with 44 additions and 14 deletions

View File

@@ -298,7 +298,7 @@ d_level *lev;
It might still fail if there's a dungeon feature here. */
struct trap *t = t_at(x, y);
if (t && t->ttyp != MAGIC_PORTAL)
if (t && t->ttyp != MAGIC_PORTAL && t->ttyp != VIBRATING_SQUARE)
deltrap(t);
if (bad_location(x, y, nlx, nly, nhx, nhy))
return FALSE;
@@ -619,6 +619,7 @@ register const char *s;
|| !SPACE_POS(levl[x][y].typ) || occupied(x, y));
inv_pos.x = x;
inv_pos.y = y;
maketrap(inv_pos.x, inv_pos.y, VIBRATING_SQUARE);
#undef INVPOS_X_MARGIN
#undef INVPOS_Y_MARGIN
#undef INVPOS_DISTANCE