Finished PRC8 integration. Moved creature abilities to top hak. Setup tooling. Created release archive
117 lines
3.5 KiB
Plaintext
117 lines
3.5 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Custom User Defined Event
|
|
//:: FileName
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By:
|
|
//:: Created On:
|
|
//:://////////////////////////////////////////////
|
|
#include "prc_inc_spells"
|
|
|
|
//void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 15, float fRadius = 3.) {
|
|
// ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
|
|
// object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
|
// do {
|
|
// int nDamageAfterSave = PRCGetReflexAdjustedDamage(nDamage/2, oObject, nSaveDC)+nDamage/2;
|
|
// ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
|
|
//// } while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID);
|
|
//}
|
|
|
|
void ZapTargets()
|
|
{
|
|
effect e = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);
|
|
effect eDam;
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
int nDamage;
|
|
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
if (!GetIsFriend(oTarget))
|
|
{
|
|
nDamage = d8(4)+4;
|
|
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, 24, SAVING_THROW_TYPE_ELECTRICITY);
|
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
|
if(nDamage > 0 )
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, e, oTarget, 1.0);
|
|
}
|
|
}
|
|
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
}
|
|
}
|
|
|
|
void Heartbeat()
|
|
{
|
|
//RandomBolts();
|
|
ZapTargets();
|
|
}
|
|
|
|
void main()
|
|
{
|
|
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
|
|
|
|
int nUser = GetUserDefinedEventNumber();
|
|
|
|
if(nUser == 1001) //HEARTBEAT
|
|
{
|
|
effect e = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);
|
|
effect eDam;
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
int nDamage;
|
|
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
if (!GetIsFriend(oTarget))
|
|
{
|
|
nDamage = d8(5)+4;
|
|
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, 24, SAVING_THROW_TYPE_ELECTRICITY);
|
|
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
|
if(nDamage > 0 )
|
|
{
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, e, oTarget, 1.0);
|
|
}
|
|
}
|
|
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
|
}
|
|
}
|
|
|
|
else if(nUser == 1002) // PERCEIVE
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1003) // END OF COMBAT
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1004) // ON DIALOGUE
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1005) // ATTACKED
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1006) // DAMAGED
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1007) // DEATH
|
|
{
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_LIGHTNING_M),GetLocation(OBJECT_SELF));
|
|
}
|
|
else if(nUser == 1008) // DISTURBED
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|