m_respond code reorg and splitting

This commit is contained in:
Pasi Kallinen
2025-05-10 18:42:38 +03:00
parent d88f0cfeee
commit af6c53ac7c
2 changed files with 44 additions and 37 deletions

View File

@@ -738,17 +738,8 @@ dochug(struct monst *mtmp)
return 0;
}
/* Erinyes will inform surrounding monsters of your crimes */
if (mdat == &mons[PM_ERINYS] && !mtmp->mpeaceful && m_canseeu(mtmp))
aggravate();
/* Shriekers and Medusa have irregular abilities which must be
checked every turn. These abilities do not cost a turn when
used. */
if (mdat->msound == MS_SHRIEK && !um_dist(mtmp->mx, mtmp->my, 1))
m_respond(mtmp);
if (mdat == &mons[PM_MEDUSA] && couldsee(mtmp->mx, mtmp->my))
m_respond(mtmp);
/* some monsters have special abilities */
m_respond(mtmp);
if (DEADMONSTER(mtmp))
return 1; /* m_respond gaze can kill medusa */