Further file organization

Further file organization
This commit is contained in:
Jaysyn904
2023-08-23 22:11:00 -04:00
parent 3062876237
commit d87fe14826
22364 changed files with 0 additions and 3253 deletions

View File

@@ -0,0 +1,37 @@
/*
Swimming The Styx
*/
#include "prc_sp_func"
#include "inv_inc_invfunc"
#include "inv_invokehook"
void main()
{
if (!PreInvocationCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
object oCaster = OBJECT_SELF;
int CasterLvl = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
object oTarget = PRCGetSpellTargetObject();
effect eWater = EffectSpellImmunity(SPELL_DROWN);
effect eWater2 = EffectSpellImmunity(SPELL_MASS_DROWN);
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eWater, eDur);
eLink = EffectLinkEffects(eLink, eWater2);
int nDuration = CasterLvl;
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, INVOKE_SWIMMING_THE_STYX, FALSE));
//Apply VFX impact and immunity effect
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24),TRUE,-1,CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}