PRC8/nwn/nwnprc/trunk/newspellbook/moi_mld_maxess.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

30 lines
784 B
Plaintext

/*
29/12/19 by Stratovarius
Applies the maximum essentia to the calling soulmeld, and resets all other melds
*/
#include "moi_inc_moifunc"
void main()
{
object oMeldshaper = OBJECT_SELF;
if (GetLocalInt(oMeldshaper, "PerfectMeldshaper")) return;
if(TakeSwiftAction(oMeldshaper))
{
if (GetTemporaryEssentia(oMeldshaper))
{
int nMeld = EssentiaIDToRealID(PRCGetSpellId());
SetLocalInt(oMeldshaper, "InvestingTempEssentia", TRUE);
InvestEssentia(oMeldshaper, nMeld, GetTemporaryEssentia(oMeldshaper));
ShapeSoulmeld(oMeldshaper, nMeld);
}
else
{
DrainEssentia(oMeldshaper);
InvestEssentia(oMeldshaper, EssentiaIDToRealID(PRCGetSpellId()), 99);
WipeMelds(oMeldshaper);
ReshapeMelds(oMeldshaper);
}
}
}