restrict certain special monsters (shopkeepers, aligned priests, vault guards) to forms that allow them to behave sensibly (catching gold, speaking?) so that they don't need too much extra code */
| 4990 | vault guards) to forms that allow them to behave sensibly (catching |
| 4991 | gold, speaking?) so that they don't need too much extra code */ |
| 4992 | staticfn boolean |
| 4993 | validspecmon(struct monst *mon, int mndx) |
| 4994 | { |
| 4995 | if (mndx == NON_PM) |
| 4996 | return TRUE; /* caller wants random */ |
| 4997 | |
| 4998 | if (!accept_newcham_form(mon, mndx)) |
| 4999 | return FALSE; /* geno'd or !polyok */ |
| 5000 | |
| 5001 | if (isspecmon(mon)) { |
| 5002 | struct permonst *ptr = &mons[mndx]; |
| 5003 | |
| 5004 | /* reject notake because object manipulation is expected |
| 5005 | and nohead because speech capability is expected */ |
| 5006 | if (notake(ptr) || !has_head(ptr)) |
| 5007 | return FALSE; |
| 5008 | /* [should we check ptr->msound here too?] */ |
| 5009 | } |
| 5010 | return TRUE; /* potential new form is ok */ |
| 5011 | } |
| 5012 | |
| 5013 | /* used for hero polyself handling */ |
| 5014 | boolean |
no test coverage detected