PRC8_fork/nwn/trunk/scripts/prc_dom_sun.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

23 lines
743 B
Plaintext

#include "inc_newspellbook"
#include "prc_inc_domain"
void main()
{
object oPC = OBJECT_SELF;
// Used by the uses per day check code for bonus domains
if(!DecrementDomainUses(PRC_DOMAIN_SUN, oPC)) return;
// Mystics with sun domain can turn undead, but can't use greater turning
int bMystic = GetLevelByClass(CLASS_TYPE_MYSTIC, oPC) && GetHasFeat(FEAT_BONUS_DOMAIN_SUN, oPC);
if(bMystic)
{
if(!GetHasFeat(FEAT_TURN_UNDEAD, oPC))
return;
}
else ActionDoCommand(SetLocalInt(oPC, "UsingSunDomain", TRUE));
ActionCastSpell(SPELLABILITY_TURN_UNDEAD);
ActionDoCommand(DecrementRemainingFeatUses(oPC, FEAT_TURN_UNDEAD));
ActionDoCommand(DeleteLocalInt(oPC, "UsingSunDomain"));
}