36 lines
992 B
Plaintext
36 lines
992 B
Plaintext
//:://////////////////////////////////////////////////
|
|
//:: prc_pwonspawn.nss
|
|
/*
|
|
* PRC onSpawn catch all
|
|
*/
|
|
//:://////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "x0_i0_anims"
|
|
// #include "x0_i0_walkway" - in x0_i0_anims
|
|
#include "x0_i0_treasure"
|
|
|
|
#include "x2_inc_switches"
|
|
|
|
void main()
|
|
{
|
|
//Disable summoning
|
|
SetLocalInt(OBJECT_SELF, "DontSummon", TRUE);
|
|
|
|
|
|
// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
|
|
|
|
// * If Incorporeal, apply changes
|
|
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
|
|
{
|
|
effect eKDImmunity = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN);
|
|
effect eImmunity = EffectImmunity(IMMUNITY_TYPE_ENTANGLE);//Shadooow: logically also immune to trap, but thats too much hardcore I guess
|
|
effect eLink = EffectLinkEffects(eLink,eKDImmunity);
|
|
eLink = EffectLinkEffects(eLink,eImmunity);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eLink), OBJECT_SELF);
|
|
}
|
|
|
|
|
|
}
|