Intelligent peacefuls avoid digging shop or temple walls

This commit is contained in:
Pasi Kallinen
2023-01-22 13:28:24 +02:00
parent 8ec84ea7ff
commit a99c473762
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -1904,6 +1904,12 @@ mfndpos(
&& !((flag & ALLOW_WALL) && may_passwall(nx, ny))
&& !((IS_TREE(ntyp) ? treeok : rockok) && may_dig(nx, ny)))
continue;
/* intelligent peacefuls avoid digging shop/temple walls */
if (IS_ROCK(ntyp) && rockok
&& !mindless(mon->data) && (mon->mpeaceful || mon->mtame)
&& (*in_rooms(nx, ny, TEMPLE) || *in_rooms(nx, ny, SHOPBASE))
&& !(*in_rooms(x, y, TEMPLE) || *in_rooms(x, y, SHOPBASE)))
continue;
if (IS_WATERWALL(ntyp) && !is_swimmer(mdat))
continue;
/* KMH -- Added iron bars */