WizardryEE/Notes/spells/sp_daylightA.nss
2025-04-26 15:20:45 -04:00

22 lines
643 B
Plaintext

///////////////////////////////////////////////////
// Daylight On Enter
// sp_daylightA.nss
////////////////////////////////////////////////////
void main()
{
object oTarget = GetEnteringObject();
int nLight = GetLocalInt(oTarget, "PRCInLight");
nLight++;
SetLocalInt(oTarget, "PRCInLight", nLight);
effect eTest = GetFirstEffect(oTarget);
while(GetIsEffectValid(eTest))
{
if(GetEffectSpellId(eTest) == SPELL_DARKNESS) RemoveEffect(oTarget, eTest);
eTest = GetNextEffect(oTarget);
}
}