Knockback requires solid physical hit

Exclude unsolid monsters - air, water, and fire elementals.
This commit is contained in:
Pasi Kallinen
2022-09-18 17:56:01 +03:00
parent bb3dc379bc
commit 2368c59f69

View File

@@ -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))