RATDOG/_module/nss/plagueaura1.nss
Jaysyn904 df709d33fc Horsefly Swamp update
Creatures & encounter tables to support Horsefly swamp expansion.
2023-08-13 17:21:44 -04:00

40 lines
1.2 KiB
Plaintext

#include "NW_I0_SPELLS"
#include "prc_inc_spells"
void DoStrDamage(object oTarget)
{
effect eStr = EffectAbilityDecrease(ABILITY_STRENGTH,d6());
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eStr,oTarget);
}
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
object oTarget = GetEnteringObject();
effect eNaus = EffectDazed();
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
eNaus = EffectLinkEffects(eNaus,eVis2);
eNaus = EffectLinkEffects(eNaus,eDur);
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
int nRace = GetRacialType(oTarget);
if (( nRace == RACIAL_TYPE_CONSTRUCT ) || ( nRace == RACIAL_TYPE_ELEMENTAL )
|| ( nRace == RACIAL_TYPE_UNDEAD ))
return;
if(GetIsEnemy(oTarget, oCaster))
{
if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 15, SAVING_THROW_TYPE_NONE,oCaster))
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eNaus,oTarget,RoundsToSeconds(1));
DelayCommand(0.1,DoStrDamage(oTarget));
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
}
}
}