NWNDS/nwnds_module/fordorranaura2.nss
Jaysyn904 de24f81734 Added NWN Dark Sun module contents
Added NWN Dark Sun module contents.
2021-07-12 21:24:46 -04:00

30 lines
891 B
Plaintext

#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
effect ePoison = EffectPoison(67); // Fordorran Musk Poison
effect eVis = EffectVisualEffect(VFX_IMP_POISON_S);
object oTarget = GetFirstInPersistentObject();
while(GetIsObjectValid(oTarget))
{
if(GetIsEnemy(oTarget, oCaster))
{
int nRace = GetRacialType(oTarget);
if (( nRace == RACIAL_TYPE_CONSTRUCT ) ||
( nRace == RACIAL_TYPE_ELEMENTAL ) ||
( nRace == 52 ) || // Plants are immune to poison.
( nRace == RACIAL_TYPE_UNDEAD ))
return;
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
oTarget = GetNextInPersistentObject();
}
}