Updated to PRC8. Further function integration. Fixed NPC onDeath script. Full compile. Updated release archive.
41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Dragonfire Adept
|
|
//:: inv_drgnfireadpt.nss
|
|
//::///////////////////////////////////////////////
|
|
/*
|
|
Handles the passive bonuses for Dragonfire Adepts
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Fox
|
|
//:: Created On: Jan 24, 2007
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "prc_class_const"
|
|
#include "inc_item_props"
|
|
#include "inv_inc_invfunc"
|
|
void main()
|
|
{
|
|
int nClass = GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT);
|
|
nClass += GetInvocationPRCLevels(OBJECT_SELF);
|
|
int nScales = (nClass + 8) / 5;
|
|
if(nScales > 1)
|
|
SetCompositeBonus(GetPCSkin(OBJECT_SELF), "DFA_AC", nScales, ITEM_PROPERTY_AC_BONUS);
|
|
|
|
//Reduction
|
|
if(nClass > 5)
|
|
{
|
|
effect eReduction;
|
|
if(nClass > 95) eReduction = EffectDamageReduction(25, DAMAGE_POWER_PLUS_TWENTY);
|
|
else if(nClass > 85) eReduction = EffectDamageReduction(22, DAMAGE_POWER_PLUS_TWENTY);
|
|
else if(nClass > 75) eReduction = EffectDamageReduction(20, DAMAGE_POWER_PLUS_FIFTEEN);
|
|
else if(nClass > 65) eReduction = EffectDamageReduction(17, DAMAGE_POWER_PLUS_FIFTEEN);
|
|
else if(nClass > 55) eReduction = EffectDamageReduction(15, DAMAGE_POWER_PLUS_TEN);
|
|
else if(nClass > 45) eReduction = EffectDamageReduction(12, DAMAGE_POWER_PLUS_TEN);
|
|
else if(nClass > 35) eReduction = EffectDamageReduction(10, DAMAGE_POWER_PLUS_FIVE);
|
|
else if(nClass > 25) eReduction = EffectDamageReduction(7, DAMAGE_POWER_PLUS_FIVE);
|
|
else if(nClass > 15) eReduction = EffectDamageReduction(5, DAMAGE_POWER_PLUS_ONE);
|
|
else eReduction = EffectDamageReduction(2, DAMAGE_POWER_PLUS_ONE);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(eReduction), OBJECT_SELF);
|
|
}
|
|
} |