general musical instrument use while polymorphed
Extend the previous patch to cover all blown instruments. Also covers the case of the player strangling. The test is moved to a new can_blow function to keep the test in one place. It supports any monster, although all current tests are for the player.
This commit is contained in:
@@ -246,6 +246,18 @@ struct permonst *mptr;
|
||||
(slithy(mptr) && !bigmonst(mptr)));
|
||||
}
|
||||
|
||||
boolean
|
||||
can_blow(mtmp) /* returns TRUE if monster can blow (whistle, etc) */
|
||||
register struct monst *mtmp;
|
||||
{
|
||||
if ((is_silent(mtmp->data) || mtmp->data->msound == MS_BUZZ) &&
|
||||
(breathless(mtmp->data) || verysmall(mtmp->data) ||
|
||||
!has_head(mtmp->data) || mtmp->data->mlet == S_EEL))
|
||||
return FALSE;
|
||||
if ((mtmp == &youmonst) && Strangled) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
boolean
|
||||
can_track(ptr) /* returns TRUE if monster can track well */
|
||||
register struct permonst *ptr;
|
||||
|
||||
Reference in New Issue
Block a user