NWNDS/nwnds_module/ps_intfort_exit.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
751 B
Plaintext

/************************************
* Intellect Fortress onExit script *
* *
* Removes Int fortress effect. *
* *
*************************************/
#include "lib_psionic"
void main()
{
object oPC=GetAreaOfEffectCreator();
object oTarget=GetExitingObject();
effect eChk=GetFirstEffect(oTarget);
if (!GetIsFriend(oTarget, oPC)) return;
while (GetIsEffectValid(eChk))
{
if (GetEffectType(eChk)==EFFECT_TYPE_SAVING_THROW_INCREASE && GetEffectSubType(eChk)==SUBTYPE_EXTRAORDINARY && GetEffectCreator(eChk)==oPC)
{
RemoveEffect(oTarget, eChk);
break;
}
eChk=GetNextEffect(oTarget);
}
}