more mind flayer vs headless target
Recently combat between monster mind flayer and headless monster was changed to skip extra tentable-for-drain_intelligence attacks after hitting with one for no effect. Do the same for monster mind flayer against headless poly'd hero and for hero poly'd into mind flayer versus headless monster. As before, it only applies to additional actions during the current attack. As soon as the attack is over, the ineffectiveness of intelligence drain upon target is forgotten.
This commit is contained in:
10
src/mhitu.c
10
src/mhitu.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1593306907 2020/06/28 01:15:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.192 $ */
|
||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1596046195 2020/07/29 18:09:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.193 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -622,6 +622,8 @@ register struct monst *mtmp;
|
||||
return (foo == 1);
|
||||
}
|
||||
|
||||
g.skipdrin = FALSE; /* [see mattackm(mhitm.c)] */
|
||||
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
sum[i] = 0;
|
||||
if (i > 0 && foundyou /* previous attack might have moved hero */
|
||||
@@ -630,7 +632,9 @@ register struct monst *mtmp;
|
||||
mon_currwep = (struct obj *)0;
|
||||
mattk = getmattk(mtmp, &g.youmonst, i, sum, &alt_attk);
|
||||
if ((u.uswallow && mattk->aatyp != AT_ENGL)
|
||||
|| (skipnonmagc && mattk->aatyp != AT_MAGC))
|
||||
|| (skipnonmagc && mattk->aatyp != AT_MAGC)
|
||||
|| (g.skipdrin && mattk->aatyp == AT_TENT
|
||||
&& mattk->adtyp == AD_DRIN))
|
||||
continue;
|
||||
|
||||
switch (mattk->aatyp) {
|
||||
@@ -1185,6 +1189,8 @@ register struct attack *mattk;
|
||||
hitmsg(mtmp, mattk);
|
||||
if (defends(AD_DRIN, uwep) || !has_head(g.youmonst.data)) {
|
||||
You("don't seem harmed.");
|
||||
/* attacker should skip remaining AT_TENT+AD_DRIN attacks */
|
||||
g.skipdrin = TRUE;
|
||||
/* Not clear what to do for green slimes */
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user