Updated to PRC8
Updated to PRC8. Further function integration. Fixed NPC onDeath script. Full compile. Updated release archive.
This commit is contained in:
67
_haks/poa_exp_spells/sp_wallfrosta.nss
Normal file
67
_haks/poa_exp_spells/sp_wallfrosta.nss
Normal file
@@ -0,0 +1,67 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wall of Frost: On Enter
|
||||
//:: SP_WallFrostA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Person within the AoE take 4d6 cold damage
|
||||
per round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
object oTarget;
|
||||
//Declare and assign personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator());
|
||||
int CasterLvl = PRCGetCasterLevel(GetAreaOfEffectCreator());
|
||||
|
||||
//Capture the first target object in the shape.
|
||||
oTarget = GetEnteringObject();
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr))
|
||||
{
|
||||
//Roll damage.
|
||||
nDamage = d6(4+(CasterLvl/2));
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6*(4+(CasterLvl/2));//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, (PRCGetSaveDC(oTarget,GetAreaOfEffectCreator())), SAVING_THROW_TYPE_COLD);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
// Apply effects to the currently selected target.
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, ChangedElementalDamage(GetAreaOfEffectCreator(), DAMAGE_TYPE_COLD));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
PRCBonusDamage(oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
Reference in New Issue
Block a user