PRC8_fork/nwn/trunk/scripts/prc_shar_sanc.nss
Jaysyn904 5914ed2ab5 Updated Release Archive
Updated Release Archive.  Fixed Mage-killer prereqs.  Removed old LETO & ConvoCC related files.  Added organized spell scroll store.  Fixed Gloura spellbook. Various TLK fixes.  Reorganized Repo.  Removed invalid user folders. Added DocGen back in.
2023-08-22 10:00:21 -04:00

26 lines
876 B
Plaintext

/*
Celebrant of Sharess Sanctuary
*/
#include "prc_inc_spells"
void main()
{
object oPC = OBJECT_SELF;
int nClass = GetLevelByClass(CLASS_TYPE_CELEBRANT_SHARESS, oPC);
int nDC = GetSkillRank(SKILL_PERFORM, oPC) + d20();
location lTarget = GetLocation(oPC);
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE);
//Cycle through the targets within the spell shape until an invalid object is captured.
while (GetIsObjectValid(oTarget))
{
if (GetIsFriend(oPC, oTarget) || oTarget == oPC)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSanctuary(nDC), oTarget, HoursToSeconds(nClass));
}
//Select the next target within the spell shape.
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
}