Allow teleportation onto the Vibrating Square

It's a minor annoyance when you forget you can't do this in vanilla and
then get relocated somewhere random on the level. Since it's not a
harmful "trap", just allow the adventurer to teleport directly onto it.
This commit is contained in:
copperwater
2018-06-12 09:03:11 -04:00
committed by Patric Mueller
parent d43f8f6f9e
commit 4a3d5f95d9
2 changed files with 8 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ message "your knapsack can't accomodate any more items" when picking stuff up
pending; vary the message rather than add more convoluted pickup code
function calls made from mapglyph based on dungeon level are now called once
per level
allow teleporting onto the vibrating square
Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository

View File

@@ -260,8 +260,13 @@ teleok(x, y, trapok)
register int x, y;
boolean trapok;
{
if (!trapok && t_at(x, y))
return FALSE;
if (!trapok) {
/* allow teleportation onto vibrating square, it's not a real trap */
struct trap *trap = t_at(x, y);
if (trap && trap->ttyp != VIBRATING_SQUARE) {
return FALSE;
}
}
if (!goodpos(x, y, &g.youmonst, 0))
return FALSE;
if (!tele_jump_ok(u.ux, u.uy, x, y))