Use is_hole macro to check for trapdoors and holes

This commit is contained in:
Pasi Kallinen
2018-09-15 17:57:57 +03:00
parent adf070eb04
commit e031800880
14 changed files with 23 additions and 34 deletions

View File

@@ -439,7 +439,7 @@ struct monst *mtmp;
|| onscary(xx, yy, mtmp))
continue;
/* use trap if it's the correct type */
if ((t->ttyp == TRAPDOOR || t->ttyp == HOLE)
if (is_hole(t->ttyp)
&& !is_floater(mtmp->data)
&& !mtmp->isshk && !mtmp->isgd && !mtmp->ispriest
&& Can_fall_thru(&u.uz)) {