Add is_watch define for watchmen

This commit is contained in:
Pasi Kallinen
2015-04-27 21:09:26 +03:00
parent 93cbd1fbb1
commit f0699b76d9
7 changed files with 11 additions and 17 deletions

View File

@@ -3117,9 +3117,7 @@ register boolean silent;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp)) continue;
if((mtmp->data == &mons[PM_WATCHMAN] ||
mtmp->data == &mons[PM_WATCH_CAPTAIN])
&& mtmp->mpeaceful) {
if (is_watch(mtmp->data) && mtmp->mpeaceful) {
ct++;
if(cansee(mtmp->mx, mtmp->my) && mtmp->mcanmove) {
if (distu(mtmp->mx, mtmp->my) == 2) nct++;
@@ -3157,9 +3155,8 @@ pacify_guards()
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp)) continue;
if (mtmp->data == &mons[PM_WATCHMAN] ||
mtmp->data == &mons[PM_WATCH_CAPTAIN])
mtmp->mpeaceful = 1;
if (is_watch(mtmp->data))
mtmp->mpeaceful = 1;
}
}