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;
|
||||
}
|
||||
|
||||
10
src/uhitm.c
10
src/uhitm.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 uhitm.c $NHDT-Date: 1595621524 2020/07/24 20:12:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.238 $ */
|
||||
/* NetHack 3.6 uhitm.c $NHDT-Date: 1596046196 2020/07/29 18:09:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.239 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1979,6 +1979,10 @@ int specialdmg; /* blessed and/or silver bonus against various things */
|
||||
|
||||
if (g.notonhead || !has_head(pd)) {
|
||||
pline("%s doesn't seem harmed.", Monnam(mdef));
|
||||
/* hero should skip remaining AT_TENT+AD_DRIN attacks
|
||||
because they'll be just as harmless as this one (and also
|
||||
to reduce verbosity) */
|
||||
g.skipdrin = TRUE;
|
||||
tmp = 0;
|
||||
if (!Unchanging && pd == &mons[PM_GREEN_SLIME]) {
|
||||
if (!Slimed) {
|
||||
@@ -2445,9 +2449,13 @@ register struct monst *mon;
|
||||
}
|
||||
multi_claw = (multi_claw > 1); /* switch from count to yes/no */
|
||||
|
||||
g.skipdrin = FALSE; /* [see mattackm(mhitm.c)] */
|
||||
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
/* sum[i] = 0; -- now done above */
|
||||
mattk = getmattk(&g.youmonst, mon, i, sum, &alt_attk);
|
||||
if (g.skipdrin && mattk->aatyp == AT_TENT && mattk->adtyp == AD_DRIN)
|
||||
continue;
|
||||
weapon = 0;
|
||||
switch (mattk->aatyp) {
|
||||
case AT_WEAP:
|
||||
|
||||
Reference in New Issue
Block a user