does leprechaun want to avoid the hero? */
| 1136 | |
| 1137 | /* does leprechaun want to avoid the hero? */ |
| 1138 | staticfn boolean |
| 1139 | leppie_avoidance(struct monst *mtmp) |
| 1140 | { |
| 1141 | struct obj *lepgold, *ygold; |
| 1142 | |
| 1143 | if (mtmp->data == &mons[PM_LEPRECHAUN] |
| 1144 | && ((lepgold = findgold(mtmp->minvent)) |
| 1145 | && (lepgold->quan |
| 1146 | > ((ygold = findgold(gi.invent)) ? ygold->quan : 0L)))) |
| 1147 | return TRUE; |
| 1148 | |
| 1149 | return FALSE; |
| 1150 | } |
| 1151 | |
| 1152 | /* unseen leprechaun with gold might stash it */ |
| 1153 | staticfn void |