Use is_pit macro to check for (spiked) pit

This commit is contained in:
Pasi Kallinen
2018-09-15 17:19:26 +03:00
parent bd23a56f29
commit adf070eb04
18 changed files with 52 additions and 55 deletions

View File

@@ -599,7 +599,7 @@ drag:
|| !is_pool(uball->ox, uball->oy)
|| levl[uball->ox][uball->oy].typ == POOL))
|| ((t = t_at(uchain->ox, uchain->oy))
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT || t->ttyp == HOLE
&& (is_pit(t->ttyp) || t->ttyp == HOLE
|| t->ttyp == TRAPDOOR))) {
if (Levitation) {
You_feel("a tug from the iron ball.");
@@ -745,7 +745,7 @@ xchar x, y;
if (!Levitation && !MON_AT(x, y) && !u.utrap
&& (is_pool(x, y)
|| ((t = t_at(x, y))
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT
&& (is_pit(t->ttyp)
|| t->ttyp == TRAPDOOR || t->ttyp == HOLE)))) {
u.ux = x;
u.uy = y;