Pets avoid a location hero just kicked

If hero kicks a location, pets and peacefuls will avoid moving
into that location for that turn.
This commit is contained in:
Pasi Kallinen
2024-04-11 18:05:12 +03:00
parent 62b78ba037
commit f1c77aa2fd
9 changed files with 37 additions and 1 deletions

View File

@@ -515,6 +515,8 @@ struct instance_globals_j {
struct instance_globals_k {
coord kickedloc; /* location hero just kicked */
/* decl.c */
struct obj *kickedobj; /* object in flight due to kicking */
struct kinfo killer;

View File

@@ -1840,6 +1840,7 @@ extern boolean m_can_break_boulder(struct monst *) NONNULLARG1;
extern void m_break_boulder(struct monst *, coordxy, coordxy) NONNULLARG1;
extern int dochug(struct monst *) NONNULLARG1;
extern boolean m_digweapon_check(struct monst *, coordxy, coordxy) NONNULLARG1;
extern boolean m_avoid_kicked_loc(struct monst *, coordxy, coordxy) NONNULLARG1;
extern int m_move(struct monst *, int) NONNULLARG1;
extern int m_move_aggress(struct monst *, coordxy, coordxy) NONNULLARG1;
extern void dissolve_bars(coordxy, coordxy);