"fix" #H4040 - energy vortex power drain
Reporter thought the fact that two different DREN cases had different chances to inflict energy drain was an inconsistency, but it was intentional. Attack for DREN damage has 25% chance to drain energy, and is never used since no monster has such an attack. Engulf for DREN damage has 75% chance to drain energy; energy vortices have this, and the higher chance to be drained while engulfed was intentional. So add comments explicitly spelling out the 25% and 75% chances. During beta testing there was a complaint that the energy drain was much too severe: once hero's current energy drops to 0, excess drain for current attack and future drains come out of max-energy instead. That's survivable for caster-type characters with really high energy, but drained low energy characters to 0 max energy very quickly. I agreed with the complaint but didn't implement a fix until too late for 3.6.0. I've since thrown that one out and done this one instead. Change base drain amount from 4d6 to 2d6, and weaken it more to 1d6 when energy is low or strengthen it to 3d6 when energy is high. It almost certainly will need further tuning.
This commit is contained in:
26
src/mhitu.c
26
src/mhitu.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1450016149 2015/12/13 14:15:49 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.131 $ */
|
||||
/* NetHack 3.6 mhitu.c $NHDT-Date: 1451084422 2015/12/25 23:00:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.132 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -273,6 +273,26 @@ struct attack *alt_attk_buf;
|
||||
*alt_attk_buf = *attk;
|
||||
attk = alt_attk_buf;
|
||||
attk->adtyp = AD_STUN;
|
||||
|
||||
/* make drain-energy damage be somewhat in proportion to energy */
|
||||
} else if (attk->adtyp == AD_DREN) {
|
||||
int ulev = max(u.ulevel, 6);
|
||||
|
||||
*alt_attk_buf = *attk;
|
||||
attk = alt_attk_buf;
|
||||
/* 3.6.0 used 4d6 but since energy drain came out of max energy
|
||||
once current energy was gone, that tended to have a severe
|
||||
effect on low energy characters; it's now 2d6 with ajustments */
|
||||
if (u.uen <= 5 * ulev && attk->damn > 1) {
|
||||
attk->damn -= 1; /* low energy: 2d6 -> 1d6 */
|
||||
if (u.uenmax <= 2 * ulev && attk->damd > 3)
|
||||
attk->damd -= 3; /* very low energy: 1d6 -> 1d3 */
|
||||
} else if (u.uen > 12 * ulev) {
|
||||
attk->damn += 1; /* high energy: 2d6 -> 3d6 */
|
||||
if (u.uenmax > 20 * ulev)
|
||||
attk->damd += 3; /* very high energy: 3d6 -> 3d9 */
|
||||
/* note: 3d9 is slightly higher than previous 4d6 */
|
||||
}
|
||||
}
|
||||
return attk;
|
||||
}
|
||||
@@ -1450,7 +1470,7 @@ register struct attack *mattk;
|
||||
break;
|
||||
case AD_DREN:
|
||||
hitmsg(mtmp, mattk);
|
||||
if (uncancelled && !rn2(4))
|
||||
if (uncancelled && !rn2(4)) /* 25% chance */
|
||||
drain_en(dmg);
|
||||
dmg = 0;
|
||||
break;
|
||||
@@ -1840,7 +1860,7 @@ register struct attack *mattk;
|
||||
break;
|
||||
case AD_DREN:
|
||||
/* AC magic cancellation doesn't help when engulfed */
|
||||
if (!mtmp->mcan && rn2(4))
|
||||
if (!mtmp->mcan && rn2(4)) /* 75% chance */
|
||||
drain_en(tmp);
|
||||
tmp = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user