Make destruction of altar incite its god's wrath

This is for completely destroying an altar with extra-powerful magical
digging -- the normal altar_wrath() punishment didn't seem sufficient
for such an outrage to me, so skip straight to slinging the lightning
bolts.  Destroying an altar is unlikely to happen by accident (though
it's possible with poorly timed usage of a drum of earthquake).
This commit is contained in:
Michael Meyer
2023-11-29 11:36:56 -08:00
committed by PatR
parent 5cbc16a3bd
commit 0473fff5b5
4 changed files with 30 additions and 11 deletions
+9 -1
View File
@@ -569,7 +569,7 @@ digactualhole(coordxy x, coordxy y, struct monst *madeby, int ttyp)
boolean madeby_obj = (madeby == BY_OBJECT);
boolean at_u = u_at(x, y);
boolean wont_fall = Levitation || Flying;
int old_typ;
int old_typ, old_aligntyp = A_NONE;
if (at_u && u.utrap) {
if (u.utraptype == TT_BURIEDBALL)
@@ -592,6 +592,8 @@ digactualhole(coordxy x, coordxy y, struct monst *madeby, int ttyp)
surface_type = (IS_ROOM(old_typ) && !Is_earthlevel(&u.uz)
? "floor" : "ground");
furniture = surface(x, y);
if (IS_ALTAR(lev->typ))
old_aligntyp = Amask2align(levl[x][y].altarmask & AM_MASK);
} else {
surface_type = surface(x, y);
}
@@ -626,6 +628,9 @@ digactualhole(coordxy x, coordxy y, struct monst *madeby, int ttyp)
}
if (furniture && cansee(x, y))
pline_The("%s falls into the pit!", furniture);
/* wrath should immediately follow altar destruction message */
if ((madeby_u || madeby_obj) && old_typ == ALTAR)
desecrate_altar(FALSE, old_aligntyp);
/* in case we're digging down while encased in solid rock
which is blocking levitation or flight */
switch_terrain();
@@ -659,6 +664,9 @@ digactualhole(coordxy x, coordxy y, struct monst *madeby, int ttyp)
}
if (furniture && cansee(x, y))
pline_The("%s falls through the hole!", furniture);
/* wrath should immediately follow altar destruction message */
if ((madeby_u || madeby_obj) && old_typ == ALTAR)
desecrate_altar(FALSE, old_aligntyp);
if (at_u) {
/* in case we're digging down while encased in solid rock