@ShadowM
I am that “people”. (It’s from my own module.)
As far as I can see, the script should have applied both better damage and splash damage, but both end scores are lower than expected.
Here is the full holy water damage passed …
int nDmg = 0; int nSplashDmg = 0;
if (sTag == "x1_wmgrenade005"){nDmg = d4(2); nSplashDmg = 1;}
else if (sTag == "n2_it_holy_2"){nDmg = d4(3); nSplashDmg = 2;}
else if (sTag == "n2_it_holy_3"){nDmg = d4(4); nSplashDmg = d4(1);}
else if (sTag == "n2_it_holy_4"){nDmg = d4(5); nSplashDmg = d4(1) + 1;}
SendMessageToAllPCs(CWHITE + GetFirstName(OBJECT_SELF) + CORCHID + " throws a grenade: Holy Water!");
LBDoGrenade(nDmg, nSplashDmg, VFX_HIT_SPELL_HOLY, VFX_HIT_AOE_HOLY, DAMAGE_TYPE_DIVINE, RADIUS_SIZE_MEDIUM, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, RACIAL_TYPE_UNDEAD, iSOURCE);
And the part fired on hit … Which did 3 damage instead of a minimum of 5.
// A -1 REPRESENTS A GROUND LOCATION SPLASH INTENDED AS DEFAULT
int nTouch = -1;
// IF TARGET VALID, THEN CHECK IF RANGE ATTACK HITS
if (GetIsObjectValid(oTarget) == TRUE){nTouch = TouchAttackRanged(oTarget);}
// TARGET WAS SUCCESSFULLY HIT FOR GRENADE DAMAGE
if (nTouch >= 1)
{
// A CRITICAL HIT (DOUBLE DAMAGE)
if(nTouch == 2){nDirectDamage = nDirectDamage * 2;}
// PREPARE DAMAGE TYPE
effect eDam = EffectDamage(nDirectDamage, nDamageType);
// HOLY WATER VS UNDEAD CHECK
if ((nRacialType != RACIAL_TYPE_ALL) && (nRacialType == GetRacialType(oTarget)))
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
}
And the splash part … Which did 1 damage instead of a minimum of 2.
// THERE IS ALWAYS SOME VALID SPLASH DAMAGE (WHEN WITHIN RADIUS)
SendMessageToAllPCs(CORANGE + "<i>This type of grenade can cause additional splash damage.</i>");
object oTargetSplash = GetFirstObjectInShape(SHAPE_SPHERE, fExplosionRadius, lTarget, TRUE, nObjectFilter);
while (GetIsObjectValid(oTargetSplash))
{
float fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTargetSplash))/20;
// PREPARE SPLASH DAMAGE AMOUNT
effect eDam = EffectDamage(nSplashDamage, nDamageType);
if(nSplashDamage > 0)
{
// HOLY WATER VS UNDEAD CHECK
if ((nRacialType != RACIAL_TYPE_ALL) && (nRacialType == GetRacialType(oTargetSplash)))
{
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTargetSplash));
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTargetSplash));
}
IMPORTANT: Yes, these creatures can increase in their abilities … but, I suppose my question is, if that is the case, what abilities might have been added that may account for this?