Fixed Asherati's Body Lamp Dazzle
Fixed Asherati's Body Lamp Dazzle. Made Evard's Black Tentacles wand craftable. Updated tester module to make default area a PvP zone. Updated Release Archive.
This commit is contained in:
@@ -1,26 +1,56 @@
|
||||
/* Body Lamp Dazzle racial ability for Ashrati
|
||||
Dazzle enemies*/
|
||||
|
||||
/* Once per day, as a free action, an asherati can bring his skin up
|
||||
to full brilliance so rapidly that it can dazzle all creatures within
|
||||
30 feet for 1 minute. Creatures can avoid this effect with a
|
||||
successful Fortitude save (DC 10 +1/2 the asherati's character level
|
||||
+ his Cha modifier). */
|
||||
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = OBJECT_SELF;
|
||||
location lTarget = GetLocation(oPC);
|
||||
effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
int nDC = 10 + GetAbilityModifier(ABILITY_CHARISMA, oPC) + GetHitDice(oPC)/2;
|
||||
//Get the first target in the radius around the caster
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, FeetToMeters(30.0), lTarget);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
if(oPC != oTarget && !PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NONE))
|
||||
{
|
||||
effect eDazzle = SupernaturalEffect(EffectDazzle());
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDazzle, oTarget, 60.0);
|
||||
}
|
||||
//Get the next target in the specified area around the caster
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(30.0), lTarget);
|
||||
}
|
||||
}
|
||||
//:: Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lLoc = GetLocation(oCaster);
|
||||
int nCasterLvl = PRCGetCasterLevel(oCaster);
|
||||
int nPenetr = nCasterLvl + SPGetPenetr();
|
||||
|
||||
float fRange = FeetToMeters(30.0);
|
||||
float fDelay;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_FIREBALL);
|
||||
|
||||
//:: Calculate the Fortitude saving throw DC
|
||||
int nDC = 10 + (GetHitDice(oCaster) / 2) + GetAbilityModifier(ABILITY_CHARISMA, oCaster);
|
||||
|
||||
//:: Display the visual effect instantly at the caster's location
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lLoc);
|
||||
|
||||
//:: Get the first target in the radius around the caster
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRange, lLoc);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oCaster))
|
||||
{
|
||||
if (oTarget != oCaster)
|
||||
{
|
||||
//:: Fire spell cast at event for target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, PRCGetSpellId()));
|
||||
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SPELL))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(0.4, 1.1);
|
||||
|
||||
//:: Apply penalty effect
|
||||
effect eDazzle = SupernaturalEffect(EffectDazzle());
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDazzle, oTarget, 60.0);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//:: Get the next target in the specified area around the caster
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, fRange, lLoc);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user