Battledale_PRC8/_module/nss/jw_si_gard_soul_.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

104 lines
2.5 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Custom User Defined Event
//:: FileName
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"
#include "jw_privates_inc"
void wingblast();
void main()
{
int nUser = GetUserDefinedEventNumber();
if(nUser == 1001) //HEARTBEAT
{
}
else if(nUser == 1002) // PERCEIVE
{
}
else if(nUser == 1003) // END OF COMBAT
{
object oVictim=GetVictim();
if ((GetLocalInt(OBJECT_SELF,"nDone")!=2)&&(GetDistanceToObject(oVictim)<=8.0)&&GetDistanceToObject(oVictim)!=-1.0)
{
wingblast();
SetLocalInt(OBJECT_SELF,"nDone",2);
}
}
else if(nUser == 1004) // ON DIALOGUE
{
}
else if(nUser == 1005) // ATTACKED
{
}
else if(nUser == 1006) // DAMAGED
{
}
else if(nUser == 1007) // DEATH
{
}
else if(nUser == 1008) // DISTURBED
{
}
}
void wingblast()
{
//Declare major variables
effect eAppear;
effect eKnockDown = EffectKnockdown();
int nHP;
int nCurrent = 0;
object oVict;
int nDamage = GetHitDice(OBJECT_SELF);
int nDC = 14;
nDamage = Random(nDamage) + 11;
effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING);
effect eVis = EffectVisualEffect(VFX_IMP_PULSE_WIND);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
//Get first target in spell area
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, GetLocation(OBJECT_SELF));
while(GetIsObjectValid(oTarget))
{
if(!GetIsReactionTypeFriendly(oTarget))
{
if(GetCreatureSize(oTarget) != CREATURE_SIZE_HUGE)
{
if(!ReflexSave(oTarget, nDC))
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnockDown, oTarget, 6.0);
}
}
}
//Get next target in spell area
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, GetLocation(OBJECT_SELF));
}
location lLocal;
lLocal = GetLocation(OBJECT_SELF);
//Apply the VFX impact and effects
eAppear = EffectDisappearAppear(lLocal);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAppear, OBJECT_SELF, 6.0);
}