31 lines
1.9 KiB
Plaintext
31 lines
1.9 KiB
Plaintext
#include "X0_I0_SPELLS"
|
|
//Script for Divine Burst
|
|
void main(){
|
|
int lvlTYPE=0;int passCHECK=0;int scSKILLCHECK=GetSkillRank(SKILL_SPELLCRAFT,OBJECT_SELF);
|
|
if(scSKILLCHECK >= 12)passCHECK = 1;
|
|
if(GetLevelByClass(CLASS_TYPE_CLERIC, OBJECT_SELF) >= 30)
|
|
lvlTYPE = 1;else if((lvlTYPE == 0) && (GetLevelByClass(CLASS_TYPE_PALADIN, OBJECT_SELF) >= 30))
|
|
lvlTYPE = 1;else if((lvlTYPE == 0) && (GetLevelByClass(CLASS_TYPE_DIVINECHAMPION, OBJECT_SELF) >= 20))
|
|
lvlTYPE = 1;
|
|
if(lvlTYPE == 1)
|
|
if(passCHECK == 1){
|
|
int AWDMGtarget= GetCurrentHitPoints(OBJECT_SELF);int AWDMGself= GetCurrentHitPoints(OBJECT_SELF)/4;
|
|
object oPC,oTargetSELF,oTargetHOSTILE;effect eEffectSELF,eEffectHOSTILE;int AWODDS=Random(100);float fDelay;
|
|
location lTarget = GetSpellTargetLocation();
|
|
oTargetSELF = GetItemActivator();
|
|
oTargetHOSTILE = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);
|
|
eEffectSELF = EffectDamage(AWDMGself, DAMAGE_TYPE_MAGICAL);eEffectHOSTILE = EffectDamage(AWDMGtarget, DAMAGE_TYPE_DIVINE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffectSELF, GetItemActivator());
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BREACH), GetLocation(oTargetSELF));
|
|
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), lTarget);
|
|
while (GetIsObjectValid(oTargetHOSTILE)){
|
|
if(spellsIsTarget(oTargetHOSTILE, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)){
|
|
if(AWODDS <= 10){
|
|
DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffectHOSTILE, oTargetHOSTILE));
|
|
DelayCommand(fDelay,ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GREATER_RUIN), GetLocation(oTargetHOSTILE)));}
|
|
fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTargetHOSTILE))/20;}
|
|
AWODDS=Random(100);oTargetHOSTILE = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget);}}
|
|
if(lvlTYPE == 0)SpeakString("You are not ready to use this.");
|
|
if(passCHECK == 0)SpeakString("You do not have high enough spellcraft at this time.");
|
|
}
|