Add m_next2u, analogous to m_next2m and next2u

This commit is contained in:
Pasi Kallinen
2024-01-19 21:53:25 +02:00
parent b6bc3ef698
commit 57747535af
15 changed files with 36 additions and 34 deletions

View File

@@ -540,6 +540,8 @@ struct _hitmon_data {
/* point px,py is adjacent to (or same location as) hero */
#define next2u(px,py) (distu((px),(py)) <= 2)
/* is monster on top of or next to hero? */
#define m_next2u(m) (distu((m)->mx,(m)->my) <= 2)
/* hero at (x,y)? */
#define u_at(x,y) ((x) == u.ux && (y) == u.uy)