monsters using teleport traps
While trying in vain to find code that would cause the reported priest-on-players-location behavior, I did find that the code to find a usable teleport or similar trap was disallowing lots of locations due to an && that should have been an ||.
This commit is contained in:
+1
-1
@@ -368,7 +368,7 @@ struct monst *mtmp;
|
|||||||
|
|
||||||
for(xx = x-1; xx <= x+1; xx++) for(yy = y-1; yy <= y+1; yy++)
|
for(xx = x-1; xx <= x+1; xx++) for(yy = y-1; yy <= y+1; yy++)
|
||||||
if (isok(xx,yy))
|
if (isok(xx,yy))
|
||||||
if (xx != u.ux && yy != u.uy)
|
if (xx != u.ux || yy != u.uy)
|
||||||
if (mtmp->data != &mons[PM_GRID_BUG] || xx == x || yy == y)
|
if (mtmp->data != &mons[PM_GRID_BUG] || xx == x || yy == y)
|
||||||
if ((xx==x && yy==y) || !level.monsters[xx][yy])
|
if ((xx==x && yy==y) || !level.monsters[xx][yy])
|
||||||
if ((t = t_at(xx,yy)) != 0)
|
if ((t = t_at(xx,yy)) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user