used by mhurtle_step() for actual hurtling and also to vary message if target will/won't change location when knocked back */
| 974 | /* used by mhurtle_step() for actual hurtling and also to vary message |
| 975 | if target will/won't change location when knocked back */ |
| 976 | boolean |
| 977 | will_hurtle(struct monst *mon, coordxy x, coordxy y) |
| 978 | { |
| 979 | if (!isok(x, y)) |
| 980 | return FALSE; |
| 981 | /* redundant when called by mhurtle() but needed for mhitm_knockback() */ |
| 982 | if (mon->data->msize >= MZ_HUGE || mon == u.ustuck || mon->mtrapped) |
| 983 | return FALSE; |
| 984 | /* |
| 985 | * TODO: Treat walls, doors, iron bars, etc. specially |
| 986 | * rather than just stopping before. |
| 987 | */ |
| 988 | return goodpos(x, y, mon, MM_IGNOREWATER | MM_IGNORELAVA); |
| 989 | } |
| 990 | |
| 991 | staticfn boolean |
| 992 | mhurtle_step(genericptr_t arg, coordxy x, coordxy y) |
no test coverage detected