Skip to content

Commit

Permalink
Fix: High altars in the Astral Plane could be destroyed when receivin…
Browse files Browse the repository at this point in the history
…g gifts or being crowned. This was discussed in #hackem and I believe originated from Noisytoot.
  • Loading branch information
elunna committed Oct 31, 2023
1 parent a157676 commit eeb9137
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit eeb9137

Please sign in to comment.