| 888 | } |
| 889 | |
| 890 | staticfn boolean |
| 891 | mleashed_next2u(struct monst *mtmp) |
| 892 | { |
| 893 | if (mtmp->mleashed) { |
| 894 | if (!m_next2u(mtmp)) |
| 895 | mnexto(mtmp, RLOC_NOMSG); |
| 896 | if (!m_next2u(mtmp)) { |
| 897 | struct obj *otmp = get_mleash(mtmp); |
| 898 | |
| 899 | if (!otmp) { |
| 900 | impossible("leashed-unleashed mon?"); |
| 901 | return TRUE; |
| 902 | } |
| 903 | |
| 904 | if (otmp->cursed) |
| 905 | return TRUE; |
| 906 | mtmp->mleashed = 0; |
| 907 | otmp->leashmon = 0; |
| 908 | update_inventory(); |
| 909 | You_feel("%s leash go slack.", |
| 910 | (number_leashed() > 1) ? "a" : "the"); |
| 911 | } |
| 912 | } |
| 913 | return FALSE; |
| 914 | } |
| 915 | |
| 916 | #undef MAXLEASHED |
| 917 |
nothing calls this directly
no test coverage detected