monster or you go through and possibly destroy a web. return TRUE if could go through. */
| 969 | /* monster or you go through and possibly destroy a web. |
| 970 | return TRUE if could go through. */ |
| 971 | staticfn boolean |
| 972 | mu_maybe_destroy_web( |
| 973 | struct monst *mtmp, |
| 974 | boolean domsg, |
| 975 | struct trap *trap) |
| 976 | { |
| 977 | boolean isyou = (mtmp == &gy.youmonst); |
| 978 | struct permonst *mptr = mtmp->data; |
| 979 | |
| 980 | if (amorphous(mptr) || is_whirly(mptr) || flaming(mptr) |
| 981 | || unsolid(mptr) || mptr == &mons[PM_GELATINOUS_CUBE]) { |
| 982 | coordxy x = trap->tx; |
| 983 | coordxy y = trap->ty; |
| 984 | |
| 985 | if (flaming(mptr) || acidic(mptr)) { |
| 986 | if (domsg) { |
| 987 | if (isyou) |
| 988 | You("%s %s spider web!", |
| 989 | (flaming(mptr)) ? "burn" : "dissolve", |
| 990 | a_your[trap->madeby_u]); |
| 991 | else |
| 992 | pline_mon(mtmp, |
| 993 | "%s %s %s spider web!", Monnam(mtmp), |
| 994 | (flaming(mptr)) ? "burns" : "dissolves", |
| 995 | a_your[trap->madeby_u]); |
| 996 | } |
| 997 | deltrap(trap); |
| 998 | newsym(x, y); |
| 999 | return TRUE; |
| 1000 | } |
| 1001 | if (domsg) { |
| 1002 | if (isyou) { |
| 1003 | You("flow through %s spider web.", a_your[trap->madeby_u]); |
| 1004 | } else { |
| 1005 | pline_mon(mtmp, |
| 1006 | "%s flows through %s spider web.", Monnam(mtmp), |
| 1007 | a_your[trap->madeby_u]); |
| 1008 | seetrap(trap); |
| 1009 | } |
| 1010 | } |
| 1011 | return TRUE; |
| 1012 | } |
| 1013 | return FALSE; |
| 1014 | } |
| 1015 | |
| 1016 | /* make a single arrow/dart/rock for a trap to shoot or drop */ |
| 1017 | staticfn struct obj * |