diff --git a/src/sit.c b/src/sit.c index 2dec45bdc..e65da53b7 100644 --- a/src/sit.c +++ b/src/sit.c @@ -321,7 +321,10 @@ dosit(void) u.utrap++; } } else { - You("sit down."); + /* when flying, "you land" might need some refinement; it aounds + as if you're staying on the ground but you will immediately + take off again unless you become stuck in a holding trap */ + You("%s.", Flying ? "land" : "sit down"); dotrap(trap, VIASITTING); } } else if ((Underwater || Is_waterlevel(&u.uz)) diff --git a/src/trap.c b/src/trap.c index e3b54a538..019dbb583 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1041,13 +1041,12 @@ floor_trigger(int ttyp) static boolean check_in_air(struct monst *mtmp, unsigned trflags) { - boolean plunged = (trflags & TOOKPLUNGE) != 0; + boolean is_you = mtmp == &gy.youmonst, + plunged = (trflags & (TOOKPLUNGE | VIASITTING)) != 0; - return (is_floater(mtmp->data) - || (is_flyer(mtmp->data) && !plunged) - || (trflags & HURTLING) != 0 - || (mtmp == &gy.youmonst ? - (Levitation || (Flying && !plunged)) : 0)); + return ((trflags & HURTLING) != 0 + || (is_you ? Levitation : is_floater(mtmp->data)) + || ((is_you ? Flying : is_flyer(mtmp->data)) && !plunged)); } static int @@ -1337,10 +1336,12 @@ trapeffect_bear_trap( struct trap *trap, unsigned trflags) { - boolean forcetrap = ((trflags & FORCETRAP) != 0 - || (trflags & FAILEDUNTRAP) != 0); + boolean is_you = mtmp == &gy.youmonst, + forcetrap = ((trflags & FORCETRAP) != 0 + || (trflags & FAILEDUNTRAP) != 0 + || (is_you && (trflags & VIASITTING) != 0)); - if (mtmp == &gy.youmonst) { + if (is_you) { int dmg = d(2, 4); if ((Levitation || Flying) && !forcetrap) @@ -1663,6 +1664,7 @@ trapeffect_pit( if (mtmp == &gy.youmonst) { boolean plunged = (trflags & TOOKPLUNGE) != 0; + boolean viasitting = (trflags & VIASITTING) != 0; boolean conj_pit = conjoined_pits(trap, t_at(u.ux0, u.uy0), TRUE); boolean adj_pit = adj_nonconjoined_pit(trap); boolean already_known = trap->tseen ? TRUE : FALSE; @@ -1676,7 +1678,7 @@ trapeffect_pit( steed_article = ARTICLE_NONE; /* KMH -- You can't escape the Sokoban level traps */ - if (!Sokoban && (Levitation || (Flying && !plunged))) + if (!Sokoban && (Levitation || (Flying && !plunged && !viasitting))) return Trap_Effect_Finished; feeltrap(trap); if (!Sokoban && is_clinger(gy.youmonst.data) && !plunged) { @@ -2638,8 +2640,7 @@ dotrap(struct trap *trap, unsigned trflags) if (already_seen && !Fumbling && !undestroyable_trap(ttype) && ttype != ANTI_MAGIC && !forcebungle && !plunged && !conj_pit && !adj_pit - && (!rn2(5) || (is_pit(ttype) - && is_clinger(gy.youmonst.data)))) { + && (!rn2(5) || (is_pit(ttype) && is_clinger(gy.youmonst.data)))) { You("escape %s %s.", (ttype == ARROW_TRAP && !trap->madeby_u) ? "an" : a_your[trap->madeby_u],