fix #K4331 - sticking from distance
Stop attacking if target isn't there anymore. Already handled for two-weapon in normal form, not for multi-attacks in poly'd form and for multi-attack monster vs hero or monster vs other monster. I didn't attempt to reproduce the reported problem. This fix is based on code inspection. Also prevent monsters that have hug or engulf attacks from knocking target back with other attacks since that prohibits the grab/engulf from being able to hit.
This commit is contained in:
@@ -754,6 +754,8 @@ mattacku(struct monst *mtmp)
|
||||
/* if hero was found but isn't anymore, avoid wildmiss now */
|
||||
if (firstfoundyou && !foundyou)
|
||||
continue; /* set sum[i] to 'miss' but skip other actions */
|
||||
if (!u_at(gb.bhitpos.x, gb.bhitpos.y))
|
||||
continue;
|
||||
}
|
||||
mon_currwep = (struct obj *) 0;
|
||||
mattk = getmattk(mtmp, &gy.youmonst, i, sum, &alt_attk);
|
||||
|
||||
Reference in New Issue
Block a user