Restore altar destruction from magical digging
Especially powerful magic is meant to be able to destroy altars (breaking a wand of digging or using a drum of earthquake), but it was being blocked by a check added to maketrap() ina7f6460designed to prevent wizard-mode trap wishing from overwriting stairs. The check was refined in6a3d82cto add an exception for digging up graves, but continued to prevent the destruction of other types of previously-destructible terrain. Since this block was a side effect of an attempt to add some guard rails to wizmode terrain wishes, and the code to explicitly permit the destruction of other furniture with especially powerful magic is still present, it doesn't seem like it was actually intended. Open up terrain destruction by digging magic a bit more by excluding only non-destructible terrain, not all furniture other than graves, from being overwritten by pits and holes. Also, use AM_SANCTUM to more precisely identify non-destructible high altars in dig_check() rather than checking whether the hero is on the Astral or Sanctum levels.
This commit is contained in:
@@ -194,8 +194,8 @@ dig_check(struct monst *madeby, boolean verbose, coordxy x, coordxy y)
|
||||
pline_The("throne is too hard to break apart.");
|
||||
return FALSE;
|
||||
} else if (IS_ALTAR(levl[x][y].typ)
|
||||
&& (madeby != BY_OBJECT || Is_astralevel(&u.uz)
|
||||
|| Is_sanctum(&u.uz))) {
|
||||
&& (madeby != BY_OBJECT
|
||||
|| (altarmask_at(x, y) & AM_SANCTUM) != 0)) {
|
||||
if (verbose)
|
||||
pline_The("altar is too hard to break apart.");
|
||||
return FALSE;
|
||||
|
||||
@@ -470,8 +470,9 @@ maketrap(coordxy x, coordxy y, int typ)
|
||||
|| (u.utraptype == TT_LAVA && !is_lava(x, y))))
|
||||
reset_utrap(FALSE);
|
||||
/* old <tx,ty> remain valid */
|
||||
} else if ((IS_FURNITURE(lev->typ)
|
||||
&& (!IS_GRAVE(lev->typ) || (typ != PIT && typ != HOLE)))
|
||||
} else if (!CAN_OVERWRITE_TERRAIN(lev->typ)
|
||||
|| (IS_FURNITURE(lev->typ)
|
||||
&& (typ != PIT && typ != HOLE))
|
||||
|| is_pool_or_lava(x, y)
|
||||
|| (IS_AIR(lev->typ) && typ != MAGIC_PORTAL)
|
||||
|| (typ == LEVEL_TELEP && single_level_branch(&u.uz))) {
|
||||
|
||||
Reference in New Issue
Block a user