Spell & Ability Upgrade
Reorganized hak files & removed duplicates. Added @rafhot's PRC spell & ability level scaling expansion. Further script integration. Full compile.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "nw_i0_spells"
|
||||
#include "epicdc_inc"
|
||||
|
||||
//:: void main (){}
|
||||
|
||||
/*
|
||||
This magnificent include saves you time and reduces the length of the "myhook"
|
||||
script by using functions instead of retyping everything! Just follow the
|
||||
@@ -61,7 +63,7 @@ const int zDam = 2;
|
||||
//Example of use.. DoTVisual();
|
||||
void DoTVisual()
|
||||
{
|
||||
object aTarget = GetSpellTargetObject();
|
||||
object aTarget = PRCGetSpellTargetObject();
|
||||
effect aVis;
|
||||
int nInt;
|
||||
nInt = GetObjectType(aTarget);
|
||||
@@ -102,7 +104,7 @@ ApplyEffectAtLocation(DURATION_TYPE_INSTANT, aVis, aLocation, 0.0f);
|
||||
|
||||
void DoTDmg()
|
||||
{
|
||||
object aTarget = GetSpellTargetObject();
|
||||
object aTarget = PRCGetSpellTargetObject();
|
||||
int nTType = GetObjectType(aTarget);
|
||||
int aLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nLvl;
|
||||
@@ -140,11 +142,11 @@ else
|
||||
{fDC = cDC;}
|
||||
|
||||
|
||||
if(GetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDmg = 6 * oLvl; //Please change the # here if you modified the dice above.
|
||||
}
|
||||
if(GetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDmg = d8(oLvl);//Please change this d# if you modified the dice above.
|
||||
}
|
||||
@@ -153,7 +155,7 @@ effect eDmg;
|
||||
eDmg = EffectDamage(nDmg, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
//Check For Spell Resistance...
|
||||
if(!MyResistSpell(OBJECT_SELF, aTarget))
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, aTarget))
|
||||
{
|
||||
//If they don't make a Fortitude saving throw, apply normal dmg..
|
||||
if (!FortitudeSave(aTarget, fDC, SAVING_THROW_TYPE_ALL))
|
||||
@@ -184,7 +186,7 @@ if(!MyResistSpell(OBJECT_SELF, aTarget))
|
||||
//Example use: DoAreaDmg();
|
||||
void DoAreaDmg()
|
||||
{
|
||||
object aTarget = GetSpellTargetObject();
|
||||
object aTarget = PRCGetSpellTargetObject();
|
||||
object bTarget;
|
||||
int nTType;
|
||||
location aLocation = GetSpellTargetLocation();
|
||||
@@ -228,12 +230,12 @@ int nDmg = dInt;
|
||||
int mDmg = oLvl * 6;//This is the maximized dmg (adjust if you change dice above!)
|
||||
int fDmg = d8(oLvl);//This is empowered dmg(adjust if you change the dice above!)
|
||||
|
||||
if(GetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDmg = mDmg; //Note you will need to change this if you change the dice above.
|
||||
//ie. if you make the dice above 2d4 then make this 8 (max dmg)
|
||||
}
|
||||
if(GetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDmg = fDmg; //This dice is empowered (The next highest dice)
|
||||
}
|
||||
@@ -290,7 +292,7 @@ FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//You should not change anything within this script other than damage amount
|
||||
void DoBonusDmg(object aTarget)
|
||||
{
|
||||
object aTarget = GetSpellTargetObject();
|
||||
object aTarget = PRCGetSpellTargetObject();
|
||||
int cLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int dLvl = cLvl -20;
|
||||
int aInt = eDC -1;
|
||||
@@ -355,11 +357,11 @@ nDmg = 0;
|
||||
}
|
||||
|
||||
|
||||
if(GetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDmg = mDmg;
|
||||
}
|
||||
if(GetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDmg = eDamg;
|
||||
}
|
||||
@@ -399,7 +401,7 @@ if(!ResistSpell(OBJECT_SELF, aTarget))
|
||||
|
||||
void DoAreaBonusDmg(location aLocation)
|
||||
{
|
||||
object aTarget = GetSpellTargetObject();
|
||||
object aTarget = PRCGetSpellTargetObject();
|
||||
object bTarget;
|
||||
aLocation = GetSpellTargetLocation();
|
||||
int nTType;
|
||||
@@ -468,11 +470,11 @@ nDmg = 0;
|
||||
}
|
||||
|
||||
|
||||
if(GetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDmg = mDmg;
|
||||
}
|
||||
if(GetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
if(PRCGetMetaMagicFeat()==METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDmg = eDamg;
|
||||
}
|
||||
|
Reference in New Issue
Block a user