PRC8/nwn/nwnprc/trunk/newspellbook/moi_mld_mntlflft.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

67 lines
3.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
7/1/20 by Stratovarius
Mantle of Flame
Descriptors: Fire
Classes: Incarnate
Chakra: Shoulders
Saving Throw: See text
You shape incarnum into a cloak of wispy blue flame. The cloak covers your arms and almost closes in front of you, where a band of fire crosses over your heart to connect the cloaks two edges. The fire does not harm you, though it keeps you as warm and dry as any heavy cloak in cold or rainy weather.
While you wear your mantle of flame, any creature that strikes you takes 1d6 points of fire damage.
Essentia: Every point of essentia you invest in your mantle of flame increases the damage dealt by 1d6 points.
Chakra Bind (Shoulders)
Your mantle of flame burns particularly brightly around your shoulders, forming a high collar behind your head and neck.
As a standard action, you can briefly expand the mantle of flame to encompass all adjacent squares. Any creatures in those squares take damage as if they had attacked you with a handheld weapon (Reflex half).
*/
#include "moi_inc_moifunc"
void main()
{
object oMeldshaper = OBJECT_SELF;
int nMeldshaperLevel = GetMeldshaperLevel(oMeldshaper, CLASS_TYPE_INCARNATE, MELD_MANTLE_OF_FLAME);
int nDice = GetEssentiaInvested(oMeldshaper, MELD_MANTLE_OF_FLAME) + 1;
int nDC = GetMeldshaperDC(oMeldshaper, CLASS_TYPE_INCARNATE, MELD_MANTLE_OF_FLAME);
location lTarget = PRCGetSpellTargetLocation();
int nDamage;
float fDelay;
effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL);
effect eDam;
//Apply the fireball explosion at the location captured above.
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
//Declare the spell shape, size and the location. Capture the first target object in the shape.
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, FeetToMeters(7.0), lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
//Cycle through the targets within the spell shape until an invalid object is captured.
while (GetIsObjectValid(oTarget))
{
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oMeldshaper != oTarget)
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oMeldshaper, MELD_MANTLE_OF_FLAME));
//Get the distance between the explosion and the target to calculate delay
fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20;
if (!PRCDoResistSpell(oMeldshaper, oTarget, nMeldshaperLevel, fDelay))
{
nDamage = d6(nDice);
//Adjust damage based on Reflex Save, Evasion and Improved Evasion
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE);
if(nDamage > 0)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_FIRE), oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FLAME_M), oTarget);
}
}
}
//Select the next target within the spell shape.
oTarget = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(7.0), lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
}