PRC8/trunk/scripts/prc_fact_splcast.nss
Jaysyn904 1662218bb4 Initial upload.
Adding base PRC 4.19a files to repository.
2022-10-07 13:51:24 -04:00

29 lines
964 B
Plaintext

//:://////////////////////////////////////////////
//:: Factotum Arcane Dilettante cast script
//:: prc_fact_splcast
//:://////////////////////////////////////////////
/*
@author Stratovarius - 2019.12.21
*/
#include "prc_inc_factotum"
void main()
{
object oPC = OBJECT_SELF;
if (ExpendInspiration(oPC, 1))
{
int nSpellID = GetFactotumSlot(oPC);
int nCasterLevel = GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC);
int nTotalDC = 10 + StringToInt(Get2DACache("spells", "Wiz_Sorc", nSpellID)) + GetAbilityModifier(ABILITY_INTELLIGENCE, oPC);
ActionDoCommand(SetLocalInt(oPC, "SpellIsSLA", TRUE));
ActionCastSpell(nSpellID, nCasterLevel, 0, nTotalDC, METAMAGIC_NONE, CLASS_TYPE_INVALID, FALSE, FALSE, OBJECT_INVALID, FALSE);
ActionDoCommand(DeleteLocalInt(oPC, "SpellIsSLA"));
//return;
}
else
{
IncrementRemainingFeatUses(oPC, StringToInt(Get2DACache("spells", "FeatID", PRCGetSpellId())));
}
}