PoA_PRC8/_module/nss/desecrating_aur2.nss
Jaysyn904 bfbbd2f1ac Major update
Added several new undead models & facelifted overrides for other models.  Added dozens of new undead creatures from Libris Mortis & the monster manuals.  Added CODI Core AI.  Added NESS spawner system.  Added randomized respawning trap system.  Added undead feeding system.  Greatly revamped Catacombs & Halls of the Dead.  Updated nimtools.  Full compile.  Updated release archive.
2024-04-07 01:06:57 -04:00

40 lines
1.3 KiB
Plaintext

#include "nw_i0_spells"
#include "prc_inc_racial"
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
int nHP;
effect eHP;
effect eVis2 = EffectVisualEffect(VFX_IMP_HOLY_AID);
effect eVis = EffectVisualEffect(VFX_DUR_PROTECTION_EVIL_MINOR);
effect eAttack = EffectAttackIncrease(2);
effect eDamage = EffectDamageIncrease(2);
effect eSaves = EffectSavingThrowIncrease(SAVING_THROW_ALL,2);
effect eLink = EffectLinkEffects(eAttack,eDamage);
eLink = EffectLinkEffects(eLink,eSaves);
eLink = EffectLinkEffects(eLink,eVis);
object oTarget = GetFirstInPersistentObject();
while(GetIsObjectValid(oTarget))
{
if (GetLocalInt(oTarget,"DEAura")<=0 )
{
int nRace = MyPRCGetRacialType(oTarget);
if ( nRace == RACIAL_TYPE_UNDEAD )
{
nHP = GetHitDice(oTarget) * 2;
eHP = EffectTemporaryHitpoints(nHP);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oTarget);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eLink,oTarget);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eHP,oTarget);
SetLocalInt(oTarget,"DEAura",1);
}
}
oTarget = GetNextInPersistentObject();
}
}