Files
PRC8/nwn/nwnprc/trunk/spells/sp_chan_pyrob.nss
Jaysyn904 5e9986829f 2025/10/30 Update
Improved Trip / Disarm should be Champion of Corellon bonus feats.
Crinti Shadow Marauders don't get weapon proficiencies.
Epic Dragon Shaman is 21st level.
JPM was missing epic arcane bonus feats.
Karsites & Silverbrows can enter Crinti Shadow Maarauder.
Drunken Rage can allow entry into Frostrager.
Knight of the Sacred Seal was missing FEATOR prereq for Weapon Focus: Shortsword.
Two-Weapon Defense is a general feat.
Tweaked Echoblade enchantment cost.
Added base class equpiment packages more inline with PnP & the actual package descriptions (@Cypher).
Added a modified packages.2da to support the above.
Updated Dynamic Conversation tokens as to greatly lessen the chance of conflicting with module dialogues.
Added weapon proficiencies to FeatToIprop().
Added pnp essentia scaling support for meldshaper levels over 40.
Added GetProficiencyFeatOfWeaponType().
Added GetHasSwashbucklerWeapon().
Added GetHasCorellonWeapon().
Fixed spelling for IP_CONST_FEAT_WEAPON_PROFICIENCY_NUNCHAKU.
Fixed PsyRogue's Enhanced Sneak Attack scaling.
Eldrtich Doom shouldn't target non-hostiles.
Fixed Hellfire Warlock fire resistance to work with other sources of fire resistance.
Fixed text feedback for Island in Time.
Added some DEBUG for Shadow Blade.
prc_2da_cache creature should no longer be accidently targetable, causing faction issues.
Added a PnP cat creature, for the hell of it.  Tibitz is Dragon Magizine, unfortunately.
Updated text tokens for Astral Construct convos.
Updated text tokens for soulknife's mindblade convos.
If you save vs certain fear effects, they fail to work on you for 24 hours, from that source.  (Form of Doom, Dragon Fear)
Fixed Prismatic Sphere VFX bug (@Syrophir)
Fixed Banishment bug on all Prismatic spells.
Bralani Eldarin were missing Low-Light Vision.
Fixed Lips of Rapture bug.
Prelimiary work to making Favoured Soul's Deity's Weapon closer to PnP.
Fixed Firey Burst bug.  I think.

Updated notes.
Updated PRC8 Manual.
2025-10-30 19:04:58 -04:00

285 lines
7.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name Channeled Pyroburst
//:: FileName sp_chan_pyrob.nss
//:://////////////////////////////////////////////
/**@file Channeled Pyroburst
Evocation [Fire]
Level: Duskblade 4, sorcerer/wizard 4
Components: V,S
Casting Time: See text
Range: Medium
Area: See text
Duration: Instantaneous
Saving Throw: Reflex half
Spell Resistance: Yes
This spell creates a bolt of fiery energy that blasts
your enemies. The spell's strength depends on the
amount of time you spend channeling energy into it.
If you cast this spell as a swift action, it deals
1d4 points of fire damage per two caster levels
(maximum 10d4) against a single target of your choice.
If you cast this spell as a standard action, it deals
1d6 points of fire damage per caster level
(maximum 10d6) to all creatures in a 10-foot-radius
spread.
If you cast this spell as a full-round action, it deals
1d8 points of fire damage per caster level
(maximum 10d8) to all creatures in a 15-foot-radius
spread.
If you spend 2 rounds casting this spell, it deals 1d10
points of fire damage per caster level (maximum 10d10)
to all creatures in a 20-foot-radius spread.
You do not need to declare ahead of time how long you
want to spend casting the spell. When you begin casting
the spell, you decide that you are finished casting after
the appropriate time has passed.
**/
#include "prc_inc_spells"
#include "prc_add_spell_dc"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
object oPC = OBJECT_SELF;
int nSpell = PRCGetSpellId();
int nCasterLvl = PRCGetCasterLevel(oPC);
object oTarget = PRCGetSpellTargetObject();
location lLoc = PRCGetSpellTargetLocation();
int nDC = PRCGetSaveDC(oTarget, oPC);
int nDam;
int nMetaMagic = PRCGetMetaMagicFeat();
float fRadius = 0.0f;
PRCSignalSpellEvent(oTarget, TRUE, SPELL_CHANNELED_PYROBURST, oPC);
//Check Spell Resistance
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
{
int nVFX; // visual effect variable
//swift
if(nSpell == SPELL_CHANNELED_PYROBURST_1)
{
if(!TakeSwiftAction(oPC))
{
return;
}
nDam = d4(PRCMin((nCasterLvl/2), 10));
nVFX = VFX_IMP_FLAME_S; // single-target fire burst
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 4 * (PRCMin((nCasterLvl/2), 10));
}
}
//standard
else if(nSpell == SPELL_CHANNELED_PYROBURST_2)
{
nDam = d6(PRCMin(10, nCasterLvl));
fRadius = 3.048f;
nVFX = VFX_IMP_DIVINE_STRIKE_FIRE; // medium fire explosion
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 6 * (PRCMin(10, nCasterLvl));
}
}
//full round
else if(nSpell == SPELL_CHANNELED_PYROBURST_3)
{
nDam = d8(PRCMin(10, nCasterLvl));
fRadius = 4.57f;
nVFX = VFX_FNF_FIREBALL; // large fiery burst
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 8 * (PRCMin(10, nCasterLvl));
}
}
//two rounds
else if(nSpell == SPELL_CHANNELED_PYROBURST_4)
{
nDam = d10(PRCMin(10, nCasterLvl));
fRadius = 6.10f;
nVFX = VFX_FNF_FIRESTORM; // reuse large explosion, fits scale
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 10 * (PRCMin(10, nCasterLvl));
}
}
else
{
PRCSetSchool();
return;
}
//Metamagic Empower
if(nMetaMagic & METAMAGIC_EMPOWER)
{
nDam += (nDam/2);
}
nDam += SpellDamagePerDice(oPC, PRCMin(10, nCasterLvl));
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE))
{
nDam = nDam/2;
}
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_FIRE);
// apply visuals and damage
if(fRadius == 0.0f)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nVFX), oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}
else
{
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(nVFX), lLoc);
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRadius, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
while(GetIsObjectValid(oTarget))
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
oTarget = MyNextObjectInShape(SHAPE_SPHERE, fRadius, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
}
}
PRCSetSchool();
}
/* void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
object oPC = OBJECT_SELF;
int nSpell = PRCGetSpellId();
int nCasterLvl = PRCGetCasterLevel(oPC);
object oTarget = PRCGetSpellTargetObject();
location lLoc = PRCGetSpellTargetLocation();
int nDC = PRCGetSaveDC(oTarget, oPC);
int nDam;
int nMetaMagic = PRCGetMetaMagicFeat();
float fRadius = 0.0f;
PRCSignalSpellEvent(oTarget, TRUE, SPELL_CHANNELED_PYROBURST, oPC);
//Check Spell Resistance
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
{
//swift
if(nSpell == SPELL_CHANNELED_PYROBURST_1)
{
if(!TakeSwiftAction(oPC))
{
return;
}
nDam = d4(PRCMin((nCasterLvl/2), 10));
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 4 * (PRCMin((nCasterLvl/2), 10));
}
}
//standard
else if(nSpell == SPELL_CHANNELED_PYROBURST_2)
{
nDam = d6(PRCMin(10, nCasterLvl));
fRadius = 3.048f;
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 6 * (PRCMin(10, nCasterLvl));
}
}
//full round
else if(nSpell == SPELL_CHANNELED_PYROBURST_3)
{
nDam = d8(PRCMin(10, nCasterLvl));
fRadius = 4.57f;
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 8 * (PRCMin(10, nCasterLvl));
}
}
//two rounds
else if(nSpell == SPELL_CHANNELED_PYROBURST_4)
{
nDam = d10(PRCMin(10, nCasterLvl));
fRadius = 6.10f;
if(nMetaMagic & METAMAGIC_MAXIMIZE)
{
nDam = 10 * (PRCMin(10, nCasterLvl));
}
}
else
{
PRCSetSchool();
return;
}
//Metamagic Empower
if(nMetaMagic & METAMAGIC_EMPOWER)
{
nDam += (nDam/2);
}
nDam += SpellDamagePerDice(oPC, PRCMin(10, nCasterLvl));
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE))
{
nDam = nDam/2;
}
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_FIRE);
if(fRadius == 0.0f)
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}
else
{
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRadius, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
while(GetIsObjectValid(oTarget))
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
oTarget = MyNextObjectInShape(SHAPE_SPHERE, fRadius, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
}
}
}
PRCSetSchool();
}
*/