return TRUE if monster mtmp is up in the air, considering trap flags */
| 1083 | |
| 1084 | /* return TRUE if monster mtmp is up in the air, considering trap flags */ |
| 1085 | staticfn boolean |
| 1086 | check_in_air(struct monst *mtmp, unsigned trflags) |
| 1087 | { |
| 1088 | boolean is_you = mtmp == &gy.youmonst, |
| 1089 | plunged = (trflags & (TOOKPLUNGE | VIASITTING)) != 0; |
| 1090 | |
| 1091 | return ((trflags & HURTLING) != 0 |
| 1092 | || (is_you ? Levitation : is_floater(mtmp->data)) |
| 1093 | || ((is_you ? Flying : is_flyer(mtmp->data)) && !plunged)); |
| 1094 | } |
| 1095 | |
| 1096 | /* return TRUE if mtmp is wearing shoes made of iron (iron/kicking) */ |
| 1097 | boolean |
no outgoing calls
no test coverage detected