Add vault guards to undisplaceable monsters

This commit is contained in:
Pasi Kallinen
2020-04-15 08:59:35 +03:00
parent ab4e82d1cf
commit 02f222bc0c
2 changed files with 9 additions and 4 deletions

View File

@@ -187,6 +187,14 @@ struct monst {
|| (mon)->cham == PM_VLAD_THE_IMPALER)
#define vampshifted(mon) (is_vampshifter((mon)) && !is_vampire((mon)->data))
/* monsters which cannot be displaced: priests, shopkeepers, vault guards,
Oracle, quest leader */
#define mundisplaceable(mon) ((mon)->ispriest \
|| (mon)->isshk \
|| (mon)->isgd \
|| (mon)->data == &mons[PM_ORACLE] \
|| (mon)->m_id == g.quest_status.leader_m_id)
/* mimic appearances that block vision/light */
#define is_lightblocker_mappear(mon) \
(is_obj_mappear(mon, BOULDER) \

View File

@@ -1843,10 +1843,7 @@ domove_core()
} else if (mtmp->mpeaceful
&& (!goodpos(u.ux0, u.uy0, mtmp, 0)
|| t_at(u.ux0, u.uy0) != NULL
|| mtmp->ispriest
|| mtmp->isshk
|| mtmp->data == &mons[PM_ORACLE]
|| mtmp->m_id == g.quest_status.leader_m_id)) {
|| mundisplaceable(mtmp))) {
/* displacing peaceful into unsafe or trapped space, or trying to
* displace quest leader, Oracle, shopkeeper, or priest */
You("stop. %s doesn't want to swap places.",