From eeb913792c9c7309d6651ab86ec0bf3feda81995 Mon Sep 17 00:00:00 2001 From: Erik Lunna Date: Tue, 31 Oct 2023 07:21:15 +0100 Subject: [PATCH] Fix: High altars in the Astral Plane could be destroyed when receiving gifts or being crowned. This was discussed in #hackem and I believe originated from Noisytoot. --- src/pray.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pray.c b/src/pray.c index 01691ab99..2b61a0292 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1131,9 +1131,10 @@ gcrownu() update_inventory(); /* The altar can't handle the transference of all that power! */ - pline("The altar cracks in two and is destroyed!"); - levl[u.ux][u.uy].typ = ROOM; - + if (!Is_astralevel(&u.uz)) { + pline("The altar cracks in two and is destroyed!"); + levl[u.ux][u.uy].typ = ROOM; + } /* lastly, confer an extra skill slot/credit beyond the up-to-29 you can get from gaining experience levels */ @@ -2372,7 +2373,8 @@ dosacrifice() discover_artifact(otmp->oartifact); } if (!Role_if(PM_INFIDEL) && u.ugifts > 2 - && (rnd(6 + u.ugifts) <= u.ugifts)) { + && (rnd(6 + u.ugifts) <= u.ugifts) + && !Is_astralevel(&u.uz)) { pline("The altar cracks in two and is destroyed!"); levl[u.ux][u.uy].typ = ROOM; }