From 2368c59f69475f84aa3799599d6dfc5344f9cc18 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 18 Sep 2022 17:56:01 +0300 Subject: [PATCH] Knockback requires solid physical hit Exclude unsolid monsters - air, water, and fire elementals. --- src/uhitm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uhitm.c b/src/uhitm.c index 59aa1ac3f..b562ddc8c 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -4624,6 +4624,10 @@ mhitm_knockback(struct monst *magr, || (mattk->aatyp == AT_WEAP && !weapon_used)))) return FALSE; + /* needs a solid physical hit */ + if (unsolid(magr->data)) + return FALSE; + /* the attack must have hit */ /* mon-vs-mon code path doesn't set up hitflags */ if ((u_agr || u_def) && !(*hitflags & MM_HIT))