engulfer tuning

Reported by me ;-} during beta testing last Fall, engulfers have a
tendency to re-engulf the hero immediately after expelling him/her.
Use mspec_used (set when expelling rather than engulfing) to make
them wait a turn or two.  Initially that made the too-soon engulf
attacks always miss, so this changes too-soon engulf to a touch or
claw attack instead.  Some tuning in damage or message may be needed.
This commit is contained in:
PatR
2016-06-14 17:37:44 -07:00
parent 7e257dc7e8
commit bc8e613719
3 changed files with 30 additions and 8 deletions

View File

@@ -300,6 +300,20 @@ struct attack *alt_attk_buf;
/* note: 3d9 is slightly higher than previous 4d6 */
}
} else if (attk->aatyp == AT_ENGL && magr->mspec_used) {
/* can't re-engulf yet; switch to simpler attack */
*alt_attk_buf = *attk;
attk = alt_attk_buf;
if (attk->adtyp == AD_ACID || attk->adtyp == AD_ELEC
|| attk->adtyp == AD_COLD || attk->adtyp == AD_FIRE) {
attk->aatyp = AT_TUCH;
} else {
attk->aatyp = AT_CLAW; /* attack message will be "<foo> hits" */
attk->adtyp = AD_PHYS;
}
attk->damn = 1; /* relatively weak: 1d6 */
attk->damd = 6;
/* barrow wight, Nazgul, erinys have weapon attack for non-physical
damage; force physical damage if attacker has been cancelled or
if weapon is sufficiently interesting; a few unique creatures
@@ -684,10 +698,10 @@ register struct monst *mtmp;
case AT_ENGL:
if (!range2) {
if (foundyou) {
if (u.uswallow || tmp > (j = rnd(20 + i))) {
/* Force swallowing monster to be
* displayed even when player is
* moving away */
if (u.uswallow
|| (!mtmp->mspec_used && tmp > (j = rnd(20 + i)))) {
/* force swallowing monster to be displayed
even when hero is moving away */
flush_screen(1);
sum[i] = gulpmu(mtmp, mattk);
} else {