44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Average Holy Trap
|
|
//:: NW_T1_HolyAvgC
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Strikes the entering undead with a beam of pure
|
|
sunlight for 5d10 damage.
|
|
Altered to support PC Vampires - Fallen
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: July 4th, 2001
|
|
//:://////////////////////////////////////////////
|
|
#include "f_vampire_spls_h"
|
|
|
|
void main()
|
|
{
|
|
//Declare major variables
|
|
object oTarget = GetEnteringObject();
|
|
int nAC = GetAC(oTarget);
|
|
//Make attack roll
|
|
int nRoll = d20() + 10 + 3;
|
|
effect eDam = EffectDamage(d10(5), DAMAGE_TYPE_DIVINE);
|
|
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
|
if (nRoll > 0)
|
|
{
|
|
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || GetIsVampire(oTarget))
|
|
{
|
|
//Apply Holy Damage and VFX impact
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
|
}
|
|
else
|
|
{
|
|
eDam = EffectDamage(d4(3), DAMAGE_TYPE_DIVINE);
|
|
//Apply Holy Damage and VFX impact
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
|
}
|
|
}
|
|
}
|
|
|