Cancellation explodes magical traps

This commit is contained in:
Pasi Kallinen
2022-01-28 08:30:08 +02:00
parent a6a7af368f
commit c722962713
9 changed files with 52 additions and 10 deletions
+2 -2
View File
@@ -346,7 +346,7 @@ maketrap(int x, int y, int typ)
struct rm *lev = &levl[x][y];
if ((ttmp = t_at(x, y)) != 0) {
if (ttmp->ttyp == MAGIC_PORTAL || ttmp->ttyp == VIBRATING_SQUARE)
if (undestroyable_trap(ttmp->ttyp))
return (struct trap *) 0;
oldplace = TRUE;
if (u.utrap && x == u.ux && y == u.uy
@@ -2441,7 +2441,7 @@ dotrap(register struct trap* trap, unsigned int trflags)
trapname(ttype, FALSE));
return;
}
if (!Fumbling && ttype != MAGIC_PORTAL && ttype != VIBRATING_SQUARE
if (!Fumbling && !undestroyable_trap(ttype)
&& ttype != ANTI_MAGIC && !forcebungle && !plunged
&& !conj_pit && !adj_pit
&& (!rn2(5) || (is_pit(ttype)