diff --git a/35expandedabilities/PRC_vampdrain.ncs b/35expandedabilities/PRC_vampdrain.ncs new file mode 100644 index 00000000..2a8ba7bb Binary files /dev/null and b/35expandedabilities/PRC_vampdrain.ncs differ diff --git a/35expandedabilities/PRC_vampdrain.nss b/35expandedabilities/PRC_vampdrain.nss new file mode 100644 index 00000000..23eab8e7 --- /dev/null +++ b/35expandedabilities/PRC_vampdrain.nss @@ -0,0 +1,151 @@ +//:://///////////////////////////////////////////// +//:: Vampiric Drain +//:: PRC_vampdrain.nss +//::////////////////////////////////////////////// +/* + Drain living, caster heals + Drain dead, caster dies +*/ +//::////////////////////////////////////////////// +//:: Created By: Zedium +//:: Created On: April 5, 2004 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "prc_add_spell_dc" + +//------------------------------------------------------------------------------ +// GZ: gets rids of temporary hit points so that they will not stack +//------------------------------------------------------------------------------ +void PRCRemoveTempHitPoints() +{ + effect eProtection; + int nCnt = 0; + + eProtection = GetFirstEffect(OBJECT_SELF); + while (GetIsEffectValid(eProtection)) + { + if(GetEffectType(eProtection) == EFFECT_TYPE_TEMPORARY_HITPOINTS) + RemoveEffect(OBJECT_SELF, eProtection); + eProtection = GetNextEffect(OBJECT_SELF); + } +} + +void main() +{ +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY); + /* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + // End of Spell Cast Hook + + //Declare major variables + object oTarget = PRCGetSpellTargetObject(); + int nMetaMagic = PRCGetMetaMagicFeat(); + + int nCasterLevel = PRCGetCasterLevel(OBJECT_SELF); + int nDDice = nCasterLevel /4; + if ((nDDice) == 0) + { + nDDice = 1; + } + //Damage Limit + else if (nDDice>20) + { + nDDice = 20; + } + + int nDamage = d6(nDDice); + //-------------------------------------------------------------------------- + //Enter Metamagic conditions + //-------------------------------------------------------------------------- + nDamage = PRCMaximizeOrEmpower(6,nDDice,nMetaMagic); + int nDuration = nCasterLevel/3; + + if ((nMetaMagic & METAMAGIC_EXTEND)) + { + nDuration *= 2; + } + //nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF); + //-------------------------------------------------------------------------- + //Limit damage to max hp + 10 + //-------------------------------------------------------------------------- + int nMax = GetCurrentHitPoints(oTarget) + 10; + if(nMax < nDamage) + { + nDamage = nMax; + } + + effect eHeal = EffectTemporaryHitpoints(nDamage/2); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eHeal, eDur); + effect eHurt = PRCEffectDamage(oTarget, nDamage/2); + effect eBad =EffectTemporaryHitpoints(nDamage); + effect eNegLink = EffectLinkEffects(eBad, eDur); + effect eDamage = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_10); + float fDelay; + + nCasterLevel +=SPGetPenetr(); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation()); + //Get first target in shape + oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, PRCGetSpellTargetLocation()); + while (GetIsObjectValid(oTarget)) + { + int iTombTainted = GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD; + //Check if the target is undead + if( MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || iTombTainted || GetLocalInt(oTarget, "AcererakHealing")) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHurt, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oTarget); + PRCRemoveTempHitPoints(); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(1)); + } + //Check if the target is hostile, and not an undead or construct + //or protected by a spell + if(!GetIsReactionTypeFriendly(oTarget) && + MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD && + !iTombTainted && + MyPRCGetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && + !GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget)) + { + if(PRCDoResistSpell(OBJECT_SELF, oTarget,nCasterLevel) == 0) + { + if(/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, (PRCGetSaveDC(oTarget,OBJECT_SELF)), SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay)) + { + nDamage = nDamage/2; + + if (GetHasMettle(oTarget, SAVING_THROW_WILL)) // Ignores partial effects + { + nDamage = 0; + } + } + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); + PRCBonusDamage(oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, OBJECT_SELF); + PRCRemoveTempHitPoints(); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(1)); + } + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } + DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); + // Getting rid of the integer used to hold the spells spell school + } diff --git a/35expandedabilities/inv_adeptbreath.ncs b/35expandedabilities/inv_adeptbreath.ncs new file mode 100644 index 00000000..c6f8192b Binary files /dev/null and b/35expandedabilities/inv_adeptbreath.ncs differ diff --git a/35expandedabilities/inv_adeptbreath.nss b/35expandedabilities/inv_adeptbreath.nss new file mode 100644 index 00000000..6b01b71b --- /dev/null +++ b/35expandedabilities/inv_adeptbreath.nss @@ -0,0 +1,183 @@ +//:://///////////////////////////////////////////// +//:: Dragonfire Adept Breath Effects +//:: inv_adeptbreath.nss +//:://///////////////////////////////////////////// +/* + Handles the breath effects for Dragonfire Adepts +*/ +//::////////////////////////////////////////////// +//:: Created By: Fox +//:: Created On: Jan 25, 2007 +//::////////////////////////////////////////////// + +#include "prc_inc_spells" +#include "prc_inc_breath" +#include "inv_inc_invfunc" +#include "nivel_ext" +void main() +{ + object oPC = OBJECT_SELF; + location lTarget = PRCGetSpellTargetLocation(); + int nClass = GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT, oPC); + //PrC arcane spellcasting levels grant damage dice and DC + nClass += GetInvocationPRCLevels(oPC); + int nDice = (nClass + 1) / 2; + int nSaveDCBonus = nClass / 2; + float fRange = nClass < 10 ? 30.0 : 60.0; + int nAlignment = GetAlignmentGoodEvil(oPC); + int nSpellID = GetSpellId(); + int nLastEffectUsed = GetLocalInt(oPC, "LastBreathEffect"); + struct breath BaseBreath; + + if(GetHitDice(oPC)>=80) + { + nDice = (nClass + 1) + (ObterNivelJogador(oPC)-80) / 2; + nSaveDCBonus = nClass + (ObterNivelJogador(oPC)-80) / 2; + fRange = nClass < 20 ? 60.0 : 90.0; + } + + if(DEBUG) DoDebug("inv_adeptbreath: range: " + FloatToString(fRange)); + + if(GetLocalInt(oPC, "AdeptTiamatLock")) + { + SendMessageToPC(oPC, "You cannot use your breath weapon again until next round"); + return; + } + + if(nLastEffectUsed == nSpellID + && nSpellID != BREATH_SHAPED_BREATH + && nSpellID != BREATH_CLOUD_BREATH + && nSpellID != BREATH_ENDURING_BREATH) + { + SendMessageToPC(oPC, "You cannot use the same breath effect two rounds in a row."); + return; + } + + switch(nSpellID) + { + case BREATH_FIRE_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_FIRE, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_FIRE_LINE: + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_FIRE, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_FROST_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_COLD, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_ELECTRIC_LINE: + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_ELECTRICAL, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_SICKENING_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, -1, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_SICKENING, 0, SAVING_THROW_FORT); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_ACID_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_ACID, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_ACID_LINE: + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_ACID, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_SHAPED_BREATH: + if(GetLocalInt(oPC, "AdeptShapedBreath")) + { + DeleteLocalInt(oPC, "AdeptShapedBreath"); + FloatingTextStringOnCreature("*Shaped Breath Removed*", oPC, FALSE); + } + else + { + SetLocalInt(oPC, "AdeptShapedBreath", TRUE); + FloatingTextStringOnCreature("*Shaped Breath Applied*", oPC, FALSE); + } break; + + case BREATH_SLOW_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, -1, 6, 2, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_SLOW, 0, SAVING_THROW_FORT); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_WEAKENING_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, -1, 6, 6, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_WEAKENING, 0, SAVING_THROW_FORT); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_CLOUD_BREATH: + if(GetLocalInt(oPC, "AdeptCloudBreath")) + { + DeleteLocalInt(oPC, "AdeptCloudBreath"); + FloatingTextStringOnCreature("*Cloud Breath Removed*", oPC, FALSE); + } + else + { + SetLocalInt(oPC, "AdeptCloudBreath", TRUE); + FloatingTextStringOnCreature("*Cloud Breath Applied*", oPC, FALSE); + } break; + + case BREATH_ENDURING_BREATH: + if(GetLocalInt(oPC, "AdeptEnduringBreath")) + { + DeleteLocalInt(oPC, "AdeptEnduringBreath"); + FloatingTextStringOnCreature("*Enduring Breath Removed*", oPC, FALSE); + } + else + { + SetLocalInt(oPC, "AdeptEnduringBreath", TRUE); + FloatingTextStringOnCreature("*Enduring Breath Applied*", oPC, FALSE); + } break; + + case BREATH_SLEEP_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, -1, 6, 1, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_SLEEP, 0, SAVING_THROW_WILL); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_THUNDER_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_SONIC, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0, SAVING_THROW_FORT); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_BAHAMUT_LINE: + //evil characters can't use this breath + if(nAlignment == ALIGNMENT_EVIL) return; + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_MAGICAL, 6, nDice * 2, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + if(nAlignment == ALIGNMENT_GOOD) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nClass * 2, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY), oPC); + if(nAlignment == ALIGNMENT_NEUTRAL) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nClass * 4, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY), oPC); + break; + + case BREATH_FORCE_LINE: + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_MAGICAL, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_PARALYZE_CONE: + BaseBreath = CreateBreath(oPC, FALSE, fRange, -1, 6, 1, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_PARALYZE, 0, SAVING_THROW_FORT); + ApplyBreath(BaseBreath, lTarget); break; + + case BREATH_FIVEFOLD_TIAMAT: + //good characters can't use this breath + if(nAlignment == ALIGNMENT_GOOD) return; + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_ACID, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + BaseBreath = CreateBreath(oPC, TRUE, fRange * 2, DAMAGE_TYPE_ELECTRICAL, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_ACID, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_COLD, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + BaseBreath = CreateBreath(oPC, FALSE, fRange, DAMAGE_TYPE_FIRE, 6, nDice, ABILITY_CONSTITUTION, nSaveDCBonus, BREATH_NORMAL, 0); + ApplyBreath(BaseBreath, lTarget); + if(nAlignment == ALIGNMENT_EVIL) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nClass * 2, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY), oPC); + if(nAlignment == ALIGNMENT_NEUTRAL) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nClass * 4, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY), oPC); + SetLocalInt(oPC, "AdeptTiamatLock", TRUE); + DelayCommand(6.0, DeleteLocalInt(oPC, "AdeptTiamatLock")); + break; + } + + //Mark the breath effect as used. + if(nSpellID != BREATH_SHAPED_BREATH + && nSpellID != BREATH_CLOUD_BREATH + && nSpellID != BREATH_ENDURING_BREATH) + { + SetLocalInt(oPC, "LastBreathEffect", nSpellID); + DelayCommand(6.0, DeleteLocalInt(oPC, "LastBreathEffect")); + } +} \ No newline at end of file diff --git a/35expandedabilities/inv_drgnfireadpt.ncs b/35expandedabilities/inv_drgnfireadpt.ncs new file mode 100644 index 00000000..01258094 Binary files /dev/null and b/35expandedabilities/inv_drgnfireadpt.ncs differ diff --git a/35expandedabilities/inv_drgnfireadpt.nss b/35expandedabilities/inv_drgnfireadpt.nss new file mode 100644 index 00000000..55b57da7 --- /dev/null +++ b/35expandedabilities/inv_drgnfireadpt.nss @@ -0,0 +1,41 @@ +//:://///////////////////////////////////////////// +//:: 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); + } +} \ No newline at end of file diff --git a/35expandedabilities/nivel_ext.nss b/35expandedabilities/nivel_ext.nss new file mode 100644 index 00000000..87a32719 --- /dev/null +++ b/35expandedabilities/nivel_ext.nss @@ -0,0 +1,1180 @@ +/****************************************************************************** + * Script de Extensao para Calculo de Niveis (de Jogador e Itens) * + * Versăo: 2.0 * + ****************************************************************************** + + ******************************************************************************/ + +//****************************************************************************** +// Declaracoes de Constantes Globais +//****************************************************************************** + +// Nivel maximo permitido no servidor. Nao e recomendado valores superiores a 120 +const int NIVEL_MAXIMO_PERMITIDO = 1000; //1000 + +//****************************************************************************** +// Assinaturas de Procedimentos, Funcoes e Metodos +//****************************************************************************** + +// Retorna quanto de experiencia e necessaria para se ter determinado nivel. +int ObterExperienciaNivel(int iNivel); + +// Retorna quanto de nivel se tem com determinada esperiencia. +int ObterNivelExperiencia(int iExperiencia); + +// Retorna o nivel real de determinado jogador a partir de sua experiencia. +int ObterNivelJogador(object oJogador); + +// Retorna o nivel de determinada criatura, obtida a partir das variaveis do jogo. +int ObterNivelCriatura(object oCriatura); + +// Converte iPreco do item em nivel necessario para utiliza-lo. +int ConverterPrecoNivelItem(int iPreco); + +// Retorna o nivel necessario para utilizar determinado item. +int ObterNivelItem(object oItem); + +// Retorna a experiencia necessaria para utilizar determinado item. +int ObterExperienciaItem(object oItem); + + +//****************************************************************************** +// Implementacao de Procedimentos, Funcoes e Metodos +//****************************************************************************** + +//****************************************************************************** +int ObterExperienciaNivel(int iNivel) +{ + int iContador; + int iXP = 0; + + for (iContador = 1;iContador <= iNivel;iContador++) + { + iXP += ((iContador - 1) * 1000); + } + + return iXP; +} +//****************************************************************************** + +//****************************************************************************** +int ObterNivelExperiencia(int iExperiencia) +{ + int iXPAtual = iExperiencia; + int iContadorNivel = 1; + int iXPProximoNivel = 1000; + + while (iXPAtual >= iXPProximoNivel) + { + iContadorNivel++; + iXPAtual = iXPAtual - iXPProximoNivel; + iXPProximoNivel = iXPProximoNivel + 1000; + } + + return iContadorNivel; +} +//****************************************************************************** + +//****************************************************************************** +int ObterNivelJogador(object oJogador) +{ + return ObterNivelExperiencia(GetXP(oJogador)); +} +//****************************************************************************** + +//****************************************************************************** +int ObterNivelCriatura(object oCriatura) +{ + return + ( + GetLevelByPosition(1,oCriatura) + + GetLevelByPosition(2,oCriatura) + + GetLevelByPosition(3,oCriatura) + + GetLevelByPosition(4,oCriatura) + + GetLevelByPosition(5,oCriatura) + + GetLevelByPosition(6,oCriatura) + + GetLevelByPosition(7,oCriatura) + + GetLevelByPosition(8,oCriatura) + ); +} +//atualizada abaixo: + /* +int ObterNivelCriatura(object oCriatura) +{ + int iNivel = FloatToInt( GetChallengeRating( oCriatura ) + 0.5 ); + if ( iNivel < 1 ) { iNivel = 1; } + return iNivel; +} */ +//****************************************************************************** + +//****************************************************************************** +int ConverterPrecoNivelItem(int iPreco) +{ + if (iPreco <= 1000) { return 1; } + else if (iPreco <= 3400) { return 2; } + else if (iPreco <= 7400) { return 3; } + else if (iPreco <= 13000) { return 4; } + else if (iPreco <= 20200) { return 5; } + else if (iPreco <= 29000) { return 6; } + else if (iPreco <= 39400) { return 7; } + else if (iPreco <= 51400) { return 8; } + else if (iPreco <= 65000) { return 9; } + else if (iPreco <= 80200) { return 10; } + else if (iPreco <= 97000) { return 11; } + else if (iPreco <= 115400) { return 12; } + else if (iPreco <= 135400) { return 13; } + else if (iPreco <= 157000) { return 14; } + else if (iPreco <= 180200) { return 15; } + else if (iPreco <= 205000) { return 16; } + else if (iPreco <= 231400) { return 17; } + else if (iPreco <= 259400) { return 18; } + else if (iPreco <= 289000) { return 19; } + else if (iPreco <= 320200) { return 20; } + else if (iPreco <= 353000) { return 21; } + else if (iPreco <= 387400) { return 22; } + else if (iPreco <= 423400) { return 23; } + else if (iPreco <= 461000) { return 24; } + else if (iPreco <= 500200) { return 25; } + else if (iPreco <= 541000) { return 26; } + else if (iPreco <= 583400) { return 27; } + else if (iPreco <= 627400) { return 28; } + else if (iPreco <= 673000) { return 29; } + else if (iPreco <= 720200) { return 30; } + else if (iPreco <= 769000) { return 31; } + else if (iPreco <= 819400) { return 32; } + else if (iPreco <= 871400) { return 33; } + else if (iPreco <= 925000) { return 34; } + else if (iPreco <= 980200) { return 35; } + else if (iPreco <= 1037000) { return 36; } + else if (iPreco <= 1095400) { return 37; } + else if (iPreco <= 1155400) { return 38; } + else if (iPreco <= 1217000) { return 39; } + else if (iPreco <= 1280200) { return 40; } + else if (iPreco <= 1345000) { return 41; } + else if (iPreco <= 1411400) { return 42; } + else if (iPreco <= 1479400) { return 43; } + else if (iPreco <= 1549000) { return 44; } + else if (iPreco <= 1620200) { return 45; } + else if (iPreco <= 1693000) { return 46; } + else if (iPreco <= 1767400) { return 47; } + else if (iPreco <= 1843400) { return 48; } + else if (iPreco <= 1921000) { return 49; } + else if (iPreco <= 2000200) { return 50; } + else if (iPreco <= 2081000) { return 51; } + else if (iPreco <= 2163400) { return 52; } + else if (iPreco <= 2247400) { return 53; } + else if (iPreco <= 2333000) { return 54; } + else if (iPreco <= 2420200) { return 55; } + else if (iPreco <= 2509000) { return 56; } + else if (iPreco <= 2599400) { return 57; } + else if (iPreco <= 2691400) { return 58; } + else if (iPreco <= 2785000) { return 59; } + else if (iPreco <= 2880200) { return 60; } + else if (iPreco <= 2977000) { return 61; } + else if (iPreco <= 3075400) { return 62; } + else if (iPreco <= 3175400) { return 63; } + else if (iPreco <= 3277000) { return 64; } + else if (iPreco <= 3380200) { return 65; } + else if (iPreco <= 3485000) { return 66; } + else if (iPreco <= 3591400) { return 67; } + else if (iPreco <= 3699400) { return 68; } + else if (iPreco <= 3809000) { return 69; } + else if (iPreco <= 3920200) { return 70; } + else if (iPreco <= 4033000) { return 71; } + else if (iPreco <= 4147400) { return 72; } + else if (iPreco <= 4263400) { return 73; } + else if (iPreco <= 4381000) { return 74; } + else if (iPreco <= 4500200) { return 75; } + else if (iPreco <= 4621000) { return 76; } + else if (iPreco <= 4743400) { return 77; } + else if (iPreco <= 4867400) { return 78; } + else if (iPreco <= 4993000) { return 79; } + else if (iPreco <= 5120200) { return 80; } + else if (iPreco <= 5249000) { return 81; } + else if (iPreco <= 5379400) { return 82; } + else if (iPreco <= 5511400) { return 83; } + else if (iPreco <= 5645000) { return 84; } + else if (iPreco <= 5780200) { return 85; } + else if (iPreco <= 5917000) { return 86; } + else if (iPreco <= 6055400) { return 87; } + else if (iPreco <= 6195400) { return 88; } + else if (iPreco <= 6337000) { return 89; } + else if (iPreco <= 6480200) { return 90; } + else if (iPreco <= 6625000) { return 91; } + else if (iPreco <= 6771400) { return 92; } + else if (iPreco <= 6919400) { return 93; } + else if (iPreco <= 7069000) { return 94; } + else if (iPreco <= 7220200) { return 95; } + else if (iPreco <= 7373000) { return 96; } + else if (iPreco <= 7527400) { return 97; } + else if (iPreco <= 7683400) { return 98; } + else if (iPreco <= 7841000) { return 99; } + else if (iPreco <= 8000200) { return 100; } + else if (iPreco <= 8161000) { return 101; } + else if (iPreco <= 8323400) { return 102; } + else if (iPreco <= 8487400) { return 103; } + else if (iPreco <= 8653000) { return 104; } + else if (iPreco <= 8820200) { return 105; } + else if (iPreco <= 8989000) { return 106; } + else if (iPreco <= 9159400) { return 107; } + else if (iPreco <= 9331400) { return 108; } + else if (iPreco <= 9505000) { return 109; } + else if (iPreco <= 9680200) { return 110; } + else if (iPreco <= 9857000) { return 111; } + else if (iPreco <= 10035400) { return 112; } + else if (iPreco <= 10215400) { return 113; } + else if (iPreco <= 10397000) { return 114; } + else if (iPreco <= 10580200) { return 115; } + else if (iPreco <= 10765000) { return 116; } + else if (iPreco <= 10951400) { return 117; } + else if (iPreco <= 11139400) { return 118; } + else if (iPreco <= 11329000) { return 119; } + else if (iPreco <= 11520200) { return 120; } + else if (iPreco <= 11713000) { return 121; } + else if (iPreco <= 11907400) { return 122; } + else if (iPreco <= 12103400) { return 123; } + else if (iPreco <= 12301000) { return 124; } + else if (iPreco <= 12500200) { return 125; } + else if (iPreco <= 12701000) { return 126; } + else if (iPreco <= 12903400) { return 127; } + else if (iPreco <= 13107400) { return 128; } + else if (iPreco <= 13313000) { return 129; } + else if (iPreco <= 13520200) { return 130; } + else if (iPreco <= 13729000) { return 131; } + else if (iPreco <= 13939400) { return 132; } + else if (iPreco <= 14151400) { return 133; } + else if (iPreco <= 14365000) { return 134; } + else if (iPreco <= 14580200) { return 135; } + else if (iPreco <= 14797000) { return 136; } + else if (iPreco <= 15015400) { return 137; } + else if (iPreco <= 15235400) { return 138; } + else if (iPreco <= 15457000) { return 139; } + else if (iPreco <= 15680200) { return 140; } + else if (iPreco <= 15905000) { return 141; } + else if (iPreco <= 16131400) { return 142; } + else if (iPreco <= 16359400) { return 143; } + else if (iPreco <= 16589000) { return 144; } + else if (iPreco <= 16820200) { return 145; } + else if (iPreco <= 17053000) { return 146; } + else if (iPreco <= 17287400) { return 147; } + else if (iPreco <= 17523400) { return 148; } + else if (iPreco <= 17761000) { return 149; } + else if (iPreco <= 18000200) { return 150; } + else if (iPreco <= 18241000) { return 151; } + else if (iPreco <= 18483400) { return 152; } + else if (iPreco <= 18727400) { return 153; } + else if (iPreco <= 18973000) { return 154; } + else if (iPreco <= 19220200) { return 155; } + else if (iPreco <= 19469000) { return 156; } + else if (iPreco <= 19719400) { return 157; } + else if (iPreco <= 19971400) { return 158; } + else if (iPreco <= 20225000) { return 159; } + else if (iPreco <= 20480200) { return 160; } + else if (iPreco <= 20737000) { return 161; } + else if (iPreco <= 20995400) { return 162; } + else if (iPreco <= 21255400) { return 163; } + else if (iPreco <= 21517000) { return 164; } + else if (iPreco <= 21780200) { return 165; } + else if (iPreco <= 22045000) { return 166; } + else if (iPreco <= 22311400) { return 167; } + else if (iPreco <= 22579400) { return 168; } + else if (iPreco <= 22849000) { return 169; } + else if (iPreco <= 23120200) { return 170; } + else if (iPreco <= 23393000) { return 171; } + else if (iPreco <= 23667400) { return 172; } + else if (iPreco <= 23943400) { return 173; } + else if (iPreco <= 24221000) { return 174; } + else if (iPreco <= 24500200) { return 175; } + else if (iPreco <= 24781000) { return 176; } + else if (iPreco <= 25063400) { return 177; } + else if (iPreco <= 25347400) { return 178; } + else if (iPreco <= 25633000) { return 179; } + else if (iPreco <= 25920200) { return 180; } + else if (iPreco <= 26209000) { return 181; } + else if (iPreco <= 26499400) { return 182; } + else if (iPreco <= 26791400) { return 183; } + else if (iPreco <= 27085000) { return 184; } + else if (iPreco <= 27380200) { return 185; } + else if (iPreco <= 27677000) { return 186; } + else if (iPreco <= 27975400) { return 187; } + else if (iPreco <= 28275400) { return 188; } + else if (iPreco <= 28577000) { return 189; } + else if (iPreco <= 28880200) { return 190; } + else if (iPreco <= 29185000) { return 191; } + else if (iPreco <= 29491400) { return 192; } + else if (iPreco <= 29799400) { return 193; } + else if (iPreco <= 30109000) { return 194; } + else if (iPreco <= 30420200) { return 195; } + else if (iPreco <= 30733000) { return 196; } + else if (iPreco <= 31047400) { return 197; } + else if (iPreco <= 31363400) { return 198; } + else if (iPreco <= 31681000) { return 199; } + else if (iPreco <= 32000200) { return 200; } + else if (iPreco <= 32321000) { return 201; } + else if (iPreco <= 32643400) { return 202; } + else if (iPreco <= 32967400) { return 203; } + else if (iPreco <= 33293000) { return 204; } + else if (iPreco <= 33620200) { return 205; } + else if (iPreco <= 33949000) { return 206; } + else if (iPreco <= 34279400) { return 207; } + else if (iPreco <= 34611400) { return 208; } + else if (iPreco <= 34945000) { return 209; } + else if (iPreco <= 35280200) { return 210; } + else if (iPreco <= 35617000) { return 211; } + else if (iPreco <= 35955400) { return 212; } + else if (iPreco <= 36295400) { return 213; } + else if (iPreco <= 36637000) { return 214; } + else if (iPreco <= 36980200) { return 215; } + else if (iPreco <= 37325000) { return 216; } + else if (iPreco <= 37671400) { return 217; } + else if (iPreco <= 38019400) { return 218; } + else if (iPreco <= 38369000) { return 219; } + else if (iPreco <= 38720200) { return 220; } + else if (iPreco <= 39073000) { return 221; } + else if (iPreco <= 39427400) { return 222; } + else if (iPreco <= 39783400) { return 223; } + else if (iPreco <= 40141000) { return 224; } + else if (iPreco <= 40500200) { return 225; } + else if (iPreco <= 40861000) { return 226; } + else if (iPreco <= 41223400) { return 227; } + else if (iPreco <= 41587400) { return 228; } + else if (iPreco <= 41953000) { return 229; } + else if (iPreco <= 42320200) { return 230; } + else if (iPreco <= 42689000) { return 231; } + else if (iPreco <= 43059400) { return 232; } + else if (iPreco <= 43431400) { return 233; } + else if (iPreco <= 43805000) { return 234; } + else if (iPreco <= 44180200) { return 235; } + else if (iPreco <= 44557000) { return 236; } + else if (iPreco <= 44935400) { return 237; } + else if (iPreco <= 45315400) { return 238; } + else if (iPreco <= 45697000) { return 239; } + else if (iPreco <= 46080200) { return 240; } + else if (iPreco <= 46465000) { return 241; } + else if (iPreco <= 46851400) { return 242; } + else if (iPreco <= 47239400) { return 243; } + else if (iPreco <= 47629000) { return 244; } + else if (iPreco <= 48020200) { return 245; } + else if (iPreco <= 48413000) { return 246; } + else if (iPreco <= 48807400) { return 247; } + else if (iPreco <= 49203400) { return 248; } + else if (iPreco <= 49601000) { return 249; } + else if (iPreco <= 50000200) { return 250; } + else if (iPreco <= 50401000) { return 251; } + else if (iPreco <= 50803400) { return 252; } + else if (iPreco <= 51207400) { return 253; } + else if (iPreco <= 51613000) { return 254; } + else if (iPreco <= 52020200) { return 255; } + else if (iPreco <= 52429000) { return 256; } + else if (iPreco <= 52839400) { return 257; } + else if (iPreco <= 53251400) { return 258; } + else if (iPreco <= 53665000) { return 259; } + else if (iPreco <= 54080200) { return 260; } + else if (iPreco <= 54497000) { return 261; } + else if (iPreco <= 54915400) { return 262; } + else if (iPreco <= 55335400) { return 263; } + else if (iPreco <= 55757000) { return 264; } + else if (iPreco <= 56180200) { return 265; } + else if (iPreco <= 56605000) { return 266; } + else if (iPreco <= 57031400) { return 267; } + else if (iPreco <= 57459400) { return 268; } + else if (iPreco <= 57889000) { return 269; } + else if (iPreco <= 58320200) { return 270; } + else if (iPreco <= 58753000) { return 271; } + else if (iPreco <= 59187400) { return 272; } + else if (iPreco <= 59623400) { return 273; } + else if (iPreco <= 60061000) { return 274; } + else if (iPreco <= 60500200) { return 275; } + else if (iPreco <= 60941000) { return 276; } + else if (iPreco <= 61383400) { return 277; } + else if (iPreco <= 61827400) { return 278; } + else if (iPreco <= 62273000) { return 279; } + else if (iPreco <= 62720200) { return 280; } + else if (iPreco <= 63169000) { return 281; } + else if (iPreco <= 63619400) { return 282; } + else if (iPreco <= 64071400) { return 283; } + else if (iPreco <= 64525000) { return 284; } + else if (iPreco <= 64980200) { return 285; } + else if (iPreco <= 65437000) { return 286; } + else if (iPreco <= 65895400) { return 287; } + else if (iPreco <= 66355400) { return 288; } + else if (iPreco <= 66817000) { return 289; } + else if (iPreco <= 67280200) { return 290; } + else if (iPreco <= 67745000) { return 291; } + else if (iPreco <= 68211400) { return 292; } + else if (iPreco <= 68679400) { return 293; } + else if (iPreco <= 69149000) { return 294; } + else if (iPreco <= 69620200) { return 295; } + else if (iPreco <= 70093000) { return 296; } + else if (iPreco <= 70567400) { return 297; } + else if (iPreco <= 71043400) { return 298; } + else if (iPreco <= 71521000) { return 299; } + else if (iPreco <= 72000200) { return 300; } + else if (iPreco <= 72481000) { return 301; } + else if (iPreco <= 72963400) { return 302; } + else if (iPreco <= 73447400) { return 303; } + else if (iPreco <= 73933000) { return 304; } + else if (iPreco <= 74420200) { return 305; } + else if (iPreco <= 74909000) { return 306; } + else if (iPreco <= 75399400) { return 307; } + else if (iPreco <= 75891400) { return 308; } + else if (iPreco <= 76385000) { return 309; } + else if (iPreco <= 76880200) { return 310; } + else if (iPreco <= 77377000) { return 311; } + else if (iPreco <= 77875400) { return 312; } + else if (iPreco <= 78375400) { return 313; } + else if (iPreco <= 78877000) { return 314; } + else if (iPreco <= 79380200) { return 315; } + else if (iPreco <= 79885000) { return 316; } + else if (iPreco <= 80391400) { return 317; } + else if (iPreco <= 80899400) { return 318; } + else if (iPreco <= 81409000) { return 319; } + else if (iPreco <= 81920200) { return 320; } + else if (iPreco <= 82433000) { return 321; } + else if (iPreco <= 82947400) { return 322; } + else if (iPreco <= 83463400) { return 323; } + else if (iPreco <= 83981000) { return 324; } + else if (iPreco <= 84500200) { return 325; } + else if (iPreco <= 85021000) { return 326; } + else if (iPreco <= 85543400) { return 327; } + else if (iPreco <= 86067400) { return 328; } + else if (iPreco <= 86593000) { return 329; } + else if (iPreco <= 87120200) { return 330; } + else if (iPreco <= 87649000) { return 331; } + else if (iPreco <= 88179400) { return 332; } + else if (iPreco <= 88711400) { return 333; } + else if (iPreco <= 89245000) { return 334; } + else if (iPreco <= 89780200) { return 335; } + else if (iPreco <= 90317000) { return 336; } + else if (iPreco <= 90855400) { return 337; } + else if (iPreco <= 91395400) { return 338; } + else if (iPreco <= 91937000) { return 339; } + else if (iPreco <= 92480200) { return 340; } + else if (iPreco <= 93025000) { return 341; } + else if (iPreco <= 93571400) { return 342; } + else if (iPreco <= 94119400) { return 343; } + else if (iPreco <= 94669000) { return 344; } + else if (iPreco <= 95220200) { return 345; } + else if (iPreco <= 95773000) { return 346; } + else if (iPreco <= 96327400) { return 347; } + else if (iPreco <= 96883400) { return 348; } + else if (iPreco <= 97441000) { return 349; } + else if (iPreco <= 98000200) { return 350; } + else if (iPreco <= 98561000) { return 351; } + else if (iPreco <= 99123400) { return 352; } + else if (iPreco <= 99687400) { return 353; } + else if (iPreco <= 100253000) { return 354; } + else if (iPreco <= 100820200) { return 355; } + else if (iPreco <= 101389000) { return 356; } + else if (iPreco <= 101959400) { return 357; } + else if (iPreco <= 102531400) { return 358; } + else if (iPreco <= 103105000) { return 359; } + else if (iPreco <= 103680200) { return 360; } + else if (iPreco <= 104257000) { return 361; } + else if (iPreco <= 104835400) { return 362; } + else if (iPreco <= 105415400) { return 363; } + else if (iPreco <= 105997000) { return 364; } + else if (iPreco <= 106580200) { return 365; } + else if (iPreco <= 107165000) { return 366; } + else if (iPreco <= 107751400) { return 367; } + else if (iPreco <= 108339400) { return 368; } + else if (iPreco <= 108929000) { return 369; } + else if (iPreco <= 109520200) { return 370; } + else if (iPreco <= 110113000) { return 371; } + else if (iPreco <= 110707400) { return 372; } + else if (iPreco <= 111303400) { return 373; } + else if (iPreco <= 111901000) { return 374; } + else if (iPreco <= 112500200) { return 375; } + else if (iPreco <= 113101000) { return 376; } + else if (iPreco <= 113703400) { return 377; } + else if (iPreco <= 114307400) { return 378; } + else if (iPreco <= 114913000) { return 379; } + else if (iPreco <= 115520200) { return 380; } + else if (iPreco <= 116129000) { return 381; } + else if (iPreco <= 116739400) { return 382; } + else if (iPreco <= 117351400) { return 383; } + else if (iPreco <= 117965000) { return 384; } + else if (iPreco <= 118580200) { return 385; } + else if (iPreco <= 119197000) { return 386; } + else if (iPreco <= 119815400) { return 387; } + else if (iPreco <= 120435400) { return 388; } + else if (iPreco <= 121057000) { return 389; } + else if (iPreco <= 121680200) { return 390; } + else if (iPreco <= 122305000) { return 391; } + else if (iPreco <= 122931400) { return 392; } + else if (iPreco <= 123559400) { return 393; } + else if (iPreco <= 124189000) { return 394; } + else if (iPreco <= 124820200) { return 395; } + else if (iPreco <= 125453000) { return 396; } + else if (iPreco <= 126087400) { return 397; } + else if (iPreco <= 126723400) { return 398; } + else if (iPreco <= 127361000) { return 399; } + else if (iPreco <= 128000200) { return 400; } + else if (iPreco <= 128641000) { return 401; } + else if (iPreco <= 129283400) { return 402; } + else if (iPreco <= 129927400) { return 403; } + else if (iPreco <= 130573000) { return 404; } + else if (iPreco <= 131220200) { return 405; } + else if (iPreco <= 131869000) { return 406; } + else if (iPreco <= 132519400) { return 407; } + else if (iPreco <= 133171400) { return 408; } + else if (iPreco <= 133825000) { return 409; } + else if (iPreco <= 134480200) { return 410; } + else if (iPreco <= 135137000) { return 411; } + else if (iPreco <= 135795400) { return 412; } + else if (iPreco <= 136455400) { return 413; } + else if (iPreco <= 137117000) { return 414; } + else if (iPreco <= 137780200) { return 415; } + else if (iPreco <= 138445000) { return 416; } + else if (iPreco <= 139111400) { return 417; } + else if (iPreco <= 139779400) { return 418; } + else if (iPreco <= 140449000) { return 419; } + else if (iPreco <= 141120200) { return 420; } + else if (iPreco <= 141793000) { return 421; } + else if (iPreco <= 142467400) { return 422; } + else if (iPreco <= 143143400) { return 423; } + else if (iPreco <= 143821000) { return 424; } + else if (iPreco <= 144500200) { return 425; } + else if (iPreco <= 145181000) { return 426; } + else if (iPreco <= 145863400) { return 427; } + else if (iPreco <= 146547400) { return 428; } + else if (iPreco <= 147233000) { return 429; } + else if (iPreco <= 147920200) { return 430; } + else if (iPreco <= 148609000) { return 431; } + else if (iPreco <= 149299400) { return 432; } + else if (iPreco <= 149991400) { return 433; } + else if (iPreco <= 150685000) { return 434; } + else if (iPreco <= 151380200) { return 435; } + else if (iPreco <= 152077000) { return 436; } + else if (iPreco <= 152775400) { return 437; } + else if (iPreco <= 153475400) { return 438; } + else if (iPreco <= 154177000) { return 439; } + else if (iPreco <= 154880200) { return 440; } + else if (iPreco <= 155585000) { return 441; } + else if (iPreco <= 156291400) { return 442; } + else if (iPreco <= 156999400) { return 443; } + else if (iPreco <= 157709000) { return 444; } + else if (iPreco <= 158420200) { return 445; } + else if (iPreco <= 159133000) { return 446; } + else if (iPreco <= 159847400) { return 447; } + else if (iPreco <= 160563400) { return 448; } + else if (iPreco <= 161281000) { return 449; } + else if (iPreco <= 162000200) { return 450; } + else if (iPreco <= 162721000) { return 451; } + else if (iPreco <= 163443400) { return 452; } + else if (iPreco <= 164167400) { return 453; } + else if (iPreco <= 164893000) { return 454; } + else if (iPreco <= 165620200) { return 455; } + else if (iPreco <= 166349000) { return 456; } + else if (iPreco <= 167079400) { return 457; } + else if (iPreco <= 167811400) { return 458; } + else if (iPreco <= 168545000) { return 459; } + else if (iPreco <= 169280200) { return 460; } + else if (iPreco <= 170017000) { return 461; } + else if (iPreco <= 170755400) { return 462; } + else if (iPreco <= 171495400) { return 463; } + else if (iPreco <= 172237000) { return 464; } + else if (iPreco <= 172980200) { return 465; } + else if (iPreco <= 173725000) { return 466; } + else if (iPreco <= 174471400) { return 467; } + else if (iPreco <= 175219400) { return 468; } + else if (iPreco <= 175969000) { return 469; } + else if (iPreco <= 176720200) { return 470; } + else if (iPreco <= 177473000) { return 471; } + else if (iPreco <= 178227400) { return 472; } + else if (iPreco <= 178983400) { return 473; } + else if (iPreco <= 179741000) { return 474; } + else if (iPreco <= 180500200) { return 475; } + else if (iPreco <= 181261000) { return 476; } + else if (iPreco <= 182023400) { return 477; } + else if (iPreco <= 182787400) { return 478; } + else if (iPreco <= 183553000) { return 479; } + else if (iPreco <= 184320200) { return 480; } + else if (iPreco <= 185089000) { return 481; } + else if (iPreco <= 185859400) { return 482; } + else if (iPreco <= 186631400) { return 483; } + else if (iPreco <= 187405000) { return 484; } + else if (iPreco <= 188180200) { return 485; } + else if (iPreco <= 188957000) { return 486; } + else if (iPreco <= 189735400) { return 487; } + else if (iPreco <= 190515400) { return 488; } + else if (iPreco <= 191297000) { return 489; } + else if (iPreco <= 192080200) { return 490; } + else if (iPreco <= 192865000) { return 491; } + else if (iPreco <= 193651400) { return 492; } + else if (iPreco <= 194439400) { return 493; } + else if (iPreco <= 195229000) { return 494; } + else if (iPreco <= 196020200) { return 495; } + else if (iPreco <= 196813000) { return 496; } + else if (iPreco <= 197607400) { return 497; } + else if (iPreco <= 198403400) { return 498; } + else if (iPreco <= 199201000) { return 499; } + else if (iPreco <= 200000200) { return 500; } + else if (iPreco <= 200801000) { return 501; } + else if (iPreco <= 201603400) { return 502; } + else if (iPreco <= 202407400) { return 503; } + else if (iPreco <= 203213000) { return 504; } + else if (iPreco <= 204020200) { return 505; } + else if (iPreco <= 204829000) { return 506; } + else if (iPreco <= 205639400) { return 507; } + else if (iPreco <= 206451400) { return 508; } + else if (iPreco <= 207265000) { return 509; } + else if (iPreco <= 208080200) { return 510; } + else if (iPreco <= 208897000) { return 511; } + else if (iPreco <= 209715400) { return 512; } + else if (iPreco <= 210535400) { return 513; } + else if (iPreco <= 211357000) { return 514; } + else if (iPreco <= 212180200) { return 515; } + else if (iPreco <= 213005000) { return 516; } + else if (iPreco <= 213831400) { return 517; } + else if (iPreco <= 214659400) { return 518; } + else if (iPreco <= 215489000) { return 519; } + else if (iPreco <= 216320200) { return 520; } + else if (iPreco <= 217153000) { return 521; } + else if (iPreco <= 217987400) { return 522; } + else if (iPreco <= 218823400) { return 523; } + else if (iPreco <= 219661000) { return 524; } + else if (iPreco <= 220500200) { return 525; } + else if (iPreco <= 221341000) { return 526; } + else if (iPreco <= 222183400) { return 527; } + else if (iPreco <= 223027400) { return 528; } + else if (iPreco <= 223873000) { return 529; } + else if (iPreco <= 224720200) { return 530; } + else if (iPreco <= 225569000) { return 531; } + else if (iPreco <= 226419400) { return 532; } + else if (iPreco <= 227271400) { return 533; } + else if (iPreco <= 228125000) { return 534; } + else if (iPreco <= 228980200) { return 535; } + else if (iPreco <= 229837000) { return 536; } + else if (iPreco <= 230695400) { return 537; } + else if (iPreco <= 231555400) { return 538; } + else if (iPreco <= 232417000) { return 539; } + else if (iPreco <= 233280200) { return 540; } + else if (iPreco <= 234145000) { return 541; } + else if (iPreco <= 235011400) { return 542; } + else if (iPreco <= 235879400) { return 543; } + else if (iPreco <= 236749000) { return 544; } + else if (iPreco <= 237620200) { return 545; } + else if (iPreco <= 238493000) { return 546; } + else if (iPreco <= 239367400) { return 547; } + else if (iPreco <= 240243400) { return 548; } + else if (iPreco <= 241121000) { return 549; } + else if (iPreco <= 242000200) { return 550; } + else if (iPreco <= 242881000) { return 551; } + else if (iPreco <= 243763400) { return 552; } + else if (iPreco <= 244647400) { return 553; } + else if (iPreco <= 245533000) { return 554; } + else if (iPreco <= 246420200) { return 555; } + else if (iPreco <= 247309000) { return 556; } + else if (iPreco <= 248199400) { return 557; } + else if (iPreco <= 249091400) { return 558; } + else if (iPreco <= 249985000) { return 559; } + else if (iPreco <= 250880200) { return 560; } + else if (iPreco <= 251777000) { return 561; } + else if (iPreco <= 252675400) { return 562; } + else if (iPreco <= 253575400) { return 563; } + else if (iPreco <= 254477000) { return 564; } + else if (iPreco <= 255380200) { return 565; } + else if (iPreco <= 256285000) { return 566; } + else if (iPreco <= 257191400) { return 567; } + else if (iPreco <= 258099400) { return 568; } + else if (iPreco <= 259009000) { return 569; } + else if (iPreco <= 259920200) { return 570; } + else if (iPreco <= 260833000) { return 571; } + else if (iPreco <= 261747400) { return 572; } + else if (iPreco <= 262663400) { return 573; } + else if (iPreco <= 263581000) { return 574; } + else if (iPreco <= 264500200) { return 575; } + else if (iPreco <= 265421000) { return 576; } + else if (iPreco <= 266343400) { return 577; } + else if (iPreco <= 267267400) { return 578; } + else if (iPreco <= 268193000) { return 579; } + else if (iPreco <= 269120200) { return 580; } + else if (iPreco <= 270049000) { return 581; } + else if (iPreco <= 270979400) { return 582; } + else if (iPreco <= 271911400) { return 583; } + else if (iPreco <= 272845000) { return 584; } + else if (iPreco <= 273780200) { return 585; } + else if (iPreco <= 274717000) { return 586; } + else if (iPreco <= 275655400) { return 587; } + else if (iPreco <= 276595400) { return 588; } + else if (iPreco <= 277537000) { return 589; } + else if (iPreco <= 278480200) { return 590; } + else if (iPreco <= 279425000) { return 591; } + else if (iPreco <= 280371400) { return 592; } + else if (iPreco <= 281319400) { return 593; } + else if (iPreco <= 282269000) { return 594; } + else if (iPreco <= 283220200) { return 595; } + else if (iPreco <= 284173000) { return 596; } + else if (iPreco <= 285127400) { return 597; } + else if (iPreco <= 286083400) { return 598; } + else if (iPreco <= 287041000) { return 599; } + else if (iPreco <= 288000200) { return 600; } + else if (iPreco <= 288961000) { return 601; } + else if (iPreco <= 289923400) { return 602; } + else if (iPreco <= 290887400) { return 603; } + else if (iPreco <= 291853000) { return 604; } + else if (iPreco <= 292820200) { return 605; } + else if (iPreco <= 293789000) { return 606; } + else if (iPreco <= 294759400) { return 607; } + else if (iPreco <= 295731400) { return 608; } + else if (iPreco <= 296705000) { return 609; } + else if (iPreco <= 297680200) { return 610; } + else if (iPreco <= 298657000) { return 611; } + else if (iPreco <= 299635400) { return 612; } + else if (iPreco <= 300615400) { return 613; } + else if (iPreco <= 301597000) { return 614; } + else if (iPreco <= 302580200) { return 615; } + else if (iPreco <= 303565000) { return 616; } + else if (iPreco <= 304551400) { return 617; } + else if (iPreco <= 305539400) { return 618; } + else if (iPreco <= 306529000) { return 619; } + else if (iPreco <= 307520200) { return 620; } + else if (iPreco <= 308513000) { return 621; } + else if (iPreco <= 309507400) { return 622; } + else if (iPreco <= 310503400) { return 623; } + else if (iPreco <= 311501000) { return 624; } + else if (iPreco <= 312500200) { return 625; } + else if (iPreco <= 313501000) { return 626; } + else if (iPreco <= 314503400) { return 627; } + else if (iPreco <= 315507400) { return 628; } + else if (iPreco <= 316513000) { return 629; } + else if (iPreco <= 317520200) { return 630; } + else if (iPreco <= 318529000) { return 631; } + else if (iPreco <= 319539400) { return 632; } + else if (iPreco <= 320551400) { return 633; } + else if (iPreco <= 321565000) { return 634; } + else if (iPreco <= 322580200) { return 635; } + else if (iPreco <= 323597000) { return 636; } + else if (iPreco <= 324615400) { return 637; } + else if (iPreco <= 325635400) { return 638; } + else if (iPreco <= 326657000) { return 639; } + else if (iPreco <= 327680200) { return 640; } + else if (iPreco <= 328705000) { return 641; } + else if (iPreco <= 329731400) { return 642; } + else if (iPreco <= 330759400) { return 643; } + else if (iPreco <= 331789000) { return 644; } + else if (iPreco <= 332820200) { return 645; } + else if (iPreco <= 333853000) { return 646; } + else if (iPreco <= 334887400) { return 647; } + else if (iPreco <= 335923400) { return 648; } + else if (iPreco <= 336961000) { return 649; } + else if (iPreco <= 338000200) { return 650; } + else if (iPreco <= 339041000) { return 651; } + else if (iPreco <= 340083400) { return 652; } + else if (iPreco <= 341127400) { return 653; } + else if (iPreco <= 342173000) { return 654; } + else if (iPreco <= 343220200) { return 655; } + else if (iPreco <= 344269000) { return 656; } + else if (iPreco <= 345319400) { return 657; } + else if (iPreco <= 346371400) { return 658; } + else if (iPreco <= 347425000) { return 659; } + else if (iPreco <= 348480200) { return 660; } + else if (iPreco <= 349537000) { return 661; } + else if (iPreco <= 350595400) { return 662; } + else if (iPreco <= 351655400) { return 663; } + else if (iPreco <= 352717000) { return 664; } + else if (iPreco <= 353780200) { return 665; } + else if (iPreco <= 354845000) { return 666; } + else if (iPreco <= 355911400) { return 667; } + else if (iPreco <= 356979400) { return 668; } + else if (iPreco <= 358049000) { return 669; } + else if (iPreco <= 359120200) { return 670; } + else if (iPreco <= 360193000) { return 671; } + else if (iPreco <= 361267400) { return 672; } + else if (iPreco <= 362343400) { return 673; } + else if (iPreco <= 363421000) { return 674; } + else if (iPreco <= 364500200) { return 675; } + else if (iPreco <= 365581000) { return 676; } + else if (iPreco <= 366663400) { return 677; } + else if (iPreco <= 367747400) { return 678; } + else if (iPreco <= 368833000) { return 679; } + else if (iPreco <= 369920200) { return 680; } + else if (iPreco <= 371009000) { return 681; } + else if (iPreco <= 372099400) { return 682; } + else if (iPreco <= 373191400) { return 683; } + else if (iPreco <= 374285000) { return 684; } + else if (iPreco <= 375380200) { return 685; } + else if (iPreco <= 376477000) { return 686; } + else if (iPreco <= 377575400) { return 687; } + else if (iPreco <= 378675400) { return 688; } + else if (iPreco <= 379777000) { return 689; } + else if (iPreco <= 380880200) { return 690; } + else if (iPreco <= 381985000) { return 691; } + else if (iPreco <= 383091400) { return 692; } + else if (iPreco <= 384199400) { return 693; } + else if (iPreco <= 385309000) { return 694; } + else if (iPreco <= 386420200) { return 695; } + else if (iPreco <= 387533000) { return 696; } + else if (iPreco <= 388647400) { return 697; } + else if (iPreco <= 389763400) { return 698; } + else if (iPreco <= 390881000) { return 699; } + else if (iPreco <= 392000200) { return 700; } + else if (iPreco <= 393121000) { return 701; } + else if (iPreco <= 394243400) { return 702; } + else if (iPreco <= 395367400) { return 703; } + else if (iPreco <= 396493000) { return 704; } + else if (iPreco <= 397620200) { return 705; } + else if (iPreco <= 398749000) { return 706; } + else if (iPreco <= 399879400) { return 707; } + else if (iPreco <= 401011400) { return 708; } + else if (iPreco <= 402145000) { return 709; } + else if (iPreco <= 403280200) { return 710; } + else if (iPreco <= 404417000) { return 711; } + else if (iPreco <= 405555400) { return 712; } + else if (iPreco <= 406695400) { return 713; } + else if (iPreco <= 407837000) { return 714; } + else if (iPreco <= 408980200) { return 715; } + else if (iPreco <= 410125000) { return 716; } + else if (iPreco <= 411271400) { return 717; } + else if (iPreco <= 412419400) { return 718; } + else if (iPreco <= 413569000) { return 719; } + else if (iPreco <= 414720200) { return 720; } + else if (iPreco <= 415873000) { return 721; } + else if (iPreco <= 417027400) { return 722; } + else if (iPreco <= 418183400) { return 723; } + else if (iPreco <= 419341000) { return 724; } + else if (iPreco <= 420500200) { return 725; } + else if (iPreco <= 421661000) { return 726; } + else if (iPreco <= 422823400) { return 727; } + else if (iPreco <= 423987400) { return 728; } + else if (iPreco <= 425153000) { return 729; } + else if (iPreco <= 426320200) { return 730; } + else if (iPreco <= 427489000) { return 731; } + else if (iPreco <= 428659400) { return 732; } + else if (iPreco <= 429831400) { return 733; } + else if (iPreco <= 431005000) { return 734; } + else if (iPreco <= 432180200) { return 735; } + else if (iPreco <= 433357000) { return 736; } + else if (iPreco <= 434535400) { return 737; } + else if (iPreco <= 435715400) { return 738; } + else if (iPreco <= 436897000) { return 739; } + else if (iPreco <= 438080200) { return 740; } + else if (iPreco <= 439265000) { return 741; } + else if (iPreco <= 440451400) { return 742; } + else if (iPreco <= 441639400) { return 743; } + else if (iPreco <= 442829000) { return 744; } + else if (iPreco <= 444020200) { return 745; } + else if (iPreco <= 445213000) { return 746; } + else if (iPreco <= 446407400) { return 747; } + else if (iPreco <= 447603400) { return 748; } + else if (iPreco <= 448801000) { return 749; } + else if (iPreco <= 450000200) { return 750; } + else if (iPreco <= 451201000) { return 751; } + else if (iPreco <= 452403400) { return 752; } + else if (iPreco <= 453607400) { return 753; } + else if (iPreco <= 454813000) { return 754; } + else if (iPreco <= 456020200) { return 755; } + else if (iPreco <= 457229000) { return 756; } + else if (iPreco <= 458439400) { return 757; } + else if (iPreco <= 459651400) { return 758; } + else if (iPreco <= 460865000) { return 759; } + else if (iPreco <= 462080200) { return 760; } + else if (iPreco <= 463297000) { return 761; } + else if (iPreco <= 464515400) { return 762; } + else if (iPreco <= 465735400) { return 763; } + else if (iPreco <= 466957000) { return 764; } + else if (iPreco <= 468180200) { return 765; } + else if (iPreco <= 469405000) { return 766; } + else if (iPreco <= 470631400) { return 767; } + else if (iPreco <= 471859400) { return 768; } + else if (iPreco <= 473089000) { return 769; } + else if (iPreco <= 474320200) { return 770; } + else if (iPreco <= 475553000) { return 771; } + else if (iPreco <= 476787400) { return 772; } + else if (iPreco <= 478023400) { return 773; } + else if (iPreco <= 479261000) { return 774; } + else if (iPreco <= 480500200) { return 775; } + else if (iPreco <= 481741000) { return 776; } + else if (iPreco <= 482983400) { return 777; } + else if (iPreco <= 484227400) { return 778; } + else if (iPreco <= 485473000) { return 779; } + else if (iPreco <= 486720200) { return 780; } + else if (iPreco <= 487969000) { return 781; } + else if (iPreco <= 489219400) { return 782; } + else if (iPreco <= 490471400) { return 783; } + else if (iPreco <= 491725000) { return 784; } + else if (iPreco <= 492980200) { return 785; } + else if (iPreco <= 494237000) { return 786; } + else if (iPreco <= 495495400) { return 787; } + else if (iPreco <= 496755400) { return 788; } + else if (iPreco <= 498017000) { return 789; } + else if (iPreco <= 499280200) { return 790; } + else if (iPreco <= 500545000) { return 791; } + else if (iPreco <= 501811400) { return 792; } + else if (iPreco <= 503079400) { return 793; } + else if (iPreco <= 504349000) { return 794; } + else if (iPreco <= 505620200) { return 795; } + else if (iPreco <= 506893000) { return 796; } + else if (iPreco <= 508167400) { return 797; } + else if (iPreco <= 509443400) { return 798; } + else if (iPreco <= 510721000) { return 799; } + else if (iPreco <= 512000200) { return 800; } + else if (iPreco <= 513281000) { return 801; } + else if (iPreco <= 514563400) { return 802; } + else if (iPreco <= 515847400) { return 803; } + else if (iPreco <= 517133000) { return 804; } + else if (iPreco <= 518420200) { return 805; } + else if (iPreco <= 519709000) { return 806; } + else if (iPreco <= 520999400) { return 807; } + else if (iPreco <= 522291400) { return 808; } + else if (iPreco <= 523585000) { return 809; } + else if (iPreco <= 524880200) { return 810; } + else if (iPreco <= 526177000) { return 811; } + else if (iPreco <= 527475400) { return 812; } + else if (iPreco <= 528775400) { return 813; } + else if (iPreco <= 530077000) { return 814; } + else if (iPreco <= 531380200) { return 815; } + else if (iPreco <= 532685000) { return 816; } + else if (iPreco <= 533991400) { return 817; } + else if (iPreco <= 535299400) { return 818; } + else if (iPreco <= 536609000) { return 819; } + else if (iPreco <= 537920200) { return 820; } + else if (iPreco <= 539233000) { return 821; } + else if (iPreco <= 540547400) { return 822; } + else if (iPreco <= 541863400) { return 823; } + else if (iPreco <= 543181000) { return 824; } + else if (iPreco <= 544500200) { return 825; } + else if (iPreco <= 545821000) { return 826; } + else if (iPreco <= 547143400) { return 827; } + else if (iPreco <= 548467400) { return 828; } + else if (iPreco <= 549793000) { return 829; } + else if (iPreco <= 551120200) { return 830; } + else if (iPreco <= 552449000) { return 831; } + else if (iPreco <= 553779400) { return 832; } + else if (iPreco <= 555111400) { return 833; } + else if (iPreco <= 556445000) { return 834; } + else if (iPreco <= 557780200) { return 835; } + else if (iPreco <= 559117000) { return 836; } + else if (iPreco <= 560455400) { return 837; } + else if (iPreco <= 561795400) { return 838; } + else if (iPreco <= 563137000) { return 839; } + else if (iPreco <= 564480200) { return 840; } + else if (iPreco <= 565825000) { return 841; } + else if (iPreco <= 567171400) { return 842; } + else if (iPreco <= 568519400) { return 843; } + else if (iPreco <= 569869000) { return 844; } + else if (iPreco <= 571220200) { return 845; } + else if (iPreco <= 572573000) { return 846; } + else if (iPreco <= 573927400) { return 847; } + else if (iPreco <= 575283400) { return 848; } + else if (iPreco <= 576641000) { return 849; } + else if (iPreco <= 578000200) { return 850; } + else if (iPreco <= 579361000) { return 851; } + else if (iPreco <= 580723400) { return 852; } + else if (iPreco <= 582087400) { return 853; } + else if (iPreco <= 583453000) { return 854; } + else if (iPreco <= 584820200) { return 855; } + else if (iPreco <= 586189000) { return 856; } + else if (iPreco <= 587559400) { return 857; } + else if (iPreco <= 588931400) { return 858; } + else if (iPreco <= 590305000) { return 859; } + else if (iPreco <= 591680200) { return 860; } + else if (iPreco <= 593057000) { return 861; } + else if (iPreco <= 594435400) { return 862; } + else if (iPreco <= 595815400) { return 863; } + else if (iPreco <= 597197000) { return 864; } + else if (iPreco <= 598580200) { return 865; } + else if (iPreco <= 599965000) { return 866; } + else if (iPreco <= 601351400) { return 867; } + else if (iPreco <= 602739400) { return 868; } + else if (iPreco <= 604129000) { return 869; } + else if (iPreco <= 605520200) { return 870; } + else if (iPreco <= 606913000) { return 871; } + else if (iPreco <= 608307400) { return 872; } + else if (iPreco <= 609703400) { return 873; } + else if (iPreco <= 611101000) { return 874; } + else if (iPreco <= 612500200) { return 875; } + else if (iPreco <= 613901000) { return 876; } + else if (iPreco <= 615303400) { return 877; } + else if (iPreco <= 616707400) { return 878; } + else if (iPreco <= 618113000) { return 879; } + else if (iPreco <= 619520200) { return 880; } + else if (iPreco <= 620929000) { return 881; } + else if (iPreco <= 622339400) { return 882; } + else if (iPreco <= 623751400) { return 883; } + else if (iPreco <= 625165000) { return 884; } + else if (iPreco <= 626580200) { return 885; } + else if (iPreco <= 627997000) { return 886; } + else if (iPreco <= 629415400) { return 887; } + else if (iPreco <= 630835400) { return 888; } + else if (iPreco <= 632257000) { return 889; } + else if (iPreco <= 633680200) { return 890; } + else if (iPreco <= 635105000) { return 891; } + else if (iPreco <= 636531400) { return 892; } + else if (iPreco <= 637959400) { return 893; } + else if (iPreco <= 639389000) { return 894; } + else if (iPreco <= 640820200) { return 895; } + else if (iPreco <= 642253000) { return 896; } + else if (iPreco <= 643687400) { return 897; } + else if (iPreco <= 645123400) { return 898; } + else if (iPreco <= 646561000) { return 899; } + else if (iPreco <= 648000200) { return 900; } + else if (iPreco <= 649441000) { return 901; } + else if (iPreco <= 650883400) { return 902; } + else if (iPreco <= 652327400) { return 903; } + else if (iPreco <= 653773000) { return 904; } + else if (iPreco <= 655220200) { return 905; } + else if (iPreco <= 656669000) { return 906; } + else if (iPreco <= 658119400) { return 907; } + else if (iPreco <= 659571400) { return 908; } + else if (iPreco <= 661025000) { return 909; } + else if (iPreco <= 662480200) { return 910; } + else if (iPreco <= 663937000) { return 911; } + else if (iPreco <= 665395400) { return 912; } + else if (iPreco <= 666855400) { return 913; } + else if (iPreco <= 668317000) { return 914; } + else if (iPreco <= 669780200) { return 915; } + else if (iPreco <= 671245000) { return 916; } + else if (iPreco <= 672711400) { return 917; } + else if (iPreco <= 674179400) { return 918; } + else if (iPreco <= 675649000) { return 919; } + else if (iPreco <= 677120200) { return 920; } + else if (iPreco <= 678593000) { return 921; } + else if (iPreco <= 680067400) { return 922; } + else if (iPreco <= 681543400) { return 923; } + else if (iPreco <= 683021000) { return 924; } + else if (iPreco <= 684500200) { return 925; } + else if (iPreco <= 685981000) { return 926; } + else if (iPreco <= 687463400) { return 927; } + else if (iPreco <= 688947400) { return 928; } + else if (iPreco <= 690433000) { return 929; } + else if (iPreco <= 691920200) { return 930; } + else if (iPreco <= 693409000) { return 931; } + else if (iPreco <= 694899400) { return 932; } + else if (iPreco <= 696391400) { return 933; } + else if (iPreco <= 697885000) { return 934; } + else if (iPreco <= 699380200) { return 935; } + else if (iPreco <= 700877000) { return 936; } + else if (iPreco <= 702375400) { return 937; } + else if (iPreco <= 703875400) { return 938; } + else if (iPreco <= 705377000) { return 939; } + else if (iPreco <= 706880200) { return 940; } + else if (iPreco <= 708385000) { return 941; } + else if (iPreco <= 709891400) { return 942; } + else if (iPreco <= 711399400) { return 943; } + else if (iPreco <= 712909000) { return 944; } + else if (iPreco <= 714420200) { return 945; } + else if (iPreco <= 715933000) { return 946; } + else if (iPreco <= 717447400) { return 947; } + else if (iPreco <= 718963400) { return 948; } + else if (iPreco <= 720481000) { return 949; } + else if (iPreco <= 722000200) { return 950; } + else if (iPreco <= 723521000) { return 951; } + else if (iPreco <= 725043400) { return 952; } + else if (iPreco <= 726567400) { return 953; } + else if (iPreco <= 728093000) { return 954; } + else if (iPreco <= 729620200) { return 955; } + else if (iPreco <= 731149000) { return 956; } + else if (iPreco <= 732679400) { return 957; } + else if (iPreco <= 734211400) { return 958; } + else if (iPreco <= 735745000) { return 959; } + else if (iPreco <= 737280200) { return 960; } + else if (iPreco <= 738817000) { return 961; } + else if (iPreco <= 740355400) { return 962; } + else if (iPreco <= 741895400) { return 963; } + else if (iPreco <= 743437000) { return 964; } + else if (iPreco <= 744980200) { return 965; } + else if (iPreco <= 746525000) { return 966; } + else if (iPreco <= 748071400) { return 967; } + else if (iPreco <= 749619400) { return 968; } + else if (iPreco <= 751169000) { return 969; } + else if (iPreco <= 752720200) { return 970; } + else if (iPreco <= 754273000) { return 971; } + else if (iPreco <= 755827400) { return 972; } + else if (iPreco <= 757383400) { return 973; } + else if (iPreco <= 758941000) { return 974; } + else if (iPreco <= 760500200) { return 975; } + else if (iPreco <= 762061000) { return 976; } + else if (iPreco <= 763623400) { return 977; } + else if (iPreco <= 765187400) { return 978; } + else if (iPreco <= 766753000) { return 979; } + else if (iPreco <= 768320200) { return 980; } + else if (iPreco <= 769889000) { return 981; } + else if (iPreco <= 771459400) { return 982; } + else if (iPreco <= 773031400) { return 983; } + else if (iPreco <= 774605000) { return 984; } + else if (iPreco <= 776180200) { return 985; } + else if (iPreco <= 777757000) { return 986; } + else if (iPreco <= 779335400) { return 987; } + else if (iPreco <= 780915400) { return 988; } + else if (iPreco <= 782497000) { return 989; } + else if (iPreco <= 784080200) { return 990; } + else if (iPreco <= 785665000) { return 991; } + else if (iPreco <= 787251400) { return 992; } + else if (iPreco <= 788839400) { return 993; } + else if (iPreco <= 790429000) { return 994; } + else if (iPreco <= 792020200) { return 995; } + else if (iPreco <= 793613000) { return 996; } + else if (iPreco <= 795207400) { return 997; } + else if (iPreco <= 796803400) { return 998; } + else if (iPreco <= 798401000) { return 999; } + else /*if (iPreco <= 800000200)*/ { return 1000; } + +/* + SISTEMA TRADICIONAL DE CALCULO DE NIVEL DE ITEM + + if (iPreco <= 1000) { return 1; } + else if (iPreco <= 1500) { return 2; } + else if (iPreco <= 2500) { return 3; } + else if (iPreco <= 3500) { return 4; } + else if (iPreco <= 5000) { return 5; } + else if (iPreco <= 6500) { return 6; } + else if (iPreco <= 9000) { return 7; } + else if (iPreco <= 12000) { return 8; } + else if (iPreco <= 15000) { return 9; } + else if (iPreco <= 19500) { return 10; } + else if (iPreco <= 25000) { return 11; } + else if (iPreco <= 30000) { return 12; } + else if (iPreco <= 35000) { return 13; } + else if (iPreco <= 40000) { return 14; } + else if (iPreco <= 50000) { return 15; } + else if (iPreco <= 65000) { return 16; } + else if (iPreco <= 75000) { return 17; } + else if (iPreco <= 90000) { return 18; } + else if (iPreco <= 110000) { return 19; } + else if (iPreco <= 130000) { return 20; } + else if (iPreco <= 250000) { return 21; } + else if (iPreco <= 500000) { return 22; } + else if (iPreco <= 750000) { return 23; } + else { + + int iCalculador = (((iPreco - 1000000) / 200000) + 24); + + if (NIVEL_MAXIMO_PERMITIDO < iCalculador) + { + return NIVEL_MAXIMO_PERMITIDO; + } + else + { + return iCalculador; + } + } +*/ +} +//****************************************************************************** + +//****************************************************************************** +int ObterNivelItem(object oItem) +{ + return ConverterPrecoNivelItem(GetGoldPieceValue(oItem)); +} +//atualizado abaixo +/*int ObterNivelItem(object oItem) +{ + int iNivel = NIVELConverterPrecoNivelItem( GetGoldPieceValue( oItem ) ); + if ( !( IPGetIsBludgeoningWeapon( oItem ) || IPGetIsMeleeWeapon( oItem ) || + IPGetIsRangedWeapon( oItem ) ) ) + { + iNivel *= NIVEL_CONSTANTE; + } + return iNivel; +}*/ +//****************************************************************************** + +//****************************************************************************** +int ObterExperienciaItem(object oItem) +{ + return ObterExperienciaNivel(ObterNivelItem(oItem)); +} +//****************************************************************************** diff --git a/35expandedabilities/nw_s1_aurablnda.ncs b/35expandedabilities/nw_s1_aurablnda.ncs new file mode 100644 index 00000000..376b84a9 Binary files /dev/null and b/35expandedabilities/nw_s1_aurablnda.ncs differ diff --git a/35expandedabilities/nw_s1_aurablnda.nss b/35expandedabilities/nw_s1_aurablnda.nss new file mode 100644 index 00000000..0babfaa1 --- /dev/null +++ b/35expandedabilities/nw_s1_aurablnda.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura of Blinding On Enter +//:: NW_S1_AuraBlndA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be blinded because of the + sheer ugliness or beauty of the creature. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD/3); + + effect eBlind = EffectBlindness(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M); + effect eLink = EffectLinkEffects(eBlind, eDur); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + //Entering object must make a will save or be blinded for the duration. + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_BLINDING)); + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + //Apply the blind effect and the VFX impact + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_auracoldc.ncs b/35expandedabilities/nw_s1_auracoldc.ncs new file mode 100644 index 00000000..841ab57b Binary files /dev/null and b/35expandedabilities/nw_s1_auracoldc.ncs differ diff --git a/35expandedabilities/nw_s1_auracoldc.nss b/35expandedabilities/nw_s1_auracoldc.nss new file mode 100644 index 00000000..49cd95e0 --- /dev/null +++ b/35expandedabilities/nw_s1_auracoldc.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Aura of Frost on Heartbeat +//:: NW_S1_AuraColdC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes frost damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nFrost = 1 + (nHD/3); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + + //Get the first target in the aura of cold + oTarget = GetFirstInPersistentObject(); + + while (GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_COLD)); + //Roll damage based on the creatures HD + nDamage = d4(nFrost); + //Make a Fortitude save for half + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_COLD)) + { + nDamage = nDamage / 2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + //Apply the VFX constant and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + //Get the next target in the aura of cold + oTarget = GetNextInPersistentObject(); + } +} diff --git a/35expandedabilities/nw_s1_auraelecc.ncs b/35expandedabilities/nw_s1_auraelecc.ncs new file mode 100644 index 00000000..6e622d99 Binary files /dev/null and b/35expandedabilities/nw_s1_auraelecc.ncs differ diff --git a/35expandedabilities/nw_s1_auraelecc.nss b/35expandedabilities/nw_s1_auraelecc.nss new file mode 100644 index 00000000..06994f44 --- /dev/null +++ b/35expandedabilities/nw_s1_auraelecc.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Aura of Electricity on Heartbeat +//:: NW_S1_AuraElecC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes electrical damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + int nHD = GetHitDice(oNPC); + int nZap = 1 + (nHD / 3); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 + nCHAMod + (nHD/2); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + + //Get first target in spell area + object oTarget = GetFirstInPersistentObject(); + while (GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + nDamage = d4(nZap); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_ELECTRICITY)); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY)) + { + nDamage = nDamage / 2; + } + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + //Apply the VFX impact and effects + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } +} diff --git a/35expandedabilities/nw_s1_aurafirec.ncs b/35expandedabilities/nw_s1_aurafirec.ncs new file mode 100644 index 00000000..50fe6329 Binary files /dev/null and b/35expandedabilities/nw_s1_aurafirec.ncs differ diff --git a/35expandedabilities/nw_s1_aurafirec.nss b/35expandedabilities/nw_s1_aurafirec.nss new file mode 100644 index 00000000..a6b96381 --- /dev/null +++ b/35expandedabilities/nw_s1_aurafirec.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Aura of Fire on Heartbeat +//:: NW_S1_AuraFireC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes fire damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetFirstInPersistentObject(); //:: Get first target in spell area + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nBurn = 1 + (nHD/3); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nDamSave; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + while(GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FIRE)); + //Roll damage + nDamage = d4(nBurn); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) + { + nDamage = nDamage / 2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } +} diff --git a/35expandedabilities/nw_s1_auramenca.ncs b/35expandedabilities/nw_s1_auramenca.ncs new file mode 100644 index 00000000..cfdaf28a Binary files /dev/null and b/35expandedabilities/nw_s1_auramenca.ncs differ diff --git a/35expandedabilities/nw_s1_auramenca.nss b/35expandedabilities/nw_s1_auramenca.nss new file mode 100644 index 00000000..e786aaa2 --- /dev/null +++ b/35expandedabilities/nw_s1_auramenca.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Aura of Menace On Enter +//:: NW_S1_AuraMencA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura all those that fail + a will save are stricken with Doom. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int nDuration = 1 + (GetHitDice(oNPC)/3); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (GetHitDice(oNPC)/2); + int nLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = PRCGetMetaMagicFeat(); + + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + effect eLink = CreateDoomEffectsLink(); + + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_MENACE)); + //Spell Resistance and Saving throw + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, TurnsToSeconds(nDuration)); + } + } +} diff --git a/35expandedabilities/nw_s1_auraprota.ncs b/35expandedabilities/nw_s1_auraprota.ncs new file mode 100644 index 00000000..468539b7 Binary files /dev/null and b/35expandedabilities/nw_s1_auraprota.ncs differ diff --git a/35expandedabilities/nw_s1_auraprota.nss b/35expandedabilities/nw_s1_auraprota.nss new file mode 100644 index 00000000..548f2840 --- /dev/null +++ b/35expandedabilities/nw_s1_auraprota.nss @@ -0,0 +1,35 @@ +//:://///////////////////////////////////////////// +//:: Aura of Protection: On Enter +//:: NW_S1_AuraProtA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Acts as a double strength Magic Circle against + evil and a Minor Globe for those friends in + the area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On:Jan 8, 2002, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +void main() +{ + //Declare major variables + effect eProt = CreateProtectionFromAlignmentLink(ALIGNMENT_EVIL); + effect eGlobe = EffectSpellLevelAbsorption(3, 0); + effect eDur = EffectVisualEffect(VFX_DUR_GLOBE_MINOR); + + effect eLink = EffectLinkEffects(eProt, eGlobe); + eLink = EffectLinkEffects(eLink, eDur); + + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + //Faction Check + if(GetIsFriend(oTarget, GetAreaOfEffectCreator())) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_aurastuna.ncs b/35expandedabilities/nw_s1_aurastuna.ncs new file mode 100644 index 00000000..279ae960 Binary files /dev/null and b/35expandedabilities/nw_s1_aurastuna.ncs differ diff --git a/35expandedabilities/nw_s1_aurastuna.nss b/35expandedabilities/nw_s1_aurastuna.nss new file mode 100644 index 00000000..03d0aae0 --- /dev/null +++ b/35expandedabilities/nw_s1_aurastuna.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura Stunning On Enter +//:: NW_S1_AuraStunA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be stunned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDuration = GetHitDice(oNPC); + int nDC = 10 + nCHAMod + (nDuration/2); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDeath = EffectStunned(); + effect eLink = EffectLinkEffects(eVis2, eDeath); + + nDuration = GetScaledDuration(nDuration, oTarget); + + if(!GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_STUN)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_auraunata.ncs b/35expandedabilities/nw_s1_auraunata.ncs new file mode 100644 index 00000000..adac269e Binary files /dev/null and b/35expandedabilities/nw_s1_auraunata.ncs differ diff --git a/35expandedabilities/nw_s1_auraunata.nss b/35expandedabilities/nw_s1_auraunata.nss new file mode 100644 index 00000000..a5970627 --- /dev/null +++ b/35expandedabilities/nw_s1_auraunata.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura of the Unnatural On Enter +//:: NW_S1_AuraMencA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura all animals are struck with + fear. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eFear = EffectFrightened(); + effect eLink = EffectLinkEffects(eVis, eFear); + object oTarget = GetEnteringObject(); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int nDuration = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nRacial = GetRacialType(oTarget); + int nDC = 10 + nCHAMod + (GetHitDice(oNPC)/2); + + if(GetIsEnemy(oTarget)) + { + nDuration = (nDuration / 3) + 1; + //Make a saving throw check + if(nRacial == RACIAL_TYPE_ANIMAL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_UNNATURAL)); + //if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) //:: This ability only affects animals & they don't get a save. + //{ + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + //} + } + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_aurauneaa.ncs b/35expandedabilities/nw_s1_aurauneaa.ncs new file mode 100644 index 00000000..f2ae3376 Binary files /dev/null and b/35expandedabilities/nw_s1_aurauneaa.ncs differ diff --git a/35expandedabilities/nw_s1_aurauneaa.nss b/35expandedabilities/nw_s1_aurauneaa.nss new file mode 100644 index 00000000..6f4a75bc --- /dev/null +++ b/35expandedabilities/nw_s1_aurauneaa.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Aura Unearthly Visage On Enter +//:: NW_S1_AuraUnEaA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be killed because of the + sheer ugliness or beauty of the creature. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + effect eDeath = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + if(GetIsEnemy(oTarget, oNPC)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_UNEARTHLY_VISAGE)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_barbrage.ncs b/35expandedabilities/nw_s1_barbrage.ncs new file mode 100644 index 00000000..ef8e5765 Binary files /dev/null and b/35expandedabilities/nw_s1_barbrage.ncs differ diff --git a/35expandedabilities/nw_s1_barbrage.nss b/35expandedabilities/nw_s1_barbrage.nss new file mode 100644 index 00000000..b8672757 --- /dev/null +++ b/35expandedabilities/nw_s1_barbrage.nss @@ -0,0 +1,434 @@ +//:://///////////////////////////////////////////// +//:: Barbarian Rage +//:: NW_S1_BarbRage +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Str and Con of the Barbarian increases, + Will Save are +2, AC -2. + Greater Rage starts at level 15. + + Updated: 2004-01-18 mr_bumpkin: Added bonuses for exceeding +12 stat cap + Updated: 2004-2-24 by Oni5115: Added Intimidating Rage +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +#include "moi_inc_moifunc" +#include "inc_addragebonus" +#include "inc_npc" +#include "psi_inc_psifunc" + +void main() +{ + object oPC = OBJECT_SELF; + + if(GetHasSpellEffect(SPELL_SPELL_RAGE)) + { + IncrementRemainingFeatUses(OBJECT_SELF, FEAT_BARBARIAN_RAGE); + FloatingTextStringOnCreature("You can't use Barbarian Rage and Spell Rage at the same time.", OBJECT_SELF, FALSE); + return; + } + + if(!GetHasFeatEffect(FEAT_BARBARIAN_RAGE) && !GetHasSpellEffect(GetSpellId())) + { + int nBBC = GetLevelByClass(CLASS_TYPE_BLACK_BLOOD_CULTIST); + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN) + + GetLevelByClass(CLASS_TYPE_RUNESCARRED) + + GetLevelByClass(CLASS_TYPE_BATTLERAGER) + + GetLevelByClass(CLASS_TYPE_PRC_EYE_OF_GRUUMSH) + + nBBC + + GetLevelByClass(CLASS_TYPE_RAGE_MAGE); + + GetLevelByClass(CLASS_TYPE_WARCHIEF, oPC); + + GetLevelByClass(CLASS_TYPE_ORC_WARLORD, oPC); + + GetLevelByClass(CLASS_TYPE_FRE_BERSERKER, oPC); + + GetLevelByClass(CLASS_TYPE_LEGENDARY_DREADNOUGHT, oPC); + + GetLevelByClass(CLASS_TYPE_TOTEM_RAGER, oPC); + int iStr, iCon, iAC; + int nSave, nBonusEss; + int nTotem = GetLevelByClass(CLASS_TYPE_TOTEM_RAGER, oPC); + + iAC = 2; +//edit rafael + if ((nLevel >= 180) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 25; + iCon = 25; + nSave = 21; + } + if ((nLevel >= 170) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 24; + iCon = 24; + nSave = 20; + } + if ((nLevel >= 160) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 23; + iCon = 23; + nSave = 19; + } + if ((nLevel >= 150) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 22; + iCon = 22; + nSave = 18; + } + if ((nLevel >= 140) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 21; + iCon = 21; + nSave = 17; + } + if ((nLevel >= 130) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 20; + iCon = 20; + nSave = 16; + } + if ((nLevel >= 120) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 19; + iCon = 19; + nSave = 15; + } + if ((nLevel >= 110) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 18; + iCon = 18; + nSave = 14; + } + if ((nLevel >= 100) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 17; + iCon = 17; + nSave = 13; + } + + if ((nLevel >= 90) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 16; + iCon = 16; + nSave = 12; + } + + if ((nLevel >= 80) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 15; + iCon = 15; + nSave = 11; + } + + if ((nLevel >= 70) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 14; + iCon = 14; + nSave = 10; + } + + if ((nLevel >= 60) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 13; + iCon = 13; + nSave = 9; + } + + if ((nLevel >= 50) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 12; + iCon = 12; + nSave = 8; + } + + if ((nLevel >= 40) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 11; + iCon = 11; + nSave = 7; + } + + if ((nLevel >= 30) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 10; + iCon = 10; + nSave = 6; + } + + if ((nLevel >= 20) && (GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE, OBJECT_SELF))) + { + iStr = 9; + iCon = 9; + nSave = 5; + } + + +//fim edit rafael 2021 junho + //Lock: Added compatibility for PRC Mighty Rage ability + if(nLevel > 14) + { + if(GetHasFeat(FEAT_PRC_EPIC_MIGHT_RAGE)) + { + iStr = 8; + iCon = 8; + nSave = 4; + } + else + { + iStr = 6; + iCon = 6; + nSave = 3; + } + } + else + { + iStr = 4; + iCon = 4; + nSave = 2; + } + + // Eye of Gruumsh ability. Additional +4 Str and -2 AC. + if(GetHasFeat(FEAT_SWING_BLINDLY)) + { + iStr += 4; + iAC += 2; + } + + // +2 Str/Con -2 AC + if(GetHasFeat(FEAT_RECKLESS_RAGE)) + { + iStr += 2; + iCon += 2; + iAC += 2; + } + // +2 Con + if(GetHasFeat(FEAT_ETTERCAP_BERSERKER)) + iCon += 2; + + //(Patch 1.70 - if not silenced) play a random voice chat instead of just VOICE_CHAT_BATTLECRY1 + if(!PRCGetHasEffect(EFFECT_TYPE_SILENCE)) + { + int iVoice = d3(1); + switch(iVoice) + { + case 1: iVoice = VOICE_CHAT_BATTLECRY1; break; + case 2: iVoice = VOICE_CHAT_BATTLECRY2; break; + case 3: iVoice = VOICE_CHAT_BATTLECRY3; break; + } + PlayVoiceChat(iVoice); + } + + //Determine the duration by getting the con modifier after being modified + //Patch 1.70 - duration calculation was bugged + int nCon = 3 + ((GetAbilityScore(OBJECT_SELF, ABILITY_CONSTITUTION) - 10 + iCon)/2); + effect eLink = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + eLink = EffectLinkEffects(eLink, EffectAbilityIncrease(ABILITY_CONSTITUTION, iCon)); + eLink = EffectLinkEffects(eLink, EffectAbilityIncrease(ABILITY_STRENGTH, iStr)); + eLink = EffectLinkEffects(eLink, EffectSavingThrowIncrease(SAVING_THROW_WILL, nSave)); + eLink = EffectLinkEffects(eLink, EffectACDecrease(iAC, AC_DODGE_BONUS)); + + // Blazing Berserker + if(GetHasFeat(FEAT_BLAZING_BERSERKER)) + { + eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD)); + eLink = EffectLinkEffects(eLink, EffectDamageImmunityDecrease(DAMAGE_TYPE_COLD, 50)); + eLink = EffectLinkEffects(eLink, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 100)); + } + // Frozen Berserker + if(GetHasFeat(FEAT_FROZEN_BERSERKER)) + { + eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD)); + eLink = EffectLinkEffects(eLink, EffectDamageImmunityDecrease(DAMAGE_TYPE_FIRE, 50)); + eLink = EffectLinkEffects(eLink, EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 100)); + } + // Ice Troll Berserker + if(GetHasFeat(FEAT_ICE_TROLL_BERSERKER)) + { + int nBonus = 2; + if(nLevel > 14) nBonus = 4; + eLink = EffectLinkEffects(eLink, EffectACIncrease(nBonus, AC_NATURAL_BONUS)); + } + // Cobalt Rage + int nEssentia = GetEssentiaInvestedFeat(oPC, FEAT_COBALT_RAGE); + // Totem Rage from Totem Rager + if (nTotem) + { + int nTotemRage = GetMaxEssentiaCapacityFeat(oPC) - nEssentia; + int nExtraEss = max(nTotem/2, 1); + int nBoost; + if (nExtraEss >= nTotemRage) + { + nBonusEss = nExtraEss - nTotemRage; + nEssentia += nTotemRage; + } + else + nEssentia += nExtraEss; + } + if (nEssentia) + { + eLink = EffectLinkEffects(eLink, EffectSavingThrowIncrease(SAVING_THROW_WILL, nEssentia)); + eLink = EffectLinkEffects(eLink, EffectDamageIncrease(IPGetDamageBonusConstantFromNumber(nEssentia), DAMAGE_TYPE_BASE_WEAPON)); + } + + //Make effect extraordinary + eLink = ExtraordinaryEffect(eLink); + effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX + + SignalEvent(oPC, EventSpellCastAt(oPC, SPELLABILITY_BARBARIAN_RAGE, FALSE)); + + if(nCon > 0) + { + // 2004-01-18 mr_bumpkin: determine the ability scores before adding bonuses, so the values + // can be read in by the GiveExtraRageBonuses() function below. + int StrBeforeBonuses = GetAbilityScore(oPC, ABILITY_STRENGTH); + int ConBeforeBonuses = GetAbilityScore(oPC, ABILITY_CONSTITUTION); + + float fDuration = RoundsToSeconds(nCon); + fDuration += GetHasFeat(FEAT_EXTENDED_RAGE, oPC) ? 30.0 : 0.0; + if (nEssentia > 5 && nTotem >= 5) fDuration += 6.0 * (nEssentia - 5); + + // Terrifying Rage + if(GetHasFeat(FEAT_EPIC_TERRIFYING_RAGE)) + { + effect eAOE = EffectAreaOfEffect(AOE_MOB_FEAR, "x2_s2_terrage_A"); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eAOE), oPC, fDuration); + } + + // Frostrager + int nFrost = GetLevelByClass(CLASS_TYPE_FROSTRAGER, oPC); + object oWeapL = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oPC); + string sWeapType = "PRC_UNARMED_B"; + if(nFrost>0 && GetBaseItemType(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) == BASE_ITEM_INVALID && + GetIsObjectValid(oWeapL) && GetTag(oWeapL) == sWeapType) //Only applies when unarmed and you actually have a creature weapon + { + // Record that we're Frostraging + SetLocalInt(oPC, "Frostrage", TRUE); + DelayCommand(fDuration, DeleteLocalInt(oPC, "Frostrage")); + int nFrostAC = 4; + int nFrostDamage = IP_CONST_DAMAGEBONUS_1d4; + + if(nFrost>3) //Improved Frost Rage + { + nFrostAC = 6; + nFrostDamage = IP_CONST_DAMAGEBONUS_1d6; + } + + eLink = EffectLinkEffects(eLink, EffectACIncrease(nFrostAC, AC_NATURAL_BONUS)); + AddItemProperty(DURATION_TYPE_TEMPORARY,ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_COLD,nFrostDamage),oWeapL,fDuration); + } + else if (nFrost>0) + FloatingTextStringOnCreature("Frostrage failed, invalid weapon", oPC, FALSE); + + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, fDuration); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC); + + // Totem Rage bonus Essentia + if (nBonusEss) + { + SetTemporaryEssentia(oPC, nBonusEss); + DelayCommand(fDuration, SetTemporaryEssentia(oPC, nBonusEss * -1)); + FloatingTextStringOnCreature("Totem Rage has granted you "+IntToString(nBonusEss)+" temporary essentia", oPC, FALSE); + } + + // Shared Fury + if(GetHasFeat(FEAT_SHARED_FURY, oPC)) + { + object oComp = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oPC), TRUE, OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oComp)) + { + if(GetMasterNPC(oComp) == oPC && GetAssociateTypeNPC(oComp) == ASSOCIATE_TYPE_ANIMALCOMPANION) + { + PRCRemoveEffectsFromSpell(oComp, SPELLABILITY_BARBARIAN_RAGE); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oComp, fDuration); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oComp); + } + oComp = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oPC), TRUE, OBJECT_TYPE_CREATURE); + } + } + + // 2004-2-24 Oni5115: Intimidating Rage + if(GetHasFeat(FEAT_INTIMIDATING_RAGE, oPC)) + { + //Finds nearest visible enemy within 30 ft. + object oTarget = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oPC, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN); + if(GetDistanceBetween(oPC, oTarget) < FeetToMeters(30.0)) + { + // Will save DC 10 + 1/2 Char level + Cha mod + int saveDC = 10 + (GetHitDice(oPC)/2) + GetAbilityModifier(ABILITY_CHARISMA, oPC); + int nResult = WillSave(oTarget, saveDC, SAVING_THROW_TYPE_NONE); + if(!nResult) + { + // Same effect as Doom Spell + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectShaken(), oTarget, fDuration); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DOOM), oTarget); + } + } + } + + // Thundering Rage + if(GetHasFeat(FEAT_EPIC_THUNDERING_RAGE, oPC)) + { + object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC); + if(GetIsObjectValid(oWeapon)) + { + IPSafeAddItemProperty(oWeapon, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d6), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE,TRUE); + IPSafeAddItemProperty(oWeapon, ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + IPSafeAddItemProperty(oWeapon, ItemPropertyOnHitProps(IP_CONST_ONHIT_DEAFNESS,IP_CONST_ONHIT_SAVEDC_20,IP_CONST_ONHIT_DURATION_25_PERCENT_3_ROUNDS), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + } + + oWeapon = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); + if(GetIsObjectValid(oWeapon)) + { + IPSafeAddItemProperty(oWeapon, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d6), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE,TRUE); + IPSafeAddItemProperty(oWeapon,ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + } + } + + // Black Blood Cultist, don't trigger at 10th level because it becomes permanent then + if (10 > nBBC && nBBC > 0) + { + int nClawDamage = IP_CONST_MONSTERDAMAGE_1d6; + int nBiteDamage = IP_CONST_MONSTERDAMAGE_1d4; + string sResRef = "prc_claw_1d6m_"; + if (nBBC >= 7) + { + nClawDamage = IP_CONST_MONSTERDAMAGE_1d8; + nBiteDamage = IP_CONST_MONSTERDAMAGE_1d6; + sResRef = "prc_claw_1d8m_"; + } + + // Create the creature weapon & add the base damage + object oLClaw = GetPsionicCreatureWeapon(oPC, "PRC_UNARMED_SP", INVENTORY_SLOT_CWEAPON_L, fDuration); + object oRClaw = GetPsionicCreatureWeapon(oPC, "PRC_UNARMED_SP", INVENTORY_SLOT_CWEAPON_R, fDuration); + AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyMonsterDamage(nClawDamage), oLClaw, fDuration); + AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyMonsterDamage(nClawDamage), oRClaw, fDuration); + if (nBBC >= 3) + { + object oBite = GetPsionicCreatureWeapon(oPC, "prc_bw0_bite_t", INVENTORY_SLOT_CWEAPON_B, fDuration); + AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyMonsterDamage(nBiteDamage), oBite, fDuration); + } + if (nBBC >= 6) // Rend, see inc_rend and prc_onhitcast + { + IPSafeAddItemProperty(oLClaw, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 99999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE); + IPSafeAddItemProperty(oRClaw, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 99999.0, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE); + } + + sResRef += GetAffixForSize(PRCGetCreatureSize(oPC)); + AddNaturalPrimaryWeapon(oPC, sResRef, 2, TRUE); + DelayCommand(6.0f, NaturalPrimaryWeaponTempCheck(oPC, oPC, GetSpellId(), FloatToInt(fDuration) / 6, sResRef)); + AddNaturalSecondaryWeapon(oPC, "prc_bw0_bite_t", 1); + DelayCommand(6.0f, NaturalSecondaryWeaponTempCheck(oPC, oPC, GetSpellId(), FloatToInt(fDuration) / 6, "prc_bw0_bite_t")); + } + + // 2004-01-18 mr_bumpkin: Adds special bonuses to those barbarians who are restricted by the + // +12 attribute bonus cap, to make up for them. :) + // The delay is because you have to delay the command if you want the function to be able + // to determine what the ability scores become after adding the bonuses to them. + DelayCommand(0.1, GiveExtraRageBonuses(nCon, StrBeforeBonuses, ConBeforeBonuses, iStr, iCon, nSave, DAMAGE_TYPE_BASE_WEAPON, oPC)); + + } + } +} diff --git a/35expandedabilities/nw_s1_bltacid.ncs b/35expandedabilities/nw_s1_bltacid.ncs new file mode 100644 index 00000000..9e9d57ba Binary files /dev/null and b/35expandedabilities/nw_s1_bltacid.ncs differ diff --git a/35expandedabilities/nw_s1_bltacid.nss b/35expandedabilities/nw_s1_bltacid.nss new file mode 100644 index 00000000..ef53a16a --- /dev/null +++ b/35expandedabilities/nw_s1_bltacid.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Acid +//:: NW_S1_BltAcid +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt; + + //ankheg + if(GetAppearanceType(oNPC) == APPEARANCE_TYPE_BEETLE_SLICER) + { + nDamage = d4(4); + } + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ACID)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_bltcharm.ncs b/35expandedabilities/nw_s1_bltcharm.ncs new file mode 100644 index 00000000..60db2a78 Binary files /dev/null and b/35expandedabilities/nw_s1_bltcharm.ncs differ diff --git a/35expandedabilities/nw_s1_bltcharm.nss b/35expandedabilities/nw_s1_bltcharm.nss new file mode 100644 index 00000000..df11d653 --- /dev/null +++ b/35expandedabilities/nw_s1_bltcharm.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Charm +//:: NW_S1_BltCharm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_IMP_CHARM); + effect eBolt = EffectCharmed(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_CHARM)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_bltchrdr.ncs b/35expandedabilities/nw_s1_bltchrdr.ncs new file mode 100644 index 00000000..d86707e7 Binary files /dev/null and b/35expandedabilities/nw_s1_bltchrdr.ncs differ diff --git a/35expandedabilities/nw_s1_bltchrdr.nss b/35expandedabilities/nw_s1_bltchrdr.nss new file mode 100644 index 00000000..e7345802 --- /dev/null +++ b/35expandedabilities/nw_s1_bltchrdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Charisma Drain +//:: NW_S1_BltChrDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fortitude save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD / 3; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_CHARISMA)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_CHARISMA, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltcold.ncs b/35expandedabilities/nw_s1_bltcold.ncs new file mode 100644 index 00000000..373a803b Binary files /dev/null and b/35expandedabilities/nw_s1_bltcold.ncs differ diff --git a/35expandedabilities/nw_s1_bltcold.nss b/35expandedabilities/nw_s1_bltcold.nss new file mode 100644 index 00000000..657f0fe6 --- /dev/null +++ b/35expandedabilities/nw_s1_bltcold.nss @@ -0,0 +1,60 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Cold +//:: NW_S1_BltCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_COLD)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_COLD); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_bltcondr.ncs b/35expandedabilities/nw_s1_bltcondr.ncs new file mode 100644 index 00000000..e8c357f8 Binary files /dev/null and b/35expandedabilities/nw_s1_bltcondr.ncs differ diff --git a/35expandedabilities/nw_s1_bltcondr.nss b/35expandedabilities/nw_s1_bltcondr.nss new file mode 100644 index 00000000..9d85f042 --- /dev/null +++ b/35expandedabilities/nw_s1_bltcondr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Constitution Drain +//:: NW_S1_BltConDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD /3); + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_CONSTITUTION)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_CONSTITUTION, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltconf.ncs b/35expandedabilities/nw_s1_bltconf.ncs new file mode 100644 index 00000000..914f4a12 Binary files /dev/null and b/35expandedabilities/nw_s1_bltconf.ncs differ diff --git a/35expandedabilities/nw_s1_bltconf.nss b/35expandedabilities/nw_s1_bltconf.nss new file mode 100644 index 00000000..5bed7dc0 --- /dev/null +++ b/35expandedabilities/nw_s1_bltconf.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Confuse +//:: NW_S1_BltConf +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis2 = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eBolt = EffectConfused(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_CONFUSE)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_bltdaze.ncs b/35expandedabilities/nw_s1_bltdaze.ncs new file mode 100644 index 00000000..708985f1 Binary files /dev/null and b/35expandedabilities/nw_s1_bltdaze.ncs differ diff --git a/35expandedabilities/nw_s1_bltdaze.nss b/35expandedabilities/nw_s1_bltdaze.nss new file mode 100644 index 00000000..68d15c70 --- /dev/null +++ b/35expandedabilities/nw_s1_bltdaze.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Daze +//:: NW_S1_BltDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eBolt = EffectDazed(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DAZE)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/35expandedabilities/nw_s1_bltdeath.ncs b/35expandedabilities/nw_s1_bltdeath.ncs new file mode 100644 index 00000000..c1ecd7d8 Binary files /dev/null and b/35expandedabilities/nw_s1_bltdeath.ncs differ diff --git a/35expandedabilities/nw_s1_bltdeath.nss b/35expandedabilities/nw_s1_bltdeath.nss new file mode 100644 index 00000000..e2cbcd73 --- /dev/null +++ b/35expandedabilities/nw_s1_bltdeath.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Death +//:: NW_S1_BltDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eBolt = EffectDeath(); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DEATH)); + //Make a saving throw check + if(TouchAttackRanged(oTarget)) + { + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} + diff --git a/35expandedabilities/nw_s1_bltdexdr.ncs b/35expandedabilities/nw_s1_bltdexdr.ncs new file mode 100644 index 00000000..ecc29838 Binary files /dev/null and b/35expandedabilities/nw_s1_bltdexdr.ncs differ diff --git a/35expandedabilities/nw_s1_bltdexdr.nss b/35expandedabilities/nw_s1_bltdexdr.nss new file mode 100644 index 00000000..4ef34d8b --- /dev/null +++ b/35expandedabilities/nw_s1_bltdexdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Dexterity Drain +//:: NW_S1_BltDexDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_DEXTERITY)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_DEXTERITY, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltdisese.ncs b/35expandedabilities/nw_s1_bltdisese.ncs new file mode 100644 index 00000000..8580d056 Binary files /dev/null and b/35expandedabilities/nw_s1_bltdisese.ncs differ diff --git a/35expandedabilities/nw_s1_bltdisese.nss b/35expandedabilities/nw_s1_bltdisese.nss new file mode 100644 index 00000000..6513a061 --- /dev/null +++ b/35expandedabilities/nw_s1_bltdisese.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Disease +//:: NW_S1_BltDisease +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to infect + the target with a disease. The disease used + is chosen based upon the racial type of the + caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(oNPC); + int nDisease; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DISEASE)); + + //Here we use the racial type of the attacker to select an + //appropriate disease. + switch (nRacial) + { + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + nDisease = DISEASE_FILTH_FEVER; + break; + case RACIAL_TYPE_OUTSIDER: + if(GetTag(oNPC) == "NW_SLAADRED") + { + nDisease = DISEASE_RED_SLAAD_EGGS; + } + else + { + nDisease = DISEASE_DEMON_FEVER; + } + break; + case RACIAL_TYPE_MAGICAL_BEAST: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + case RACIAL_TYPE_ABERRATION: + nDisease = DISEASE_BLINDING_SICKNESS; + break; + default: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + } + //Assign effect and chosen disease + effect eBolt = EffectDisease(nDisease); + //Make the ranged touch attack. + if (TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltdomn.ncs b/35expandedabilities/nw_s1_bltdomn.ncs new file mode 100644 index 00000000..ab8a4bea Binary files /dev/null and b/35expandedabilities/nw_s1_bltdomn.ncs differ diff --git a/35expandedabilities/nw_s1_bltdomn.nss b/35expandedabilities/nw_s1_bltdomn.nss new file mode 100644 index 00000000..5027b454 --- /dev/null +++ b/35expandedabilities/nw_s1_bltdomn.nss @@ -0,0 +1,53 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Dominated +//:: NW_S1_BltDomn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S); + effect eBolt = EffectDominated(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis2); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DOMINATE)); + + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltfire.ncs b/35expandedabilities/nw_s1_bltfire.ncs new file mode 100644 index 00000000..cf13feaf Binary files /dev/null and b/35expandedabilities/nw_s1_bltfire.ncs differ diff --git a/35expandedabilities/nw_s1_bltfire.nss b/35expandedabilities/nw_s1_bltfire.nss new file mode 100644 index 00000000..4f7a4236 --- /dev/null +++ b/35expandedabilities/nw_s1_bltfire.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Fire +//:: NW_S1_BoltFire +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_FIRE)); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE); + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_bltintdr.ncs b/35expandedabilities/nw_s1_bltintdr.ncs new file mode 100644 index 00000000..33b3da46 Binary files /dev/null and b/35expandedabilities/nw_s1_bltintdr.ncs differ diff --git a/35expandedabilities/nw_s1_bltintdr.nss b/35expandedabilities/nw_s1_bltintdr.nss new file mode 100644 index 00000000..f3ffbad8 --- /dev/null +++ b/35expandedabilities/nw_s1_bltintdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Intelligence Drain +//:: NW_S1_BltIntDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_INTELLIGENCE)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltknckd.ncs b/35expandedabilities/nw_s1_bltknckd.ncs new file mode 100644 index 00000000..5c098196 Binary files /dev/null and b/35expandedabilities/nw_s1_bltknckd.ncs differ diff --git a/35expandedabilities/nw_s1_bltknckd.nss b/35expandedabilities/nw_s1_bltknckd.nss new file mode 100644 index 00000000..68169647 --- /dev/null +++ b/35expandedabilities/nw_s1_bltknckd.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Knockdown +//:: NW_S1_BltKnckD +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eBolt = EffectKnockdown(); + effect eDam = EffectDamage(d6(), DAMAGE_TYPE_BLUDGEONING); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_KNOCKDOWN)); + + //Make a saving throw check + if (!/*Reflex Save*/ PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBolt, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltlightn.ncs b/35expandedabilities/nw_s1_bltlightn.ncs new file mode 100644 index 00000000..93155270 Binary files /dev/null and b/35expandedabilities/nw_s1_bltlightn.ncs differ diff --git a/35expandedabilities/nw_s1_bltlightn.nss b/35expandedabilities/nw_s1_bltlightn.nss new file mode 100644 index 00000000..024eafbe --- /dev/null +++ b/35expandedabilities/nw_s1_bltlightn.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Lightning +//:: NW_S1_BltLightn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Does 1d6 per level to a single target. Reflex + save for half +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 10, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_HAND); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_LIGHTNING)); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY); + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, oTarget, 1.7); + } + } +} diff --git a/35expandedabilities/nw_s1_bltlvldr.ncs b/35expandedabilities/nw_s1_bltlvldr.ncs new file mode 100644 index 00000000..7f6d6ea1 Binary files /dev/null and b/35expandedabilities/nw_s1_bltlvldr.ncs differ diff --git a/35expandedabilities/nw_s1_bltlvldr.nss b/35expandedabilities/nw_s1_bltlvldr.nss new file mode 100644 index 00000000..e3f14cab --- /dev/null +++ b/35expandedabilities/nw_s1_bltlvldr.nss @@ -0,0 +1,49 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Level Drain +//:: NW_S1_BltLvlDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/5; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt = EffectNegativeLevel(1); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_LEVEL_DRAIN)); + + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + //eBolt = LEVEL DRAIN EFFECT + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltparal.ncs b/35expandedabilities/nw_s1_bltparal.ncs new file mode 100644 index 00000000..352beb7c Binary files /dev/null and b/35expandedabilities/nw_s1_bltparal.ncs differ diff --git a/35expandedabilities/nw_s1_bltparal.nss b/35expandedabilities/nw_s1_bltparal.nss new file mode 100644 index 00000000..e4a6b59a --- /dev/null +++ b/35expandedabilities/nw_s1_bltparal.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Paralyze +//:: NW_S1_BltParal +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eBolt = EffectParalyze(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_PARALYZE)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/35expandedabilities/nw_s1_bltpoison.ncs b/35expandedabilities/nw_s1_bltpoison.ncs new file mode 100644 index 00000000..d7368cb1 Binary files /dev/null and b/35expandedabilities/nw_s1_bltpoison.ncs differ diff --git a/35expandedabilities/nw_s1_bltpoison.nss b/35expandedabilities/nw_s1_bltpoison.nss new file mode 100644 index 00000000..8a34aca8 --- /dev/null +++ b/35expandedabilities/nw_s1_bltpoison.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Poison +//:: NW_S1_BltPoison.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Must make a ranged touch attack. If successful + the target is struck down with poison that + scales with level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(OBJECT_SELF); + int nPoison; + + effect ePoison; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_POISON)); + + //Determine the poison type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + if (nHD <= 9) + { + nPoison = POISON_QUASIT_VENOM; + } + else if (nHD > 9 && nHD < 13) + { + nPoison = POISON_BEBILITH_VENOM; + } + else if (nHD >= 13) + { + nPoison = POISON_PIT_FIEND_ICHOR; + } + break; + case RACIAL_TYPE_VERMIN: + if (nHD < 3) + { + nPoison = POISON_TINY_SPIDER_VENOM; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_SMALL_SPIDER_VENOM; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_MEDIUM_SPIDER_VENOM; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_HUGE_SPIDER_VENOM; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_GARGANTUAN_SPIDER_VENOM; + } + else if (nHD >= 18) + { + nPoison = POISON_COLOSSAL_SPIDER_VENOM; + } + break; + default: + if (nHD < 3) + { + nPoison = POISON_NIGHTSHADE; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_BLADE_BANE; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_BLOODROOT; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_LICH_DUST; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_DARK_REAVER_POWDER; + } + else if (nHD >= 18 ) + { + nPoison = POISON_BLACK_LOTUS_EXTRACT; + } + + break; + } + //Make a ranged touch attack + if (TouchAttackRanged (oTarget)) + { + ePoison = EffectPoison(nPoison); + //Apply effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget); + } +} + diff --git a/35expandedabilities/nw_s1_bltshards.ncs b/35expandedabilities/nw_s1_bltshards.ncs new file mode 100644 index 00000000..b260bb75 Binary files /dev/null and b/35expandedabilities/nw_s1_bltshards.ncs differ diff --git a/35expandedabilities/nw_s1_bltshards.nss b/35expandedabilities/nw_s1_bltshards.nss new file mode 100644 index 00000000..1b96e2bc --- /dev/null +++ b/35expandedabilities/nw_s1_bltshards.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Shards +//:: NW_S1_BltShard +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_SHARDS)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_PIERCING, DAMAGE_POWER_PLUS_ONE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_bltslow.ncs b/35expandedabilities/nw_s1_bltslow.ncs new file mode 100644 index 00000000..779dedd9 Binary files /dev/null and b/35expandedabilities/nw_s1_bltslow.ncs differ diff --git a/35expandedabilities/nw_s1_bltslow.nss b/35expandedabilities/nw_s1_bltslow.nss new file mode 100644 index 00000000..bf4813a1 --- /dev/null +++ b/35expandedabilities/nw_s1_bltslow.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Slow +//:: NW_S1_BltSlow +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex save is + needed to or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: June 18 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SLOW); + effect eBolt = EffectSlow(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_SLOW)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltstrdr.ncs b/35expandedabilities/nw_s1_bltstrdr.ncs new file mode 100644 index 00000000..7ecf22e8 Binary files /dev/null and b/35expandedabilities/nw_s1_bltstrdr.ncs differ diff --git a/35expandedabilities/nw_s1_bltstrdr.nss b/35expandedabilities/nw_s1_bltstrdr.nss new file mode 100644 index 00000000..dd03161d --- /dev/null +++ b/35expandedabilities/nw_s1_bltstrdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Strength Drain +//:: NW_S1_BltStrDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_STRENGTH)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_STRENGTH, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_bltstun.ncs b/35expandedabilities/nw_s1_bltstun.ncs new file mode 100644 index 00000000..0b8993e3 Binary files /dev/null and b/35expandedabilities/nw_s1_bltstun.ncs differ diff --git a/35expandedabilities/nw_s1_bltstun.nss b/35expandedabilities/nw_s1_bltstun.nss new file mode 100644 index 00000000..1d770089 --- /dev/null +++ b/35expandedabilities/nw_s1_bltstun.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Stun +//:: NW_S1_BltStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eBolt = EffectStunned(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_STUN)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_bltweb.ncs b/35expandedabilities/nw_s1_bltweb.ncs new file mode 100644 index 00000000..25d622a0 Binary files /dev/null and b/35expandedabilities/nw_s1_bltweb.ncs differ diff --git a/35expandedabilities/nw_s1_bltweb.nss b/35expandedabilities/nw_s1_bltweb.nss new file mode 100644 index 00000000..9ed210a0 --- /dev/null +++ b/35expandedabilities/nw_s1_bltweb.nss @@ -0,0 +1,44 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Web +//:: NW_S1_BltWeb +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Glues a single target to the ground with + sticky strands of webbing. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 28, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nCount = 1 + (nHD /2); + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_DUR_WEB); + effect eStick = EffectEntangle(); + effect eLink = EffectLinkEffects(eVis, eStick); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_WEB)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/35expandedabilities/nw_s1_bltwisdr.ncs b/35expandedabilities/nw_s1_bltwisdr.ncs new file mode 100644 index 00000000..f357cf1b Binary files /dev/null and b/35expandedabilities/nw_s1_bltwisdr.ncs differ diff --git a/35expandedabilities/nw_s1_bltwisdr.nss b/35expandedabilities/nw_s1_bltwisdr.nss new file mode 100644 index 00000000..49643c08 --- /dev/null +++ b/35expandedabilities/nw_s1_bltwisdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Wisdom Drain +//:: NW_S1_BltWisDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD /3); + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_WISDOM)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_WISDOM, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_coneacid.ncs b/35expandedabilities/nw_s1_coneacid.ncs new file mode 100644 index 00000000..bad07028 Binary files /dev/null and b/35expandedabilities/nw_s1_coneacid.ncs differ diff --git a/35expandedabilities/nw_s1_coneacid.nss b/35expandedabilities/nw_s1_coneacid.nss new file mode 100644 index 00000000..2ab7dcfc --- /dev/null +++ b/35expandedabilities/nw_s1_coneacid.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Cone: Acid +//:: NW_S1_ConeAcid +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_ACID)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ACID); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + diff --git a/35expandedabilities/nw_s1_conecold.ncs b/35expandedabilities/nw_s1_conecold.ncs new file mode 100644 index 00000000..21c9e7e2 Binary files /dev/null and b/35expandedabilities/nw_s1_conecold.ncs differ diff --git a/35expandedabilities/nw_s1_conecold.nss b/35expandedabilities/nw_s1_conecold.nss new file mode 100644 index 00000000..24cc011b --- /dev/null +++ b/35expandedabilities/nw_s1_conecold.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Cone: Cold +//:: NW_S1_ConeCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_COLD)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + diff --git a/35expandedabilities/nw_s1_conedisea.ncs b/35expandedabilities/nw_s1_conedisea.ncs new file mode 100644 index 00000000..3bac3ebd Binary files /dev/null and b/35expandedabilities/nw_s1_conedisea.ncs differ diff --git a/35expandedabilities/nw_s1_conedisea.nss b/35expandedabilities/nw_s1_conedisea.nss new file mode 100644 index 00000000..9abedbb0 --- /dev/null +++ b/35expandedabilities/nw_s1_conedisea.nss @@ -0,0 +1,99 @@ +//:://///////////////////////////////////////////// +//:: Cone: Disease +//:: NW_S1_ConeDisea +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature spits out a cone of disease that cannot + be avoided unless a Reflex save is made. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(oNPC); + int nDisease; + + location lTargetLocation = GetSpellTargetLocation(); + + float fDelay; + + effect eCone = EffectDisease(nDisease); + effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S); + + + //Determine the disease type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + nDisease = DISEASE_DEMON_FEVER; + break; + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + if(nHD <= 3) + { + nDisease = DISEASE_ZOMBIE_CREEP; + } + else if (nHD > 3 && nHD <= 10) + { + nDisease = DISEASE_GHOUL_ROT; + } + else if(nHD > 10) + { + nDisease = DISEASE_MUMMY_ROT; + } + default: + if(nHD <= 3) + { + nDisease = DISEASE_MINDFIRE; + } + else if (nHD > 3 && nHD <= 10) + { + nDisease = DISEASE_RED_ACHE; + } + else if(nHD > 10) + { + nDisease = DISEASE_SHAKES; + } + + + break; + } + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_DISEASE)); + //Get the delay time + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + + } +} + + + diff --git a/35expandedabilities/nw_s1_coneelec.ncs b/35expandedabilities/nw_s1_coneelec.ncs new file mode 100644 index 00000000..f1cfdc77 Binary files /dev/null and b/35expandedabilities/nw_s1_coneelec.ncs differ diff --git a/35expandedabilities/nw_s1_coneelec.nss b/35expandedabilities/nw_s1_coneelec.nss new file mode 100644 index 00000000..a4fa75ba --- /dev/null +++ b/35expandedabilities/nw_s1_coneelec.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Cone: Lightning +//:: NW_S1_ConeElec +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminates from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNPC, BODY_NODE_HAND); + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_LIGHTNING)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + diff --git a/35expandedabilities/nw_s1_conesonic.ncs b/35expandedabilities/nw_s1_conesonic.ncs new file mode 100644 index 00000000..f7b256b4 Binary files /dev/null and b/35expandedabilities/nw_s1_conesonic.ncs differ diff --git a/35expandedabilities/nw_s1_conesonic.nss b/35expandedabilities/nw_s1_conesonic.nss new file mode 100644 index 00000000..79c1d466 --- /dev/null +++ b/35expandedabilities/nw_s1_conesonic.nss @@ -0,0 +1,75 @@ +//:://///////////////////////////////////////////// +//:: Cone: Sonic +//:: NW_S1_ConeSonic +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_SONIC)); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,DAMAGE_TYPE_SONIC); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_dragacid.ncs b/35expandedabilities/nw_s1_dragacid.ncs new file mode 100644 index 00000000..9a9f1091 Binary files /dev/null and b/35expandedabilities/nw_s1_dragacid.ncs differ diff --git a/35expandedabilities/nw_s1_dragacid.nss b/35expandedabilities/nw_s1_dragacid.nss new file mode 100644 index 00000000..94cbc97c --- /dev/null +++ b/35expandedabilities/nw_s1_dragacid.nss @@ -0,0 +1,253 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Acid +//:: NW_S1_DragAcid +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + struct breath AcidBreath; + + //Use the HD of the creature to determine damage and save DC + if (nAge <= 6) //Wyrmling + { + nDamageDice = 2; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamageDice = 4; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamageDice = 6; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamageDice = 8; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamageDice = 10; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamageDice = 12; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamageDice = 14; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamageDice = 16; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamageDice = 18; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamageDice = 20; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamageDice = 22; + } + else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 24; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 26; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 28; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 30; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 32; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 34; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 36; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 38; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 40; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 42; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 44; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 46; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 48; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 50; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 52; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 54; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 56; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 58; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 60; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 62; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 64; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 66; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 68; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 70; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 72; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 74; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 76; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 78; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 80; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 82; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 84; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 86; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 88; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 90; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 92; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 94; + } + + //create the breath - 40' ~ 14m? - should set it based on size later + //was a cone originally, changed to line to match PnP + AcidBreath = CreateBreath(OBJECT_SELF, TRUE, 80.0, DAMAGE_TYPE_ACID, 4, nDamageDice, ABILITY_CONSTITUTION, nDCBoost); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(AcidBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(AcidBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(AcidBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragcold.ncs b/35expandedabilities/nw_s1_dragcold.ncs new file mode 100644 index 00000000..d72ee7e4 Binary files /dev/null and b/35expandedabilities/nw_s1_dragcold.ncs differ diff --git a/35expandedabilities/nw_s1_dragcold.nss b/35expandedabilities/nw_s1_dragcold.nss new file mode 100644 index 00000000..8ea150d3 --- /dev/null +++ b/35expandedabilities/nw_s1_dragcold.nss @@ -0,0 +1,251 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Cold +//:: NW_S1_DragCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + struct breath ColdBreath; + + //Use the HD of the creature to determine damage and save DC + if (nAge <= 6) //Wyrmling + { + nDamageDice = 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamageDice = 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamageDice = 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamageDice = 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamageDice = 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamageDice = 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamageDice = 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamageDice = 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamageDice = 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamageDice = 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamageDice = 11; + } +else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 12; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 13; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 14; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 15; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 16; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 17; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 18; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 19; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 20; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 21; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 22; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 23; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 24; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 25; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 26; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 27; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 28; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 29; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 30; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 31; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 32; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 33; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 34; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 35; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 36; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 37; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 38; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 39; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 40; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 41; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 42; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 43; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 44; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 45; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 46; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 47; + } + //create the breath - 40' ~ 14m? - should set it based on size later + ColdBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_COLD, 6, nDamageDice, ABILITY_CONSTITUTION, nDCBoost); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(ColdBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(ColdBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(ColdBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragfear.ncs b/35expandedabilities/nw_s1_dragfear.ncs new file mode 100644 index 00000000..e0a66afa Binary files /dev/null and b/35expandedabilities/nw_s1_dragfear.ncs differ diff --git a/35expandedabilities/nw_s1_dragfear.nss b/35expandedabilities/nw_s1_dragfear.nss new file mode 100644 index 00000000..f95e3975 --- /dev/null +++ b/35expandedabilities/nw_s1_dragfear.nss @@ -0,0 +1,119 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Fear +//:: NW_S1_DragFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nCount; + int nDC; + float fDelay; + object oTarget; + effect eBreath = EffectFrightened(); + effect eFear = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBreath, eDur); + eLink = EffectLinkEffects(eLink, eFear); + + //Determine the duration and save DC + if (nAge <= 6) //Wyrmling + { + nDC = 13; + nCount = 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDC = 15; + nCount = 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDC = 17; + nCount = 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDC = 19; + nCount = 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDC = 21; + nCount = 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDC = 24; + nCount = 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDC = 27; + nCount = 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDC = 28; + nCount = 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDC = 30; + nCount = 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDC = 32; + nCount = 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDC = 34; + nCount = 11; + } + else if (nAge > 37) //Great Wyrm + { + nDC = 37; + nCount = 12; + } + PlayDragonBattleCry(); + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget)) + { + nCount = GetScaledDuration(nCount, oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_DRAGON_BREATH_FEAR)); + //Determine the effect delay time + fDelay = GetDistanceBetween(oTarget, OBJECT_SELF)/20; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR, OBJECT_SELF, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + } +} + + diff --git a/35expandedabilities/nw_s1_dragfeara.ncs b/35expandedabilities/nw_s1_dragfeara.ncs new file mode 100644 index 00000000..717ef4f6 Binary files /dev/null and b/35expandedabilities/nw_s1_dragfeara.ncs differ diff --git a/35expandedabilities/nw_s1_dragfeara.nss b/35expandedabilities/nw_s1_dragfeara.nss new file mode 100644 index 00000000..2bb50095 --- /dev/null +++ b/35expandedabilities/nw_s1_dragfeara.nss @@ -0,0 +1,45 @@ +//:://///////////////////////////////////////////// +//:: Aura of Fear On Enter +//:: NW_S1_DragFearA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be struck with fear because + of the creatures presence. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ + //Declare major variables + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eFear = EffectFrightened(); + effect eLink = EffectLinkEffects(eFear, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + int nHD = GetHitDice(GetAreaOfEffectCreator()); + int nDC = 10 + GetHitDice(GetAreaOfEffectCreator())/3; + int nDuration = GetScaledDuration(nHD, oTarget); + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FEAR)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/35expandedabilities/nw_s1_dragfire.ncs b/35expandedabilities/nw_s1_dragfire.ncs new file mode 100644 index 00000000..7a50490b Binary files /dev/null and b/35expandedabilities/nw_s1_dragfire.ncs differ diff --git a/35expandedabilities/nw_s1_dragfire.nss b/35expandedabilities/nw_s1_dragfire.nss new file mode 100644 index 00000000..efae0a6e --- /dev/null +++ b/35expandedabilities/nw_s1_dragfire.nss @@ -0,0 +1,251 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Fire +//:: NW_S1_DragFire +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + struct breath FireBreath; + + //Use the HD of the creature to determine damage and save DC + if (nAge <= 6) //Wyrmling + { + nDamageDice = 2; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamageDice = 4; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamageDice = 6; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamageDice = 8; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamageDice = 10; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamageDice = 12; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamageDice = 14; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamageDice = 16; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamageDice = 18; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamageDice = 20; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamageDice = 22; + } + else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 24; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 26; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 28; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 30; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 32; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 34; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 36; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 38; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 40; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 42; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 44; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 46; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 48; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 50; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 52; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 54; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 56; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 58; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 60; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 62; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 64; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 66; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 68; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 70; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 72; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 74; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 76; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 78; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 80; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 82; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 84; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 86; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 88; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 90; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 92; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 94; + } + //create the breath - 40' ~ 14m? - should set it based on size later + FireBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_FIRE, 10, nDamageDice, ABILITY_CONSTITUTION, nDCBoost); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(FireBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(FireBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(FireBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_draggas.ncs b/35expandedabilities/nw_s1_draggas.ncs new file mode 100644 index 00000000..1921e1a9 Binary files /dev/null and b/35expandedabilities/nw_s1_draggas.ncs differ diff --git a/35expandedabilities/nw_s1_draggas.nss b/35expandedabilities/nw_s1_draggas.nss new file mode 100644 index 00000000..4769ac2e --- /dev/null +++ b/35expandedabilities/nw_s1_draggas.nss @@ -0,0 +1,251 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Gas Cloud +//:: NW_S1_DragGas +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + struct breath GasBreath; + + //Use the HD of the creature to determine damage and save DC + if (nAge <= 6) //Wyrmling + { + nDamageDice = 2; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamageDice = 4; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamageDice = 6; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamageDice = 8; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamageDice = 10; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamageDice = 12; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamageDice = 14; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamageDice = 16; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamageDice = 18; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamageDice = 20; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamageDice = 22; + } + else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 24; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 26; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 28; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 30; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 32; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 34; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 36; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 38; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 40; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 42; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 44; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 46; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 48; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 50; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 52; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 54; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 56; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 58; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 60; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 62; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 64; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 66; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 68; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 70; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 72; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 74; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 76; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 78; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 80; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 82; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 84; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 86; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 88; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 90; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 92; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 94; + } + //create the breath - 40' ~ 14m? - should set it based on size later + GasBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_ACID, 6, nDamageDice, ABILITY_CONSTITUTION, nDCBoost, BREATH_TOPAZ); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(GasBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(GasBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(GasBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_draglight.ncs b/35expandedabilities/nw_s1_draglight.ncs new file mode 100644 index 00000000..80fe60f4 Binary files /dev/null and b/35expandedabilities/nw_s1_draglight.ncs differ diff --git a/35expandedabilities/nw_s1_draglight.nss b/35expandedabilities/nw_s1_draglight.nss new file mode 100644 index 00000000..c283a417 --- /dev/null +++ b/35expandedabilities/nw_s1_draglight.nss @@ -0,0 +1,252 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Lightning +//:: NW_S1_DragLightn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + struct breath ElecBreath; + + //Use the HD of the creature to determine damage and save DC + if (nAge <= 6) //Wyrmling + { + nDamageDice = 2; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamageDice = 4; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamageDice = 6; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamageDice = 8; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamageDice = 10; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamageDice = 12; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamageDice = 14; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamageDice = 16; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamageDice = 18; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamageDice = 20; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamageDice = 22; + } + else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 24; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 26; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 28; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 30; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 32; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 34; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 36; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 38; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 40; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 42; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 44; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 46; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 48; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 50; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 52; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 54; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 56; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 58; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 60; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 62; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 64; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 66; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 68; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 70; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 72; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 74; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 76; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 78; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 80; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 82; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 84; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 86; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 88; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 90; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 92; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 94; + } + //create the breath - 40' ~ 14m? - should set it based on size later + //was implemented using a cone before, changed to line + ElecBreath = CreateBreath(OBJECT_SELF, TRUE, 80.0, DAMAGE_TYPE_ELECTRICAL, 8, nDamageDice, ABILITY_CONSTITUTION, nDCBoost); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(ElecBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(ElecBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(ElecBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragparal.ncs b/35expandedabilities/nw_s1_dragparal.ncs new file mode 100644 index 00000000..b1be0def Binary files /dev/null and b/35expandedabilities/nw_s1_dragparal.ncs differ diff --git a/35expandedabilities/nw_s1_dragparal.nss b/35expandedabilities/nw_s1_dragparal.nss new file mode 100644 index 00000000..03ae3caa --- /dev/null +++ b/35expandedabilities/nw_s1_dragparal.nss @@ -0,0 +1,251 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Paralyze +//:: NW_S1_DragParal +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nCount = d6(); + struct breath ParalBreath; + + //Determine save DC and duration of effect + if (nAge <= 6) //Wyrmling + { + nCount += 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nCount += 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nCount += 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nCount += 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nCount += 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nCount += 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nCount += 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nCount += 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nCount += 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nCount += 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nCount += 11; + } +else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nCount += 12; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nCount += 13; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nCount += 14; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nCount += 15; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nCount += 16; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nCount += 17; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nCount += 18; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nCount += 19; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nCount += 20; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nCount += 21; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nCount += 22; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nCount += 23; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nCount += 24; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nCount += 25; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nCount += 26; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nCount += 27; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nCount += 28; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nCount += 29; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nCount += 30; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nCount += 31; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nCount += 32; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nCount += 33; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nCount += 34; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nCount += 35; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nCount += 36; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nCount += 37; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nCount += 38; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nCount += 39; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nCount += 40; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nCount += 41; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nCount += 42; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nCount += 43; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nCount += 44; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nCount += 45; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nCount += 46; + } + else if (nAge > 178 ) //Great Wyrm + { + nCount += 47; + } + //create the breath - 40' ~ 14m? - should set it based on size later + ParalBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, -1, 10, nCount, ABILITY_CONSTITUTION, nDCBoost, BREATH_PARALYZE); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(ParalBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(ParalBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(ParalBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragsleep.ncs b/35expandedabilities/nw_s1_dragsleep.ncs new file mode 100644 index 00000000..aaeebf83 Binary files /dev/null and b/35expandedabilities/nw_s1_dragsleep.ncs differ diff --git a/35expandedabilities/nw_s1_dragsleep.nss b/35expandedabilities/nw_s1_dragsleep.nss new file mode 100644 index 00000000..249f6be7 --- /dev/null +++ b/35expandedabilities/nw_s1_dragsleep.nss @@ -0,0 +1,252 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Sleep +//:: NW_S1_DragSleep +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nCount = d6(); + struct breath SleepBreath; + + //Determine save DC and duration of effect + if (nAge <= 6) //Wyrmling + { + nCount += 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nCount += 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nCount += 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nCount += 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nCount += 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nCount += 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nCount += 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nCount += 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nCount += 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nCount += 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nCount += 11; + } + +else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nCount += 12; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nCount += 13; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nCount += 14; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nCount += 15; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nCount += 16; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nCount += 17; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nCount += 18; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nCount += 19; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nCount += 20; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nCount += 21; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nCount += 22; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nCount += 23; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nCount += 24; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nCount += 25; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nCount += 26; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nCount += 27; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nCount += 28; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nCount += 29; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nCount += 30; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nCount += 31; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nCount += 32; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nCount += 33; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nCount += 34; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nCount += 35; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nCount += 36; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nCount += 37; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nCount += 38; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nCount += 39; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nCount += 40; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nCount += 41; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nCount += 42; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nCount += 43; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nCount += 44; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nCount += 45; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nCount += 46; + } + else if (nAge > 178 ) //Great Wyrm + { + nCount += 47; + } + //create the breath - 40' ~ 14m? - should set it based on size later + SleepBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, -1, 10, nCount, ABILITY_CONSTITUTION, nDCBoost, BREATH_SLEEP); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(SleepBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(SleepBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(SleepBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragslow.ncs b/35expandedabilities/nw_s1_dragslow.ncs new file mode 100644 index 00000000..186c19ed Binary files /dev/null and b/35expandedabilities/nw_s1_dragslow.ncs differ diff --git a/35expandedabilities/nw_s1_dragslow.nss b/35expandedabilities/nw_s1_dragslow.nss new file mode 100644 index 00000000..1263d0c6 --- /dev/null +++ b/35expandedabilities/nw_s1_dragslow.nss @@ -0,0 +1,251 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Slow +//:: NW_S1_DragSlow +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nCount = d6(); + struct breath SlowBreath; + + //Determine save DC and duration of effect + if (nAge <= 6) //Wyrmling + { + nCount += 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nCount += 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nCount += 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nCount += 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nCount += 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nCount += 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nCount += 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nCount += 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nCount += 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nCount += 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nCount += 11; + } +else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nCount += 12; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nCount += 13; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nCount += 14; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nCount += 15; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nCount += 16; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nCount += 17; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nCount += 18; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nCount += 19; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nCount += 20; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nCount += 21; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nCount += 22; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nCount += 23; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nCount += 24; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nCount += 25; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nCount += 26; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nCount += 27; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nCount += 28; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nCount += 29; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nCount += 30; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nCount += 31; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nCount += 32; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nCount += 33; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nCount += 34; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nCount += 35; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nCount += 36; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nCount += 37; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nCount += 38; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nCount += 39; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nCount += 40; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nCount += 41; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nCount += 42; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nCount += 43; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nCount += 44; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nCount += 45; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nCount += 46; + } + else if (nAge > 178 ) //Great Wyrm + { + nCount += 47; + } + //create the breath - 40' ~ 14m? - should set it based on size later + SlowBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, -1, 10, nCount, ABILITY_CONSTITUTION, nDCBoost, BREATH_SLOW); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(SlowBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(SlowBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(SlowBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_dragweak.ncs b/35expandedabilities/nw_s1_dragweak.ncs new file mode 100644 index 00000000..a1071d40 Binary files /dev/null and b/35expandedabilities/nw_s1_dragweak.ncs differ diff --git a/35expandedabilities/nw_s1_dragweak.nss b/35expandedabilities/nw_s1_dragweak.nss new file mode 100644 index 00000000..06209a53 --- /dev/null +++ b/35expandedabilities/nw_s1_dragweak.nss @@ -0,0 +1,254 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Weaken +//:: NW_S1_DragWeak +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamage = 0; + struct breath WeakBreath; + + //Determine save DC and ability damage + if (nAge <= 6) //Wyrmling + { + nDamage += 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDamage += 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDamage += 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDamage += 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDamage += 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDamage += 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDamage += 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDamage += 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDamage += 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDamage += 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDamage += 11; + } + else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamage += 12; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamage += 13; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamage += 14; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamage += 15; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamage += 16; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamage += 17; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamage += 18; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamage += 19; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamage += 20; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamage += 21; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamage += 22; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamage += 23; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamage += 24; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamage += 25; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamage += 26; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamage += 27; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamage += 28; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamage += 29; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamage += 30; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamage += 31; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamage += 32; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamage += 33; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamage += 34; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamage += 35; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamage += 36; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamage += 37; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamage += 38; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamage += 39; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamage += 40; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamage += 41; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamage += 42; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamage += 43; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamage += 44; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamage += 45; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamage += 46; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamage += 47; + } + + + + //create the breath - 40' ~ 14m? - should set it based on size later + WeakBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, -1, 10, nDamage, ABILITY_CONSTITUTION, nDCBoost, BREATH_WEAKENING); + + //Apply the breath + PRCPlayDragonBattleCry(); + ApplyBreath(WeakBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(WeakBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(WeakBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} + + diff --git a/35expandedabilities/nw_s1_feroc3.ncs b/35expandedabilities/nw_s1_feroc3.ncs new file mode 100644 index 00000000..25681cda Binary files /dev/null and b/35expandedabilities/nw_s1_feroc3.ncs differ diff --git a/35expandedabilities/nw_s1_feroc3.nss b/35expandedabilities/nw_s1_feroc3.nss new file mode 100644 index 00000000..58a44cbb --- /dev/null +++ b/35expandedabilities/nw_s1_feroc3.nss @@ -0,0 +1,41 @@ +//:://///////////////////////////////////////////// +//:: Ferocity 3 +//:: NW_S1_Feroc3 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Dex and Str of the target increases +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +void main() +{ +//:: Declare major variables + object oNPC = OBJECT_SELF; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION); //:: Determine the duration by getting the con modifier + int nIncrease = 9; + int nDuration = 1 + nCONMod; + if(nDuration == 0) { nDuration = 1; } + + + effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY, nIncrease); + effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nIncrease); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eStr, eDex); + eLink = EffectLinkEffects(eLink, eDur); + eLink = ExtraordinaryEffect(eLink); //:: Make effect extraordinary + + //effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); + SignalEvent(oNPC, EventSpellCastAt(oNPC, SPELLABILITY_FEROCITY_3, FALSE)); + if (nCONMod > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, RoundsToSeconds(nDuration)); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ; + } +} diff --git a/35expandedabilities/nw_s1_gazechaos.ncs b/35expandedabilities/nw_s1_gazechaos.ncs new file mode 100644 index 00000000..584a1fd8 Binary files /dev/null and b/35expandedabilities/nw_s1_gazechaos.ncs differ diff --git a/35expandedabilities/nw_s1_gazechaos.nss b/35expandedabilities/nw_s1_gazechaos.nss new file mode 100644 index 00000000..950ce623 --- /dev/null +++ b/35expandedabilities/nw_s1_gazechaos.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Destroy Law +//:: NW_S1_GazeChaos +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save and are of Lawful alignment. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentLawChaos(oTarget) == ALIGNMENT_LAWFUL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DESTROY_LAW)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazecharm.ncs b/35expandedabilities/nw_s1_gazecharm.ncs new file mode 100644 index 00000000..b27cd59f Binary files /dev/null and b/35expandedabilities/nw_s1_gazecharm.ncs differ diff --git a/35expandedabilities/nw_s1_gazecharm.nss b/35expandedabilities/nw_s1_gazecharm.nss new file mode 100644 index 00000000..e4a06224 --- /dev/null +++ b/35expandedabilities/nw_s1_gazecharm.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Charm +//:: NW_S1_GazeCharm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectCharmed(); + + effect eVis = EffectVisualEffect(VFX_IMP_CHARM); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + nDuration = GetScaledDuration(nDuration, oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_CHARM)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + diff --git a/35expandedabilities/nw_s1_gazeconfu.ncs b/35expandedabilities/nw_s1_gazeconfu.ncs new file mode 100644 index 00000000..f5a010fd Binary files /dev/null and b/35expandedabilities/nw_s1_gazeconfu.ncs differ diff --git a/35expandedabilities/nw_s1_gazeconfu.nss b/35expandedabilities/nw_s1_gazeconfu.nss new file mode 100644 index 00000000..4add32ff --- /dev/null +++ b/35expandedabilities/nw_s1_gazeconfu.nss @@ -0,0 +1,77 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Confusion +//:: NW_S1_GazeConfu +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectConfused(); + effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_CONFUSION)); + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_gazedaze.ncs b/35expandedabilities/nw_s1_gazedaze.ncs new file mode 100644 index 00000000..d63fc808 Binary files /dev/null and b/35expandedabilities/nw_s1_gazedaze.ncs differ diff --git a/35expandedabilities/nw_s1_gazedaze.nss b/35expandedabilities/nw_s1_gazedaze.nss new file mode 100644 index 00000000..f0a8c2dd --- /dev/null +++ b/35expandedabilities/nw_s1_gazedaze.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Daze +//:: NW_S1_GazeDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDazed(); + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eGaze, eVisDur); + eLink = EffectLinkEffects(eLink, eDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DAZE)); + + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazedeath.ncs b/35expandedabilities/nw_s1_gazedeath.ncs new file mode 100644 index 00000000..149369ae Binary files /dev/null and b/35expandedabilities/nw_s1_gazedeath.ncs differ diff --git a/35expandedabilities/nw_s1_gazedeath.nss b/35expandedabilities/nw_s1_gazedeath.nss new file mode 100644 index 00000000..635ee53b --- /dev/null +++ b/35expandedabilities/nw_s1_gazedeath.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Death +//:: NW_S1_GazeDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) || oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazedomn.ncs b/35expandedabilities/nw_s1_gazedomn.ncs new file mode 100644 index 00000000..ec2f33fe Binary files /dev/null and b/35expandedabilities/nw_s1_gazedomn.ncs differ diff --git a/35expandedabilities/nw_s1_gazedomn.nss b/35expandedabilities/nw_s1_gazedomn.nss new file mode 100644 index 00000000..56e56e0b --- /dev/null +++ b/35expandedabilities/nw_s1_gazedomn.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Dominate +//:: NW_S1_GazeDomn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDominated(); + effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DOMINATE)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(GetIsEnemy(oTarget)) + { + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazedoom.ncs b/35expandedabilities/nw_s1_gazedoom.ncs new file mode 100644 index 00000000..9b0f39ad Binary files /dev/null and b/35expandedabilities/nw_s1_gazedoom.ncs differ diff --git a/35expandedabilities/nw_s1_gazedoom.nss b/35expandedabilities/nw_s1_gazedoom.nss new file mode 100644 index 00000000..cb359b59 --- /dev/null +++ b/35expandedabilities/nw_s1_gazedoom.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze of Doom +//:: NW_S1_GazeDoom.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the target fails a save they recieve a -2 + penalty to all saves, attack rolls, damage and + skill checks for the duration of the spell. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 22, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL, 2); + effect eAttack = EffectAttackDecrease(2); + effect eDamage = EffectDamageDecrease(2); + effect eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, 2); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eAttack, eDamage); + eLink = EffectLinkEffects(eLink, eSaves); + eLink = EffectLinkEffects(eLink, eSkill); + eLink = EffectLinkEffects(eLink, eDur); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation()); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(oTarget != oNPC) + { + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DOOM)); + //Spell Resistance and Saving throw + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, RoundsToSeconds(nDuration)); + } + } + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation()); + } +} diff --git a/35expandedabilities/nw_s1_gazeevil.ncs b/35expandedabilities/nw_s1_gazeevil.ncs new file mode 100644 index 00000000..d5e209d4 Binary files /dev/null and b/35expandedabilities/nw_s1_gazeevil.ncs differ diff --git a/35expandedabilities/nw_s1_gazeevil.nss b/35expandedabilities/nw_s1_gazeevil.nss new file mode 100644 index 00000000..eb2a269c --- /dev/null +++ b/35expandedabilities/nw_s1_gazeevil.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Good +//:: NW_S1_GazeEvil +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_GOOD) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazefear.ncs b/35expandedabilities/nw_s1_gazefear.ncs new file mode 100644 index 00000000..bb9fe902 Binary files /dev/null and b/35expandedabilities/nw_s1_gazefear.ncs differ diff --git a/35expandedabilities/nw_s1_gazefear.nss b/35expandedabilities/nw_s1_gazefear.nss new file mode 100644 index 00000000..333d85ce --- /dev/null +++ b/35expandedabilities/nw_s1_gazefear.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Fear +//:: NW_S1_GazeFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + nDuration = GetScaledDuration(nDuration , oTarget); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectFrightened(); + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eLink = EffectLinkEffects(eGaze, eVisDur); + eLink = EffectLinkEffects(eLink, eDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + nDuration = GetScaledDuration(nDuration , oTarget); + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_FEAR)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazegood.ncs b/35expandedabilities/nw_s1_gazegood.ncs new file mode 100644 index 00000000..33deeef8 Binary files /dev/null and b/35expandedabilities/nw_s1_gazegood.ncs differ diff --git a/35expandedabilities/nw_s1_gazegood.nss b/35expandedabilities/nw_s1_gazegood.nss new file mode 100644 index 00000000..6ce014de --- /dev/null +++ b/35expandedabilities/nw_s1_gazegood.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Evil +//:: NW_S1_GazeGood +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_EVIL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazelaw.ncs b/35expandedabilities/nw_s1_gazelaw.ncs new file mode 100644 index 00000000..c4d06dc9 Binary files /dev/null and b/35expandedabilities/nw_s1_gazelaw.ncs differ diff --git a/35expandedabilities/nw_s1_gazelaw.nss b/35expandedabilities/nw_s1_gazelaw.nss new file mode 100644 index 00000000..14a9401b --- /dev/null +++ b/35expandedabilities/nw_s1_gazelaw.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Chaos +//:: NW_S1_GazeLaw +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentLawChaos(oTarget) == ALIGNMENT_CHAOTIC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DESTROY_LAW)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_gazestun.ncs b/35expandedabilities/nw_s1_gazestun.ncs new file mode 100644 index 00000000..717ed05c Binary files /dev/null and b/35expandedabilities/nw_s1_gazestun.ncs differ diff --git a/35expandedabilities/nw_s1_gazestun.nss b/35expandedabilities/nw_s1_gazestun.nss new file mode 100644 index 00000000..8c443992 --- /dev/null +++ b/35expandedabilities/nw_s1_gazestun.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Stun +//:: NW_S1_GazeStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectStunned(); + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_STUNNED)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/35expandedabilities/nw_s1_golemgas.ncs b/35expandedabilities/nw_s1_golemgas.ncs new file mode 100644 index 00000000..5d6dbb86 Binary files /dev/null and b/35expandedabilities/nw_s1_golemgas.ncs differ diff --git a/35expandedabilities/nw_s1_golemgas.nss b/35expandedabilities/nw_s1_golemgas.nss new file mode 100644 index 00000000..6fb1495a --- /dev/null +++ b/35expandedabilities/nw_s1_golemgas.nss @@ -0,0 +1,41 @@ +//:://///////////////////////////////////////////// +//:: Golem Breath +//:: NW_S1_GolemGas +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Iron Golem spits out a cone of poison. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// + +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + //Declare major variables + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + effect eCone = EffectPoison(POISON_IRON_GOLEM); + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_GOLEM_BREATH_GAS)); + //Determine effect delay + float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Apply poison effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + + diff --git a/35expandedabilities/nw_s1_hndbreath.ncs b/35expandedabilities/nw_s1_hndbreath.ncs new file mode 100644 index 00000000..aa1ea7e9 Binary files /dev/null and b/35expandedabilities/nw_s1_hndbreath.ncs differ diff --git a/35expandedabilities/nw_s1_hndbreath.nss b/35expandedabilities/nw_s1_hndbreath.nss new file mode 100644 index 00000000..e1427974 --- /dev/null +++ b/35expandedabilities/nw_s1_hndbreath.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Hell Hound Fire Breath +//:: NW_S1_HndBreath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of fire eminates from the hound. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d6(2); + + float fDelay; + + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HELL_HOUND_FIREBREATH)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + + diff --git a/35expandedabilities/nw_s1_howlconf.ncs b/35expandedabilities/nw_s1_howlconf.ncs new file mode 100644 index 00000000..10cd0209 Binary files /dev/null and b/35expandedabilities/nw_s1_howlconf.ncs differ diff --git a/35expandedabilities/nw_s1_howlconf.nss b/35expandedabilities/nw_s1_howlconf.nss new file mode 100644 index 00000000..f9d770e4 --- /dev/null +++ b/35expandedabilities/nw_s1_howlconf.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Howl: Confuse +//:: NW_S1_HowlConf +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 20ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eHowl = EffectConfused(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_CONFUSE)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_howldaze.ncs b/35expandedabilities/nw_s1_howldaze.ncs new file mode 100644 index 00000000..82237ef9 Binary files /dev/null and b/35expandedabilities/nw_s1_howldaze.ncs differ diff --git a/35expandedabilities/nw_s1_howldaze.nss b/35expandedabilities/nw_s1_howldaze.nss new file mode 100644 index 00000000..bd8e20c5 --- /dev/null +++ b/35expandedabilities/nw_s1_howldaze.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Daze +//:: NW_S1_HowlDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + effect eHowl = EffectDazed(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_DAZE)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_howldeath.ncs b/35expandedabilities/nw_s1_howldeath.ncs new file mode 100644 index 00000000..06fe047f Binary files /dev/null and b/35expandedabilities/nw_s1_howldeath.ncs differ diff --git a/35expandedabilities/nw_s1_howldeath.nss b/35expandedabilities/nw_s1_howldeath.nss new file mode 100644 index 00000000..5730647b --- /dev/null +++ b/35expandedabilities/nw_s1_howldeath.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Howl: Death +//:: NW_S1_HowlDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD); + effect eHowl = EffectDeath(); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_DEATH)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_howlfear.ncs b/35expandedabilities/nw_s1_howlfear.ncs new file mode 100644 index 00000000..a2af6c1e Binary files /dev/null and b/35expandedabilities/nw_s1_howlfear.ncs differ diff --git a/35expandedabilities/nw_s1_howlfear.nss b/35expandedabilities/nw_s1_howlfear.nss new file mode 100644 index 00000000..13dcfaf0 --- /dev/null +++ b/35expandedabilities/nw_s1_howlfear.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Howl: Fear +//:: NW_S1_HowlFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eHowl = EffectFrightened(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_FEAR)); + + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_howlparal.ncs b/35expandedabilities/nw_s1_howlparal.ncs new file mode 100644 index 00000000..aed44157 Binary files /dev/null and b/35expandedabilities/nw_s1_howlparal.ncs differ diff --git a/35expandedabilities/nw_s1_howlparal.nss b/35expandedabilities/nw_s1_howlparal.nss new file mode 100644 index 00000000..b0ecd43c --- /dev/null +++ b/35expandedabilities/nw_s1_howlparal.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Paralysis +//:: NW_S1_HowlParal +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eHowl = EffectParalyze(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_PARALYSIS)); + + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_howlsonic.ncs b/35expandedabilities/nw_s1_howlsonic.ncs new file mode 100644 index 00000000..62c88721 Binary files /dev/null and b/35expandedabilities/nw_s1_howlsonic.ncs differ diff --git a/35expandedabilities/nw_s1_howlsonic.nss b/35expandedabilities/nw_s1_howlsonic.nss new file mode 100644 index 00000000..4de9768f --- /dev/null +++ b/35expandedabilities/nw_s1_howlsonic.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Sonic +//:: NW_S1_HowlSonic +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDamage; + int nSonic = nHD/4; + if(nSonic == 0) { nSonic = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); + + float fDelay; + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_SONIC)); + nDamage = d6(nSonic); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC, oNPC, fDelay)) + { + nDamage = nDamage / 2; + } + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} \ No newline at end of file diff --git a/35expandedabilities/nw_s1_howlstun.ncs b/35expandedabilities/nw_s1_howlstun.ncs new file mode 100644 index 00000000..28a19f6e Binary files /dev/null and b/35expandedabilities/nw_s1_howlstun.ncs differ diff --git a/35expandedabilities/nw_s1_howlstun.nss b/35expandedabilities/nw_s1_howlstun.nss new file mode 100644 index 00000000..962d9b90 --- /dev/null +++ b/35expandedabilities/nw_s1_howlstun.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Howl: Stun +//:: NW_S1_HowlStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "NW_I0_SPELLS" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eHowl = EffectStunned(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_STUN)); + + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_krenscare.ncs b/35expandedabilities/nw_s1_krenscare.ncs new file mode 100644 index 00000000..fcbbba78 Binary files /dev/null and b/35expandedabilities/nw_s1_krenscare.ncs differ diff --git a/35expandedabilities/nw_s1_krenscare.nss b/35expandedabilities/nw_s1_krenscare.nss new file mode 100644 index 00000000..79099160 --- /dev/null +++ b/35expandedabilities/nw_s1_krenscare.nss @@ -0,0 +1,61 @@ +//:://///////////////////////////////////////////// +//:: Krenshar Fear Stare +//:: NW_S1_KrenScare +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Causes those in the gaze to be struck with fear +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nMetaMagic = PRCGetMetaMagicFeat(); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eFear = EffectFrightened(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + //Link the fear and mind effects + effect eLink = EffectLinkEffects(eFear, eMind); + eLink = EffectLinkEffects(eLink, eDur); + + + //Get first target in the spell cone + oTarget = GetFirstObjectInShape(SHAPE_CONE, 10.0, GetSpellTargetLocation(), TRUE); + while(GetIsObjectValid(oTarget)) + { + //Make faction check + if(GetIsEnemy(oTarget)) + { + fDelay = GetDistanceToObject(oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_KRENSHAR_SCARE)); + //Make a will save + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the linked effects and the VFX impact + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in the spell cone + oTarget = GetNextObjectInShape(SHAPE_CONE, 10.0, GetSpellTargetLocation(), TRUE); + } +} diff --git a/35expandedabilities/nw_s1_mephsalt.ncs b/35expandedabilities/nw_s1_mephsalt.ncs new file mode 100644 index 00000000..0e92ae39 Binary files /dev/null and b/35expandedabilities/nw_s1_mephsalt.ncs differ diff --git a/35expandedabilities/nw_s1_mephsalt.nss b/35expandedabilities/nw_s1_mephsalt.nss new file mode 100644 index 00000000..03b0b97f --- /dev/null +++ b/35expandedabilities/nw_s1_mephsalt.nss @@ -0,0 +1,63 @@ +//:://///////////////////////////////////////////// +//:: Salt Mephit Breath +//:: NW_S1_MephSalt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Salt Mephit shoots out a bolt of corrosive material + that causes 1d4 damage and reduces AC and Attack by 2 + + This should be a cone - Jaysyn +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d4(); + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt, eAttack, eAC; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ACID); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nDamage == 0) {nTouch = 0;} + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MEPHIT_SALT_BREATH)); + + //Set damage, AC mod and attack mod effects + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + eAC = EffectACDecrease(2); + eAttack = EffectAttackDecrease(2); + effect eLink = EffectLinkEffects(eAttack, eAC); + eLink = EffectLinkEffects(eLink, eDur); + + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_mephsteam.ncs b/35expandedabilities/nw_s1_mephsteam.ncs new file mode 100644 index 00000000..91107e1c Binary files /dev/null and b/35expandedabilities/nw_s1_mephsteam.ncs differ diff --git a/35expandedabilities/nw_s1_mephsteam.nss b/35expandedabilities/nw_s1_mephsteam.nss new file mode 100644 index 00000000..9b46d89b --- /dev/null +++ b/35expandedabilities/nw_s1_mephsteam.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Steam Mephit Breath +//:: NW_S1_MephSteam +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Steam Mephit shoots out a bolt of steam + that causes 1d4 damage and reduces AC by 4 + and Attack by 2 + + This should be a cone - Jaysyn +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d4(); + + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt, eAttack, eAC; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nDamage == 0) {nTouch = 0;} + + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MEPHIT_STEAM_BREATH)); + + //Set damage, AC mod and attack mod effects + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + eAC = EffectACDecrease(4); + eAttack = EffectAttackDecrease(2); + effect eLink = EffectLinkEffects(eAC, eAttack); + eLink = EffectLinkEffects(eLink, eDur); + + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/35expandedabilities/nw_s1_mumundead.ncs b/35expandedabilities/nw_s1_mumundead.ncs new file mode 100644 index 00000000..6897b909 Binary files /dev/null and b/35expandedabilities/nw_s1_mumundead.ncs differ diff --git a/35expandedabilities/nw_s1_mumundead.nss b/35expandedabilities/nw_s1_mumundead.nss new file mode 100644 index 00000000..f11db57b --- /dev/null +++ b/35expandedabilities/nw_s1_mumundead.nss @@ -0,0 +1,53 @@ +//:://///////////////////////////////////////////// +//:: Bolster Undead +//:: NW_S1_MumUndead +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell increases the Turn Resistance of + all undead around the caster by an amount + scaled with HD. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nScaling = nHD / 4; + + if(nScaling == 0) {nScaling = 1;} + + float fDelay; + + effect eTurn = EffectTurnResistanceIncrease(nScaling); + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_EVIL); + effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(oNPC)); + + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(GetIsFriend(oTarget)) + { + fDelay = GetRandomDelay(); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MUMMY_BOLSTER_UNDEAD, FALSE)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTurn, oTarget, RoundsToSeconds(10))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} diff --git a/35expandedabilities/nw_s1_pulschrdr.ncs b/35expandedabilities/nw_s1_pulschrdr.ncs new file mode 100644 index 00000000..e3f8c5ac Binary files /dev/null and b/35expandedabilities/nw_s1_pulschrdr.ncs differ diff --git a/35expandedabilities/nw_s1_pulschrdr.nss b/35expandedabilities/nw_s1_pulschrdr.nss new file mode 100644 index 00000000..b55902c4 --- /dev/null +++ b/35expandedabilities/nw_s1_pulschrdr.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Charisma Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_CHARISMA, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulscold.ncs b/35expandedabilities/nw_s1_pulscold.ncs new file mode 100644 index 00000000..b17e5afb Binary files /dev/null and b/35expandedabilities/nw_s1_pulscold.ncs differ diff --git a/35expandedabilities/nw_s1_pulscold.nss b/35expandedabilities/nw_s1_pulscold.nss new file mode 100644 index 00000000..c5ff7d28 --- /dev/null +++ b/35expandedabilities/nw_s1_pulscold.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Cold +//:: NW_S1_PulsCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage = d6(nHD); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_COLD); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_COLD)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulscondr.ncs b/35expandedabilities/nw_s1_pulscondr.ncs new file mode 100644 index 00000000..a1301921 Binary files /dev/null and b/35expandedabilities/nw_s1_pulscondr.ncs differ diff --git a/35expandedabilities/nw_s1_pulscondr.nss b/35expandedabilities/nw_s1_pulscondr.nss new file mode 100644 index 00000000..bfdbfcfe --- /dev/null +++ b/35expandedabilities/nw_s1_pulscondr.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Constitution Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_CONSTITUTION, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulsdeath.ncs b/35expandedabilities/nw_s1_pulsdeath.ncs new file mode 100644 index 00000000..230f564b Binary files /dev/null and b/35expandedabilities/nw_s1_pulsdeath.ncs differ diff --git a/35expandedabilities/nw_s1_pulsdeath.nss b/35expandedabilities/nw_s1_pulsdeath.nss new file mode 100644 index 00000000..7c949d1c --- /dev/null +++ b/35expandedabilities/nw_s1_pulsdeath.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Death +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eHowl = EffectDeath(); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + if(oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_DEATH)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulsdexdr.ncs b/35expandedabilities/nw_s1_pulsdexdr.ncs new file mode 100644 index 00000000..a2fd8841 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsdexdr.ncs differ diff --git a/35expandedabilities/nw_s1_pulsdexdr.nss b/35expandedabilities/nw_s1_pulsdexdr.nss new file mode 100644 index 00000000..d29872ad --- /dev/null +++ b/35expandedabilities/nw_s1_pulsdexdr.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Dexterity Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_DEXTERITY, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulsdis.ncs b/35expandedabilities/nw_s1_pulsdis.ncs new file mode 100644 index 00000000..80e023b5 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsdis.ncs differ diff --git a/35expandedabilities/nw_s1_pulsdis.nss b/35expandedabilities/nw_s1_pulsdis.nss new file mode 100644 index 00000000..f81568cf --- /dev/null +++ b/35expandedabilities/nw_s1_pulsdis.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Disease +//:: NW_S1_PulsDis +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of disease spreads out from the creature + and infects all those within 10ft +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nRacial = MyPRCGetRacialType(oNPC); + int nHD = GetHitDice(oNPC); + int nDamage = d6(nHD); + int nDisease; + + float fDelay; + + effect eDisease; + effect ePulse = EffectVisualEffect(266); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, ePulse, GetLocation(oNPC)); + + //Determine the disease type based on the Racial Type + switch (nRacial) + { + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + nDisease = DISEASE_FILTH_FEVER; + break; + case RACIAL_TYPE_OUTSIDER: + nDisease = DISEASE_DEMON_FEVER; + break; + case RACIAL_TYPE_MAGICAL_BEAST: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + case RACIAL_TYPE_ABERRATION: + nDisease = DISEASE_BLINDING_SICKNESS; + break; + default: + nDisease = DISEASE_MINDFIRE; + break; + } + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DISEASE)); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + eDisease = EffectDisease(nDisease); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulselec.ncs b/35expandedabilities/nw_s1_pulselec.ncs new file mode 100644 index 00000000..40fc5cfe Binary files /dev/null and b/35expandedabilities/nw_s1_pulselec.ncs differ diff --git a/35expandedabilities/nw_s1_pulselec.nss b/35expandedabilities/nw_s1_pulselec.nss new file mode 100644 index 00000000..2f856145 --- /dev/null +++ b/35expandedabilities/nw_s1_pulselec.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Lightning +//:: NW_S0_CallLghtn.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within 10ft of the creature take + 1d6 per HD up to 10d6 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNPC, BODY_NODE_CHEST); + effect eHowl = EffectVisualEffect(VFX_IMP_PULSE_COLD); + + DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHowl, GetLocation(oNPC))); + + float fDelay; + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_LIGHTNING)); + //Roll the damage + nDamage = d6(nHD); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget, 0.5)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulsfire.ncs b/35expandedabilities/nw_s1_pulsfire.ncs new file mode 100644 index 00000000..20f097e2 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsfire.ncs differ diff --git a/35expandedabilities/nw_s1_pulsfire.nss b/35expandedabilities/nw_s1_pulsfire.nss new file mode 100644 index 00000000..9270aa99 --- /dev/null +++ b/35expandedabilities/nw_s1_pulsfire.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Fire +//:: NW_S1_PulsFire +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_FIRE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_FIRE)); + //Roll the damage + nDamage = d6(nHD); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulsholy.ncs b/35expandedabilities/nw_s1_pulsholy.ncs new file mode 100644 index 00000000..c2302071 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsholy.ncs differ diff --git a/35expandedabilities/nw_s1_pulsholy.nss b/35expandedabilities/nw_s1_pulsholy.nss new file mode 100644 index 00000000..20ae4638 --- /dev/null +++ b/35expandedabilities/nw_s1_pulsholy.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Holy +//:: NW_S1_PulsHoly +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. Undead are damaged, allies are healed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_SUNSTRIKE); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_HOLY); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Roll the amount to heal or damage + nDamage = d4(nHD); + //If the target is not undead + if (MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Make a faction check + if(oTarget != oNPC) + { + if(GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY, FALSE)); + //Set heal effect + eHowl = EffectHeal(nDamage); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + else + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_DIVINE); + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE) ; + if(nDamage > 0) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulsintdr.ncs b/35expandedabilities/nw_s1_pulsintdr.ncs new file mode 100644 index 00000000..6730fc8f Binary files /dev/null and b/35expandedabilities/nw_s1_pulsintdr.ncs differ diff --git a/35expandedabilities/nw_s1_pulsintdr.nss b/35expandedabilities/nw_s1_pulsintdr.nss new file mode 100644 index 00000000..8558364b --- /dev/null +++ b/35expandedabilities/nw_s1_pulsintdr.nss @@ -0,0 +1,72 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Intelligence Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + } +} + diff --git a/35expandedabilities/nw_s1_pulslvldr.ncs b/35expandedabilities/nw_s1_pulslvldr.ncs new file mode 100644 index 00000000..de1184e1 Binary files /dev/null and b/35expandedabilities/nw_s1_pulslvldr.ncs differ diff --git a/35expandedabilities/nw_s1_pulslvldr.nss b/35expandedabilities/nw_s1_pulslvldr.nss new file mode 100644 index 00000000..f65e073e --- /dev/null +++ b/35expandedabilities/nw_s1_pulslvldr.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Level Drain +//:: NW_S1_PulsLvlDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(oNPC)); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + fDelay = GetSpellEffectDelay(GetLocation(oNPC), oTarget)/20; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Apply the VFX impact and effects + eHowl = EffectNegativeLevel(1); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulsneg.ncs b/35expandedabilities/nw_s1_pulsneg.ncs new file mode 100644 index 00000000..373c0523 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsneg.ncs differ diff --git a/35expandedabilities/nw_s1_pulsneg.nss b/35expandedabilities/nw_s1_pulsneg.nss new file mode 100644 index 00000000..9bfa749f --- /dev/null +++ b/35expandedabilities/nw_s1_pulsneg.nss @@ -0,0 +1,87 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Negative +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. Undead are healed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Roll the amount to heal or damage + nDamage = d4(nHD); + //If the target is undead + if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) + { + //Make a faction check + if(GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY, FALSE)); + //Set heal effect + eHowl = EffectHeal(nDamage); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + else + { + if(!GetIsReactionTypeFriendly(oTarget) && MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE); + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + if(nDamage > 0) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} diff --git a/35expandedabilities/nw_s1_pulspois.ncs b/35expandedabilities/nw_s1_pulspois.ncs new file mode 100644 index 00000000..cafb629b Binary files /dev/null and b/35expandedabilities/nw_s1_pulspois.ncs differ diff --git a/35expandedabilities/nw_s1_pulspois.nss b/35expandedabilities/nw_s1_pulspois.nss new file mode 100644 index 00000000..252ae3a0 --- /dev/null +++ b/35expandedabilities/nw_s1_pulspois.nss @@ -0,0 +1,138 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Poison +//:: NW_S1_PulsPois +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. All who make a reflex save are not + poisoned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 23, 2000 +//::////////////////////////////////////////////// +#include "prc_inc_racial" +//#include "wm_include" + +void main() +{ +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nRacial = MyPRCGetRacialType(oNPC); + int nPoison; + + float fDelay; + + effect ePoison; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + //Determine the poison type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + if (nHD <= 9) + { + nPoison = POISON_QUASIT_VENOM; + } + else if (nHD > 9 && nHD < 13) + { + nPoison = POISON_BEBILITH_VENOM; + } + else if (nHD >= 13) + { + nPoison = POISON_PIT_FIEND_ICHOR; + } + break; + case RACIAL_TYPE_VERMIN: + if (nHD < 3) + { + nPoison = POISON_TINY_SPIDER_VENOM; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_SMALL_SPIDER_VENOM; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_MEDIUM_SPIDER_VENOM; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_HUGE_SPIDER_VENOM; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_GARGANTUAN_SPIDER_VENOM; + } + else if (nHD >= 18) + { + nPoison = POISON_COLOSSAL_SPIDER_VENOM; + } + break; + default: + if (nHD < 3) + { + nPoison = POISON_NIGHTSHADE; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_BLADE_BANE; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_BLOODROOT; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_LICH_DUST; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_DARK_REAVER_POWDER; + } + else if (nHD >= 18 ) + { + nPoison = POISON_BLACK_LOTUS_EXTRACT; + } + break; + } + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_POISON)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + ePoison = EffectPoison(nPoison); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/35expandedabilities/nw_s1_pulsspore.ncs b/35expandedabilities/nw_s1_pulsspore.ncs new file mode 100644 index 00000000..723d8559 Binary files /dev/null and b/35expandedabilities/nw_s1_pulsspore.ncs differ diff --git a/35expandedabilities/nw_s1_pulsspore.nss b/35expandedabilities/nw_s1_pulsspore.nss new file mode 100644 index 00000000..7e9e34d3 --- /dev/null +++ b/35expandedabilities/nw_s1_pulsspore.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Vrock Spores +//:: NW_S1_PulsSpore +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of disease spreads out from the creature + and infects all those within 10ft +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + float fDelay; + effect eDisease; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_DISEASE)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eDisease = EffectDisease(DISEASE_SOLDIER_SHAKES); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oNPC)); + } +} diff --git a/35expandedabilities/nw_s1_pulsstrdr.ncs b/35expandedabilities/nw_s1_pulsstrdr.ncs new file mode 100644 index 00000000..aa85653d Binary files /dev/null and b/35expandedabilities/nw_s1_pulsstrdr.ncs differ diff --git a/35expandedabilities/nw_s1_pulsstrdr.nss b/35expandedabilities/nw_s1_pulsstrdr.nss new file mode 100644 index 00000000..5f88eabc --- /dev/null +++ b/35expandedabilities/nw_s1_pulsstrdr.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Strength Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_STRENGTH, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/35expandedabilities/nw_s1_pulswind.ncs b/35expandedabilities/nw_s1_pulswind.ncs new file mode 100644 index 00000000..92fccc72 Binary files /dev/null and b/35expandedabilities/nw_s1_pulswind.ncs differ diff --git a/35expandedabilities/nw_s1_pulswind.nss b/35expandedabilities/nw_s1_pulswind.nss new file mode 100644 index 00000000..05724072 --- /dev/null +++ b/35expandedabilities/nw_s1_pulswind.nss @@ -0,0 +1,51 @@ +//:://///////////////////////////////////////////// +//:: Pulse Whirlwind +//:: NW_S1_PulsWind +//:: Copyright (c) 2001 Bioware Corp. +//:://///////////////////////////////////////////// +/* + All those that fail a save are knocked + down by the elemental whirlwind. +*/ +//:://///////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//:://///////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nSTRMod = GetAbilityModifier(ABILITY_STRENGTH, oNPC); + int nDC = 10 +nSTRMod+ (nHD/2); + + effect eDown = EffectKnockdown(); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WIND); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDown, oTarget, 5.0); + } + //Get next target in spell area + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} diff --git a/35expandedabilities/nw_s1_pulswisdr.ncs b/35expandedabilities/nw_s1_pulswisdr.ncs new file mode 100644 index 00000000..19253dea Binary files /dev/null and b/35expandedabilities/nw_s1_pulswisdr.ncs differ diff --git a/35expandedabilities/nw_s1_pulswisdr.nss b/35expandedabilities/nw_s1_pulswisdr.nss new file mode 100644 index 00000000..b1bf68c3 --- /dev/null +++ b/35expandedabilities/nw_s1_pulswisdr.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Wisdom Drain +//:: NW_S1_PulsWisDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_WISDOM, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF)); + } +} + diff --git a/35expandedabilities/nw_s1_smokeclaw.ncs b/35expandedabilities/nw_s1_smokeclaw.ncs new file mode 100644 index 00000000..ebed03b3 Binary files /dev/null and b/35expandedabilities/nw_s1_smokeclaw.ncs differ diff --git a/35expandedabilities/nw_s1_smokeclaw.nss b/35expandedabilities/nw_s1_smokeclaw.nss new file mode 100644 index 00000000..6db3666f --- /dev/null +++ b/35expandedabilities/nw_s1_smokeclaw.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Smoke Claws +//:: NW_S1_SmokeClaw +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If a Belker succeeds at a touch attack the + target breaths in part of the Belker and suffers + 3d4 damage per round until a Fortitude save is + made. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 23 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + + int bSave = FALSE; + + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + effect eSmoke; + float fDelay = 0.0; + + //Make a touch attack + if(TouchAttackMelee(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Make a saving throw check + while (bSave == FALSE) + { + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NONE, oNPC, fDelay)) + { + bSave = TRUE; + } + else + { + //Set damage + eSmoke = EffectDamage(d4(3)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSmoke, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + //Increment the delay + fDelay = fDelay + 6.0; + } + } + } + } +} diff --git a/35expandedabilities/nw_s1_stink_a.ncs b/35expandedabilities/nw_s1_stink_a.ncs new file mode 100644 index 00000000..bb2bc5b1 Binary files /dev/null and b/35expandedabilities/nw_s1_stink_a.ncs differ diff --git a/35expandedabilities/nw_s1_stink_a.nss b/35expandedabilities/nw_s1_stink_a.nss new file mode 100644 index 00000000..67652dde --- /dev/null +++ b/35expandedabilities/nw_s1_stink_a.nss @@ -0,0 +1,57 @@ +//:://///////////////////////////////////////////// +//:: Stinking Cloud On Enter +//:: NW_S1_Stink_A.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Those within the area of effect must make a + fortitude save or be dazed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); //Get the first object in the persistant area + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + + effect eStink = EffectDazed(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eMind, eStink); + eLink = EffectLinkEffects(eLink, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + + float fDelay; + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + if(MyPRCGetRacialType(oTarget) != RACIAL_TYPE_VERMIN) + { + if(GetIsEnemy(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STINKING_CLOUD)); + //Make a Fort Save + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_POISON)) + { + fDelay = GetRandomDelay(0.25, 1.0); + //Apply the VFX impact and linked effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2))); + } + } + } +} diff --git a/35expandedabilities/nw_s1_tyrantfga.ncs b/35expandedabilities/nw_s1_tyrantfga.ncs new file mode 100644 index 00000000..a28a1dfe Binary files /dev/null and b/35expandedabilities/nw_s1_tyrantfga.ncs differ diff --git a/35expandedabilities/nw_s1_tyrantfga.nss b/35expandedabilities/nw_s1_tyrantfga.nss new file mode 100644 index 00000000..a2752cbd --- /dev/null +++ b/35expandedabilities/nw_s1_tyrantfga.nss @@ -0,0 +1,56 @@ +//:://///////////////////////////////////////////// +//:: Tyrant Fog Zombie Mist Heartbeat +//:: NW_S1_TyrantFgA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creatures entering the area around the zombie + must save or take 1 point of Constitution + damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int bAbsent = TRUE; + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + effect eTest; + effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, 1); + eCon = ExtraordinaryEffect(eCon); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eCon, eDur); + + if(!GetHasSpellEffect(SPELLABILITY_TYRANT_FOG_MIST, oTarget)) + { + if(bAbsent == TRUE) + { + if(GetIsEnemy(oTarget, oNPC)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_TYRANT_FOG_MIST)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_POISON)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(5)); + } + } + } + } +} diff --git a/35expandedabilities/nw_s1_tyrantfog.ncs b/35expandedabilities/nw_s1_tyrantfog.ncs new file mode 100644 index 00000000..609cad3b Binary files /dev/null and b/35expandedabilities/nw_s1_tyrantfog.ncs differ diff --git a/35expandedabilities/nw_s1_tyrantfog.nss b/35expandedabilities/nw_s1_tyrantfog.nss new file mode 100644 index 00000000..e3ab9e63 --- /dev/null +++ b/35expandedabilities/nw_s1_tyrantfog.nss @@ -0,0 +1,25 @@ +//:://///////////////////////////////////////////// +//:: Tyrant Fog Zombie Mist +//:: NW_S1_TyrantFog.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creatures entering the area around the zombie + must save or take 1 point of Constitution + damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + + //Declare and apply the AOE + effect eAOE = EffectAreaOfEffect(AOE_MOB_TYRANT_FOG); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100)); +} diff --git a/35expandedabilities/nw_s2_bardsong.ncs b/35expandedabilities/nw_s2_bardsong.ncs new file mode 100644 index 00000000..2c2a6205 Binary files /dev/null and b/35expandedabilities/nw_s2_bardsong.ncs differ diff --git a/35expandedabilities/nw_s2_bardsong.nss b/35expandedabilities/nw_s2_bardsong.nss new file mode 100644 index 00000000..7805ffd4 --- /dev/null +++ b/35expandedabilities/nw_s2_bardsong.nss @@ -0,0 +1,2222 @@ +//:://///////////////////////////////////////////// +//:: Bard Song +//:: NW_S2_BardSong +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells applies bonuses to all of the + bard's allies within 30ft for a set duration of + 10 rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Feb 25, 2002 +//::////////////////////////////////////////////// +//:: Last Updated By: Georg Zoeller Oct 1, 2003 +/* +bugfix by Kovi 2002.07.30 +- loosing temporary hp resulted in loosing the other bonuses +*/ + +#include "prc_inc_clsfunc" +#include "prc_inc_combat" //for Dragonfire type getting + +void ApplyDragonfire(int nAmount, int nDuration, object oPC, object oCaster) +{ + int nAppearanceType; + int nDamageType = GetDragonfireDamageType(oPC); + //find primary weapon to add to + object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC); + switch(nDamageType) + { + case DAMAGE_TYPE_ACID: nAppearanceType = ITEM_VISUAL_ACID; break; + case DAMAGE_TYPE_COLD: nAppearanceType = ITEM_VISUAL_COLD; break; + case DAMAGE_TYPE_ELECTRICAL: nAppearanceType = ITEM_VISUAL_ELECTRICAL; break; + case DAMAGE_TYPE_SONIC: nAppearanceType = ITEM_VISUAL_SONIC; break; + case DAMAGE_TYPE_FIRE: nAppearanceType = ITEM_VISUAL_FIRE; break; + } + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + IPSafeAddItemProperty(oItem, ItemPropertyVisualEffect(nAppearanceType), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + + //add to gloves and claws too + oItem = GetItemInSlot(INVENTORY_SLOT_ARMS, oPC); + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oPC); + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + + //do ammo for ranged attacks + object oAmmo = GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC); + SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType); + SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + + oAmmo = GetItemInSlot(INVENTORY_SLOT_BULLETS, oPC); + SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType); + SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + + oAmmo = GetItemInSlot(INVENTORY_SLOT_ARROWS, oPC); + SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType); + SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + + //now check offhand and bite + oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oPC); + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); + if(!GetIsShield(oItem) && oItem != OBJECT_INVALID) + { + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); + IPSafeAddItemProperty(oItem, ItemPropertyVisualEffect(nAppearanceType), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); + } + oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oPC); + SetLocalInt(oItem, "Insp_Dam_Type", nDamageType); + SetLocalInt(oItem, "Insp_Dam_Dice", nAmount); + IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING); +} + +void main() +{ + if (PRCGetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced + return; + } + string sTag = GetTag(OBJECT_SELF); + + //RemoveOldSongEffects(OBJECT_SELF,GetSpellId()); + + if (sTag == "x0_hen_dee" || sTag == "x2_hen_deekin") + { + // * Deekin has a chance of singing a doom song + // * same effect, better tune + if (Random(5) == 2) + { + // the Xp2 Deekin knows more than one doom song + if (d3() == 1 && sTag == "x2_hen_deekin") + { + DelayCommand(0.0, PlaySound("vs_nx2deekM_050")); + } + else + { + DelayCommand(0.0, PlaySound("vs_nx0deekM_074")); + DelayCommand(5.0, PlaySound("vs_nx0deekM_074")); + } + } + } + + + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARD) + + GetLevelByClass(CLASS_TYPE_MINSTREL_EDGE)/2 + + GetLevelByClass(CLASS_TYPE_DIRGESINGER) + + + GetLevelByClass(CLASS_TYPE_DRAGONSONG_LYRIST) + + GetLevelByClass(CLASS_TYPE_HEARTWARDER) + + GetLevelByClass(CLASS_TYPE_SPELLDANCER) + + GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD) + + GetLevelByClass(CLASS_TYPE_BLADESINGER) + + GetLevelByClass(CLASS_TYPE_VIRTUOSO); + if (GetHasFeat(FEAT_SONG_WHITE_RAVEN, OBJECT_SELF)) + nLevel += GetLevelByClass(CLASS_TYPE_CRUSADER) + GetLevelByClass(CLASS_TYPE_WARBLADE); + + int nRanks = GetSkillRank(SKILL_PERFORM); + if (GetHasFeat(FEAT_DRAGONSONG, OBJECT_SELF)) nRanks+= 2; + int nChr = GetAbilityModifier(ABILITY_CHARISMA); + int nPerform = nRanks; + int nDuration = 10; //+ nChr; + + + effect eAttack; + effect eDamage; + effect eWill; + effect eFort; + effect eReflex; + effect eHP; + effect eAC; + effect eSkill; + + int nAttack; + int nDamage; + int nWill; + int nFort; + int nReflex; + int nHP; + int nAC; + int nSkill; + + // lingering song + if(GetHasFeat(FEAT_LINGERING_SONG)) + { + nDuration += 5; + } + + //Check to see if the caster has Lasting Impression and increase duration. + if(GetHasFeat(FEAT_EPIC_LASTING_INSPIRATION)) + { + nDuration *= 10; + } + + //SpeakString("Level: " + IntToString(nLevel) + " Ranks: " + IntToString(nRanks)); + + + + if(nPerform >= 125 && nLevel >= 180) + { + nAttack = 36; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 348; + nAC = 36; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 179) + { + nAttack = 36; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 346; + nAC = 35; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 178) + { + nAttack = 35; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 344; + nAC = 35; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 177) + { + nAttack = 35; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 342; + nAC = 35; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 176) + { + nAttack = 35; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 340; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 175) + { + nAttack = 34; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 338; + nAC = 34; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 174) + { + nAttack = 34; + nDamage = 34; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 336; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 173) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 18; + nReflex = 18; + nHP = 334; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 172) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 18; + nHP = 332; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 171) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 330; + nAC = 34; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 170) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 328; + nAC = 33; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 169) + { + nAttack = 33; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 326; + nAC = 33; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 168) + { + nAttack = 33; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 324; + nAC = 33; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 167) + { + nAttack = 33; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 322; + nAC = 32; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 166) + { + nAttack = 32; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 320; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 165) + { + nAttack = 32; + nDamage = 32; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 318; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 164) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 17; + nReflex = 17; + nHP = 316; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 163) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 17; + nHP = 314; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 162) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 312; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 161) + { + nAttack = 31; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 310; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 160) + { + nAttack = 31; + nDamage = 31; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 308; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 159) + { + nAttack = 30; + nDamage = 31; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 306; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 158) + { + nAttack = 30; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 304; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 157) + { + nAttack = 30; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 302; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 156) + { + nAttack = 29; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 300; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 155) + { + nAttack = 29; + nDamage = 29; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 298; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 154) + { + nAttack = 29; + nDamage = 29; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 296; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 153) + { + nAttack = 29; + nDamage = 28; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 294; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 152) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 16; + nReflex = 16; + nHP = 292; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 151) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 16; + nHP = 290; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 150) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 288; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 149) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 286; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 148) + { + nAttack = 28; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 284; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 147) + { + nAttack = 28; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 282; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 146) + { + nAttack = 28; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 280; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 145) + { + nAttack = 27; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 278; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 144) + { + nAttack = 27; + nDamage = 26; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 276; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 143) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 15; + nReflex = 15; + nHP = 274; + nAC = 28; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 142) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 15; + nHP = 272; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 141) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 270; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 140) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 268; + nAC = 27; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 139) + { + nAttack = 27; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 266; + nAC = 27; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 138) + { + nAttack = 27; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 264; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 137) + { + nAttack = 26; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 262; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 136) + { + nAttack = 26; + nDamage = 24; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 260; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 135) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 14; + nReflex = 14; + nHP = 258; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 134) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 13; + nReflex = 14; + nHP = 256; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 133) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 254; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 132) + { + nAttack = 26; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 252; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 131) + { + nAttack = 26; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 250; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 130) + { + nAttack = 25; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 248; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 129) + { + nAttack = 25; + nDamage = 22; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 246; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 128) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 13; + nReflex = 13; + nHP = 244; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 127) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 12; + nReflex = 13; + nHP = 242; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 126) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 240; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 125) + { + nAttack = 25; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 238; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 124) + { + nAttack = 24; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 236; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 123) + { + nAttack = 24; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 234; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 122) + { + nAttack = 24; + nDamage = 20; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 232; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 121) + { + nAttack = 23; + nDamage = 20; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 230; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 120) + { + nAttack = 23; + nDamage = 19; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 228; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 119) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 12; + nReflex = 12; + nHP = 226; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 118) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 12; + nHP = 224; + nAC = 24; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 117) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 222; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 116) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 220; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 115) + { + nAttack = 22; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 218; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 114) + { + nAttack = 22; + nDamage = 18; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 216; + nAC = 23; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 113) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 11; + nReflex = 11; + nHP = 214; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 112) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 11; + nHP = 212; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 111) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 210; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 110) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 208; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 109) + { + nAttack = 22; + nDamage = 17; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 206; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 108) + { + nAttack = 21; + nDamage = 17; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 204; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 107) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 202; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 106) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 200; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 105) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 198; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 104) + { + nAttack = 20; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 196; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 103) + { + nAttack = 20; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 194; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 102) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 192; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 101) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 190; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 100) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 188; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 99) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 186; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 98) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 184; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 97) + { + nAttack = 20; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 182; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 96) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 180; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 95) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 178; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 94) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 176; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 93) + { + nAttack = 18; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 174; + nAC = 19; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 92) + { + nAttack = 18; + nDamage = 13; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 172; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 91) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 170; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 90) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 168; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 89) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 166; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 88) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 164; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 87) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 162; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 86) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 160; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 85) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 158; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 84) + { + nAttack = 16; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 156; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 83) + { + nAttack = 15; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 154; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 82) + { + nAttack = 14; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 152; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 81) + { + nAttack = 14; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 150; + nAC = 16; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 80) + { + nAttack = 13; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 148; + nAC = 16; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 79) + { + nAttack = 12; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 146; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 78) + { + nAttack = 12; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 144; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 77) + { + nAttack = 11; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 142; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 76) + { + nAttack = 11; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 140; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 75) + { + nAttack = 11; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 138; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 74) + { + nAttack = 10; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 136; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 73) + { + nAttack = 10; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 134; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 72) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 10; + nReflex = 10; + nHP = 132; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 71) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 9; + nReflex = 10; + nHP = 130; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 70) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 128; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 69) + { + nAttack = 10; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 126; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 68) + { + nAttack = 9; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 124; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 67) + { + nAttack = 9; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 122; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 66) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 9; + nReflex = 9; + nHP = 120; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 65) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 8; + nReflex = 9; + nHP = 118; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 64) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 116; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 63) + { + nAttack = 9; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 114; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 62) + { + nAttack = 8; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 112; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 61) + { + nAttack = 8; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 110; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 60) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 8; + nReflex = 8; + nHP = 108; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 59) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 7; + nReflex = 8; + nHP = 106; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 58) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 104; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 57) + { + nAttack = 8; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 102; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 56) + { + nAttack = 7; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 100; + nAC = 12; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 55) + { + nAttack = 7; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 98; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 54) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 7; + nReflex = 7; + nHP = 96; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 53) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 7; + nHP = 94; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 52) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 92; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 51) + { + nAttack = 6; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 90; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 50) + { + nAttack = 6; + nDamage = 6; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 88; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 49) + { + nAttack = 6; + nDamage = 6; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 86; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 48) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 6; + nReflex = 6; + nHP = 84; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 47) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 5; + nReflex = 6; + nHP = 82; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 46) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 80; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 45) + { + nAttack = 6; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 78; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 44) + { + nAttack = 5; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 76; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 43) + { + nAttack = 5; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 74; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 42) + { + nAttack = 4; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 72; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 41) + { + nAttack = 4; + nDamage = 4; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 70; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 40) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 5; + nReflex = 5; + nHP = 68; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 39) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 5; + nHP = 66; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 38) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 64; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 37) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 62; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 36) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 3; + nReflex = 4; + nHP = 60; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 35) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 3; + nReflex = 3; + nHP = 58; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 120 && nLevel >= 34) + { + nAttack = 3; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 56; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 115 && nLevel >= 33) + { + nAttack = 3; + nDamage = 3; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 54; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 110 && nLevel >= 32) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 52; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 105 && nLevel >= 31) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 3; + nHP = 50; + nAC = 7; + nSkill = 20; + } + + if(nPerform >= 100 && nLevel >= 30) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 48; + nAC = 7; + nSkill = 19; + } + else if(nPerform >= 95 && nLevel >= 29) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 46; + nAC = 6; + nSkill = 18; + } + else if(nPerform >= 90 && nLevel >= 28) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 44; + nAC = 6; + nSkill = 17; + } + else if(nPerform >= 85 && nLevel >= 27) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 42; + nAC = 6; + nSkill = 16; + } + else if(nPerform >= 80 && nLevel >= 26) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 40; + nAC = 6; + nSkill = 15; + } + else if(nPerform >= 75 && nLevel >= 25) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 38; + nAC = 6; + nSkill = 14; + } + else if(nPerform >= 70 && nLevel >= 24) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 36; + nAC = 5; + nSkill = 13; + } + else if(nPerform >= 65 && nLevel >= 23) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 34; + nAC = 5; + nSkill = 12; + } + else if(nPerform >= 60 && nLevel >= 22) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 32; + nAC = 5; + nSkill = 11; + } + else if(nPerform >= 55 && nLevel >= 21) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 30; + nAC = 5; + nSkill = 9; + } + else if(nPerform >= 50 && nLevel >= 20) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 28; + nAC = 5; + nSkill = 8; + } + else if(nPerform >= 45 && nLevel >= 19) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 26; + nAC = 5; + nSkill = 7; + } + else if(nPerform >= 40 && nLevel >= 18) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 24; + nAC = 5; + nSkill = 6; + } + else if(nPerform >= 35 && nLevel >= 17) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 22; + nAC = 5; + nSkill = 5; + } + else if(nPerform >= 30 && nLevel >= 16) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 20; + nAC = 5; + nSkill = 4; + } + else if(nPerform >= 24 && nLevel >= 15) + { + nAttack = 2; + nDamage = 3; + nWill = 2; + nFort = 2; + nReflex = 2; + nHP = 16; + nAC = 4; + nSkill = 3; + } + else if(nPerform >= 21 && nLevel >= 14) + { + nAttack = 2; + nDamage = 3; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 16; + nAC = 3; + nSkill = 2; + } + else if(nPerform >= 18 && nLevel >= 11) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 2; + nSkill = 2; + } + else if(nPerform >= 15 && nLevel >= 8) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 12 && nLevel >= 6) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 0; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 9 && nLevel >= 3) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 6 && nLevel >= 2) + { + nAttack = 1; + nDamage = 1; + nWill = 1; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 3 && nLevel >= 1) + { + nAttack = 1; + nDamage = 1; + nWill = 0; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG); + effect eLink; + + eAttack = EffectAttackIncrease(nAttack); + eDamage = EffectDamageIncrease(nDamage, DAMAGE_TYPE_BLUDGEONING); + + + if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn")) + { + eLink = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + } + else + { + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + eLink = EffectLinkEffects(eAttack, eDamage); + eLink = EffectLinkEffects(eLink, eDur); + } + + if(nWill > 0) + { + eWill = EffectSavingThrowIncrease(SAVING_THROW_WILL, nWill); + eLink = EffectLinkEffects(eLink, eWill); + } + if(nFort > 0) + { + eFort = EffectSavingThrowIncrease(SAVING_THROW_FORT, nFort); + eLink = EffectLinkEffects(eLink, eFort); + } + if(nReflex > 0) + { + eReflex = EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nReflex); + eLink = EffectLinkEffects(eLink, eReflex); + } + if(nHP > 0) + { + //SpeakString("HP Bonus " + IntToString(nHP)); + eHP = EffectTemporaryHitpoints(nHP); +// eLink = EffectLinkEffects(eLink, eHP); + } + if(nAC > 0) + { + eAC = EffectACIncrease(nAC, AC_DODGE_BONUS); + eLink = EffectLinkEffects(eLink, eAC); + } + if(nSkill > 0) + { + eSkill = EffectSkillIncrease(SKILL_ALL_SKILLS, nSkill); + eLink = EffectLinkEffects(eLink, eSkill); + } + + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC); + effect eFNF = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF)); + + object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + + eHP = ExtraordinaryEffect(eHP); + eLink = ExtraordinaryEffect(eLink); + + int nRace; + + while(GetIsObjectValid(oTarget)) + { + // * GZ Oct 2003: If we are silenced, we can not benefit from bard song + if (!PRCGetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !PRCGetHasEffect(EFFECT_TYPE_DEAF,oTarget)) + { + RemoveSongEffects(GetSpellId(),OBJECT_SELF,oTarget); + nRace = MyPRCGetRacialType(oTarget); + + // Undead and Constructs are immune to mind effecting abilities. + // A bard with requiem can effect undead + if ((nRace == RACIAL_TYPE_UNDEAD && GetHasFeat(FEAT_REQUIEM, OBJECT_SELF)) || (nRace != RACIAL_TYPE_UNDEAD && nRace != RACIAL_TYPE_CONSTRUCT) || GetIsWarforged(oTarget)) + { + // Even with requiem, they have half duration + if (nRace == RACIAL_TYPE_UNDEAD) nDuration /= 2; + + if(oTarget == OBJECT_SELF) + { + effect eLinkBard = EffectLinkEffects(eLink, eVis); + eLinkBard = ExtraordinaryEffect(eLinkBard); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLinkBard, oTarget, RoundsToSeconds(nDuration)); + //StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration); + if (nHP > 0) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration)); + } + if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn")) + { + ApplyDragonfire(nAttack, nDuration, OBJECT_SELF, OBJECT_SELF); + } + } + else if(GetIsFriend(oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + //StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration); + if (nHP > 0) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration)); + } + if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn")) + { + ApplyDragonfire(nAttack, nDuration, oTarget, OBJECT_SELF); + } + } + } + } + oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } +//:: Crystal Echoblade + effect eEffect = GetFirstEffect(OBJECT_SELF); + + //:: Prevent stacking + while(GetIsEffectValid(eEffect)) + { + if(GetEffectTag(eEffect) == "Echoblade") + RemoveEffect(OBJECT_SELF, eEffect); + eEffect = GetNextEffect(OBJECT_SELF); + } + + if(IPGetHasItemPropertyByConst(ITEM_PROPERTY_ECHOBLADE, GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF)) || //:: 104/*ITEM_PROPERTY_ECHOBLADE*/ + (IPGetHasItemPropertyByConst(ITEM_PROPERTY_ECHOBLADE, GetItemInSlot(INVENTORY_SLOT_LEFTHAND, OBJECT_SELF)))) + { + int nSonic = IPGetDamageBonusConstantFromNumber(nLevel / 2); + effect eEchoblade = EffectDamageIncrease(nSonic, DAMAGE_TYPE_SONIC); + eEchoblade = ExtraordinaryEffect(eEchoblade); + eEchoblade = TagEffect(eEchoblade, "Echoblade"); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEchoblade, OBJECT_SELF, RoundsToSeconds(nDuration)); + } +} diff --git a/35expandedabilities/nw_s2_divprot.ncs b/35expandedabilities/nw_s2_divprot.ncs new file mode 100644 index 00000000..c2f36e0c Binary files /dev/null and b/35expandedabilities/nw_s2_divprot.ncs differ diff --git a/35expandedabilities/nw_s2_divprot.nss b/35expandedabilities/nw_s2_divprot.nss new file mode 100644 index 00000000..fff40abc --- /dev/null +++ b/35expandedabilities/nw_s2_divprot.nss @@ -0,0 +1,45 @@ +//:://///////////////////////////////////////////// +//:: Divine Protection +//:: NW_S2_DivProt.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Makes the target creature invisible to hostile + creatures unless they make a Will Save to ignore + the Sanctuary Effect +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDC = 10 + GetAbilityModifier(ABILITY_CHARISMA) + GetLevelByTypeDivine(oNPC); + effect eSanc = EffectSanctuary(nDC); + + effect eLink = EffectLinkEffects(eVis, eSanc); + eLink = EffectLinkEffects(eLink, eDur); + //Fire cast spell at event for the specified target + SignalEvent(OBJECT_SELF, EventSpellCastAt(oNPC, SPELLABILITY_DIVINE_PROTECTION, FALSE)); + + int nDuration = GetLevelByTypeDivine(oNPC); + //Enter Metamagic conditions + int nMetaMagic = PRCGetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} + diff --git a/35expandedabilities/nw_s2_layonhand.ncs b/35expandedabilities/nw_s2_layonhand.ncs new file mode 100644 index 00000000..5cbda8a2 Binary files /dev/null and b/35expandedabilities/nw_s2_layonhand.ncs differ diff --git a/35expandedabilities/nw_s2_layonhand.nss b/35expandedabilities/nw_s2_layonhand.nss new file mode 100644 index 00000000..81a4865c --- /dev/null +++ b/35expandedabilities/nw_s2_layonhand.nss @@ -0,0 +1,150 @@ +//:://///////////////////////////////////////////// +//:: Lay_On_Hands +//:: NW_S2_LayOnHand.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Paladin is able to heal his Chr Bonus times + his level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 15, 2001 +//:: Updated On: Oct 20, 2003 +//::////////////////////////////////////////////// + +#include "prc_inc_sp_tch" +void main() +{ + + object oTarget = PRCGetSpellTargetObject(); + int nChr = GetAbilityModifier(ABILITY_CHARISMA); + + // Added by Starlight 2004-5-14 + // Check whether the character has "Hand of A Healer Feat" and + // with 13+ Charisma + // If yes, +2 to Charisma Score during casting Lay On Hands + // i.e. +1 bonus to Charisma Modifier + if (GetAlignmentGoodEvil(OBJECT_SELF) == ALIGNMENT_GOOD){ + if (GetHasFeat(FEAT_HAND_HEALER)){ + nChr = nChr + 1; + } + } + // End of Hand of Healer Code + + if (nChr < 0) + { + nChr = 0; + } + int nLevel = GetLevelByClass(CLASS_TYPE_PALADIN); + + //-------------------------------------------------------------------------- + // July 2003: Add Divine Champion levels to lay on hands ability + //-------------------------------------------------------------------------- + nLevel += GetLevelByClass(CLASS_TYPE_DIVINECHAMPION); + nLevel += GetLevelByClass(CLASS_TYPE_HOSPITALER); + nLevel += GetLevelByClass(CLASS_TYPE_COC); + nLevel += GetEssentiaInvestedFeat(OBJECT_SELF, FEAT_AZURE_TOUCH); + nLevel += GetLevelByClass(CLASS_TYPE_HEALER); + nLevel += GetLevelByClass(CLASS_TYPE_COMBAT_MEDIC); + //-------------------------------------------------------------------------- + // Caluclate the amount to heal, min is 1 hp + //-------------------------------------------------------------------------- + int nHeal = nLevel * nChr; + if(nHeal <= 0) + { + nHeal = 1; + } + effect eHeal = EffectHeal(nHeal); + effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_SUNSTRIKE); + effect eEVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + effect eEVis2 = EffectVisualEffect(VFX_IMP_DESTRUCTION); + effect eDam; + int nTouch; + +// evil paladins should not heal non-undead, they should do damage, and heal undead. ~ Lock + + if (GetAlignmentGoodEvil(OBJECT_SELF) == ALIGNMENT_EVIL) + { + if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || GetLevelByClass(CLASS_TYPE_UNDEAD,oTarget)>0 + || (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD)) + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEVis2, oTarget); + } + else + { + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS)); + //Make a ranged touch attack + nTouch = PRCDoMeleeTouchAttack(oTarget);; + + //---------------------------------------------------------------------- + // GZ: The PhB classifies Lay on Hands as spell like ability, so it is + // subject to SR. No more cheesy demi lich kills on touch, sorry. + //---------------------------------------------------------------------- + int nResist = PRCDoResistSpell(OBJECT_SELF, oTarget, nLevel + SPGetPenetr()); + if (nResist == 0 ) + { + if(nTouch > 0) + { + if(nTouch == 2) + { + nHeal *= 2; + } + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS)); + eDam = PRCEffectDamage(oTarget, nHeal, DAMAGE_TYPE_DIVINE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eEVis, oTarget); + } + } + } + } + + //-------------------------------------------------------------------------- + // A good-aligned paladin can use his lay on hands ability to damage undead creatures + // having undead class levels qualifies as undead as well + //-------------------------------------------------------------------------- + +if (GetAlignmentGoodEvil(OBJECT_SELF) == ALIGNMENT_GOOD || GetAlignmentGoodEvil(OBJECT_SELF) == ALIGNMENT_NEUTRAL) +{ + if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || GetLevelByClass(CLASS_TYPE_UNDEAD,oTarget)>0 + || (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS)); + //Make a ranged touch attack + nTouch = PRCDoMeleeTouchAttack(oTarget);; + + //---------------------------------------------------------------------- + // GZ: The PhB classifies Lay on Hands as spell like ability, so it is + // subject to SR. No more cheesy demi lich kills on touch, sorry. + //---------------------------------------------------------------------- + int nResist = PRCDoResistSpell(OBJECT_SELF, oTarget, nLevel + SPGetPenetr()); + if (nResist == 0 ) + { + if(nTouch > 0) + { + if(nTouch == 2) + { + nHeal *= 2; + } + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS)); + eDam = PRCEffectDamage(oTarget, nHeal, DAMAGE_TYPE_DIVINE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } + } + } + else + { + + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_LAY_ON_HANDS, FALSE)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} + +} + diff --git a/35expandedabilities/nw_s3_balordeth.ncs b/35expandedabilities/nw_s3_balordeth.ncs new file mode 100644 index 00000000..0722edb9 Binary files /dev/null and b/35expandedabilities/nw_s3_balordeth.ncs differ diff --git a/35expandedabilities/nw_s3_balordeth.nss b/35expandedabilities/nw_s3_balordeth.nss new file mode 100644 index 00000000..96d0afb2 --- /dev/null +++ b/35expandedabilities/nw_s3_balordeth.nss @@ -0,0 +1,62 @@ +// HCR v3.2.0 - Execute default death script after fireball effects is complete. +//:://////////////////////////////////////////////////////////////////////////// +//:: FileName: NW_S3_BALORDETH +//:://////////////////////////////////////////////////////////////////////////// +/* + Fireball explosion does 50 damage to all within 20ft. +*/ +//:://////////////////////////////////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 9, 2002 +//:://////////////////////////////////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//:://////////////////////////////////////////////////////////////////////////// +void main() +{ + // Declare major variables. + int nMetaMagic = PRCGetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + // Apply the fireball explosion. + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + location lTarget = GetLocation(OBJECT_SELF); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + + // Cycle through the targets until an invalid object is captured. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR); + while (GetIsObjectValid(oTarget)) + { + // Fire cast spell at event for the specified target. + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL)); + + // Calculate delay based on distance between explosion and the target. + fDelay = (GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20); + if (!PRCDoResistSpell(OBJECT_SELF, oTarget, FloatToInt(fDelay))) + { + // Adjust damage based on Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(50, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if (nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + + // This visual effect is applied to the target object not the + // location as above. This visual effect represents the flame that + // erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + + // Select the next target. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR); + } + + // HCR 3.0 - Call default death script. + ExecuteScript("nw_c2_default7", OBJECT_SELF); +} +//:://////////////////////////////////////////////////////////////////////////// diff --git a/35expandedabilities/prc_hexbl_comp_a.ncs b/35expandedabilities/prc_hexbl_comp_a.ncs new file mode 100644 index 00000000..1c7d42b5 Binary files /dev/null and b/35expandedabilities/prc_hexbl_comp_a.ncs differ diff --git a/35expandedabilities/prc_hexbl_comp_a.nss b/35expandedabilities/prc_hexbl_comp_a.nss new file mode 100644 index 00000000..65809ac8 --- /dev/null +++ b/35expandedabilities/prc_hexbl_comp_a.nss @@ -0,0 +1,42 @@ +/** + * Hexblade: Dark Companion + * 14/09/2005 + * Stratovarius + * Type of Feat: Class Specific + * Prerequisite: Hexblade level 4. + * Specifics: The Hexblade gains a dark companion. It is an illusionary creature that does not engage in combat, but all monsters near it take a -2 penalty to AC and Saves. + * Use: Selected. + */ + +#include "prc_class_const" + +void main() +{ + //Declare major variables + object oPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + // Apply the Dark Companion penalties. + // Doesn't affect allies + if(!GetIsFriend(oTarget, oPC)) + { + int nPen = GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) > 20 ? 4 : 2; + + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) > 40) + { + nPen =6; + } + + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) >= 60) + { + nPen =8; + } + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) >= 80) + { + nPen =10; + } + effect eLink = EffectSavingThrowDecrease(SAVING_THROW_ALL, nPen); + eLink = EffectLinkEffects(eLink, EffectACDecrease(nPen)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, 6.0); + } +} \ No newline at end of file diff --git a/35expandedabilities/prc_hexbl_comp_c.ncs b/35expandedabilities/prc_hexbl_comp_c.ncs new file mode 100644 index 00000000..126ad6f6 Binary files /dev/null and b/35expandedabilities/prc_hexbl_comp_c.ncs differ diff --git a/35expandedabilities/prc_hexbl_comp_c.nss b/35expandedabilities/prc_hexbl_comp_c.nss new file mode 100644 index 00000000..c0d03697 --- /dev/null +++ b/35expandedabilities/prc_hexbl_comp_c.nss @@ -0,0 +1,47 @@ +/** + * Hexblade: Dark Companion + * 14/09/2005 + * Stratovarius + * Type of Feat: Class Specific + * Prerequisite: Hexblade level 4. + * Specifics: The Hexblade gains a dark companion. It is an illusionary creature that does not engage in combat, but all monsters near it take a -2 penalty to AC and Saves. + * Use: Selected. + */ + +#include "prc_class_const" + +void main() +{ + //Declare major variables + object oPC = GetAreaOfEffectCreator(); + int nPen = GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) > 20 ? 4 : 2; + + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) > 40) + { + nPen =6; + } + + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) >= 60) + { + nPen =8; + } + if(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC) >= 80) + { + nPen =10; + } + effect eLink = EffectSavingThrowDecrease(SAVING_THROW_ALL, nPen); + eLink = EffectLinkEffects(eLink, EffectACDecrease(nPen)); + + object oTarget = GetFirstInPersistentObject(OBJECT_SELF); + while(GetIsObjectValid(oTarget)) + { + // Apply the loss + // Doesn't affect allies + if(!GetIsFriend(oTarget, oPC)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, 6.0); + } + //Get next target. + oTarget = GetNextInPersistentObject(OBJECT_SELF); + } +} \ No newline at end of file diff --git a/35expandedabilities/prc_hexbl_curse.ncs b/35expandedabilities/prc_hexbl_curse.ncs new file mode 100644 index 00000000..084939a0 Binary files /dev/null and b/35expandedabilities/prc_hexbl_curse.ncs differ diff --git a/35expandedabilities/prc_hexbl_curse.nss b/35expandedabilities/prc_hexbl_curse.nss new file mode 100644 index 00000000..63e3b330 --- /dev/null +++ b/35expandedabilities/prc_hexbl_curse.nss @@ -0,0 +1,62 @@ +/* + prc_hexbl_curse + + Afflicted creatures save or suffer a large penalty to stats. +*/ + +#include "prc_inc_combat" + +void main() +{ + object oCaster = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + if(GetHasFeatEffect(FEAT_HEXCURSE, oTarget)) + { + FloatingTextStrRefOnCreature(100775, oCaster, FALSE);//"Target already has this effect!" + IncrementRemainingFeatUses(oCaster, FEAT_HEXCURSE); + return; + } + + if(!TakeSwiftAction(oCaster)) + { + FloatingTextStringOnCreature("You can use this ability only once per round!", oCaster, FALSE); + IncrementRemainingFeatUses(oCaster, FEAT_HEXCURSE); + return; + } + + int nClass = GetLevelByClass(CLASS_TYPE_HEXBLADE, oCaster); + int nDC = 10 + GetAbilityModifier(ABILITY_CHARISMA, oCaster) + (nClass / 2); + int nDmgType = GetWeaponDamageType(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTarget)); + if(nDmgType == -1) nDmgType = DAMAGE_TYPE_BLUDGEONING; + effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); + + int nPen = 2; + if (nClass > 96) nPen = 20; + else if (nClass > 88) nPen = 18; + else if (nClass > 76) nPen = 16; + else if (nClass > 68) nPen = 14; + else if (nClass > 56) nPen = 12; + else if (nClass > 48) nPen = 10; + else if (nClass > 36) nPen = 8; + else if (nClass > 18) nPen = 6; + else if (nClass >= 6) nPen = 4; + + //if(GetHasFeat(FEAT_EMPOWER_CURSE, oCaster)) + // nPen += 1; + + effect eLink = EffectLinkEffects(EffectAttackDecrease(nPen), EffectSavingThrowDecrease(SAVING_THROW_ALL, nPen)); + eLink = EffectLinkEffects(eLink, EffectDamageDecrease(nPen, nDmgType)); + eLink = EffectLinkEffects(eLink, EffectSkillDecrease(SKILL_ALL_SKILLS, nPen)); + eLink = SupernaturalEffect(eLink); + + //Make Will Save + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + //Apply Effect and VFX + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(1)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + else // Doesn't count as used if the target makes their save + IncrementRemainingFeatUses(oCaster, FEAT_HEXCURSE); +} \ No newline at end of file diff --git a/35expandedabilities/prc_kotmc_combat.ncs b/35expandedabilities/prc_kotmc_combat.ncs new file mode 100644 index 00000000..01bc55e0 Binary files /dev/null and b/35expandedabilities/prc_kotmc_combat.ncs differ diff --git a/35expandedabilities/prc_kotmc_combat.nss b/35expandedabilities/prc_kotmc_combat.nss new file mode 100644 index 00000000..68abba33 --- /dev/null +++ b/35expandedabilities/prc_kotmc_combat.nss @@ -0,0 +1,232 @@ +//:://///////////////////////////////////////////// +//:: Knight of the Middle Circle - Combat Sense +//:: prc_kotmc_combat.nss +//::////////////////////////////////////////////// +//:: Applies a temporary AC and Attack bonus vs +//:: monsters of the targets racial type +//::////////////////////////////////////////////// +//:: Created By: Stratovarius +//:: Created On: July 16, 2004 +//::////////////////////////////////////////////// +#include "inc_item_props" //adicionado por mim, pq na versao 3.5 do prc essa biblioteca nao estava aqui. +#include "prc_alterations" +#include "prc_class_const" + + +/* +//adicionado essa funcao direto do prc 2.2c do inc_item_props pq o prc mais recente nao tinha essa funcao ou eu nao achei +object GetPCSkin(object oPC); + + +object GetPCSkinKMC(object oPC) +{ + object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC); + if (!GetIsObjectValid(oSkin)) + { + if ( GetHasItem(oPC, "base_prc_skin")) + { + oSkin = GetItemPossessedBy(oPC,"base_prc_skin"); + AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR)); + } + + //Added GetHasItem check to prevent creation of extra skins on module entry + else { + oSkin = CreateItemOnObject("base_prc_skin", oPC); + AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR)); + } + } + return oSkin; +} +*/ + + +void main() +{ + //Declare main variables. + object oPC = OBJECT_SELF; + object oSkin = GetPCSkin(oPC); + object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC); + object oTarget = PRCGetSpellTargetObject(); + int nRace = MyPRCGetRacialType(oTarget); + int nClass = GetLevelByClass(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, oPC) + GetLevelByClass(CLASS_TYPE_PALADIN, oPC); + int nDur = nClass + 3; + int nAC; + int nAttack; + + + + if (nClass >= 1) + { + nAC = 2; + nAttack = 2; + } + if (nClass >= 5) + { + nAC = 4; + nAttack = 4; + } + if (nClass >= 10) + { + nAC = 6; + nAttack = 6; + } + if (nClass >= 15) + { + nAC = 8; + nAttack = 8; + } + if (nClass >= 20) + { + nAC = 10; + nAttack = 10; + } + if (nClass >= 25) + { + nAC = 12; + nAttack = 12; + } + if (nClass >= 30) + { + nAC = 14; + nAttack = 14; + } + + if (nClass >= 35) + { + nAC = 16; + nAttack = 16; + } + + if (nClass >= 40) + { + nAC = 18; + nAttack = 18; + } + + if (nClass >= 45) + { + nAC = 20; + nAttack = 20; + } + + if (nClass >= 50) + { + nAC = 22; + nAttack = 22; + } + + if (nClass >= 55) + { + nAC = 24; + nAttack = 24; + } + + if (nClass >= 60) + { + nAC = 26; + nAttack = 26; + } + + if (nClass >= 65) + { + nAC = 28; + nAttack = 28; + } + + if (nClass >= 70) + { + nAC = 30; + nAttack = 30; + } + + if (nClass >= 75) + { + nAC = 32; + nAttack = 32; + } + + if (nClass >= 80) + { + nAC = 34; + nAttack = 34; + } + + + + + + + + +/* + //codigo antigo prc 2.2c + + if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return; + + effect eAttack = EffectAttackIncrease(nAttack); + effect eAC = EffectACIncrease(nAC); + + VersusRacialTypeEffect(eAttack, nRace); + VersusRacialTypeEffect(eAC, nRace); + + SetLocalInt(oPC, "KOTMCCombat", TRUE); + DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat")); + */ + + + +/* //codigo prc 3.5 que nao funciona + + if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return; + + effect eAttack = EffectAttackIncrease(nAttack); + effect eAC = EffectACIncrease(nAC); + + eAttack = VersusRacialTypeEffect(eAttack, nRace); + eAC = VersusRacialTypeEffect(eAC, nRace); + + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttack, oPC, RoundsToSeconds(nDur)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oPC, RoundsToSeconds(nDur)); + + SetLocalInt(oPC, "KOTMCCombat", TRUE); + DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat")); + + */ + + + if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return; + + //effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP); + effect eAC = EffectACIncrease(nAC); + + eAC = VersusRacialTypeEffect(eAC, nRace); + + effect eAttack = EffectAttackIncrease(nAttack); + + eAttack = VersusRacialTypeEffect(eAttack, nRace); + + + // effect eImmune = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS); + // eImmune = VersusAlignmentEffect(eImmune,ALIGNMENT_ALL, nAlign); + effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR); + effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + + effect eLink = EffectLinkEffects( eAC, eAttack); + // eLink = EffectLinkEffects(eLink, eAC); + eLink = EffectLinkEffects(eLink, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + //Apply the VFX impact and effects + //Fire cast spell at event for the specified target + // SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PROTECTION_FROM_EVIL, FALSE)); + //SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDur),TRUE,-1,nClass); + + SetLocalInt(oPC, "KOTMCCombat", TRUE); + DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat")); + + + + + +} diff --git a/35expandedabilities/psi_sk_manifmbld.ncs b/35expandedabilities/psi_sk_manifmbld.ncs new file mode 100644 index 00000000..b9fee17f Binary files /dev/null and b/35expandedabilities/psi_sk_manifmbld.ncs differ diff --git a/35expandedabilities/psi_sk_manifmbld.nss b/35expandedabilities/psi_sk_manifmbld.nss new file mode 100644 index 00000000..866382d6 --- /dev/null +++ b/35expandedabilities/psi_sk_manifmbld.nss @@ -0,0 +1,430 @@ +//:://///////////////////////////////////////////// +//:: Soulknife: Manifest Mindblade +//:: psi_sk_manifmbld +//:://///////////////////////////////////////////// +/** @file Soulknife: Manifest Mindblade + Handles creation of mindblades. + + + @author Ornedan + @date Created - 07.04.2005 + @date Modified - 01.09.2005 +*/ +//::////////////////////////////////////////////// +//::////////////////////////////////////////////// + +#include "prc_inc_combat" +#include "psi_inc_soulkn" + +int LOCAL_DEBUG = DEBUG; + +////////////////////////////////////////////////// +/* Function prototypes */ +////////////////////////////////////////////////// + +// Handles adding in the enhancement bonuses and specials +// ====================================================== +// oMbld mindblade item +void BuildMindblade(object oPC, object oMbld, int nMbldType); + + +void main() +{ + if(LOCAL_DEBUG) DoDebug("Starting psi_sk_manifmbld"); + object oPC = OBJECT_SELF; + object oMbld; + int nMbldType = GetPersistantLocalInt(oPC, MBLADE_SHAPE); + int nHand = GetPersistantLocalInt(oPC, MBLADE_HAND); + + // If this is the very first time a PC is manifesting a mindblade, initialise the hand to be main hand + if(!nHand) + { + nHand = INVENTORY_SLOT_RIGHTHAND; + SetPersistantLocalInt(oPC, MBLADE_HAND, INVENTORY_SLOT_RIGHTHAND); + } + + // Generate the item based on type selection + switch(nMbldType) + { + case MBLADE_SHAPE_DUAL_SHORTSWORDS: + //SendMessageToPC(oPC, "psi_sk_manifmbld: First of dual shortswords - "); + // The first of dual mindblades always goes to mainhand + nHand = INVENTORY_SLOT_RIGHTHAND; + case MBLADE_SHAPE_SHORTSWORD: + //SendMessageToPC(oPC, "psi_sk_manifmbld: Created shortsword"); + oMbld = CreateItemOnObject("prc_sk_mblade_ss", oPC); + break; + case MBLADE_SHAPE_LONGSWORD: + //SendMessageToPC(oPC, "psi_sk_manifmbld: Created longsword"); + oMbld = CreateItemOnObject("prc_sk_mblade_ls", oPC); + break; + case MBLADE_SHAPE_BASTARDSWORD: + //SendMessageToPC(oPC, "psi_sk_manifmbld: Created bastardsword"); + oMbld = CreateItemOnObject("prc_sk_mblade_bs", oPC); + break; + case MBLADE_SHAPE_RANGED: + //SendMessageToPC(oPC, "psi_sk_manifmbld: Created throwing mindblade"); + // Create one more mindblade than needed in order to bypass the BW bug of the last thrown weapon in a stack no longer being a valid object in the OnHitCast script + oMbld = CreateItemOnObject("prc_sk_mblade_th", oPC, (GetHasFeat(FEAT_MULTIPLE_THROW, oPC) ? GetMainHandAttacks(oPC) : 1) + 1); + break; + + default: + WriteTimestampedLogEntry("Invalid value in MBLADE_SHAPE for " + GetName(oPC) + ": " + IntToString(nMbldType)); + return; + } + + // Construct the bonuses + /*DelayCommand(0.25f, */BuildMindblade(oPC, oMbld, nMbldType)/*)*/; + + // check for existing one before equipping and destroy + if(GetStringLeft(GetTag(GetItemInSlot(nHand, oPC)), 14) == "prc_sk_mblade_") + MyDestroyObject(GetItemInSlot(nHand, oPC)); + // Force equip + AssignCommand(oPC, ActionEquipItem(oMbld, nHand)); + + // Hook the mindblade into OnHit event + AddEventScript(oMbld, EVENT_ITEM_ONHIT, "psi_sk_onhit", TRUE, FALSE); + + // Make even more sure the mindblade cannot be dropped + SetDroppableFlag(oMbld, FALSE); + SetItemCursedFlag(oMbld, TRUE); + + // Generate the second mindblade if set to dual shortswords + if(nMbldType == MBLADE_SHAPE_DUAL_SHORTSWORDS) + { + oMbld = CreateItemOnObject("prc_sk_mblade_ss", oPC); + + //SendMessageToPC(oPC, "psi_sk_manifmbld: Created second mindblade - is valid: " + (GetIsObjectValid(oMbld) ? "TRUE":"FALSE")); + + DelayCommand(0.5f, BuildMindblade(oPC, oMbld, nMbldType)); // Delay a bit to prevent a lag spike + //BuildMindblade(oPC, oMbld, nMbldType); + AssignCommand(oPC, ActionDoCommand(ActionEquipItem(oMbld, INVENTORY_SLOT_LEFTHAND))); + //AssignCommand(oPC, ActionEquipItem(oMbld, INVENTORY_SLOT_LEFTHAND)); + AddEventScript(oMbld, EVENT_ITEM_ONHIT, "psi_sk_onhit", TRUE, FALSE); + + SetDroppableFlag(oMbld, FALSE); + SetItemCursedFlag(oMbld, TRUE); + } + // Not dual-wielding, so delete the second mindblade if they have such + else + { + // Get the other hand + int nOtherHand; + if(nHand == INVENTORY_SLOT_RIGHTHAND) + nOtherHand = INVENTORY_SLOT_LEFTHAND; + else + nOtherHand = INVENTORY_SLOT_RIGHTHAND; + // Check it's contents and take action if necessary + if(GetStringLeft(GetTag(GetItemInSlot(nOtherHand, oPC)), 14) == "prc_sk_mblade_") + MyDestroyObject(GetItemInSlot(nOtherHand, oPC)); + } + +/* Now in their own script - psi_sk_clseval + // Hook psi_sk_event to the mindblade-related events it handles + AddEventScript(oPC, EVENT_ONPLAYEREQUIPITEM, "psi_sk_event", TRUE, FALSE); + AddEventScript(oPC, EVENT_ONPLAYERUNEQUIPITEM, "psi_sk_event", TRUE, FALSE); + AddEventScript(oPC, EVENT_ONUNAQUIREITEM, "psi_sk_event", TRUE, FALSE); + AddEventScript(oPC, EVENT_ONPLAYERDEATH, "psi_sk_event", TRUE, FALSE); + AddEventScript(oPC, EVENT_ONPLAYERLEVELDOWN, "psi_sk_event", TRUE, FALSE); +*/ + if(LOCAL_DEBUG) DelayCommand(0.01f, DoDebug("Finished psi_sk_manifmbld")); // Wrap in delaycommand so that the game clock gets to update for the purposes of WriteTimestampedLogEntry +} + + +void BuildMindblade(object oPC, object oMbld, int nMbldType) +{ + /* Add normal stuff and VFX */ + /// Add enhancement bonus + int nSKLevel = GetLevelByClass(CLASS_TYPE_SOULKNIFE, oPC); +/* if(GetHasFeat(FEAT_PRACTICED_MIND_BLADE, oPC)){ + int nNonSoulKnifeLevels = GetHitDice(oPC) - nSKLevel; + nSKLevel += min(nNonSoulKnifeLevels, 4); + } */ + int nEnh; + // The first actual enhancement bonus is gained at L4, but the mindblade needs to + // have enhancement right from the beginning to pierce DR as per being magical + if(nSKLevel < 4) + { + nEnh = 1; + // The mindblade being magical should grant no benefits to attack or damage + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyAttackPenalty(1), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamagePenalty(1), oMbld); + } + else + { + nEnh = nSKLevel <= 20 ? + nSKLevel / 4: // Boni are granget +1 / 4 levels pre-epic + (nSKLevel - 20) / 5 + 5; // Boni are granted +1 / 5 levels epic + // Dual mindblades have one lower bonus + nEnh -= nMbldType == MBLADE_SHAPE_DUAL_SHORTSWORDS ? 1 : 0; + } + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyEnhancementBonus(nEnh), oMbld); + // In case of bastard sword, store the enhancement bonus for later for use in the 2-h handling code + if(nMbldType == MBLADE_SHAPE_BASTARDSWORD) + SetLocalInt(oMbld, "PRC_SK_BSwd_EnhBonus", nEnh); + + // Handle Greater Weapon Focus (mindblade) here. It grants +1 to attack with any shape of mindblade. + // Because of stacking issues, the actual value granted is enhancement bonus + 1. + if(GetHasFeat(FEAT_GREATER_WEAPON_FOCUS_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyAttackBonus(nEnh + 1), oMbld); + + /// Add in VFX + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyVisualEffect(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD ? ITEM_VISUAL_HOLY : + GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL ? ITEM_VISUAL_EVIL : + ITEM_VISUAL_SONIC + ), oMbld); + + /* Add in common feats */ + //string sTag = GetTag(oMbld); + // For the purposes of the rest of this function, dual shortswords is the same as single shortsword + if(nMbldType == MBLADE_SHAPE_DUAL_SHORTSWORDS) nMbldType = MBLADE_SHAPE_SHORTSWORD; + + // Weapon Focus + /* Every soulknife has this, so it's automatically on the weapons now. Uncomment if for some reason another class with the mindblade class feature is added + if(GetHasFeat(FEAT_WEAPON_FOCUS_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_WEAPON_FOCUS_SHORT_SWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_WEAPON_FOCUS_LONG_SWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_WEAPON_FOCUS_BASTARD_SWORD : + IP_CONST_FEAT_WEAPON_FOCUS_THROWING_AXE + ), oMbld);*/ + // Improved Critical + if(GetHasFeat(FEAT_IMPROVED_CRITICAL_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_IMPROVED_CRITICAL_SHORT_SWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_IMPROVED_CRITICAL_LONG_SWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_IMPROVED_CRITICAL_BASTARD_SWORD : + IP_CONST_FEAT_IMPROVED_CRITICAL_THROWING_AXE + ), oMbld); + // Overwhelming Critical + if(GetHasFeat(FEAT_OVERWHELMING_CRITICAL_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_EPIC_OVERWHELMING_CRITICAL_SHORTSWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_EPIC_OVERWHELMING_CRITICAL_LONGSWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_EPIC_OVERWHELMING_CRITICAL_BASTARDSWORD : + IP_CONST_FEAT_EPIC_OVERWHELMING_CRITICAL_THROWINGAXE + ), oMbld); + // Devastating Critical + if(GetHasFeat(FEAT_DEVASTATING_CRITICAL_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_EPIC_DEVASTATING_CRITICAL_SHORTSWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_EPIC_DEVASTATING_CRITICAL_LONGSWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_EPIC_DEVASTATING_CRITICAL_BASTARDSWORD : + IP_CONST_FEAT_EPIC_DEVASTATING_CRITICAL_THROWINGAXE + ), oMbld); + // Weapon Specialization + if(GetHasFeat(FEAT_WEAPON_SPECIALIZATION_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_WEAPON_SPECIALIZATION_SHORT_SWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_WEAPON_SPECIALIZATION_LONG_SWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_WEAPON_SPECIALIZATION_BASTARD_SWORD : + IP_CONST_FEAT_WEAPON_SPECIALIZATION_THROWING_AXE + ), oMbld); + // Epic Weapon Focus + if(GetHasFeat(FEAT_EPIC_WEAPON_FOCUS_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_EPIC_WEAPON_FOCUS_SHORT_SWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_EPIC_WEAPON_FOCUS_LONG_SWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_EPIC_WEAPON_FOCUS_BASTARD_SWORD : + IP_CONST_FEAT_EPIC_WEAPON_FOCUS_THROWING_AXE + ), oMbld); + // Epic Weapon Specialization + if(GetHasFeat(FEAT_EPIC_WEAPON_SPECIALIZATION_MINDBLADE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_EPIC_WEAPON_SPECIALIZATION_SHORT_SWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_EPIC_WEAPON_SPECIALIZATION_LONG_SWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_EPIC_WEAPON_SPECIALIZATION_BASTARD_SWORD : + IP_CONST_FEAT_EPIC_WEAPON_SPECIALIZATION_THROWING_AXE + ), oMbld); + // Weapon of Choice + if(GetHasFeat(FEAT_WEAPON_OF_CHOICE_MINDBLADE, oPC) && nMbldType != MBLADE_SHAPE_RANGED) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(nMbldType == MBLADE_SHAPE_SHORTSWORD ? IP_CONST_FEAT_WEAPON_OF_CHOICE_SHORTSWORD : + nMbldType == MBLADE_SHAPE_LONGSWORD ? IP_CONST_FEAT_WEAPON_OF_CHOICE_LONGSWORD : + nMbldType == MBLADE_SHAPE_BASTARDSWORD ? IP_CONST_FEAT_WEAPON_OF_CHOICE_BASTARDSWORD : + -1 // This shouldn't ever be reached + ), oMbld); + // Bladewind: Due to some moron @ BioWare, calls to DoWhirlwindAttack() do not do anything if one + // does not have the feat. Therefore, we need to grant it as a bonus feat on the blade. + if(GetHasFeat(FEAT_BLADEWIND, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(IP_CONST_FEAT_WHIRLWIND), oMbld); + + + /* Apply the enhancements */ + int nFlags = GetPersistantLocalInt(oPC, MBLADE_FLAGS); + int bLight = FALSE; + + if(nFlags & MBLADE_FLAG_LUCKY) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyCastSpell(IP_CONST_CASTSPELL_MINDBLADE_LUCKY, IP_CONST_CASTSPELL_NUMUSES_1_USE_PER_DAY), oMbld); + } + if(nFlags & MBLADE_FLAG_DEFENDING) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyACBonus(2+nEnh), oMbld); //adicionado o bonus de enhancement para o ac + } + if(nFlags & MBLADE_FLAG_KEEN) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyKeen(), oMbld); + } + /*if(nFlags & MBLADE_FLAG_VICIOUS) + { OnHit + }*/ + if(nFlags & MBLADE_FLAG_PSYCHOKINETIC && !(nFlags & MBLADE_FLAG_PSYCHOKINETICBURST)) // Only Psychokinetic + { + if(nSKLevel <= 10) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d4), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 11 && nSKLevel <= 20) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d6), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 21 && nSKLevel <= 30) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d8), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 31 && nSKLevel <= 40) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d10), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 41) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d12), oMbld); + bLight = TRUE; + } + + } + if(nFlags & MBLADE_FLAG_MIGHTYCLEAVING) + { + if(GetHasFeat(FEAT_CLEAVE, oPC)) + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(IP_CONST_FEAT_GREAT_CLEAVE), oMbld); + else + AddItemProperty(DURATION_TYPE_PERMANENT, PRCItemPropertyBonusFeat(IP_CONST_FEAT_CLEAVE), oMbld); + } + if(nFlags & MBLADE_FLAG_COLLISION) + { + if(nSKLevel <= 10) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_5), oMbld); + } + if(nSKLevel >= 11 && nSKLevel <= 20) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_6), oMbld); + } + if(nSKLevel >= 21 && nSKLevel <= 30) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_7), oMbld); + } + if(nSKLevel >= 31 && nSKLevel <= 40) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_8), oMbld); + } + if(nSKLevel >= 41 && nSKLevel <= 50) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_9), oMbld); + } + if(nSKLevel >= 51 ) + { + if(LOCAL_DEBUG) DoDebug("Added Collision damage", oPC); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_BLUDGEONING, IP_CONST_DAMAGEBONUS_10), oMbld); + } + } + /*if(nFlags & MBLADE_FLAG_MINDCRUSHER ) + { OnHit + }*/ + if(nFlags & MBLADE_FLAG_PSYCHOKINETICBURST && !(nFlags & MBLADE_FLAG_PSYCHOKINETIC)) // Only Psychokinetic Burst + { + if(nSKLevel <= 10) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d4), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d6), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 11 && nSKLevel <= 20) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d6), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d8), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 21 && nSKLevel <= 30) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d8), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d10), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 31 && nSKLevel <= 40) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d10), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d12), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 41) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_1d12), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d8), oMbld); + bLight = TRUE; + } + } + /*if(nFlags & MBLADE_FLAG_SUPPRESSION) + { OnHit + }*/ + /*if(nFlags & MBLADE_FLAG_WOUNDING) + { OnHit + }*/ + /*if(nFlags & MBLADE_FLAG_DISRUPTING) + { OnHit + } + if(nFlags & MBLADE_FLAG_SOULBREAKER) + { + }*/ + if((nFlags & MBLADE_FLAG_PSYCHOKINETICBURST) && (nFlags & MBLADE_FLAG_PSYCHOKINETIC)) // Both Psychokinetic and Psychokinetic Burst + { + if(nSKLevel <= 10) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d4), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d6), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 11 && nSKLevel <=20) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d6), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d8), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 21 && nSKLevel <=30) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d8), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d10), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 31 && nSKLevel <=40) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d10), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_1d12), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 41 && nSKLevel <=50) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d12), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d8), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 51 && nSKLevel <=60) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d12), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d10), oMbld); + bLight = TRUE; + } + if(nSKLevel >= 61) + { + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL, IP_CONST_DAMAGEBONUS_2d12), oMbld); + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d12), oMbld); + bLight = TRUE; + } + + } + + if(bLight) + AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyLight(IP_CONST_LIGHTBRIGHTNESS_NORMAL, IP_CONST_LIGHTCOLOR_WHITE), oMbld); +} \ No newline at end of file diff --git a/35expandedabilities/x2_s1_dragneg.ncs b/35expandedabilities/x2_s1_dragneg.ncs new file mode 100644 index 00000000..c0f688f5 Binary files /dev/null and b/35expandedabilities/x2_s1_dragneg.ncs differ diff --git a/35expandedabilities/x2_s1_dragneg.nss b/35expandedabilities/x2_s1_dragneg.nss new file mode 100644 index 00000000..a1b34e9a --- /dev/null +++ b/35expandedabilities/x2_s1_dragneg.nss @@ -0,0 +1,299 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Negative Energy +//:: NW_S1_DragNeg +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper damage and DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// + +const string DRAGBREATHLOCK = "DragonBreathLock"; + + +//modified to use the breath include - Fox +#include "prc_inc_spells" +#include "prc_inc_breath" + +void main() +{ + // Check the dragon breath delay lock + if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK)) + { + SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon"); + return; + } + + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nDCBoost = nAge / 2; + int nDamageDice; + int nLevelDrain; //drain was commented out, kept just in case + struct breath NegBreath; + + //Determine save DC and ability damage + if (nAge <= 6) //Wyrmling + { + nLevelDrain = 1; + nDamageDice = 2; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nLevelDrain = 1; + nDamageDice = 4; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nLevelDrain = 1; + nDamageDice = 6; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nLevelDrain = 2; + nDamageDice = 8; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nLevelDrain = 2; + nDamageDice = 10; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nLevelDrain = 3; + nDamageDice = 12; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nLevelDrain = 4; + nDamageDice = 14; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nLevelDrain = 5; + nDamageDice = 16; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nLevelDrain = 5; + nDamageDice = 18; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nLevelDrain = 6; + nDamageDice = 20; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nLevelDrain = 7; + nDamageDice = 22; + } +else if (nAge >= 38 && nAge <= 41) //Great Wyrm + { + nDamageDice = 24; + nLevelDrain = 8; + } + else if (nAge >= 42 && nAge <= 45) //Great Wyrm + { + nDamageDice = 26; + nLevelDrain = 9; + } + else if (nAge >= 46 && nAge <= 49) //Great Wyrm + { + nDamageDice = 28; + nLevelDrain = 10; + } + + else if (nAge >= 50 && nAge <= 53) //Great Wyrm + { + nDamageDice = 30; + nLevelDrain = 11; + } + else if (nAge >= 54 && nAge <= 57) //Great Wyrm + { + nDamageDice = 32; + nLevelDrain = 12; + } + else if (nAge >= 58 && nAge <= 61) //Great Wyrm + { + nDamageDice = 34; + nLevelDrain = 13; + } + else if (nAge >= 62 && nAge <= 65) //Great Wyrm + { + nDamageDice = 36; + nLevelDrain = 14; + } + else if (nAge >= 66 && nAge <= 69) //Great Wyrm + { + nDamageDice = 38; + nLevelDrain = 15; + } + else if (nAge >= 70 && nAge <= 73) //Great Wyrm + { + nDamageDice = 40; + nLevelDrain = 16; + } + else if (nAge >= 74 && nAge <= 77) //Great Wyrm + { + nDamageDice = 42; + nLevelDrain = 17; + } + else if (nAge >= 78 && nAge <= 81) //Great Wyrm + { + nDamageDice = 44; + nLevelDrain = 18; + } + else if (nAge >= 82 && nAge <= 85) //Great Wyrm + { + nDamageDice = 46; + nLevelDrain = 19; + } + + else if (nAge >= 86 && nAge <= 89) //Great Wyrm + { + nDamageDice = 48; + nLevelDrain = 20; + } + + else if (nAge >= 90 && nAge <= 93) //Great Wyrm + { + nDamageDice = 50; + nLevelDrain = 21; + } + + else if (nAge >= 94 && nAge <= 97) //Great Wyrm + { + nDamageDice = 52; + nLevelDrain = 22; + } + + else if (nAge >= 98 && nAge <= 101) //Great Wyrm + { + nDamageDice = 54; + nLevelDrain = 23; + } + else if (nAge >= 102 && nAge <= 105) //Great Wyrm + { + nDamageDice = 56; + nLevelDrain = 24; + } + else if (nAge >= 106 && nAge <= 109) //Great Wyrm + { + nDamageDice = 58; + nLevelDrain = 25; + } + else if (nAge >= 110 && nAge <= 113) //Great Wyrm + { + nDamageDice = 60; + nLevelDrain = 26; + } + else if (nAge >= 114 && nAge <= 117) //Great Wyrm + { + nDamageDice = 62; + nLevelDrain = 27; + } + else if (nAge >= 118 && nAge <= 121) //Great Wyrm + { + nDamageDice = 64; + nLevelDrain = 28; + } + else if (nAge >= 122 && nAge <= 125) //Great Wyrm + { + nDamageDice = 66; + nLevelDrain = 29; + } + else if (nAge >= 126 && nAge <= 129) //Great Wyrm + { + nDamageDice = 68; + nLevelDrain = 30; + } + else if (nAge >= 130 && nAge <= 133) //Great Wyrm + { + nDamageDice = 70; + nLevelDrain = 31; + } + else if (nAge >= 134 && nAge <= 137) //Great Wyrm + { + nDamageDice = 72; + nLevelDrain = 32; + } + else if (nAge >= 138 && nAge <= 141) //Great Wyrm + { + nDamageDice = 74; + nLevelDrain = 33; + } + else if (nAge >= 142 && nAge <= 145) //Great Wyrm + { + nDamageDice = 76; + nLevelDrain = 34; + } + else if (nAge >= 146 && nAge <= 149) //Great Wyrm + { + nDamageDice = 78; + nLevelDrain = 35; + } + else if (nAge >= 150 && nAge <= 153) //Great Wyrm + { + nDamageDice = 80; + nLevelDrain = 36; + } + else if (nAge >= 154 && nAge <= 157) //Great Wyrm + { + nDamageDice = 82; + nLevelDrain = 37; + } + + else if (nAge >= 158 && nAge <= 161) //Great Wyrm + { + nDamageDice = 84; + nLevelDrain = 38; + } + else if (nAge >= 162 && nAge <= 165) //Great Wyrm + { + nDamageDice = 86; + nLevelDrain = 39; + } + else if (nAge >= 166 && nAge <= 169) //Great Wyrm + { + nDamageDice = 88; + nLevelDrain = 40; + } + + else if (nAge >= 170 && nAge <= 173) //Great Wyrm + { + nDamageDice = 90; + nLevelDrain = 41; + } + else if (nAge >= 174 && nAge <= 177) //Great Wyrm + { + nDamageDice = 92; + nLevelDrain = 42; + } + else if (nAge > 178 ) //Great Wyrm + { + nDamageDice = 94; + nLevelDrain = 43; + } + + //create the breath - 40' ~ 14m? - should set it based on size later + NegBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_NEGATIVE, 8, nDamageDice, ABILITY_CONSTITUTION, nDCBoost); + + //Apply the breath - note: Level drain was included but commented out in the original, thus not currently implemented in the include. + //Information on the level drain amount is kept just in case. + PRCPlayDragonBattleCry(); + ApplyBreath(NegBreath, PRCGetSpellTargetLocation()); + + //Apply the recharge lock + SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE); + + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(NegBreath.nRoundsUntilRecharge); + SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(NegBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK)); + DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now")); +} \ No newline at end of file diff --git a/35expandedabilities/x2_s2_cursesong.ncs b/35expandedabilities/x2_s2_cursesong.ncs new file mode 100644 index 00000000..05011c76 Binary files /dev/null and b/35expandedabilities/x2_s2_cursesong.ncs differ diff --git a/35expandedabilities/x2_s2_cursesong.nss b/35expandedabilities/x2_s2_cursesong.nss new file mode 100644 index 00000000..c3c17b2b --- /dev/null +++ b/35expandedabilities/x2_s2_cursesong.nss @@ -0,0 +1,2095 @@ +//:://///////////////////////////////////////////// +//:: Curse Song +//:: X2_S2_CurseSong +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spells applies penalties to all of the + bard's enemies within 30ft for a set duration of + 10 rounds. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: May 16, 2003 +//::////////////////////////////////////////////// +//:: Last Updated By: Andrew Nobbs May 20, 2003 + +#include "prc_inc_clsfunc" + +void main() +{ + + if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left + return; + } + + if (PRCGetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced + return; + } + + //RemoveOldSongEffects(OBJECT_SELF,GetSpellId()); + + //Declare major variables + int nLevel = GetLevelByClass(CLASS_TYPE_BARD) + + GetLevelByClass(CLASS_TYPE_MINSTREL_EDGE)/2 + + GetLevelByClass(CLASS_TYPE_DIRGESINGER) + + + GetLevelByClass(CLASS_TYPE_DRAGONSONG_LYRIST) + + GetLevelByClass(CLASS_TYPE_HEARTWARDER) + + GetLevelByClass(CLASS_TYPE_SPELLDANCER) + + GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD) + + GetLevelByClass(CLASS_TYPE_BLADESINGER) + + GetLevelByClass(CLASS_TYPE_VIRTUOSO); + + int nRanks = GetSkillRank(SKILL_PERFORM); + if (GetHasFeat(FEAT_DRAGONSONG, OBJECT_SELF)) nRanks+= 2; + int nPerform = nRanks; + int nDuration = 10; //+ nChr; + + effect eAttack; + effect eDamage; + effect eWill; + effect eFort; + effect eReflex; + effect eHP; + effect eAC; + effect eSkill; + + int nAttack; + int nDamage; + int nWill; + int nFort; + int nReflex; + int nHP; + int nAC; + int nSkill; + //Check to see if the caster has Lasting Impression and increase duration. + if(GetHasFeat(870)) + { + nDuration *= 10; + } + + if(GetHasFeat(424)) // lingering song + { + nDuration += 5; + } + + + + if(nPerform >= 125 && nLevel >= 180) + { + nAttack = 36; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 348; + nAC = 36; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 179) + { + nAttack = 36; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 346; + nAC = 35; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 178) + { + nAttack = 35; + nDamage = 36; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 344; + nAC = 35; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 177) + { + nAttack = 35; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 342; + nAC = 35; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 176) + { + nAttack = 35; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 340; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 175) + { + nAttack = 34; + nDamage = 35; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 338; + nAC = 34; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 174) + { + nAttack = 34; + nDamage = 34; + nWill = 18; + nFort = 18; + nReflex = 18; + nHP = 336; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 173) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 18; + nReflex = 18; + nHP = 334; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 172) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 18; + nHP = 332; + nAC = 34; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 171) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 330; + nAC = 34; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 170) + { + nAttack = 34; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 328; + nAC = 33; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 169) + { + nAttack = 33; + nDamage = 34; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 326; + nAC = 33; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 168) + { + nAttack = 33; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 324; + nAC = 33; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 167) + { + nAttack = 33; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 322; + nAC = 32; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 166) + { + nAttack = 32; + nDamage = 33; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 320; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 165) + { + nAttack = 32; + nDamage = 32; + nWill = 17; + nFort = 17; + nReflex = 17; + nHP = 318; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 164) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 17; + nReflex = 17; + nHP = 316; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 163) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 17; + nHP = 314; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 162) + { + nAttack = 32; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 312; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 161) + { + nAttack = 31; + nDamage = 32; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 310; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 160) + { + nAttack = 31; + nDamage = 31; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 308; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 159) + { + nAttack = 30; + nDamage = 31; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 306; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 158) + { + nAttack = 30; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 304; + nAC = 32; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 157) + { + nAttack = 30; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 302; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 156) + { + nAttack = 29; + nDamage = 30; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 300; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 155) + { + nAttack = 29; + nDamage = 29; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 298; + nAC = 31; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 154) + { + nAttack = 29; + nDamage = 29; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 296; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 153) + { + nAttack = 29; + nDamage = 28; + nWill = 16; + nFort = 16; + nReflex = 16; + nHP = 294; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 152) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 16; + nReflex = 16; + nHP = 292; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 151) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 16; + nHP = 290; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 150) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 288; + nAC = 30; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 149) + { + nAttack = 29; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 286; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 148) + { + nAttack = 28; + nDamage = 28; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 284; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 147) + { + nAttack = 28; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 282; + nAC = 29; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 146) + { + nAttack = 28; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 280; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 145) + { + nAttack = 27; + nDamage = 27; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 278; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 144) + { + nAttack = 27; + nDamage = 26; + nWill = 15; + nFort = 15; + nReflex = 15; + nHP = 276; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 143) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 15; + nReflex = 15; + nHP = 274; + nAC = 28; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 142) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 15; + nHP = 272; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 141) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 270; + nAC = 28; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 140) + { + nAttack = 27; + nDamage = 26; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 268; + nAC = 27; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 139) + { + nAttack = 27; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 266; + nAC = 27; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 138) + { + nAttack = 27; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 264; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 137) + { + nAttack = 26; + nDamage = 25; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 262; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 136) + { + nAttack = 26; + nDamage = 24; + nWill = 14; + nFort = 14; + nReflex = 14; + nHP = 260; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 135) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 14; + nReflex = 14; + nHP = 258; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 134) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 13; + nReflex = 14; + nHP = 256; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 133) + { + nAttack = 26; + nDamage = 24; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 254; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 132) + { + nAttack = 26; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 252; + nAC = 26; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 131) + { + nAttack = 26; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 250; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 130) + { + nAttack = 25; + nDamage = 23; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 248; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 129) + { + nAttack = 25; + nDamage = 22; + nWill = 13; + nFort = 13; + nReflex = 13; + nHP = 246; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 128) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 13; + nReflex = 13; + nHP = 244; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 127) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 12; + nReflex = 13; + nHP = 242; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 126) + { + nAttack = 25; + nDamage = 22; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 240; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 125) + { + nAttack = 25; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 238; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 124) + { + nAttack = 24; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 236; + nAC = 25; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 123) + { + nAttack = 24; + nDamage = 21; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 234; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 122) + { + nAttack = 24; + nDamage = 20; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 232; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 121) + { + nAttack = 23; + nDamage = 20; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 230; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 120) + { + nAttack = 23; + nDamage = 19; + nWill = 12; + nFort = 12; + nReflex = 12; + nHP = 228; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 119) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 12; + nReflex = 12; + nHP = 226; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 118) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 12; + nHP = 224; + nAC = 24; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 117) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 222; + nAC = 24; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 116) + { + nAttack = 23; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 220; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 115) + { + nAttack = 22; + nDamage = 19; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 218; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 114) + { + nAttack = 22; + nDamage = 18; + nWill = 11; + nFort = 11; + nReflex = 11; + nHP = 216; + nAC = 23; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 113) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 11; + nReflex = 11; + nHP = 214; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 112) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 11; + nHP = 212; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 111) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 210; + nAC = 23; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 110) + { + nAttack = 22; + nDamage = 18; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 208; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 109) + { + nAttack = 22; + nDamage = 17; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 206; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 108) + { + nAttack = 21; + nDamage = 17; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 204; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 107) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 202; + nAC = 22; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 106) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 200; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 105) + { + nAttack = 21; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 198; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 104) + { + nAttack = 20; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 196; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 103) + { + nAttack = 20; + nDamage = 16; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 194; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 102) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 192; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 101) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 190; + nAC = 21; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 100) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 188; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 99) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 186; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 98) + { + nAttack = 20; + nDamage = 15; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 184; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 97) + { + nAttack = 20; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 182; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 96) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 180; + nAC = 20; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 95) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 178; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 94) + { + nAttack = 19; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 176; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 93) + { + nAttack = 18; + nDamage = 14; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 174; + nAC = 19; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 92) + { + nAttack = 18; + nDamage = 13; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 172; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 91) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 170; + nAC = 19; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 90) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 168; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 89) + { + nAttack = 18; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 166; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 88) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 164; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 87) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 162; + nAC = 18; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 86) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 160; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 85) + { + nAttack = 17; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 158; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 84) + { + nAttack = 16; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 156; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 83) + { + nAttack = 15; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 154; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 82) + { + nAttack = 14; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 152; + nAC = 17; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 81) + { + nAttack = 14; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 150; + nAC = 16; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 80) + { + nAttack = 13; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 148; + nAC = 16; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 79) + { + nAttack = 12; + nDamage = 12; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 146; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 78) + { + nAttack = 12; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 144; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 77) + { + nAttack = 11; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 142; + nAC = 16; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 76) + { + nAttack = 11; + nDamage = 11; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 140; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 75) + { + nAttack = 11; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 138; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 74) + { + nAttack = 10; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 136; + nAC = 15; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 73) + { + nAttack = 10; + nDamage = 10; + nWill = 10; + nFort = 10; + nReflex = 10; + nHP = 134; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 72) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 10; + nReflex = 10; + nHP = 132; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 71) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 9; + nReflex = 10; + nHP = 130; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 70) + { + nAttack = 10; + nDamage = 10; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 128; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 69) + { + nAttack = 10; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 126; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 68) + { + nAttack = 9; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 124; + nAC = 14; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 67) + { + nAttack = 9; + nDamage = 9; + nWill = 9; + nFort = 9; + nReflex = 9; + nHP = 122; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 66) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 9; + nReflex = 9; + nHP = 120; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 65) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 8; + nReflex = 9; + nHP = 118; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 64) + { + nAttack = 9; + nDamage = 9; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 116; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 63) + { + nAttack = 9; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 114; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 62) + { + nAttack = 8; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 112; + nAC = 13; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 61) + { + nAttack = 8; + nDamage = 8; + nWill = 8; + nFort = 8; + nReflex = 8; + nHP = 110; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 60) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 8; + nReflex = 8; + nHP = 108; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 59) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 7; + nReflex = 8; + nHP = 106; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 58) + { + nAttack = 8; + nDamage = 8; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 104; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 57) + { + nAttack = 8; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 102; + nAC = 12; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 56) + { + nAttack = 7; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 100; + nAC = 12; + nSkill = 20; + } + + if(nPerform >= 125 && nLevel >= 55) + { + nAttack = 7; + nDamage = 7; + nWill = 7; + nFort = 7; + nReflex = 7; + nHP = 98; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 54) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 7; + nReflex = 7; + nHP = 96; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 53) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 7; + nHP = 94; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 52) + { + nAttack = 7; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 92; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 51) + { + nAttack = 6; + nDamage = 7; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 90; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 50) + { + nAttack = 6; + nDamage = 6; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 88; + nAC = 11; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 49) + { + nAttack = 6; + nDamage = 6; + nWill = 6; + nFort = 6; + nReflex = 6; + nHP = 86; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 48) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 6; + nReflex = 6; + nHP = 84; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 47) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 5; + nReflex = 6; + nHP = 82; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 46) + { + nAttack = 6; + nDamage = 6; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 80; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 45) + { + nAttack = 6; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 78; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 44) + { + nAttack = 5; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 76; + nAC = 10; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 43) + { + nAttack = 5; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 74; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 42) + { + nAttack = 4; + nDamage = 5; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 72; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 41) + { + nAttack = 4; + nDamage = 4; + nWill = 5; + nFort = 5; + nReflex = 5; + nHP = 70; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 40) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 5; + nReflex = 5; + nHP = 68; + nAC = 9; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 39) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 5; + nHP = 66; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 38) + { + nAttack = 4; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 64; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 37) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 4; + nReflex = 4; + nHP = 62; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 36) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 3; + nReflex = 4; + nHP = 60; + nAC = 8; + nSkill = 20; + } + if(nPerform >= 125 && nLevel >= 35) + { + nAttack = 3; + nDamage = 4; + nWill = 4; + nFort = 3; + nReflex = 3; + nHP = 58; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 120 && nLevel >= 34) + { + nAttack = 3; + nDamage = 4; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 56; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 115 && nLevel >= 33) + { + nAttack = 3; + nDamage = 3; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 54; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 110 && nLevel >= 32) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 3; + nReflex = 3; + nHP = 52; + nAC = 7; + nSkill = 20; + } + if(nPerform >= 105 && nLevel >= 31) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 3; + nHP = 50; + nAC = 7; + nSkill = 20; + } + + if(nPerform >= 100 && nLevel >= 30) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 48; + nAC = 7; + nSkill = 18; + } + else if(nPerform >= 95 && nLevel >= 29) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 46; + nAC = 6; + nSkill = 17; + } + else if(nPerform >= 90 && nLevel >= 28) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 44; + nAC = 6; + nSkill = 16; + } + else if(nPerform >= 85 && nLevel >= 27) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 42; + nAC = 6; + nSkill = 15; + } + else if(nPerform >= 80 && nLevel >= 26) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 40; + nAC = 6; + nSkill = 14; + } + else if(nPerform >= 75 && nLevel >= 25) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 38; + nAC = 6; + nSkill = 13; + } + else if(nPerform >= 70 && nLevel >= 24) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 36; + nAC = 5; + nSkill = 12; + } + else if(nPerform >= 65 && nLevel >= 23) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 34; + nAC = 5; + nSkill = 11; + } + else if(nPerform >= 60 && nLevel >= 22) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 32; + nAC = 5; + nSkill = 10; + } + else if(nPerform >= 55 && nLevel >= 21) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 30; + nAC = 5; + nSkill = 9; + } + else if(nPerform >= 50 && nLevel >= 20) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 28; + nAC = 5; + nSkill = 8; + } + else if(nPerform >= 45 && nLevel >= 19) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 26; + nAC = 5; + nSkill = 7; + } + else if(nPerform >= 40 && nLevel >= 18) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 24; + nAC = 5; + nSkill = 6; + } + else if(nPerform >= 35 && nLevel >= 17) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 22; + nAC = 5; + nSkill = 5; + } + else if(nPerform >= 30 && nLevel >= 16) + { + nAttack = 2; + nDamage = 3; + nWill = 3; + nFort = 2; + nReflex = 2; + nHP = 20; + nAC = 5; + nSkill = 4; + } + else if(nPerform >= 24 && nLevel >= 15) + { + nAttack = 2; + nDamage = 3; + nWill = 2; + nFort = 2; + nReflex = 2; + nHP = 16; + nAC = 4; + nSkill = 3; + } + else if(nPerform >= 21 && nLevel >= 14) + { + nAttack = 2; + nDamage = 3; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 16; + nAC = 3; + nSkill = 2; + } + else if(nPerform >= 18 && nLevel >= 11) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 2; + nSkill = 2; + } + else if(nPerform >= 15 && nLevel >= 8) + { + nAttack = 2; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 8; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 12 && nLevel >= 6) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 1; + nHP = 0; + nAC = 0; + nSkill = 1; + } + else if(nPerform >= 9 && nLevel >= 3) + { + nAttack = 1; + nDamage = 2; + nWill = 1; + nFort = 1; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 6 && nLevel >= 2) + { + nAttack = 1; + nDamage = 1; + nWill = 1; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + else if(nPerform >= 3 && nLevel >= 1) + { + nAttack = 1; + nDamage = 1; + nWill = 0; + nFort = 0; + nReflex = 0; + nHP = 0; + nAC = 0; + nSkill = 0; + } + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + + eAttack = EffectAttackDecrease(nAttack); + eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_BLUDGEONING|DAMAGE_TYPE_PIERCING|DAMAGE_TYPE_SLASHING); + effect eLink = EffectLinkEffects(eAttack, eDamage); + + if(nWill > 0) + { + eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill); + eLink = EffectLinkEffects(eLink, eWill); + } + if(nFort > 0) + { + eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort); + eLink = EffectLinkEffects(eLink, eFort); + } + if(nReflex > 0) + { + eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex); + eLink = EffectLinkEffects(eLink, eReflex); + } + if(nAC > 0) + { + eAC = EffectACDecrease(nAC, AC_DODGE_BONUS); + eLink = EffectLinkEffects(eLink, eAC); + } + if(nSkill > 0) + { + eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill); + eLink = EffectLinkEffects(eLink, eSkill); + } + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(507); + eLink = EffectLinkEffects(eLink, eDur); + + effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC); + effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF)); + + object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + + eHP = ExtraordinaryEffect(eHP); + eLink = ExtraordinaryEffect(eLink); + + string sCurseSongHP = "CURSE_SONG_HP_" + ObjectToString(OBJECT_SELF); + + RemoveSongEffects(GetSpellId(),OBJECT_SELF,OBJECT_SELF); + + float fDelay; + while(GetIsObjectValid(oTarget)) + { + if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) + { + // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song + if (!PRCGetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !PRCGetHasEffect(EFFECT_TYPE_DEAF,oTarget)) + { + RemoveSongEffects(GetSpellId(),OBJECT_SELF,oTarget); + int nRace = MyPRCGetRacialType(oTarget); + + // Undead and Constructs are immune to mind effecting abilities. + // A bard with requiem can effect undead + if ((nRace == RACIAL_TYPE_UNDEAD && GetHasFeat(FEAT_REQUIEM, OBJECT_SELF)) || nRace != RACIAL_TYPE_UNDEAD && nRace != RACIAL_TYPE_CONSTRUCT || GetIsWarforged(oTarget)) + { + // Even with requiem, they have half duration + if (nRace == RACIAL_TYPE_UNDEAD) nDuration /= 2; + + if (nHP > 0 && !GetLocalInt(oTarget, sCurseSongHP)) + { + eHP = PRCEffectDamage(oTarget, nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget); + DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget)); + SetLocalInt(oTarget, sCurseSongHP, TRUE); + DelayCommand(RoundsToSeconds(nDuration),DeleteLocalInt(oTarget, sCurseSongHP)); + } + + if (!GetIsDead(oTarget)) + { + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + DelayCommand(PRCGetRandomDelay(0.1,0.5), ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + //StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration); + } + + } + } + else + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); + } + } + + oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); + } + DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS); +} \ No newline at end of file diff --git a/35expandedabilities/x2_s2_discbreath.ncs b/35expandedabilities/x2_s2_discbreath.ncs new file mode 100644 index 00000000..8617928f Binary files /dev/null and b/35expandedabilities/x2_s2_discbreath.ncs differ diff --git a/35expandedabilities/x2_s2_discbreath.nss b/35expandedabilities/x2_s2_discbreath.nss new file mode 100644 index 00000000..76cc85d1 --- /dev/null +++ b/35expandedabilities/x2_s2_discbreath.nss @@ -0,0 +1,260 @@ +/* +This is the edited script I had made changes to before Silver reverted to +the original. It has: + +Round delays for metabreath/multiple uses +Line breath (working) +Pyroclastic being 50% of each +PRCGetReflexAdjustedDamage to interact better with other systems +Range dependant on size +Less code duplication by using dedicated functions. Easier to fix/find bugs. +Moved breath VFX so when different ones for different colors are done they can be easily implemented + +Moved to a new script so its not lost permanently. Feel free to refer to this if you want. + +Primogenitor + +//:: edited by Fox on 1/19/08 + +Script has been rewritten to use the new breath include. Most of the above has +been subsumed into said include where appropriate. + +//:://///////////////////////////////////////////// +//:: Breath Weapon for Dragon Disciple Class +//:: x2_s2_discbreath +//:: Copyright (c) 2003Bioware Corp. +//::////////////////////////////////////////////// + +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller (modified by Silver) +//:: Created On: June, 17, 2003 (June, 7, 2005) +//::////////////////////////////////////////////// +*/ +#include "prc_inc_spells" +#include "prc_inc_breath" +#include "prc_inc_combat" + +////////////////////////// +// Constant Definitions // +////////////////////////// + + +int IsLineBreath() +{ + object oDD = OBJECT_SELF; + if(GetHasFeat(FEAT_BLACK_DRAGON, oDD) + || GetHasFeat(FEAT_BLUE_DRAGON, oDD) + || GetHasFeat(FEAT_BRASS_DRAGON, oDD) + || GetHasFeat(FEAT_BRONZE_DRAGON, oDD) + || GetHasFeat(FEAT_COPPER_DRAGON, oDD) + || GetHasFeat(FEAT_AMETHYST_DRAGON, oDD) + || GetHasFeat(FEAT_BROWN_DRAGON, oDD) + || GetHasFeat(FEAT_CHAOS_DRAGON, oDD) + || GetHasFeat(FEAT_OCEANUS_DRAGON, oDD) + || GetHasFeat(FEAT_RADIANT_DRAGON, oDD) + || GetHasFeat(FEAT_RUST_DRAGON, oDD) + || GetHasFeat(FEAT_STYX_DRAGON, oDD) + || GetHasFeat(FEAT_TARTIAN_DRAGON, oDD) + ) + return TRUE; + return FALSE; +} + +//Returns range in feet for breath struct. Conversion to meters is +//handled internally in the include +float GetRangeFromSize(int nSize) +{ + float fRange = 30.0; + switch(nSize) + { + case CREATURE_SIZE_FINE: + case CREATURE_SIZE_DIMINUTIVE: + case CREATURE_SIZE_TINY: fRange = 15.0; break; + case CREATURE_SIZE_SMALL: fRange = 20.0; break; + case CREATURE_SIZE_MEDIUM: fRange = 30.0; break; + case CREATURE_SIZE_LARGE: fRange = 40.0; break; + case CREATURE_SIZE_HUGE: fRange = 50.0; break; + case CREATURE_SIZE_GARGANTUAN: fRange = 60.0; break; + case CREATURE_SIZE_COLOSSAL: fRange = 70.0; break; + } + return fRange; +} + +void BreathRecharge(object oPC) +{ + IncrementRemainingFeatUses(oPC, FEAT_DRAGON_DIS_BREATH); + SendMessageToPC(oPC, "Your breath weapon is ready now"); +} + +void main() +{ + //Declare main variables. + object oPC = OBJECT_SELF; + int nLevel = GetLevelByClass(CLASS_TYPE_DRAGON_DISCIPLE, oPC); + location lTarget = PRCGetSpellTargetLocation(); + struct breath DiscBreath; + int bLine = IsLineBreath(); + int nVis; + + //range calculation + float fRange = GetRangeFromSize(PRCGetCreatureSize(oPC)); + if(bLine) fRange *= 2.0; + + //Li Lung dragons have a 'roar' instead of breath weapon + /*if(GetHasFeat(FEAT_LI_LUNG_DRAGON, oPC)) + { + if(nUses < 3) + { + IncrementRemainingFeatUses(oPC, FEAT_DRAGON_DIS_BREATH); + nUses++; + lTarget = GetLocation(oPC); + fRange = FeetToMeters(fRange); + float fDuration = RoundsToSeconds(nLevel); + PlaySound("c_dragnold_atk1"); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY), lTarget); + + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fRange, lTarget, FALSE, OBJECT_TYPE_CREATURE); + while(GetIsObjectValid(oTarget)) + { + float fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDeaf(), oTarget, fDuration)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget)); + + oTarget = GetNextObjectInShape(SHAPE_SPHERE, fRange, lTarget, FALSE, OBJECT_TYPE_CREATURE); + } + SetLocalInt(oPC, SPECIAL_BREATH_USES, nUses); + } + return; + } + else if(GetHasFeat(FEAT_FANG_DRAGON, oPC)) + { + + else if(nUses < 2) + { + IncrementRemainingFeatUses(oPC, FEAT_DRAGON_DIS_BREATH); + nUses++; + object oBite = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oPC); + int AttackRoll = GetAttackRoll(oTarget, oPC, oBite); + int nDamage = d4(1) * AttackRoll; + + if(nDamage) + { + ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_PERMANENT, TRUE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE), oTarget); + } + SetLocalInt(oPC, SPECIAL_BREATH_USES, nUses); + } + return; + }*/ + + //Sets the save DC for Dragon Breath attacks. This is a reflex save to halve the damage. + //Save is 10+CON+1/2 DD level. Gains +1 at level 13, and every 3 levels after. + int nSaveDCBonus = ((nLevel)/2) + max((nLevel - 10) / 3, 0); + + //Sets damage levels for Dragon Breath attacks. 2d10 at level 3, + //4d10 at level 7, and then an additional 2d10 every 3 levels (10, 13, 16, ect) + int nDice; + + if (nLevel >= 3) nDice += 2; + if (nLevel >= 7) nDice += 2; + if (nLevel >= 10) nDice += 2; + if (nLevel >= 13) nDice += 2; + if (nLevel >= 16) nDice += 2; + if (nLevel >= 19) nDice += 2; + if (nLevel >= 22) nDice += 2; + if (nLevel >= 25) nDice += 2; + if (nLevel >= 28) nDice += 2; + if (nLevel >= 31) nDice += 2; +if (nLevel >= 34) nDice += 2; +if (nLevel >= 37) nDice += 2; +if (nLevel >= 40) nDice += 2; +if (nLevel >= 43) nDice += 2; +if (nLevel >= 46) nDice += 2; +if (nLevel >= 49) nDice += 2; +if (nLevel >= 52) nDice += 2; +if (nLevel >= 55) nDice += 2; +if (nLevel >= 58) nDice += 2; +if (nLevel >= 60) nDice += 2; + //Only Dragons with Breath Weapons will have damage caused by their breath attack. + //Any Dragon type not listed here will have a breath attack, but it will not + //cause damage or create a visual effect. + int DBREED = GetHasFeat(FEAT_RED_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_BRASS_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_GOLD_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_LUNG_WANG_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_TIEN_LUNG_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_PYROCLASTIC_DRAGON, oPC) ? DAMAGE_TYPE_FIRE : + GetHasFeat(FEAT_BLACK_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_GREEN_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_COPPER_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_BROWN_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_DEEP_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_RUST_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_STYX_DRAGON, oPC) ? DAMAGE_TYPE_ACID : + GetHasFeat(FEAT_SILVER_DRAGON, oPC) ? DAMAGE_TYPE_COLD : + GetHasFeat(FEAT_WHITE_DRAGON, oPC) ? DAMAGE_TYPE_COLD : + GetHasFeat(FEAT_BLUE_DRAGON, oPC) ? DAMAGE_TYPE_ELECTRICAL : + GetHasFeat(FEAT_BRONZE_DRAGON, oPC) ? DAMAGE_TYPE_ELECTRICAL : + GetHasFeat(FEAT_OCEANUS_DRAGON, oPC) ? DAMAGE_TYPE_ELECTRICAL : + GetHasFeat(FEAT_SONG_DRAGON, oPC) ? DAMAGE_TYPE_ELECTRICAL : + GetHasFeat(FEAT_EMERALD_DRAGON, oPC) ? DAMAGE_TYPE_SONIC : + GetHasFeat(FEAT_SAPPHIRE_DRAGON, oPC) ? DAMAGE_TYPE_SONIC : + GetHasFeat(FEAT_BATTLE_DRAGON, oPC) ? DAMAGE_TYPE_SONIC : + GetHasFeat(FEAT_HOWLING_DRAGON, oPC) ? DAMAGE_TYPE_SONIC : + GetHasFeat(FEAT_CRYSTAL_DRAGON, oPC) ? DAMAGE_TYPE_POSITIVE : + GetHasFeat(FEAT_AMETHYST_DRAGON, oPC) ? DAMAGE_TYPE_MAGICAL : + GetHasFeat(FEAT_TOPAZ_DRAGON, oPC) ? DAMAGE_TYPE_MAGICAL : + GetHasFeat(FEAT_ETHEREAL_DRAGON, oPC) ? DAMAGE_TYPE_MAGICAL : + GetHasFeat(FEAT_RADIANT_DRAGON, oPC) ? DAMAGE_TYPE_MAGICAL : + GetHasFeat(FEAT_TARTIAN_DRAGON, oPC) ? DAMAGE_TYPE_MAGICAL : + -1; + + if(GetHasFeat(FEAT_CHAOS_DRAGON, oPC)) + { + //Sets the random Element factor of the Chaos Dragons Breath Weapon. + //Affects damage, saving throw, and impact visual. + switch(Random(5)) + { + case 0: DBREED = DAMAGE_TYPE_COLD; + case 1: DBREED = DAMAGE_TYPE_ACID; + case 2: DBREED = DAMAGE_TYPE_FIRE; + case 3: DBREED = DAMAGE_TYPE_SONIC; + case 4: DBREED = DAMAGE_TYPE_ELECTRICAL; + } + } + + DiscBreath = CreateBreath(oPC, bLine, fRange, DBREED, 10, nDice, ABILITY_CONSTITUTION, nSaveDCBonus); + + //activate override for special breath weapons + DiscBreath.nOverrideSpecial = GetHasFeat(FEAT_SHADOW_DRAGON, oPC) ? BREATH_SHADOW : + GetHasFeat(FEAT_PYROCLASTIC_DRAGON, oPC) ? BREATH_PYROCLASTIC : + GetHasFeat(FEAT_TOPAZ_DRAGON, oPC) ? BREATH_TOPAZ : + 0; + + //vfx + switch(DBREED) + { + case DAMAGE_TYPE_FIRE: nVis = VFX_FNF_DRAGBREATHGROUND; break; + case DAMAGE_TYPE_ACID: nVis = VFX_FNF_DRAGBREATHACID; break; + case DAMAGE_TYPE_COLD: nVis = VFX_FNF_DRAGBREATHCOLD; break; + case DAMAGE_TYPE_ELECTRICAL: nVis = VFX_FNF_DRAGBREATHMIND; break;//VFX_FNF_DRAGBREATHELEC + case DAMAGE_TYPE_SONIC: nVis = VFX_FNF_DRAGBREATHSONIC; break; + case DAMAGE_TYPE_POSITIVE: nVis = VFX_FNF_DRAGBREATHHOLY; break; + default: nVis = VFX_FNF_DRAGBREATHODD; break; + } + + //actual breath effect + ApplyBreath(DiscBreath, lTarget); + + //breath VFX + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(nVis), lTarget); + + if(GetHasFeat(FEAT_FULL_DRAGON_BREATH, oPC)) + { + // Schedule opening the delay lock + float fDelay = RoundsToSeconds(DiscBreath.nRoundsUntilRecharge); + SendMessageToPC(oPC, "Your breath weapon will be ready again in " + IntToString(DiscBreath.nRoundsUntilRecharge) + " rounds."); + + DelayCommand(fDelay, BreathRecharge(oPC)); + } +} \ No newline at end of file diff --git a/35expandedabilities/x2_s2_epicward.ncs b/35expandedabilities/x2_s2_epicward.ncs new file mode 100644 index 00000000..3b550401 Binary files /dev/null and b/35expandedabilities/x2_s2_epicward.ncs differ diff --git a/35expandedabilities/x2_s2_epicward.nss b/35expandedabilities/x2_s2_epicward.nss new file mode 100644 index 00000000..b5e97d27 --- /dev/null +++ b/35expandedabilities/x2_s2_epicward.nss @@ -0,0 +1,61 @@ +//:://///////////////////////////////////////////// +//:: Epic Ward +//:: X2_S2_EpicWard. +//:: Copyright (c) 2003 Bioware Corp. +//::////////////////////////////////////////////// +/* + Makes the caster invulnerable to damage + (equals damage reduction 50/+20) + Lasts 1 round per level + +*/ +//::////////////////////////////////////////////// +//:: Created By: Georg Zoeller +//:: Created On: Aug 12, 2003 +//::////////////////////////////////////////////// + +//:: modified by mr_bumpkin Dec 15, 2003 for PRC stuff +#include "prc_inc_spells" + +void main() +{ +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); + +/* + Spellcast Hook Code + Added 2003-06-23 by GeorgZ + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + +*/ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + +// End of Spell Cast Hook + //Declare major variables + object oTarget = PRCGetSpellTargetObject(); + int nDuration = PRCGetCasterLevel(OBJECT_SELF); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + int nLimit = 50*nDuration; + effect eDur = EffectVisualEffect(495); + effect eProt = EffectDamageReduction(10+(nDuration/2) , DAMAGE_POWER_PLUS_TWENTY, nLimit); + effect eLink = EffectLinkEffects(eDur, eProt); + eLink = EffectLinkEffects(eLink, eDur); + + // * Brent, Nov 24, making extraodinary so cannot be dispelled + eLink = ExtraordinaryEffect(eLink); + + PRCRemoveEffectsFromSpell(OBJECT_SELF, GetSpellId()); + //Apply the armor bonuses and the VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +// Getting rid of the local integer storing the spellschool name + +} diff --git a/35expandedabilities/x2_s2_epmagearm.ncs b/35expandedabilities/x2_s2_epmagearm.ncs new file mode 100644 index 00000000..9cd8e812 Binary files /dev/null and b/35expandedabilities/x2_s2_epmagearm.ncs differ diff --git a/35expandedabilities/x2_s2_epmagearm.nss b/35expandedabilities/x2_s2_epmagearm.nss new file mode 100644 index 00000000..982033fb --- /dev/null +++ b/35expandedabilities/x2_s2_epmagearm.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Epic Mage Armor +//:: X2_S2_EpMageArm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Gives the target +20 AC Bonus to Deflection, + Armor Enchantment, Natural Armor and Dodge. +*/ +//::////////////////////////////////////////////// +//:: Created By: Andrew Nobbs +//:: Created On: Feb 07, 2003 +//::////////////////////////////////////////////// + +//:: modified by mr_bumpkin Dec 15, 2003 for PRC stuff +#include "prc_inc_spells" + +void main() +{ +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); + + /* + Spellcast Hook Code + Added 2003-06-20 by Georg + If you want to make changes to all spells, + check x2_inc_spellhook.nss to find out more + + */ + + if (!X2PreSpellCastCode()) + { + // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell + return; + } + + //Declare major variables + object oTarget = PRCGetSpellTargetObject(); + int nDuration = PRCGetCasterLevel(OBJECT_SELF); + int nMetaMagic = PRCGetMetaMagicFeat(); + effect eVis = EffectVisualEffect(495); + effect eAC1, eAC2, eAC3, eAC4; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); + //Check for metamagic extend + if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND)) //Duration is +100% + { + nDuration = nDuration * 2; + } + //Set the four unique armor bonuses + eAC1 = EffectACIncrease(nDuration/4, AC_ARMOUR_ENCHANTMENT_BONUS); + eAC2 = EffectACIncrease(nDuration/4, AC_DEFLECTION_BONUS); + eAC3 = EffectACIncrease(nDuration/4, AC_DODGE_BONUS); + eAC4 = EffectACIncrease(nDuration/4, AC_NATURAL_BONUS); + effect eDur = EffectVisualEffect(VFX_DUR_SANCTUARY); + + effect eLink = EffectLinkEffects(eAC1, eAC2); + eLink = EffectLinkEffects(eLink, eAC3); + eLink = EffectLinkEffects(eLink, eAC4); + eLink = EffectLinkEffects(eLink, eDur); + + PRCRemoveEffectsFromSpell(oTarget, GetSpellId()); + + // * Brent, Nov 24, making extraodinary so cannot be dispelled + eLink = ExtraordinaryEffect(eLink); + + //Apply the armor bonuses and the VFX impact + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget,1.0); + +DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); +// Getting rid of the local integer storing the spellschool name +} diff --git a/Compiler - 35abilities.bat b/Compiler - 35abilities.bat new file mode 100644 index 00000000..2349fb9b --- /dev/null +++ b/Compiler - 35abilities.bat @@ -0,0 +1,4 @@ +:loop +"C:\NWN Work\nwnsc.exe" -s -o -w -n "C:\Games\Steam\steamapps\common\Neverwinter Nights" -i "D:\NWN Repos\PoA-PRC\35expandedabilities";"D:\NWN Repos\PRC4NWN35\trunk\include" "D:\NWN Repos\PoA-PRC\35expandedabilities\*.nss" +if %errorLevel% == -1 goto :loop +pause \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_aurablnda.ncs b/_haks/poa_dev/nw_s1_aurablnda.ncs new file mode 100644 index 00000000..376b84a9 Binary files /dev/null and b/_haks/poa_dev/nw_s1_aurablnda.ncs differ diff --git a/_haks/poa_dev/nw_s1_aurablnda.nss b/_haks/poa_dev/nw_s1_aurablnda.nss new file mode 100644 index 00000000..0babfaa1 --- /dev/null +++ b/_haks/poa_dev/nw_s1_aurablnda.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura of Blinding On Enter +//:: NW_S1_AuraBlndA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be blinded because of the + sheer ugliness or beauty of the creature. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD/3); + + effect eBlind = EffectBlindness(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M); + effect eLink = EffectLinkEffects(eBlind, eDur); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + //Entering object must make a will save or be blinded for the duration. + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_BLINDING)); + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + //Apply the blind effect and the VFX impact + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_auracoldc.ncs b/_haks/poa_dev/nw_s1_auracoldc.ncs new file mode 100644 index 00000000..841ab57b Binary files /dev/null and b/_haks/poa_dev/nw_s1_auracoldc.ncs differ diff --git a/_haks/poa_dev/nw_s1_auracoldc.nss b/_haks/poa_dev/nw_s1_auracoldc.nss new file mode 100644 index 00000000..49cd95e0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_auracoldc.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Aura of Frost on Heartbeat +//:: NW_S1_AuraColdC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes frost damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nFrost = 1 + (nHD/3); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + + //Get the first target in the aura of cold + oTarget = GetFirstInPersistentObject(); + + while (GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_COLD)); + //Roll damage based on the creatures HD + nDamage = d4(nFrost); + //Make a Fortitude save for half + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_COLD)) + { + nDamage = nDamage / 2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + //Apply the VFX constant and damage effect + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + //Get the next target in the aura of cold + oTarget = GetNextInPersistentObject(); + } +} diff --git a/_haks/poa_dev/nw_s1_auraelecc.ncs b/_haks/poa_dev/nw_s1_auraelecc.ncs new file mode 100644 index 00000000..6e622d99 Binary files /dev/null and b/_haks/poa_dev/nw_s1_auraelecc.ncs differ diff --git a/_haks/poa_dev/nw_s1_auraelecc.nss b/_haks/poa_dev/nw_s1_auraelecc.nss new file mode 100644 index 00000000..06994f44 --- /dev/null +++ b/_haks/poa_dev/nw_s1_auraelecc.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Aura of Electricity on Heartbeat +//:: NW_S1_AuraElecC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes electrical damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + int nHD = GetHitDice(oNPC); + int nZap = 1 + (nHD / 3); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 + nCHAMod + (nHD/2); + int nDamage; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + + //Get first target in spell area + object oTarget = GetFirstInPersistentObject(); + while (GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + nDamage = d4(nZap); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_ELECTRICITY)); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY)) + { + nDamage = nDamage / 2; + } + eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + //Apply the VFX impact and effects + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } +} diff --git a/_haks/poa_dev/nw_s1_aurafirec.ncs b/_haks/poa_dev/nw_s1_aurafirec.ncs new file mode 100644 index 00000000..50fe6329 Binary files /dev/null and b/_haks/poa_dev/nw_s1_aurafirec.ncs differ diff --git a/_haks/poa_dev/nw_s1_aurafirec.nss b/_haks/poa_dev/nw_s1_aurafirec.nss new file mode 100644 index 00000000..a6b96381 --- /dev/null +++ b/_haks/poa_dev/nw_s1_aurafirec.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Aura of Fire on Heartbeat +//:: NW_S1_AuraFireC.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Prolonged exposure to the aura of the creature + causes fire damage to all within the aura. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetFirstInPersistentObject(); //:: Get first target in spell area + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nBurn = 1 + (nHD/3); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nDamSave; + + effect eDam; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + while(GetIsObjectValid(oTarget)) + { +/* if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) + { + oTarget = GetNextInPersistentObject(OBJECT_SELF); + continue; + } */ + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FIRE)); + //Roll damage + nDamage = d4(nBurn); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) + { + nDamage = nDamage / 2; + } + //Set the damage effect + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } + //Get next target in spell area + oTarget = GetNextInPersistentObject(); + } +} diff --git a/_haks/poa_dev/nw_s1_auramenca.ncs b/_haks/poa_dev/nw_s1_auramenca.ncs new file mode 100644 index 00000000..cfdaf28a Binary files /dev/null and b/_haks/poa_dev/nw_s1_auramenca.ncs differ diff --git a/_haks/poa_dev/nw_s1_auramenca.nss b/_haks/poa_dev/nw_s1_auramenca.nss new file mode 100644 index 00000000..e786aaa2 --- /dev/null +++ b/_haks/poa_dev/nw_s1_auramenca.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Aura of Menace On Enter +//:: NW_S1_AuraMencA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura all those that fail + a will save are stricken with Doom. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int nDuration = 1 + (GetHitDice(oNPC)/3); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (GetHitDice(oNPC)/2); + int nLevel = GetCasterLevel(OBJECT_SELF); + int nMetaMagic = PRCGetMetaMagicFeat(); + + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + effect eLink = CreateDoomEffectsLink(); + + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_MENACE)); + //Spell Resistance and Saving throw + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, TurnsToSeconds(nDuration)); + } + } +} diff --git a/_haks/poa_dev/nw_s1_auraprota.ncs b/_haks/poa_dev/nw_s1_auraprota.ncs new file mode 100644 index 00000000..468539b7 Binary files /dev/null and b/_haks/poa_dev/nw_s1_auraprota.ncs differ diff --git a/_haks/poa_dev/nw_s1_auraprota.nss b/_haks/poa_dev/nw_s1_auraprota.nss new file mode 100644 index 00000000..548f2840 --- /dev/null +++ b/_haks/poa_dev/nw_s1_auraprota.nss @@ -0,0 +1,35 @@ +//:://///////////////////////////////////////////// +//:: Aura of Protection: On Enter +//:: NW_S1_AuraProtA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Acts as a double strength Magic Circle against + evil and a Minor Globe for those friends in + the area. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On:Jan 8, 2002, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +void main() +{ + //Declare major variables + effect eProt = CreateProtectionFromAlignmentLink(ALIGNMENT_EVIL); + effect eGlobe = EffectSpellLevelAbsorption(3, 0); + effect eDur = EffectVisualEffect(VFX_DUR_GLOBE_MINOR); + + effect eLink = EffectLinkEffects(eProt, eGlobe); + eLink = EffectLinkEffects(eLink, eDur); + + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + //Faction Check + if(GetIsFriend(oTarget, GetAreaOfEffectCreator())) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_aurastuna.ncs b/_haks/poa_dev/nw_s1_aurastuna.ncs new file mode 100644 index 00000000..279ae960 Binary files /dev/null and b/_haks/poa_dev/nw_s1_aurastuna.ncs differ diff --git a/_haks/poa_dev/nw_s1_aurastuna.nss b/_haks/poa_dev/nw_s1_aurastuna.nss new file mode 100644 index 00000000..03d0aae0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_aurastuna.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura Stunning On Enter +//:: NW_S1_AuraStunA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be stunned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDuration = GetHitDice(oNPC); + int nDC = 10 + nCHAMod + (nDuration/2); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDeath = EffectStunned(); + effect eLink = EffectLinkEffects(eVis2, eDeath); + + nDuration = GetScaledDuration(nDuration, oTarget); + + if(!GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_STUN)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_auraunata.ncs b/_haks/poa_dev/nw_s1_auraunata.ncs new file mode 100644 index 00000000..adac269e Binary files /dev/null and b/_haks/poa_dev/nw_s1_auraunata.ncs differ diff --git a/_haks/poa_dev/nw_s1_auraunata.nss b/_haks/poa_dev/nw_s1_auraunata.nss new file mode 100644 index 00000000..a5970627 --- /dev/null +++ b/_haks/poa_dev/nw_s1_auraunata.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Aura of the Unnatural On Enter +//:: NW_S1_AuraMencA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura all animals are struck with + fear. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eFear = EffectFrightened(); + effect eLink = EffectLinkEffects(eVis, eFear); + object oTarget = GetEnteringObject(); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int nDuration = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nRacial = GetRacialType(oTarget); + int nDC = 10 + nCHAMod + (GetHitDice(oNPC)/2); + + if(GetIsEnemy(oTarget)) + { + nDuration = (nDuration / 3) + 1; + //Make a saving throw check + if(nRacial == RACIAL_TYPE_ANIMAL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_UNNATURAL)); + //if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) //:: This ability only affects animals & they don't get a save. + //{ + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + //} + } + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_aurauneaa.ncs b/_haks/poa_dev/nw_s1_aurauneaa.ncs new file mode 100644 index 00000000..f2ae3376 Binary files /dev/null and b/_haks/poa_dev/nw_s1_aurauneaa.ncs differ diff --git a/_haks/poa_dev/nw_s1_aurauneaa.nss b/_haks/poa_dev/nw_s1_aurauneaa.nss new file mode 100644 index 00000000..6f4a75bc --- /dev/null +++ b/_haks/poa_dev/nw_s1_aurauneaa.nss @@ -0,0 +1,46 @@ +//:://///////////////////////////////////////////// +//:: Aura Unearthly Visage On Enter +//:: NW_S1_AuraUnEaA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be killed because of the + sheer ugliness or beauty of the creature. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + effect eDeath = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + if(GetIsEnemy(oTarget, oNPC)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_AURA_UNEARTHLY_VISAGE)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltacid.ncs b/_haks/poa_dev/nw_s1_bltacid.ncs new file mode 100644 index 00000000..9e9d57ba Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltacid.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltacid.nss b/_haks/poa_dev/nw_s1_bltacid.nss new file mode 100644 index 00000000..ef53a16a --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltacid.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Acid +//:: NW_S1_BltAcid +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt; + + //ankheg + if(GetAppearanceType(oNPC) == APPEARANCE_TYPE_BEETLE_SLICER) + { + nDamage = d4(4); + } + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ACID)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltcharm.ncs b/_haks/poa_dev/nw_s1_bltcharm.ncs new file mode 100644 index 00000000..60db2a78 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltcharm.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltcharm.nss b/_haks/poa_dev/nw_s1_bltcharm.nss new file mode 100644 index 00000000..df11d653 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltcharm.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Charm +//:: NW_S1_BltCharm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_IMP_CHARM); + effect eBolt = EffectCharmed(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_CHARM)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_bltchrdr.ncs b/_haks/poa_dev/nw_s1_bltchrdr.ncs new file mode 100644 index 00000000..d86707e7 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltchrdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltchrdr.nss b/_haks/poa_dev/nw_s1_bltchrdr.nss new file mode 100644 index 00000000..e7345802 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltchrdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Charisma Drain +//:: NW_S1_BltChrDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fortitude save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD / 3; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_CHARISMA)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_CHARISMA, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltcold.ncs b/_haks/poa_dev/nw_s1_bltcold.ncs new file mode 100644 index 00000000..373a803b Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltcold.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltcold.nss b/_haks/poa_dev/nw_s1_bltcold.nss new file mode 100644 index 00000000..657f0fe6 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltcold.nss @@ -0,0 +1,60 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Cold +//:: NW_S1_BltCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_COLD)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_COLD); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltcondr.ncs b/_haks/poa_dev/nw_s1_bltcondr.ncs new file mode 100644 index 00000000..e8c357f8 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltcondr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltcondr.nss b/_haks/poa_dev/nw_s1_bltcondr.nss new file mode 100644 index 00000000..9d85f042 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltcondr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Constitution Drain +//:: NW_S1_BltConDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD /3); + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_CONSTITUTION)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_CONSTITUTION, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltconf.ncs b/_haks/poa_dev/nw_s1_bltconf.ncs new file mode 100644 index 00000000..914f4a12 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltconf.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltconf.nss b/_haks/poa_dev/nw_s1_bltconf.nss new file mode 100644 index 00000000..5bed7dc0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltconf.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Confuse +//:: NW_S1_BltConf +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis2 = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eBolt = EffectConfused(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_CONFUSE)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_bltdaze.ncs b/_haks/poa_dev/nw_s1_bltdaze.ncs new file mode 100644 index 00000000..708985f1 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltdaze.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltdaze.nss b/_haks/poa_dev/nw_s1_bltdaze.nss new file mode 100644 index 00000000..68d15c70 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltdaze.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Daze +//:: NW_S1_BltDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +#include "NW_I0_SPELLS" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eBolt = EffectDazed(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DAZE)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/_haks/poa_dev/nw_s1_bltdeath.ncs b/_haks/poa_dev/nw_s1_bltdeath.ncs new file mode 100644 index 00000000..c1ecd7d8 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltdeath.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltdeath.nss b/_haks/poa_dev/nw_s1_bltdeath.nss new file mode 100644 index 00000000..e2cbcd73 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltdeath.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Death +//:: NW_S1_BltDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eBolt = EffectDeath(); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DEATH)); + //Make a saving throw check + if(TouchAttackRanged(oTarget)) + { + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} + diff --git a/_haks/poa_dev/nw_s1_bltdexdr.ncs b/_haks/poa_dev/nw_s1_bltdexdr.ncs new file mode 100644 index 00000000..ecc29838 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltdexdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltdexdr.nss b/_haks/poa_dev/nw_s1_bltdexdr.nss new file mode 100644 index 00000000..4ef34d8b --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltdexdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Dexterity Drain +//:: NW_S1_BltDexDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_DEXTERITY)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_DEXTERITY, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltdisese.ncs b/_haks/poa_dev/nw_s1_bltdisese.ncs new file mode 100644 index 00000000..8580d056 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltdisese.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltdisese.nss b/_haks/poa_dev/nw_s1_bltdisese.nss new file mode 100644 index 00000000..6513a061 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltdisese.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Disease +//:: NW_S1_BltDisease +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to infect + the target with a disease. The disease used + is chosen based upon the racial type of the + caster. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(oNPC); + int nDisease; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DISEASE)); + + //Here we use the racial type of the attacker to select an + //appropriate disease. + switch (nRacial) + { + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + nDisease = DISEASE_FILTH_FEVER; + break; + case RACIAL_TYPE_OUTSIDER: + if(GetTag(oNPC) == "NW_SLAADRED") + { + nDisease = DISEASE_RED_SLAAD_EGGS; + } + else + { + nDisease = DISEASE_DEMON_FEVER; + } + break; + case RACIAL_TYPE_MAGICAL_BEAST: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + case RACIAL_TYPE_ABERRATION: + nDisease = DISEASE_BLINDING_SICKNESS; + break; + default: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + } + //Assign effect and chosen disease + effect eBolt = EffectDisease(nDisease); + //Make the ranged touch attack. + if (TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltdomn.ncs b/_haks/poa_dev/nw_s1_bltdomn.ncs new file mode 100644 index 00000000..ab8a4bea Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltdomn.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltdomn.nss b/_haks/poa_dev/nw_s1_bltdomn.nss new file mode 100644 index 00000000..5027b454 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltdomn.nss @@ -0,0 +1,53 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Dominated +//:: NW_S1_BltDomn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S); + effect eBolt = EffectDominated(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis2); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DOMINATE)); + + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltfire.ncs b/_haks/poa_dev/nw_s1_bltfire.ncs new file mode 100644 index 00000000..cf13feaf Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltfire.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltfire.nss b/_haks/poa_dev/nw_s1_bltfire.nss new file mode 100644 index 00000000..4f7a4236 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltfire.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Fire +//:: NW_S1_BoltFire +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_FIRE)); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE); + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltintdr.ncs b/_haks/poa_dev/nw_s1_bltintdr.ncs new file mode 100644 index 00000000..33b3da46 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltintdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltintdr.nss b/_haks/poa_dev/nw_s1_bltintdr.nss new file mode 100644 index 00000000..f3ffbad8 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltintdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Intelligence Drain +//:: NW_S1_BltIntDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_INTELLIGENCE)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltknckd.ncs b/_haks/poa_dev/nw_s1_bltknckd.ncs new file mode 100644 index 00000000..5c098196 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltknckd.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltknckd.nss b/_haks/poa_dev/nw_s1_bltknckd.nss new file mode 100644 index 00000000..68169647 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltknckd.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Knockdown +//:: NW_S1_BltKnckD +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eBolt = EffectKnockdown(); + effect eDam = EffectDamage(d6(), DAMAGE_TYPE_BLUDGEONING); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_KNOCKDOWN)); + + //Make a saving throw check + if (!/*Reflex Save*/ PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBolt, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltlightn.ncs b/_haks/poa_dev/nw_s1_bltlightn.ncs new file mode 100644 index 00000000..93155270 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltlightn.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltlightn.nss b/_haks/poa_dev/nw_s1_bltlightn.nss new file mode 100644 index 00000000..024eafbe --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltlightn.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Lightning +//:: NW_S1_BltLightn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Does 1d6 per level to a single target. Reflex + save for half +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 10, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_HAND); + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_LIGHTNING)); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY); + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, oTarget, 1.7); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltlvldr.ncs b/_haks/poa_dev/nw_s1_bltlvldr.ncs new file mode 100644 index 00000000..7f6d6ea1 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltlvldr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltlvldr.nss b/_haks/poa_dev/nw_s1_bltlvldr.nss new file mode 100644 index 00000000..e3f14cab --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltlvldr.nss @@ -0,0 +1,49 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Level Drain +//:: NW_S1_BltLvlDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = nHD/5; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt = EffectNegativeLevel(1); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_LEVEL_DRAIN)); + + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + //eBolt = LEVEL DRAIN EFFECT + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltparal.ncs b/_haks/poa_dev/nw_s1_bltparal.ncs new file mode 100644 index 00000000..352beb7c Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltparal.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltparal.nss b/_haks/poa_dev/nw_s1_bltparal.nss new file mode 100644 index 00000000..e4a6b59a --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltparal.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Paralyze +//:: NW_S1_BltParal +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + + effect eVis = EffectVisualEffect(VFX_DUR_PARALYZED); + effect eBolt = EffectParalyze(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + eLink = EffectLinkEffects(eLink, eVis); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_PARALYZE)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/_haks/poa_dev/nw_s1_bltpoison.ncs b/_haks/poa_dev/nw_s1_bltpoison.ncs new file mode 100644 index 00000000..d7368cb1 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltpoison.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltpoison.nss b/_haks/poa_dev/nw_s1_bltpoison.nss new file mode 100644 index 00000000..8a34aca8 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltpoison.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Poison +//:: NW_S1_BltPoison.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Must make a ranged touch attack. If successful + the target is struck down with poison that + scales with level. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(OBJECT_SELF); + int nPoison; + + effect ePoison; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_POISON)); + + //Determine the poison type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + if (nHD <= 9) + { + nPoison = POISON_QUASIT_VENOM; + } + else if (nHD > 9 && nHD < 13) + { + nPoison = POISON_BEBILITH_VENOM; + } + else if (nHD >= 13) + { + nPoison = POISON_PIT_FIEND_ICHOR; + } + break; + case RACIAL_TYPE_VERMIN: + if (nHD < 3) + { + nPoison = POISON_TINY_SPIDER_VENOM; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_SMALL_SPIDER_VENOM; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_MEDIUM_SPIDER_VENOM; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_HUGE_SPIDER_VENOM; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_GARGANTUAN_SPIDER_VENOM; + } + else if (nHD >= 18) + { + nPoison = POISON_COLOSSAL_SPIDER_VENOM; + } + break; + default: + if (nHD < 3) + { + nPoison = POISON_NIGHTSHADE; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_BLADE_BANE; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_BLOODROOT; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_LICH_DUST; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_DARK_REAVER_POWDER; + } + else if (nHD >= 18 ) + { + nPoison = POISON_BLACK_LOTUS_EXTRACT; + } + + break; + } + //Make a ranged touch attack + if (TouchAttackRanged (oTarget)) + { + ePoison = EffectPoison(nPoison); + //Apply effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget); + } +} + diff --git a/_haks/poa_dev/nw_s1_bltshards.ncs b/_haks/poa_dev/nw_s1_bltshards.ncs new file mode 100644 index 00000000..b260bb75 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltshards.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltshards.nss b/_haks/poa_dev/nw_s1_bltshards.nss new file mode 100644 index 00000000..1b96e2bc --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltshards.nss @@ -0,0 +1,58 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Shards +//:: NW_S1_BltShard +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_SHARDS)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Set damage effect + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_PIERCING, DAMAGE_POWER_PLUS_ONE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_bltslow.ncs b/_haks/poa_dev/nw_s1_bltslow.ncs new file mode 100644 index 00000000..779dedd9 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltslow.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltslow.nss b/_haks/poa_dev/nw_s1_bltslow.nss new file mode 100644 index 00000000..bf4813a1 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltslow.nss @@ -0,0 +1,47 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Slow +//:: NW_S1_BltSlow +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex save is + needed to or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: June 18 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SLOW); + effect eBolt = EffectSlow(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_SLOW)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltstrdr.ncs b/_haks/poa_dev/nw_s1_bltstrdr.ncs new file mode 100644 index 00000000..7ecf22e8 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltstrdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltstrdr.nss b/_haks/poa_dev/nw_s1_bltstrdr.nss new file mode 100644 index 00000000..dd03161d --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltstrdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Strength Drain +//:: NW_S1_BltStrDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_STRENGTH)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_STRENGTH, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_bltstun.ncs b/_haks/poa_dev/nw_s1_bltstun.ncs new file mode 100644 index 00000000..0b8993e3 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltstun.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltstun.nss b/_haks/poa_dev/nw_s1_bltstun.nss new file mode 100644 index 00000000..1d770089 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltstun.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Stun +//:: NW_S1_BltStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Reflex or Will save is + needed to halve damage or avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD + 1) / 2; + if (nCount == 0) { nCount = 1; } + nCount = GetScaledDuration(nCount, oTarget); + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eBolt = EffectStunned(); + eBolt = GetScaledEffect(eBolt, oTarget); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBolt, eDur); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_STUN)); + //Make a saving throw check + if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_bltweb.ncs b/_haks/poa_dev/nw_s1_bltweb.ncs new file mode 100644 index 00000000..25d622a0 Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltweb.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltweb.nss b/_haks/poa_dev/nw_s1_bltweb.nss new file mode 100644 index 00000000..9ed210a0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltweb.nss @@ -0,0 +1,44 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Web +//:: NW_S1_BltWeb +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Glues a single target to the ground with + sticky strands of webbing. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 28, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nCount = 1 + (nHD /2); + if (nCount == 0) { nCount = 1; } + + effect eVis = EffectVisualEffect(VFX_DUR_WEB); + effect eStick = EffectEntangle(); + effect eLink = EffectLinkEffects(eVis, eStick); + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_WEB)); + //Make a saving throw check + if (!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC) && TouchAttackRanged(oTarget)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount)); + } +} diff --git a/_haks/poa_dev/nw_s1_bltwisdr.ncs b/_haks/poa_dev/nw_s1_bltwisdr.ncs new file mode 100644 index 00000000..f357cf1b Binary files /dev/null and b/_haks/poa_dev/nw_s1_bltwisdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_bltwisdr.nss b/_haks/poa_dev/nw_s1_bltwisdr.nss new file mode 100644 index 00000000..49643c08 --- /dev/null +++ b/_haks/poa_dev/nw_s1_bltwisdr.nss @@ -0,0 +1,48 @@ +//:://///////////////////////////////////////////// +//:: Bolt: Wisdom Drain +//:: NW_S1_BltWisDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature must make a ranged touch attack to hit + the intended target. Fort save is + needed to avoid effect. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nCount = (nHD /3); + if (nCount == 0) { nCount = 1; } + int nDamage = d6(nCount); + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eBolt; + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_ABILITY_DRAIN_WISDOM)); + //Make a saving throw check + if (!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget)) + { + eBolt = EffectAbilityDecrease(ABILITY_WISDOM, nCount); + eBolt = SupernaturalEffect(eBolt); + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_coneacid.ncs b/_haks/poa_dev/nw_s1_coneacid.ncs new file mode 100644 index 00000000..bad07028 Binary files /dev/null and b/_haks/poa_dev/nw_s1_coneacid.ncs differ diff --git a/_haks/poa_dev/nw_s1_coneacid.nss b/_haks/poa_dev/nw_s1_coneacid.nss new file mode 100644 index 00000000..2ab7dcfc --- /dev/null +++ b/_haks/poa_dev/nw_s1_coneacid.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Cone: Acid +//:: NW_S1_ConeAcid +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_ACID)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ACID); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + diff --git a/_haks/poa_dev/nw_s1_conecold.ncs b/_haks/poa_dev/nw_s1_conecold.ncs new file mode 100644 index 00000000..21c9e7e2 Binary files /dev/null and b/_haks/poa_dev/nw_s1_conecold.ncs differ diff --git a/_haks/poa_dev/nw_s1_conecold.nss b/_haks/poa_dev/nw_s1_conecold.nss new file mode 100644 index 00000000..24cc011b --- /dev/null +++ b/_haks/poa_dev/nw_s1_conecold.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Cone: Cold +//:: NW_S1_ConeCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_COLD)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + diff --git a/_haks/poa_dev/nw_s1_conedisea.ncs b/_haks/poa_dev/nw_s1_conedisea.ncs new file mode 100644 index 00000000..3bac3ebd Binary files /dev/null and b/_haks/poa_dev/nw_s1_conedisea.ncs differ diff --git a/_haks/poa_dev/nw_s1_conedisea.nss b/_haks/poa_dev/nw_s1_conedisea.nss new file mode 100644 index 00000000..9abedbb0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_conedisea.nss @@ -0,0 +1,99 @@ +//:://///////////////////////////////////////////// +//:: Cone: Disease +//:: NW_S1_ConeDisea +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creature spits out a cone of disease that cannot + be avoided unless a Reflex save is made. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nRacial = MyPRCGetRacialType(oNPC); + int nDisease; + + location lTargetLocation = GetSpellTargetLocation(); + + float fDelay; + + effect eCone = EffectDisease(nDisease); + effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S); + + + //Determine the disease type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + nDisease = DISEASE_DEMON_FEVER; + break; + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + if(nHD <= 3) + { + nDisease = DISEASE_ZOMBIE_CREEP; + } + else if (nHD > 3 && nHD <= 10) + { + nDisease = DISEASE_GHOUL_ROT; + } + else if(nHD > 10) + { + nDisease = DISEASE_MUMMY_ROT; + } + default: + if(nHD <= 3) + { + nDisease = DISEASE_MINDFIRE; + } + else if (nHD > 3 && nHD <= 10) + { + nDisease = DISEASE_RED_ACHE; + } + else if(nHD > 10) + { + nDisease = DISEASE_SHAKES; + } + + + break; + } + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_DISEASE)); + //Get the delay time + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + + } +} + + + diff --git a/_haks/poa_dev/nw_s1_coneelec.ncs b/_haks/poa_dev/nw_s1_coneelec.ncs new file mode 100644 index 00000000..f1cfdc77 Binary files /dev/null and b/_haks/poa_dev/nw_s1_coneelec.ncs differ diff --git a/_haks/poa_dev/nw_s1_coneelec.nss b/_haks/poa_dev/nw_s1_coneelec.nss new file mode 100644 index 00000000..a4fa75ba --- /dev/null +++ b/_haks/poa_dev/nw_s1_coneelec.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Cone: Lightning +//:: NW_S1_ConeElec +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminates from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNPC, BODY_NODE_HAND); + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_CONE_LIGHTNING)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + diff --git a/_haks/poa_dev/nw_s1_conesonic.ncs b/_haks/poa_dev/nw_s1_conesonic.ncs new file mode 100644 index 00000000..f7b256b4 Binary files /dev/null and b/_haks/poa_dev/nw_s1_conesonic.ncs differ diff --git a/_haks/poa_dev/nw_s1_conesonic.nss b/_haks/poa_dev/nw_s1_conesonic.nss new file mode 100644 index 00000000..79c1d466 --- /dev/null +++ b/_haks/poa_dev/nw_s1_conesonic.nss @@ -0,0 +1,75 @@ +//:://///////////////////////////////////////////// +//:: Cone: Sonic +//:: NW_S1_ConeSonic +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of damage eminated from the monster. Does + a set amount of damage based upon the creatures HD + and can be halved with a Reflex Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + int nLoop = nHD / 3; + + float fDelay; + + if(nLoop == 0) + { + nLoop = 1; + } + + //Calculate the damage + for (nLoop; nLoop > 0; nLoop--) + { + nDamage = nDamage + d6(2); + } + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_SONIC)); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,DAMAGE_TYPE_SONIC); + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_dragfear.ncs b/_haks/poa_dev/nw_s1_dragfear.ncs new file mode 100644 index 00000000..e0a66afa Binary files /dev/null and b/_haks/poa_dev/nw_s1_dragfear.ncs differ diff --git a/_haks/poa_dev/nw_s1_dragfear.nss b/_haks/poa_dev/nw_s1_dragfear.nss new file mode 100644 index 00000000..f95e3975 --- /dev/null +++ b/_haks/poa_dev/nw_s1_dragfear.nss @@ -0,0 +1,119 @@ +//:://///////////////////////////////////////////// +//:: Dragon Breath Fear +//:: NW_S1_DragFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper DC Save for the + breath weapon based on the HD of the dragon. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + //Declare major variables + int nAge = GetHitDice(OBJECT_SELF); + int nCount; + int nDC; + float fDelay; + object oTarget; + effect eBreath = EffectFrightened(); + effect eFear = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eBreath, eDur); + eLink = EffectLinkEffects(eLink, eFear); + + //Determine the duration and save DC + if (nAge <= 6) //Wyrmling + { + nDC = 13; + nCount = 1; + } + else if (nAge >= 7 && nAge <= 9) //Very Young + { + nDC = 15; + nCount = 2; + } + else if (nAge >= 10 && nAge <= 12) //Young + { + nDC = 17; + nCount = 3; + } + else if (nAge >= 13 && nAge <= 15) //Juvenile + { + nDC = 19; + nCount = 4; + } + else if (nAge >= 16 && nAge <= 18) //Young Adult + { + nDC = 21; + nCount = 5; + } + else if (nAge >= 19 && nAge <= 21) //Adult + { + nDC = 24; + nCount = 6; + } + else if (nAge >= 22 && nAge <= 24) //Mature Adult + { + nDC = 27; + nCount = 7; + } + else if (nAge >= 25 && nAge <= 27) //Old + { + nDC = 28; + nCount = 8; + } + else if (nAge >= 28 && nAge <= 30) //Very Old + { + nDC = 30; + nCount = 9; + } + else if (nAge >= 31 && nAge <= 33) //Ancient + { + nDC = 32; + nCount = 10; + } + else if (nAge >= 34 && nAge <= 37) //Wyrm + { + nDC = 34; + nCount = 11; + } + else if (nAge > 37) //Great Wyrm + { + nDC = 37; + nCount = 12; + } + PlayDragonBattleCry(); + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + //Get first target in spell area + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget)) + { + nCount = GetScaledDuration(nCount, oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_DRAGON_BREATH_FEAR)); + //Determine the effect delay time + fDelay = GetDistanceBetween(oTarget, OBJECT_SELF)/20; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR, OBJECT_SELF, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); + } +} + + diff --git a/_haks/poa_dev/nw_s1_dragfeara.ncs b/_haks/poa_dev/nw_s1_dragfeara.ncs new file mode 100644 index 00000000..717ef4f6 Binary files /dev/null and b/_haks/poa_dev/nw_s1_dragfeara.ncs differ diff --git a/_haks/poa_dev/nw_s1_dragfeara.nss b/_haks/poa_dev/nw_s1_dragfeara.nss new file mode 100644 index 00000000..2bb50095 --- /dev/null +++ b/_haks/poa_dev/nw_s1_dragfeara.nss @@ -0,0 +1,45 @@ +//:://///////////////////////////////////////////// +//:: Aura of Fear On Enter +//:: NW_S1_DragFearA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Upon entering the aura of the creature the player + must make a will save or be struck with fear because + of the creatures presence. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" +void main() +{ + //Declare major variables + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eFear = EffectFrightened(); + effect eLink = EffectLinkEffects(eFear, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + int nHD = GetHitDice(GetAreaOfEffectCreator()); + int nDC = 10 + GetHitDice(GetAreaOfEffectCreator())/3; + int nDuration = GetScaledDuration(nHD, oTarget); + if(GetIsEnemy(oTarget, GetAreaOfEffectCreator())) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELLABILITY_AURA_FEAR)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } +} diff --git a/_haks/poa_dev/nw_s1_feroc3.ncs b/_haks/poa_dev/nw_s1_feroc3.ncs new file mode 100644 index 00000000..25681cda Binary files /dev/null and b/_haks/poa_dev/nw_s1_feroc3.ncs differ diff --git a/_haks/poa_dev/nw_s1_feroc3.nss b/_haks/poa_dev/nw_s1_feroc3.nss new file mode 100644 index 00000000..58a44cbb --- /dev/null +++ b/_haks/poa_dev/nw_s1_feroc3.nss @@ -0,0 +1,41 @@ +//:://///////////////////////////////////////////// +//:: Ferocity 3 +//:: NW_S1_Feroc3 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + The Dex and Str of the target increases +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 13, 2001 +//::////////////////////////////////////////////// + +void main() +{ +//:: Declare major variables + object oNPC = OBJECT_SELF; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION); //:: Determine the duration by getting the con modifier + int nIncrease = 9; + int nDuration = 1 + nCONMod; + if(nDuration == 0) { nDuration = 1; } + + + effect eDex = EffectAbilityIncrease(ABILITY_DEXTERITY, nIncrease); + effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, nIncrease); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + effect eLink = EffectLinkEffects(eStr, eDex); + eLink = EffectLinkEffects(eLink, eDur); + eLink = ExtraordinaryEffect(eLink); //:: Make effect extraordinary + + //effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); + SignalEvent(oNPC, EventSpellCastAt(oNPC, SPELLABILITY_FEROCITY_3, FALSE)); + if (nCONMod > 0) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oNPC, RoundsToSeconds(nDuration)); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ; + } +} diff --git a/_haks/poa_dev/nw_s1_gazechaos.ncs b/_haks/poa_dev/nw_s1_gazechaos.ncs new file mode 100644 index 00000000..584a1fd8 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazechaos.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazechaos.nss b/_haks/poa_dev/nw_s1_gazechaos.nss new file mode 100644 index 00000000..950ce623 --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazechaos.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Destroy Law +//:: NW_S1_GazeChaos +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save and are of Lawful alignment. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentLawChaos(oTarget) == ALIGNMENT_LAWFUL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DESTROY_LAW)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazecharm.ncs b/_haks/poa_dev/nw_s1_gazecharm.ncs new file mode 100644 index 00000000..b27cd59f Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazecharm.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazecharm.nss b/_haks/poa_dev/nw_s1_gazecharm.nss new file mode 100644 index 00000000..e4a06224 --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazecharm.nss @@ -0,0 +1,76 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Charm +//:: NW_S1_GazeCharm +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectCharmed(); + + effect eVis = EffectVisualEffect(VFX_IMP_CHARM); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + nDuration = GetScaledDuration(nDuration, oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_CHARM)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + diff --git a/_haks/poa_dev/nw_s1_gazeconfu.ncs b/_haks/poa_dev/nw_s1_gazeconfu.ncs new file mode 100644 index 00000000..f5a010fd Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazeconfu.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazeconfu.nss b/_haks/poa_dev/nw_s1_gazeconfu.nss new file mode 100644 index 00000000..4add32ff --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazeconfu.nss @@ -0,0 +1,77 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Confusion +//:: NW_S1_GazeConfu +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectConfused(); + effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_CONFUSION)); + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_gazedaze.ncs b/_haks/poa_dev/nw_s1_gazedaze.ncs new file mode 100644 index 00000000..d63fc808 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazedaze.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazedaze.nss b/_haks/poa_dev/nw_s1_gazedaze.nss new file mode 100644 index 00000000..f0a8c2dd --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazedaze.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Daze +//:: NW_S1_GazeDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDazed(); + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eGaze, eVisDur); + eLink = EffectLinkEffects(eLink, eDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DAZE)); + + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazedeath.ncs b/_haks/poa_dev/nw_s1_gazedeath.ncs new file mode 100644 index 00000000..149369ae Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazedeath.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazedeath.nss b/_haks/poa_dev/nw_s1_gazedeath.nss new file mode 100644 index 00000000..635ee53b --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazedeath.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Death +//:: NW_S1_GazeDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) || oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazedomn.ncs b/_haks/poa_dev/nw_s1_gazedomn.ncs new file mode 100644 index 00000000..ec2f33fe Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazedomn.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazedomn.nss b/_haks/poa_dev/nw_s1_gazedomn.nss new file mode 100644 index 00000000..56e56e0b --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazedomn.nss @@ -0,0 +1,78 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Dominate +//:: NW_S1_GazeDomn +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDominated(); + effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DOMINATE)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(GetIsEnemy(oTarget)) + { + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazedoom.ncs b/_haks/poa_dev/nw_s1_gazedoom.ncs new file mode 100644 index 00000000..9b0f39ad Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazedoom.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazedoom.nss b/_haks/poa_dev/nw_s1_gazedoom.nss new file mode 100644 index 00000000..cb359b59 --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazedoom.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze of Doom +//:: NW_S1_GazeDoom.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If the target fails a save they recieve a -2 + penalty to all saves, attack rolls, damage and + skill checks for the duration of the spell. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 22, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eVis = EffectVisualEffect(VFX_IMP_DOOM); + effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL, 2); + effect eAttack = EffectAttackDecrease(2); + effect eDamage = EffectDamageDecrease(2); + effect eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, 2); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eAttack, eDamage); + eLink = EffectLinkEffects(eLink, eSaves); + eLink = EffectLinkEffects(eLink, eSkill); + eLink = EffectLinkEffects(eLink, eDur); + + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation()); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(oTarget != oNPC) + { + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DOOM)); + //Spell Resistance and Saving throw + if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC)) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink , oTarget, RoundsToSeconds(nDuration)); + } + } + } + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation()); + } +} diff --git a/_haks/poa_dev/nw_s1_gazeevil.ncs b/_haks/poa_dev/nw_s1_gazeevil.ncs new file mode 100644 index 00000000..d5e209d4 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazeevil.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazeevil.nss b/_haks/poa_dev/nw_s1_gazeevil.nss new file mode 100644 index 00000000..eb2a269c --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazeevil.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Good +//:: NW_S1_GazeEvil +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_GOOD) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazefear.ncs b/_haks/poa_dev/nw_s1_gazefear.ncs new file mode 100644 index 00000000..bb9fe902 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazefear.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazefear.nss b/_haks/poa_dev/nw_s1_gazefear.nss new file mode 100644 index 00000000..333d85ce --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazefear.nss @@ -0,0 +1,74 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Fear +//:: NW_S1_GazeFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + nDuration = GetScaledDuration(nDuration , oTarget); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectFrightened(); + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eLink = EffectLinkEffects(eGaze, eVisDur); + eLink = EffectLinkEffects(eLink, eDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + nDuration = GetScaledDuration(nDuration , oTarget); + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_FEAR)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazegood.ncs b/_haks/poa_dev/nw_s1_gazegood.ncs new file mode 100644 index 00000000..33deeef8 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazegood.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazegood.nss b/_haks/poa_dev/nw_s1_gazegood.nss new file mode 100644 index 00000000..6ce014de --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazegood.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Evil +//:: NW_S1_GazeGood +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_EVIL) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DEATH)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazelaw.ncs b/_haks/poa_dev/nw_s1_gazelaw.ncs new file mode 100644 index 00000000..c4d06dc9 Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazelaw.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazelaw.nss b/_haks/poa_dev/nw_s1_gazelaw.nss new file mode 100644 index 00000000..14a9401b --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazelaw.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Deatroy Chaos +//:: NW_S1_GazeLaw +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 13, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + if(nDuration == 0) { nDuration = 1; } + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectDeath(); + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + if(GetAlignmentLawChaos(oTarget) == ALIGNMENT_CHAOTIC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_DESTROY_LAW)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_gazestun.ncs b/_haks/poa_dev/nw_s1_gazestun.ncs new file mode 100644 index 00000000..717ed05c Binary files /dev/null and b/_haks/poa_dev/nw_s1_gazestun.ncs differ diff --git a/_haks/poa_dev/nw_s1_gazestun.nss b/_haks/poa_dev/nw_s1_gazestun.nss new file mode 100644 index 00000000..8c443992 --- /dev/null +++ b/_haks/poa_dev/nw_s1_gazestun.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Gaze: Stun +//:: NW_S1_GazeStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Cone shape that affects all within the AoE if they + fail a Will Save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 9, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "x0_i0_match" + +void main() +{ +//-------------------------------------------------------------------------- +// Make sure we are not blind +//-------------------------------------------------------------------------- + if (GetHasEffect(EFFECT_TYPE_BLINDNESS, OBJECT_SELF)) + { + FloatingTextStrRefOnCreature(84530, OBJECT_SELF, FALSE); + return; + } + + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDuration = 1 + (nHD / 3); + + location lTargetLocation = GetSpellTargetLocation(); + + effect eGaze = EffectStunned(); + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eVisDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eLink = EffectLinkEffects(eDur, eVisDur); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_GAZE_STUNNED)); + //Determine effect delay + float fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*WillSave*/PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + eGaze = GetScaledEffect(eGaze, oTarget); + eLink = EffectLinkEffects(eLink, eGaze); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + diff --git a/_haks/poa_dev/nw_s1_golemgas.ncs b/_haks/poa_dev/nw_s1_golemgas.ncs new file mode 100644 index 00000000..5d6dbb86 Binary files /dev/null and b/_haks/poa_dev/nw_s1_golemgas.ncs differ diff --git a/_haks/poa_dev/nw_s1_golemgas.nss b/_haks/poa_dev/nw_s1_golemgas.nss new file mode 100644 index 00000000..6fb1495a --- /dev/null +++ b/_haks/poa_dev/nw_s1_golemgas.nss @@ -0,0 +1,41 @@ +//:://///////////////////////////////////////////// +//:: Golem Breath +//:: NW_S1_GolemGas +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Iron Golem spits out a cone of poison. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// + +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + //Declare major variables + location lTargetLocation = GetSpellTargetLocation(); + object oTarget; + effect eCone = EffectPoison(POISON_IRON_GOLEM); + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_GOLEM_BREATH_GAS)); + //Determine effect delay + float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + //Apply poison effect + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE); + } +} + + + diff --git a/_haks/poa_dev/nw_s1_hndbreath.ncs b/_haks/poa_dev/nw_s1_hndbreath.ncs new file mode 100644 index 00000000..aa1ea7e9 Binary files /dev/null and b/_haks/poa_dev/nw_s1_hndbreath.ncs differ diff --git a/_haks/poa_dev/nw_s1_hndbreath.nss b/_haks/poa_dev/nw_s1_hndbreath.nss new file mode 100644 index 00000000..e1427974 --- /dev/null +++ b/_haks/poa_dev/nw_s1_hndbreath.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Hell Hound Fire Breath +//:: NW_S1_HndBreath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A cone of fire eminates from the hound. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d6(2); + + float fDelay; + + location lTargetLocation = GetSpellTargetLocation(); + + effect eCone; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HELL_HOUND_FIREBREATH)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + + //Set damage effect + eCone = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE); + } +} + + + diff --git a/_haks/poa_dev/nw_s1_howlconf.ncs b/_haks/poa_dev/nw_s1_howlconf.ncs new file mode 100644 index 00000000..10cd0209 Binary files /dev/null and b/_haks/poa_dev/nw_s1_howlconf.ncs differ diff --git a/_haks/poa_dev/nw_s1_howlconf.nss b/_haks/poa_dev/nw_s1_howlconf.nss new file mode 100644 index 00000000..f9d770e4 --- /dev/null +++ b/_haks/poa_dev/nw_s1_howlconf.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Howl: Confuse +//:: NW_S1_HowlConf +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 20ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S); + effect eHowl = EffectConfused(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_CONFUSE)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_howldaze.ncs b/_haks/poa_dev/nw_s1_howldaze.ncs new file mode 100644 index 00000000..82237ef9 Binary files /dev/null and b/_haks/poa_dev/nw_s1_howldaze.ncs differ diff --git a/_haks/poa_dev/nw_s1_howldaze.nss b/_haks/poa_dev/nw_s1_howldaze.nss new file mode 100644 index 00000000..bd8e20c5 --- /dev/null +++ b/_haks/poa_dev/nw_s1_howldaze.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Daze +//:: NW_S1_HowlDaze +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + effect eHowl = EffectDazed(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_DAZE)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_howldeath.ncs b/_haks/poa_dev/nw_s1_howldeath.ncs new file mode 100644 index 00000000..06fe047f Binary files /dev/null and b/_haks/poa_dev/nw_s1_howldeath.ncs differ diff --git a/_haks/poa_dev/nw_s1_howldeath.nss b/_haks/poa_dev/nw_s1_howldeath.nss new file mode 100644 index 00000000..5730647b --- /dev/null +++ b/_haks/poa_dev/nw_s1_howldeath.nss @@ -0,0 +1,59 @@ +//:://///////////////////////////////////////////// +//:: Howl: Death +//:: NW_S1_HowlDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD); + effect eHowl = EffectDeath(); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_DEATH)); + fDelay = GetDistanceToObject(oTarget)/10; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_howlfear.ncs b/_haks/poa_dev/nw_s1_howlfear.ncs new file mode 100644 index 00000000..a2af6c1e Binary files /dev/null and b/_haks/poa_dev/nw_s1_howlfear.ncs differ diff --git a/_haks/poa_dev/nw_s1_howlfear.nss b/_haks/poa_dev/nw_s1_howlfear.nss new file mode 100644 index 00000000..13dcfaf0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_howlfear.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Howl: Fear +//:: NW_S1_HowlFear +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eHowl = EffectFrightened(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_FEAR)); + + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_howlparal.ncs b/_haks/poa_dev/nw_s1_howlparal.ncs new file mode 100644 index 00000000..aed44157 Binary files /dev/null and b/_haks/poa_dev/nw_s1_howlparal.ncs differ diff --git a/_haks/poa_dev/nw_s1_howlparal.nss b/_haks/poa_dev/nw_s1_howlparal.nss new file mode 100644 index 00000000..b0ecd43c --- /dev/null +++ b/_haks/poa_dev/nw_s1_howlparal.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Paralysis +//:: NW_S1_HowlParal +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + if(nDuration == 0) { nDuration = 1; } + + float fDelay; + + effect eHowl = EffectParalyze(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_PARALYSIS)); + + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_howlsonic.ncs b/_haks/poa_dev/nw_s1_howlsonic.ncs new file mode 100644 index 00000000..62c88721 Binary files /dev/null and b/_haks/poa_dev/nw_s1_howlsonic.ncs differ diff --git a/_haks/poa_dev/nw_s1_howlsonic.nss b/_haks/poa_dev/nw_s1_howlsonic.nss new file mode 100644 index 00000000..4de9768f --- /dev/null +++ b/_haks/poa_dev/nw_s1_howlsonic.nss @@ -0,0 +1,65 @@ +//:://///////////////////////////////////////////// +//:: Howl: Sonic +//:: NW_S1_HowlSonic +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDamage; + int nSonic = nHD/4; + if(nSonic == 0) { nSonic = 1; } + + effect eVis = EffectVisualEffect(VFX_IMP_SONIC); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); + + float fDelay; + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_SONIC)); + nDamage = d6(nSonic); + //Make a saving throw check + if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC, oNPC, fDelay)) + { + nDamage = nDamage / 2; + } + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} \ No newline at end of file diff --git a/_haks/poa_dev/nw_s1_howlstun.ncs b/_haks/poa_dev/nw_s1_howlstun.ncs new file mode 100644 index 00000000..28a19f6e Binary files /dev/null and b/_haks/poa_dev/nw_s1_howlstun.ncs differ diff --git a/_haks/poa_dev/nw_s1_howlstun.nss b/_haks/poa_dev/nw_s1_howlstun.nss new file mode 100644 index 00000000..962d9b90 --- /dev/null +++ b/_haks/poa_dev/nw_s1_howlstun.nss @@ -0,0 +1,66 @@ +//:://///////////////////////////////////////////// +//:: Howl: Stun +//:: NW_S1_HowlStun +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A howl emanates from the creature which affects + all within 10ft unless they make a save. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "NW_I0_SPELLS" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/4); + int nDuration = 1 + (nHD/4); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_STUN); + effect eHowl = EffectStunned(); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eDur2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_MIND); + effect eLink = EffectLinkEffects(eHowl, eDur); + eLink = EffectLinkEffects(eLink, eDur2); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != oNPC) + { + fDelay = GetDistanceToObject(oTarget)/10; + nDuration = GetScaledDuration(nDuration , oTarget); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_HOWL_STUN)); + + //Make a saving throw check + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_krenscare.ncs b/_haks/poa_dev/nw_s1_krenscare.ncs new file mode 100644 index 00000000..fcbbba78 Binary files /dev/null and b/_haks/poa_dev/nw_s1_krenscare.ncs differ diff --git a/_haks/poa_dev/nw_s1_krenscare.nss b/_haks/poa_dev/nw_s1_krenscare.nss new file mode 100644 index 00000000..79099160 --- /dev/null +++ b/_haks/poa_dev/nw_s1_krenscare.nss @@ -0,0 +1,61 @@ +//:://///////////////////////////////////////////// +//:: Krenshar Fear Stare +//:: NW_S1_KrenScare +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Causes those in the gaze to be struck with fear +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nMetaMagic = PRCGetMetaMagicFeat(); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FEAR_S); + effect eFear = EffectFrightened(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + //Link the fear and mind effects + effect eLink = EffectLinkEffects(eFear, eMind); + eLink = EffectLinkEffects(eLink, eDur); + + + //Get first target in the spell cone + oTarget = GetFirstObjectInShape(SHAPE_CONE, 10.0, GetSpellTargetLocation(), TRUE); + while(GetIsObjectValid(oTarget)) + { + //Make faction check + if(GetIsEnemy(oTarget)) + { + fDelay = GetDistanceToObject(oTarget)/20; + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_KRENSHAR_SCARE)); + //Make a will save + if(!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_FEAR)) + { + //Apply the linked effects and the VFX impact + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get next target in the spell cone + oTarget = GetNextObjectInShape(SHAPE_CONE, 10.0, GetSpellTargetLocation(), TRUE); + } +} diff --git a/_haks/poa_dev/nw_s1_mephsalt.ncs b/_haks/poa_dev/nw_s1_mephsalt.ncs new file mode 100644 index 00000000..0e92ae39 Binary files /dev/null and b/_haks/poa_dev/nw_s1_mephsalt.ncs differ diff --git a/_haks/poa_dev/nw_s1_mephsalt.nss b/_haks/poa_dev/nw_s1_mephsalt.nss new file mode 100644 index 00000000..03b0b97f --- /dev/null +++ b/_haks/poa_dev/nw_s1_mephsalt.nss @@ -0,0 +1,63 @@ +//:://///////////////////////////////////////////// +//:: Salt Mephit Breath +//:: NW_S1_MephSalt +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Salt Mephit shoots out a bolt of corrosive material + that causes 1d4 damage and reduces AC and Attack by 2 + + This should be a cone - Jaysyn +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d4(); + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt, eAttack, eAC; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ACID); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nDamage == 0) {nTouch = 0;} + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MEPHIT_SALT_BREATH)); + + //Set damage, AC mod and attack mod effects + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID); + eAC = EffectACDecrease(2); + eAttack = EffectAttackDecrease(2); + effect eLink = EffectLinkEffects(eAttack, eAC); + eLink = EffectLinkEffects(eLink, eDur); + + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_mephsteam.ncs b/_haks/poa_dev/nw_s1_mephsteam.ncs new file mode 100644 index 00000000..91107e1c Binary files /dev/null and b/_haks/poa_dev/nw_s1_mephsteam.ncs differ diff --git a/_haks/poa_dev/nw_s1_mephsteam.nss b/_haks/poa_dev/nw_s1_mephsteam.nss new file mode 100644 index 00000000..9b46d89b --- /dev/null +++ b/_haks/poa_dev/nw_s1_mephsteam.nss @@ -0,0 +1,67 @@ +//:://///////////////////////////////////////////// +//:: Steam Mephit Breath +//:: NW_S1_MephSteam +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Steam Mephit shoots out a bolt of steam + that causes 1d4 damage and reduces AC by 4 + and Attack by 2 + + This should be a cone - Jaysyn +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 11, 2001 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nDamage = d4(); + + + effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); + effect eBolt, eAttack, eAC; + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + + //Make a ranged touch attack + int nTouch = TouchAttackRanged(oTarget); + if(nDamage == 0) {nTouch = 0;} + + if(nTouch > 0) + { + if(nTouch == 2) + { + nDamage *= 2; + } + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MEPHIT_STEAM_BREATH)); + + //Set damage, AC mod and attack mod effects + eBolt = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + eAC = EffectACDecrease(4); + eAttack = EffectAttackDecrease(2); + effect eLink = EffectLinkEffects(eAC, eAttack); + eLink = EffectLinkEffects(eLink, eDur); + + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3)); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); + } +} diff --git a/_haks/poa_dev/nw_s1_mumundead.ncs b/_haks/poa_dev/nw_s1_mumundead.ncs new file mode 100644 index 00000000..6897b909 Binary files /dev/null and b/_haks/poa_dev/nw_s1_mumundead.ncs differ diff --git a/_haks/poa_dev/nw_s1_mumundead.nss b/_haks/poa_dev/nw_s1_mumundead.nss new file mode 100644 index 00000000..f11db57b --- /dev/null +++ b/_haks/poa_dev/nw_s1_mumundead.nss @@ -0,0 +1,53 @@ +//:://///////////////////////////////////////////// +//:: Bolster Undead +//:: NW_S1_MumUndead +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This spell increases the Turn Resistance of + all undead around the caster by an amount + scaled with HD. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2002 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nScaling = nHD / 4; + + if(nScaling == 0) {nScaling = 1;} + + float fDelay; + + effect eTurn = EffectTurnResistanceIncrease(nScaling); + effect eVis = EffectVisualEffect(VFX_IMP_HEAD_EVIL); + effect eImpact = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(oNPC)); + + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(GetIsFriend(oTarget)) + { + fDelay = GetRandomDelay(); + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_MUMMY_BOLSTER_UNDEAD, FALSE)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eTurn, oTarget, RoundsToSeconds(10))); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oNPC)); + } +} diff --git a/_haks/poa_dev/nw_s1_pulschrdr.ncs b/_haks/poa_dev/nw_s1_pulschrdr.ncs new file mode 100644 index 00000000..e3f8c5ac Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulschrdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulschrdr.nss b/_haks/poa_dev/nw_s1_pulschrdr.nss new file mode 100644 index 00000000..b55902c4 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulschrdr.nss @@ -0,0 +1,73 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Charisma Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_CHARISMA, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulscold.ncs b/_haks/poa_dev/nw_s1_pulscold.ncs new file mode 100644 index 00000000..b17e5afb Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulscold.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulscold.nss b/_haks/poa_dev/nw_s1_pulscold.nss new file mode 100644 index 00000000..c5ff7d28 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulscold.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Cold +//:: NW_S1_PulsCold +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage = d6(nHD); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_COLD); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_COLD)); + + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_COLD); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulscondr.ncs b/_haks/poa_dev/nw_s1_pulscondr.ncs new file mode 100644 index 00000000..a1301921 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulscondr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulscondr.nss b/_haks/poa_dev/nw_s1_pulscondr.nss new file mode 100644 index 00000000..bfdbfcfe --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulscondr.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Constitution Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_CONSTITUTION, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulsdeath.ncs b/_haks/poa_dev/nw_s1_pulsdeath.ncs new file mode 100644 index 00000000..230f564b Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsdeath.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsdeath.nss b/_haks/poa_dev/nw_s1_pulsdeath.nss new file mode 100644 index 00000000..7c949d1c --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsdeath.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Death +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_DEATH); + effect eHowl = EffectDeath(); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + if(oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_DEATH)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH, oNPC, fDelay)) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulsdexdr.ncs b/_haks/poa_dev/nw_s1_pulsdexdr.ncs new file mode 100644 index 00000000..a2fd8841 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsdexdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsdexdr.nss b/_haks/poa_dev/nw_s1_pulsdexdr.nss new file mode 100644 index 00000000..d29872ad --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsdexdr.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Dexterity Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_DEXTERITY, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulsdis.ncs b/_haks/poa_dev/nw_s1_pulsdis.ncs new file mode 100644 index 00000000..80e023b5 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsdis.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsdis.nss b/_haks/poa_dev/nw_s1_pulsdis.nss new file mode 100644 index 00000000..f81568cf --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsdis.nss @@ -0,0 +1,85 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Disease +//:: NW_S1_PulsDis +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of disease spreads out from the creature + and infects all those within 10ft +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Aug 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nRacial = MyPRCGetRacialType(oNPC); + int nHD = GetHitDice(oNPC); + int nDamage = d6(nHD); + int nDisease; + + float fDelay; + + effect eDisease; + effect ePulse = EffectVisualEffect(266); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, ePulse, GetLocation(oNPC)); + + //Determine the disease type based on the Racial Type + switch (nRacial) + { + case RACIAL_TYPE_VERMIN: + nDisease = DISEASE_VERMIN_MADNESS; + break; + case RACIAL_TYPE_UNDEAD: + nDisease = DISEASE_FILTH_FEVER; + break; + case RACIAL_TYPE_OUTSIDER: + nDisease = DISEASE_DEMON_FEVER; + break; + case RACIAL_TYPE_MAGICAL_BEAST: + nDisease = DISEASE_SOLDIER_SHAKES; + break; + case RACIAL_TYPE_ABERRATION: + nDisease = DISEASE_BLINDING_SICKNESS; + break; + default: + nDisease = DISEASE_MINDFIRE; + break; + } + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DISEASE)); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + eDisease = EffectDisease(nDisease); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulselec.ncs b/_haks/poa_dev/nw_s1_pulselec.ncs new file mode 100644 index 00000000..40fc5cfe Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulselec.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulselec.nss b/_haks/poa_dev/nw_s1_pulselec.nss new file mode 100644 index 00000000..2f856145 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulselec.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Lightning +//:: NW_S0_CallLghtn.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All creatures within 10ft of the creature take + 1d6 per HD up to 10d6 +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 22, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); + effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNPC, BODY_NODE_CHEST); + effect eHowl = EffectVisualEffect(VFX_IMP_PULSE_COLD); + + DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHowl, GetLocation(oNPC))); + + float fDelay; + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_LIGHTNING)); + //Roll the damage + nDamage = d6(nHD); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget, 0.5)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulsfire.ncs b/_haks/poa_dev/nw_s1_pulsfire.ncs new file mode 100644 index 00000000..20f097e2 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsfire.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsfire.nss b/_haks/poa_dev/nw_s1_pulsfire.nss new file mode 100644 index 00000000..9270aa99 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsfire.nss @@ -0,0 +1,69 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Fire +//:: NW_S1_PulsFire +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_FIRE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != OBJECT_SELF) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_FIRE)); + //Roll the damage + nDamage = d6(nHD); + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE); + //Determine effect delay + fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + if(nDamage > 0) + { + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulsholy.ncs b/_haks/poa_dev/nw_s1_pulsholy.ncs new file mode 100644 index 00000000..c2302071 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsholy.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsholy.nss b/_haks/poa_dev/nw_s1_pulsholy.nss new file mode 100644 index 00000000..20ae4638 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsholy.nss @@ -0,0 +1,89 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Holy +//:: NW_S1_PulsHoly +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. Undead are damaged, allies are healed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_SUNSTRIKE); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_HOLY); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Roll the amount to heal or damage + nDamage = d4(nHD); + //If the target is not undead + if (MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Make a faction check + if(oTarget != oNPC) + { + if(GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY, FALSE)); + //Set heal effect + eHowl = EffectHeal(nDamage); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + else + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_DIVINE); + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE) ; + if(nDamage > 0) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulsintdr.ncs b/_haks/poa_dev/nw_s1_pulsintdr.ncs new file mode 100644 index 00000000..6730fc8f Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsintdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsintdr.nss b/_haks/poa_dev/nw_s1_pulsintdr.nss new file mode 100644 index 00000000..8558364b --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsintdr.nss @@ -0,0 +1,72 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Intelligence Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulslvldr.ncs b/_haks/poa_dev/nw_s1_pulslvldr.ncs new file mode 100644 index 00000000..de1184e1 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulslvldr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulslvldr.nss b/_haks/poa_dev/nw_s1_pulslvldr.nss new file mode 100644 index 00000000..f65e073e --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulslvldr.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Level Drain +//:: NW_S1_PulsLvlDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(oNPC)); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + fDelay = GetSpellEffectDelay(GetLocation(oNPC), oTarget)/20; + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Apply the VFX impact and effects + eHowl = EffectNegativeLevel(1); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulsneg.ncs b/_haks/poa_dev/nw_s1_pulsneg.ncs new file mode 100644 index 00000000..373c0523 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsneg.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsneg.nss b/_haks/poa_dev/nw_s1_pulsneg.nss new file mode 100644 index 00000000..9bfa749f --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsneg.nss @@ -0,0 +1,87 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Negative +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. Undead are healed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + int nDamage; + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M); + effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Roll the amount to heal or damage + nDamage = d4(nHD); + //If the target is undead + if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) + { + //Make a faction check + if(GetIsFriend(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY, FALSE)); + //Set heal effect + eHowl = EffectHeal(nDamage); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + else + { + if(!GetIsReactionTypeFriendly(oTarget) && MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) + { + //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE); + //Set damage effect + eHowl = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); + if(nDamage > 0) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_HOLY)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); + } + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} diff --git a/_haks/poa_dev/nw_s1_pulspois.ncs b/_haks/poa_dev/nw_s1_pulspois.ncs new file mode 100644 index 00000000..cafb629b Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulspois.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulspois.nss b/_haks/poa_dev/nw_s1_pulspois.nss new file mode 100644 index 00000000..252ae3a0 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulspois.nss @@ -0,0 +1,138 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Poison +//:: NW_S1_PulsPois +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. All who make a reflex save are not + poisoned. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 23, 2000 +//::////////////////////////////////////////////// +#include "prc_inc_racial" +//#include "wm_include" + +void main() +{ +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + int nRacial = MyPRCGetRacialType(oNPC); + int nPoison; + + float fDelay; + + effect ePoison; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + //Determine the poison type based on the Racial Type and HD + switch (nRacial) + { + case RACIAL_TYPE_OUTSIDER: + if (nHD <= 9) + { + nPoison = POISON_QUASIT_VENOM; + } + else if (nHD > 9 && nHD < 13) + { + nPoison = POISON_BEBILITH_VENOM; + } + else if (nHD >= 13) + { + nPoison = POISON_PIT_FIEND_ICHOR; + } + break; + case RACIAL_TYPE_VERMIN: + if (nHD < 3) + { + nPoison = POISON_TINY_SPIDER_VENOM; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_SMALL_SPIDER_VENOM; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_MEDIUM_SPIDER_VENOM; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_HUGE_SPIDER_VENOM; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_GARGANTUAN_SPIDER_VENOM; + } + else if (nHD >= 18) + { + nPoison = POISON_COLOSSAL_SPIDER_VENOM; + } + break; + default: + if (nHD < 3) + { + nPoison = POISON_NIGHTSHADE; + } + else if (nHD <= 3 && nHD < 6) + { + nPoison = POISON_BLADE_BANE; + } + else if (nHD <= 6 && nHD < 9) + { + nPoison = POISON_BLOODROOT; + } + else if (nHD <= 9 && nHD < 12) + { + nPoison = POISON_LARGE_SPIDER_VENOM; + } + else if (nHD <= 12 && nHD < 15) + { + nPoison = POISON_LICH_DUST; + } + else if (nHD <= 15 && nHD < 18) + { + nPoison = POISON_DARK_REAVER_POWDER; + } + else if (nHD >= 18 ) + { + nPoison = POISON_BLACK_LOTUS_EXTRACT; + } + break; + } + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_POISON)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + ePoison = EffectPoison(nPoison); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + + diff --git a/_haks/poa_dev/nw_s1_pulsspore.ncs b/_haks/poa_dev/nw_s1_pulsspore.ncs new file mode 100644 index 00000000..723d8559 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsspore.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsspore.nss b/_haks/poa_dev/nw_s1_pulsspore.nss new file mode 100644 index 00000000..7e9e34d3 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsspore.nss @@ -0,0 +1,50 @@ +//:://///////////////////////////////////////////// +//:: Vrock Spores +//:: NW_S1_PulsSpore +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of disease spreads out from the creature + and infects all those within 10ft +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + float fDelay; + effect eDisease; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_DISEASE)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + eDisease = EffectDisease(DISEASE_SOLDIER_SHAKES); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget)); + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(oNPC)); + } +} diff --git a/_haks/poa_dev/nw_s1_pulsstrdr.ncs b/_haks/poa_dev/nw_s1_pulsstrdr.ncs new file mode 100644 index 00000000..aa85653d Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulsstrdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulsstrdr.nss b/_haks/poa_dev/nw_s1_pulsstrdr.nss new file mode 100644 index 00000000..5f88eabc --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulsstrdr.nss @@ -0,0 +1,71 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Strength Drain +//:: NW_S1_PulsDeath +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + while(GetIsObjectValid(oTarget)) + { + if(oTarget != oNPC) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_STRENGTH, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + } + //Get next target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} + diff --git a/_haks/poa_dev/nw_s1_pulswind.ncs b/_haks/poa_dev/nw_s1_pulswind.ncs new file mode 100644 index 00000000..92fccc72 Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulswind.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulswind.nss b/_haks/poa_dev/nw_s1_pulswind.nss new file mode 100644 index 00000000..05724072 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulswind.nss @@ -0,0 +1,51 @@ +//:://///////////////////////////////////////////// +//:: Pulse Whirlwind +//:: NW_S1_PulsWind +//:: Copyright (c) 2001 Bioware Corp. +//:://///////////////////////////////////////////// +/* + All those that fail a save are knocked + down by the elemental whirlwind. +*/ +//:://///////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//:://///////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nSTRMod = GetAbilityModifier(ABILITY_STRENGTH, oNPC); + int nDC = 10 +nSTRMod+ (nHD/2); + + effect eDown = EffectKnockdown(); + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WIND); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oNPC) + { + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDown, oTarget, 5.0); + } + //Get next target in spell area + } + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC)); + } +} diff --git a/_haks/poa_dev/nw_s1_pulswisdr.ncs b/_haks/poa_dev/nw_s1_pulswisdr.ncs new file mode 100644 index 00000000..19253dea Binary files /dev/null and b/_haks/poa_dev/nw_s1_pulswisdr.ncs differ diff --git a/_haks/poa_dev/nw_s1_pulswisdr.nss b/_haks/poa_dev/nw_s1_pulswisdr.nss new file mode 100644 index 00000000..b1bf68c3 --- /dev/null +++ b/_haks/poa_dev/nw_s1_pulswisdr.nss @@ -0,0 +1,68 @@ +//:://///////////////////////////////////////////// +//:: Pulse: Wisdom Drain +//:: NW_S1_PulsWisDr +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + A wave of energy emanates from the creature which affects + all within 10ft. Damage can be reduced by half for all + damaging variants. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 14, 2000 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget; + + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + int nDamage = nHD/5; + + if (nDamage == 0) {nDamage = 1;} + + float fDelay; + + effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); + effect eHowl; + effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE); + + ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); + + //Get first target in spell area + oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF)); + while(GetIsObjectValid(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM)); + //Determine effect delay + fDelay = GetDistanceBetween(oNPC, oTarget)/20; + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay)) + { + //Set the Ability mod and change to supernatural effect + eHowl = EffectAbilityDecrease(ABILITY_WISDOM, nDamage); + eHowl = SupernaturalEffect(eHowl); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + //Get first target in spell area + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF)); + } +} + diff --git a/_haks/poa_dev/nw_s1_smokeclaw.ncs b/_haks/poa_dev/nw_s1_smokeclaw.ncs new file mode 100644 index 00000000..ebed03b3 Binary files /dev/null and b/_haks/poa_dev/nw_s1_smokeclaw.ncs differ diff --git a/_haks/poa_dev/nw_s1_smokeclaw.nss b/_haks/poa_dev/nw_s1_smokeclaw.nss new file mode 100644 index 00000000..6db3666f --- /dev/null +++ b/_haks/poa_dev/nw_s1_smokeclaw.nss @@ -0,0 +1,64 @@ +//:://///////////////////////////////////////////// +//:: Smoke Claws +//:: NW_S1_SmokeClaw +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + If a Belker succeeds at a touch attack the + target breaths in part of the Belker and suffers + 3d4 damage per round until a Fortitude save is + made. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 23 , 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//#include "wm_include" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + + int bSave = FALSE; + + effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); + effect eSmoke; + float fDelay = 0.0; + + //Make a touch attack + if(TouchAttackMelee(oTarget)) + { + if(!GetIsReactionTypeFriendly(oTarget)) + { + //Make a saving throw check + while (bSave == FALSE) + { + //Make a saving throw check + if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NONE, oNPC, fDelay)) + { + bSave = TRUE; + } + else + { + //Set damage + eSmoke = EffectDamage(d4(3)); + //Apply the VFX impact and effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSmoke, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + //Increment the delay + fDelay = fDelay + 6.0; + } + } + } + } +} diff --git a/_haks/poa_dev/nw_s1_stink_a.ncs b/_haks/poa_dev/nw_s1_stink_a.ncs new file mode 100644 index 00000000..bb2bc5b1 Binary files /dev/null and b/_haks/poa_dev/nw_s1_stink_a.ncs differ diff --git a/_haks/poa_dev/nw_s1_stink_a.nss b/_haks/poa_dev/nw_s1_stink_a.nss new file mode 100644 index 00000000..67652dde --- /dev/null +++ b/_haks/poa_dev/nw_s1_stink_a.nss @@ -0,0 +1,57 @@ +//:://///////////////////////////////////////////// +//:: Stinking Cloud On Enter +//:: NW_S1_Stink_A.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Those within the area of effect must make a + fortitude save or be dazed. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 17, 2001 +//::////////////////////////////////////////////// + +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); //Get the first object in the persistant area + + int nHD = GetHitDice(oNPC); + int nCONMod = GetAbilityModifier(ABILITY_CONSTITUTION, oNPC); + int nDC = 10 +nCONMod+ (nHD/2); + + effect eStink = EffectDazed(); + effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eMind, eStink); + eLink = EffectLinkEffects(eLink, eDur); + + effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S); + + float fDelay; + + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + if(MyPRCGetRacialType(oTarget) != RACIAL_TYPE_VERMIN) + { + if(GetIsEnemy(oTarget)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STINKING_CLOUD)); + //Make a Fort Save + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_POISON)) + { + fDelay = GetRandomDelay(0.25, 1.0); + //Apply the VFX impact and linked effects + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2))); + } + } + } +} diff --git a/_haks/poa_dev/nw_s1_tyrantfga.ncs b/_haks/poa_dev/nw_s1_tyrantfga.ncs new file mode 100644 index 00000000..a28a1dfe Binary files /dev/null and b/_haks/poa_dev/nw_s1_tyrantfga.ncs differ diff --git a/_haks/poa_dev/nw_s1_tyrantfga.nss b/_haks/poa_dev/nw_s1_tyrantfga.nss new file mode 100644 index 00000000..a2752cbd --- /dev/null +++ b/_haks/poa_dev/nw_s1_tyrantfga.nss @@ -0,0 +1,56 @@ +//:://///////////////////////////////////////////// +//:: Tyrant Fog Zombie Mist Heartbeat +//:: NW_S1_TyrantFgA.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creatures entering the area around the zombie + must save or take 1 point of Constitution + damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +#include "NW_I0_SPELLS" +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = GetAreaOfEffectCreator(); + object oTarget = GetEnteringObject(); + //if (NullMagicOverride(GetArea(oTarget), oTarget, oTarget)) {return;} + + int bAbsent = TRUE; + int nHD = GetHitDice(oNPC); + int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC); + int nDC = 10 +nCHAMod+ (nHD/2); + + effect eTest; + effect eCon = EffectAbilityDecrease(ABILITY_CONSTITUTION, 1); + eCon = ExtraordinaryEffect(eCon); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); + effect eLink = EffectLinkEffects(eCon, eDur); + + if(!GetHasSpellEffect(SPELLABILITY_TYRANT_FOG_MIST, oTarget)) + { + if(bAbsent == TRUE) + { + if(GetIsEnemy(oTarget, oNPC)) + { + //Fire cast spell at event for the specified target + SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_TYRANT_FOG_MIST)); + //Make a saving throw check + if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_POISON)) + { + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(5)); + } + } + } + } +} diff --git a/_haks/poa_dev/nw_s1_tyrantfog.ncs b/_haks/poa_dev/nw_s1_tyrantfog.ncs new file mode 100644 index 00000000..609cad3b Binary files /dev/null and b/_haks/poa_dev/nw_s1_tyrantfog.ncs differ diff --git a/_haks/poa_dev/nw_s1_tyrantfog.nss b/_haks/poa_dev/nw_s1_tyrantfog.nss new file mode 100644 index 00000000..e3ab9e63 --- /dev/null +++ b/_haks/poa_dev/nw_s1_tyrantfog.nss @@ -0,0 +1,25 @@ +//:://///////////////////////////////////////////// +//:: Tyrant Fog Zombie Mist +//:: NW_S1_TyrantFog.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Creatures entering the area around the zombie + must save or take 1 point of Constitution + damage. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: May 25, 2001 +//::////////////////////////////////////////////// +//#include "wm_include" +#include "prc_inc_spells" + +void main() +{ + //if (WildMagicOverride()) { return; } + + //Declare and apply the AOE + effect eAOE = EffectAreaOfEffect(AOE_MOB_TYRANT_FOG); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAOE, OBJECT_SELF, HoursToSeconds(100)); +} diff --git a/_haks/poa_dev/nw_s2_divprot.ncs b/_haks/poa_dev/nw_s2_divprot.ncs new file mode 100644 index 00000000..c2f36e0c Binary files /dev/null and b/_haks/poa_dev/nw_s2_divprot.ncs differ diff --git a/_haks/poa_dev/nw_s2_divprot.nss b/_haks/poa_dev/nw_s2_divprot.nss new file mode 100644 index 00000000..fff40abc --- /dev/null +++ b/_haks/poa_dev/nw_s2_divprot.nss @@ -0,0 +1,45 @@ +//:://///////////////////////////////////////////// +//:: Divine Protection +//:: NW_S2_DivProt.nss +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Makes the target creature invisible to hostile + creatures unless they make a Will Save to ignore + the Sanctuary Effect +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 8, 2002 +//::////////////////////////////////////////////// +#include "prc_inc_spells" +//#include "wm_include" +void main() +{ + //if (WildMagicOverride()) { return; } + +//:: Declare major variables + object oNPC = OBJECT_SELF; + object oTarget = PRCGetSpellTargetObject(); + + effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY); + effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); + int nDC = 10 + GetAbilityModifier(ABILITY_CHARISMA) + GetLevelByTypeDivine(oNPC); + effect eSanc = EffectSanctuary(nDC); + + effect eLink = EffectLinkEffects(eVis, eSanc); + eLink = EffectLinkEffects(eLink, eDur); + //Fire cast spell at event for the specified target + SignalEvent(OBJECT_SELF, EventSpellCastAt(oNPC, SPELLABILITY_DIVINE_PROTECTION, FALSE)); + + int nDuration = GetLevelByTypeDivine(oNPC); + //Enter Metamagic conditions + int nMetaMagic = PRCGetMetaMagicFeat(); + if (nMetaMagic == METAMAGIC_EXTEND) + { + nDuration = nDuration *2; //Duration is +100% + } + //Apply the VFX impact and effects + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); +} + diff --git a/_haks/poa_dev/nw_s3_balordeth.ncs b/_haks/poa_dev/nw_s3_balordeth.ncs new file mode 100644 index 00000000..0722edb9 Binary files /dev/null and b/_haks/poa_dev/nw_s3_balordeth.ncs differ diff --git a/_haks/poa_dev/nw_s3_balordeth.nss b/_haks/poa_dev/nw_s3_balordeth.nss new file mode 100644 index 00000000..96d0afb2 --- /dev/null +++ b/_haks/poa_dev/nw_s3_balordeth.nss @@ -0,0 +1,62 @@ +// HCR v3.2.0 - Execute default death script after fireball effects is complete. +//:://////////////////////////////////////////////////////////////////////////// +//:: FileName: NW_S3_BALORDETH +//:://////////////////////////////////////////////////////////////////////////// +/* + Fireball explosion does 50 damage to all within 20ft. +*/ +//:://////////////////////////////////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Jan 9, 2002 +//:://////////////////////////////////////////////////////////////////////////// +#include "NW_I0_SPELLS" +#include "prc_inc_spells" +//:://////////////////////////////////////////////////////////////////////////// +void main() +{ + // Declare major variables. + int nMetaMagic = PRCGetMetaMagicFeat(); + int nDamage; + float fDelay; + effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); + effect eDam; + + // Apply the fireball explosion. + effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); + location lTarget = GetLocation(OBJECT_SELF); + ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); + + // Cycle through the targets until an invalid object is captured. + object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR); + while (GetIsObjectValid(oTarget)) + { + // Fire cast spell at event for the specified target. + SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL)); + + // Calculate delay based on distance between explosion and the target. + fDelay = (GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20); + if (!PRCDoResistSpell(OBJECT_SELF, oTarget, FloatToInt(fDelay))) + { + // Adjust damage based on Reflex Save, Evasion and Improved Evasion. + nDamage = PRCGetReflexAdjustedDamage(50, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE); + if (nDamage > 0) + { + // Apply effects to the currently selected target. + eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); + + // This visual effect is applied to the target object not the + // location as above. This visual effect represents the flame that + // erupts on the target not on the ground. + DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); + } + } + + // Select the next target. + oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR); + } + + // HCR 3.0 - Call default death script. + ExecuteScript("nw_c2_default7", OBJECT_SELF); +} +//:://////////////////////////////////////////////////////////////////////////// diff --git a/_module/_removed files/array_example.ncs b/_module/_removed files/array_example.ncs new file mode 100644 index 00000000..53a0d30a Binary files /dev/null and b/_module/_removed files/array_example.ncs differ diff --git a/_module/_removed files/array_example.nss b/_module/_removed files/array_example.nss new file mode 100644 index 00000000..53f13f8f --- /dev/null +++ b/_module/_removed files/array_example.nss @@ -0,0 +1,143 @@ +//#include "inc_array" +#include "nwnx_time" + +// nwnx_data also includes inc_array, so don't double dip. +#include "nwnx_data" + +void Log(string msg) +{ + WriteTimestampedLogEntry(msg); +} + +void TestArrayOnModule() +{ + + string array = "test"; + + // By default, temporary arrays are created on the module. + Array_PushBack_Str(array, "BItem1"); + Array_PushBack_Str(array, "AItem2"); + Array_PushBack_Str(array, "AItem3"); + Array_PushBack_Str(array, "BItem2"); + Array_Debug_Dump(array, "After first load"); + + int foo = Array_Find_Str(array, "AItem3"); + Log("Found element AItem3 at index = " + IntToString(foo)); + + Array_Set_Str(array, 2, "Suck it up..."); + Array_Debug_Dump(array, "After set 2 = 'Suck it up...'"); + + Array_Erase(array, 1); + Array_Debug_Dump(array, "After delete 1"); + + Array_PushBack_Str(array, "MItem1"); + Array_PushBack_Str(array, "QItem2"); + Array_PushBack_Str(array, "NItem3"); + Array_PushBack_Str(array, "KItem2"); + + Array_Debug_Dump(array, "After add more"); + Array_SortAscending(array); + + Array_Debug_Dump(array, "After sort"); + + Array_Shuffle(array); + Array_Debug_Dump(array, "After shuffle"); + + Log( (Array_Contains_Str(array, "NItem3")) ? "Passed.. found it" : "Failed.. should have found it" ); + Log( (Array_Contains_Str(array, "KItem2")) ? "Passed.. found it" : "Failed.. should have found it" ); + Log( (Array_Contains_Str(array, "xxxxxx")) ? "Failed.. not found" : "Passed.. should not exist" ); + + Array_Clear(array); + // Load up the array with 100 entries + int i; + + struct NWNX_Time_HighResTimestamp b; + b = NWNX_Time_GetHighResTimeStamp(); + Log("Start Time: " + IntToString(b.seconds) + "." + IntToString(b.microseconds)); + for (i=0; i<1000; i++) + { + Array_PushBack_Str(array, IntToString(d100()) + " xxx " + IntToString(i)); + } + b = NWNX_Time_GetHighResTimeStamp(); + Log("Loaded 1000: " + IntToString(b.seconds) + "." + IntToString(b.microseconds)); + Array_Shuffle(array); + b = NWNX_Time_GetHighResTimeStamp(); + Log("Shuffled 1000: " + IntToString(b.seconds) + "." + IntToString(b.microseconds)); + for (i=5; i<995; i++) + { + // Delete the third entry a bunch of times + Array_Erase(array, 3); + } + b = NWNX_Time_GetHighResTimeStamp(); + Log("Delete ~990: " + IntToString(b.seconds) + "." + IntToString(b.microseconds)); + Array_Debug_Dump(array, "After mass insert/delete"); + +} + +void TestArrayOnChicken() +{ + string array="chicken"; + // Let's create an array "on" our favorite creature: the deadly nw_chicken + // Note - arrays aren't really attached to the item, but the module, and they + // are tagged with the objects string representation. + object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); + if (!GetIsObjectValid(oCreature)) + { + Log("NWNX_Creature test: Failed to create creature"); + return; + } + + Array_PushBack_Str(array, "BItem1", oCreature); + Array_PushBack_Str(array, "AItem2", oCreature); + Array_PushBack_Str(array, "AItem3", oCreature); + Array_PushBack_Str(array, "BItem2", oCreature); + Array_Debug_Dump(array, "After Chicken array load", oCreature); + +} + +void TestNWNXArray() +{ + Log(""); + Log("Start NWNX_Data test."); + string array = "test2"; + + NWNX_Data_Array_PushBack_Str(GetModule(), array, "XItem1"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "ZItem2"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "ZItem3"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "XItem2"); + Array_Debug_Dump(array, "After first load"); + + int foo = NWNX_Data_Array_Find_Str(GetModule(), array, "ZItem3"); + Log("Found element AItem3 at index = " + IntToString(foo)); + + NWNX_Data_Array_Set_Str(GetModule(), array, 2, "Suck it up..."); + Array_Debug_Dump(array, "After set 2 = 'Suck it up...'"); + + NWNX_Data_Array_Erase(NWNX_DATA_TYPE_STRING, GetModule(), array, 1); + Array_Debug_Dump(array, "After delete 1"); + + NWNX_Data_Array_PushBack_Str(GetModule(), array, "MItem1"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "QItem2"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "NItem3"); + NWNX_Data_Array_PushBack_Str(GetModule(), array, "KItem2"); + + Array_Debug_Dump(array, "After add more"); + NWNX_Data_Array_SortAscending(NWNX_DATA_TYPE_STRING, GetModule(), array); + + Array_Debug_Dump(array, "After sort"); + +} + +// Uncomment and assign to some event click. +/* */ +void main() +{ + Log("Start"); + + TestArrayOnModule(); + + TestArrayOnChicken(); + + TestNWNXArray(); +} +/* */ diff --git a/_module/_removed files/inc_array.nss b/_module/_removed files/inc_array.nss new file mode 100644 index 00000000..0024f733 --- /dev/null +++ b/_module/_removed files/inc_array.nss @@ -0,0 +1,504 @@ +#include "nwnx_regex" + +/// @addtogroup data Data +/// @brief Provides a number of data structures for NWN code to use (simulated arrays) +/// @{ +/// @file nwnx_data.nss + +const int INVALID_INDEX = -1; +const int TYPE_FLOAT = 0; +const int TYPE_INTEGER = 1; +const int TYPE_OBJECT = 2; +const int TYPE_STRING = 3; + +/// @defgroup data_array_at Array At +/// @brief Returns the element at the index. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param index The index. +/// @return The element of associated type. +/// @{ +string Array_At_Str(string tag, int index, object obj=OBJECT_INVALID); +float Array_At_Flt(string tag, int index, object obj=OBJECT_INVALID); +int Array_At_Int(string tag, int index, object obj=OBJECT_INVALID); +object Array_At_Obj(string tag, int index, object obj=OBJECT_INVALID); +/// @} + + +/// Clears the entire array, such that size==0. +void Array_Clear(string tag, object obj=OBJECT_INVALID); + +/// @defgroup data_array_contains Array Contains +/// @brief Checks if array contains the element. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param element The element. +/// @return TRUE if the collection contains the element. +/// @{ +int Array_Contains_Flt(string tag, float element, object obj=OBJECT_INVALID); +int Array_Contains_Int(string tag, int element, object obj=OBJECT_INVALID); +int Array_Contains_Obj(string tag, object element, object obj=OBJECT_INVALID); +int Array_Contains_Str(string tag, string element, object obj=OBJECT_INVALID); +/// @} + +/// Copies the array of name otherTag over the array of name tag. +void Array_Copy(string tag, string otherTag, object obj=OBJECT_INVALID); + +/// Erases the element at index, and shuffles any elements from index size-1 to index + 1 left. +void Array_Erase(string tag, int index, object obj=OBJECT_INVALID); + +/// @defgroup data_array_find Array Find +/// @brief Get the index at which the element is located. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param element The element. +/// @return Returns the index at which the element is located, or ARRAY_INVALID_INDEX. +/// @{ +int Array_Find_Flt(string tag, float element, object obj=OBJECT_INVALID); +int Array_Find_Int(string tag, int element, object obj=OBJECT_INVALID); +int Array_Find_Obj(string tag, object element, object obj=OBJECT_INVALID); +int Array_Find_Str(string tag, string element, object obj=OBJECT_INVALID); +/// @} + +/// @defgroup data_array_insert Array Insert +/// @brief Inserts the element at the index, where size > index >= 0. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param index The index. +/// @param element The element. +/// @{ +void Array_Insert_Flt(string tag, int index, float element, object obj=OBJECT_INVALID); +void Array_Insert_Int(string tag, int index, int element, object obj=OBJECT_INVALID); +void Array_Insert_Obj(string tag, int index, object element, object obj=OBJECT_INVALID); +void Array_Insert_Str(string tag, int index, string element, object obj=OBJECT_INVALID); +/// @} + +/// @defgroup data_array_pushback Array Pushback +/// @brief Pushes an element to the back of the collection. +/// @remark Functionally identical to an insert at index size-1. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param element The element. +/// @{ +void Array_PushBack_Flt(string tag, float element, object obj=OBJECT_INVALID); +void Array_PushBack_Int(string tag, int element, object obj=OBJECT_INVALID); +void Array_PushBack_Obj(string tag, object element, object obj=OBJECT_INVALID); +void Array_PushBack_Str(string tag, string element, object obj=OBJECT_INVALID); +/// @} + +/// Resizes the array. If the array is shrinking, it chops off elements at the ned. +void Array_Resize(string tag, int size, object obj=OBJECT_INVALID); + +/// Reorders the array such each possible permutation of elements has equal probability of appearance. +void Array_Shuffle(string tag, object obj=OBJECT_INVALID); + +/// Returns the size of the array. +int Array_Size(string tag, object obj=OBJECT_INVALID); + +/// Sorts the collection based on descending order. +void Array_SortAscending(string tag, int type=TYPE_STRING, object obj=OBJECT_INVALID); + +/// Sorts the collection based on descending order. +void Array_SortDescending(string tag, int type=TYPE_STRING, object obj=OBJECT_INVALID); + +/// @defgroup data_array_set Array Set +/// @brief Sets the element at the index, where size > index >= 0. +/// @ingroup data +/// @param obj The object. +/// @param tag The tag. +/// @param index The index. +/// @param element The element. +/// @{ +void Array_Set_Flt(string tag, int index, float element, object obj=OBJECT_INVALID); +void Array_Set_Int(string tag, int index, int element, object obj=OBJECT_INVALID); +void Array_Set_Obj(string tag, int index, object element, object obj=OBJECT_INVALID); +void Array_Set_Str(string tag, int index, string element, object obj=OBJECT_INVALID); +/// @} + +/// @} + +// +// Local Utility Functions. +// +string GetTableName(string tag, object obj=OBJECT_INVALID, int bare=FALSE) { + if (obj == OBJECT_INVALID) + obj = GetModule(); + + string sName = "array_" + ObjectToString(obj) + "_" + tag; + // Remove invalid characters from the tag rather than failing. + string sCleansed = NWNX_Regex_Replace(sName, "[^A-Za-z0-9_\$@#]", ""); + // But provide some feedback. + if (GetStringLength(sName) != GetStringLength(sCleansed) || GetStringLength(sCleansed) == 0) { + WriteTimestampedLogEntry("WARNING: Invalid table name detected for array with tag <" + tag + ">. Only characters (a-zA-Z0-9), _, @, $ and # are allowed. Using <"+sCleansed+"> instead."); + + } + + // BARE returns just the table name with no wrapping. + if (bare == TRUE) { + return sCleansed; + } + + // Table name wraped in quotes to avoid token expansion. + return "\""+sCleansed+"\""; +} + +string GetTableCreateString(string tag, object obj=OBJECT_INVALID) { + // for simplicity sake, everything is turned into a string. Possible enhancement + // to create specific tables for int/float/whatever. + return "CREATE TABLE IF NOT EXISTS " + GetTableName(tag, obj) + " ( ind INTEGER PRIMARY KEY, value TEXT )"; +} + +int TableExists(string tag, object obj=OBJECT_INVALID) { + string stmt = "SELECT name FROM sqlite_master WHERE type = 'table' AND name = @tablename;"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindString(sqlQuery, "@tablename", GetTableName(tag, obj, TRUE)); + return SqlStep(sqlQuery); +} + +void ExecuteStatement(string statement, object obj=OBJECT_INVALID) { + if (obj == OBJECT_INVALID) + obj = GetModule(); + // There's no direct "execute this.." everything has to be prepared then executed. + //WriteTimestampedLogEntry("SQL: " + statement); + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), statement); + SqlStep(sqlQuery); +} + +void CreateArrayTable(string tag, object obj=OBJECT_INVALID) { + string createStatement = GetTableCreateString(tag, obj); + ExecuteStatement(createStatement, obj); +} + +// Get the table row count. Returns -1 on error (0 is a valid number of rows in a table) +int GetRowCount(string tag, object obj=OBJECT_INVALID) { + if (obj == OBJECT_INVALID) + obj = GetModule(); + CreateArrayTable(tag, obj); + string stmt = "SELECT COUNT(1) FROM " + GetTableName(tag, obj); + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + if ( SqlStep(sqlQuery) ) { + return SqlGetInt(sqlQuery, 0); + } + return -1; +} + + +//////////////////////////////////////////////////////////////////////////////// +// return the value contained in location "index" +string Array_At_Str(string tag, int index, object obj=OBJECT_INVALID) +{ + // Just "create if not exists" to ensure it exists for the insert. + CreateArrayTable(tag, obj); + + string stmt = "SELECT value FROM " + GetTableName(tag, obj) + " WHERE ind = @ind"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", index); + if ( SqlStep(sqlQuery) ) { + return SqlGetString(sqlQuery, 0); + } + return ""; +} + +float Array_At_Flt(string tag, int index, object obj=OBJECT_INVALID) +{ + string st = Array_At_Str(tag, index, obj); + if (st == "") { + return 0.0; + } + return StringToFloat(st); +} + +int Array_At_Int(string tag, int index, object obj=OBJECT_INVALID) +{ + string st = Array_At_Str(tag, index, obj); + if (st == "") { + return 0; + } + return StringToInt(st); +} + +object Array_At_Obj(string tag, int index, object obj=OBJECT_INVALID) +{ + string st = Array_At_Str(tag, index, obj); + if (st == "") { + return OBJECT_INVALID; + } + return StringToObject(st); +} + +void Array_Clear(string tag, object obj=OBJECT_INVALID) +{ + ExecuteStatement("delete from "+GetTableName(tag, obj), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Return true/value (1/0) if the array contains the value "element" +int Array_Contains_Str(string tag, string element, object obj=OBJECT_INVALID) +{ + CreateArrayTable(tag, obj); + string stmt = "SELECT COUNT(1) FROM "+GetTableName(tag, obj)+" WHERE value = @element"; + + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindString(sqlQuery, "@element", element); + + int pos = -1; + if ( SqlStep(sqlQuery) ) { + pos = SqlGetInt(sqlQuery, 0); + if (pos > 0) { + return TRUE; + } + } + return FALSE; +} + +int Array_Contains_Flt(string tag, float element, object obj=OBJECT_INVALID) +{ + return Array_Contains_Str(tag, FloatToString(element), obj); +} + +int Array_Contains_Int(string tag, int element, object obj=OBJECT_INVALID) +{ + return Array_Contains_Str(tag, IntToString(element), obj); +} + +int Array_Contains_Obj(string tag, object element, object obj=OBJECT_INVALID) +{ + return Array_Contains_Str(tag, ObjectToString(element), obj); +} + + +//////////////////////////////////////////////////////////////////////////////// +void Array_Copy(string tag, string otherTag, object obj=OBJECT_INVALID) +{ + CreateArrayTable(otherTag, obj); + ExecuteStatement("INSERT INTO "+GetTableName(otherTag, obj)+" SELECT * FROM "+GetTableName(tag, obj), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +void Array_Erase(string tag, int index, object obj=OBJECT_INVALID) +{ + int rows = GetRowCount(tag, obj); + // Silently fail if "index" is outside the range of valid indicies. + if (index >= 0 && index < rows) { + string stmt = "DELETE FROM "+GetTableName(tag, obj)+" WHERE ind = @ind"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", index); + SqlStep(sqlQuery); + + stmt = "UPDATE "+GetTableName(tag, obj)+" SET ind = ind - 1 WHERE ind > @ind"; + sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", index); + SqlStep(sqlQuery); + } +} + +//////////////////////////////////////////////////////////////////////////////// +// return the index in the array containing "element" +// if not found, return INVALID_INDEX +int Array_Find_Str(string tag, string element, object obj=OBJECT_INVALID) +{ + string stmt = "SELECT IFNULL(MIN(ind),@invalid_index) FROM "+GetTableName(tag, obj)+" WHERE value = @element"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@invalid_index", INVALID_INDEX); + SqlBindString(sqlQuery, "@element", element); + if ( SqlStep(sqlQuery) ) { + return SqlGetInt(sqlQuery, 0); + } + return INVALID_INDEX; +} + +int Array_Find_Flt(string tag, float element, object obj=OBJECT_INVALID) +{ + return Array_Find_Str(tag, FloatToString(element), obj); +} + +int Array_Find_Int(string tag, int element, object obj=OBJECT_INVALID) +{ + return Array_Find_Str(tag, IntToString(element), obj); +} + +int Array_Find_Obj(string tag, object element, object obj=OBJECT_INVALID) +{ + return Array_Find_Str(tag, ObjectToString(element), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Insert a new element into position 'index'. If index is beyond the number of rows in the array, +// this will quietly fail. This could be changed if you wanted to support sparse +// arrays. +void Array_Insert_Str(string tag, int index, string element, object obj=OBJECT_INVALID) +{ + int rows = GetRowCount(tag, obj); + // Index numbers are off by one, much like C arrays, so for "rows=10" - values are 0-9. + // It's not unreasonable to fail if you try to insert ind=10 into an array who's indexes + // only go to 9, but I guess it doesn't hurt as long as we're not allowing gaps in + // index numbers. + if (index >= 0 && index <= rows) { + // index is passed as an integer, so immune (as far as I know) to SQL injection for a one shot query. + ExecuteStatement("UPDATE "+GetTableName(tag, obj)+" SET ind = ind + 1 WHERE ind >= "+IntToString(index), obj); + // Element, however, is not. + string stmt = "INSERT INTO "+GetTableName(tag, obj)+" VALUES ( @ind, @element )"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", index); + SqlBindString(sqlQuery, "@element", element); + SqlStep(sqlQuery); + } +} + +void Array_Insert_Flt(string tag, int index, float element, object obj=OBJECT_INVALID) +{ + Array_Insert_Str(tag, index, FloatToString(element), obj); +} + +void Array_Insert_Int(string tag, int index, int element, object obj=OBJECT_INVALID) +{ + Array_Insert_Str(tag, index, IntToString(element), obj); +} + +void Array_Insert_Obj(string tag, int index, object element, object obj=OBJECT_INVALID) +{ + Array_Insert_Str(tag, index, ObjectToString(element), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Insert a new element at the end of the array. +void Array_PushBack_Str(string tag, string element, object obj=OBJECT_INVALID) +{ + // If rowCount = 10, indexes are from 0 to 9, so this becomes the 11th entry at index 10. + int rowCount = GetRowCount(tag, obj); + + string stmt = "INSERT INTO "+GetTableName(tag, obj)+" VALUES ( @ind, @element )"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", rowCount); + SqlBindString(sqlQuery, "@element", element); + SqlStep(sqlQuery); +} + +void Array_PushBack_Flt(string tag, float element, object obj=OBJECT_INVALID) +{ + Array_PushBack_Str(tag, FloatToString(element), obj); +} + +void Array_PushBack_Int(string tag, int element, object obj=OBJECT_INVALID) +{ + Array_PushBack_Str(tag, IntToString(element), obj); +} + +void Array_PushBack_Obj(string tag, object element, object obj=OBJECT_INVALID) +{ + Array_PushBack_Str(tag, ObjectToString(element), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Cuts the array off at size 'size'. Elements beyond size are removed. +void Array_Resize(string tag, int size, object obj=OBJECT_INVALID) +{ + // Int immune to sql injection so easier to one-shot it. + ExecuteStatement("DELETE FROM "+GetTableName(tag, obj)+" WHERE ind >= " + IntToString(size), obj); +} + +//////////////////////////////////////////////////////////////////////////////// +void Array_Shuffle(string tag, object obj=OBJECT_INVALID) +{ + string table = GetTableName(tag, obj, TRUE); + ExecuteStatement("CREATE TABLE " +table+ "_temp AS SELECT ROW_NUMBER() OVER(ORDER BY RANDOM())-1, value FROM " +table, obj); + ExecuteStatement("DELETE FROM " +table , obj); + ExecuteStatement("INSERT INTO " +table+ " SELECT * FROM " +table+ "_temp", obj); + ExecuteStatement("DROP TABLE " +table+ "_TEMP", obj); +} + +//////////////////////////////////////////////////////////////////////////////// +int Array_Size(string tag, object obj=OBJECT_INVALID) +{ + return GetRowCount(tag, obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Sort the array by value according to 'direction' (ASC or DESC). +// Supplying a type allows for correct numerical sorting of integers or floats. +void Array_Sort(string tag, string dir="ASC", int type=TYPE_STRING, object obj=OBJECT_INVALID) +{ + string table = GetTableName(tag, obj, TRUE); + string direction = GetStringUpperCase(dir); + + if ( ! (direction == "ASC" || direction == "DESC") ) { + WriteTimestampedLogEntry("WARNING: Invalid sort direction <" + direction + "> supplied. Defaulting to ASC."); + direction = "ASC"; + } + + // default orderBy for strings. + string orderBy = "ORDER BY value " + direction; + switch(type) { + case TYPE_INTEGER: + orderBy = "ORDER BY CAST(value AS INTEGER)" + direction; + break; + case TYPE_FLOAT: + orderBy = "ORDER BY CAST(value AS DECIMAL)" + direction; + break; + } + ExecuteStatement("CREATE TABLE " +table+ "_temp AS SELECT ROW_NUMBER() OVER(" + orderBy + ")-1, value FROM " +table, obj); + ExecuteStatement("DELETE FROM " +table, obj); + ExecuteStatement("INSERT INTO " +table+ " SELECT * FROM " +table+ "_temp", obj); + ExecuteStatement("DROP TABLE " +table+ "_temp", obj); +} + +void Array_SortAscending(string tag, int type=TYPE_STRING, object obj=OBJECT_INVALID) +{ + Array_Sort(tag, "ASC", type, obj); +} + +void Array_SortDescending(string tag, int type=TYPE_STRING, object obj=OBJECT_INVALID) +{ + Array_Sort(tag, "DESC", type, obj); +} + +//////////////////////////////////////////////////////////////////////////////// +// Set the value of array index 'index' to a 'element' +// This will quietly eat values if index > array size +void Array_Set_Str(string tag, int index, string element, object obj=OBJECT_INVALID) +{ + int rows = GetRowCount(tag, obj); + if (index >= 0 && index <= rows) { + string stmt = "UPDATE "+GetTableName(tag, obj)+" SET value = @element WHERE ind = @ind"; + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + SqlBindInt(sqlQuery, "@ind", index); + SqlBindString(sqlQuery, "@element", element); + SqlStep(sqlQuery); + } +} + +void Array_Set_Flt(string tag, int index, float element, object obj=OBJECT_INVALID) +{ + Array_Set_Str(tag, index, FloatToString(element), obj); +} + +void Array_Set_Int(string tag, int index, int element, object obj=OBJECT_INVALID) +{ + Array_Set_Str(tag, index, IntToString(element), obj); +} + +void Array_Set_Obj(string tag, int index, object element, object obj=OBJECT_INVALID) +{ + Array_Set_Str(tag, index, ObjectToString(element), obj); +} + +void Array_Debug_Dump(string tag, string title = "xxx", object obj=OBJECT_INVALID) { + if (title != "xxx") { + WriteTimestampedLogEntry("== " + title + " ======================================"); + } + WriteTimestampedLogEntry("Table name = " + GetTableName(tag, obj)); + string stmt = "SELECT ind, value FROM " + GetTableName(tag, obj); + sqlquery sqlQuery = SqlPrepareQueryObject(GetModule(), stmt); + int ind = -1; + string value = ""; + while ( SqlStep(sqlQuery) ) { + ind = SqlGetInt(sqlQuery, 0); + value = SqlGetString(sqlQuery, 1); + WriteTimestampedLogEntry(tag + "[" + IntToString(ind) + "] = " + value); + } +} diff --git a/_removed files/nw_s1_barbrage.nss b/_module/_removed files/nw_s1_barbrage.nss similarity index 100% rename from _removed files/nw_s1_barbrage.nss rename to _module/_removed files/nw_s1_barbrage.nss diff --git a/_removed files/nw_s2_bardsong.nss b/_module/_removed files/nw_s2_bardsong.nss similarity index 100% rename from _removed files/nw_s2_bardsong.nss rename to _module/_removed files/nw_s2_bardsong.nss diff --git a/_removed files/nw_s2_wholeness.nss b/_module/_removed files/nw_s2_wholeness.nss similarity index 100% rename from _removed files/nw_s2_wholeness.nss rename to _module/_removed files/nw_s2_wholeness.nss diff --git a/_removed files/x1_s2_imbuearrow.nss b/_module/_removed files/x1_s2_imbuearrow.nss similarity index 100% rename from _removed files/x1_s2_imbuearrow.nss rename to _module/_removed files/x1_s2_imbuearrow.nss diff --git a/_removed files/evercliententer.nss b/_removed files/evercliententer.nss deleted file mode 100644 index e933c0b2..00000000 --- a/_removed files/evercliententer.nss +++ /dev/null @@ -1,363 +0,0 @@ -//Script Name: evercliententer -////////////////////////////////////////// -//Created By: Genisys (Guile) -//Created On: 6/14/08 (Updated_8/10/08) -///////////////////////////////////////// -/* -This my premier OnClientEnter Module Event Script -for all my modules NWNX2 / Leto Modules - -This script goes in the OnClient Enter Event -if you are using the nwnx2 system & leto! -*/ -///////////////////////////////////////////////////////////////// -//This script does multiple things, it checks to see if... -//If the PC is immortal or level 40 (apply special effects) -//If the character they have has been banned. (not a total bann) -//If they logged out while dead, if so make them dead instantly!!! ;) -//If the player is playing a legal character or not...read below... -//And if the Player themself have been banned from the module or not.. -/////////////////////////////////////////////////////////////////////// - -//Required Includes (Don't touch!) -#include "nw_i0_tool" -#include "gen_inc_color" -#include "fky_chat_inc" - -/////////////////////////// -//Repetitive Variables.. -effect eEffect; -int nInt; -object oItem; -object aTarget; -location bTarget; - -void main() -{ -//Declare Major Variables.. -object oPC; -oPC = GetEnteringObject(); -object oTarget; -oTarget = oPC; -object oPlayer = oPC; -object oPP = oPC; - -if(GetIsDM(oPC)) -{return; } - -//object oInfo = GetItemPossessedBy(oPP, "pcidname"); -//string sID = GetStringRight(GetName(oInfo), 14); - -//Tell us if the entering CHARACTER has been banned or not -int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); - -object oTag; -location lTag; - - -//This part is about verifying the Player's name.. -//A player must have at least a 2 character name or they are going to -//return with an error! If they have spaces in their name it will return -//with an error as well, including alt code! -string sPCNM = GetName(oPP); -string sPCNMR = GetStringRight(sPCNM, 2); -string sNC1; string sNC2; string sRNC1; string sRNC2; -int nBad; - -//Find the second character of the players name.. -sNC1 = GetSubString(sPCNM, 0, 1); -//Find the second character of the players name.. -sNC2 = GetSubString(sPCNM, 0, 2); -//Find the last letter in the player's name. -sRNC1 = GetSubString(sPCNMR, 0, 1); -//Find the next to the last letter in the player's name. -sRNC2 = GetSubString(sPCNMR, 0, 2); - -///////////////////////////////////////////////////////////////////////////// -//Please leave the credits to the module within the message. - -//Colorful Server Message sent to all PCs when they enter the module.. -string sMessage; -sMessage = GetRGB(1,7,7); //The color (See above) -sMessage += "Welcome "; //The text to be colorized by the above color. -sMessage += GetRGB(15,15,1);//The next color. -sMessage += "to a "; //The next text to be colorized by the above color. -sMessage += GetRGB(15,1,1);//etc.. -sMessage += "Revised Edition "; -sMessage += GetRGB(7,7,15); -sMessage += "of the "; -sMessage += GetRGB(1,15,1); -sMessage += "Classic Module"; -sMessage += GetRGB(13,9,13); -sMessage += "Paths of Ascension "; -sMessage += GetRGB(12,10,7); -sMessage += "Created By: AW_Olorin "; -sMessage += GetRGB(); -sMessage += "Revised By "; -sMessage += GetRGB(15,5,1); -sMessage += "Genisys (Guile) "; -sMessage += GetRGB(12,10,7); -sMessage += "on 7/21/08"; - -//Float welcome message by.. -DelayCommand(13.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE)); - -/////////////////////////IMPORTANT////////////////////////////////// -//You must make all the "" below into " " to check for legal names -//I turned it off because a lot of my characters have bad names! -//Simply put the cursor between "" and hit the space bar for "" to " " -if(sNC1 =="") -{ nBad =1; } -else if(sNC2 =="") -{ nBad =1; } -else if(sRNC1 =="") -{ nBad =1; } -else if(sRNC2 =="") -{ nBad =1; } -else { nBad = 0; } - -///////////////////////////////////////////////////////////////////// - -//If it's a DM entering the module... -if(GetIsDM(oPC)) -{ - //If the DM has never logged on before.. - if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) - { - //Change "dmtoolz" to the tag name of any items you want given to DMs - //the first time they enter only...(copy / paste for more items) - //simply type // at the start of a line to deactivate it.. - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - //CreateItemOnObject("dmtoolz", oPC, 1); - - //This message is here for a reason! - DelayCommand(10.0, SendMessageToPC(oPC, - "You have been given DM Items and your DM Character was saved," + - " please login with the updated version of your DM Character and" + - " delete the original, thank you.")); - - //You may want to create a journal tagnamed "dmrules" and define - //what your DMs are not allowed to do here.. - //simply delete the // on the line below to activate the jounral entry - //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); - } -} - -///////////////////////////////////////////////////////////////////////////// -//SimTools & Higher Ground's Legendary Leveler Functions -//////////////////////////////////////////////////////// - string sCDKey = GetPCPublicCDKey(oPC); - - Speech_OnClientEnter(oPC); - int nPerm, nPerm2; - if (USING_NWNX_DB) - { - nPerm = GetPersistentInt(GetModule(), "FKY_CHT_BANSHOUT" + sCDKey); - nPerm2 = GetPersistentInt(GetModule(), "FKY_CHT_BANPLAYER" + sCDKey);; - if (ENABLE_LANGUAGES) DoLanguageSetupNWNX(oPC); - } - else //using Bioware db - { - nPerm = GetCampaignInt("FKY_CHT", "FKY_CHT_BANSHOUT" + sCDKey); - nPerm2 = GetCampaignInt("FKY_CHT", "FKY_CHT_BANPLAYER" + sCDKey); - if (ENABLE_LANGUAGES) DoLanguageSetupBio(oPC); - } - if (nPerm) SetLocalInt(oPC, "FKY_CHT_BANSHOUT", TRUE); - if (nPerm2 || GetLocalInt(oPC, "FKY_CHT_BANPLAYER")) DoBoot(oPC);//Boot them if Valid Object - - - //below removes the Letoscript string so the changes won't be applied again on the next logout - string Script = GetLocalString(oPC, "LetoScript"); - if( Script != "" ) - { - SetLocalString(oPC, "LetoScript", ""); - } - -/////////////////////////////////////////////// - -//Let's make sure that the following code is only executed -//on Players and not DMs.. - -if(!GetIsPC(oPC))return; -if(GetIsDMPossessed(oPC))return; -if(GetIsDM(oPC))return; - -//////////////////////////////////////////////////////////////////////// -////////JOURNAL ENTRIES//////// -/////////////////////////////// -//These function add journal entries by the tag names below -//If you do not have these journal entries you can create them -//I only included the 1st entry (1). -AddJournalQuestEntry("severrules", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); - - -//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// - -//This function scans the Entering PC to see if they have a legal character. -//Delete the // Below to activate the anti-cheat script -//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); - -///////////////////////////////////////////////////////////////////////////// -//If level 40 lets do some cool stuff to them :) (optional of course) -//Simply type // before any effect you do not wish to apply... - if(GetHitDice(oPC) == 40) - { - //Lets make the concealed 40% - eEffect = EffectConcealment(40); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - - //Lets make the look like a ghost.. :) - ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); - - } - -////////////////////////////////////////////////////////////////////////////// - -//This is the immortal option, you must utilize the makeimmortal script -//to make players immortal (please read that script.) -if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) -{ -//Run this script on the player (See script to configure settings) -ExecuteScript("powerimmortal", oPC); -} - -////////////////////////////////////////////////////////////////////////////// - -//If a player has been found with an illegal character they will have this item. -//It will prevent them from logging onto your server with that character. -if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) - { - AssignCommand(oPC, ClearAllActions()); - - SetCutsceneMode(oPC, TRUE); - - SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); - - DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); - - DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); - - DelayCommand(6.0, BootPC(oPC)); - - } - -//Since the player was dead when they logged, kill them! -if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) - { - effect eEffect; - eEffect = EffectDeath(); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); - SendMessageToPC(oPC, "You died because you were dead when you logged out."); - } - -////////////////////////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////////////////// -//Let's see if the player's character has been banned from the module.. -//Not the save as a player being banned altogether.. -if(nBann ==1) -{ -//Boot the PC fast! -DelayCommand(3.9, BootPC(oPP)); -return; -} -//Let's see if the player playing the character has been banned altogether! -if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) -{ -//If so boot them fast! -DelayCommand(3.5, BootPC(oPP)); - -//In Case They Can't be Booted..(Allow them to enter the module first..) -//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) -DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); -//They can't see nothing! -DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); -//Turn them into a chiken :) -DelayCommand(9.2, ApplyEffectToObject -(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); -DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make the polymorph permanent! -return; -} - -////////////////////////////////////////////////////////////////////////////// -//Let's prevent badly named characters from logging onto the server.. - -// /*(Delete the // at the start of this line to deactivate this section) - -//Let's verify they have a legal name! - -//NOTE This function works in conjunction with another script -//in which an NPC at the start verifies if the PC is playing a legal name. - -//If the first 2 or last 2 letters of their name are bad.. -if(nBad==1) -{ -//Delay the following to allow the PC to enter the module.. -DelayCommand(10.0, -FloatingTextStringOnCreature("You character name is not allowed!", oPP)); - - -return; -} - -else // (do not touch this line!) */ -{ -//Welcome to them to the server.. -DelayCommand(5.0, SendMessageToPC(oPP, -"Welcome to this CEP2 Persistent Module Created by Genisys")); -} - -/////////////////////////////////////////////////////////////// - -//If the player has been inside of a party room, but logged out, then -//teleport them to the start and take the token! -if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) - { - oItem = GetFirstItemInInventory(oPC); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="partyroom") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oPC); - } - - aTarget = GetWaypointByTag("home"); - bTarget = GetLocation(aTarget); - - if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; - - //Allow them to fully enter the module.. - DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); - DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); - - } - -////////////////////////////////////////////////////////////////////////////// - -//Remove all Arena Tokens on enter.. - -if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) - { - oItem = GetFirstItemInInventory(oPC); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="arenatoken") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oPC); - } - } - -//End Script -} diff --git a/_removed files/everclientexit.nss b/_removed files/everclientexit.nss deleted file mode 100644 index bade40a1..00000000 --- a/_removed files/everclientexit.nss +++ /dev/null @@ -1,358 +0,0 @@ -//Script Name: everclientexit -////////////////////////////////////////// -//Created By: Genisys (Guile) -//Created On: 7/05/08 (Updated_8/10/08) -///////////////////////////////////////// -/* -This is my premier CEP2 - NWNX2 / Leto -OnClientExit Event Script. -*/ -///////////////////////////////////////////////////////////////// -/* -This script does multiple things, it checks to see if... -If the PC is immortal or level 40 (apply special effects) -If the character they have has been banned. (not a total bann) -If they logged out while dead, if so make them dead instantly!!! ;) -If the player is playing a legal character or not...read below.. -And if the Player themself have been banned from the module or not.. -*/ -////////////////////////////////////////////////////////////////////// - -//Redundant Variables Declared -effect eEffect; -int nInt; -object oItem; -object aTarget; -location bTarget; - - -//////////////////////////////////////// -//Required Includes -//#include "hgll_func_inc" -#include "fky_chat_inc" -///////////////////////////////////////// - -//PROTOTYPE DECLARED -void SendMessageToAllPC(string sMessage); - -///////////////////////////////////////// - -//Main Script -void main() -{ - -//Declare Major Variables.. -object oPC; -oPC = GetEnteringObject(); -object oTarget; -oTarget = oPC; -object oPlayer = oPC; -object oPP = oPC; - -object oInfo = GetItemPossessedBy(oPP, "pcidname"); -string sID = GetStringRight(GetName(oInfo), 14); - -//This means the entering Character has been banned. -int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP); - -object oTag; -location lTag; - -//This part is about verifying the Player's name.. -//A player must have at least a 2 character name or they are going to -//return with an error! If they have spaces in their name it will return -//with an error as well, including alt code! -string sPCNM = GetName(oPP); -string sPCNMR = GetStringRight(sPCNM, 2); -string sNC1; string sNC2; string sRNC1; string sRNC2; -int nBad; - -//Find the second character of the players name.. -sNC1 = GetSubString(sPCNM, 0, 1); -//Find the second character of the players name.. -sNC2 = GetSubString(sPCNM, 0, 2); -//Find the last letter in the player's name. -sRNC1 = GetSubString(sPCNMR, 0, 1); -//Find the next to the last letter in the player's name. -sRNC2 = GetSubString(sPCNMR, 0, 2); - -//////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////// -//Sim Tools & Legendary Level Functions.. -////////////////////////////////////////////////////// - object M = GetModule(); - - string Script = GetLocalString(oPC, "LetoScript"); - - if( Script != "" ) - { - SetLocalString(oPC, "LetoScript", ""); - LetoScript(Script); - } - -Speech_OnClientExit(GetExitingObject()); - -//////////////////////////////////////////////////////////////////// - -//Your Code Goes here.. - -/////////////////////////IMPORTANT////////////////////////////////// -//You must make all the "" below into " " to check for legal names -//I turned it off because a lot of my characters have bad names! -//Simply put the cursor between "" and hit the space bar for "" to " " -if(sNC1 =="") -{ nBad =1; } -else if(sNC2 =="") -{ nBad =1; } -else if(sRNC1 =="") -{ nBad =1; } -else if(sRNC2 =="") -{ nBad =1; } -else { nBad = 0; } - -//See below to activate this system.. - -//////////////////////////////////////////////////////////////////////// -//If it's a DM entering the module... -if(GetIsDM(oPC)) -{ - //If the DM has never logged on before.. - if(GetItemPossessedBy(oPC, "dmtoolz")==OBJECT_INVALID) - { - //Change "dmtoolz" to the tag name of any items you want given to DMs - //the first time they enter only...(copy / paste for more items) - //simply type // at the start of a line to deactivate it.. - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - CreateItemOnObject("dmtoolz", oPC, 1); - //CreateItemOnObject("dmtoolz", oPC, 1); - - //This message is here for a reason! - DelayCommand(10.0, FloatingTextStringOnCreature( - "You have been given DM Items and your DM Character was saved," + - " please login with the updated version of your DM Character and" + - " delete the original, thank you.", oPC, FALSE)); - - //You may want to create a journal tagnamed "dmrules" and define - //what your DMs are not allowed to do here.. - //simply delete the // on the line below to activate the jounral entry - //AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE); - } -} - - -//This is for the rest of the script, if it's not a PC stop here! -if(!GetIsPC(oPC))return; - - -///////////////////////////////////////////////////////////////////////////// - -//These function add journal entries by the tag names below -//If you wish to create more, just copy / paste and change -//The tagname which is in "here", and the entry # remains 1 only! -AddJournalQuestEntry("rules", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("pcinfo", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE); -AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE); - -//////////////////IMPORTANT////////////////IMPORTANT//////////////////////// - -//This function scans the Entering PC to see if they have a legal character. -//Delete the // Below to activate the anti-cheat script -//DelayCommand(9.0, ExecuteScript("cheatercheck2", oPC)); - -///////////////////////////////////////////////////////////////////////////// -//If level 40 lets do some cool stuff to them :) (optional of course) -//If you do not wish to use this options you will need to delete the // below - // /* <<(don't touch this part) - - if(GetHitDice(oPC) == 40) - { - //Lets make the concealed 40% - eEffect = EffectConcealment(40); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - - //Lets make the look like a ghost.. :) - ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); - - } - -// don't touch this line */ -////////////////////////////////////////////////////////////////////////////// - -//This is the immortal option, you must utilize the "makeimmortal" script -//to make players immortal (please read that script.) -if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID) -{ -//Run this script on the player (See script to configure settings) -ExecuteScript("powerimmortal", oPC); -} - -////////////////////////////////////////////////////////////////////////////// - -//If a player has been found with an illegal character they will have this item. -//It will prevent them from logging onto your server with that character. -//Note this will only work if you have activated the Anti-Cheat option above! -if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID) - { - AssignCommand(oPC, ClearAllActions()); - - SetCutsceneMode(oPC, TRUE); - - SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA); - - DelayCommand(4.0, FloatingTextStringOnCreature("You have an illegal character which is not allowed on this server.", oPC)); - - DelayCommand(5.0, SetCutsceneMode(oPC, FALSE)); - - DelayCommand(6.0, BootPC(oPC)); - - } - -//////////////////////////////////////////////////////////////////////////// - -//Since the player was dead when they logged, kill them! -if (GetItemPossessedBy(oPC, "death")!= OBJECT_INVALID) - { - effect eEffect; - eEffect = EffectDeath(); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC); - SendMessageToPC(oPC, "You died because you were dead when you logged out."); - } - -////////////////////////////////////////////////////////////////////////////// -//This function is currently disabled (Not in use, may be used later on) - -/* -//Let's make sure All players have a valid PC Name ID Item.. -if(oInfo==OBJECT_INVALID) -{ - //Open the "eq_pcidname" script to learn more - CreateItemOnObject("pcidname", oPP, 1); -} // */ - - -//////////////////////////////////////////////////////////////////////// -//Let's see if the entering CHARACTER has been banned from the module.. -//Not the save as a player being banned altogether.. -if(nBann ==1) -{ -//Boot the PC fast! -DelayCommand(3.9, BootPC(oPP)); -return; -} -//Let's see if the player has been banned altogether! -//Note the TRUE after oPP = Single Player / FALSE = Multiplayer Mode -if(GetCampaignInt(GetName(GetModule()), "BANN", oPP)==TRUE) -{ -//If so boot them fast! -DelayCommand(3.5, BootPC(oPP)); - -//In Case They Can't be Booted..(Allow them to enter the module first..) -//Then lock thier game down! (Note; You cannot have a script in OnCutscenAbort!) -DelayCommand(9.0, SetCutsceneMode(oPP, TRUE, FALSE)); -//They can't see nothing! -DelayCommand(9.1, FadeToBlack(oPP, FADE_SPEED_FAST)); -//Turn the PC into a punk chicken :) -DelayCommand(9.2, ApplyEffectToObject -(DURATION_TYPE_PERMANENT, EffectPolymorph(113, TRUE), oPP)); -DelayCommand(9.3, ExportSingleCharacter(oPP)); //Make it permanent! -return; -} - -////////////////////////////////////////////////////////////////////////////// -//Let's prevent badly named characters from logging onto the server.. - -//Delete the /* below this line to activate the name checking system. -/* - -//Let's verify the Entering PC has a legal name! - -//NOTE This function works in conjunction with another script -//in which an NPC at the start verifies if the PC is playing a legal name. - -//If the first 2 or last 2 letters of their name are bad.. -if(nBad==1) -{ -//Delay the following to allow the PC to enter the module.. -DelayCommand(10.0, -FloatingTextStringOnCreature("You character name is not allowed!", oPP)); - -//Tell the database the player character is banned -DelayCommand(11.0, SetCampaignInt(GetName(GetModule()), "BANN", 1, oPP)); - -//Boot the PC -DelayCommand(14.0, BootPC(oPP)); - -return; -} - -else -{ -//do nothing.. -} - -// (do not touch this line!) */ -/////////////////////////////////////////////////////////////// - -//If the player has been inside of a party room, but logged out, then -//teleport them to the start and take the token! -if (GetItemPossessedBy(oPC, "partyroom")!= OBJECT_INVALID) - { - oItem = GetFirstItemInInventory(oPC); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="partyroom") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oPC); - } - - aTarget = GetWaypointByTag("home"); - bTarget = GetLocation(aTarget); - - if (GetAreaFromLocation(bTarget)==OBJECT_INVALID) return; - - //Allow them to fully enter the module.. - DelayCommand(8.0, AssignCommand(oPC, ClearAllActions())); - DelayCommand(8.1, AssignCommand(oPC, ActionJumpToLocation(bTarget))); - - } - -//Finally! Send this message to the PC.. - -//(Please change to match your module name) -//(I would appreciate credit to my work in your start message thanks.) - -//Welcome them PC to the server with a colorful message -DelayCommand(5.0, SendMessageToPC(oPP, - -//Enter your module name below -"Welcome to (ENTER MODULE NAME)" + //Make sure you use one space! -" a 1.68 Persistent Module " + -"Created by Genisys " + - -//Enter your name below -"Designed By: (YOUR NAME HERE)")); - - -//Main Script End -} - -//PROTOTYPE DEFINED -void SendMessageToAllPC(string sMessage) -{ - object PC = GetFirstPC(); - - while(GetIsObjectValid(PC)) - { - FloatingTextStringOnCreature(sMessage, PC); - PC = GetNextPC(); - } -} diff --git a/_removed files/everheartbeat.nss b/_removed files/everheartbeat.nss deleted file mode 100644 index ca9bcb74..00000000 --- a/_removed files/everheartbeat.nss +++ /dev/null @@ -1,77 +0,0 @@ -//Script Name: everheartbeat -////////////////////////////////////////// -//Created By: Genisys (Guile) -//Created On: 4/20/08 (Updated 8/10/08) -///////////////////////////////////////// -/* -Some parts of this script were taken from -AW_Olorin's Paths of Ascension Module -This script goes in the OnHeartbeat -Event of the Module Properties -*/ -//////////////////////////////////////// - -//Required Include -#include "nw_i0_tool" - -//Main Script -void main() -{ - -object oPC = GetFirstPC(); - -///////////////////////////////////////////////////////////////////////////// -//Prevent Trap Setting in any area where the placeable object "No Crown" -//is located (Which is found on the custom paletted) -//I recommend you place this object anywhere you don't want traps set! - - while(GetIsObjectValid(oPC)) - { - object detector = GetNearestObjectByTag("nocrown", oPC, 0); - if (GetIsObjectValid(detector)) - { - object trap = GetNearestTrapToObject(detector, FALSE); - if ( GetTrapCreator(trap) == oPC && !GetIsDM(oPC) && GetIsPC(oPC)) - if (GetArea(oPC) != GetArea(GetObjectByTag("throneofdeath"))) - { - AssignCommand(oPC, ClearAllActions()); - AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("prison")))); - SendMessageToPC(oPC, "You have been sent to jail for setting a trap in a restricted area."); - } - } - - oPC = GetNextPC(); - } - -//////////////////////////////////////////////////////////////////////// -//GLOBAL MESSAGING SYSTEM By: AW_OLORIN (Paths of Ascension) - -// Server Time Keeper - int timekeeper = GetLocalInt(GetModule(), "loadtimer"); - SetLocalInt(GetModule(), "loadtimer", (timekeeper +1)); - - -// DM announcement check -//This feature isn't currently in Use, but DO NOT REMOVE IT!!! - int iAnnounceTimer = GetLocalInt(GetModule(),"iAnnounceTimer"); - SetLocalInt(GetModule(), "iAnnounceTimer", (iAnnounceTimer +1) ); - - - if(iAnnounceTimer >= GetLocalInt(GetModule(),"iAnnounce_Period")) - { - string sAnnouncement = GetLocalString(GetModule(),"Announcement"); - string sAuthor = GetLocalString(GetModule(),"Announcement_Author"); - SetLocalInt(GetModule(),"iAnnounceTimer",0); - if(sAnnouncement == "") return; - oPC = GetFirstPC(); - while(GetIsObjectValid(oPC)) - { - if(GetIsDM(oPC)) - SendMessageToPC(oPC,"Module wide announcement being sent, created by DM " + sAuthor + "."); - SendMessageToPC(oPC,sAnnouncement); - oPC = GetNextPC(); - } - } - -//Main Script End -} diff --git a/_removed files/evermodload.nss b/_removed files/evermodload.nss deleted file mode 100644 index d4857865..00000000 --- a/_removed files/evermodload.nss +++ /dev/null @@ -1,167 +0,0 @@ -//////////////////////////////////// -//Created by Genisys / Guile 7/05/08 -//////////////////////////////////// -/* -script name: evermodload - -This is my premier NWNX2 / Leto -CEP2 OnModuleLoad Event Script - -*/ -//////////////////////////////////// - -#include "fky_chat_inc" -#include "x2_inc_switches" -#include "x2_inc_restsys" -#include "aps_include" -#include "x2_inc_restsys" -#include "se_inc_reset" - - -///SCRIPT MAIN//////// -void main() -{ - -//The NWNX2 Reset Plugin Function -//the first # must be 1 month Higher than the current module month! -//see the script "se_inc_reset" to see how it works.. -SE_NWNX_ResetModuleCheck(7, 30.0, 120.0); - -//////////////////////////////////////////////////////////////////////// - -//This sets color in Tokens in conversatoins, it requires that -//you use the #s below for tokens, ie, where -//you want the text to be colorized. -string sColor = GetName(GetObjectByTag("COLORS")); - -SetCustomToken(1001, GetSubString(sColor, 0, 6)); //white -SetCustomToken(1002, GetSubString(sColor, 6, 6)); //yellow -SetCustomToken(1003, GetSubString(sColor, 12, 6)); //magenta -SetCustomToken(1004, GetSubString(sColor, 18, 6)); //cyan -SetCustomToken(1005, GetSubString(sColor, 24, 6)); //red -SetCustomToken(1006, GetSubString(sColor, 30, 6)); //green -SetCustomToken(1007, GetSubString(sColor, 36, 6)); //blue - -//More Custom Tokens for Conversations -//By GENISYS (Guile) - - SetCustomToken(100, ""); // CLOSE tag - SetCustomToken(101, ""); // red - SetCustomToken(102, ""); // green - SetCustomToken(103, ""); // blue - SetCustomToken(104, ""); // cyan - SetCustomToken(105, ""); // magenta - SetCustomToken(106, ""); // yellow - SetCustomToken(107, ""); // black - SetCustomToken(108, ""); // dark red - SetCustomToken(109, ""); // dark green - SetCustomToken(110, ""); // dark blue - SetCustomToken(111, ""); // dark cyan - SetCustomToken(112, ""); // dark magenta - SetCustomToken(113, ""); // dark yellow - SetCustomToken(114, ""); // grey - SetCustomToken(117, ""); // dark grey - SetCustomToken(115, ""); // orange - SetCustomToken(116, ""); // dark orange - SetCustomToken(117, ""); // brown - SetCustomToken(118, ""); // dark brown - SetCustomToken(119, ""); // Light Purple - SetCustomToken(120, ""); // Neon Green - SetCustomToken(121, ""); // Light Blue - SetCustomToken(122, ""); // Purple - SetCustomToken(123, ""); //Neon Green - -/////////////////AUTOMATIC CHARACTER SAVING FUCTION//////////////////////// -//Note this function is Polymorphing Friendly (Designed for that purpose!) - -//This feature stores All PC's location on the module ever 3 minutes... -//To deactivate this feature, simply type // at the start of the line below. - -//DelayCommand(60.0, ExecuteScript("savepcinfo", OBJECT_SELF)); - -////////////////////////////////////////////////////////////////////////// - -//This is part of the SimTools by Funkyswerve... - // Init placeholders for ODBC gateway - SQLInit(); - // Init placeholders for chat gateway - InitSpeech(); - -/////////////MAIN BIOWARE X2 FUNCTIONS (DO NOT REMOVE!)///////////// - - if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT) - { - // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for - // * rogues when playing on Hardcore+ difficulty. This only applies to scrolls - SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE); - - // * Activating the switch below will make AOE spells hurt neutral NPCS by default - // SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE); - } - - // * AI: Activating the switch below will make the creaures using the WalkWaypoint function - // * able to walk across areas - // SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE); - - // * Spells: Activating the switch below will make the Glyph of Warding spell behave differently: - // * The visual glyph will disappear after 6 seconds, making them impossible to spot - SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE); - - // * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing, - // * but since it is described this way in the book, here is the switch to get it back... - SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE); - - // * Craft Feats: Use this to disable Item Creation Feats if you do not want - // * them in your module - // SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE); - - // * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size. - // * We do not support this check for balancing reasons, but you can still activate it... - // SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE); - - // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this - // * did not fit into NWNs spell system and was confusing, so we took it out... - // SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE); - - // * Spellcasting: Some people don't like caster's abusing expertise to raise their AC - // * Uncommenting this line will drop expertise mode whenever a spell is cast by a player - // SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE); - - - // * Item Event Scripts: The game's default event scripts allow routing of all item related events - // * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a - // * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...) - // * is triggered. Check "x2_it_example.nss" for an example. - // * This feature is disabled by default. - SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE); - - if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) - { - // * If Tagbased scripts are enabled, and you are running a Local Vault Server - // * you should use the line below to add a layer of security to your server, preventing - // * people to execute script you don't want them to. If you use the feature below, - // * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a - // * maximum of 16 chars, instead of the pure tag of the object. - // * i.e. without the line below a user activating an item with the tag "test", - // * will result in the execution of a script called "test". If you uncomment the line below - // * the script called will be "1_test.nss" - // SetUserDefinedItemEventPrefix("1_"); - - } - - // * This initializes Bioware's wandering monster system as used in Hordes of the Underdark - // * You can deactivate it, making your module load faster if you do not use it. - // * If you want to use it, make sure you set "x2_mod_def_rest" as your module's OnRest Script - // SetModuleSwitch (MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE); - - if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE) - { - - // * This allows you to specify a different 2da for the wandering monster system. - // SetWanderingMonster2DAFile("des_restsystem"); - - //* Do not change this line. - WMBuild2DACache(); - } - -} diff --git a/_removed files/everpcdeath.nss b/_removed files/everpcdeath.nss deleted file mode 100644 index 07482c0f..00000000 --- a/_removed files/everpcdeath.nss +++ /dev/null @@ -1,702 +0,0 @@ -//Script Name: everpcdeath -///////////////////////////////////////// -//Created By: Genisys / Guile -//Created On: 1/11/08 (Updated_8/10/08) -///////////////////////////////////////// -/* - -This is my premier OnPlayerDeath Module Event Script which I designed -specifically for all my modules, it's rather nice and is part of -multiple systems, so do not edit ANYTHING you do not know what it's for! - -*/ -//////////////////////////////////////////////////////////////////////// - -//Rquired Includes.. (Don't touch!) -#include "nw_i0_plot" -#include "x2_inc_compon" -#include "setxp_inc" - -/////////////////////////////////////////////////////////////////////////// -/////////////////IMPORTANT OPTIONAL SETTINGS/////////////////////////////// -//The constant intergal below allows you to choose where or not to utilize -//the PVP Death System I have scripted, please read below to learn more.. -//FALSE = Disabled / TRUE = Enabled -const int nPVP = TRUE; - -//This constant will decide whether or not you want to send a PVP message -//to all players when PVP transpires (This is for PVP Servers) -//FALSE = Disabled / TRUE = Enabled -const int nPVPMessage = TRUE; - -//If you wish to restrict PVP to the arena only, then.. -//Set the below setting to TRUE / FALSE = Deactivated (Default) -const int nArenaOnly = FALSE; - -//This determines the level difference allowed in PVP (default 5) -//If set to 5 players within 4 levels of each other will not be -//Penalized for Killing one another. (Works both ways!) -//Add +1 for the level you want so if you want 8 level difference make it 9! -//(Set this whether you allow PVP or not!) -const int nDif = 5; //(Between 5 - 40) / (40 = Disabled) - -//This is how you set the reward for XP given to the player for -//fair PVP Kills, this # is multiplied by the level difference! -const int nReward1 = 80; //(ie. if 3 Levels difference / 80 X 3) - -//This is how ytou set the reward for Gold given to the player for -//fair PVP Kills, this # is multiplied by the level difference! -const int nReward2 = 800; - -/////////OPTIONS END////////////////////////////////////////////////// - -////DO NOT TOUCH ANYTHING BELOW UNLESS IT SAYS - ///OPTION//// - -////////////////////////////////////////////////////////////////////// -///// This Part was Created by: bushido -///// Developed by: Wouter Dhondt -///// Modified by: Genisys / Guile For Persistency.. -//////////////////////////////////////////////////////// -//This is the PVP Stats (Used to keep track of PVP Activity) -//This allows DMs and Players to see PVP Activity. -void AdjustPlayerStats() -{ - -//Delare Variables -object oDied = GetLastPlayerDied(); -object oAttacker = GetLastHostileActor(oDied); -object oKiller; - -//Only if the player who died is a PC -if(GetIsPC(GetLastPlayerDied())) -{ - //Let's make sure we properly identify who the Attacker is... - if (GetIsPC(GetMaster(oAttacker))) - { - oKiller = GetMaster(oAttacker); - } - - else - { - //Let's make sure the Killer is a PC - if(GetIsPC(oAttacker)) - { - oKiller = oAttacker; - } - } - - // Increment or set the death variable - int iDied = GetCampaignInt("PVP_SCORE", "iDied", oDied); - int nCount = iDied + 1; - SetCampaignInt("PVP_SCORE", "iDied", nCount, oDied); - // Is this object a PC? - if (GetIsPC(oKiller) == TRUE) - { - // Increment or set the killer var - int iKilled = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); - int nDeaths = iKilled + 1; - SetCampaignInt("PVP_SCORE", "iKilled", nDeaths, oKiller); - } - } - -//AdjustPlayerStats End.. -} -/////////////////////////////////////////////////////////////// -// Raise OnDeath function (Standard Bioware Function) -void Raise(object oPlayer) -{ - effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); - - effect eBad = GetFirstEffect(oPlayer); - ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); - ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); - - //Search for negative effects - while(GetIsEffectValid(eBad)) - { - if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || - GetEffectType(eBad) == EFFECT_TYPE_DEAF || - GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || - GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) - { - //Remove effect if it is negative. - RemoveEffect(oPlayer, eBad); - } - eBad = GetNextEffect(oPlayer); - } - //Fire cast spell at event for the specified target - SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); -} - -// Respawn/Teleporter OnDeath function (By Bushido / Modified By Genisys) -// Optionally you can create the waypoints described to send the dead player -// to that location. You must create an item named arenatoken (tag & resref name) -//Then you must use give it to them & take it away from them on enter/exit of -//an area by a script, this will deem that area as the arena. -void Respawn(object oPlayer) -{ - - string waiting = "The gods show you favor, your life is restored."; - - if (GetIsDead(oPlayer)) - { - object oPC = GetLastPlayerDied(); - - if (GetItemPossessedBy(oPC, "arenatoken")!= OBJECT_INVALID) - { - //Create a way point and tagname it "arenawp" - object oTarget = GetWaypointByTag("arenawp"); - effect eTeleport = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY); - - ApplyEffectToObject(DURATION_TYPE_INSTANT, eTeleport, oPlayer); - - //Tell the player why they are being restored. - FloatingTextStringOnCreature(waiting, oPC); - - //Resurrect the player - Raise(oPlayer); - - //Teleport the raised player to the arena spawn point. - DelayCommand(0.1, AssignCommand(oPlayer, ClearAllActions())); - DelayCommand(0.2, AssignCommand(oPlayer, JumpToObject(oTarget))); - } - else - { - CreateItemOnObject("death", oPC); - } - - } -} - -//////////////////////////////////////////////////////////////////////// -////////////////////////Main Script///////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -void main() -{ - - //Declare Major Variables... - object oPlayer = GetLastPlayerDied(); - object oPC = GetLastPlayerDied(); - object oTarget = oPlayer; - object oToken = GetItemPossessedBy(oPlayer, "death"); - object oItem; - object oPP = oPlayer; - string sArea = GetTag(GetArea(oPlayer)); - string sName = GetName(GetModule()); - location lDead = GetLocation(oPlayer); - - //If the player is being tortured, ressurect them... - object hell = GetArea(oPlayer); - object helltest = GetArea(GetObjectByTag("satan1")); - if (hell == helltest) - { - DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); - return; - } - - object oInfo = GetItemPossessedBy(oPP, "pcidname"); - string sID = GetStringRight(GetName(oInfo), 14); - - //PVP Variables.. - object oDead = GetLastPlayerDied(); - object oKiller = GetLastHostileActor(oDead); - object oVictor; - object oDied; - int nInt; - int kLvl = GetHitDice(oKiller); - int pLvl = GetHitDice(oDead); - int dLvl = kLvl - pLvl; - int aLvl = pLvl - kLvl; - - effect eKill = EffectDeath(TRUE); - effect eVis = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); - - -//Define who oKiller is.. -//Define the attacker& dead guy -object oAttacker = GetLastHostileActor(oDied); -oDied = oPlayer; - - //Let's make sure we properly identify who the Attacker is... - if (GetIsPC(GetMaster(oAttacker))) - { - oKiller = GetMaster(oAttacker); - } - - else - { - //Let's make sure the Killer is a PC - if(GetIsPC(oAttacker)) - { - oKiller = oAttacker; - } - } - - //Count up & Store in Database the kills and deaths - AdjustPlayerStats(); - -///////////LOCATION SAVING OPTION///////////////////////////////// - -//Type: // Below this line to activate location saving on death - /*(Before this!) - - //Store the PC's location, because if they are ressurected they can - //come back to this place when they logg back on..(unless location changed) - SetCampaignLocation(sName, "SAVED_LOC", lDead, oPlayer); - //Tell the PC thier location was saved.. - SendMessageToPC(oPC, "Location Saved."); - - -//(leave this alone) */ -////////////////////////////////////////////////////////////// - - //Lets auto ressurect anyone in the arena and give death tokens to the others. - Respawn(oPlayer); - - // * make friendly to Each of the 3 common factions - AssignCommand(oPlayer, ClearAllActions()); - - // * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation - if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10) - { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad - SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer); - } - if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10) - { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad - SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer); - } - if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10) - { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad - SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer); - } - -////////////////////////////////////////////////////////////////////////// - - //Fancy death visual effect when they die. - location lSelf = GetLocation(oPC); - effect eVis2 = EffectVisualEffect(234); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis2, lSelf); - -///////////////////////////////////////////////////////////////////////////// - -//Have the player tell everyone around them he is dying (actually dead) - AssignCommand(oPlayer, ActionSpeakString("I'm dying, help!", - TALKVOLUME_TALK)); - -//////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////// - //Pop up the Death GUI Panel only if they don't meet the following.. - - //If the player is not immortal - if(GetItemPossessedBy(oPC, "immotoken") == OBJECT_INVALID) - { - //If the player does not have an arena token - if(GetItemPossessedBy(oPC, "arenatoken") == OBJECT_INVALID) - { - //Show the player the Death Panel - DelayCommand(2.0, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH)); - } - } - -////////////////////////PVP MESSAGE////////////////////////////////////// -///////See the const int nPVPMessage above to turn on/off)/////////////// - -if(nPVPMessage == TRUE) -{ - - - ////Send PVP Stats Messages to all PCs.///////// - //This shouts whever a player has died, who killed them and also - //alerts DMs of any pvp action going on! (Though done below as well.) - //This can also alert DM's not playing as a DM as well too! - oPC = GetFirstPC(); - int count = 0; - int nVictims = GetCampaignInt("PVP_SCORE", "iKilled", oKiller); - int vLvl = GetHitDice(oVictor); - int dLvl = GetHitDice(oPlayer); - string sKilled; - //Send Message to all PC's - sKilled = ""; - sKilled += GetName(oPlayer); - sKilled += " "; - sKilled += "Lvl "; - sKilled += IntToString(dLvl); - sKilled += " Was slain by - "; - sKilled += ""; - sKilled += GetName(oVictor); - sKilled += " "; - sKilled += "Lvl - "; - sKilled += IntToString(vLvl); - sKilled += " "; - sKilled += GetName(oVictor); - sKilled += " has "; - sKilled += IntToString(nVictims); - sKilled += " kills. "; - - //Lets make sure the killer is a PC - if(GetIsPC(oVictor)) - { - - //Write the PVP Information in the log file. (For those not allowing PVP) - WriteTimestampedLogEntry("**The Following Player: "); - WriteTimestampedLogEntry(GetPCPlayerName(oVictor)); - WriteTimestampedLogEntry(" - "); - WriteTimestampedLogEntry(GetPCPublicCDKey(oVictor)); - WriteTimestampedLogEntry(" - "); - WriteTimestampedLogEntry(GetPCIPAddress(oVictor)); - WriteTimestampedLogEntry(" ** Has Killed This Player: "); - WriteTimestampedLogEntry(GetName(oPlayer)); - WriteTimestampedLogEntry(" - "); - WriteTimestampedLogEntry(GetPCPlayerName(oPlayer)); - - while (GetIsPC(oPC) == TRUE) - { - SendMessageToPC(oPC, sKilled); - oPC = GetNextPC(); - } - - } - -//end PVP message function - } - -////////////NO PVP ON SERVER ALLOWED!/////////// - -//IF PVP IS NOT ALLOWED! -if(nPVP == FALSE) -{ -object oDumbo; -//If it's not a PC let's make sure an associate of a PC has not killed the PC -if(!GetIsPC(oKiller)) -{ - //Let's get the master of the asscoiate.. - if(GetIsPC(GetMaster(oKiller))) - { - oDumbo = GetMaster(oKiller); - } -} -//Otherwise let's make sure the Attacker is a PC.. -else -{ - if(GetIsPC(oKiller)) - { - oDumbo = oKiller; - } -} - - //Let's Double Check to make sure it's a PC who killed the PC. - if(GetIsPC(oDumbo)) - { - - //Apply the respawn penalty to the Killer instead!! - ApplyRespawnPenalty(oDumbo); - - //Raise the Player Who Died without a penalty - //Note these must be delayed because of GUI Panel! - DelayCommand(2.1, - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); - - DelayCommand(2.2, Raise(oDead)); - - //Remove the death token from the dead guy - oItem = GetFirstItemInInventory(oPC); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="death") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oPC); - } - - string sBadPC = GetName(oDumbo); - sBadPC += " / "; - sBadPC += GetPCPlayerName(oDumbo); - sBadPC += " / "; - sBadPC += GetPCPublicCDKey(oDumbo); - sBadPC += " Has killed - "; - sBadPC += GetName(oPC); - sBadPC += " In the "; - sBadPC += GetName(GetArea(oPC)); - sBadPC += " Area."; - - //Send Message to All DMs about the Attack.. - SendMessageToAllDMs(sBadPC); - } - -//End No PVP Check.. -} - -//////////IF PVP IS RESTRICTED TO THE ARENA////////////// - -if(nArenaOnly == TRUE) -{ - //If a PC kills a PC outside of the arena.. - if(GetItemPossessedBy(oDead, "arenatoken")==OBJECT_INVALID) - { - - //Raise the Player Who Died - DelayCommand(2.3, - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); - - DelayCommand(2.4, Raise(oDead)); - - //Remove the death token from the dead guy - oItem = GetFirstItemInInventory(oDead); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="death") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oDead); - } - - //Kill the offender and alert the DMs! - //Type // below at the start of the line to deactivate! - ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); - - //Apply the respawn penalty to the Killer instead!! - ApplyRespawnPenalty(oKiller); - - //Send Message to All DMs about the Attack.. - string sArena; - sArena = GetName(oKiller); - sArena += " / "; - sArena += GetPCPlayerName(oKiller); - sArena += " "; - sArena += "Has killed - "; - sArena += GetName(oDead); - sArena += "Outside of the Arena!"; - - SendMessageToAllDMs(sArena); - } - -} -/////////////////////////////////////////////////////////////////////////// -//////////////////PVP SCRIPT FUNCTIONS///////////////////////////////////// -/////////////////////////////////////////////////////////////////////////// -///////PVP Option (See the const int nPVP above to turn on/off)/////// -if (nPVP == TRUE) -{ - -//////Start PVP Reward/Penalty Function////// - - -//Only continue if the killer is a PC! -if(GetIsPC(oKiller) == TRUE) -{ - - //More PVP Variables - - //Get the Killer's HD + nDif + 1 - int nAdj = GetHitDice(oKiller) + 1; - int nCheck = nAdj + nDif; - //Will return 1 or less if they are more than nDif levels - //lower than the person they killed - int nDeed = nCheck - pLvl; - - //Ok, this part rewards players for killing players who kill low - //level players, if they are flagged for killing low level players, - //and anyone can easially recognized them by the flag on thier back. - if(GetLocalInt(oDead, "effer") >=1) - { - //Lower their effy score by one. - nInt = GetLocalInt(oDead, "effer"); - nInt -= 1; - //Decrement thier effer status (because they got killed) - SetLocalInt(oDead, "effer", nInt); - -//If they are at 0 Effy Kills, Remove the flag from them -//Otherwise they can be killed again!!! (After it's been lowered!) - if (GetLocalInt(oDead, "effer") <=0) - { - effect eEffect; - eEffect = GetFirstEffect(oDead); - while (GetIsEffectValid(eEffect)) - { - if (GetEffectType(eEffect)==EFFECT_TYPE_VISUALEFFECT) - { - //Note sure about this one! - if (EFFECT_TYPE_VISUALEFFECT == VFX_DUR_FLAG_RED) - { - RemoveEffect(oDead, eEffect); - eEffect = GetNextEffect(oDead); - } - } - - } - - //Now reward the Killer of the bad player with the flag. - //Adjust to your likings. - GiveGoldToCreature(oKiller, 5000); - GiveXPToCreature(oKiller, 500); - - } - } - - //If the player is too low of a level - //Punish them for killing a much high level player. - //This is to prevent lower level players from killing higher - //level players (which allows the higher levels to ignore them!) - if (nDeed <=1) - { - //Flag them as an Effy Killer (Because they are picking fights!) - nInt = GetLocalInt(oKiller, "effer"); - nInt += 1; - - int nKind; - nKind = GetObjectType(oKiller); - - if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); - else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); - - SetLocalInt(oKiller, "effer", nInt); - - //Raise the Player Who Died without a penalty - //Note these must be delayed because of GUI Panel! - DelayCommand(2.1, - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); - - DelayCommand(2.2, Raise(oDead)); - - //Remove the death token from the dead guy - oItem = GetFirstItemInInventory(oDead); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="death") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oDead); - } - - //Kill the offender & take xp/gold - //Type // below at the start of the line to deactivate! - ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); - - //Penalize the killer Gold / XP - ApplyRespawnPenalty(oKiller); - - AssignCommand(oKiller, ClearAllActions()); - AssignCommand(oKiller, ActionSpeakString("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); - - //Notify the DMs - SendMessageToAllDMs("We have an effy kill in progress, please investigate" - + GetName(oKiller) + ". Has Killed Player " + GetName(oDead)); - //end low level check. - } - - //If the killer is 5 levels higher than the player they kill - int aCheck = dLvl; - if(aCheck >= nDif) - { - //Flag them as an Effy Killer - int nInt; - nInt = GetLocalInt(oKiller, "effer"); - nInt += 1; - - int nKind; - nKind = GetObjectType(oKiller); - - if (nKind != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), oKiller); - else ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FLAG_RED), GetLocation(oKiller)); - - SetLocalInt(oDead, "effer", nInt); - - //Raise the Player Who Died - //This must be delayed due to the GUI Panel that pops up. - DelayCommand(2.1, - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oDead)); - - DelayCommand(2.2, Raise(oDead)); - - //Remove the death token from the dead guy - object oItem; - oItem = GetFirstItemInInventory(oDead); - - while (GetIsObjectValid(oItem)) - { - if (GetTag(oItem)=="death") DestroyObject(oItem); - - oItem = GetNextItemInInventory(oDead); - } - - //Kill the offender & take xp/gold - //Type // below at the start of the line to deactivate! - ApplyEffectToObject(DURATION_TYPE_INSTANT,eKill,oKiller); - - //Take XP & Gold from the Offending Killer - if (GetHitDice(oKiller)<40)//Only if less than level 40 - { - SetXP(oKiller,GetXP(oKiller)-1000);//NOTE: They can Lose a Level! - } - - //Remove Gold / XP from the Offender - ApplyRespawnPenalty(oKiller); - - //Make them shout that they have been bad... - AssignCommand(oKiller, ClearAllActions()); - AssignCommand(oKiller, ActionSpeakString - ("I have offended the Gods and must be punished!!!", TALKVOLUME_SHOUT)); - - //Notify the DMs - SendMessageToAllDMs("We have a low level bashing in progress, please investigate" - + GetName(oKiller) + ". Has Killed Player " + GetName(oPlayer)); - -//End Effy Check.. - } - -//This is the reward of fair PVP - - //Lets make sure the killer is at least 1 level - //lower than the player they kill - else if(aLvl >= 1) - { - //award xp/gold by level difference, - //If the player is 1 to nDif levels lower than the player they kill - if (aLvl <=nDif) - { - //Adjust this to your likings.. - int nXP = aLvl * nReward1; - int nGold = aLvl * nReward2; - - GiveXPToCreature(oKiller,nXP); - GiveGoldToCreature(oKiller,nGold); - //The dead guy shouts how he lost badly. :) - AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); - } - - } - - //If the killer is at least 1 level higher than the player they kill - else if (dLvl <=nDif) - { - //Lets make sure the killer is within 1-4 Level difference - if (dLvl >=1) - { - int nXP = dLvl * nReward1; - int nGold = dLvl * nReward2; - - GiveXPToCreature(oKiller,nXP); - GiveGoldToCreature(oKiller,nGold); - //The dead guy shouts how he lost badly. :) - AssignCommand(oDead, ActionSpeakString("I got pwned!!", TALKVOLUME_SHOUT)); - } - } - //end pc check - } - //end pvp function - } - -///////////////////////////////////////////////////////////////////////// - -//Script End WOOSH!! -} diff --git a/_removed files/everpcdying.nss b/_removed files/everpcdying.nss deleted file mode 100644 index 97f4d38f..00000000 --- a/_removed files/everpcdying.nss +++ /dev/null @@ -1,104 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Script Name: everpcdying -//::////////////////////////////////////////////// -/* - This script handles the default behavior - that occurs when a character is dying. Dying - is when the character is between 0 and -9 hit - points; -10 and below is death. To use, redirect - the OnDying event script of the module to this script. -*/ -//::////////////////////////////////////////////// -//:: Author : Scott Thorne -//:: Updated: July 25, 2002 -//::////////////////////////////////////////////// -//::Modified by Genisys (Guile) -//::Modified On: 4/23/08 (Updated 8/10/08) -////////////////////////////////////////////////// - -//Required Include -#include "nw_i0_tool" - -//PROTOTYPE DECLARED -void bleed(int iBleedAmt); - -//Main Script -void main() -{ - //Declare Major Variables - object oDying = GetLastPlayerDying(); - object oPlayer = GetLastPlayerDying(); - object oPC = GetLastPlayerDying(); - string ddVarName = "dd"+GetName(oPC); - object oModule = GetModule(); - SetLocalInt (oModule, ddVarName, 1); - - //If the player is being tortured in Hell, ressurect them... - object hell = GetArea(oPlayer); - object helltest = GetArea(GetObjectByTag("satan1")); - if (hell == helltest) - { - DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPlayer)); - return; - } - - AssignCommand(oDying, ClearAllActions()); - AssignCommand(oDying, bleed(1)); - -//Main Script End -} - -//PROTOTYPE DEFINED -void bleed(int iBleedAmt) -{ - - object oPC = GetLastPlayerDying(); - if (!GetIsPC(oPC)){ -return; -} - string ddVarName = "dd"+GetName(oPC); - object oModule = GetModule(); - effect eBleedEff; - - /* keep executing recursively until character is dead or at +1 hit points */ - if (GetCurrentHitPoints() <= 0) { - - /* a positive bleeding amount means damage, otherwise heal the character */ - if (iBleedAmt > 0) { - eBleedEff = EffectDamage(iBleedAmt); - } else { - eBleedEff = EffectHeal(-iBleedAmt); /* note the negative sign */ - } - - - ApplyEffectToObject(DURATION_TYPE_INSTANT, eBleedEff, OBJECT_SELF); - - /* -10 hit points is the death threshold, at or beyond it the character dies */ - if (GetCurrentHitPoints() <= -10) { - SetLocalInt (oModule, ddVarName, 1); - PlayVoiceChat(VOICE_CHAT_DEATH); /* scream one last time */ - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), OBJECT_SELF); /* make death dramatic */ - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF); /* now kill them */ - return; - } - - if (iBleedAmt > 0) { /* only check if character has not stablized */ - if (d10(1) == 1) { - /* 10% chance to stablize */ - iBleedAmt = -iBleedAmt; /* reverse the bleeding process */ - PlayVoiceChat(VOICE_CHAT_LAUGH); - /* laugh at death -- this time */ - } else { - switch (d6()) { - case 1: PlayVoiceChat(VOICE_CHAT_PAIN1); break; - case 2: PlayVoiceChat(VOICE_CHAT_PAIN2); break; - case 3: PlayVoiceChat(VOICE_CHAT_PAIN3); break; - case 4: PlayVoiceChat(VOICE_CHAT_HEALME); break; - case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break; - case 6: PlayVoiceChat(VOICE_CHAT_HELP); - } - } - } - DelayCommand(6.0,bleed(iBleedAmt)); /* do this again next round */ - } -} diff --git a/_removed files/everpcequip.nss b/_removed files/everpcequip.nss deleted file mode 100644 index 7801a67a..00000000 --- a/_removed files/everpcequip.nss +++ /dev/null @@ -1,85 +0,0 @@ -//Script Name: everpcequip -////////////////////////////////////////// -//Created By: Genisys (Guile) -//Created On: 5/10/08 (updated 8/10/08) -///////////////////////////////////////// -/* -This script handles the equipping of all items tagged "arena" -Players cannot equip items in the arena unless it's tagnamed "arena" -Likewise players cannot equipt items tagnamed "arena" outside of the arena. -*/ -//////////////////////////////////////// -//Required Include -#include "x2_inc_switches" - -//Main Script -void main() -{ - //Declare Major Variables - object oItem = GetPCItemLastEquipped(); - object oPC = GetPCItemLastEquippedBy(); - int nSlot; - object nItem; - - -//You need to assign the tagname "TheArena" to any areas you deem as an Arena -//All items tagnamed "Arena" are unequipped if the person is NOT in the Arena. -//All Non-Arena items are unequipped if the player is IN the Arena - -//If the player is in the arena and eqiupping a non-arena item - if(GetTag(GetArea(oPC)) == "TheArena") - { - for (nSlot=0; nSlot=40) -{ - //Lets make the concealed 40% - eEffect = EffectConcealment(40); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - - //Lets make the look like a ghost.. :) - ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC); - -} - -//Send them to Fugue -oTarget = GetWaypointByTag("respawnpt"); -lTarget = GetLocation(oTarget); - -//Apply a respawn penalty (See the setxp_inc script) -ApplyRespawnPenalty(oPC); - -//If the location is valid, send them there.. -if (GetArea(GetAreaFromLocation(lTarget))!=OBJECT_INVALID) -{ - -//Send the PC to the waypoint tagnamed "deathway" -AssignCommand(oPC, ClearAllActions()); -AssignCommand(oPC, ActionJumpToLocation(lTarget)); -} - -//Otherwise if the area is not valid.. -else -{ -//Otherwise they respawn where they died. -} - -//Main Script End -} - -//////BIOWARE STANDARD Raise OnDeath FUNCTION/////////// - -//PROTOTYPE DEFINED -// Raise OnDeath function -void Raise(object oPlayer) -{ - effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); - - effect eBad = GetFirstEffect(oPlayer); - ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); - ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); - - //Search for negative effects - while(GetIsEffectValid(eBad)) - { - if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || - GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || - GetEffectType(eBad) == EFFECT_TYPE_DEAF || - GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || - GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) - { - //Remove effect if it is negative. - RemoveEffect(oPlayer, eBad); - } - eBad = GetNextEffect(oPlayer); - } - //Fire cast spell at event for the specified target - SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); -} diff --git a/_removed files/everpcrest.nss b/_removed files/everpcrest.nss deleted file mode 100644 index 35ebcbef..00000000 --- a/_removed files/everpcrest.nss +++ /dev/null @@ -1,130 +0,0 @@ -//Script Name: everpcrest -/////////////////////////////////////// -//Created by Genisys / Guile -//Created on: 3/11/08 (Updated 8/10/08 -////////////////////////////////////// -/* -This is my premier OnPlayerRest -Module Properties Event script -to handle rest within all of my -module.. -*/ -////////////////////////////////////// - -//Redundant Variable -effect eEffect; - -//Main Script -void main() -{ - -//Declare Major Variables -object oPC=GetLastPCRested(); -object oPP = oPC; - -location lSaved = GetLocation(oPP); - -int nRestType=GetLastRestEventType(); -int nHD = GetHitDice(oPC); - -//Determine which Event has happened and run the script for that event. -switch (nRestType) - { - -///////////////////////////////////////////////////////////////////////////// - case REST_EVENTTYPE_REST_STARTED: - { - //Dark the screen out on the PC.. - FadeToBlack(oPC, FADE_SPEED_FAST); - - - //Your code goes here. - - - } - - break; -//////////////////////////////////////////////////////////////////////////// - case REST_EVENTTYPE_REST_FINISHED: - { - - //remove the black out from thier screen.. - FadeFromBlack(oPC, FADE_SPEED_SLOW); - - //Store the PC's location, so they can come back here after relogging - SetCampaignLocation(GetName(GetModule()), "SAVED_LOC", lSaved, oPP); - //Tell the PC their location was saved.. - SendMessageToPC(oPP, "Location Saved!"); - - FloatingTextStringOnCreature("Your character was saved.", oPC); - //Delete the // below to activate autosave when pc's finish resting. - // DelayCommand(1.0, ExportSingleCharacter(oPC)); - - if(nHD == 40) - { - //If the player is Legendary Level 60 give them a cool power! - if(GetXP(oPC) >5000000) - { - //The legendary character is immune to death! - eEffect = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - - //The legendary character is immune to poison! - eEffect = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - } - - //Make ALL level 40s have 40% concealment - - //Make them harder to hit 40% miss chance... - eEffect = EffectConcealment(40); - eEffect = SupernaturalEffect(eEffect); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC); - - //Apply the Ghost Like Visual to all Level 40 PCs - DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, - SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC)); - } - - //if the PC is immortal (has the immotoken) - if (GetItemPossessedBy(oPC, "immotoken")!= OBJECT_INVALID) - { - //See this script to adjust the immortal options.. - ExecuteScript("powerimmortal", oPC); - } - - - //Your code goes here. - - - } - break; - - -//////////////////////////////////////////////////////////////////////// - case REST_EVENTTYPE_REST_CANCELLED: - { - FloatingTextStringOnCreature("Your character was not saved!", oPC); - - FadeFromBlack(oPC, FADE_SPEED_MEDIUM); - - - //Your code goes here. - - } - - break; - -///////////////////////////////////////////////////////////////////////// - default: //You will probably never see this message.. - SendMessageToPC(oPC, - "If you see this message tell the DMs there is an error in the rest event script."); - - - //Switch Statement end.. - } - -//Main Script end -} diff --git a/_removed files/everpcunequip.nss b/_removed files/everpcunequip.nss deleted file mode 100644 index e6dcf3c1..00000000 --- a/_removed files/everpcunequip.nss +++ /dev/null @@ -1,96 +0,0 @@ -//:: Script Name: everpcunequip -//:://///////////////////////////////////////////// -//:: Example XP2 OnItemEquipped -//:: x2_mod_def_unequ -//:: (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -// Put into the: OnUnEquip Module Event -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: 2003-07-16 -//::////////////////////////////////////////////// -//Modified By Guile 3/24/08 (Updated 8/10/08) -//This modifcation stops a weapon switching exploit -//Which gives the makes the PC never miss!!! -/////////////////////////////////////////////////// - -//Required Includes -#include "x2_inc_switches" -#include "x2_inc_intweapon" - -//Main Script -void main() -{ - - object oItem = GetPCItemLastUnequipped(); - object oPC = GetPCItemLastUnequippedBy(); - - if (!GetIsPC(oPC)) return; - - -//This is my weapon swap pvp exploit fix -//Lets make sure they are actually fighting someone -if(GetIsInCombat(oPC)) -{ -//Lets make sure it's a weapon or shield they are unequipping -if(GetBaseItemType(oItem) != BASE_ITEM_AMULET) -{if(GetBaseItemType(oItem) != BASE_ITEM_ARROW) -{if(GetBaseItemType(oItem) != BASE_ITEM_BELT) -{if(GetBaseItemType(oItem) != BASE_ITEM_BOLT) -{if(GetBaseItemType(oItem) != BASE_ITEM_BOOTS) -{if(GetBaseItemType(oItem) != BASE_ITEM_BRACER) -{if(GetBaseItemType(oItem) != BASE_ITEM_CLOAK) -{if(GetBaseItemType(oItem) != BASE_ITEM_HELMET) -{if(GetBaseItemType(oItem) != BASE_ITEM_BULLET) -{if(GetBaseItemType(oItem) != BASE_ITEM_RING) -{ -DelayCommand(0.5, AssignCommand(oPC, ClearAllActions())); -}}}}}}}}}} -//Exploit Fix END -} - -/////////////////////////////////////////////////////////////////////////// - - -//Your Code Goes here.. - - -/////////////////////////////////////////////////////////////////////////// - -///////////////////BIOWARE XP2 FUNCTIONS/////////////////////////////////// - //Commented out because I am not using it... - /* Delete this line to activate - // ------------------------------------------------------------------------- - // Intelligent Weapon System - // ------------------------------------------------------------------------- - if (IPGetIsIntelligentWeapon(oItem)) - { - IWSetIntelligentWeaponEquipped(oPC,OBJECT_INVALID); - IWPlayRandomUnequipComment(oPC,oItem); - } - - // DO NOT TOUCH THIS LINE! */ - - -///////////////////////XP2 TAGBASED SCRIPTING CODE/////////////////////////// - - // ------------------------------------------------------------------------- - // Generic Item Script Execution Code - // If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module, - // it will execute a script that has the same name as the item's tag - // inside this script you can manage scripts for all events by checking against - // GetUserDefinedItemEventNumber(). See x2_it_example.nss - // ------------------------------------------------------------------------- - if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) - { - SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNEQUIP); - int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); - if (nRet == X2_EXECUTE_SCRIPT_END) - { - return; - } - - } - -//Main Script End -} diff --git a/_removed files/everunaquire.nss b/_removed files/everunaquire.nss deleted file mode 100644 index 2351c36a..00000000 --- a/_removed files/everunaquire.nss +++ /dev/null @@ -1,108 +0,0 @@ -//Script Name: onunaquireitem -////////////////////////////////////////// -//Created By: Genisys (Guile) -//Created On: 3/05/08 (Update 8/10/08) -///////////////////////////////////////// -/* -This script goes in the OnUnAquireItem -Module Event in the Module Properties - -This script accurately nails a player -for pick pocketing another player. -It doesn't fire if they are pick -pocketing anything but a player. - -The Tag Standard Bioware Tag-Based -Scripting will still fire reguardless. -*/ -//////////////////////////////////////// - -//Required Include -#include "x2_inc_switches" -void main() -{ - -//IMPORTANT THIS MUST BE IN YOUR OnUnAcquireItem Module Event Script - //This is a fix for the Inventory Organizing System! - object oPC = GetModuleItemLostBy(); - if(GetLocalInt(oPC, "ORGANIZING")==1) - { return; } - -object oItem = GetModuleItemLost(); - -object oRobbed; -oRobbed = GetModuleItemLostBy(); -object oThief; -oThief = GetModuleItemAcquiredBy(); -object oLost; -oLost = GetModuleItemLost(); -object oFound; -oFound = GetModuleItemAcquired(); - -string sMsg; -sMsg = "You can't pick player's pockets, it's not permitted!"; - - //Let's make sure the thief is a PC, or continue on to the tag based scripting - if (GetIsPC(oThief)) - { - - //Lets see if they have Pick Pocket Skills - if(GetSkillRank(SKILL_PICK_POCKET, oThief, TRUE)>0) - { - //Lets make sure they took it from a PC and not an NPC or Monster. - if(GetIsPC(oRobbed)) - { - //Let's make sure the thief isn't crafting. - if(oRobbed != oThief) - { - //Lets make sure the the thief is the one who disturbed the inventory - //of the person who lost the item. (This needs to be tested thoroughly) - // if(GetLastDisturbed()== oThief) - //Delete the // Below and the // where } appears below as well to activate. - // { - - //Give the item back, destroy the one they took, and kill the thief. - ActionTakeItem(oFound, oThief); - ActionGiveItem(oFound, oRobbed); - SendMessageToPC(oThief, sMsg); - effect eEffect; - eEffect = EffectDeath(); - eEffect = SupernaturalEffect(eEffect); - DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oThief)); - AssignCommand(oThief, SpeakString("I'm a thief!!", TALKVOLUME_SHOUT)); - - //} - } - } - } - } - -//This script destroys all items dropped if not in combat (disarmed) -//or if the item is put into a container in the module. -//Simply place // before Execute to turn off. -ExecuteScript("trashem",OBJECT_SELF); - -/////////////////////////////////////////////////////////////////////////// - - -//Your Code Goes here... - - -/////////////////////////////////////////////////////////////////////////// - -///////////STANDARD XP2 TAG BASED SCRIPTING CODE/////////////////////////// - - //Tag Based Scripting Check - if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) - { - SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNACQUIRE); - int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); - if (nRet == X2_EXECUTE_SCRIPT_END) - { - return; - } - - } - -//Main Script End -} diff --git a/_removed files/hgll_classft_inc.nss b/_removed files/hgll_classft_inc.nss deleted file mode 100644 index 6e947dd3..00000000 --- a/_removed files/hgll_classft_inc.nss +++ /dev/null @@ -1,7473 +0,0 @@ -//--------------------------------DECLARATIONS--------------------------------// - -// This function returns the level at which the specified class gets the specified feat. -// If the feat is epic only, it will return -1 in most cases, though it will also return -// 21 on occasion, as with Epic Spoells, which actually require 21 levels of the class rather -// than just epic character status. It replicates EXACTLY the cls_feat 2da for each of the -// respective classes, though the order of feats has been shuffled to accomodate the switch -// statements, and a few duplicate cases in the 2das were removed. If the feat input is not -// a class feat (and therefore not found in the 2da), this function will return -2. If the -// class input is not a valid class int, the function returns -3. Although Harper Scout could -// not possibly be a character's control class for legendary levels, it is included at the end -// of the switch so that the function can be of broader use to the community. Several feats were -// added as class feats for Palemasters, including Spell Focuses and Greater Spell Focuses -// (since they get Epic Focuses). They are marked in the function. The class switches are -// in aphabetical order by 2da file (which is slightly different than class name). -int GetClassLevelReqForFeat(int nFeat, int nClass); -// This function returns TRUE if the feat specified is a general feat, avalable to all classes. -int GetIsGeneralFeat(int nFeat); - -//----------------------------------FUNCTIONS---------------------------------// - -int GetClassLevelReqForFeat(int nFeat, int nClass) -{ -int nInt; -switch(nClass) -{ - case CLASS_TYPE_ARCANE_ARCHER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -case 445 : nInt = 1 ; break; -case 446 : nInt = 3 ; break; -case 447 : nInt = 5 ; break; -case 448 : nInt = 7 ; break; -case 449 : nInt = 9 ; break; -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -case 450 : nInt = 2 ; break; -case 451 : nInt = 4 ; break; -case 452 : nInt = 6 ; break; -case 453 : nInt = 8 ; break; -case 454 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -case 585 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 784 : nInt = -1 ; break; -case 785 : nInt = -1 ; break; -case 786 : nInt = -1 ; break; -case 787 : nInt = -1 ; break; -case 788 : nInt = -1 ; break; -case 789 : nInt = -1 ; break; -case 790 : nInt = -1 ; break; -case 791 : nInt = -1 ; break; -case 792 : nInt = -1 ; break; -case 793 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 977 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -case 1045 : nInt = 11 ; break; -case 1046 : nInt = 13 ; break; -case 1047 : nInt = 15 ; break; -case 1048 : nInt = 17 ; break; -case 1049 : nInt = 19 ; break; -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1050 : nInt = 21 ; break; -case 1051 : nInt = 23 ; break; -case 1052 : nInt = 25 ; break; -case 1053 : nInt = 27 ; break; -case 1054 : nInt = 29 ; break; -case 1055 : nInt = 31 ; break; -case 1056 : nInt = 33 ; break; -case 1057 : nInt = 35 ; break; -case 1058 : nInt = 37 ; break; -case 1059 : nInt = 39 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_ASSASSIN: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 195 : nInt = 2 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 251 : nInt = 5 ; break; -case 252 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -case 455 : nInt = 1 ; break; -case 456 : nInt = 3 ; break; -case 457 : nInt = 5 ; break; -case 458 : nInt = 7 ; break; -case 459 : nInt = 9 ; break; -case 463 : nInt = 2 ; break; -case 464 : nInt = 4 ; break; -case 465 : nInt = 6 ; break; -case 466 : nInt = 8 ; break; -case 467 : nInt = 10 ; break; -case 468 : nInt = 2 ; break; -case 469 : nInt = 5 ; break; -case 470 : nInt = 7 ; break; -case 471 : nInt = 9 ; break; -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 585 : nInt = -1 ; break; -case 594 : nInt = -1 ; break; -case 597 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 748 : nInt = -1 ; break; -case 749 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 750 : nInt = -1 ; break; -case 751 : nInt = -1 ; break; -case 752 : nInt = -1 ; break; -case 753 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 784 : nInt = -1 ; break; -case 785 : nInt = -1 ; break; -case 786 : nInt = -1 ; break; -case 787 : nInt = -1 ; break; -case 788 : nInt = -1 ; break; -case 789 : nInt = -1 ; break; -case 790 : nInt = -1 ; break; -case 791 : nInt = -1 ; break; -case 792 : nInt = -1 ; break; -case 793 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 834 : nInt = -1 ; break; -case 835 : nInt = -1 ; break; -case 836 : nInt = -1 ; break; -case 837 : nInt = -1 ; break; -case 838 : nInt = -1 ; break; -case 839 : nInt = -1 ; break; -case 840 : nInt = -1 ; break; -case 841 : nInt = -1 ; break; -case 842 : nInt = -1 ; break; -case 843 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 960 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 978 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -case 1004 : nInt = 11 ; break; -case 1005 : nInt = 13 ; break; -case 1006 : nInt = 15 ; break; -case 1019 : nInt = 17 ; break; -case 1020 : nInt = 19 ; break; -case 1021 : nInt = 21 ; break; -case 1022 : nInt = 23 ; break; -case 1023 : nInt = 25 ; break; -case 1024 : nInt = 27 ; break; -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -case 1025 : nInt = 29 ; break; -case 1026 : nInt = 31 ; break; -case 1027 : nInt = 33 ; break; -case 1028 : nInt = 35 ; break; -case 1029 : nInt = 37 ; break; -case 1030 : nInt = 39 ; break; -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1070 : nInt = 12 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_BARBARIAN: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 194 : nInt = 1 ; break; -case 195 : nInt = 2 ; break; -case 196 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 251 : nInt = 5 ; break; -case 252 : nInt = 10 ; break; -case 253 : nInt = 13 ; break; -case 254 : nInt = 16 ; break; -case 255 : nInt = 19 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 293 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -case 326 : nInt = 4 ; break; -case 327 : nInt = 8 ; break; -case 328 : nInt = 12 ; break; -case 329 : nInt = 15 ; break; -case 330 : nInt = 16 ; break; -case 331 : nInt = 20 ; break; -case 332 : nInt = 14 ; break; -case 333 : nInt = 17 ; break; -case 334 : nInt = 20 ; break; -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 753 : nInt = -1 ; break; -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 869 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -case 967 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 988 : nInt = -1 ; break; -case 989 : nInt = -1 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1067 : nInt = 23 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_BARD: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 32 : nInt = 1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 193 : nInt = -1 ; break; -case 197 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 257 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -case 355 : nInt = 2 ; break; -case 356 : nInt = 3 ; break; -case 357 : nInt = 4 ; break; -case 358 : nInt = 5 ; break; -case 359 : nInt = 6 ; break; -case 360 : nInt = 7 ; break; -case 361 : nInt = 8 ; break; -case 362 : nInt = 9 ; break; -case 363 : nInt = 10 ; break; -case 364 : nInt = 11 ; break; -case 365 : nInt = 12 ; break; -case 366 : nInt = 13 ; break; -case 367 : nInt = 14 ; break; -case 368 : nInt = 15 ; break; -case 369 : nInt = 16 ; break; -case 370 : nInt = 17 ; break; -case 371 : nInt = 18 ; break; -case 372 : nInt = 19 ; break; -case 373 : nInt = 20 ; break; -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -case 401 : nInt = -1 ; break; -case 415 : nInt = -1 ; break; -case 416 : nInt = -1 ; break; -case 417 : nInt = -1 ; break; -case 418 : nInt = -1 ; break; -case 419 : nInt = -1 ; break; -case 420 : nInt = -1 ; break; -case 421 : nInt = -1 ; break; -case 422 : nInt = -1 ; break; -case 423 : nInt = -1 ; break; -case 424 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 588 : nInt = -1 ; break; -case 589 : nInt = -1 ; break; -case 590 : nInt = -1 ; break; -case 591 : nInt = -1 ; break; -case 592 : nInt = -1 ; break; -case 593 : nInt = -1 ; break; -case 594 : nInt = -1 ; break; -case 595 : nInt = -1 ; break; -case 596 : nInt = -1 ; break; -case 597 : nInt = -1 ; break; -case 598 : nInt = -1 ; break; -case 599 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 601 : nInt = -1 ; break; -case 602 : nInt = -1 ; break; -case 603 : nInt = -1 ; break; -case 604 : nInt = -1 ; break; -case 605 : nInt = -1 ; break; -case 606 : nInt = -1 ; break; -case 607 : nInt = -1 ; break; -case 608 : nInt = -1 ; break; -case 600 : nInt = -1 ; break; -case 609 : nInt = -1 ; break; -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 695 : nInt = -1 ; break; -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 764 : nInt = -1 ; break; -case 765 : nInt = -1 ; break; -case 766 : nInt = -1 ; break; -case 767 : nInt = -1 ; break; -case 768 : nInt = -1 ; break; -case 769 : nInt = -1 ; break; -case 770 : nInt = -1 ; break; -case 771 : nInt = -1 ; break; -case 772 : nInt = -1 ; break; -case 773 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 784 : nInt = -1 ; break; -case 785 : nInt = -1 ; break; -case 786 : nInt = -1 ; break; -case 787 : nInt = -1 ; break; -case 788 : nInt = -1 ; break; -case 789 : nInt = -1 ; break; -case 790 : nInt = -1 ; break; -case 791 : nInt = -1 ; break; -case 792 : nInt = -1 ; break; -case 793 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 870 : nInt = -1 ; break; -case 871 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 913 : nInt = -1 ; break; -case 914 : nInt = -1 ; break; -case 917 : nInt = -1 ; break; -case 918 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 968 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_BLACKGUARD: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = 1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 294 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 413 : nInt = -1 ; break; -case 414 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -case 460 : nInt = 4 ; break; -case 461 : nInt = 7 ; break; -case 462 : nInt = 10 ; break; -case 472 : nInt = 2 ; break; -case 473 : nInt = 2 ; break; -case 474 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 475 : nInt = 5 ; break; -case 476 : nInt = 6 ; break; -case 477 : nInt = 8 ; break; -case 478 : nInt = 2 ; break; -case 479 : nInt = 7 ; break; -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -case 586 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -case 747 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 824 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 825 : nInt = -1 ; break; -case 826 : nInt = -1 ; break; -case 827 : nInt = -1 ; break; -case 828 : nInt = -1 ; break; -case 829 : nInt = -1 ; break; -case 830 : nInt = -1 ; break; -case 831 : nInt = -1 ; break; -case 832 : nInt = -1 ; break; -case 833 : nInt = -1 ; break; -case 834 : nInt = -1 ; break; -case 835 : nInt = -1 ; break; -case 836 : nInt = -1 ; break; -case 837 : nInt = -1 ; break; -case 838 : nInt = -1 ; break; -case 839 : nInt = -1 ; break; -case 840 : nInt = -1 ; break; -case 841 : nInt = -1 ; break; -case 842 : nInt = -1 ; break; -case 843 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 854 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -case 960 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 979 : nInt = 11 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -case 1003 : nInt = 15 ; break; -case 1007 : nInt = 13 ; break; -case 1008 : nInt = 16 ; break; -case 1009 : nInt = 19 ; break; -case 1010 : nInt = 22 ; break; -case 1011 : nInt = 25 ; break; -case 1012 : nInt = 28 ; break; -case 1013 : nInt = 31 ; break; -case 1014 : nInt = 34 ; break; -case 1015 : nInt = 37 ; break; -case 1016 : nInt = 40 ; break; -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_CLERIC: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = 1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -case 13 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 32 : nInt = 1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 294 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -case 413 : nInt = -1 ; break; -case 414 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 804 : nInt = -1 ; break; -case 805 : nInt = -1 ; break; -case 806 : nInt = -1 ; break; -case 807 : nInt = -1 ; break; -case 808 : nInt = -1 ; break; -case 809 : nInt = -1 ; break; -case 810 : nInt = -1 ; break; -case 811 : nInt = -1 ; break; -case 812 : nInt = -1 ; break; -case 813 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 854 : nInt = -1 ; break; -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 874 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 875 : nInt = 21 ; break; -case 876 : nInt = 21 ; break; -case 878 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 969 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_DIVINECHAMPION: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 5 : nInt = -1 ; break; -case 6 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -case 9 : nInt = -1 ; break; -case 10 : nInt = -1 ; break; -case 15 : nInt = -1 ; break; -case 16 : nInt = -1 ; break; -case 17 : nInt = -1 ; break; -case 18 : nInt = -1 ; break; -case 19 : nInt = -1 ; break; -case 20 : nInt = -1 ; break; -case 21 : nInt = -1 ; break; -case 23 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 26 : nInt = -1 ; break; -case 27 : nInt = -1 ; break; -case 28 : nInt = -1 ; break; -case 30 : nInt = -1 ; break; -case 31 : nInt = -1 ; break; -case 32 : nInt = 1 ; break; -case 39 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 42 : nInt = -1 ; break; -case 43 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -case 52 : nInt = -1 ; break; -case 53 : nInt = -1 ; break; -case 54 : nInt = -1 ; break; -case 55 : nInt = -1 ; break; -case 56 : nInt = -1 ; break; -case 57 : nInt = -1 ; break; -case 58 : nInt = -1 ; break; -case 59 : nInt = -1 ; break; -case 60 : nInt = -1 ; break; -case 61 : nInt = -1 ; break; -case 62 : nInt = -1 ; break; -case 63 : nInt = -1 ; break; -case 64 : nInt = -1 ; break; -case 65 : nInt = -1 ; break; -case 66 : nInt = -1 ; break; -case 67 : nInt = -1 ; break; -case 68 : nInt = -1 ; break; -case 69 : nInt = -1 ; break; -case 70 : nInt = -1 ; break; -case 71 : nInt = -1 ; break; -case 72 : nInt = -1 ; break; -case 73 : nInt = -1 ; break; -case 74 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -case 75 : nInt = -1 ; break; -case 76 : nInt = -1 ; break; -case 77 : nInt = -1 ; break; -case 78 : nInt = -1 ; break; -case 79 : nInt = -1 ; break; -case 80 : nInt = -1 ; break; -case 82 : nInt = -1 ; break; -case 83 : nInt = -1 ; break; -case 84 : nInt = -1 ; break; -case 85 : nInt = -1 ; break; -case 87 : nInt = -1 ; break; -case 88 : nInt = -1 ; break; -case 89 : nInt = -1 ; break; -case 90 : nInt = -1 ; break; -case 91 : nInt = -1 ; break; -case 92 : nInt = -1 ; break; -case 93 : nInt = -1 ; break; -case 94 : nInt = -1 ; break; -case 95 : nInt = -1 ; break; -case 96 : nInt = -1 ; break; -case 97 : nInt = -1 ; break; -case 98 : nInt = -1 ; break; -case 99 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -case 100 : nInt = -1 ; break; -case 101 : nInt = -1 ; break; -case 102 : nInt = -1 ; break; -case 103 : nInt = -1 ; break; -case 104 : nInt = -1 ; break; -case 105 : nInt = -1 ; break; -case 106 : nInt = -1 ; break; -case 107 : nInt = -1 ; break; -case 108 : nInt = -1 ; break; -case 109 : nInt = -1 ; break; -case 110 : nInt = -1 ; break; -case 111 : nInt = -1 ; break; -case 112 : nInt = -1 ; break; -case 113 : nInt = -1 ; break; -case 114 : nInt = -1 ; break; -case 115 : nInt = -1 ; break; -case 116 : nInt = -1 ; break; -case 117 : nInt = -1 ; break; -case 118 : nInt = -1 ; break; -case 120 : nInt = -1 ; break; -case 121 : nInt = -1 ; break; -case 122 : nInt = -1 ; break; -case 123 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -case 125 : nInt = -1 ; break; -case 126 : nInt = -1 ; break; -case 127 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 299 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -case 301 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 389 : nInt = -1 ; break; -case 390 : nInt = -1 ; break; -case 391 : nInt = -1 ; break; -case 392 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 408 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -case 657 : nInt = -1 ; break; -case 658 : nInt = -1 ; break; -case 659 : nInt = -1 ; break; -case 660 : nInt = -1 ; break; -case 661 : nInt = -1 ; break; -case 662 : nInt = -1 ; break; -case 663 : nInt = -1 ; break; -case 664 : nInt = -1 ; break; -case 665 : nInt = -1 ; break; -case 666 : nInt = -1 ; break; -case 667 : nInt = -1 ; break; -case 668 : nInt = -1 ; break; -case 669 : nInt = -1 ; break; -case 670 : nInt = -1 ; break; -case 671 : nInt = -1 ; break; -case 672 : nInt = -1 ; break; -case 673 : nInt = -1 ; break; -case 674 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 675 : nInt = -1 ; break; -case 676 : nInt = -1 ; break; -case 677 : nInt = -1 ; break; -case 678 : nInt = -1 ; break; -case 679 : nInt = -1 ; break; -case 680 : nInt = -1 ; break; -case 681 : nInt = -1 ; break; -case 682 : nInt = -1 ; break; -case 683 : nInt = -1 ; break; -case 684 : nInt = -1 ; break; -case 685 : nInt = -1 ; break; -case 686 : nInt = -1 ; break; -case 687 : nInt = -1 ; break; -case 688 : nInt = -1 ; break; -case 689 : nInt = -1 ; break; -case 690 : nInt = -1 ; break; -case 691 : nInt = -1 ; break; -case 692 : nInt = -1 ; break; -case 693 : nInt = -1 ; break; -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 753 : nInt = -1 ; break; -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 804 : nInt = -1 ; break; -case 805 : nInt = -1 ; break; -case 806 : nInt = -1 ; break; -case 807 : nInt = -1 ; break; -case 808 : nInt = -1 ; break; -case 809 : nInt = -1 ; break; -case 810 : nInt = -1 ; break; -case 811 : nInt = -1 ; break; -case 812 : nInt = -1 ; break; -case 813 : nInt = -1 ; break; -case 824 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 825 : nInt = -1 ; break; -case 826 : nInt = -1 ; break; -case 827 : nInt = -1 ; break; -case 828 : nInt = -1 ; break; -case 829 : nInt = -1 ; break; -case 830 : nInt = -1 ; break; -case 831 : nInt = -1 ; break; -case 832 : nInt = -1 ; break; -case 833 : nInt = -1 ; break; -case 844 : nInt = -1 ; break; -case 845 : nInt = -1 ; break; -case 846 : nInt = -1 ; break; -case 847 : nInt = -1 ; break; -case 848 : nInt = -1 ; break; -case 849 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 850 : nInt = -1 ; break; -case 851 : nInt = -1 ; break; -case 852 : nInt = -1 ; break; -case 853 : nInt = -1 ; break; -case 854 : nInt = -1 ; break; -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 867 : nInt = -1 ; break; -case 868 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 904 : nInt = 2 ; break; -case 909 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 952 : nInt = -1 ; break; -case 954 : nInt = -1 ; break; -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 982 : nInt = 11 ; break; -case 993 : nInt = -1 ; break; -case 995 : nInt = -1 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 998 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_DRAGONDISCIPLE: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -case 228 : nInt = 10 ; break; -case 235 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -case 586 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 961 : nInt = 1 ; break; -case 962 : nInt = 2 ; break; -case 963 : nInt = 10 ; break; -case 964 : nInt = 10 ; break; -case 965 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 987 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -case 1042 : nInt = 1 ; break; -case 1043 : nInt = 4 ; break; -case 1044 : nInt = 6 ; break; -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_DRUID: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 32 : nInt = 1 ; break; -case 34 : nInt = -1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 48 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 198 : nInt = 1 ; break; -case 199 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 200 : nInt = 2 ; break; -case 201 : nInt = 3 ; break; -case 202 : nInt = 4 ; break; -case 203 : nInt = 9 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -case 304 : nInt = 16 ; break; -case 305 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -case 335 : nInt = 6 ; break; -case 336 : nInt = 7 ; break; -case 337 : nInt = 10 ; break; -case 338 : nInt = 14 ; break; -case 339 : nInt = 18 ; break; -case 340 : nInt = 17 ; break; -case 341 : nInt = 19 ; break; -case 342 : nInt = 20 ; break; -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -case 587 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 804 : nInt = -1 ; break; -case 805 : nInt = -1 ; break; -case 806 : nInt = -1 ; break; -case 807 : nInt = -1 ; break; -case 808 : nInt = -1 ; break; -case 809 : nInt = -1 ; break; -case 810 : nInt = -1 ; break; -case 811 : nInt = -1 ; break; -case 812 : nInt = -1 ; break; -case 813 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 873 : nInt = -1 ; break; -case 874 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 875 : nInt = 21 ; break; -case 876 : nInt = 21 ; break; -case 878 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 970 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1068 : nInt = 22 ; break; -case 1069 : nInt = 26 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_DWARVENDEFENDER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = 1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -case 584 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -case 747 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 947 : nInt = 1 ; break; -case 948 : nInt = 6 ; break; -case 949 : nInt = 2 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 950 : nInt = 5 ; break; -case 951 : nInt = 10 ; break; -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 985 : nInt = 11 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_FIGHTER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = 1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 5 : nInt = -1 ; break; -case 6 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -case 9 : nInt = -1 ; break; -case 10 : nInt = -1 ; break; -case 15 : nInt = -1 ; break; -case 16 : nInt = -1 ; break; -case 17 : nInt = -1 ; break; -case 18 : nInt = -1 ; break; -case 19 : nInt = -1 ; break; -case 20 : nInt = -1 ; break; -case 21 : nInt = -1 ; break; -case 23 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 26 : nInt = -1 ; break; -case 27 : nInt = -1 ; break; -case 28 : nInt = -1 ; break; -case 30 : nInt = -1 ; break; -case 31 : nInt = -1 ; break; -case 32 : nInt = 1 ; break; -case 39 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 42 : nInt = -1 ; break; -case 43 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -case 47 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -case 52 : nInt = -1 ; break; -case 53 : nInt = -1 ; break; -case 54 : nInt = -1 ; break; -case 55 : nInt = -1 ; break; -case 56 : nInt = -1 ; break; -case 57 : nInt = -1 ; break; -case 58 : nInt = -1 ; break; -case 59 : nInt = -1 ; break; -case 60 : nInt = -1 ; break; -case 61 : nInt = -1 ; break; -case 62 : nInt = -1 ; break; -case 63 : nInt = -1 ; break; -case 64 : nInt = -1 ; break; -case 65 : nInt = -1 ; break; -case 66 : nInt = -1 ; break; -case 67 : nInt = -1 ; break; -case 68 : nInt = -1 ; break; -case 69 : nInt = -1 ; break; -case 70 : nInt = -1 ; break; -case 71 : nInt = -1 ; break; -case 72 : nInt = -1 ; break; -case 73 : nInt = -1 ; break; -case 74 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -case 75 : nInt = -1 ; break; -case 76 : nInt = -1 ; break; -case 77 : nInt = -1 ; break; -case 78 : nInt = -1 ; break; -case 79 : nInt = -1 ; break; -case 80 : nInt = -1 ; break; -case 82 : nInt = -1 ; break; -case 83 : nInt = -1 ; break; -case 84 : nInt = -1 ; break; -case 85 : nInt = -1 ; break; -case 87 : nInt = -1 ; break; -case 88 : nInt = -1 ; break; -case 89 : nInt = -1 ; break; -case 90 : nInt = -1 ; break; -case 91 : nInt = -1 ; break; -case 92 : nInt = -1 ; break; -case 93 : nInt = -1 ; break; -case 94 : nInt = -1 ; break; -case 95 : nInt = -1 ; break; -case 96 : nInt = -1 ; break; -case 97 : nInt = -1 ; break; -case 98 : nInt = -1 ; break; -case 99 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -case 100 : nInt = -1 ; break; -case 101 : nInt = -1 ; break; -case 102 : nInt = -1 ; break; -case 103 : nInt = -1 ; break; -case 104 : nInt = -1 ; break; -case 105 : nInt = -1 ; break; -case 106 : nInt = -1 ; break; -case 107 : nInt = -1 ; break; -case 108 : nInt = -1 ; break; -case 109 : nInt = -1 ; break; -case 110 : nInt = -1 ; break; -case 111 : nInt = -1 ; break; -case 112 : nInt = -1 ; break; -case 113 : nInt = -1 ; break; -case 114 : nInt = -1 ; break; -case 115 : nInt = -1 ; break; -case 116 : nInt = -1 ; break; -case 117 : nInt = -1 ; break; -case 118 : nInt = -1 ; break; -case 120 : nInt = -1 ; break; -case 121 : nInt = -1 ; break; -case 122 : nInt = -1 ; break; -case 123 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -case 125 : nInt = -1 ; break; -case 126 : nInt = -1 ; break; -case 127 : nInt = -1 ; break; -case 128 : nInt = -1 ; break; -case 129 : nInt = -1 ; break; -case 130 : nInt = -1 ; break; -case 131 : nInt = -1 ; break; -case 132 : nInt = -1 ; break; -case 133 : nInt = -1 ; break; -case 134 : nInt = -1 ; break; -case 135 : nInt = -1 ; break; -case 136 : nInt = -1 ; break; -case 137 : nInt = -1 ; break; -case 138 : nInt = -1 ; break; -case 139 : nInt = -1 ; break; -case 140 : nInt = -1 ; break; -case 141 : nInt = -1 ; break; -case 142 : nInt = -1 ; break; -case 143 : nInt = -1 ; break; -case 144 : nInt = -1 ; break; -case 145 : nInt = -1 ; break; -case 146 : nInt = -1 ; break; -case 147 : nInt = -1 ; break; -case 148 : nInt = -1 ; break; -case 149 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 150 : nInt = -1 ; break; -case 151 : nInt = -1 ; break; -case 152 : nInt = -1 ; break; -case 153 : nInt = -1 ; break; -case 154 : nInt = -1 ; break; -case 155 : nInt = -1 ; break; -case 156 : nInt = -1 ; break; -case 158 : nInt = -1 ; break; -case 159 : nInt = -1 ; break; -case 160 : nInt = -1 ; break; -case 161 : nInt = -1 ; break; -case 163 : nInt = -1 ; break; -case 164 : nInt = -1 ; break; -case 165 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 389 : nInt = -1 ; break; -case 390 : nInt = -1 ; break; -case 391 : nInt = -1 ; break; -case 392 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 408 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -case 657 : nInt = -1 ; break; -case 658 : nInt = -1 ; break; -case 659 : nInt = -1 ; break; -case 660 : nInt = -1 ; break; -case 661 : nInt = -1 ; break; -case 662 : nInt = -1 ; break; -case 663 : nInt = -1 ; break; -case 664 : nInt = -1 ; break; -case 665 : nInt = -1 ; break; -case 666 : nInt = -1 ; break; -case 667 : nInt = -1 ; break; -case 668 : nInt = -1 ; break; -case 669 : nInt = -1 ; break; -case 670 : nInt = -1 ; break; -case 671 : nInt = -1 ; break; -case 672 : nInt = -1 ; break; -case 673 : nInt = -1 ; break; -case 674 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 675 : nInt = -1 ; break; -case 676 : nInt = -1 ; break; -case 677 : nInt = -1 ; break; -case 678 : nInt = -1 ; break; -case 679 : nInt = -1 ; break; -case 680 : nInt = -1 ; break; -case 681 : nInt = -1 ; break; -case 682 : nInt = -1 ; break; -case 683 : nInt = -1 ; break; -case 684 : nInt = -1 ; break; -case 685 : nInt = -1 ; break; -case 686 : nInt = -1 ; break; -case 687 : nInt = -1 ; break; -case 688 : nInt = -1 ; break; -case 689 : nInt = -1 ; break; -case 690 : nInt = -1 ; break; -case 691 : nInt = -1 ; break; -case 692 : nInt = -1 ; break; -case 693 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 753 : nInt = -1 ; break; -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 844 : nInt = -1 ; break; -case 845 : nInt = -1 ; break; -case 846 : nInt = -1 ; break; -case 847 : nInt = -1 ; break; -case 848 : nInt = -1 ; break; -case 849 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 850 : nInt = -1 ; break; -case 851 : nInt = -1 ; break; -case 852 : nInt = -1 ; break; -case 853 : nInt = -1 ; break; -case 867 : nInt = -1 ; break; -case 868 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 952 : nInt = -1 ; break; -case 953 : nInt = -1 ; break; -case 954 : nInt = -1 ; break; -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 957 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -case 966 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 993 : nInt = -1 ; break; -case 994 : nInt = -1 ; break; -case 995 : nInt = -1 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 998 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_MONK: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 6 : nInt = 1 ; break; -case 8 : nInt = 2 ; break; -case 17 : nInt = 6 ; break; -case 21 : nInt = 1 ; break; -case 23 : nInt = 6 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 39 : nInt = 1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = -1 ; break; -case 49 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 204 : nInt = 1 ; break; -case 206 : nInt = 1 ; break; -case 207 : nInt = 3 ; break; -case 208 : nInt = 3 ; break; -case 209 : nInt = 5 ; break; -case 211 : nInt = 7 ; break; -case 212 : nInt = 9 ; break; -case 213 : nInt = 10 ; break; -case 214 : nInt = 11 ; break; -case 215 : nInt = 12 ; break; -case 216 : nInt = 20 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 260 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 296 : nInt = 15 ; break; -case 297 : nInt = 18 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -case 343 : nInt = 13 ; break; -case 344 : nInt = 16 ; break; -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 697 : nInt = -1 ; break; -case 698 : nInt = -1 ; break; -case 699 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 700 : nInt = -1 ; break; -case 701 : nInt = -1 ; break; -case 702 : nInt = -1 ; break; -case 703 : nInt = -1 ; break; -case 704 : nInt = -1 ; break; -case 705 : nInt = -1 ; break; -case 706 : nInt = -1 ; break; -case 707 : nInt = -1 ; break; -case 708 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 748 : nInt = -1 ; break; -case 749 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 750 : nInt = -1 ; break; -case 751 : nInt = -1 ; break; -case 752 : nInt = -1 ; break; -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 844 : nInt = -1 ; break; -case 845 : nInt = -1 ; break; -case 846 : nInt = -1 ; break; -case 847 : nInt = -1 ; break; -case 848 : nInt = -1 ; break; -case 849 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 850 : nInt = -1 ; break; -case 851 : nInt = -1 ; break; -case 852 : nInt = -1 ; break; -case 853 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 971 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_PALADIN: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 2 : nInt = 1 ; break; -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -case 13 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 217 : nInt = 1 ; break; -case 219 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 294 : nInt = 3 ; break; -case 299 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -case 300 : nInt = 2 ; break; -case 301 : nInt = 2 ; break; -case 302 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -case 413 : nInt = -1 ; break; -case 414 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -case 586 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -case 746 : nInt = -1 ; break; -case 747 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 824 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 825 : nInt = -1 ; break; -case 826 : nInt = -1 ; break; -case 827 : nInt = -1 ; break; -case 828 : nInt = -1 ; break; -case 829 : nInt = -1 ; break; -case 830 : nInt = -1 ; break; -case 831 : nInt = -1 ; break; -case 832 : nInt = -1 ; break; -case 833 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 854 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -case 972 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 995 : nInt = -1 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_PALEMASTER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -case 11 : nInt = -1 ; break; //feat Empower Spell added to standard Bioware 2da data -case 12 : nInt = -1 ; break; //feat Extend Spell added to standard Bioware 2da data -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 25 : nInt = -1 ; break; //feat Maximize Spell added to standard Bioware 2da data -case 29 : nInt = -1 ; break; //feat Quicken Spell added to standard Bioware 2da data -case 35 : nInt = -1 ; break; //feat Spell Focus Abjuration added to standard Bioware 2da data -case 36 : nInt = -1 ; break; //feat Spell Penetration added to standard Bioware 2da data -case 37 : nInt = -1 ; break; //feat Still Spell added to standard Bioware 2da data -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; //feat Spell Focus Conjuration added to standard Bioware 2da data -case 167 : nInt = -1 ; break; //feat Spell Focus Divination added to standard Bioware 2da data -case 168 : nInt = -1 ; break; //feat Spell Focus Enchantment added to standard Bioware 2da data -case 169 : nInt = -1 ; break; //feat Spell Focus Evocation added to standard Bioware 2da data -case 170 : nInt = -1 ; break; //feat Spell Focus Illusion added to standard Bioware 2da data -case 171 : nInt = -1 ; break; //feat Spell Focus Necromancy added to standard Bioware 2da data -case 172 : nInt = -1 ; break; //feat Spell Focus Transmutation added to standard Bioware 2da data -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -case 228 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; //feat Greater Spell Focus Abjuration added to standard Bioware 2da data -case 394 : nInt = -1 ; break; //feat Greater Spell Focus Conjuration added to standard Bioware 2da data -case 395 : nInt = -1 ; break; //feat Greater Spell Focus Divination added to standard Bioware 2da data -case 396 : nInt = -1 ; break; //feat Greater Spell Focus Enchantment added to standard Bioware 2da data -case 397 : nInt = -1 ; break; //feat Greater Spell Focus Evocation added to standard Bioware 2da data -case 398 : nInt = -1 ; break; //feat Greater Spell Focus Illusion added to standard Bioware 2da data -case 399 : nInt = -1 ; break; //feat Greater Spell Focus Necromancy added to standard Bioware 2da data -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; //feat Greater Spell Focus Transmutation added to standard Bioware 2da data -case 401 : nInt = -1 ; break; //feat Greater Spell Penetration added to standard Bioware 2da data -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 874 : nInt = 15 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 875 : nInt = 15 ; break; -case 876 : nInt = 15 ; break; -case 877 : nInt = 15 ; break; -case 878 : nInt = 15 ; break; -case 886 : nInt = 1 ; break; -case 889 : nInt = 2 ; break; -case 890 : nInt = 4 ; break; -case 891 : nInt = 5 ; break; -case 892 : nInt = 6 ; break; -case 893 : nInt = 8 ; break; -case 894 : nInt = 7 ; break; -case 895 : nInt = 9 ; break; -case 896 : nInt = 10 ; break; -case 897 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 984 : nInt = 11 ; break; -case 990 : nInt = 15 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_RANGER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 3 : nInt = 1 ; break; -case 4 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -case 20 : nInt = 9 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 32 : nInt = 1 ; break; -case 34 : nInt = -1 ; break; -case 35 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = 1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 199 : nInt = 6 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 201 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 261 : nInt = -1 ; break; -case 262 : nInt = -1 ; break; -case 263 : nInt = -1 ; break; -case 264 : nInt = -1 ; break; -case 265 : nInt = -1 ; break; -case 266 : nInt = -1 ; break; -case 267 : nInt = -1 ; break; -case 268 : nInt = -1 ; break; -case 269 : nInt = -1 ; break; -case 270 : nInt = -1 ; break; -case 271 : nInt = -1 ; break; -case 272 : nInt = -1 ; break; -case 273 : nInt = -1 ; break; -case 274 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 275 : nInt = -1 ; break; -case 276 : nInt = -1 ; break; -case 277 : nInt = -1 ; break; -case 278 : nInt = -1 ; break; -case 279 : nInt = -1 ; break; -case 280 : nInt = -1 ; break; -case 281 : nInt = -1 ; break; -case 284 : nInt = -1 ; break; -case 285 : nInt = -1 ; break; -case 286 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -case 374 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -case 587 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 747 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 754 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 855 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 956 : nInt = -1 ; break; -case 973 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 997 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_ROGUE: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -case 50 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 193 : nInt = -1 ; break; -case 195 : nInt = 3 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 206 : nInt = 2 ; break; -case 212 : nInt = -1 ; break; -case 221 : nInt = 1 ; break; -case 222 : nInt = -1 ; break; -case 223 : nInt = -1 ; break; -case 224 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -case 225 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 251 : nInt = 6 ; break; -case 252 : nInt = 11 ; break; -case 253 : nInt = 14 ; break; -case 254 : nInt = 17 ; break; -case 255 : nInt = 20 ; break; -case 259 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -case 345 : nInt = 3 ; break; -case 346 : nInt = 5 ; break; -case 347 : nInt = 7 ; break; -case 348 : nInt = 9 ; break; -case 349 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -case 350 : nInt = 13 ; break; -case 351 : nInt = 15 ; break; -case 352 : nInt = 17 ; break; -case 353 : nInt = 19 ; break; -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 586 : nInt = -1 ; break; -case 588 : nInt = -1 ; break; -case 589 : nInt = -1 ; break; -case 590 : nInt = -1 ; break; -case 591 : nInt = -1 ; break; -case 592 : nInt = -1 ; break; -case 593 : nInt = -1 ; break; -case 594 : nInt = -1 ; break; -case 595 : nInt = -1 ; break; -case 596 : nInt = -1 ; break; -case 597 : nInt = -1 ; break; -case 598 : nInt = -1 ; break; -case 599 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 601 : nInt = -1 ; break; -case 602 : nInt = -1 ; break; -case 603 : nInt = -1 ; break; -case 604 : nInt = -1 ; break; -case 605 : nInt = -1 ; break; -case 606 : nInt = -1 ; break; -case 607 : nInt = -1 ; break; -case 608 : nInt = -1 ; break; -case 609 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 748 : nInt = -1 ; break; -case 749 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 750 : nInt = -1 ; break; -case 751 : nInt = -1 ; break; -case 752 : nInt = -1 ; break; -case 753 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 834 : nInt = -1 ; break; -case 835 : nInt = -1 ; break; -case 836 : nInt = -1 ; break; -case 837 : nInt = -1 ; break; -case 838 : nInt = -1 ; break; -case 839 : nInt = -1 ; break; -case 840 : nInt = -1 ; break; -case 841 : nInt = -1 ; break; -case 842 : nInt = -1 ; break; -case 843 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 856 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 913 : nInt = -1 ; break; -case 914 : nInt = -1 ; break; -case 917 : nInt = -1 ; break; -case 918 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 974 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -case 1032 : nInt = 21 ; break; -case 1033 : nInt = 23 ; break; -case 1034 : nInt = 25 ; break; -case 1035 : nInt = 27 ; break; -case 1036 : nInt = 29 ; break; -case 1037 : nInt = 31 ; break; -case 1038 : nInt = 33 ; break; -case 1039 : nInt = 35 ; break; -case 1040 : nInt = 37 ; break; -case 1041 : nInt = 39 ; break; -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_SHADOWDANCER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 195 : nInt = 2 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -case 206 : nInt = 2 ; break; -case 212 : nInt = 10 ; break; -case 223 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -case 228 : nInt = 2 ; break; -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 252 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -case 433 : nInt = 1 ; break; -case 434 : nInt = 3 ; break; -case 435 : nInt = 3 ; break; -case 436 : nInt = 4 ; break; -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 585 : nInt = -1 ; break; -case 588 : nInt = -1 ; break; -case 589 : nInt = -1 ; break; -case 590 : nInt = -1 ; break; -case 591 : nInt = -1 ; break; -case 592 : nInt = -1 ; break; -case 593 : nInt = -1 ; break; -case 594 : nInt = -1 ; break; -case 595 : nInt = -1 ; break; -case 596 : nInt = -1 ; break; -case 597 : nInt = -1 ; break; -case 598 : nInt = -1 ; break; -case 599 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 601 : nInt = -1 ; break; -case 602 : nInt = -1 ; break; -case 603 : nInt = -1 ; break; -case 604 : nInt = -1 ; break; -case 605 : nInt = -1 ; break; -case 606 : nInt = -1 ; break; -case 607 : nInt = -1 ; break; -case 608 : nInt = -1 ; break; -case 609 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 748 : nInt = -1 ; break; -case 749 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 750 : nInt = -1 ; break; -case 751 : nInt = -1 ; break; -case 752 : nInt = -1 ; break; -case 753 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 856 : nInt = -1 ; break; -case 868 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 913 : nInt = -1 ; break; -case 914 : nInt = -1 ; break; -case 917 : nInt = -1 ; break; -case 918 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 980 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -case 1002 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_SHIFTER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -case 587 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 804 : nInt = -1 ; break; -case 805 : nInt = -1 ; break; -case 806 : nInt = -1 ; break; -case 807 : nInt = -1 ; break; -case 808 : nInt = -1 ; break; -case 809 : nInt = -1 ; break; -case 810 : nInt = -1 ; break; -case 811 : nInt = -1 ; break; -case 812 : nInt = -1 ; break; -case 813 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 872 : nInt = -1 ; break; -case 873 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 898 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 900 : nInt = 3 ; break; -case 901 : nInt = 5 ; break; -case 902 : nInt = 7 ; break; -case 903 : nInt = 10 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 986 : nInt = 11 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1060 : nInt = -1 ; break; -case 1061 : nInt = -1 ; break; -case 1062 : nInt = 4 ; break; -case 1063 : nInt = 7 ; break; -case 1064 : nInt = 10 ; break; -case 1065 : nInt = 16 ; break; -case 1066 : nInt = 13 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_SORCERER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 35 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -case 303 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 533 : nInt = -1 ; break; -case 534 : nInt = -1 ; break; -case 535 : nInt = -1 ; break; -case 536 : nInt = -1 ; break; -case 537 : nInt = -1 ; break; -case 538 : nInt = -1 ; break; -case 539 : nInt = -1 ; break; -case 540 : nInt = -1 ; break; -case 541 : nInt = -1 ; break; -case 542 : nInt = -1 ; break; -case 543 : nInt = -1 ; break; -case 544 : nInt = -1 ; break; -case 545 : nInt = -1 ; break; -case 546 : nInt = -1 ; break; -case 547 : nInt = -1 ; break; -case 548 : nInt = -1 ; break; -case 549 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -case 550 : nInt = -1 ; break; -case 551 : nInt = -1 ; break; -case 552 : nInt = -1 ; break; -case 553 : nInt = -1 ; break; -case 554 : nInt = -1 ; break; -case 555 : nInt = -1 ; break; -case 556 : nInt = -1 ; break; -case 557 : nInt = -1 ; break; -case 558 : nInt = -1 ; break; -case 559 : nInt = -1 ; break; -case 560 : nInt = -1 ; break; -case 561 : nInt = -1 ; break; -case 562 : nInt = -1 ; break; -case 563 : nInt = -1 ; break; -case 564 : nInt = -1 ; break; -case 565 : nInt = -1 ; break; -case 566 : nInt = -1 ; break; -case 567 : nInt = -1 ; break; -case 568 : nInt = -1 ; break; -case 569 : nInt = -1 ; break; -case 570 : nInt = -1 ; break; -case 571 : nInt = -1 ; break; -case 572 : nInt = -1 ; break; -case 573 : nInt = -1 ; break; -case 574 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 575 : nInt = -1 ; break; -case 576 : nInt = -1 ; break; -case 577 : nInt = -1 ; break; -case 578 : nInt = -1 ; break; -case 579 : nInt = -1 ; break; -case 580 : nInt = -1 ; break; -case 581 : nInt = -1 ; break; -case 582 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 764 : nInt = -1 ; break; -case 765 : nInt = -1 ; break; -case 766 : nInt = -1 ; break; -case 767 : nInt = -1 ; break; -case 768 : nInt = -1 ; break; -case 769 : nInt = -1 ; break; -case 770 : nInt = -1 ; break; -case 771 : nInt = -1 ; break; -case 772 : nInt = -1 ; break; -case 773 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 874 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 875 : nInt = 21 ; break; -case 876 : nInt = 21 ; break; -case 877 : nInt = 21 ; break; -case 878 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ - default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 975 : nInt = 21 ; break; -case 990 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_WIZARD: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 7 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -case 11 : nInt = -1 ; break; -case 12 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 25 : nInt = -1 ; break; -case 29 : nInt = -1 ; break; -case 33 : nInt = -1 ; break; -case 35 : nInt = -1 ; break; -case 36 : nInt = -1 ; break; -case 37 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -case 51 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -case 166 : nInt = -1 ; break; -case 167 : nInt = -1 ; break; -case 168 : nInt = -1 ; break; -case 169 : nInt = -1 ; break; -case 170 : nInt = -1 ; break; -case 171 : nInt = -1 ; break; -case 172 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -case 303 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -case 393 : nInt = -1 ; break; -case 394 : nInt = -1 ; break; -case 395 : nInt = -1 ; break; -case 396 : nInt = -1 ; break; -case 397 : nInt = -1 ; break; -case 398 : nInt = -1 ; break; -case 399 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -case 400 : nInt = -1 ; break; -case 401 : nInt = -1 ; break; -case 415 : nInt = -1 ; break; -case 416 : nInt = -1 ; break; -case 417 : nInt = -1 ; break; -case 418 : nInt = -1 ; break; -case 419 : nInt = -1 ; break; -case 420 : nInt = -1 ; break; -case 421 : nInt = -1 ; break; -case 422 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 491 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 610 : nInt = -1 ; break; -case 611 : nInt = -1 ; break; -case 612 : nInt = -1 ; break; -case 613 : nInt = -1 ; break; -case 614 : nInt = -1 ; break; -case 615 : nInt = -1 ; break; -case 616 : nInt = -1 ; break; -case 617 : nInt = -1 ; break; -case 618 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 794 : nInt = -1 ; break; -case 795 : nInt = -1 ; break; -case 796 : nInt = -1 ; break; -case 797 : nInt = -1 ; break; -case 798 : nInt = -1 ; break; -case 799 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -case 800 : nInt = -1 ; break; -case 801 : nInt = -1 ; break; -case 802 : nInt = -1 ; break; -case 803 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 857 : nInt = -1 ; break; -case 858 : nInt = -1 ; break; -case 859 : nInt = -1 ; break; -case 860 : nInt = -1 ; break; -case 861 : nInt = -1 ; break; -case 862 : nInt = -1 ; break; -case 863 : nInt = -1 ; break; -case 864 : nInt = -1 ; break; -case 865 : nInt = -1 ; break; -case 874 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 875 : nInt = 21 ; break; -case 876 : nInt = 21 ; break; -case 877 : nInt = 21 ; break; -case 878 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 944 : nInt = 3 ; break; -case 945 : nInt = 1 ; break; -case 946 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 976 : nInt = 21 ; break; -case 990 : nInt = 21 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_WEAPON_MASTER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ - -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -case 490 : nInt = -1 ; break; -case 491 : nInt = -1 ; break; -case 492 : nInt = -1 ; break; -case 493 : nInt = -1 ; break; -case 494 : nInt = -1 ; break; -case 495 : nInt = -1 ; break; -case 496 : nInt = -1 ; break; -case 497 : nInt = -1 ; break; -case 498 : nInt = -1 ; break; -case 499 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -case 500 : nInt = -1 ; break; -case 501 : nInt = -1 ; break; -case 502 : nInt = -1 ; break; -case 503 : nInt = -1 ; break; -case 504 : nInt = -1 ; break; -case 505 : nInt = -1 ; break; -case 506 : nInt = -1 ; break; -case 507 : nInt = -1 ; break; -case 508 : nInt = -1 ; break; -case 509 : nInt = -1 ; break; -case 510 : nInt = -1 ; break; -case 511 : nInt = -1 ; break; -case 512 : nInt = -1 ; break; -case 513 : nInt = -1 ; break; -case 514 : nInt = -1 ; break; -case 515 : nInt = -1 ; break; -case 516 : nInt = -1 ; break; -case 517 : nInt = -1 ; break; -case 518 : nInt = -1 ; break; -case 519 : nInt = -1 ; break; -case 520 : nInt = -1 ; break; -case 521 : nInt = -1 ; break; -case 522 : nInt = -1 ; break; -case 523 : nInt = -1 ; break; -case 524 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -case 525 : nInt = -1 ; break; -case 526 : nInt = -1 ; break; -case 527 : nInt = -1 ; break; -case 528 : nInt = -1 ; break; -case 529 : nInt = -1 ; break; -case 530 : nInt = -1 ; break; -case 531 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 584 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 619 : nInt = -1 ; break; -case 620 : nInt = -1 ; break; -case 621 : nInt = -1 ; break; -case 622 : nInt = -1 ; break; -case 623 : nInt = -1 ; break; -case 624 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -case 625 : nInt = -1 ; break; -case 626 : nInt = -1 ; break; -case 627 : nInt = -1 ; break; -case 628 : nInt = -1 ; break; -case 629 : nInt = -1 ; break; -case 630 : nInt = -1 ; break; -case 631 : nInt = -1 ; break; -case 632 : nInt = -1 ; break; -case 633 : nInt = -1 ; break; -case 634 : nInt = -1 ; break; -case 635 : nInt = -1 ; break; -case 636 : nInt = -1 ; break; -case 637 : nInt = -1 ; break; -case 638 : nInt = -1 ; break; -case 639 : nInt = -1 ; break; -case 640 : nInt = -1 ; break; -case 641 : nInt = -1 ; break; -case 642 : nInt = -1 ; break; -case 643 : nInt = -1 ; break; -case 644 : nInt = -1 ; break; -case 645 : nInt = -1 ; break; -case 646 : nInt = -1 ; break; -case 647 : nInt = -1 ; break; -case 648 : nInt = -1 ; break; -case 649 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -case 650 : nInt = -1 ; break; -case 651 : nInt = -1 ; break; -case 652 : nInt = -1 ; break; -case 653 : nInt = -1 ; break; -case 654 : nInt = -1 ; break; -case 655 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -case 709 : nInt = -1 ; break; -case 710 : nInt = -1 ; break; -case 711 : nInt = -1 ; break; -case 712 : nInt = -1 ; break; -case 713 : nInt = -1 ; break; -case 714 : nInt = -1 ; break; -case 715 : nInt = -1 ; break; -case 716 : nInt = -1 ; break; -case 717 : nInt = -1 ; break; -case 718 : nInt = -1 ; break; -case 719 : nInt = -1 ; break; -case 720 : nInt = -1 ; break; -case 721 : nInt = -1 ; break; -case 722 : nInt = -1 ; break; -case 723 : nInt = -1 ; break; -case 724 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -case 725 : nInt = -1 ; break; -case 726 : nInt = -1 ; break; -case 727 : nInt = -1 ; break; -case 728 : nInt = -1 ; break; -case 729 : nInt = -1 ; break; -case 730 : nInt = -1 ; break; -case 731 : nInt = -1 ; break; -case 732 : nInt = -1 ; break; -case 733 : nInt = -1 ; break; -case 734 : nInt = -1 ; break; -case 735 : nInt = -1 ; break; -case 736 : nInt = -1 ; break; -case 737 : nInt = -1 ; break; -case 738 : nInt = -1 ; break; -case 739 : nInt = -1 ; break; -case 740 : nInt = -1 ; break; -case 741 : nInt = -1 ; break; -case 742 : nInt = -1 ; break; -case 743 : nInt = -1 ; break; -case 744 : nInt = -1 ; break; -case 745 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 753 : nInt = -1 ; break; -case 754 : nInt = -1 ; break; -case 755 : nInt = -1 ; break; -case 756 : nInt = -1 ; break; -case 757 : nInt = -1 ; break; -case 758 : nInt = -1 ; break; -case 759 : nInt = -1 ; break; -case 760 : nInt = -1 ; break; -case 761 : nInt = -1 ; break; -case 762 : nInt = -1 ; break; -case 763 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 854 : nInt = -1 ; break; -case 868 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -case 879 : nInt = 1 ; break; -case 880 : nInt = 1 ; break; -case 881 : nInt = 1 ; break; -case 882 : nInt = 1 ; break; -case 883 : nInt = 5 ; break; -case 884 : nInt = 5 ; break; -case 885 : nInt = 7 ; break; -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 919 : nInt = 1 ; break; -case 920 : nInt = 1 ; break; -case 921 : nInt = 1 ; break; -case 922 : nInt = 1 ; break; -case 923 : nInt = 1 ; break; -case 924 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -case 925 : nInt = 1 ; break; -case 926 : nInt = 1 ; break; -case 927 : nInt = 1 ; break; -case 928 : nInt = 1 ; break; -case 929 : nInt = 1 ; break; -case 930 : nInt = 1 ; break; -case 931 : nInt = 1 ; break; -case 932 : nInt = 1 ; break; -case 933 : nInt = 1 ; break; -case 934 : nInt = 1 ; break; -case 935 : nInt = 1 ; break; -case 936 : nInt = 1 ; break; -case 937 : nInt = 1 ; break; -case 938 : nInt = 1 ; break; -case 939 : nInt = 1 ; break; -case 940 : nInt = 1 ; break; -case 941 : nInt = 1 ; break; -case 942 : nInt = 1 ; break; -case 943 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -case 955 : nInt = -1 ; break; -case 956 : nInt = -1 ; break; -case 958 : nInt = -1 ; break; -case 959 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -case 983 : nInt = 11 ; break; -case 996 : nInt = -1 ; break; -case 997 : nInt = -1 ; break; -case 999 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -case 1000 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -case 1071 : nInt = 13 ; break; -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - case CLASS_TYPE_HARPER: - switch(nFeat/250) - { - case 0: - switch(nFeat/25) - { - case 0: //0-24 - switch(nFeat){ -case 1 : nInt = -1 ; break; -case 3 : nInt = 1 ; break; -case 8 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 1: //25-49 - switch(nFeat){ -case 29 : nInt = -1 ; break; -case 41 : nInt = -1 ; break; -case 44 : nInt = -1 ; break; -case 45 : nInt = -1 ; break; -case 46 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 2: //50-74 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 3: //75-99 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 4: //100-124 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 5: //125-149 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 6: //150-174 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 7: //175-199 - switch(nFeat){ -case 197 : nInt = 1 ; break; -default : nInt = -2 ; break;}; break; - case 8: //200-224 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 9: //225-249 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//250 break - case 1: - switch(nFeat/25) - { - case 10: //250-274 - switch(nFeat){ -case 261 : nInt = -1 ; break; -case 262 : nInt = -1 ; break; -case 263 : nInt = -1 ; break; -case 264 : nInt = -1 ; break; -case 265 : nInt = -1 ; break; -case 266 : nInt = -1 ; break; -case 267 : nInt = -1 ; break; -case 268 : nInt = -1 ; break; -case 269 : nInt = -1 ; break; -case 270 : nInt = -1 ; break; -case 271 : nInt = -1 ; break; -case 272 : nInt = -1 ; break; -case 273 : nInt = -1 ; break; -case 274 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 11: //275-299 - switch(nFeat){ -case 275 : nInt = -1 ; break; -case 276 : nInt = -1 ; break; -case 277 : nInt = -1 ; break; -case 278 : nInt = -1 ; break; -case 279 : nInt = -1 ; break; -case 280 : nInt = -1 ; break; -case 281 : nInt = -1 ; break; -case 284 : nInt = -1 ; break; -case 285 : nInt = -1 ; break; -case 286 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 12: //300-324 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 13: //325-349 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 14: //350-374 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 15: //375-399 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 16: //400-424 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 17: //425-449 - switch(nFeat){ -case 437 : nInt = 2 ; break; -case 438 : nInt = 3 ; break; -case 439 : nInt = 4 ; break; -case 440 : nInt = 5 ; break; -case 441 : nInt = 2 ; break; -case 442 : nInt = 3 ; break; -case 443 : nInt = 4 ; break; -case 444 : nInt = 5 ; break; -default : nInt = -2 ; break;}; break; - case 18: //450-474 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 19: //475-499 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//500 break - case 2: - switch(nFeat/25) - { - case 20: //500-524 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 21: //525-549 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 22: //550-574 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 23: //575-599 - switch(nFeat){ -case 588 : nInt = -1 ; break; -case 589 : nInt = -1 ; break; -case 590 : nInt = -1 ; break; -case 591 : nInt = -1 ; break; -case 592 : nInt = -1 ; break; -case 593 : nInt = -1 ; break; -case 594 : nInt = -1 ; break; -case 595 : nInt = -1 ; break; -case 596 : nInt = -1 ; break; -case 597 : nInt = -1 ; break; -case 598 : nInt = -1 ; break; -case 599 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 24: //600-624 - switch(nFeat){ -case 601 : nInt = -1 ; break; -case 602 : nInt = -1 ; break; -case 603 : nInt = -1 ; break; -case 604 : nInt = -1 ; break; -case 605 : nInt = -1 ; break; -case 606 : nInt = -1 ; break; -case 607 : nInt = -1 ; break; -case 608 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 25: //625-649 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 26: //650-674 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 27: //675-699 - switch(nFeat){ -case 695 : nInt = -1 ; break; -case 696 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 28: //700-724 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 29: //725-749 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//750 break - case 3: - switch(nFeat/25) - { - case 30: //750-774 - switch(nFeat){ -case 764 : nInt = -1 ; break; -case 765 : nInt = -1 ; break; -case 766 : nInt = -1 ; break; -case 767 : nInt = -1 ; break; -case 768 : nInt = -1 ; break; -case 769 : nInt = -1 ; break; -case 770 : nInt = -1 ; break; -case 771 : nInt = -1 ; break; -case 772 : nInt = -1 ; break; -case 773 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 31: //775-799 - switch(nFeat){ -case 784 : nInt = -1 ; break; -case 785 : nInt = -1 ; break; -case 786 : nInt = -1 ; break; -case 787 : nInt = -1 ; break; -case 788 : nInt = -1 ; break; -case 789 : nInt = -1 ; break; -case 790 : nInt = -1 ; break; -case 791 : nInt = -1 ; break; -case 792 : nInt = -1 ; break; -case 793 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 32: //800-824 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 33: //825-849 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 34: //850-874 - switch(nFeat){ -case 870 : nInt = -1 ; break; -case 871 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 35: //875-899 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 36: //900-924 - switch(nFeat){ -case 913 : nInt = -1 ; break; -case 914 : nInt = -1 ; break; -case 917 : nInt = -1 ; break; -case 918 : nInt = -1 ; break; -default : nInt = -2 ; break;}; break; - case 37: //925-949 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 38: //950-974 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 39: //975-999 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1000 break - case 4: - switch(nFeat/25) - { - case 40: //1000-1024 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 41: //1025-1049 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - case 42: //1050-1071 - switch(nFeat){ -default : nInt = -2 ; break;}; break; - } - break;//1071 end break - } - return nInt; break;//class switch break///////////////////////////////// - default: return -3;//wrong class int was input -} -return -3;//wrong input type -} - -int GetIsGeneralFeat(int nFeat) -{ -int nReturn = FALSE; -if (nFeat < 250) - { - if (nFeat < 50) - { - if (nFeat < 10) - { - switch (nFeat) - { -case 0: nReturn = TRUE; break; -case 2: nReturn = TRUE; break; -case 3: nReturn = TRUE; break; -case 4: nReturn = TRUE; break; -case 5: nReturn = TRUE; break; -case 6: nReturn = TRUE; break; -case 7: nReturn = TRUE; break; -case 9: nReturn = TRUE; break; - } - } - else if (nFeat < 20) - { - switch (nFeat) - { -case 10: nReturn = TRUE; break; -case 11: nReturn = TRUE; break; -case 12: nReturn = TRUE; break; -case 14: nReturn = TRUE; break; -case 15: nReturn = TRUE; break; -case 16: nReturn = TRUE; break; -case 17: nReturn = TRUE; break; -case 18: nReturn = TRUE; break; -case 19: nReturn = TRUE; break; - } - } - else if (nFeat < 30) - { - switch (nFeat) - { -case 20: nReturn = TRUE; break; -case 21: nReturn = TRUE; break; -case 22: nReturn = TRUE; break; -case 23: nReturn = TRUE; break; -case 24: nReturn = TRUE; break; -case 25: nReturn = TRUE; break; -case 26: nReturn = TRUE; break; -case 27: nReturn = TRUE; break; -case 28: nReturn = TRUE; break; - } - } - else if (nFeat < 40) - { - switch (nFeat) - { -case 30: nReturn = TRUE; break; -case 31: nReturn = TRUE; break; -case 32: nReturn = TRUE; break; -case 33: nReturn = TRUE; break; -case 36: nReturn = TRUE; break; -case 37: nReturn = TRUE; break; -case 39: nReturn = TRUE; break; - } - } - else //<50 - { - switch (nFeat) - { -case 40: nReturn = TRUE; break; -case 42: nReturn = TRUE; break; -case 43: nReturn = TRUE; break; - } - } - } - else if (nFeat < 100) - { - if (nFeat < 60) - { - switch (nFeat) - { -case 52: nReturn = TRUE; break; -case 53: nReturn = TRUE; break; -case 54: nReturn = TRUE; break; -case 55: nReturn = TRUE; break; -case 56: nReturn = TRUE; break; -case 57: nReturn = TRUE; break; -case 58: nReturn = TRUE; break; -case 59: nReturn = TRUE; break; - } - } - else if (nFeat < 70) - { - switch (nFeat) - { -case 60: nReturn = TRUE; break; -case 61: nReturn = TRUE; break; -case 62: nReturn = TRUE; break; -case 63: nReturn = TRUE; break; -case 64: nReturn = TRUE; break; -case 65: nReturn = TRUE; break; -case 66: nReturn = TRUE; break; -case 67: nReturn = TRUE; break; -case 68: nReturn = TRUE; break; -case 69: nReturn = TRUE; break; - } - } - else if (nFeat < 80) - { - switch (nFeat) - { -case 70: nReturn = TRUE; break; -case 71: nReturn = TRUE; break; -case 72: nReturn = TRUE; break; -case 73: nReturn = TRUE; break; -case 74: nReturn = TRUE; break; -case 75: nReturn = TRUE; break; -case 76: nReturn = TRUE; break; -case 77: nReturn = TRUE; break; -case 78: nReturn = TRUE; break; -case 79: nReturn = TRUE; break; - } - } - else if (nFeat < 90) - { - switch (nFeat) - { -case 80: nReturn = TRUE; break; -case 82: nReturn = TRUE; break; -case 83: nReturn = TRUE; break; -case 84: nReturn = TRUE; break; -case 85: nReturn = TRUE; break; -case 87: nReturn = TRUE; break; -case 88: nReturn = TRUE; break; -case 89: nReturn = TRUE; break; - } - } - else //<100 - { - switch (nFeat) - { -case 90: nReturn = TRUE; break; -case 91: nReturn = TRUE; break; -case 92: nReturn = TRUE; break; -case 93: nReturn = TRUE; break; -case 94: nReturn = TRUE; break; -case 95: nReturn = TRUE; break; -case 96: nReturn = TRUE; break; -case 97: nReturn = TRUE; break; -case 98: nReturn = TRUE; break; -case 99: nReturn = TRUE; break; - } - } - } - else if (nFeat < 150) - { - if (nFeat < 110) - { - switch (nFeat) - { -case 100: nReturn = TRUE; break; -case 101: nReturn = TRUE; break; -case 102: nReturn = TRUE; break; -case 103: nReturn = TRUE; break; -case 104: nReturn = TRUE; break; -case 105: nReturn = TRUE; break; -case 106: nReturn = TRUE; break; -case 107: nReturn = TRUE; break; -case 108: nReturn = TRUE; break; -case 109: nReturn = TRUE; break; - } - } - else if (nFeat < 120) - { - switch (nFeat) - { -case 110: nReturn = TRUE; break; -case 111: nReturn = TRUE; break; -case 112: nReturn = TRUE; break; -case 113: nReturn = TRUE; break; -case 114: nReturn = TRUE; break; -case 115: nReturn = TRUE; break; -case 116: nReturn = TRUE; break; -case 117: nReturn = TRUE; break; -case 118: nReturn = TRUE; break; - } - } - else - { - switch (nFeat) - { -case 120: nReturn = TRUE; break; -case 121: nReturn = TRUE; break; -case 122: nReturn = TRUE; break; -case 123: nReturn = TRUE; break; -case 125: nReturn = TRUE; break; -case 126: nReturn = TRUE; break; -case 127: nReturn = TRUE; break; - } - } - } - else - { - if (nFeat < 180) - { - switch (nFeat) - { -case 173: nReturn = TRUE; break; -case 174: nReturn = TRUE; break; -case 175: nReturn = TRUE; break; -case 177: nReturn = TRUE; break; -case 178: nReturn = TRUE; break; -case 179: nReturn = TRUE; break; - } - } - else if (nFeat < 190) - { - switch (nFeat) - { -case 180: nReturn = TRUE; break; -case 181: nReturn = TRUE; break; -case 182: nReturn = TRUE; break; -case 183: nReturn = TRUE; break; -case 184: nReturn = TRUE; break; -case 185: nReturn = TRUE; break; -case 186: nReturn = TRUE; break; -case 187: nReturn = TRUE; break; -case 188: nReturn = TRUE; break; -case 189: nReturn = TRUE; break; - } - } - else //<200 - { - switch (nFeat) - { -case 190: nReturn = TRUE; break; -case 192: nReturn = TRUE; break; - - } - } - } - } -else if (nFeat < 500) - { - if (nFeat < 400) - { - if (nFeat < 380) - { - switch (nFeat) - { -case 377: nReturn = TRUE; break; -case 378: nReturn = TRUE; break; -case 379: nReturn = TRUE; break; - } - } - else if (nFeat < 390) - { - switch (nFeat) - { -case 380: nReturn = TRUE; break; -case 381: nReturn = TRUE; break; -case 382: nReturn = TRUE; break; -case 383: nReturn = TRUE; break; -case 384: nReturn = TRUE; break; -//case 385: nReturn = TRUE; break;//this is feat "Small Talk", deleted in NWN -case 386: nReturn = TRUE; break; -case 387: nReturn = TRUE; break; -case 388: nReturn = TRUE; break; -case 389: nReturn = TRUE; break; - } - } - else //<400 - { - switch (nFeat) - { -case 390: nReturn = TRUE; break; -case 391: nReturn = TRUE; break; -case 392: nReturn = TRUE; break; -case 393: nReturn = TRUE; break; -case 394: nReturn = TRUE; break; -case 395: nReturn = TRUE; break; -case 396: nReturn = TRUE; break; -case 397: nReturn = TRUE; break; -case 398: nReturn = TRUE; break; -case 399: nReturn = TRUE; break; - } - } - } - else if (nFeat < 450) - { - if (nFeat < 410) - { - switch (nFeat) - { -case 400: nReturn = TRUE; break; -case 401: nReturn = TRUE; break; -case 402: nReturn = TRUE; break; -//case 403: nReturn = TRUE; break;//this is feat "Mercantile Background", deleted in NWN -case 404: nReturn = TRUE; break; -case 406: nReturn = TRUE; break; -case 407: nReturn = TRUE; break; -case 408: nReturn = TRUE; break; -case 409: nReturn = TRUE; break; - } - } - else if (nFeat < 420) - { - switch (nFeat) - { -case 410: nReturn = TRUE; break; -case 411: nReturn = TRUE; break; -case 412: nReturn = TRUE; break; -case 415: nReturn = TRUE; break; -case 416: nReturn = TRUE; break; -case 417: nReturn = TRUE; break; -case 418: nReturn = TRUE; break; -case 419: nReturn = TRUE; break; - } - } - else if (nFeat < 430) - { - switch (nFeat) - { -case 420: nReturn = TRUE; break; -case 421: nReturn = TRUE; break; -case 422: nReturn = TRUE; break; -case 425: nReturn = TRUE; break; -case 426: nReturn = TRUE; break; -case 427: nReturn = TRUE; break; -case 428: nReturn = TRUE; break; -case 429: nReturn = TRUE; break; - } - } - else if (nFeat < 440) - { - switch (nFeat) - { -case 430: nReturn = TRUE; break; -case 431: nReturn = TRUE; break; - } - } - } - else //<500 - { - switch (nFeat) - { -case 490: nReturn = TRUE; break; -case 492: nReturn = TRUE; break; -case 493: nReturn = TRUE; break; -case 494: nReturn = TRUE; break; -case 495: nReturn = TRUE; break; -case 496: nReturn = TRUE; break; -case 497: nReturn = TRUE; break; -case 498: nReturn = TRUE; break; -case 499: nReturn = TRUE; break; - } - } - } -else if (nFeat < 750) - { - if (nFeat < 550) - { - if (nFeat < 510) - { - switch (nFeat) - { -case 500: nReturn = TRUE; break; -case 501: nReturn = TRUE; break; -case 502: nReturn = TRUE; break; -case 503: nReturn = TRUE; break; -case 504: nReturn = TRUE; break; -case 505: nReturn = TRUE; break; -case 506: nReturn = TRUE; break; -case 507: nReturn = TRUE; break; -case 508: nReturn = TRUE; break; -case 509: nReturn = TRUE; break; - } - } - else if (nFeat < 520) - { - switch (nFeat) - { -case 510: nReturn = TRUE; break; -case 511: nReturn = TRUE; break; -case 512: nReturn = TRUE; break; -case 513: nReturn = TRUE; break; -case 514: nReturn = TRUE; break; -case 515: nReturn = TRUE; break; -case 516: nReturn = TRUE; break; -case 517: nReturn = TRUE; break; -case 518: nReturn = TRUE; break; -case 519: nReturn = TRUE; break; - } - } - else if (nFeat < 530) - { - switch (nFeat) - { -case 520: nReturn = TRUE; break; -case 521: nReturn = TRUE; break; -case 522: nReturn = TRUE; break; -case 523: nReturn = TRUE; break; -case 524: nReturn = TRUE; break; -case 525: nReturn = TRUE; break; -case 526: nReturn = TRUE; break; -case 527: nReturn = TRUE; break; -case 528: nReturn = TRUE; break; -case 529: nReturn = TRUE; break; - } - } - else if (nFeat < 540) - { - switch (nFeat) - { -case 530: nReturn = TRUE; break; -case 531: nReturn = TRUE; break; -case 533: nReturn = TRUE; break; -case 534: nReturn = TRUE; break; -case 535: nReturn = TRUE; break; -case 536: nReturn = TRUE; break; -case 537: nReturn = TRUE; break; -case 538: nReturn = TRUE; break; -case 539: nReturn = TRUE; break; - } - } - else //<550 - { - switch (nFeat) - { -case 540: nReturn = TRUE; break; -case 541: nReturn = TRUE; break; -case 542: nReturn = TRUE; break; -case 543: nReturn = TRUE; break; -case 544: nReturn = TRUE; break; -case 545: nReturn = TRUE; break; -case 546: nReturn = TRUE; break; -case 547: nReturn = TRUE; break; -case 548: nReturn = TRUE; break; -case 549: nReturn = TRUE; break; - } - } - } - else if (nFeat < 600) - { - if (nFeat < 560) - { - switch (nFeat) - { -case 550: nReturn = TRUE; break; -case 551: nReturn = TRUE; break; -case 552: nReturn = TRUE; break; -case 553: nReturn = TRUE; break; -case 554: nReturn = TRUE; break; -case 555: nReturn = TRUE; break; -case 556: nReturn = TRUE; break; -case 557: nReturn = TRUE; break; -case 558: nReturn = TRUE; break; -case 559: nReturn = TRUE; break; - } - } - else if (nFeat < 570) - { - switch (nFeat) - { -case 560: nReturn = TRUE; break; -case 561: nReturn = TRUE; break; -case 562: nReturn = TRUE; break; -case 563: nReturn = TRUE; break; -case 564: nReturn = TRUE; break; -case 565: nReturn = TRUE; break; -case 566: nReturn = TRUE; break; -case 567: nReturn = TRUE; break; -case 568: nReturn = TRUE; break; -case 569: nReturn = TRUE; break; - } - } - else if (nFeat < 580) - { - switch (nFeat) - { -case 570: nReturn = TRUE; break; -case 571: nReturn = TRUE; break; -case 572: nReturn = TRUE; break; -case 573: nReturn = TRUE; break; -case 574: nReturn = TRUE; break; -case 575: nReturn = TRUE; break; -case 576: nReturn = TRUE; break; -case 577: nReturn = TRUE; break; -case 578: nReturn = TRUE; break; -case 579: nReturn = TRUE; break; - } - } - else if (nFeat < 590) - { - switch (nFeat) - { -case 580: nReturn = TRUE; break; -case 581: nReturn = TRUE; break; -case 582: nReturn = TRUE; break; -case 583: nReturn = TRUE; break; -case 584: nReturn = TRUE; break; -case 585: nReturn = TRUE; break; -case 586: nReturn = TRUE; break; -case 588: nReturn = TRUE; break; -case 589: nReturn = TRUE; break; - } - } - else //<600 - { - switch (nFeat) - { -case 590: nReturn = TRUE; break; -case 591: nReturn = TRUE; break; -case 592: nReturn = TRUE; break; -case 593: nReturn = TRUE; break; -case 594: nReturn = TRUE; break; -case 595: nReturn = TRUE; break; -case 596: nReturn = TRUE; break; -case 597: nReturn = TRUE; break; -case 598: nReturn = TRUE; break; -case 599: nReturn = TRUE; break; - } - } - } - else if (nFeat < 650) - { - if (nFeat < 610) - { - switch (nFeat) - { -case 601: nReturn = TRUE; break; -case 602: nReturn = TRUE; break; -case 603: nReturn = TRUE; break; -case 604: nReturn = TRUE; break; -case 605: nReturn = TRUE; break; -case 606: nReturn = TRUE; break; -case 607: nReturn = TRUE; break; -case 608: nReturn = TRUE; break; - } - } - else if (nFeat < 620) - { - switch (nFeat) - { -case 610: nReturn = TRUE; break; -case 611: nReturn = TRUE; break; -case 612: nReturn = TRUE; break; -case 613: nReturn = TRUE; break; -case 614: nReturn = TRUE; break; -case 615: nReturn = TRUE; break; -case 616: nReturn = TRUE; break; -case 617: nReturn = TRUE; break; -case 619: nReturn = TRUE; break; - } - } - else if (nFeat < 630) - { - switch (nFeat) - { -case 620: nReturn = TRUE; break; -case 621: nReturn = TRUE; break; -case 622: nReturn = TRUE; break; -case 623: nReturn = TRUE; break; -case 624: nReturn = TRUE; break; -case 625: nReturn = TRUE; break; -case 626: nReturn = TRUE; break; -case 627: nReturn = TRUE; break; -case 628: nReturn = TRUE; break; -case 629: nReturn = TRUE; break; - } - } - else if (nFeat < 640) - { - switch (nFeat) - { -case 630: nReturn = TRUE; break; -case 631: nReturn = TRUE; break; -case 632: nReturn = TRUE; break; -case 633: nReturn = TRUE; break; -case 634: nReturn = TRUE; break; -case 635: nReturn = TRUE; break; -case 636: nReturn = TRUE; break; -case 637: nReturn = TRUE; break; -case 638: nReturn = TRUE; break; -case 639: nReturn = TRUE; break; - } - } - else //<650 - { - switch (nFeat) - { -case 640: nReturn = TRUE; break; -case 641: nReturn = TRUE; break; -case 642: nReturn = TRUE; break; -case 643: nReturn = TRUE; break; -case 644: nReturn = TRUE; break; -case 645: nReturn = TRUE; break; -case 646: nReturn = TRUE; break; -case 647: nReturn = TRUE; break; -case 648: nReturn = TRUE; break; -case 649: nReturn = TRUE; break; - } - } - } - else if (nFeat < 700) - { - if (nFeat < 660) - { - switch (nFeat) - { -case 650: nReturn = TRUE; break; -case 651: nReturn = TRUE; break; -case 652: nReturn = TRUE; break; -case 653: nReturn = TRUE; break; -case 654: nReturn = TRUE; break; -case 655: nReturn = TRUE; break; - } - } - else //<700 - { - switch (nFeat) - { -case 695: nReturn = TRUE; break; -case 696: nReturn = TRUE; break; - } - } - } - else //<750 - { - if (nFeat < 710) - { - switch (nFeat) - { -case 709: nReturn = TRUE; break; - } - } - else if (nFeat < 720) - { - switch (nFeat) - { -case 710: nReturn = TRUE; break; -case 711: nReturn = TRUE; break; -case 712: nReturn = TRUE; break; -case 713: nReturn = TRUE; break; -case 714: nReturn = TRUE; break; -case 715: nReturn = TRUE; break; -case 716: nReturn = TRUE; break; -case 717: nReturn = TRUE; break; -case 718: nReturn = TRUE; break; -case 719: nReturn = TRUE; break; - } - } - else if (nFeat < 730) - { - switch (nFeat) - { -case 720: nReturn = TRUE; break; -case 721: nReturn = TRUE; break; -case 722: nReturn = TRUE; break; -case 723: nReturn = TRUE; break; -case 724: nReturn = TRUE; break; -case 725: nReturn = TRUE; break; -case 726: nReturn = TRUE; break; -case 727: nReturn = TRUE; break; -case 728: nReturn = TRUE; break; -case 729: nReturn = TRUE; break; - } - } - else if (nFeat < 740) - { - switch (nFeat) - { -case 730: nReturn = TRUE; break; -case 731: nReturn = TRUE; break; -case 732: nReturn = TRUE; break; -case 733: nReturn = TRUE; break; -case 734: nReturn = TRUE; break; -case 735: nReturn = TRUE; break; -case 736: nReturn = TRUE; break; -case 737: nReturn = TRUE; break; -case 738: nReturn = TRUE; break; -case 739: nReturn = TRUE; break; - } - } - else //750 - { - switch (nFeat) - { -case 740: nReturn = TRUE; break; -case 741: nReturn = TRUE; break; -case 742: nReturn = TRUE; break; -case 743: nReturn = TRUE; break; -case 744: nReturn = TRUE; break; -case 745: nReturn = TRUE; break; -case 747: nReturn = TRUE; break; -case 748: nReturn = TRUE; break; -case 749: nReturn = TRUE; break; - } - } - } - } -else - { - if (nFeat < 800) - { - if (nFeat < 760) - { - switch (nFeat) - { -case 750: nReturn = TRUE; break; -case 751: nReturn = TRUE; break; -case 752: nReturn = TRUE; break; -case 753: nReturn = TRUE; break; -case 754: nReturn = TRUE; break; -case 755: nReturn = TRUE; break; -case 756: nReturn = TRUE; break; -case 757: nReturn = TRUE; break; -case 758: nReturn = TRUE; break; -case 759: nReturn = TRUE; break; - } - } - else if (nFeat < 770) - { - switch (nFeat) - { -case 760: nReturn = TRUE; break; -case 761: nReturn = TRUE; break; -case 762: nReturn = TRUE; break; -case 763: nReturn = TRUE; break; -case 764: nReturn = TRUE; break; -case 765: nReturn = TRUE; break; -case 766: nReturn = TRUE; break; -case 767: nReturn = TRUE; break; -case 768: nReturn = TRUE; break; -case 769: nReturn = TRUE; break; - } - } - else if (nFeat < 780) - { - switch (nFeat) - { -case 770: nReturn = TRUE; break; -case 771: nReturn = TRUE; break; -case 772: nReturn = TRUE; break; -case 773: nReturn = TRUE; break; -case 774: nReturn = TRUE; break; -case 775: nReturn = TRUE; break; -case 776: nReturn = TRUE; break; -case 777: nReturn = TRUE; break; -case 778: nReturn = TRUE; break; -case 779: nReturn = TRUE; break; - } - } - else if (nFeat < 790) - { - switch (nFeat) - { -case 780: nReturn = TRUE; break; -case 781: nReturn = TRUE; break; -case 782: nReturn = TRUE; break; -case 783: nReturn = TRUE; break; -case 784: nReturn = TRUE; break; -case 785: nReturn = TRUE; break; -case 786: nReturn = TRUE; break; -case 787: nReturn = TRUE; break; -case 788: nReturn = TRUE; break; -case 789: nReturn = TRUE; break; - } - } - else //<800 - { - switch (nFeat) - { -case 790: nReturn = TRUE; break; -case 791: nReturn = TRUE; break; -case 792: nReturn = TRUE; break; -case 793: nReturn = TRUE; break; -case 794: nReturn = TRUE; break; -case 795: nReturn = TRUE; break; -case 796: nReturn = TRUE; break; -case 797: nReturn = TRUE; break; -case 798: nReturn = TRUE; break; -case 799: nReturn = TRUE; break; - } - } - } - else if (nFeat < 850) - { - if (nFeat < 810) - { - switch (nFeat) - { -case 800: nReturn = TRUE; break; -case 801: nReturn = TRUE; break; -case 802: nReturn = TRUE; break; -case 803: nReturn = TRUE; break; -case 804: nReturn = TRUE; break; -case 805: nReturn = TRUE; break; -case 806: nReturn = TRUE; break; -case 807: nReturn = TRUE; break; -case 808: nReturn = TRUE; break; -case 809: nReturn = TRUE; break; - } - } - else if (nFeat < 820) - { - switch (nFeat) - { -case 810: nReturn = TRUE; break; -case 811: nReturn = TRUE; break; -case 812: nReturn = TRUE; break; -case 813: nReturn = TRUE; break; -case 814: nReturn = TRUE; break; -case 815: nReturn = TRUE; break; -case 816: nReturn = TRUE; break; -case 817: nReturn = TRUE; break; -case 818: nReturn = TRUE; break; -case 819: nReturn = TRUE; break; - } - } - else if (nFeat < 830) - { - switch (nFeat) - { -case 820: nReturn = TRUE; break; -case 821: nReturn = TRUE; break; -case 822: nReturn = TRUE; break; -case 823: nReturn = TRUE; break; - } - } - else //<850 - { - switch (nFeat) - { -case 844: nReturn = TRUE; break; - } - } - } - else if (nFeat < 900) - { - if (nFeat < 860) - { - switch (nFeat) - { -case 856: nReturn = TRUE; break; - } - } - else - { - switch (nFeat) - { -case 867: nReturn = TRUE; break; -case 868: nReturn = TRUE; break; - } - } - } - else if (nFeat < 950) - { - if (nFeat < 920) - { - switch (nFeat) - { -case 910: nReturn = TRUE; break; -case 911: nReturn = TRUE; break; -case 912: nReturn = TRUE; break; -case 913: nReturn = TRUE; break; -case 914: nReturn = TRUE; break; -case 915: nReturn = TRUE; break; -case 916: nReturn = TRUE; break; -case 917: nReturn = TRUE; break; -case 918: nReturn = TRUE; break; - } - } - } - else - { - if (nFeat < 960) - { - switch (nFeat) - { -case 952: nReturn = TRUE; break; -case 954: nReturn = TRUE; break; -case 955: nReturn = TRUE; break; -case 956: nReturn = TRUE; break; -case 958: nReturn = TRUE; break; - } - } - else //<1000 - { - switch (nFeat) - { -case 993: nReturn = TRUE; break; -case 995: nReturn = TRUE; break; -case 996: nReturn = TRUE; break; -case 997: nReturn = TRUE; break; -case 999: nReturn = TRUE; break; - } - } - } - } -return nReturn; -} - -//below used to compile -/* -void main() -{ - -} -*/ diff --git a/_removed files/hgll_const_inc.nss b/_removed files/hgll_const_inc.nss deleted file mode 100644 index d6e9f563..00000000 --- a/_removed files/hgll_const_inc.nss +++ /dev/null @@ -1,39 +0,0 @@ -// This lists all of the constant ints that are to be used for LL - -// This is the path to your servervault. It must be set correctly for Letoscript to work. -const string NWNPATH = "C:/NeverwinterNights/NWN/servervault/";//windows sample -// const string NWNPATH = "/home/funkyswerve/nwn/servervault/";//linux sample - -const int PHOENIX = FALSE;//set this to true if you are using the older version of Letoscript, 3-18, rather than the newer 3-24 (other versions are 'bridge' versions with bugs) - -const int DEBUG = FALSE;//set this to TRUE to enable debugging - -const int DEV_CRIT_DISABLED = FALSE;//set this to TRUE to disable devastating critical feat selection on levelup - -// Experience Requirements for Legendary Levels -// Adjust as desired. These were set by increasing the additional amount required for the -// previous level by 25%. Level 40 required 39000 experience points, so Level 41 was set -// to require 39000 x 1.25 = 48800 experience points. This will be ALOT on some worlds, -// and not enough on others, so adjust to suit your needs - -const int BASE_XP_LVL_40 = 780000; -const int XP_REQ_LVL41 = 821000; -const int XP_REQ_LVL42 = 863000; -const int XP_REQ_LVL43 = 900000; -const int XP_REQ_LVL44 = 100000; -const int XP_REQ_LVL45 = 1100000; -const int XP_REQ_LVL46 = 1200000; -const int XP_REQ_LVL47 = 1300000; -const int XP_REQ_LVL48 = 1400000; -const int XP_REQ_LVL49 = 1600000; -const int XP_REQ_LVL50 = 1800000; -const int XP_REQ_LVL51 = 2200000; -const int XP_REQ_LVL52 = 2400000; -const int XP_REQ_LVL53 = 2600000; -const int XP_REQ_LVL54 = 2800000; -const int XP_REQ_LVL55 = 3000000; -const int XP_REQ_LVL56 = 3400000; -const int XP_REQ_LVL57 = 3800000; -const int XP_REQ_LVL58 = 4200000; -const int XP_REQ_LVL59 = 4600000; -const int XP_REQ_LVL60 = 5000000; diff --git a/_removed files/hgll_featreq_inc.nss b/_removed files/hgll_featreq_inc.nss deleted file mode 100644 index bc104321..00000000 --- a/_removed files/hgll_featreq_inc.nss +++ /dev/null @@ -1,4202 +0,0 @@ -//--------------------------------DECLARATIONS--------------------------------// - -// This function determines what class controls the character's advancement during legendary -// levels. First it checks the character's It returns the class type with the most levels. -// If the character has two classes that tie for most number of levels, it will return the -// class the character took first. It returns -1 on an error. -int GetControlClass(object oPC); -// This function returns the cost of taking a certain skill based on the class. Return -// values are: 1 for class skill, 2 for cross-class skill, -1 for class forbidden skill (default), -// and -2 for CLASS_TYPE input error. The switches essentially reconstruct the 2da. They also -// conveniently mirror the skill chart order in the HotU book. This allows users to alter skill -// costs and availabilities, and is faster than a 2da or int cache lookup. -int GetCostOfSkill(int nClass, int nSkill); -// This function returns TRUE if the PC has the stat or stats required to take nFeat, -// or if nFeat has no required stats. -int GetAreFeatStatReqsMet(int nFeat, object oPC); -// This function returns TRUE if the PC has the skill or skills required to take nFeat, -// or if nFeat has no required skills. -int GetAreFeatSkillReqsMet(int nFeat, object oPC); -// This function returns TRUE if the PC has the feat or feats required to take nFeat, -// or if nFeat has no required feats. -int GetAreFeatFeatReqsMet(int nFeat, object oPC); -// This function returns TRUE if the feat is only available at first level. Returns -3 on error. -int GetIsFeatFirstLevelOnly(int nFeat); -// This function returns true if a feat is of the devastating critical type. -int GetIsFeatDevCrit(int nFeat); -// This function returns TRUE if the PC has the ability to cast spells of the level required -// by the feat specified. It returns TRUE if the feat has no spell level requirement, and -// always returns FALSE for Sap. -int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat); -// This function returns the name of the designated feat. -string GetNameOfFeat(int nFeat); -// This function returns TRUE if the feat is restricted to a limited number of uses per day. -int GetIsFeatLimitedUses(int nFeat); - -//----------------------------------FUNCTIONS---------------------------------// - -int GetControlClass(object oPC) -{ -int nL1 = GetLevelByPosition(1, oPC); -int nL2 = GetLevelByPosition(2, oPC); -int nL3 = GetLevelByPosition(3, oPC); -//class 1 highest -if ((nL1 > nL2) && (nL1 > nL3)) return GetClassByPosition(1, oPC); -//class 2 highest -else if ((nL2 > nL1) && (nL2 > nL3)) return GetClassByPosition(2, oPC); -//class 3 highest -else if ((nL3 > nL1) && (nL3 > nL2)) return GetClassByPosition(3, oPC); -//class 1 and 2 tied for highest -else if (nL1 == nL2) return GetClassByPosition(1, oPC); -//class 1 and 3 tied for highest -else if (nL1 == nL3) return GetClassByPosition(1, oPC); -//class 2 and 3 tied for highest -else if (nL2 == nL3) return GetClassByPosition(2, oPC); -//return -1 on error -else return -1; -} - -int GetCostOfSkill(int nClass, int nSkill) -{ -switch(nClass) //These switches essentially reconstruct the 2da. They also conveniently mirror - { //the skill chart order in the HotU book. This allows users to alter skill costs - //and availabilities as well, and is faster than a 2da or int cache lookup. - case 0://barbarian - switch(nSkill){ - case 0: return -1; break;//animal empathy - case 1: return 2; break;//concentration - case 2: return 2; break;//disable trap - case 3: return 1; break;//discipline - case 4: return 1; break;//heal - case 5: return 2; break;//hide - case 6: return 1; break;//listen - case 7: return 1; break;//lore - case 8: return 2; break;//move silently - case 9: return 2; break;//open lock - case 10: return 1; break;//parry - case 11: return -1; break;//perform - case 12: return 2; break;//persuade - case 13: return 2; break;//pick pocket - case 14: return 2; break;//search - case 15: return 2; break;//set trap - case 16: return 2; break;//spellcraft - case 17: return 2; break;//spot - case 18: return 1; break;//taunt - case 19: return -1; break;//UMD - case 20: return 2; break;//appraise - case 21: return 2; break;//tumble - case 22: return 1; break;//craft trap - case 23: return 2; break;//bluff - case 24: return 1; break;//intimidate - case 25: return 1; break;//craft armor - case 26: return 1; break;//craft weapon - default: return -1; - } - case 1://bard - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return 1; break;//perform - case 12: return 1; break; - case 13: return 1; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 1; break; - case 19: return 1; break;//UMD - case 20: return 1; break; - case 21: return 1; break; - case 22: return 1; break; - case 23: return 1; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 2://cleric - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 3://druid - switch(nSkill){ - case 0: return 1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 4://fighter - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 5://monk - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 1; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 6://paladin - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 2; break; - case 18: return 1; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 7://ranger - switch(nSkill){ - case 0: return 1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 1; break; - case 15: return 1; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 8://rogue - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 1; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 1; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 1; break; - case 14: return 1; break; - case 15: return 1; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return 1; break;//UMD - case 20: return 1; break; - case 21: return 1; break; - case 22: return 1; break; - case 23: return 1; break; - case 24: return 1; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 9://sorceror - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 10://wizard - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 27://shadowdancer - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 1; break; - case 14: return 1; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 1; break; - case 22: return 2; break; - case 23: return 1; break; - case 24: return 2; break; - case 25: return 2; break; - case 26: return 2; break; - default: return -1; - } - case 28://harper scout - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 1; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 1; break; - case 21: return 1; break; - case 22: return 1; break; - case 23: return 1; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 29://arcane archer - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 30://assassin - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 1; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 1; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 1; break; - case 14: return 1; break; - case 15: return 1; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return 1; break;//UMD - case 20: return 1; break; - case 21: return 1; break; - case 22: return 1; break; - case 23: return 1; break; - case 24: return 1; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 31://blackguard - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 2; break; - case 18: return 1; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 1; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 32://CoT - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 2; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 33://weaponmaster - switch(nSkill){ - case 0: return -1; break; - case 1: return 2; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 2; break; - case 23: return 2; break; - case 24: return 1; break; - case 25: return 2; break; - case 26: return 2; break; - default: return -1; - } - case 34://palemaster - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 1; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 2; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 35://shifter - switch(nSkill){ - case 0: return 1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 2; break; - case 4: return 1; break; - case 5: return 1; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 2; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 36://dwarven defender - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 2; break; - case 13: return 2; break; - case 14: return 2; break; - case 15: return 2; break; - case 16: return 2; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - case 37://dragon disciple - switch(nSkill){ - case 0: return -1; break; - case 1: return 1; break; - case 2: return 2; break; - case 3: return 1; break; - case 4: return 1; break; - case 5: return 2; break; - case 6: return 1; break; - case 7: return 1; break; - case 8: return 2; break; - case 9: return 2; break; - case 10: return 1; break; - case 11: return -1; break;//perform - case 12: return 1; break; - case 13: return 2; break; - case 14: return 1; break; - case 15: return 2; break; - case 16: return 1; break; - case 17: return 1; break; - case 18: return 2; break; - case 19: return -1; break;//UMD - case 20: return 2; break; - case 21: return 2; break; - case 22: return 1; break; - case 23: return 2; break; - case 24: return 2; break; - case 25: return 1; break; - case 26: return 1; break; - default: return -1; - } - default: return -2; - } -return -3; -} - -int GetAreFeatStatReqsMet(int nFeat, object oPC) -{ -int nStr = TRUE; -int nDex = TRUE; -int nCon = TRUE; -int nInt = TRUE; -int nWis = TRUE; -int nCha = TRUE; -if (nFeat < 495) - { - if (nFeat < 35) - { - switch(nFeat) - { -case 1: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; -case 6: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; -case 8: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; -case 9: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 10: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; -case 16: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 17: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 18: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 19: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; -case 26: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; -case 28: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; -case 30: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; - } - } - else - { - switch(nFeat) - { -case 38: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; -case 39: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; -case 389: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 390: nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 391: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); break; -case 392: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); break; -case 409: nDex = (GetLocalInt(oPC, "BASE_DEX") >=15); break; -case 412: nWis = (GetLocalInt(oPC, "BASE_WIS") >=13); break; -case 413: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; -case 414: nStr = (GetLocalInt(oPC, "BASE_STR") >=13); nCha = (GetLocalInt(oPC, "BASE_CHA") >=13); break; -case 491: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; -case 492: nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; - } - } - } -else if (nFeat < 532) - { - if (nFeat < 513) - { - switch(nFeat) - { -case 495: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 496: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 497: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 498: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 499: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 500: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 501: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 502: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 503: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 504: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 505: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 506: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 507: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 508: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 509: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 510: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 511: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 512: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; - } - } - else - { - switch(nFeat) - { -case 513: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 514: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 515: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 516: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 517: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 518: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 519: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 520: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 521: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 522: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 523: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 524: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 525: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 526: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 527: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 528: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 529: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 530: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 531: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; - } - } - } -else if (nFeat < 746) - { - if (nFeat < 727) - { - switch(nFeat) - { -case 697: nWis = (GetLocalInt(oPC, "BASE_WIS") >=21); break; -case 709: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 710: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 711: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 712: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 713: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 714: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 715: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 716: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 717: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 718: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 719: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 720: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 721: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 722: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 723: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 724: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 725: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 726: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; - } - } - else - { - switch(nFeat) - { -case 727: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 728: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 729: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 730: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 731: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 732: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 733: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 734: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 735: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 736: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 737: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 738: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 739: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 740: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 741: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 742: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 743: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 744: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 745: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; - } - } - } -else - { - if (nFeat < 840) - { - switch(nFeat) - { -case 747: nCon = (GetLocalInt(oPC, "BASE_CON") >=25); break; -case 748: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; -case 749: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; -case 750: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; -case 751: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; -case 752: nDex = (GetLocalInt(oPC, "BASE_DEX") >=30); break; -case 824: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 825: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 826: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 827: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 828: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 829: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 830: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 831: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 832: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 833: nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; - } - } - else - { - switch(nFeat) - { -case 844: nDex = (GetLocalInt(oPC, "BASE_DEX") >=19); nWis = (GetLocalInt(oPC, "BASE_WIS") >=19); break; -case 854: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); nCha = (GetLocalInt(oPC, "BASE_CHA") >=25); break; -case 856: nDex = (GetLocalInt(oPC, "BASE_DEX") >=25); break; -case 867: nDex = (GetLocalInt(oPC, "BASE_DEX") >=13); nInt = (GetLocalInt(oPC, "BASE_INT") >=13); break; -case 868: nDex = (GetLocalInt(oPC, "BASE_DEX") >=23); break; -case 869: nStr = (GetLocalInt(oPC, "BASE_STR") >=21); nCon = (GetLocalInt(oPC, "BASE_CON") >=21); break; -case 873: nWis = (GetLocalInt(oPC, "BASE_WIS") >=30); break; -case 955: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 958: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 988: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 996: nStr = (GetLocalInt(oPC, "BASE_STR") >=25); break; -case 999: nStr = (GetLocalInt(oPC, "BASE_STR") >=23); break; -case 1060: nWis = (GetLocalInt(oPC, "BASE_WIS") >=25); break; -case 1061: nWis = (GetLocalInt(oPC, "BASE_WIS") >=27); break; - } - } - } -return (nStr && nDex && nCon && nInt && nWis && nCha); -} - -int GetAreFeatSkillReqsMet(int nFeat, object oPC) -{ -int nReturn = TRUE; -if (nFeat < 200) - { - if (nFeat < 180) - { - switch(nFeat) - { -case 34: nReturn = (GetCostOfSkill(GetControlClass(oPC), 0) > 0); break; -case 173: nReturn = (GetCostOfSkill(GetControlClass(oPC), 1) > 0); break; -case 174: nReturn = (GetCostOfSkill(GetControlClass(oPC), 2) > 0); break; -case 175: nReturn = (GetCostOfSkill(GetControlClass(oPC), 3) > 0); break; -case 177: nReturn = (GetCostOfSkill(GetControlClass(oPC), 4) > 0); break; -case 178: nReturn = (GetCostOfSkill(GetControlClass(oPC), 5) > 0); break; -case 179: nReturn = (GetCostOfSkill(GetControlClass(oPC), 6) > 0); break; - } - } - else - { - switch(nFeat) - { -case 180: nReturn = (GetCostOfSkill(GetControlClass(oPC), 7) > 0); break; -case 181: nReturn = (GetCostOfSkill(GetControlClass(oPC), 8) > 0); break; -case 182: nReturn = (GetCostOfSkill(GetControlClass(oPC), 9) > 0); break; -case 183: nReturn = (GetCostOfSkill(GetControlClass(oPC), 10) > 0); break; -case 184: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; -case 185: nReturn = (GetCostOfSkill(GetControlClass(oPC), 12) > 0); break; -case 186: nReturn = (GetCostOfSkill(GetControlClass(oPC), 13) > 0); break; -case 187: nReturn = (GetCostOfSkill(GetControlClass(oPC), 14) > 0); break; -case 188: nReturn = (GetCostOfSkill(GetControlClass(oPC), 15) > 0); break; -case 189: nReturn = (GetCostOfSkill(GetControlClass(oPC), 16) > 0); break; -case 190: nReturn = (GetCostOfSkill(GetControlClass(oPC), 17) > 0); break; -case 192: nReturn = (GetCostOfSkill(GetControlClass(oPC), 18) > 0); break; -case 193: nReturn = (GetCostOfSkill(GetControlClass(oPC), 19) > 0); break; - } - } - } -else if (nFeat < 600) - { - if (nFeat < 590) - { - switch(nFeat) - { -case 378: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; -case 404: nReturn = (GetCostOfSkill(GetControlClass(oPC), 20) > 0); break; -case 406: nReturn = (GetCostOfSkill(GetControlClass(oPC), 21) > 0); break; -case 407: nReturn = (GetCostOfSkill(GetControlClass(oPC), 22) > 0); break; -case 423: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; -case 424: nReturn = (GetCostOfSkill(GetControlClass(oPC), 11) > 0); break; -case 587: nReturn = (GetLocalInt(oPC, "BASE_ANIMAL") > 19); break; -case 588: nReturn = (GetLocalInt(oPC, "BASE_APPRAI") > 19); break; -case 589: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 19); break; - } - } - else - { - switch(nFeat) - { -case 590: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_T") > 19); break; -case 591: nReturn = (GetLocalInt(oPC, "BASE_DISABL") > 19); break; -case 592: nReturn = (GetLocalInt(oPC, "BASE_DISCIP") > 19); break; -case 593: nReturn = (GetLocalInt(oPC, "BASE_HEAL") > 19); break; -case 594: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 19); break; -case 595: nReturn = (GetLocalInt(oPC, "BASE_LISTEN") > 19); break; -case 596: nReturn = (GetLocalInt(oPC, "BASE_LORE") > 19); break; -case 597: nReturn = (GetLocalInt(oPC, "BASE_MOVE_S") > 19); break; -case 598: nReturn = (GetLocalInt(oPC, "BASE_OPEN_L") > 19); break; -case 599: nReturn = (GetLocalInt(oPC, "BASE_PARRY") > 19); break; - } - } - } -else if (nFeat < 860) - { - if (nFeat < 610) - { - switch(nFeat) - { -case 600: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 19); break; -case 601: nReturn = (GetLocalInt(oPC, "BASE_PERSUA") > 19); break; -case 602: nReturn = (GetLocalInt(oPC, "BASE_PICK_P") > 19); break; -case 603: nReturn = (GetLocalInt(oPC, "BASE_SEARCH") > 19); break; -case 604: nReturn = (GetLocalInt(oPC, "BASE_SET_TR") > 19); break; -case 605: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 19); break; -case 606: nReturn = (GetLocalInt(oPC, "BASE_SPOT") > 19); break; -case 607: nReturn = (GetLocalInt(oPC, "BASE_TAUNT") > 19); break; -case 608: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 19); break; -case 609: nReturn = (GetLocalInt(oPC, "BASE_USE_MA") > 19); break; - } - } - else - { - switch(nFeat) - { -case 696: nReturn = (GetLocalInt(oPC, "BASE_CONCEN") > 24); break; -case 748: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; -case 749: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; -case 750: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; -case 751: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; -case 752: nReturn = (GetLocalInt(oPC, "BASE_HIDE") > 29 && GetLocalInt(oPC, "BASE_TUMBLE") > 29);break; -case 856: nReturn = (GetLocalInt(oPC, "BASE_TUMBLE") > 29); break; -case 857: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; -case 858: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; -case 859: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 29); break; - } - } - } -else - { - if (nFeat < 900) - { - switch(nFeat) - { -case 860: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; -case 861: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; -case 862: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 23); break; -case 863: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; -case 864: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; -case 865: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 26); break; -case 870: nReturn = (GetLocalInt(oPC, "BASE_PERFOR") > 24); break; -case 874: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 14); break; -case 875: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 21); break; -case 876: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 31); break; -case 877: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 25); break; -case 878: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 24); break; - } - } - else - { - switch(nFeat) - { -case 911: nReturn = (GetCostOfSkill(GetControlClass(oPC), 25) > 0); break; -case 912: nReturn = (GetCostOfSkill(GetControlClass(oPC), 26) > 0); break; -case 913: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_A") > 19); break; -case 914: nReturn = (GetLocalInt(oPC, "BASE_CRAFT_W") > 19); break; -case 915: nReturn = (GetCostOfSkill(GetControlClass(oPC), 23) > 0); break; -case 916: nReturn = (GetCostOfSkill(GetControlClass(oPC), 24) > 0); break; -case 917: nReturn = (GetLocalInt(oPC, "BASE_BLUFF") > 19); break; -case 918: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 19); break; -case 989: nReturn = (GetLocalInt(oPC, "BASE_INTIMI") > 24); break; -case 990: nReturn = (GetLocalInt(oPC, "BASE_SPELLC") > 33); break; - } - } - } -return nReturn; -} - -int GetAreFeatFeatReqsMet(int nFeat, object oPC) -{ -int nPRF1 = 1, nPRF2 = 1, nORF1 = 1, nORF2 = 0, nORF3 = 0, nORF4 = 0, nORF5 = 0;//these match columns from the 2da -if (nFeat < 250)//nORF1 defaults to true so that feats without "Or Feat" Requirements will return for them - { //Likewise nPRF1 & 2 default to true for feats that have no prerequisite feats - if (nFeat < 50) - { - if (nFeat < 10) - { - switch (nFeat) - { -case 2: nPRF1 = GetHasFeat(3, oPC); nPRF2 = GetHasFeat(4, oPC); break; -case 4: nPRF1 = GetHasFeat(3, oPC); break; -case 6: nPRF1 = GetHasFeat(28, oPC); break; -case 8: nPRF1 = GetHasFeat(21, oPC); break; - } - } - else if (nFeat < 20) - { - switch (nFeat) - { -case 13: nPRF1 = GetHasFeat(294, oPC); break; -case 15: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 16: nPRF1 = GetHasFeat(9, oPC); break; -case 17: nPRF1 = GetHasFeat(23, oPC); break; -case 19: nPRF1 = GetHasFeat(28, oPC); break; - - } - } - else if (nFeat < 30) - { - switch (nFeat) - { -case 20: nPRF1 = GetHasFeat(41, oPC); nPRF2 = GetHasFeat(1, oPC); break; -case 26: nPRF1 = GetHasFeat(10, oPC); break; - } - } - else if (nFeat < 40) - { - switch (nFeat) - { -case 30: nPRF1 = GetHasFeat(27, oPC); break; -case 31: nPRF1 = GetHasFeat(5, oPC); break; -case 38: nPRF1 = GetHasFeat(31, oPC); break; -case 39: nPRF1 = GetHasFeat(21, oPC); break; - } - } - else //<50 - { - switch (nFeat) - { -case 43: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 47: nPRF1 = GetHasFeat(43, oPC); break; - } - } - } - else if (nFeat < 100) - { - if (nFeat < 60) - { - switch (nFeat) - { -case 52: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 53: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; -case 54: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; -case 55: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; -case 56: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 57: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 58: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 59: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; - } - } - else if (nFeat < 70) - { - switch (nFeat) - { -case 60: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; -case 61: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; -case 63: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; -case 64: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; -case 65: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 66: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; -case 67: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; -case 68: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; -case 69: nPRF1 = GetHasFeat(45, oPC); break; - } - } - else if (nFeat < 80) - { - switch (nFeat) - { -case 70: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; -case 71: nPRF1 = GetHasFeat(45, oPC); break; -case 72: nPRF1 = GetHasFeat(45, oPC); break; -case 73: nPRF1 = GetHasFeat(45, oPC); break; -case 74: nPRF1 = GetHasFeat(45, oPC); break; -case 75: nPRF1 = GetHasFeat(45, oPC); break; -case 76: nPRF1 = GetHasFeat(45, oPC); break; -case 77: nPRF1 = GetHasFeat(45, oPC); break; -case 78: nPRF1 = GetHasFeat(45, oPC); break; -case 79: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; - } - } - else if (nFeat < 90) - { - switch (nFeat) - { -case 80: nPRF1 = GetHasFeat(44, oPC); break; -case 81: nPRF1 = GetHasFeat(44, oPC); break; -case 82: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; -case 83: nPRF1 = GetHasFeat(44, oPC); break; -case 84: nPRF1 = GetHasFeat(44, oPC); break; -case 85: nORF1 = GetHasFeat(44, oPC); break; -case 86: nPRF1 = GetHasFeat(44, oPC); break; -case 87: nPRF1 = GetHasFeat(44, oPC); break; -case 88: nPRF1 = GetHasFeat(44, oPC); break; -case 89: nPRF1 = GetHasFeat(44, oPC); break; - } - } - else //<100 - { - switch (nFeat) - { -case 90: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 91: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 92: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; -case 93: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); nORF4 = GetHasFeat(51, oPC); break; -case 94: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 95: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 96: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); nORF5 = GetHasFeat(51, oPC); break; -case 97: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; -case 98: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); break; -case 99: nORF1 = GetHasFeat(46, oPC); nORF2 = GetHasFeat(48, oPC); nORF3 = GetHasFeat(49, oPC); nORF4 = GetHasFeat(50, oPC); break; - } - } - } - else if (nFeat < 150) - { - if (nFeat < 110) - { - switch (nFeat) - { -case 101: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; -case 102: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; -case 103: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); break; -case 104: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(50, oPC); nORF3 = GetHasFeat(256, oPC); break; -case 105: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(48, oPC); break; -case 106: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(256, oPC); break; -case 107: nPRF1 = GetHasFeat(45, oPC); break; -case 108: nORF1 = GetHasFeat(45, oPC); nORF2 = GetHasFeat(49, oPC); nORF3 = GetHasFeat(50, oPC); break; -case 109: nPRF1 = GetHasFeat(45, oPC); break; - } - } - else if (nFeat < 120) - { - switch (nFeat) - { -case 110: nPRF1 = GetHasFeat(45, oPC); break; -case 111: nPRF1 = GetHasFeat(45, oPC); break; -case 112: nPRF1 = GetHasFeat(45, oPC); break; -case 113: nPRF1 = GetHasFeat(45, oPC); break; -case 114: nPRF1 = GetHasFeat(45, oPC); break; -case 115: nPRF1 = GetHasFeat(45, oPC); break; -case 116: nPRF1 = GetHasFeat(45, oPC); break; -case 117: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; -case 118: nPRF1 = GetHasFeat(44, oPC); break; -case 119: nPRF1 = GetHasFeat(44, oPC); break; - } - } - else if (nFeat < 130) - { - switch (nFeat) - { -case 120: nORF1 = GetHasFeat(44, oPC); nORF2 = GetHasFeat(49, oPC); break; -case 121: nPRF1 = GetHasFeat(44, oPC); break; -case 122: nPRF1 = GetHasFeat(44, oPC); break; -case 123: nPRF1 = GetHasFeat(44, oPC); break; -case 124: nPRF1 = GetHasFeat(44, oPC); break; -case 125: nPRF1 = GetHasFeat(44, oPC); break; -case 126: nPRF1 = GetHasFeat(44, oPC); break; -case 127: nPRF1 = GetHasFeat(44, oPC); break; -case 128: nPRF1 = GetHasFeat(90, oPC); break; -case 129: nPRF1 = GetHasFeat(91, oPC); break; - } - } - else if (nFeat < 140) - { - switch (nFeat) - { -case 130: nPRF1 = GetHasFeat(92, oPC); break; -case 131: nPRF1 = GetHasFeat(93, oPC); break; -case 132: nPRF1 = GetHasFeat(94, oPC); break; -case 133: nPRF1 = GetHasFeat(95, oPC); break; -case 134: nPRF1 = GetHasFeat(96, oPC); break; -case 135: nPRF1 = GetHasFeat(97, oPC); break; -case 136: nPRF1 = GetHasFeat(98, oPC); break; -case 137: nPRF1 = GetHasFeat(99, oPC); break; -case 138: nPRF1 = GetHasFeat(100, oPC); break; -case 139: nPRF1 = GetHasFeat(101, oPC); break; - } - } - else //<150 - { - switch (nFeat) - { -case 140: nPRF1 = GetHasFeat(102, oPC); break; -case 141: nPRF1 = GetHasFeat(103, oPC); break; -case 142: nPRF1 = GetHasFeat(104, oPC); break; -case 143: nPRF1 = GetHasFeat(105, oPC); break; -case 144: nPRF1 = GetHasFeat(106, oPC); break; -case 145: nPRF1 = GetHasFeat(107, oPC); break; -case 146: nPRF1 = GetHasFeat(108, oPC); break; -case 147: nPRF1 = GetHasFeat(109, oPC); break; -case 148: nPRF1 = GetHasFeat(110, oPC); break; -case 149: nPRF1 = GetHasFeat(111, oPC); break; - } - } - } - else - { - if (nFeat < 160) - { - switch (nFeat) - { -case 150: nPRF1 = GetHasFeat(112, oPC); break; -case 151: nPRF1 = GetHasFeat(113, oPC); break; -case 152: nPRF1 = GetHasFeat(114, oPC); break; -case 153: nPRF1 = GetHasFeat(115, oPC); break; -case 154: nPRF1 = GetHasFeat(116, oPC); break; -case 155: nPRF1 = GetHasFeat(117, oPC); break; -case 156: nPRF1 = GetHasFeat(118, oPC); break; -case 157: nPRF1 = GetHasFeat(119, oPC); break; -case 158: nPRF1 = GetHasFeat(120, oPC); break; -case 159: nPRF1 = GetHasFeat(121, oPC); break; - } - } - else - { - switch (nFeat) - { -case 160: nPRF1 = GetHasFeat(122, oPC); break; -case 161: nPRF1 = GetHasFeat(123, oPC); break; -case 162: nPRF1 = GetHasFeat(124, oPC); break; -case 163: nPRF1 = GetHasFeat(125, oPC); break; -case 164: nPRF1 = GetHasFeat(126, oPC); break; -case 165: nPRF1 = GetHasFeat(127, oPC); break; - } - } - } - } -else if (nFeat < 500) - { - if (nFeat < 400) - { - switch (nFeat) - { -case 390: nPRF1 = GetHasFeat(389, oPC); break; -case 391: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(6, oPC); break; -case 392: nPRF1 = GetHasFeat(26, oPC); nPRF2 = GetHasFeat(10, oPC); break; -case 393: nPRF1 = GetHasFeat(35, oPC); break; -case 394: nPRF1 = GetHasFeat(166, oPC); break; -case 395: nPRF1 = GetHasFeat(167, oPC); break; -case 396: nPRF1 = GetHasFeat(168, oPC); break; -case 397: nPRF1 = GetHasFeat(169, oPC); break; -case 398: nPRF1 = GetHasFeat(170, oPC); break; -case 399: nPRF1 = GetHasFeat(171, oPC); break; - } - } - else if (nFeat < 450) - { - if (nFeat < 410) - { - switch (nFeat) - { -case 400: nPRF1 = GetHasFeat(172, oPC); break; -case 401: nPRF1 = GetHasFeat(36, oPC); break; -case 409: nPRF1 = GetHasFeat(21, oPC); break; - } - } - else if (nFeat < 420) - { - switch (nFeat) - { -case 410: nPRF1 = GetHasFeat(39, oPC); break; -case 413: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; -case 414: nPRF1 = GetHasFeat(28, oPC); nPRF2 = GetHasFeat(294, oPC); break; -case 415: nPRF1 = GetHasFeat(35, oPC); break; -case 416: nPRF1 = GetHasFeat(166, oPC); break; -case 417: nPRF1 = GetHasFeat(167, oPC); break; -case 418: nPRF1 = GetHasFeat(168, oPC); break; -case 419: nPRF1 = GetHasFeat(169, oPC); break; - } - } - else if (nFeat < 430) - { - switch (nFeat) - { -case 420: nPRF1 = GetHasFeat(170, oPC); break; -case 421: nPRF1 = GetHasFeat(171, oPC); break; -case 422: nPRF1 = GetHasFeat(172, oPC); break; - } - } - else //<450 - { - switch (nFeat) - { -case 446: nPRF1 = GetHasFeat(445, oPC); break; -case 447: nPRF1 = GetHasFeat(446, oPC); break; -case 448: nPRF1 = GetHasFeat(447, oPC); break; -case 449: nPRF1 = GetHasFeat(448, oPC); break; - } - } - } - else //<500 - { - if (nFeat < 460) - { - switch (nFeat) - { -case 452: nPRF1 = GetHasFeat(451, oPC); break; -case 456: nPRF1 = GetHasFeat(455, oPC); break; -case 457: nPRF1 = GetHasFeat(456, oPC); break; -case 458: nPRF1 = GetHasFeat(457, oPC); break; -case 459: nPRF1 = GetHasFeat(458, oPC); break; - } - } - else if (nFeat < 470) - { - switch (nFeat) - { -case 461: nPRF1 = GetHasFeat(460, oPC); break; -case 462: nPRF1 = GetHasFeat(461, oPC); break; -case 464: nPRF1 = GetHasFeat(463, oPC); break; -case 465: nPRF1 = GetHasFeat(464, oPC); break; -case 466: nPRF1 = GetHasFeat(465, oPC); break; -case 467: nPRF1 = GetHasFeat(466, oPC); break; - } - } - else //<500 - { - switch (nFeat) - { -case 493: nPRF1 = GetHasFeat(492, oPC); break; -case 494: nPRF1 = GetHasFeat(493, oPC); break; -case 495: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(709, oPC); break; -case 496: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(710, oPC); break; -case 497: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(711, oPC); break; -case 498: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(712, oPC); break; -case 499: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(713, oPC); break; - } - } - } - } -else if (nFeat < 750) - { - if (nFeat < 550) - { - if (nFeat < 510) - { - switch (nFeat) - { -case 500: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(714, oPC); break; -case 501: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(715, oPC); break; -case 502: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(716, oPC); break; -case 503: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(717, oPC); break; -case 504: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(718, oPC); break; -case 505: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(719, oPC); break; -case 506: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(720, oPC); break; -case 507: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(721, oPC); break; -case 508: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(722, oPC); break; -case 509: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(723, oPC); break; - } - } - else if (nFeat < 520) - { - switch (nFeat) - { -case 510: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(724, oPC); break; -case 511: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(725, oPC); break; -case 512: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(726, oPC); break; -case 513: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(727, oPC); break; -case 514: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(728, oPC); break; -case 515: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(729, oPC); break; -case 516: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(730, oPC); break; -case 517: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(731, oPC); break; -case 518: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(732, oPC); break; -case 519: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(733, oPC); break; - } - } - else if (nFeat < 530) - { - switch (nFeat) - { -case 520: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(734, oPC); break; -case 521: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(735, oPC); break; -case 522: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(736, oPC); break; -case 523: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(737, oPC); break; -case 524: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(738, oPC); break; -case 525: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(739, oPC); break; -case 526: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(740, oPC); break; -case 527: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(741, oPC); break; -case 528: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(742, oPC); break; -case 529: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(743, oPC); break; - } - } - else if (nFeat < 540) - { - switch (nFeat) - { -case 530: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(744, oPC); break; -case 531: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(745, oPC); break; -case 534: nPRF1 = GetHasFeat(533, oPC); break; -case 535: nPRF1 = GetHasFeat(534, oPC); break; -case 536: nPRF1 = GetHasFeat(535, oPC); break; -case 537: nPRF1 = GetHasFeat(536, oPC); break; -case 538: nPRF1 = GetHasFeat(537, oPC); break; -case 539: nPRF1 = GetHasFeat(538, oPC); break; - } - } - else //<550 - { - switch (nFeat) - { -case 540: nPRF1 = GetHasFeat(539, oPC); break; -case 541: nPRF1 = GetHasFeat(540, oPC); break; -case 542: nPRF1 = GetHasFeat(541, oPC); break; -case 544: nPRF1 = GetHasFeat(543, oPC); break; -case 545: nPRF1 = GetHasFeat(544, oPC); break; -case 546: nPRF1 = GetHasFeat(545, oPC); break; -case 547: nPRF1 = GetHasFeat(546, oPC); break; -case 548: nPRF1 = GetHasFeat(547, oPC); break; -case 549: nPRF1 = GetHasFeat(548, oPC); break; - } - } - } - else if (nFeat < 600) - { - if (nFeat < 560) - { - switch (nFeat) - { -case 550: nPRF1 = GetHasFeat(549, oPC); break; -case 551: nPRF1 = GetHasFeat(550, oPC); break; -case 552: nPRF1 = GetHasFeat(551, oPC); break; -case 554: nPRF1 = GetHasFeat(553, oPC); break; -case 555: nPRF1 = GetHasFeat(554, oPC); break; -case 556: nPRF1 = GetHasFeat(555, oPC); break; -case 557: nPRF1 = GetHasFeat(556, oPC); break; -case 558: nPRF1 = GetHasFeat(557, oPC); break; -case 559: nPRF1 = GetHasFeat(558, oPC); break; - } - } - else if (nFeat < 570) - { - switch (nFeat) - { -case 560: nPRF1 = GetHasFeat(559, oPC); break; -case 561: nPRF1 = GetHasFeat(560, oPC); break; -case 562: nPRF1 = GetHasFeat(561, oPC); break; -case 564: nPRF1 = GetHasFeat(563, oPC); break; -case 565: nPRF1 = GetHasFeat(564, oPC); break; -case 566: nPRF1 = GetHasFeat(565, oPC); break; -case 567: nPRF1 = GetHasFeat(566, oPC); break; -case 568: nPRF1 = GetHasFeat(567, oPC); break; -case 569: nPRF1 = GetHasFeat(568, oPC); break; - } - } - else if (nFeat < 580) - { - switch (nFeat) - { -case 570: nPRF1 = GetHasFeat(569, oPC); break; -case 571: nPRF1 = GetHasFeat(570, oPC); break; -case 572: nPRF1 = GetHasFeat(571, oPC); break; -case 574: nPRF1 = GetHasFeat(573, oPC); break; -case 575: nPRF1 = GetHasFeat(574, oPC); break; -case 576: nPRF1 = GetHasFeat(575, oPC); break; -case 577: nPRF1 = GetHasFeat(576, oPC); break; -case 578: nPRF1 = GetHasFeat(577, oPC); break; -case 579: nPRF1 = GetHasFeat(578, oPC); break; - } - } - else - { - switch (nFeat) - { -case 580: nPRF1 = GetHasFeat(579, oPC); break; -case 581: nPRF1 = GetHasFeat(580, oPC); break; -case 582: nPRF1 = GetHasFeat(581, oPC); break; - } - } - } - else if (nFeat < 650) - { - if (nFeat < 620) - { - switch (nFeat) - { -case 610: nPRF1 = GetHasFeat(393, oPC); break; -case 611: nPRF1 = GetHasFeat(394, oPC); break; -case 612: nPRF1 = GetHasFeat(395, oPC); break; -case 613: nPRF1 = GetHasFeat(396, oPC); break; -case 614: nPRF1 = GetHasFeat(397, oPC); break; -case 615: nPRF1 = GetHasFeat(398, oPC); break; -case 616: nPRF1 = GetHasFeat(399, oPC); break; -case 617: nPRF1 = GetHasFeat(400, oPC); break; -case 618: nPRF1 = GetHasFeat(401, oPC); break; -case 619: nPRF1 = GetHasFeat(15, oPC); break; - } - } - else if (nFeat < 630) - { - switch (nFeat) - { -case 620: nPRF1 = GetHasFeat(90, oPC); break; -case 621: nPRF1 = GetHasFeat(91, oPC); break; -case 622: nPRF1 = GetHasFeat(92, oPC); break; -case 623: nPRF1 = GetHasFeat(93, oPC); break; -case 624: nPRF1 = GetHasFeat(94, oPC); break; -case 625: nPRF1 = GetHasFeat(95, oPC); break; -case 626: nPRF1 = GetHasFeat(96, oPC); break; -case 627: nPRF1 = GetHasFeat(97, oPC); break; -case 628: nPRF1 = GetHasFeat(98, oPC); break; -case 629: nPRF1 = GetHasFeat(99, oPC); break; - } - } - else if (nFeat < 640) - { - switch (nFeat) - { -case 630: nPRF1 = GetHasFeat(100, oPC); break; -case 631: nPRF1 = GetHasFeat(101, oPC); break; -case 632: nPRF1 = GetHasFeat(102, oPC); break; -case 633: nPRF1 = GetHasFeat(103, oPC); break; -case 634: nPRF1 = GetHasFeat(104, oPC); break; -case 635: nPRF1 = GetHasFeat(105, oPC); break; -case 636: nPRF1 = GetHasFeat(106, oPC); break; -case 637: nPRF1 = GetHasFeat(107, oPC); break; -case 638: nPRF1 = GetHasFeat(108, oPC); break; -case 639: nPRF1 = GetHasFeat(109, oPC); break; - } - } - else //<650 - { - switch (nFeat) - { -case 640: nPRF1 = GetHasFeat(110, oPC); break; -case 641: nPRF1 = GetHasFeat(111, oPC); break; -case 642: nPRF1 = GetHasFeat(112, oPC); break; -case 643: nPRF1 = GetHasFeat(113, oPC); break; -case 644: nPRF1 = GetHasFeat(114, oPC); break; -case 645: nPRF1 = GetHasFeat(115, oPC); break; -case 646: nPRF1 = GetHasFeat(116, oPC); break; -case 647: nPRF1 = GetHasFeat(117, oPC); break; -case 648: nPRF1 = GetHasFeat(118, oPC); break; -case 649: nPRF1 = GetHasFeat(120, oPC); break; - } - } - } - else if (nFeat < 700) - { - if (nFeat < 660) - { - switch (nFeat) - { -case 650: nPRF1 = GetHasFeat(121, oPC); break; -case 651: nPRF1 = GetHasFeat(122, oPC); break; -case 652: nPRF1 = GetHasFeat(123, oPC); break; -case 653: nPRF1 = GetHasFeat(125, oPC); break; -case 654: nPRF1 = GetHasFeat(126, oPC); break; -case 655: nPRF1 = GetHasFeat(127, oPC); break; -case 657: nPRF1 = GetHasFeat(47, oPC); nPRF2 = GetHasFeat(619, oPC); break; -case 658: nPRF1 = GetHasFeat(128, oPC); nPRF2 = GetHasFeat(620, oPC); break; -case 659: nPRF1 = GetHasFeat(129, oPC); nPRF2 = GetHasFeat(621, oPC); break; - } - } - else if (nFeat < 670) - { - switch (nFeat) - { -case 660: nPRF1 = GetHasFeat(130, oPC); nPRF2 = GetHasFeat(622, oPC); break; -case 661: nPRF1 = GetHasFeat(131, oPC); nPRF2 = GetHasFeat(623, oPC); break; -case 662: nPRF1 = GetHasFeat(132, oPC); nPRF2 = GetHasFeat(624, oPC); break; -case 663: nPRF1 = GetHasFeat(133, oPC); nPRF2 = GetHasFeat(625, oPC); break; -case 664: nPRF1 = GetHasFeat(134, oPC); nPRF2 = GetHasFeat(626, oPC); break; -case 665: nPRF1 = GetHasFeat(135, oPC); nPRF2 = GetHasFeat(627, oPC); break; -case 666: nPRF1 = GetHasFeat(136, oPC); nPRF2 = GetHasFeat(628, oPC); break; -case 667: nPRF1 = GetHasFeat(137, oPC); nPRF2 = GetHasFeat(629, oPC); break; -case 668: nPRF1 = GetHasFeat(138, oPC); nPRF2 = GetHasFeat(630, oPC); break; -case 669: nPRF1 = GetHasFeat(139, oPC); nPRF2 = GetHasFeat(631, oPC); break; - } - } - else if (nFeat < 680) - { - switch (nFeat) - { -case 670: nPRF1 = GetHasFeat(140, oPC); nPRF2 = GetHasFeat(632, oPC); break; -case 671: nPRF1 = GetHasFeat(141, oPC); nPRF2 = GetHasFeat(633, oPC); break; -case 672: nPRF1 = GetHasFeat(142, oPC); nPRF2 = GetHasFeat(634, oPC); break; -case 673: nPRF1 = GetHasFeat(143, oPC); nPRF2 = GetHasFeat(635, oPC); break; -case 674: nPRF1 = GetHasFeat(144, oPC); nPRF2 = GetHasFeat(636, oPC); break; -case 675: nPRF1 = GetHasFeat(145, oPC); nPRF2 = GetHasFeat(637, oPC); break; -case 676: nPRF1 = GetHasFeat(146, oPC); nPRF2 = GetHasFeat(638, oPC); break; -case 677: nPRF1 = GetHasFeat(147, oPC); nPRF2 = GetHasFeat(639, oPC); break; -case 678: nPRF1 = GetHasFeat(148, oPC); nPRF2 = GetHasFeat(640, oPC); break; -case 679: nPRF1 = GetHasFeat(149, oPC); nPRF2 = GetHasFeat(641, oPC); break; - } - } - else if (nFeat < 690) - { - switch (nFeat) - { -case 680: nPRF1 = GetHasFeat(150, oPC); nPRF2 = GetHasFeat(642, oPC); break; -case 681: nPRF1 = GetHasFeat(151, oPC); nPRF2 = GetHasFeat(643, oPC); break; -case 682: nPRF1 = GetHasFeat(152, oPC); nPRF2 = GetHasFeat(644, oPC); break; -case 683: nPRF1 = GetHasFeat(153, oPC); nPRF2 = GetHasFeat(645, oPC); break; -case 684: nPRF1 = GetHasFeat(154, oPC); nPRF2 = GetHasFeat(646, oPC); break; -case 685: nPRF1 = GetHasFeat(155, oPC); nPRF2 = GetHasFeat(647, oPC); break; -case 686: nPRF1 = GetHasFeat(156, oPC); nPRF2 = GetHasFeat(648, oPC); break; -case 687: nPRF1 = GetHasFeat(158, oPC); nPRF2 = GetHasFeat(649, oPC); break; -case 688: nPRF1 = GetHasFeat(159, oPC); nPRF2 = GetHasFeat(650, oPC); break; -case 689: nPRF1 = GetHasFeat(160, oPC); nPRF2 = GetHasFeat(651, oPC); break; - } - } - else //<700 - { - switch (nFeat) - { -case 690: nPRF1 = GetHasFeat(161, oPC); nPRF2 = GetHasFeat(652, oPC); break; -case 691: nPRF1 = GetHasFeat(163, oPC); nPRF2 = GetHasFeat(653, oPC); break; -case 692: nPRF1 = GetHasFeat(164, oPC); nPRF2 = GetHasFeat(654, oPC); break; -case 693: nPRF1 = GetHasFeat(165, oPC); nPRF2 = GetHasFeat(655, oPC); break; -case 696: nPRF1 = GetHasFeat(7, oPC); break; -case 697: nPRF1 = GetHasFeat(344, oPC); break; -case 698: nPRF1 = GetHasFeat(697, oPC); break; -case 699: nPRF1 = GetHasFeat(215, oPC); break; - } - } - } - else //<750 - { - if (nFeat < 710) - { - switch (nFeat) - { -case 700: nPRF1 = GetHasFeat(699, oPC); break; -case 701: nPRF1 = GetHasFeat(700, oPC); break; -case 702: nPRF1 = GetHasFeat(701, oPC); break; -case 703: nPRF1 = GetHasFeat(702, oPC); break; -case 704: nPRF1 = GetHasFeat(703, oPC); break; -case 705: nPRF1 = GetHasFeat(704, oPC); break; -case 706: nPRF1 = GetHasFeat(705, oPC); break; -case 707: nPRF1 = GetHasFeat(706, oPC); break; -case 708: nPRF1 = GetHasFeat(707, oPC); break; -case 709: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(15, oPC); break; - } - } - else if (nFeat < 720) - { - switch (nFeat) - { -case 710: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(52, oPC); break; -case 711: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(53, oPC); break; -case 712: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(54, oPC); break; -case 713: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(55, oPC); break; -case 714: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(56, oPC); break; -case 715: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(57, oPC); break; -case 716: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(58, oPC); break; -case 717: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(59, oPC); break; -case 718: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(60, oPC); break; -case 719: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(61, oPC); break; - } - } - else if (nFeat < 730) - { - switch (nFeat) - { -case 720: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(62, oPC); break; -case 721: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(63, oPC); break; -case 722: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(64, oPC); break; -case 723: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(65, oPC); break; -case 724: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(66, oPC); break; -case 725: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(67, oPC); break; -case 726: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(68, oPC); break; -case 727: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(69, oPC); break; -case 728: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(70, oPC); break; -case 729: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(71, oPC); break; - } - } - else if (nFeat < 740) - { - switch (nFeat) - { -case 730: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(72, oPC); break; -case 731: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(73, oPC); break; -case 732: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(74, oPC); break; -case 733: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(75, oPC); break; -case 734: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(76, oPC); break; -case 735: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(77, oPC); break; -case 736: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(78, oPC); break; -case 737: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(79, oPC); break; -case 738: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(80, oPC); break; -case 739: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(82, oPC); break; - } - } - else //750 - { - switch (nFeat) - { -case 740: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(83, oPC); break; -case 741: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(84, oPC); break; -case 742: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(85, oPC); break; -case 743: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(87, oPC); break; -case 744: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(88, oPC); break; -case 745: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(89, oPC); break; -case 746: nPRF1 = GetHasFeat(292, oPC); break; -case 747: nPRF1 = GetHasFeat(14, oPC); break; -case 748: nPRF1 = GetHasFeat(212, oPC); break; -case 749: nPRF1 = GetHasFeat(748, oPC); break; - } - } - } - } -else - { - if (nFeat < 800) - { - if (nFeat < 760) - { - switch (nFeat) - { -case 750: nPRF1 = GetHasFeat(749, oPC); break; -case 751: nPRF1 = GetHasFeat(750, oPC); break; -case 752: nPRF1 = GetHasFeat(751, oPC); break; -case 753: nPRF1 = GetHasFeat(377, oPC); break; -case 755: nPRF1 = GetHasFeat(754, oPC); break; -case 756: nPRF1 = GetHasFeat(755, oPC); break; -case 757: nPRF1 = GetHasFeat(756, oPC); break; -case 758: nPRF1 = GetHasFeat(757, oPC); break; -case 759: nPRF1 = GetHasFeat(758, oPC); break; - } - } - else if (nFeat < 770) - { - switch (nFeat) - { -case 760: nPRF1 = GetHasFeat(759, oPC); break; -case 761: nPRF1 = GetHasFeat(760, oPC); break; -case 762: nPRF1 = GetHasFeat(761, oPC); break; -case 763: nPRF1 = GetHasFeat(762, oPC); break; -case 765: nPRF1 = GetHasFeat(764, oPC); break; -case 766: nPRF1 = GetHasFeat(765, oPC); break; -case 767: nPRF1 = GetHasFeat(766, oPC); break; -case 768: nPRF1 = GetHasFeat(767, oPC); break; -case 769: nPRF1 = GetHasFeat(768, oPC); break; - } - } - else if (nFeat < 780) - { - switch (nFeat) - { -case 770: nPRF1 = GetHasFeat(769, oPC); break; -case 771: nPRF1 = GetHasFeat(770, oPC); break; -case 772: nPRF1 = GetHasFeat(771, oPC); break; -case 773: nPRF1 = GetHasFeat(772, oPC); break; -case 775: nPRF1 = GetHasFeat(774, oPC); break; -case 776: nPRF1 = GetHasFeat(775, oPC); break; -case 777: nPRF1 = GetHasFeat(776, oPC); break; -case 778: nPRF1 = GetHasFeat(777, oPC); break; -case 779: nPRF1 = GetHasFeat(778, oPC); break; - } - } - else if (nFeat < 790) - { - switch (nFeat) - { -case 780: nPRF1 = GetHasFeat(779, oPC); break; -case 781: nPRF1 = GetHasFeat(780, oPC); break; -case 782: nPRF1 = GetHasFeat(781, oPC); break; -case 783: nPRF1 = GetHasFeat(782, oPC); break; -case 785: nPRF1 = GetHasFeat(784, oPC); break; -case 786: nPRF1 = GetHasFeat(785, oPC); break; -case 787: nPRF1 = GetHasFeat(786, oPC); break; -case 788: nPRF1 = GetHasFeat(787, oPC); break; -case 789: nPRF1 = GetHasFeat(788, oPC); break; - } - } - else //<800 - { - switch (nFeat) - { -case 790: nPRF1 = GetHasFeat(789, oPC); break; -case 791: nPRF1 = GetHasFeat(790, oPC); break; -case 792: nPRF1 = GetHasFeat(791, oPC); break; -case 793: nPRF1 = GetHasFeat(792, oPC); break; -case 795: nPRF1 = GetHasFeat(794, oPC); break; -case 796: nPRF1 = GetHasFeat(795, oPC); break; -case 797: nPRF1 = GetHasFeat(796, oPC); break; -case 798: nPRF1 = GetHasFeat(797, oPC); break; -case 799: nPRF1 = GetHasFeat(798, oPC); break; - } - } - } - else if (nFeat < 850) - { - if (nFeat < 810) - { - switch (nFeat) - { -case 800: nPRF1 = GetHasFeat(799, oPC); break; -case 801: nPRF1 = GetHasFeat(800, oPC); break; -case 802: nPRF1 = GetHasFeat(801, oPC); break; -case 803: nPRF1 = GetHasFeat(802, oPC); break; -case 805: nPRF1 = GetHasFeat(804, oPC); break; -case 806: nPRF1 = GetHasFeat(805, oPC); break; -case 807: nPRF1 = GetHasFeat(806, oPC); break; -case 808: nPRF1 = GetHasFeat(807, oPC); break; -case 809: nPRF1 = GetHasFeat(808, oPC); break; - } - } - else if (nFeat < 820) - { - switch (nFeat) - { -case 810: nPRF1 = GetHasFeat(809, oPC); break; -case 811: nPRF1 = GetHasFeat(810, oPC); break; -case 812: nPRF1 = GetHasFeat(811, oPC); break; -case 813: nPRF1 = GetHasFeat(812, oPC); break; -case 815: nPRF1 = GetHasFeat(814, oPC); break; -case 816: nPRF1 = GetHasFeat(815, oPC); break; -case 817: nPRF1 = GetHasFeat(816, oPC); break; -case 818: nPRF1 = GetHasFeat(817, oPC); break; -case 819: nPRF1 = GetHasFeat(818, oPC); break; - } - } - else if (nFeat < 830) - { - switch (nFeat) - { -case 820: nPRF1 = GetHasFeat(819, oPC); break; -case 821: nPRF1 = GetHasFeat(820, oPC); break; -case 822: nPRF1 = GetHasFeat(821, oPC); break; -case 823: nPRF1 = GetHasFeat(822, oPC); break; -case 824: nORF1 = GetHasFeat(472, oPC); nORF2 = GetHasFeat(301, oPC); break; -case 825: nPRF1 = GetHasFeat(824, oPC); break; -case 826: nPRF1 = GetHasFeat(825, oPC); break; -case 827: nPRF1 = GetHasFeat(826, oPC); break; -case 828: nPRF1 = GetHasFeat(827, oPC); break; -case 829: nPRF1 = GetHasFeat(828, oPC); break; - } - } - else if (nFeat < 840) - { - switch (nFeat) - { -case 830: nPRF1 = GetHasFeat(829, oPC); break; -case 831: nPRF1 = GetHasFeat(830, oPC); break; -case 832: nPRF1 = GetHasFeat(831, oPC); break; -case 833: nPRF1 = GetHasFeat(832, oPC); break; -case 834: nORF1 = GetHasFeat(351, oPC); nORF2 = GetHasFeat(1006, oPC); nORF3 = GetHasFeat(1011, oPC); break; -case 835: nPRF1 = GetHasFeat(834, oPC); break; -case 836: nPRF1 = GetHasFeat(835, oPC); break; -case 837: nPRF1 = GetHasFeat(836, oPC); break; -case 838: nPRF1 = GetHasFeat(837, oPC); break; -case 839: nPRF1 = GetHasFeat(838, oPC); break; - } - } - else //<850 - { - switch (nFeat) - { -case 840: nPRF1 = GetHasFeat(839, oPC); break; -case 841: nPRF1 = GetHasFeat(840, oPC); break; -case 842: nPRF1 = GetHasFeat(841, oPC); break; -case 843: nPRF1 = GetHasFeat(842, oPC); break; -case 844: nPRF1 = GetHasFeat(39, oPC); nPRF2 = GetHasFeat(21, oPC); break; -case 845: nPRF1 = GetHasFeat(844, oPC); break; -case 846: nPRF1 = GetHasFeat(845, oPC); break; -case 847: nPRF1 = GetHasFeat(846, oPC); break; -case 848: nPRF1 = GetHasFeat(847, oPC); break; -case 849: nPRF1 = GetHasFeat(848, oPC); break; - } - } - } - else if (nFeat < 900) - { - if (nFeat < 860) - { - switch (nFeat) - { -case 850: nPRF1 = GetHasFeat(849, oPC); break; -case 851: nPRF1 = GetHasFeat(850, oPC); break; -case 852: nPRF1 = GetHasFeat(851, oPC); break; -case 853: nPRF1 = GetHasFeat(852, oPC); break; -case 854: nPRF1 = GetHasFeat(294, oPC); break; -case 856: nPRF1 = GetHasFeat(212, oPC); nPRF2 = GetHasFeat(223, oPC); break; -case 857: nPRF1 = GetHasFeat(29, oPC); break; -case 858: nPRF1 = GetHasFeat(857, oPC); break; -case 859: nPRF1 = GetHasFeat(858, oPC); break; - } - } - else if (nFeat < 870) - { - switch (nFeat) - { -case 860: nPRF1 = GetHasFeat(33, oPC); break; -case 861: nPRF1 = GetHasFeat(860, oPC); break; -case 862: nPRF1 = GetHasFeat(861, oPC); break; -case 863: nPRF1 = GetHasFeat(37, oPC); break; -case 864: nPRF1 = GetHasFeat(863, oPC); break; -case 865: nPRF1 = GetHasFeat(864, oPC); break; -case 867: nPRF1 = GetHasFeat(392, oPC); nPRF2 = GetHasFeat(389, oPC); break; -case 868: nPRF1 = GetHasFeat(867, oPC); break; -case 869: nPRF1 = GetHasFeat(331, oPC); break; - } - } - else if (nFeat < 880) - { - switch (nFeat) - { -case 870: nPRF1 = GetHasFeat(373, oPC); break; -case 872: nPRF1 = GetHasFeat(903, oPC); break; -case 873: nORF1 = GetHasFeat(338, oPC); nORF2 = GetHasFeat(903, oPC); break; -case 879: nPRF1 = GetHasFeat(98, oPC); break; - } - } - else if (nFeat < 890) - { - switch (nFeat) - { -case 880: nPRF1 = GetHasFeat(117, oPC); break; -case 881: nPRF1 = GetHasFeat(118, oPC); break; -case 887: nPRF1 = GetHasFeat(886, oPC); break; -case 888: nPRF1 = GetHasFeat(887, oPC); break; - } - } - else //<900 - { - switch (nFeat) - { -case 893: nPRF1 = GetHasFeat(892, oPC); break; -case 897: nPRF1 = GetHasFeat(893, oPC); break; - } - } - } - else if (nFeat < 950) - { - if (nFeat < 910) - { - switch (nFeat) - { -case 900: nPRF1 = GetHasFeat(898, oPC); break; -case 901: nPRF1 = GetHasFeat(900, oPC); break; -case 903: nPRF1 = GetHasFeat(901, oPC); break; -case 905: nPRF1 = GetHasFeat(904, oPC); break; -case 906: nPRF1 = GetHasFeat(905, oPC); break; -case 907: nPRF1 = GetHasFeat(906, oPC); break; -case 908: nPRF1 = GetHasFeat(907, oPC); break; - } - } - else if (nFeat < 920) - { - switch (nFeat) - { -case 910: nORF1 = GetHasFeat(301, oPC); nORF2 = GetHasFeat(472, oPC); break; -case 919: nPRF1 = GetHasFeat(43, oPC); break; - } - } - else if (nFeat < 930) - { - switch (nFeat) - { -case 920: nPRF1 = GetHasFeat(90, oPC); break; -case 921: nPRF1 = GetHasFeat(94, oPC); break; -case 922: nPRF1 = GetHasFeat(95, oPC); break; -case 923: nPRF1 = GetHasFeat(96, oPC); break; -case 924: nPRF1 = GetHasFeat(97, oPC); break; -case 925: nPRF1 = GetHasFeat(103, oPC); break; -case 926: nPRF1 = GetHasFeat(104, oPC); break; -case 927: nPRF1 = GetHasFeat(105, oPC); break; -case 928: nPRF1 = GetHasFeat(106, oPC); break; -case 929: nPRF1 = GetHasFeat(107, oPC); break; - } - } - else if (nFeat < 940) - { - switch (nFeat) - { -case 930: nPRF1 = GetHasFeat(108, oPC); break; -case 931: nPRF1 = GetHasFeat(110, oPC); break; -case 932: nPRF1 = GetHasFeat(111, oPC); break; -case 933: nPRF1 = GetHasFeat(112, oPC); break; -case 934: nPRF1 = GetHasFeat(113, oPC); break; -case 935: nPRF1 = GetHasFeat(114, oPC); break; -case 936: nPRF1 = GetHasFeat(115, oPC); break; -case 937: nPRF1 = GetHasFeat(116, oPC); break; -case 938: nPRF1 = GetHasFeat(121, oPC); break; -case 939: nPRF1 = GetHasFeat(122, oPC); break; - } - } - else //<950 - { - switch (nFeat) - { -case 940: nPRF1 = GetHasFeat(123, oPC); break; -case 941: nPRF1 = GetHasFeat(125, oPC); break; -case 942: nPRF1 = GetHasFeat(126, oPC); break; -case 943: nPRF1 = GetHasFeat(127, oPC); break; - } - } - } - else if (nFeat < 1000) - { - if (nFeat < 960) - { - switch (nFeat) - { -case 950: nPRF1 = GetHasFeat(949, oPC); break; -case 951: nPRF1 = GetHasFeat(950, oPC); break; -case 952: nPRF1 = GetHasFeat(44, oPC); break; -case 953: nPRF1 = GetHasFeat(952, oPC); break; -case 954: nPRF1 = GetHasFeat(44, oPC); break; -case 955: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(958, oPC); break; -case 956: nPRF1 = GetHasFeat(952, oPC); break; -case 957: nPRF1 = GetHasFeat(953, oPC); nPRF2 = GetHasFeat(956, oPC); break; -case 958: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(954, oPC); break; -case 959: nPRF1 = GetHasFeat(952, oPC); break; - } - } - else if (nFeat < 990) - { - switch (nFeat) - { -case 988: nPRF1 = GetHasFeat(329, oPC); break; -case 989: nPRF1 = GetHasFeat(329, oPC); break; - } - } - else //<1000 - { - switch (nFeat) - { -case 993: nPRF1 = GetHasFeat(44, oPC); break; -case 994: nPRF1 = GetHasFeat(993, oPC); break; -case 995: nPRF1 = GetHasFeat(44, oPC); break; -case 996: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(999, oPC); break; -case 997: nPRF1 = GetHasFeat(993, oPC); break; -case 998: nPRF1 = GetHasFeat(994, oPC); nPRF2 = GetHasFeat(997, oPC); break; -case 999: nPRF1 = GetHasFeat(391, oPC); nPRF2 = GetHasFeat(995, oPC); break; - } - } - } - else //through 1071 - { - if (nFeat < 1010) - { - switch (nFeat) - { -case 1000: nPRF1 = GetHasFeat(993, oPC); break; -case 1002: nPRF1 = GetHasFeat(435, oPC); break; -case 1003: nPRF1 = GetHasFeat(475, oPC); break; - } - } - else if (nFeat < 1050) - { - switch (nFeat) - { -case 1045: nPRF1 = GetHasFeat(449, oPC); break; -case 1046: nPRF1 = GetHasFeat(1045, oPC); break; -case 1047: nPRF1 = GetHasFeat(1046, oPC); break; -case 1048: nPRF1 = GetHasFeat(1047, oPC); break; -case 1049: nPRF1 = GetHasFeat(1048, oPC); break; - } - } - else if (nFeat < 1060) - { - switch (nFeat) - { -case 1050: nPRF1 = GetHasFeat(1049, oPC); break; -case 1051: nPRF1 = GetHasFeat(1050, oPC); break; -case 1052: nPRF1 = GetHasFeat(1051, oPC); break; -case 1053: nPRF1 = GetHasFeat(1052, oPC); break; -case 1054: nPRF1 = GetHasFeat(1053, oPC); break; -case 1055: nPRF1 = GetHasFeat(1054, oPC); break; -case 1056: nPRF1 = GetHasFeat(1055, oPC); break; -case 1057: nPRF1 = GetHasFeat(1056, oPC); break; -case 1058: nPRF1 = GetHasFeat(1057, oPC); break; -case 1059: nPRF1 = GetHasFeat(1058, oPC); break; - } - } - else //through 1071 - { - switch (nFeat) - { -case 1060: nPRF1 = GetHasFeat(903, oPC); break; -case 1061: nPRF1 = GetHasFeat(903, oPC); break; -case 1067: nPRF1 = GetHasFeat(334, oPC); break; -case 1070: nPRF1 = GetHasFeat(466, oPC); break; -case 1071: nPRF1 = GetHasFeat(884, oPC); break; - } - } - } - } -return ((nPRF1 && nPRF2) && (nORF1 || nORF2 || nORF3 || nORF4 || nORF5)); -} - -int GetIsFeatFirstLevelOnly(int nFeat) -{ -switch(nFeat) - { - case 378: return TRUE; break; - case 379: return TRUE; break; - case 380: return TRUE; break; - case 381: return TRUE; break; - case 382: return TRUE; break; - case 384: return TRUE; break; - case 386: return TRUE; break; - case 388: return TRUE; break; - default : return FALSE; break; - } -return -3; -} - -int GetIsFeatDevCrit(int nFeat) -{ -if (nFeat > 494 && nFeat <532) return TRUE; -else if (nFeat == 955 || nFeat == 996) return TRUE; -else return FALSE; -} - -int GetHasRequiredSpellLevelForFeat(object oPC, int nFeat) -{ -int nReturn = TRUE; -switch(nFeat) - { - case 7: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 12: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 33: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 35: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 36: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 37: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 166: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 167: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 168: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 169: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 170: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 171: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 172: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 1) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 1) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 2) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 4)); break; - case 11: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 4) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 3) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 3) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 4) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 8) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 8)); break; - case 25: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 6) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 5) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 5) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 11) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 11)); break; - case 29: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 8) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 7) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 7) || (GetLevelByClass(CLASS_TYPE_BARD, oPC) >= 10) || (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 14) || (GetLevelByClass(CLASS_TYPE_PALADIN, oPC) >= 14)); break; - case 31: nReturn = FALSE; break; - case 610: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 611: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 612: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 613: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 614: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 615: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 616: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 617: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 857: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 858: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 859: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 860: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 861: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 862: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 863: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 864: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - case 865: nReturn = ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 17) || (GetLevelByClass(CLASS_TYPE_SORCERER, oPC) >= 18) || ((GetLevelByClass(CLASS_TYPE_WIZARD, oPC) + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)/2)) >= 17) || (GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 17)); break; - default: nReturn = TRUE; break; - } -return nReturn; -} - -string GetNameOfFeat(int nFeat) -{ -string sName; -if (nFeat < 250) - { - if (nFeat < 50) - { - if (nFeat < 10) - { - switch (nFeat) - { -case 0: sName = "Alertness"; break; -case 1: sName = "Ambidexterity"; break; -case 2: sName = "Armor Proficiency Heavy"; break; -case 3: sName = "Armor Proficiency Light"; break; -case 4: sName = "Armor Proficiency Medium"; break; -case 5: sName = "Called Shot"; break; -case 6: sName = "Cleave"; break; -case 7: sName = "Combat Casting"; break; -case 8: sName = "Deflect Arrows"; break; -case 9: sName = "Disarm"; break; - } - } - else if (nFeat < 20) - { - switch (nFeat) - { -case 10: sName = "Dodge"; break; -case 11: sName = "Empower Spell"; break; -case 12: sName = "Extend Spell"; break; -case 13: sName = "Extra Turning"; break; -case 14: sName = "Great Fortitude"; break; -case 15: sName = "Improved Critical Club"; break; -case 16: sName = "Improved Disarm"; break; -case 17: sName = "Improved Knockdown"; break; -case 18: sName = "Improved Parry"; break; -case 19: sName = "Improved Power Attack"; break; - } - } - else if (nFeat < 30) - { - switch (nFeat) - { -case 20: sName = "Improved Two Weapon Fighting"; break; -case 21: sName = "Improved Unarmed Strike"; break; -case 22: sName = "Iron Will"; break; -case 23: sName = "Knockdown"; break; -case 24: sName = "Lightning Reflexes"; break; -case 25: sName = "Maximize Spell"; break; -case 26: sName = "Mobility"; break; -case 27: sName = "Point Blank Shot"; break; -case 28: sName = "Power Attack"; break; -case 29: sName = "Quicken Spell"; break; - } - } - else if (nFeat < 40) - { - switch (nFeat) - { -case 30: sName = "Rapid Shot"; break; -case 31: sName = "Sap"; break; -case 32: sName = "Shield Proficiency"; break; -case 33: sName = "Silence Spell"; break; -case 34: sName = "Skill Focus Animal Empathy"; break; -case 35: sName = "Spell Focus Abjuration"; break; -case 36: sName = "Spell Penetration"; break; -case 37: sName = "Still Spell"; break; -case 39: sName = "Stunning Fist"; break; - } - } - else //<50 - { - switch (nFeat) - { -case 40: sName = "Toughness"; break; -case 41: sName = "Two Weapon Fighting"; break; -case 42: sName = "Weapon Finesse"; break; -case 43: sName = "Weapon Focus Club"; break; -case 44: sName = "Weapon Proficiency Exotic"; break; -case 45: sName = "Weapon Proficiency Martial"; break; -case 46: sName = "Weapon Proficiency Simple"; break; -case 47: sName = "Weapon Specialization Club"; break; -case 48: sName = "Weapon Proficiency Druid"; break; -case 49: sName = "Weapon Proficiency Monk"; break; - } - } - } - else if (nFeat < 100) - { - if (nFeat < 60) - { - switch (nFeat) - { -case 50: sName = "Weapon Proficiency Rogue"; break; -case 51: sName = "Weapon Proficiency Wizard"; break; -case 52: sName = "Improved Critical Dagger"; break; -case 53: sName = "Improved Critical Dart"; break; -case 54: sName = "Improved Critical Heavy Crossbow"; break; -case 55: sName = "Improved Critical Light Crossbow"; break; -case 56: sName = "Improved Critical Light Mace"; break; -case 57: sName = "Improved Critical Morning Star"; break; -case 58: sName = "Improved Critical Staff"; break; -case 59: sName = "Improved Critical Spear"; break; - } - } - else if (nFeat < 70) - { - switch (nFeat) - { -case 60: sName = "Improved Critical Sickle"; break; -case 61: sName = "Improved Critical Sling"; break; -case 62: sName = "Improved Critical Unarmed Strike"; break; -case 63: sName = "Improved Critical Longbow"; break; -case 64: sName = "Improved Critical Shortbow"; break; -case 65: sName = "Improved Critical Short Sword"; break; -case 66: sName = "Improved Critical Rapier"; break; -case 67: sName = "Improved Critical Scimitar"; break; -case 68: sName = "Improved Critical Long Sword"; break; -case 69: sName = "Improved Critical Great Sword"; break; - } - } - else if (nFeat < 80) - { - switch (nFeat) - { -case 70: sName = "Improved Critical Hand Axe"; break; -case 71: sName = "Improved Critical Throwing Axe"; break; -case 72: sName = "Improved Critical Battle Axe"; break; -case 73: sName = "Improved Critical Great Axe"; break; -case 74: sName = "Improved Critical Halberd"; break; -case 75: sName = "Improved Critical Light Hammer"; break; -case 76: sName = "Improved Critical Light Flail"; break; -case 77: sName = "Improved Critical War Hammer"; break; -case 78: sName = "Improved Critical Heavy Flail"; break; -case 79: sName = "Improved Critical Kama"; break; - } - } - else if (nFeat < 90) - { - switch (nFeat) - { -case 80: sName = "Improved Critical Kukri"; break; -case 82: sName = "Improved Critical Shuriken"; break; -case 83: sName = "Improved Critical Scythe"; break; -case 84: sName = "Improved Critical Katana"; break; -case 85: sName = "Improved Critical Bastard Sword"; break; -case 87: sName = "Improved Critical Dire Mace"; break; -case 88: sName = "Improved Critical Double Axe"; break; -case 89: sName = "Improved Critical Two Bladed Sword"; break; - } - } - else //<100 - { - switch (nFeat) - { -case 90: sName = "Weapon Focus Dagger"; break; -case 91: sName = "Weapon Focus Dart"; break; -case 92: sName = "Weapon Focus Heavy Crossbow"; break; -case 93: sName = "Weapon Focus Light Crossbow"; break; -case 94: sName = "Weapon Focus Light Mace"; break; -case 95: sName = "Weapon Focus Morning Star"; break; -case 96: sName = "Weapon Focus Staff"; break; -case 97: sName = "Weapon Focus Spear"; break; -case 98: sName = "Weapon Focus Sickle"; break; -case 99: sName = "Weapon Focus Sling"; break; - } - } - } - else if (nFeat < 150) - { - if (nFeat < 110) - { - switch (nFeat) - { -case 100: sName = "Weapon Focus Unarmed Strike"; break; -case 101: sName = "Weapon Focus Longbow"; break; -case 102: sName = "Weapon Focus Shortbow"; break; -case 103: sName = "Weapon Focus Short Sword"; break; -case 104: sName = "Weapon Focus Rapier"; break; -case 105: sName = "Weapon Focus Scimitar"; break; -case 106: sName = "Weapon Focus Long Sword"; break; -case 107: sName = "Weapon Focus Great Sword"; break; -case 108: sName = "Weapon Focus Hand Axe"; break; -case 109: sName = "Weapon Focus Throwing Axe"; break; - } - } - else if (nFeat < 120) - { - switch (nFeat) - { -case 110: sName = "Weapon Focus Battle Axe"; break; -case 111: sName = "Weapon Focus Great Axe"; break; -case 112: sName = "Weapon Focus Halberd"; break; -case 113: sName = "Weapon Focus Light Hammer"; break; -case 114: sName = "Weapon Focus Light Flail"; break; -case 115: sName = "Weapon Focus War Hammer"; break; -case 116: sName = "Weapon Focus Heavy Flail"; break; -case 117: sName = "Weapon Focus Kama"; break; -case 118: sName = "Weapon Focus Kukri"; break; - } - } - else if (nFeat < 130) - { - switch (nFeat) - { -case 120: sName = "Weapon Focus Shuriken"; break; -case 121: sName = "Weapon Focus Scythe"; break; -case 122: sName = "Weapon Focus Katana"; break; -case 123: sName = "Weapon Focus Bastard Sword"; break; -case 125: sName = "Weapon Focus Dire Mace"; break; -case 126: sName = "Weapon Focus Double Axe"; break; -case 127: sName = "Weapon Focus Two Bladed Sword"; break; -case 128: sName = "Weapon Specialization Dagger"; break; -case 129: sName = "Weapon Specialization Dart"; break; - } - } - else if (nFeat < 140) - { - switch (nFeat) - { -case 130: sName = "Weapon Specialization Heavy Crossbow"; break; -case 131: sName = "Weapon Specialization Light Crossbow"; break; -case 132: sName = "Weapon Specialization Light Mace"; break; -case 133: sName = "Weapon Specialization Morning Star"; break; -case 134: sName = "Weapon Specialization Staff"; break; -case 135: sName = "Weapon Specialization Spear"; break; -case 136: sName = "Weapon Specialization Sickle"; break; -case 137: sName = "Weapon Specialization Sling"; break; -case 138: sName = "Weapon Specialization Unarmed Strike"; break; -case 139: sName = "Weapon Specialization Longbow"; break; - } - } - else //<150 - { - switch (nFeat) - { -case 140: sName = "Weapon Specialization Shortbow"; break; -case 141: sName = "Weapon Specialization Short Sword"; break; -case 142: sName = "Weapon Specialization Rapier"; break; -case 143: sName = "Weapon Specialization Scimitar"; break; -case 144: sName = "Weapon Specialization Long Sword"; break; -case 145: sName = "Weapon Specialization Great Sword"; break; -case 146: sName = "Weapon Specialization Hand Axe"; break; -case 147: sName = "Weapon Specialization Throwing Axe"; break; -case 148: sName = "Weapon Specialization Battle Axe"; break; -case 149: sName = "Weapon Specialization Great Axe"; break; - } - } - } - else if (nFeat < 200) - { - if (nFeat < 160) - { - switch (nFeat) - { -case 150: sName = "Weapon Specialization Halberd"; break; -case 151: sName = "Weapon Specialization Light Hammer"; break; -case 152: sName = "Weapon Specialization Light Flail"; break; -case 153: sName = "Weapon Specialization War Hammer"; break; -case 154: sName = "Weapon Specialization Heavy Flail"; break; -case 155: sName = "Weapon Specialization Kama"; break; -case 156: sName = "Weapon Specialization Kukri"; break; -case 158: sName = "Weapon Specialization Shuriken"; break; -case 159: sName = "Weapon Specialization Scythe"; break; - } - } - else if (nFeat < 170) - { - switch (nFeat) - { -case 160: sName = "Weapon Specialization Katana"; break; -case 161: sName = "Weapon Specialization Bastard Sword"; break; -case 163: sName = "Weapon Specialization Dire Mace"; break; -case 164: sName = "Weapon Specialization Double Axe"; break; -case 165: sName = "Weapon Specialization Two Bladed Sword"; break; -case 166: sName = "Spell Focus Conjuration"; break; -case 167: sName = "Spell Focus Divination"; break; -case 168: sName = "Spell Focus Enchantment"; break; -case 169: sName = "Spell Focus Evocation"; break; - } - } - else if (nFeat < 180) - { - switch (nFeat) - { -case 170: sName = "Spell Focus Illusion"; break; -case 171: sName = "Spell Focus Necromancy"; break; -case 172: sName = "Spell Focus Transmutation"; break; -case 173: sName = "Skill Focus Concentration"; break; -case 174: sName = "Skill Focus Disable Trap"; break; -case 175: sName = "Skill Focus Discipline"; break; -case 177: sName = "Skill Focus Heal"; break; -case 178: sName = "Skill Focus Hide"; break; -case 179: sName = "Skill Focus Listen"; break; - } - } - else if (nFeat < 190) - { - switch (nFeat) - { -case 180: sName = "Skill Focus Lore"; break; -case 181: sName = "Skill Focus Move Silently"; break; -case 182: sName = "Skill Focus Open Lock"; break; -case 183: sName = "Skill Focus Parry"; break; -case 184: sName = "Skill Focus Perform"; break; -case 185: sName = "Skill Focus Persuade"; break; -case 186: sName = "Skill Focus Pick Pocket"; break; -case 187: sName = "Skill Focus Search"; break; -case 188: sName = "Skill Focus Set Trap"; break; -case 189: sName = "Skill Focus Spellcraft"; break; - } - } - else //<200 - { - switch (nFeat) - { -case 190: sName = "Skill Focus Spot"; break; -case 192: sName = "Skill Focus Taunt"; break; -case 193: sName = "Skill Focus Use Magic Device"; break; -case 194: sName = "Barbarian Endurance"; break; -case 195: sName = "Uncanny Dodge 1"; break; -case 196: sName = "Damage Reduction"; break; -case 197: sName = "Bardic Knowledge"; break; -case 198: sName = "Nature Sense"; break; -case 199: sName = "Animal Companion"; break; - } - } - } - else //<250 - { - if (nFeat < 210) - { - switch (nFeat) - { -case 200: sName = "Woodland Stride"; break; -case 201: sName = "Trackless Step"; break; -case 202: sName = "Resist Natures Lure"; break; -case 203: sName = "Venom Immunity"; break; -case 204: sName = "Flurry Of Blows"; break; -case 206: sName = "Evasion"; break; -case 207: sName = "Monk Endurance"; break; -case 208: sName = "Still Mind"; break; -case 209: sName = "Purity Of Body"; break; - } - } - else if (nFeat < 220) - { - switch (nFeat) - { -case 211: sName = "Wholeness Of Body"; break; -case 212: sName = "Improved Evasion"; break; -case 213: sName = "Ki Strike"; break; -case 214: sName = "Diamond Body"; break; -case 215: sName = "Diamond Soul"; break; -case 216: sName = "Perfect Self"; break; -case 217: sName = "Divine Grace"; break; -case 219: sName = "Divine Health"; break; - } - } - else if (nFeat < 230) - { - switch (nFeat) - { -case 221: sName = "Sneak Attack"; break; -case 222: sName = "Crippling Strike"; break; -case 223: sName = "Defensive Roll"; break; -case 224: sName = "Opportunist"; break; -case 225: sName = "Skill Mastery"; break; -case 226: sName = "Uncanny Reflex"; break; -case 227: sName = "Stonecunning"; break; -case 228: sName = "Darkvision"; break; -case 229: sName = "Hardiness Versus Poisons"; break; - } - } - else if (nFeat < 240) - { - switch (nFeat) - { -case 230: sName = "Hardiness Versus Spells"; break; -case 231: sName = "Battle Training Versus Orcs"; break; -case 232: sName = "Battle Training Versus Goblins"; break; -case 233: sName = "Battle Training Versus Giants"; break; -case 234: sName = "Skill Affinity Lore"; break; -case 235: sName = "Immunity To Sleep"; break; -case 236: sName = "Hardiness Versus Enchantments"; break; -case 237: sName = "Skill Affinity Listen"; break; -case 238: sName = "Skill Affinity Search"; break; -case 239: sName = "Skill Affinity Spot"; break; - } - } - else //<250 - { - switch (nFeat) - { -case 240: sName = "Keen Sense"; break; -case 241: sName = "Hardiness Versus Illusions"; break; -case 242: sName = "Battle Training Versus Reptilians"; break; -case 243: sName = "Skill Affinity Concentration"; break; -case 244: sName = "Partial Skill Affinity Listen"; break; -case 245: sName = "Partial Skill Affinity Search"; break; -case 246: sName = "Partial Skill Affinity Spot"; break; -case 247: sName = "Skill Affinity Move Silently"; break; -case 248: sName = "Lucky"; break; -case 249: sName = "Fearless"; break; - } - } - } - } -else if (nFeat < 500) - { - if (nFeat < 300) - { - if (nFeat < 260) - { - switch (nFeat) - { -case 250: sName = "Good Aim"; break; -case 251: sName = "Uncanny Dodge 2"; break; -case 252: sName = "Uncanny Dodge 3"; break; -case 253: sName = "Uncanny Dodge 4"; break; -case 254: sName = "Uncanny Dodge 5"; break; -case 255: sName = "Uncanny Dodge 6"; break; -case 256: sName = "Weapon Proficiency Elf"; break; -case 257: sName = "Bard Songs"; break; -case 258: sName = "Quick To Master"; break; -case 259: sName = "Slippery Mind"; break; - } - } - else if (nFeat < 270) - { - switch (nFeat) - { -case 260: sName = "Monk Ac Bonus"; break; -case 261: sName = "Favored Enemy Dwarf"; break; -case 262: sName = "Favored Enemy Elf"; break; -case 263: sName = "Favored Enemy Gnome"; break; -case 264: sName = "Favored Enemy Halfling"; break; -case 265: sName = "Favored Enemy Halfelf"; break; -case 266: sName = "Favored Enemy Halforc"; break; -case 267: sName = "Favored Enemy Human"; break; -case 268: sName = "Favored Enemy Aberration"; break; -case 269: sName = "Favored Enemy Animal"; break; - } - } - else if (nFeat < 280) - { - switch (nFeat) - { -case 270: sName = "Favored Enemy Beast"; break; -case 271: sName = "Favored Enemy Construct"; break; -case 272: sName = "Favored Enemy Dragon"; break; -case 273: sName = "Favored Enemy Goblinoid"; break; -case 274: sName = "Favored Enemy Monstrous"; break; -case 275: sName = "Favored Enemy Orc"; break; -case 276: sName = "Favored Enemy Reptilian"; break; -case 277: sName = "Favored Enemy Elemental"; break; -case 278: sName = "Favored Enemy Fey"; break; -case 279: sName = "Favored Enemy Giant"; break; - } - } - else if (nFeat < 290) - { - switch (nFeat) - { -case 280: sName = "Favored Enemy Magical Beast"; break; -case 281: sName = "Favored Enemy Outsider"; break; -case 284: sName = "Favored Enemy Shapechanger"; break; -case 285: sName = "Favored Enemy Undead"; break; -case 286: sName = "Favored Enemy Vermin"; break; -case 289: sName = "Weapon Proficiency Creature"; break; - } - } - else //<300 - { - switch (nFeat) - { -case 290: sName = "Weapon Specialization Creature"; break; -case 291: sName = "Weapon Focus Creature"; break; -case 292: sName = "Improved Critical Creature"; break; -case 293: sName = "Barbarian Rage"; break; -case 294: sName = "Turn Undead"; break; -case 296: sName = "Quivering Palm"; break; -case 297: sName = "Empty Body"; break; -case 299: sName = "Lay On Hands"; break; - } - } - } - else if (nFeat < 350) - { - if (nFeat < 310) - { - switch (nFeat) - { -case 300: sName = "Aura Of Courage"; break; -case 301: sName = "Smite Evil"; break; -case 302: sName = "Remove Disease"; break; -case 303: sName = "Summon Familiar"; break; -case 304: sName = "Elemental Shape"; break; -case 305: sName = "Wild Shape"; break; -case 306: sName = "War Domain Power"; break; -case 307: sName = "Strength Domain Power"; break; -case 308: sName = "Protection Domain Power"; break; -case 309: sName = "Luck Domain Power"; break; - } - } - else if (nFeat < 320) - { - switch (nFeat) - { -case 310: sName = "Death Domain Power"; break; -case 311: sName = "Air Domain Power"; break; -case 312: sName = "Animal Domain Power"; break; -case 313: sName = "Destruction Domain Power"; break; -case 314: sName = "Earth Domain Power"; break; -case 315: sName = "Evil Domain Power"; break; -case 316: sName = "Fire Domain Power"; break; -case 317: sName = "Good Domain Power"; break; -case 318: sName = "Healing Domain Power"; break; -case 319: sName = "Knowledge Domain Power"; break; - } - } - else if (nFeat < 330) - { - switch (nFeat) - { -case 320: sName = "Magic Domain Power"; break; -case 321: sName = "Plant Domain Power"; break; -case 322: sName = "Sun Domain Power"; break; -case 323: sName = "Travel Domain Power"; break; -case 324: sName = "Trickery Domain Power"; break; -case 325: sName = "Water Domain Power"; break; -case 326: sName = "Barbarian Rage"; break; -case 327: sName = "Barbarian Rage"; break; -case 328: sName = "Barbarian Rage"; break; -case 329: sName = "Barbarian Rage"; break; - } - } - else if (nFeat < 340) - { - switch (nFeat) - { -case 330: sName = "Barbarian Rage"; break; -case 331: sName = "Barbarian Rage"; break; -case 332: sName = "Damage Reduction"; break; -case 333: sName = "Damage Reduction"; break; -case 334: sName = "Damage Reduction"; break; -case 335: sName = "Wild Shape"; break; -case 336: sName = "Wild Shape"; break; -case 337: sName = "Wild Shape"; break; -case 338: sName = "Wild Shape"; break; -case 339: sName = "Wild Shape"; break; - } - } - else //<350 - { - switch (nFeat) - { -case 340: sName = "Elemental Shape"; break; -case 341: sName = "Elemental Shape"; break; -case 342: sName = "Elemental Shape"; break; -case 343: sName = "Ki Strike"; break; -case 344: sName = "Ki Strike"; break; -case 345: sName = "Sneak Attack"; break; -case 346: sName = "Sneak Attack"; break; -case 347: sName = "Sneak Attack"; break; -case 348: sName = "Sneak Attack"; break; -case 349: sName = "Sneak Attack"; break; - } - } - } - else if (nFeat < 400) - { - if (nFeat < 360) - { - switch (nFeat) - { -case 350: sName = "Sneak Attack"; break; -case 351: sName = "Sneak Attack"; break; -case 352: sName = "Sneak Attack"; break; -case 353: sName = "Sneak Attack"; break; -case 354: sName = "Lowlightvision"; break; -case 355: sName = "Bard Songs"; break; -case 356: sName = "Bard Songs"; break; -case 357: sName = "Bard Songs"; break; -case 358: sName = "Bard Songs"; break; -case 359: sName = "Bard Songs"; break; - } - } - else if (nFeat < 370) - { - switch (nFeat) - { -case 360: sName = "Bard Songs"; break; -case 361: sName = "Bard Songs"; break; -case 362: sName = "Bard Songs"; break; -case 363: sName = "Bard Songs"; break; -case 364: sName = "Bard Songs"; break; -case 365: sName = "Bard Songs"; break; -case 366: sName = "Bard Songs"; break; -case 367: sName = "Bard Songs"; break; -case 368: sName = "Bard Songs"; break; -case 369: sName = "Bard Songs"; break; - } - } - else if (nFeat < 380) - { - switch (nFeat) - { -case 370: sName = "Bard Songs"; break; -case 371: sName = "Bard Songs"; break; -case 372: sName = "Bard Songs"; break; -case 373: sName = "Bard Songs"; break; -case 374: sName = "Ambidexterity"; break; -case 375: sName = "Ambidexterity"; break; -case 377: sName = "Improved Initiative"; break; -case 378: sName = "Artist"; break; -case 379: sName = "Blooded"; break; - } - } - else if (nFeat < 390) - { - switch (nFeat) - { -case 380: sName = "Bullheaded"; break; -case 381: sName = "Courteous Magocracy"; break; -case 382: sName = "Luck Of Heroes"; break; -case 383: sName = "Resist Poison"; break; -case 384: sName = "Silver Palm"; break; -case 385: sName = "Smooth Talk"; break; -case 386: sName = "Snake Blood"; break; -case 387: sName = "Stealthy"; break; -case 388: sName = "Strong Soul"; break; -case 389: sName = "Expertise"; break; - } - } - else //<400 - { - switch (nFeat) - { -case 390: sName = "Improved Expertise"; break; -case 391: sName = "Great Cleave"; break; -case 392: sName = "Spring Attack"; break; -case 393: sName = "Greater Spell Focus Abjuration"; break; -case 394: sName = "Greater Spell Focus Conjuration"; break; -case 395: sName = "Greater Spell Focus Divination"; break; -case 396: sName = "Greater Spell Focus Enchantment"; break; -case 397: sName = "Greater Spell Focus Evocation"; break; -case 398: sName = "Greater Spell Focus Illusion"; break; -case 399: sName = "Greater Spell Focus Necromancy"; break; - } - } - } - else if (nFeat < 450) - { - if (nFeat < 410) - { - switch (nFeat) - { -case 400: sName = "Greater Spell Focus Transmutation"; break; -case 401: sName = "Greater Spell Penetration"; break; -case 402: sName = "Thug"; break; -case 403: sName = "Mercantile Background"; break; -case 404: sName = "Skill Focus Appraise"; break; -case 406: sName = "Skill Focus Tumble"; break; -case 407: sName = "Skill Focus Craft Trap"; break; -case 408: sName = "Blind Fight"; break; -case 409: sName = "Circle Kick"; break; - } - } - else if (nFeat < 420) - { - switch (nFeat) - { -case 410: sName = "Extra Stunning Attack"; break; -case 411: sName = "Rapid Reload"; break; -case 412: sName = "Zen Archery"; break; -case 413: sName = "Divine Might"; break; -case 414: sName = "Divine Shield"; break; -case 415: sName = "Arcane Defense Abjuration"; break; -case 416: sName = "Arcane Defense Conjuration"; break; -case 417: sName = "Arcane Defense Divination"; break; -case 418: sName = "Arcane Defense Enchatment"; break; -case 419: sName = "Arcane Defense Evocation"; break; - } - } - else if (nFeat < 430) - { - switch (nFeat) - { -case 420: sName = "Arcane Defense Illusion"; break; -case 421: sName = "Arcane Defense Necromancy"; break; -case 422: sName = "Arcane Defense Transmutation"; break; -case 423: sName = "Extra Music"; break; -case 424: sName = "Lingering Song"; break; -case 425: sName = "Dirty Fighting"; break; -case 426: sName = "Resist Disease"; break; -case 427: sName = "Resist Energy Cold"; break; -case 428: sName = "Resist Energy Acid"; break; -case 429: sName = "Resist Energy Fire"; break; - } - } - else if (nFeat < 440) - { - switch (nFeat) - { -case 430: sName = "Resist Energy Electrical"; break; -case 431: sName = "Resist Energy Sonic"; break; -case 433: sName = "Hide In Plain Sight"; break; -case 434: sName = "Shadow Daze"; break; -case 435: sName = "Summon Shadow"; break; -case 436: sName = "Shadow Evade"; break; -case 437: sName = "Deneirs Eye"; break; -case 438: sName = "Tymoras Smile"; break; -case 439: sName = "Lliiras Heart"; break; - } - } - else //<450 - { - switch (nFeat) - { -case 440: sName = "Craft Harper Item"; break; -case 441: sName = "Harper Sleep"; break; -case 442: sName = "Harper Cats Grace"; break; -case 443: sName = "Harper Eagles Splendor"; break; -case 444: sName = "Harper Invisibility"; break; -case 445: sName = "Prestige Enchant Arrow 1"; break; -case 446: sName = "Prestige Enchant Arrow 2"; break; -case 447: sName = "Prestige Enchant Arrow 3"; break; -case 448: sName = "Prestige Enchant Arrow 4"; break; -case 449: sName = "Prestige Enchant Arrow 5"; break; - } - } - } - else //<500 - { - if (nFeat < 460) - { - switch (nFeat) - { -case 450: sName = "Prestige Embue Arrow"; break; -case 451: sName = "Prestige Seeker Arrow 1"; break; -case 452: sName = "Prestige Seeker Arrow 2"; break; -case 453: sName = "Prestige Hail Of Arrows"; break; -case 454: sName = "Prestige Arrow Of Death"; break; -case 455: sName = "Prestige Death Attack 1"; break; -case 456: sName = "Prestige Death Attack 2"; break; -case 457: sName = "Prestige Death Attack 3"; break; -case 458: sName = "Prestige Death Attack 4"; break; -case 459: sName = "Prestige Death Attack 5"; break; - } - } - else if (nFeat < 470) - { - switch (nFeat) - { -case 460: sName = "Blackguard Sneak Attack 1d6"; break; -case 461: sName = "Blackguard Sneak Attack 2d6"; break; -case 462: sName = "Blackguard Sneak Attack 3d6"; break; -case 463: sName = "Prestige Poison Save 1"; break; -case 464: sName = "Prestige Poison Save 2"; break; -case 465: sName = "Prestige Poison Save 3"; break; -case 466: sName = "Prestige Poison Save 4"; break; -case 467: sName = "Prestige Poison Save 5"; break; -case 468: sName = "Prestige Spell Ghostly Visage"; break; -case 469: sName = "Prestige Darkness"; break; - } - } - else if (nFeat < 480) - { - switch (nFeat) - { -case 470: sName = "Prestige Invisibility 1"; break; -case 471: sName = "Prestige Invisibility 2"; break; -case 472: sName = "Smite Good"; break; -case 473: sName = "Prestige Dark Blessing"; break; -case 474: sName = "Inflict Light Wounds"; break; -case 475: sName = "Inflict Moderate Wounds"; break; -case 476: sName = "Inflict Serious Wounds"; break; -case 477: sName = "Inflict Critical Wounds"; break; -case 478: sName = "Bulls Strength"; break; -case 479: sName = "Contagion"; break; - } - } - else //<500 - { - switch (nFeat) - { -case 490: sName = "Epic Armor Skin"; break; -case 491: sName = "Epic Blinding Speed"; break; -case 492: sName = "Epic Damage Reduction 3"; break; -case 493: sName = "Epic Damage Reduction 6"; break; -case 494: sName = "Epic Damage Reduction 9"; break; -case 495: sName = "Epic Devastating Critical Club"; break; -case 496: sName = "Epic Devastating Critical Dagger"; break; -case 497: sName = "Epic Devastating Critical Dart"; break; -case 498: sName = "Epic Devastating Critical Heavycrossbow"; break; -case 499: sName = "Epic Devastating Critical Lightcrossbow"; break; - } - } - } - } -else if (nFeat < 750) - { - if (nFeat < 550) - { - if (nFeat < 510) - { - switch (nFeat) - { -case 500: sName = "Epic Devastating Critical Lightmace"; break; -case 501: sName = "Epic Devastating Critical Morningstar"; break; -case 502: sName = "Epic Devastating Critical Quarterstaff"; break; -case 503: sName = "Epic Devastating Critical Shortspear"; break; -case 504: sName = "Epic Devastating Critical Sickle"; break; -case 505: sName = "Epic Devastating Critical Sling"; break; -case 506: sName = "Epic Devastating Critical Unarmed"; break; -case 507: sName = "Epic Devastating Critical Longbow"; break; -case 508: sName = "Epic Devastating Critical Shortbow"; break; -case 509: sName = "Epic Devastating Critical Shortsword"; break; - } - } - else if (nFeat < 520) - { - switch (nFeat) - { -case 510: sName = "Epic Devastating Critical Rapier"; break; -case 511: sName = "Epic Devastating Critical Scimitar"; break; -case 512: sName = "Epic Devastating Critical Longsword"; break; -case 513: sName = "Epic Devastating Critical Greatsword"; break; -case 514: sName = "Epic Devastating Critical Handaxe"; break; -case 515: sName = "Epic Devastating Critical Throwingaxe"; break; -case 516: sName = "Epic Devastating Critical Battleaxe"; break; -case 517: sName = "Epic Devastating Critical Greataxe"; break; -case 518: sName = "Epic Devastating Critical Halberd"; break; -case 519: sName = "Epic Devastating Critical Lighthammer"; break; - } - } - else if (nFeat < 530) - { - switch (nFeat) - { -case 520: sName = "Epic Devastating Critical Lightflail"; break; -case 521: sName = "Epic Devastating Critical Warhammer"; break; -case 522: sName = "Epic Devastating Critical Heavyflail"; break; -case 523: sName = "Epic Devastating Critical Kama"; break; -case 524: sName = "Epic Devastating Critical Kukri"; break; -case 525: sName = "Epic Devastating Critical Shuriken"; break; -case 526: sName = "Epic Devastating Critical Scythe"; break; -case 527: sName = "Epic Devastating Critical Katana"; break; -case 528: sName = "Epic Devastating Critical Bastardsword"; break; -case 529: sName = "Epic Devastating Critical Diremace"; break; - } - } - else if (nFeat < 540) - { - switch (nFeat) - { -case 530: sName = "Epic Devastating Critical Doubleaxe"; break; -case 531: sName = "Epic Devastating Critical Twobladedsword"; break; -case 532: sName = "Epic Devastating Critical Creature"; break; -case 533: sName = "Epic Energy Resistance Cold 1"; break; -case 534: sName = "Epic Energy Resistance Cold 2"; break; -case 535: sName = "Epic Energy Resistance Cold 3"; break; -case 536: sName = "Epic Energy Resistance Cold 4"; break; -case 537: sName = "Epic Energy Resistance Cold 5"; break; -case 538: sName = "Epic Energy Resistance Cold 6"; break; -case 539: sName = "Epic Energy Resistance Cold 7"; break; - } - } - else //<550 - { - switch (nFeat) - { -case 540: sName = "Epic Energy Resistance Cold 8"; break; -case 541: sName = "Epic Energy Resistance Cold 9"; break; -case 542: sName = "Epic Energy Resistance Cold 10"; break; -case 543: sName = "Epic Energy Resistance Acid 1"; break; -case 544: sName = "Epic Energy Resistance Acid 2"; break; -case 545: sName = "Epic Energy Resistance Acid 3"; break; -case 546: sName = "Epic Energy Resistance Acid 4"; break; -case 547: sName = "Epic Energy Resistance Acid 5"; break; -case 548: sName = "Epic Energy Resistance Acid 6"; break; -case 549: sName = "Epic Energy Resistance Acid 7"; break; - } - } - } - else if (nFeat < 600) - { - if (nFeat < 560) - { - switch (nFeat) - { -case 550: sName = "Epic Energy Resistance Acid 8"; break; -case 551: sName = "Epic Energy Resistance Acid 9"; break; -case 552: sName = "Epic Energy Resistance Acid 10"; break; -case 553: sName = "Epic Energy Resistance Fire 1"; break; -case 554: sName = "Epic Energy Resistance Fire 2"; break; -case 555: sName = "Epic Energy Resistance Fire 3"; break; -case 556: sName = "Epic Energy Resistance Fire 4"; break; -case 557: sName = "Epic Energy Resistance Fire 5"; break; -case 558: sName = "Epic Energy Resistance Fire 6"; break; -case 559: sName = "Epic Energy Resistance Fire 7"; break; - } - } - else if (nFeat < 570) - { - switch (nFeat) - { -case 560: sName = "Epic Energy Resistance Fire 8"; break; -case 561: sName = "Epic Energy Resistance Fire 9"; break; -case 562: sName = "Epic Energy Resistance Fire 10"; break; -case 563: sName = "Epic Energy Resistance Electrical 1"; break; -case 564: sName = "Epic Energy Resistance Electrical 2"; break; -case 565: sName = "Epic Energy Resistance Electrical 3"; break; -case 566: sName = "Epic Energy Resistance Electrical 4"; break; -case 567: sName = "Epic Energy Resistance Electrical 5"; break; -case 568: sName = "Epic Energy Resistance Electrical 6"; break; -case 569: sName = "Epic Energy Resistance Electrical 7"; break; - } - } - else if (nFeat < 580) - { - switch (nFeat) - { -case 570: sName = "Epic Energy Resistance Electrical 8"; break; -case 571: sName = "Epic Energy Resistance Electrical 9"; break; -case 572: sName = "Epic Energy Resistance Electrical 10"; break; -case 573: sName = "Epic Energy Resistance Sonic 1"; break; -case 574: sName = "Epic Energy Resistance Sonic 2"; break; -case 575: sName = "Epic Energy Resistance Sonic 3"; break; -case 576: sName = "Epic Energy Resistance Sonic 4"; break; -case 577: sName = "Epic Energy Resistance Sonic 5"; break; -case 578: sName = "Epic Energy Resistance Sonic 6"; break; -case 579: sName = "Epic Energy Resistance Sonic 7"; break; - } - } - else if (nFeat < 590) - { - switch (nFeat) - { -case 580: sName = "Epic Energy Resistance Sonic 8"; break; -case 581: sName = "Epic Energy Resistance Sonic 9"; break; -case 582: sName = "Epic Energy Resistance Sonic 10"; break; -case 583: sName = "Epic Fortitude"; break; -case 584: sName = "Epic Prowess"; break; -case 585: sName = "Epic Reflexes"; break; -case 586: sName = "Epic Reputation"; break; -case 587: sName = "Epic Skill Focus Animal Empathy"; break; -case 588: sName = "Epic Skill Focus Appraise"; break; -case 589: sName = "Epic Skill Focus Concentration"; break; - } - } - else //<600 - { - switch (nFeat) - { -case 590: sName = "Epic Skill Focus Craft Trap"; break; -case 591: sName = "Epic Skill Focus Disabletrap"; break; -case 592: sName = "Epic Skill Focus Discipline"; break; -case 593: sName = "Epic Skill Focus Heal"; break; -case 594: sName = "Epic Skill Focus Hide"; break; -case 595: sName = "Epic Skill Focus Listen"; break; -case 596: sName = "Epic Skill Focus Lore"; break; -case 597: sName = "Epic Skill Focus Movesilently"; break; -case 598: sName = "Epic Skill Focus Openlock"; break; -case 599: sName = "Epic Skill Focus Parry"; break; - } - } - } - else if (nFeat < 650) - { - if (nFeat < 610) - { - switch (nFeat) - { -case 600: sName = "Epic Skill Focus Perform"; break; -case 601: sName = "Epic Skill Focus Persuade"; break; -case 602: sName = "Epic Skill Focus Pickpocket"; break; -case 603: sName = "Epic Skill Focus Search"; break; -case 604: sName = "Epic Skill Focus Settrap"; break; -case 605: sName = "Epic Skill Focus Spellcraft"; break; -case 606: sName = "Epic Skill Focus Spot"; break; -case 607: sName = "Epic Skill Focus Taunt"; break; -case 608: sName = "Epic Skill Focus Tumble"; break; -case 609: sName = "Epic Skill Focus Usemagicdevice"; break; - } - } - else if (nFeat < 620) - { - switch (nFeat) - { -case 610: sName = "Epic Spell Focus Abjuration"; break; -case 611: sName = "Epic Spell Focus Conjuration"; break; -case 612: sName = "Epic Spell Focus Divination"; break; -case 613: sName = "Epic Spell Focus Enchantment"; break; -case 614: sName = "Epic Spell Focus Evocation"; break; -case 615: sName = "Epic Spell Focus Illusion"; break; -case 616: sName = "Epic Spell Focus Necromancy"; break; -case 617: sName = "Epic Spell Focus Transmutation"; break; -case 618: sName = "Epic Spell Penetration"; break; -case 619: sName = "Epic Weapon Focus Club"; break; - } - } - else if (nFeat < 630) - { - switch (nFeat) - { -case 620: sName = "Epic Weapon Focus Dagger"; break; -case 621: sName = "Epic Weapon Focus Dart"; break; -case 622: sName = "Epic Weapon Focus Heavycrossbow"; break; -case 623: sName = "Epic Weapon Focus Lightcrossbow"; break; -case 624: sName = "Epic Weapon Focus Lightmace"; break; -case 625: sName = "Epic Weapon Focus Morningstar"; break; -case 626: sName = "Epic Weapon Focus Quarterstaff"; break; -case 627: sName = "Epic Weapon Focus Shortspear"; break; -case 628: sName = "Epic Weapon Focus Sickle"; break; -case 629: sName = "Epic Weapon Focus Sling"; break; - } - } - else if (nFeat < 640) - { - switch (nFeat) - { -case 630: sName = "Epic Weapon Focus Unarmed"; break; -case 631: sName = "Epic Weapon Focus Longbow"; break; -case 632: sName = "Epic Weapon Focus Shortbow"; break; -case 633: sName = "Epic Weapon Focus Shortsword"; break; -case 634: sName = "Epic Weapon Focus Rapier"; break; -case 635: sName = "Epic Weapon Focus Scimitar"; break; -case 636: sName = "Epic Weapon Focus Longsword"; break; -case 637: sName = "Epic Weapon Focus Greatsword"; break; -case 638: sName = "Epic Weapon Focus Handaxe"; break; -case 639: sName = "Epic Weapon Focus Throwingaxe"; break; - } - } - else //<650 - { - switch (nFeat) - { -case 640: sName = "Epic Weapon Focus Battleaxe"; break; -case 641: sName = "Epic Weapon Focus Greataxe"; break; -case 642: sName = "Epic Weapon Focus Halberd"; break; -case 643: sName = "Epic Weapon Focus Lighthammer"; break; -case 644: sName = "Epic Weapon Focus Lightflail"; break; -case 645: sName = "Epic Weapon Focus Warhammer"; break; -case 646: sName = "Epic Weapon Focus Heavyflail"; break; -case 647: sName = "Epic Weapon Focus Kama"; break; -case 648: sName = "Epic Weapon Focus Kukri"; break; -case 649: sName = "Epic Weapon Focus Shuriken"; break; - } - } - } - else if (nFeat < 700) - { - if (nFeat < 660) - { - switch (nFeat) - { -case 650: sName = "Epic Weapon Focus Scythe"; break; -case 651: sName = "Epic Weapon Focus Katana"; break; -case 652: sName = "Epic Weapon Focus Bastardsword"; break; -case 653: sName = "Epic Weapon Focus Diremace"; break; -case 654: sName = "Epic Weapon Focus Doubleaxe"; break; -case 655: sName = "Epic Weapon Focus Twobladedsword"; break; -case 656: sName = "Epic Weapon Focus Creature"; break; -case 657: sName = "Epic Weapon Specialization Club"; break; -case 658: sName = "Epic Weapon Specialization Dagger"; break; -case 659: sName = "Epic Weapon Specialization Dart"; break; - } - } - else if (nFeat < 670) - { - switch (nFeat) - { -case 660: sName = "Epic Weapon Specialization Heavycrossbow"; break; -case 661: sName = "Epic Weapon Specialization Lightcrossbow"; break; -case 662: sName = "Epic Weapon Specialization Lightmace"; break; -case 663: sName = "Epic Weapon Specialization Morningstar"; break; -case 664: sName = "Epic Weapon Specialization Quarterstaff"; break; -case 665: sName = "Epic Weapon Specialization Shortspear"; break; -case 666: sName = "Epic Weapon Specialization Sickle"; break; -case 667: sName = "Epic Weapon Specialization Sling"; break; -case 668: sName = "Epic Weapon Specialization Unarmed"; break; -case 669: sName = "Epic Weapon Specialization Longbow"; break; - } - } - else if (nFeat < 680) - { - switch (nFeat) - { -case 670: sName = "Epic Weapon Specialization Shortbow"; break; -case 671: sName = "Epic Weapon Specialization Shortsword"; break; -case 672: sName = "Epic Weapon Specialization Rapier"; break; -case 673: sName = "Epic Weapon Specialization Scimitar"; break; -case 674: sName = "Epic Weapon Specialization Longsword"; break; -case 675: sName = "Epic Weapon Specialization Greatsword"; break; -case 676: sName = "Epic Weapon Specialization Handaxe"; break; -case 677: sName = "Epic Weapon Specialization Throwingaxe"; break; -case 678: sName = "Epic Weapon Specialization Battleaxe"; break; -case 679: sName = "Epic Weapon Specialization Greataxe"; break; - } - } - else if (nFeat < 690) - { - switch (nFeat) - { -case 680: sName = "Epic Weapon Specialization Halberd"; break; -case 681: sName = "Epic Weapon Specialization Lighthammer"; break; -case 682: sName = "Epic Weapon Specialization Lightflail"; break; -case 683: sName = "Epic Weapon Specialization Warhammer"; break; -case 684: sName = "Epic Weapon Specialization Heavyflail"; break; -case 685: sName = "Epic Weapon Specialization Kama"; break; -case 686: sName = "Epic Weapon Specialization Kukri"; break; -case 687: sName = "Epic Weapon Specialization Shuriken"; break; -case 688: sName = "Epic Weapon Specialization Scythe"; break; -case 689: sName = "Epic Weapon Specialization Katana"; break; - } - } - else //<700 - { - switch (nFeat) - { -case 690: sName = "Epic Weapon Specialization Bastardsword"; break; -case 691: sName = "Epic Weapon Specialization Diremace"; break; -case 692: sName = "Epic Weapon Specialization Doubleaxe"; break; -case 693: sName = "Epic Weapon Specialization Twobladedsword"; break; -case 694: sName = "Epic Weapon Specialization Creature"; break; -case 695: sName = "Epic Will"; break; -case 696: sName = "Epic Improved Combat Casting"; break; -case 697: sName = "Epic Improved Ki Strike 4"; break; -case 698: sName = "Epic Improved Ki Strike 5"; break; -case 699: sName = "Epic Improved Spell Resistance 1"; break; - } - } - } - else //<750 - { - if (nFeat < 710) - { - switch (nFeat) - { -case 700: sName = "Epic Improved Spell Resistance 2"; break; -case 701: sName = "Epic Improved Spell Resistance 3"; break; -case 702: sName = "Epic Improved Spell Resistance 4"; break; -case 703: sName = "Epic Improved Spell Resistance 5"; break; -case 704: sName = "Epic Improved Spell Resistance 6"; break; -case 705: sName = "Epic Improved Spell Resistance 7"; break; -case 706: sName = "Epic Improved Spell Resistance 8"; break; -case 707: sName = "Epic Improved Spell Resistance 9"; break; -case 708: sName = "Epic Improved Spell Resistance 10"; break; -case 709: sName = "Epic Overwhelming Critical Club"; break; - } - } - else if (nFeat < 720) - { - switch (nFeat) - { -case 710: sName = "Epic Overwhelming Critical Dagger"; break; -case 711: sName = "Epic Overwhelming Critical Dart"; break; -case 712: sName = "Epic Overwhelming Critical Heavycrossbow"; break; -case 713: sName = "Epic Overwhelming Critical Lightcrossbow"; break; -case 714: sName = "Epic Overwhelming Critical Lightmace"; break; -case 715: sName = "Epic Overwhelming Critical Morningstar"; break; -case 716: sName = "Epic Overwhelming Critical Quarterstaff"; break; -case 717: sName = "Epic Overwhelming Critical Shortspear"; break; -case 718: sName = "Epic Overwhelming Critical Sickle"; break; -case 719: sName = "Epic Overwhelming Critical Sling"; break; - } - } - else if (nFeat < 730) - { - switch (nFeat) - { -case 720: sName = "Epic Overwhelming Critical Unarmed"; break; -case 721: sName = "Epic Overwhelming Critical Longbow"; break; -case 722: sName = "Epic Overwhelming Critical Shortbow"; break; -case 723: sName = "Epic Overwhelming Critical Shortsword"; break; -case 724: sName = "Epic Overwhelming Critical Rapier"; break; -case 725: sName = "Epic Overwhelming Critical Scimitar"; break; -case 726: sName = "Epic Overwhelming Critical Longsword"; break; -case 727: sName = "Epic Overwhelming Critical Greatsword"; break; -case 728: sName = "Epic Overwhelming Critical Handaxe"; break; -case 729: sName = "Epic Overwhelming Critical Throwingaxe"; break; - } - } - else if (nFeat < 740) - { - switch (nFeat) - { -case 730: sName = "Epic Overwhelming Critical Battleaxe"; break; -case 731: sName = "Epic Overwhelming Critical Greataxe"; break; -case 732: sName = "Epic Overwhelming Critical Halberd"; break; -case 733: sName = "Epic Overwhelming Critical Lighthammer"; break; -case 734: sName = "Epic Overwhelming Critical Lightflail"; break; -case 735: sName = "Epic Overwhelming Critical Warhammer"; break; -case 736: sName = "Epic Overwhelming Critical Heavyflail"; break; -case 737: sName = "Epic Overwhelming Critical Kama"; break; -case 738: sName = "Epic Overwhelming Critical Kukri"; break; -case 739: sName = "Epic Overwhelming Critical Shuriken"; break; - } - } - else //750 - { - switch (nFeat) - { -case 740: sName = "Epic Overwhelming Critical Scythe"; break; -case 741: sName = "Epic Overwhelming Critical Katana"; break; -case 742: sName = "Epic Overwhelming Critical Bastardsword"; break; -case 743: sName = "Epic Overwhelming Critical Diremace"; break; -case 744: sName = "Epic Overwhelming Critical Doubleaxe"; break; -case 745: sName = "Epic Overwhelming Critical Twobladedsword"; break; -case 746: sName = "Epic Overwhelming Critical Creature"; break; -case 747: sName = "Epic Perfect Health"; break; -case 748: sName = "Epic Self Concealment 1"; break; -case 749: sName = "Epic Self Concealment 2"; break; - } - } - } - } -else - { - if (nFeat < 800) - { - if (nFeat < 760) - { - switch (nFeat) - { -case 750: sName = "Epic Self Concealment 3"; break; -case 751: sName = "Epic Self Concealment 4"; break; -case 752: sName = "Epic Self Concealment 5"; break; -case 753: sName = "Epic Superior Initiative"; break; -case 754: sName = "Epic Toughness 1"; break; -case 755: sName = "Epic Toughness 2"; break; -case 756: sName = "Epic Toughness 3"; break; -case 757: sName = "Epic Toughness 4"; break; -case 758: sName = "Epic Toughness 5"; break; -case 759: sName = "Epic Toughness 6"; break; - } - } - else if (nFeat < 770) - { - switch (nFeat) - { -case 760: sName = "Epic Toughness 7"; break; -case 761: sName = "Epic Toughness 8"; break; -case 762: sName = "Epic Toughness 9"; break; -case 763: sName = "Epic Toughness 10"; break; -case 764: sName = "Epic Great Charisma 1"; break; -case 765: sName = "Epic Great Charisma 2"; break; -case 766: sName = "Epic Great Charisma 3"; break; -case 767: sName = "Epic Great Charisma 4"; break; -case 768: sName = "Epic Great Charisma 5"; break; -case 769: sName = "Epic Great Charisma 6"; break; - } - } - else if (nFeat < 780) - { - switch (nFeat) - { -case 770: sName = "Epic Great Charisma 7"; break; -case 771: sName = "Epic Great Charisma 8"; break; -case 772: sName = "Epic Great Charisma 9"; break; -case 773: sName = "Epic Great Charisma 10"; break; -case 774: sName = "Epic Great Constitution 1"; break; -case 775: sName = "Epic Great Constitution 2"; break; -case 776: sName = "Epic Great Constitution 3"; break; -case 777: sName = "Epic Great Constitution 4"; break; -case 778: sName = "Epic Great Constitution 5"; break; -case 779: sName = "Epic Great Constitution 6"; break; - } - } - else if (nFeat < 790) - { - switch (nFeat) - { -case 780: sName = "Epic Great Constitution 7"; break; -case 781: sName = "Epic Great Constitution 8"; break; -case 782: sName = "Epic Great Constitution 9"; break; -case 783: sName = "Epic Great Constitution 10"; break; -case 784: sName = "Epic Great Dexterity 1"; break; -case 785: sName = "Epic Great Dexterity 2"; break; -case 786: sName = "Epic Great Dexterity 3"; break; -case 787: sName = "Epic Great Dexterity 4"; break; -case 788: sName = "Epic Great Dexterity 5"; break; -case 789: sName = "Epic Great Dexterity 6"; break; - } - } - else //<800 - { - switch (nFeat) - { -case 790: sName = "Epic Great Dexterity 7"; break; -case 791: sName = "Epic Great Dexterity 8"; break; -case 792: sName = "Epic Great Dexterity 9"; break; -case 793: sName = "Epic Great Dexterity 10"; break; -case 794: sName = "Epic Great Intelligence 1"; break; -case 795: sName = "Epic Great Intelligence 2"; break; -case 796: sName = "Epic Great Intelligence 3"; break; -case 797: sName = "Epic Great Intelligence 4"; break; -case 798: sName = "Epic Great Intelligence 5"; break; -case 799: sName = "Epic Great Intelligence 6"; break; - } - } - } - else if (nFeat < 850) - { - if (nFeat < 810) - { - switch (nFeat) - { -case 800: sName = "Epic Great Intelligence 7"; break; -case 801: sName = "Epic Great Intelligence 8"; break; -case 802: sName = "Epic Great Intelligence 9"; break; -case 803: sName = "Epic Great Intelligence 10"; break; -case 804: sName = "Epic Great Wisdom 1"; break; -case 805: sName = "Epic Great Wisdom 2"; break; -case 806: sName = "Epic Great Wisdom 3"; break; -case 807: sName = "Epic Great Wisdom 4"; break; -case 808: sName = "Epic Great Wisdom 5"; break; -case 809: sName = "Epic Great Wisdom 6"; break; - } - } - else if (nFeat < 820) - { - switch (nFeat) - { -case 810: sName = "Epic Great Wisdom 7"; break; -case 811: sName = "Epic Great Wisdom 8"; break; -case 812: sName = "Epic Great Wisdom 9"; break; -case 813: sName = "Epic Great Wisdom 10"; break; -case 814: sName = "Epic Great Strength 1"; break; -case 815: sName = "Epic Great Strength 2"; break; -case 816: sName = "Epic Great Strength 3"; break; -case 817: sName = "Epic Great Strength 4"; break; -case 818: sName = "Epic Great Strength 5"; break; -case 819: sName = "Epic Great Strength 6"; break; - } - } - else if (nFeat < 830) - { - switch (nFeat) - { -case 820: sName = "Epic Great Strength 7"; break; -case 821: sName = "Epic Great Strength 8"; break; -case 822: sName = "Epic Great Strength 9"; break; -case 823: sName = "Epic Great Strength 10"; break; -case 824: sName = "Epic Great Smiting 1"; break; -case 825: sName = "Epic Great Smiting 2"; break; -case 826: sName = "Epic Great Smiting 3"; break; -case 827: sName = "Epic Great Smiting 4"; break; -case 828: sName = "Epic Great Smiting 5"; break; -case 829: sName = "Epic Great Smiting 6"; break; - } - } - else if (nFeat < 840) - { - switch (nFeat) - { -case 830: sName = "Epic Great Smiting 7"; break; -case 831: sName = "Epic Great Smiting 8"; break; -case 832: sName = "Epic Great Smiting 9"; break; -case 833: sName = "Epic Great Smiting 10"; break; -case 834: sName = "Epic Improved Sneak Attack 1"; break; -case 835: sName = "Epic Improved Sneak Attack 2"; break; -case 836: sName = "Epic Improved Sneak Attack 3"; break; -case 837: sName = "Epic Improved Sneak Attack 4"; break; -case 838: sName = "Epic Improved Sneak Attack 5"; break; -case 839: sName = "Epic Improved Sneak Attack 6"; break; - } - } - else //<850 - { - switch (nFeat) - { -case 840: sName = "Epic Improved Sneak Attack 7"; break; -case 841: sName = "Epic Improved Sneak Attack 8"; break; -case 842: sName = "Epic Improved Sneak Attack 9"; break; -case 843: sName = "Epic Improved Sneak Attack 10"; break; -case 844: sName = "Epic Improved Stunning Fist 1"; break; -case 845: sName = "Epic Improved Stunning Fist 2"; break; -case 846: sName = "Epic Improved Stunning Fist 3"; break; -case 847: sName = "Epic Improved Stunning Fist 4"; break; -case 848: sName = "Epic Improved Stunning Fist 5"; break; -case 849: sName = "Epic Improved Stunning Fist 6"; break; - } - } - } - else if (nFeat < 900) - { - if (nFeat < 860) - { - switch (nFeat) - { -case 850: sName = "Epic Improved Stunning Fist 7"; break; -case 851: sName = "Epic Improved Stunning Fist 8"; break; -case 852: sName = "Epic Improved Stunning Fist 9"; break; -case 853: sName = "Epic Improved Stunning Fist 10"; break; -case 854: sName = "Epic Planar Turning"; break; -case 855: sName = "Epic Bane Of Enemies"; break; -case 856: sName = "Epic Dodge"; break; -case 857: sName = "Epic Automatic Quicken 1"; break; -case 858: sName = "Epic Automatic Quicken 2"; break; -case 859: sName = "Epic Automatic Quicken 3"; break; - } - } - else if (nFeat < 870) - { - switch (nFeat) - { -case 860: sName = "Epic Automatic Silent Spell 1"; break; -case 861: sName = "Epic Automatic Silent Spell 2"; break; -case 862: sName = "Epic Automatic Silent Spell 3"; break; -case 863: sName = "Epic Automatic Still Spell 1"; break; -case 864: sName = "Epic Automatic Still Spell 2"; break; -case 865: sName = "Epic Automatic Still Spell 3"; break; -case 867: sName = "Whirlwind Attack"; break; -case 868: sName = "Improved Whirlwind"; break; -case 869: sName = "Mighty Rage"; break; - } - } - else if (nFeat < 880) - { - switch (nFeat) - { -case 870: sName = "Epic Lasting Inspiration"; break; -case 871: sName = "Curse Song"; break; -case 872: sName = "Wild Shape Undead"; break; -case 873: sName = "Wild Shape Dragon"; break; -case 874: sName = "Epic Spell Mummy Dust"; break; -case 875: sName = "Epic Spell Dragon Knight"; break; -case 876: sName = "Epic Spell Hellball"; break; -case 877: sName = "Epic Spell Mage Armour"; break; -case 878: sName = "Epic Spell Ruin"; break; -case 879: sName = "Weapon Of Choice Sickle"; break; - } - } - else if (nFeat < 890) - { - switch (nFeat) - { -case 880: sName = "Weapon Of Choice Kama"; break; -case 881: sName = "Weapon Of Choice Kukri"; break; -case 882: sName = "Ki Damage"; break; -case 883: sName = "Increase Multiplier"; break; -case 884: sName = "Superior Weapon Focus"; break; -case 885: sName = "Ki Critical"; break; -case 886: sName = "Bone Skin 2"; break; -case 889: sName = "Animate Dead"; break; - } - } - else //<900 - { - switch (nFeat) - { -case 890: sName = "Summon Undead"; break; -case 891: sName = "Deathless Vigor"; break; -case 892: sName = "Undead Graft 1"; break; -case 893: sName = "Undead Graft 2"; break; -case 894: sName = "Tough As Bone"; break; -case 895: sName = "Summon Greater Undead"; break; -case 896: sName = "Deathless Mastery"; break; -case 897: sName = "Deathless Master Touch"; break; -case 898: sName = "Greater Wildshape 1"; break; - } - } - } - else if (nFeat < 950) - { - if (nFeat < 910) - { - switch (nFeat) - { -case 900: sName = "Greater Wildshape 2"; break; -case 901: sName = "Greater Wildshape 3"; break; -case 902: sName = "Humanoid Shape"; break; -case 903: sName = "Greater Wildshape 4"; break; -case 904: sName = "Sacred Defense 1"; break; -case 905: sName = "Sacred Defense 2"; break; -case 906: sName = "Sacred Defense 3"; break; -case 907: sName = "Sacred Defense 4"; break; -case 908: sName = "Sacred Defense 5"; break; -case 909: sName = "Divine Wrath"; break; - } - } - else if (nFeat < 920) - { - switch (nFeat) - { -case 910: sName = "Extra Smiting"; break; -case 911: sName = "Skill Focus Craft Armor"; break; -case 912: sName = "Skill Focus Craft Weapon"; break; -case 913: sName = "Epic Skill Focus Craft Armor"; break; -case 914: sName = "Epic Skill Focus Craft Weapon"; break; -case 915: sName = "Skill Focus Bluff"; break; -case 916: sName = "Skill Focus Intimidate"; break; -case 917: sName = "Epic Skill Focus Bluff"; break; -case 918: sName = "Epic Skill Focus Intimidate"; break; -case 919: sName = "Weapon Of Choice Club"; break; - } - } - else if (nFeat < 930) - { - switch (nFeat) - { -case 920: sName = "Weapon Of Choice Dagger"; break; -case 921: sName = "Weapon Of Choice Lightmace"; break; -case 922: sName = "Weapon Of Choice Morningstar"; break; -case 923: sName = "Weapon Of Choice Quarterstaff"; break; -case 924: sName = "Weapon Of Choice Shortspear"; break; -case 925: sName = "Weapon Of Choice Shortsword"; break; -case 926: sName = "Weapon Of Choice Rapier"; break; -case 927: sName = "Weapon Of Choice Scimitar"; break; -case 928: sName = "Weapon Of Choice Longsword"; break; -case 929: sName = "Weapon Of Choice Greatsword"; break; - } - } - else if (nFeat < 940) - { - switch (nFeat) - { -case 930: sName = "Weapon Of Choice Handaxe"; break; -case 931: sName = "Weapon Of Choice Battleaxe"; break; -case 932: sName = "Weapon Of Choice Greataxe"; break; -case 933: sName = "Weapon Of Choice Halberd"; break; -case 934: sName = "Weapon Of Choice Lighthammer"; break; -case 935: sName = "Weapon Of Choice Lightflail"; break; -case 936: sName = "Weapon Of Choice Warhammer"; break; -case 937: sName = "Weapon Of Choice Heavyflail"; break; -case 938: sName = "Weapon Of Choice Scythe"; break; -case 939: sName = "Weapon Of Choice Katana"; break; - } - } - else //<950 - { - switch (nFeat) - { -case 940: sName = "Weapon Of Choice Bastardsword"; break; -case 941: sName = "Weapon Of Choice Diremace"; break; -case 942: sName = "Weapon Of Choice Doubleaxe"; break; -case 943: sName = "Weapon Of Choice Twobladedsword"; break; -case 944: sName = "Brew Potion"; break; -case 945: sName = "Scribe Scroll"; break; -case 946: sName = "Craft Wand"; break; -case 947: sName = "Dwarven Defender Defensive Stance"; break; -case 948: sName = "Damage Reduction 6"; break; -case 949: sName = "Prestige Defensive Awareness 1"; break; - } - } - } - else if (nFeat < 1000) - { - if (nFeat < 960) - { - switch (nFeat) - { -case 950: sName = "Prestige Defensive Awareness 2"; break; -case 951: sName = "Prestige Defensive Awareness 3"; break; -case 952: sName = "Weapon Focus Dwaxe"; break; -case 953: sName = "Weapon Specialization Dwaxe"; break; -case 954: sName = "Improved Critical Dwaxe"; break; -case 955: sName = "Epic Devastating Critical Dwaxe"; break; -case 956: sName = "Epic Weapon Focus Dwaxe"; break; -case 957: sName = "Epic Weapon Specialization Dwaxe"; break; -case 958: sName = "Epic Overwhelming Critical Dwaxe"; break; -case 959: sName = "Weapon Of Choice Dwaxe"; break; - } - } - else if (nFeat < 970) - { - switch (nFeat) - { -case 960: sName = "Use Poison"; break; -case 961: sName = "Dragon Armor"; break; -case 962: sName = "Dragon Abilities"; break; -case 963: sName = "Dragon Immune Paralysis"; break; -case 964: sName = "Dragon Immune Fire"; break; -case 965: sName = "Dragon Dis Breath"; break; -case 966: sName = "Epic Fighter"; break; -case 967: sName = "Epic Barbarian"; break; -case 968: sName = "Epic Bard"; break; -case 969: sName = "Epic Cleric"; break; - } - } - else if (nFeat < 980) - { - switch (nFeat) - { -case 970: sName = "Epic Druid"; break; -case 971: sName = "Epic Monk"; break; -case 972: sName = "Epic Paladin"; break; -case 973: sName = "Epic Ranger"; break; -case 974: sName = "Epic Rogue"; break; -case 975: sName = "Epic Sorcerer"; break; -case 976: sName = "Epic Wizard"; break; -case 977: sName = "Epic Arcane Archer"; break; -case 978: sName = "Epic Assassin"; break; -case 979: sName = "Epic Blackguard"; break; - } - } - else if (nFeat < 990) - { - switch (nFeat) - { -case 980: sName = "Epic Shadowdancer"; break; -case 981: sName = "Epic Harper Scout"; break; -case 982: sName = "Epic Divine Champion"; break; -case 983: sName = "Epic Weapon Master"; break; -case 984: sName = "Epic Pale Master"; break; -case 985: sName = "Epic Dwarven Defender"; break; -case 986: sName = "Epic Shifter"; break; -case 987: sName = "Epic Red Dragon Disc"; break; -case 988: sName = "Epic Thundering Rage"; break; -case 989: sName = "Epic Terrifying Rage"; break; - } - } - else //<1000 - { - switch (nFeat) - { -case 990: sName = "Epic Spell Epic Warding"; break; -case 991: sName = "Prestige Master Crafter"; break; -case 992: sName = "Prestige Scrounger"; break; -case 993: sName = "Weapon Focus Whip"; break; -case 994: sName = "Weapon Specialization Whip"; break; -case 995: sName = "Improved Critical Whip"; break; -case 996: sName = "Epic Devastating Critical Whip"; break; -case 997: sName = "Epic Weapon Focus Whip"; break; -case 998: sName = "Epic Weapon Specialization Whip"; break; -case 999: sName = "Epic Overwhelming Critical Whip"; break; - } - } - } - else //through 1071 - { - if (nFeat < 1010) - { - switch (nFeat) - { -case 1000: sName = "Weapon Of Choice Whip"; break; -case 1001: sName = "Epic Character"; break; -case 1002: sName = "Epic Epic Shadowlord"; break; -case 1003: sName = "Epic Epic Fiend"; break; -case 1004: sName = "Prestige Death Attack 6"; break; -case 1005: sName = "Prestige Death Attack 7"; break; -case 1006: sName = "Prestige Death Attack 8"; break; -case 1007: sName = "Blackguard Sneak Attack 4d6"; break; -case 1008: sName = "Blackguard Sneak Attack 5d6"; break; -case 1009: sName = "Blackguard Sneak Attack 6d6"; break; - } - } - else if (nFeat < 1020) - { - switch (nFeat) - { -case 1010: sName = "Blackguard Sneak Attack 7d6"; break; -case 1011: sName = "Blackguard Sneak Attack 8d6"; break; -case 1012: sName = "Blackguard Sneak Attack 9d6"; break; -case 1013: sName = "Blackguard Sneak Attack 10d6"; break; -case 1014: sName = "Blackguard Sneak Attack 11d6"; break; -case 1015: sName = "Blackguard Sneak Attack 12d6"; break; -case 1016: sName = "Blackguard Sneak Attack 13d6"; break; -case 1017: sName = "Blackguard Sneak Attack 14d6"; break; -case 1018: sName = "Blackguard Sneak Attack 15d6"; break; -case 1019: sName = "Prestige Death Attack 9"; break; - } - } - else if (nFeat < 1030) - { - switch (nFeat) - { -case 1020: sName = "Prestige Death Attack 10"; break; -case 1021: sName = "Prestige Death Attack 11"; break; -case 1022: sName = "Prestige Death Attack 12"; break; -case 1023: sName = "Prestige Death Attack 13"; break; -case 1024: sName = "Prestige Death Attack 14"; break; -case 1025: sName = "Prestige Death Attack 15"; break; -case 1026: sName = "Prestige Death Attack 16"; break; -case 1027: sName = "Prestige Death Attack 17"; break; -case 1028: sName = "Prestige Death Attack 18"; break; -case 1029: sName = "Prestige Death Attack 19"; break; - } - } - else if (nFeat < 1040) - { - switch (nFeat) - { -case 1030: sName = "Prestige Death Attack 20"; break; -case 1032: sName = "Sneak Attack 11"; break; -case 1033: sName = "Sneak Attack 12"; break; -case 1034: sName = "Sneak Attack 13"; break; -case 1035: sName = "Sneak Attack 14"; break; -case 1036: sName = "Sneak Attack 15"; break; -case 1037: sName = "Sneak Attack 16"; break; -case 1038: sName = "Sneak Attack 17"; break; -case 1039: sName = "Sneak Attack 18"; break; - } - } - else if (nFeat < 1050) - { - switch (nFeat) - { -case 1040: sName = "Sneak Attack 19"; break; -case 1041: sName = "Sneak Attack 20"; break; -case 1042: sName = "Dragon Hdincrease D6"; break; -case 1043: sName = "Dragon Hdincrease D8"; break; -case 1044: sName = "Dragon Hdincrease D10"; break; -case 1045: sName = "Prestige Enchant Arrow 6"; break; -case 1046: sName = "Prestige Enchant Arrow 7"; break; -case 1047: sName = "Prestige Enchant Arrow 8"; break; -case 1048: sName = "Prestige Enchant Arrow 9"; break; -case 1049: sName = "Prestige Enchant Arrow 10"; break; - } - } - else if (nFeat < 1060) - { - switch (nFeat) - { -case 1050: sName = "Prestige Enchant Arrow 11"; break; -case 1051: sName = "Prestige Enchant Arrow 12"; break; -case 1052: sName = "Prestige Enchant Arrow 13"; break; -case 1053: sName = "Prestige Enchant Arrow 14"; break; -case 1054: sName = "Prestige Enchant Arrow 15"; break; -case 1055: sName = "Prestige Enchant Arrow 16"; break; -case 1056: sName = "Prestige Enchant Arrow 17"; break; -case 1057: sName = "Prestige Enchant Arrow 18"; break; -case 1058: sName = "Prestige Enchant Arrow 19"; break; -case 1059: sName = "Prestige Enchant Arrow 20"; break; - } - } - else //through 1071 - { - switch (nFeat) - { -case 1060: sName = "Epic Outsider Shape"; break; -case 1061: sName = "Epic Construct Shape"; break; -case 1062: sName = "Epic Shifter Infinite Wildshape 1"; break; -case 1063: sName = "Epic Shifter Infinite Wildshape 2"; break; -case 1064: sName = "Epic Shifter Infinite Wildshape 3"; break; -case 1065: sName = "Epic Shifter Infinite Wildshape 4"; break; -case 1066: sName = "Epic Shifter Infinite Humanoid Shape"; break; -case 1067: sName = "Epic Barbarian Damage Reduction"; break; -case 1068: sName = "Epic Druid Infinite Wildshape"; break; -case 1069: sName = "Epic Druid Infinite Elemental Shape"; break; -case 1070: sName = "Prestige Poison Save Epic"; break; -case 1071: sName = "Epic Superior Weapon Focus"; break; - } - } - } - } -return sName; -} - -int GetIsFeatLimitedUses(int nFeat) -{ -int nReturn = FALSE; -if (nFeat < 330) - { - if (nFeat < 300) - { - switch(nFeat) - { -case 39: nReturn = TRUE; break; -case 199: nReturn = TRUE; break; -case 211: nReturn = TRUE; break; -case 223: nReturn = TRUE; break; -case 257: nReturn = TRUE; break; -case 293: nReturn = TRUE; break; -case 294: nReturn = TRUE; break; -case 296: nReturn = TRUE; break; -case 297: nReturn = TRUE; break; -case 299: nReturn = TRUE; break; - } - } - else - { - switch(nFeat) - { -case 301: nReturn = TRUE; break; -case 302: nReturn = TRUE; break; -case 303: nReturn = TRUE; break; -case 304: nReturn = TRUE; break; -case 305: nReturn = TRUE; break; -case 306: nReturn = TRUE; break; -case 307: nReturn = TRUE; break; -case 308: nReturn = TRUE; break; -case 310: nReturn = TRUE; break; -case 324: nReturn = TRUE; break; -case 326: nReturn = TRUE; break; -case 327: nReturn = TRUE; break; -case 328: nReturn = TRUE; break; -case 329: nReturn = TRUE; break; - } - } - } -else if (nFeat < 400) - { - if (nFeat < 360) - { - switch(nFeat) - { -case 330: nReturn = TRUE; break; -case 331: nReturn = TRUE; break; -case 335: nReturn = TRUE; break; -case 336: nReturn = TRUE; break; -case 337: nReturn = TRUE; break; -case 338: nReturn = TRUE; break; -case 339: nReturn = TRUE; break; -case 340: nReturn = TRUE; break; -case 341: nReturn = TRUE; break; -case 342: nReturn = TRUE; break; -case 355: nReturn = TRUE; break; -case 356: nReturn = TRUE; break; -case 357: nReturn = TRUE; break; -case 358: nReturn = TRUE; break; -case 359: nReturn = TRUE; break; - } - } - else - { - switch(nFeat) - { -case 360: nReturn = TRUE; break; -case 361: nReturn = TRUE; break; -case 362: nReturn = TRUE; break; -case 363: nReturn = TRUE; break; -case 364: nReturn = TRUE; break; -case 365: nReturn = TRUE; break; -case 366: nReturn = TRUE; break; -case 367: nReturn = TRUE; break; -case 368: nReturn = TRUE; break; -case 369: nReturn = TRUE; break; -case 370: nReturn = TRUE; break; -case 371: nReturn = TRUE; break; -case 372: nReturn = TRUE; break; -case 373: nReturn = TRUE; break; - } - } - } -else if (nFeat < 500) - { - if (nFeat < 460) - { - switch(nFeat) - { -case 434: nReturn = TRUE; break; -case 435: nReturn = TRUE; break; -case 436: nReturn = TRUE; break; -case 438: nReturn = TRUE; break; -case 440: nReturn = TRUE; break; -case 441: nReturn = TRUE; break; -case 442: nReturn = TRUE; break; -case 443: nReturn = TRUE; break; -case 444: nReturn = TRUE; break; -case 450: nReturn = TRUE; break; -case 451: nReturn = TRUE; break; -case 452: nReturn = TRUE; break; -case 453: nReturn = TRUE; break; -case 454: nReturn = TRUE; break; - } - } - else - { - switch(nFeat) - { -case 468: nReturn = TRUE; break; -case 469: nReturn = TRUE; break; -case 470: nReturn = TRUE; break; -case 471: nReturn = TRUE; break; -case 472: nReturn = TRUE; break; -case 474: nReturn = TRUE; break; -case 475: nReturn = TRUE; break; -case 476: nReturn = TRUE; break; -case 477: nReturn = TRUE; break; -case 478: nReturn = TRUE; break; -case 479: nReturn = TRUE; break; -case 491: nReturn = TRUE; break; - } - } - } -else - { - if (nFeat < 900) - { - switch(nFeat) - { -case 869: nReturn = TRUE; break; -case 872: nReturn = TRUE; break; -case 873: nReturn = TRUE; break; -case 874: nReturn = TRUE; break; -case 875: nReturn = TRUE; break; -case 876: nReturn = TRUE; break; -case 877: nReturn = TRUE; break; -case 878: nReturn = TRUE; break; -case 882: nReturn = TRUE; break; -case 889: nReturn = TRUE; break; -case 890: nReturn = TRUE; break; -case 892: nReturn = TRUE; break; -case 893: nReturn = TRUE; break; -case 895: nReturn = TRUE; break; -case 897: nReturn = TRUE; break; -case 898: nReturn = TRUE; break; - } - } - else - { - switch(nFeat) - { -case 900: nReturn = TRUE; break; -case 901: nReturn = TRUE; break; -case 902: nReturn = TRUE; break; -case 903: nReturn = TRUE; break; -case 909: nReturn = TRUE; break; -case 947: nReturn = TRUE; break; -case 965: nReturn = TRUE; break; -case 990: nReturn = TRUE; break; -case 1060: nReturn = TRUE; break; -case 1061: nReturn = TRUE; break; - } - } - } -return nReturn; -} - - - -//below used to compile -/* -void main() -{ - -} -*/ diff --git a/_removed files/hgll_func_inc.nss b/_removed files/hgll_func_inc.nss deleted file mode 100644 index c27bce72..00000000 --- a/_removed files/hgll_func_inc.nss +++ /dev/null @@ -1,1405 +0,0 @@ -#include "hgll_const_inc" -#include "hgll_struct_stat" -#include "hgll_featreq_inc" -#include "hgll_classft_inc" -#include "hgll_leto_inc" -#include "hgll_spells_inc" -#include "aps_include" -//--------------------------------DECLARATIONS--------------------------------// - -// This returns the current legendary level ("LL") of the PC. It is designed to -// work hand in hand with DAR subraces by tracking level by entering it in -// the (normally unused on PCs) Lootable field on the character file (".bic file"). -// If you are not using DAR, it will still function correctly, using GetHitDice to -// track non-legendary levels. -int CheckLegendaryLevel(object oPC); -// This function determines whether a PC has enough experience to take the next legendary -// level. Possible return values: 1 for having enough, 0 for not, -1 for having too few -// levels to gain Legendary levels, and -2 for already having the maximum amount of LL. -int GetHasXPForNextLL(object oPC); -// This function was used to remove xp from a character based on what LL they were taking. -// It subtracted XP and then returned the XP that was subtracted. It returns zero if they -// are level 60 and -1 if they aren't level 40 yet. It is not used in the current configuration, -// which just lets the xp keep adding up, rather than subtracting the xp after the level is -// gained. This ensures that the character doesn't lose the experience that accrued if for some -// reason Letoscript misfires and fails to edit the character. -int SubtractXPForNextLL(object oPC); -// This function returns the amount of XP the PC is missing to reach their next LL. It will -// return the amount needed to reach level 41 if they are under level 40. If they already -// have enough, it returns 0. If they are level 60, it returns -1. -int GetXPNeededForNextLL(object oPC); -// This function checks for whether or not the PC gains a feat this level. By default it -// is set to one every three levels, carrying the progression of character feats onward from -// the last standard one received at 39, adding new feats starting at level 42 and ending at -// level 60. It is easily modified so that you can assign feats at whatever levels desired. -int GetGainsFeatOnLevelUp(object oPC); -// This function checks for whether or not the PC gains a stat this level. By default it -// is set to one every two levels, doubling the progression of character stats onward from -// the last standard one received at 40, adding new stats starting at level 42 and ending at -// level 60. It is easily modified so that you can assign stats at whatever levels desired. -int GetGainsStatOnLevelUp(object oPC); -// This function tells the caller whether the PC gains +1 to saving throws this level. By default -// it is set to one every four levels, halving the progression of character saves onward from -// the last standard increase received at 40, increasing saves starting at level 44 and ending at -// level 60. It is easily modified so that you can increase saves at whatever levels desired. -int GetGainsSavesOnLevelUp(object oPC); -// This function permanently tags a PC with the CLASS_TYPE that controls his LLs. -void SetControlClass(object oPC, int nClass); -// This function is where any other requirements besides experence and level -// are added to GetHasXPForNextLL. It returns TRUE by default unless modified. -int GetCanGainLL(object oPC); -// This function outputs debugging info to the player and log, but only if DEBUG is -// set to TRUE in hgll_const_inc. -void DoDebug(object oPC, string sDebug); -// This function calculates the Base Ability Scores and Skills of a character, including -// improvements by level and by feats, but filtering out bonuses from gear and effects. -// Skills need another round of filtering before they arrive at base levels. -// sWP: If you specify a WayPoint Tag in an inaccesible area, the clones will be -// generated there. -struct xAbility GetRoughAbilities(object oPC, string sWP=""); -// This function returns the number of Great Strenth feats the character has. -int GetHasGreatStrenth(object oPC); -// This function returns the number of Great Dexterity feats the character has. -int GetHasGreatDexterity(object oPC); -// This function returns the number of Great Constitution feats the character has. -int GetHasGreatConstitution(object oPC); -// This function returns the number of Great Intelligence feats the character has. -int GetHasGreatIntelligence(object oPC); -// This function returns the number of Great Wisdom feats the character has. -int GetHasGreatWisdom(object oPC); -// This function returns the number of Great Charisma feats the character has. -int GetHasGreatCharisma(object oPC); -// This function filters out the Greater Stat Feats and Red Dragon Disciple ability bonuses -// from the ability scores. -int GetBaseStat(int nStatType, int nStat, object oPC); -// This function returns the Red Dragon Disciple ability bonus the character has for the -// specified ability. -int GetRDDStatMod(int nStatType, object oPC); -// This function returns the point vaule penalty (a positive number) for -// dexterity-based skills of the armor worn by the PC. -int GetArmorPenalty(object oPC); -// This function returns the point vaule penalty (a positive number) for -// dexterity-based skills of the shield worn by the PC. -int GetShieldPenalty(object oPC); -// This function takes a given stat number and calculates the bonus from it. -int GetBaseAbilityModifier(int nAmount); -// This function takes the scores retrieved from the GetRoughAbilities function and -// subtracts feat and ability bonuses from the skill to arrive at final base skill. -int GetBaseSkill(int nSkill, struct xAbility stat, object oPC); -// This function calculates the values of all the characters base skills, -// after adjusting them for stat modifiers and feats via GetBaseSkill. -struct xAbility GetBaseAbilities(struct xAbility stat, object oPC); -// This function sets local ints indicating the base ability for all 6 ability scores and -// all 27 skills. They are called later to help determine dependant characteristics like -// hitpoints, and are used to determine feat availabilities, etc. -void SetBaseAbilityMarkers(struct xAbility stat, object oPC); -//This function deletes all the ints tracking base ability and skill scores. -void DeleteBaseAbilityMarkers(object oPC); -// This function determines and returns the amount of skill points a character will get each -// LL based on their control class, INT modifier, and their main race (humans get +1) -int GetSkillPointsGainedOnLevelUp(object oPC); -// This function determines whether a skill is available to the charcter and should appear on the -// skill list, based on the character's control class, the amount of points they have remaining, -// the cost of the skill for the control class, and their current skill level in the skill. -int GetIsSkillAvailable(object oPC, int nSkill); -// This function returns the name string of the specified skill. -string GetNameOfSkill(int nSkill); -// This function returns the name of the tracking int for the specified skill. -string GetNameOfTrackingInt(int nSkill); -// This function determines the amount of HP that a character gets on levelup based on their -// control class, their CON modifier, and whether or not they've taken the toughness feat. -int GetHitPointsGainedOnLevelUp(object oPC); -// This function restores all limited usage feats so that GetHasFeat will not -// return a false negative. -void ReplenishLimitedUseFeats(object oPC); -// This function determines whether a feat is available to the charcter and should appear on the -// feat list, based on the character's control class, whether they meet the feat's requirements, -// whether they already have the feat, and whether the feat is restricted. -int GetIsFeatAvailable(int nFeat, object oPC); -// This function returns the name of the designated ability score. -string GetNameOfAbility(int nStat); -// This function returns TRUE if the specified feat is a class feat and the character has -// enough levels in the class to take it. Otherwise it returns FALSE. -int GetIsClassFeat(int nFeat, int nClass, object oPC); - -//----------------------------------FUNCTIONS---------------------------------// - -int CheckLegendaryLevel(object oPC) -{ -int nLevel = GetLootable(oPC); -if (nLevel<41) - { - return GetHitDice(oPC); - } -else - { - return nLevel; - } -} - -int GetHasXPForNextLL(object oPC) -{ -switch(CheckLegendaryLevel(oPC)) - { - case 40: return (XP_REQ_LVL41-GetXP(oPC)<=0); break; - case 41: return (XP_REQ_LVL42-GetXP(oPC)<=0); break; - case 42: return (XP_REQ_LVL43-GetXP(oPC)<=0); break; - case 43: return (XP_REQ_LVL44-GetXP(oPC)<=0); break; - case 44: return (XP_REQ_LVL45-GetXP(oPC)<=0); break; - case 45: return (XP_REQ_LVL46-GetXP(oPC)<=0); break; - case 46: return (XP_REQ_LVL47-GetXP(oPC)<=0); break; - case 47: return (XP_REQ_LVL48-GetXP(oPC)<=0); break; - case 48: return (XP_REQ_LVL49-GetXP(oPC)<=0); break; - case 49: return (XP_REQ_LVL50-GetXP(oPC)<=0); break; - case 50: return (XP_REQ_LVL51-GetXP(oPC)<=0); break; - case 51: return (XP_REQ_LVL52-GetXP(oPC)<=0); break; - case 52: return (XP_REQ_LVL53-GetXP(oPC)<=0); break; - case 53: return (XP_REQ_LVL54-GetXP(oPC)<=0); break; - case 54: return (XP_REQ_LVL55-GetXP(oPC)<=0); break; - case 55: return (XP_REQ_LVL56-GetXP(oPC)<=0); break; - case 56: return (XP_REQ_LVL57-GetXP(oPC)<=0); break; - case 57: return (XP_REQ_LVL58-GetXP(oPC)<=0); break; - case 58: return (XP_REQ_LVL59-GetXP(oPC)<=0); break; - case 59: return (XP_REQ_LVL60-GetXP(oPC)<=0); break; - case 60: return -2; break; - default: return -1; break; - } - return -3; -} - -int SubtractXPForNextLL(object oPC) -{ -switch(CheckLegendaryLevel(oPC)) - { - case 40: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL41)); return XP_REQ_LVL41; break; - case 41: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL42)); return XP_REQ_LVL42; break; - case 42: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL43)); return XP_REQ_LVL43; break; - case 43: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL44)); return XP_REQ_LVL44; break; - case 44: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL45)); return XP_REQ_LVL45; break; - case 45: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL46)); return XP_REQ_LVL46; break; - case 46: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL47)); return XP_REQ_LVL47; break; - case 47: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL48)); return XP_REQ_LVL48; break; - case 48: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL49)); return XP_REQ_LVL49; break; - case 49: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL50)); return XP_REQ_LVL50; break; - case 50: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL51)); return XP_REQ_LVL51; break; - case 51: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL52)); return XP_REQ_LVL52; break; - case 52: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL53)); return XP_REQ_LVL53; break; - case 53: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL54)); return XP_REQ_LVL54; break; - case 54: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL55)); return XP_REQ_LVL55; break; - case 55: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL56)); return XP_REQ_LVL56; break; - case 56: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL57)); return XP_REQ_LVL57; break; - case 57: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL58)); return XP_REQ_LVL58; break; - case 58: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL59)); return XP_REQ_LVL59; break; - case 59: SetXP(oPC,(GetXP(oPC)-XP_REQ_LVL60)); return XP_REQ_LVL60; break; - case 60: return 0; break; - default: return -1; break; - } - return -3; -} - -int GetXPNeededForNextLL(object oPC) -{ -int nXP; -switch(CheckLegendaryLevel(oPC)) - { - case 40: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 41: nXP = XP_REQ_LVL42-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 42: nXP = XP_REQ_LVL43-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 43: nXP = XP_REQ_LVL44-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 44: nXP = XP_REQ_LVL45-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 45: nXP = XP_REQ_LVL46-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 46: nXP = XP_REQ_LVL47-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 47: nXP = XP_REQ_LVL48-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 48: nXP = XP_REQ_LVL49-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 49: nXP = XP_REQ_LVL50-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 50: nXP = XP_REQ_LVL51-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 51: nXP = XP_REQ_LVL52-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 52: nXP = XP_REQ_LVL53-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 53: nXP = XP_REQ_LVL54-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 54: nXP = XP_REQ_LVL55-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 55: nXP = XP_REQ_LVL56-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 56: nXP = XP_REQ_LVL57-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 57: nXP = XP_REQ_LVL58-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 58: nXP = XP_REQ_LVL59-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 59: nXP = XP_REQ_LVL60-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - case 60: nXP = -1; - default: nXP = XP_REQ_LVL41-(GetXP(oPC)); if(nXP<=0) nXP = 0; break; - } -return nXP; -} - -int GetGainsFeatOnLevelUp(object oPC) -{ -switch(CheckLegendaryLevel(oPC)) - { - case 41: return 1; break; - case 44: return 1; break; - case 47: return 1; break; - case 50: return 1; break; - case 53: return 1; break; - case 56: return 1; break; - case 59: return 1; break; - default: return 0; break; - } - return -3; -} - -int GetGainsStatOnLevelUp(object oPC) -{ -switch(CheckLegendaryLevel(oPC)) - { - case 41: return 1; break; - case 43: return 1; break; - case 45: return 1; break; - case 47: return 1; break; - case 49: return 1; break; - case 51: return 1; break; - case 53: return 1; break; - case 55: return 1; break; - case 57: return 1; break; - case 59: return 1; break; - default: return 0; break; - } - return -3; -} - -int GetGainsSavesOnLevelUp(object oPC) -{ - switch(CheckLegendaryLevel(oPC)) - { - case 43: - case 47: - case 51: - case 55: - case 59: return 1; break; - default: return 0; break; - } - return -3; -} - -void SetControlClass(object oPC, int nClass) -{ -SetPersistentInt(oPC, "ControlClass", nClass); -DoDebug(oPC, "Control Class: " + IntToString(nClass)); -} - - - -int GetCanGainLL(object oPC) -{ -string immortalname; -string sName = GetName(oPC); -immortalname = GetStringLeft(sName, 8) + GetStringRight(sName, 8) + GetStringLeft(GetPCPlayerName(oPC), 8) + GetStringRight(GetPCPlayerName(oPC), 8); -int nImmortal = 2;//GetLocalInt(oPC, immortalname); -if (nImmortal == 2) return TRUE; -return FALSE; -} - -void DoDebug(object oPC, string sDebug) -{ -if (DEBUG) - { - WriteTimestampedLogEntry(sDebug); - SendMessageToPC(oPC, sDebug); - } -} - -struct xAbility GetRoughAbilities(object oPC, string sWP="") -{ - effect eEffect; - itemproperty ipPenalty; - int iCount; - int nValue; - int nValue2; - int nClass = GetControlClass(oPC); - object oItem, oWP, oClone; - location lClone; - struct xAbility xAbility; - for(iCount = 0; iCount < NUM_INVENTORY_SLOTS; iCount++) - { - oItem = GetItemInSlot(iCount, oPC); - if(GetIsObjectValid(oItem)) - { - ipPenalty = GetFirstItemProperty(oItem); - while(GetIsItemPropertyValid(ipPenalty)) - { - if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE)) - { - if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE) - { - nValue = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item - switch(GetItemPropertySubType(ipPenalty)) - { - case ABILITY_STRENGTH: xAbility.nSTR += nValue; break; - case ABILITY_DEXTERITY: xAbility.nDEX += nValue; break; - case ABILITY_CONSTITUTION: xAbility.nCON += nValue; break; - case ABILITY_INTELLIGENCE: xAbility.nINT += nValue; break; - case ABILITY_WISDOM: xAbility.nWIS += nValue; break; - case ABILITY_CHARISMA: xAbility.nCHA += nValue; break; - } - } - } - if(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)) - { - if(GetItemPropertyType(ipPenalty) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) - { - nValue2 = GetItemPropertyCostTableValue(ipPenalty);//will return between -1 and -10, matching the maximum penalty to skills from any given item - switch(GetItemPropertySubType(ipPenalty)) - { - case SKILL_ANIMAL_EMPATHY: xAbility.nANIMAL_EMPATHY += nValue2; break; - case SKILL_CONCENTRATION: xAbility.nCONCENTRATION += nValue2; break; - case SKILL_DISABLE_TRAP: xAbility.nDISABLE_TRAP += nValue2; break; - case SKILL_DISCIPLINE: xAbility.nDISCIPLINE += nValue2; break; - case SKILL_HEAL: xAbility.nHEAL += nValue2; break; - case SKILL_HIDE: xAbility.nHIDE += nValue2; break; - case SKILL_LISTEN: xAbility.nLISTEN += nValue2; break; - case SKILL_LORE: xAbility.nLORE += nValue2; break; - case SKILL_MOVE_SILENTLY: xAbility.nMOVE_SILENTLY += nValue2; break; - case SKILL_OPEN_LOCK: xAbility.nOPEN_LOCK += nValue2; break; - case SKILL_PARRY: xAbility.nPARRY += nValue2; break; - case SKILL_PERFORM: xAbility.nPERFORM += nValue2; break; - case SKILL_PERSUADE: xAbility.nPERSUADE += nValue2; break; - case SKILL_PICK_POCKET: xAbility.nPICK_POCKET += nValue2; break; - case SKILL_SEARCH: xAbility.nSEARCH += nValue2; break; - case SKILL_SET_TRAP: xAbility.nSET_TRAP += nValue2; break; - case SKILL_SPELLCRAFT: xAbility.nSPELLCRAFT += nValue2; break; - case SKILL_SPOT: xAbility.nSPOT += nValue2; break; - case SKILL_TAUNT: xAbility.nTAUNT += nValue2; break; - case SKILL_USE_MAGIC_DEVICE: xAbility.nUSE_MAGIC_DEVICE += nValue2; break; - case SKILL_APPRAISE: xAbility.nAPPRAISE += nValue2; break; - case SKILL_TUMBLE: xAbility.nTUMBLE += nValue2; break; - case SKILL_CRAFT_TRAP: xAbility.nCRAFT_TRAP += nValue2; break; - case SKILL_BLUFF: xAbility.nBLUFF += nValue2; break; - case SKILL_INTIMIDATE: xAbility.nINTIMIDATE += nValue2; break; - case SKILL_CRAFT_ARMOR: xAbility.nCRAFT_ARMOR += nValue2; break; - case SKILL_CRAFT_WEAPON: xAbility.nCRAFT_WEAPON += nValue2; break; - } - } - } - ipPenalty = GetNextItemProperty(oItem); - } - } - } - //Create Clone - oWP = GetWaypointByTag(sWP); - lClone = GetLocation(oWP); - if(sWP != "" && oWP != OBJECT_INVALID && GetAreaFromLocation(lClone)!= OBJECT_INVALID) - { - lClone = GetLocation(oWP); - } - else - { - lClone = GetLocation(oPC); - } - oClone = CopyObject(oPC,lClone); - //Remove Effects from Clone - eEffect = GetFirstEffect(oClone); - while(GetEffectType(eEffect) != EFFECT_TYPE_INVALIDEFFECT) - { - RemoveEffect(oClone, eEffect); - eEffect = GetNextEffect(oClone); - } - for(iCount = 0; iCount < 6; iCount++) - { - eEffect = EffectAbilityIncrease(iCount, 12); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); - nValue = GetAbilityScore(oClone, iCount); - switch(iCount) - { - case ABILITY_STRENGTH: if(xAbility.nSTR >= -10) xAbility.nSTR += nValue - 12; else xAbility.nSTR = nValue - 2; break; - case ABILITY_DEXTERITY: if(xAbility.nDEX >= -10) xAbility.nDEX += nValue - 12; else xAbility.nDEX = nValue - 2; break; - case ABILITY_CONSTITUTION: if(xAbility.nCON >= -10) xAbility.nCON += nValue - 12; else xAbility.nCON = nValue - 2; break; - case ABILITY_INTELLIGENCE: if(xAbility.nINT >= -10) xAbility.nINT += nValue - 12; else xAbility.nINT = nValue - 2; break; - case ABILITY_WISDOM: if(xAbility.nWIS >= -10) xAbility.nWIS += nValue - 12; else xAbility.nWIS = nValue - 2; break; - case ABILITY_CHARISMA: if(xAbility.nCHA >= -10) xAbility.nCHA += nValue - 12; else xAbility.nCHA = nValue - 2; break; - } - } - for(iCount = 0; iCount < 27; iCount++) - { - //eEffect = EffectSkillIncrease(iCount, 50); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oClone); - nValue = GetSkillRank(iCount, oClone); - switch(iCount)//we subtract and extra 6 here for the stats being at +12, for a total of -56 - { - case SKILL_ANIMAL_EMPATHY: if(xAbility.nANIMAL_EMPATHY >= -10) xAbility.nANIMAL_EMPATHY += nValue - 6; else xAbility.nANIMAL_EMPATHY = nValue - 2; break; - case SKILL_CONCENTRATION: if(xAbility.nCONCENTRATION >= -10) xAbility.nCONCENTRATION += nValue - 6; else xAbility.nCONCENTRATION = nValue - 2; break; - case SKILL_DISABLE_TRAP: if(xAbility.nDISABLE_TRAP >= -10) xAbility.nDISABLE_TRAP += nValue - 6; else xAbility.nDISABLE_TRAP = nValue - 2; break; - case SKILL_DISCIPLINE: if(xAbility.nDISCIPLINE >= -10) xAbility.nDISCIPLINE += nValue - 6; else xAbility.nDISCIPLINE = nValue - 2; break; - case SKILL_HEAL: if(xAbility.nHEAL >= -10) xAbility.nHEAL += nValue - 6; else xAbility.nHEAL = nValue - 2; break; - case SKILL_HIDE: if(xAbility.nHIDE >= -10) xAbility.nHIDE += nValue - 6; else xAbility.nHIDE = nValue - 2; break; - case SKILL_LISTEN: if(xAbility.nLISTEN >= -10) xAbility.nLISTEN += nValue - 6; else xAbility.nLISTEN = nValue - 2; break; - case SKILL_LORE: if(xAbility.nLORE >= -10) xAbility.nLORE += nValue - 6; else xAbility.nLORE = nValue - 2; break; - case SKILL_MOVE_SILENTLY: if(xAbility.nMOVE_SILENTLY >= -10) xAbility.nMOVE_SILENTLY += nValue - 6; else xAbility.nMOVE_SILENTLY = nValue - 2; break; - case SKILL_OPEN_LOCK: if(xAbility.nOPEN_LOCK >= -10) xAbility.nOPEN_LOCK += nValue - 6; else xAbility.nOPEN_LOCK = nValue - 2; break; - case SKILL_PARRY: if(xAbility.nPARRY >= -10) xAbility.nPARRY += nValue - 6; else xAbility.nPARRY = nValue - 2; break; - case SKILL_PERFORM: if(xAbility.nPERFORM >= -10) xAbility.nPERFORM += nValue - 6; else xAbility.nPERFORM = nValue - 2; break; - case SKILL_PERSUADE: if(xAbility.nPERSUADE >= -10) xAbility.nPERSUADE += nValue - 6; else xAbility.nPERSUADE = nValue - 2; break; - case SKILL_PICK_POCKET: if(xAbility.nPICK_POCKET >= -10) xAbility.nPICK_POCKET += nValue - 6; else xAbility.nPICK_POCKET = nValue - 2; break; - case SKILL_SEARCH: if(xAbility.nSEARCH >= -10) xAbility.nSEARCH += nValue - 6; else xAbility.nSEARCH = nValue - 2; break; - case SKILL_SET_TRAP: if(xAbility.nSET_TRAP >= -10) xAbility.nSET_TRAP += nValue - 6; else xAbility.nSET_TRAP = nValue - 2; break; - case SKILL_SPELLCRAFT: if(xAbility.nSPELLCRAFT >= -10) xAbility.nSPELLCRAFT += nValue - 6; else xAbility.nSPELLCRAFT = nValue - 2; break; - case SKILL_SPOT: if(xAbility.nSPOT >= -10) xAbility.nSPOT += nValue - 6; else xAbility.nSPOT = nValue - 2; break; - case SKILL_TAUNT: if(xAbility.nTAUNT >= -10) xAbility.nTAUNT += nValue - 6; else xAbility.nTAUNT = nValue - 2; break; - case SKILL_USE_MAGIC_DEVICE: if(xAbility.nUSE_MAGIC_DEVICE >= -10) xAbility.nUSE_MAGIC_DEVICE += nValue - 6; else xAbility.nUSE_MAGIC_DEVICE = nValue - 2; break; - case SKILL_APPRAISE: if(xAbility.nAPPRAISE >= -10) xAbility.nAPPRAISE += nValue - 6; else xAbility.nAPPRAISE = nValue - 2; break; - case SKILL_TUMBLE: if(xAbility.nTUMBLE >= -10) xAbility.nTUMBLE += nValue - 6; else xAbility.nTUMBLE = nValue - 2; break; - case SKILL_CRAFT_TRAP: if(xAbility.nCRAFT_TRAP >= -10) xAbility.nCRAFT_TRAP += nValue - 6; else xAbility.nCRAFT_TRAP = nValue - 2; break; - case SKILL_BLUFF: if(xAbility.nBLUFF >= -10) xAbility.nBLUFF += nValue - 6; else xAbility.nBLUFF = nValue - 2; break; - case SKILL_INTIMIDATE: if(xAbility.nINTIMIDATE >= -10) xAbility.nINTIMIDATE += nValue - 6; else xAbility.nINTIMIDATE = nValue - 2; break; - case SKILL_CRAFT_ARMOR: if(xAbility.nCRAFT_ARMOR >= -10) xAbility.nCRAFT_ARMOR += nValue - 6; else xAbility.nCRAFT_ARMOR = nValue - 2; break; - case SKILL_CRAFT_WEAPON: if(xAbility.nCRAFT_WEAPON >= -10) xAbility.nCRAFT_WEAPON += nValue - 6; else xAbility.nCRAFT_WEAPON = nValue - 2; break; - } - } -//dont try to destroy or take the clone items, wont work -DestroyObject(oClone); -return xAbility; -} - -int GetBaseAbilityModifier(int nAmount) -{ - if ((nAmount%2)==0) - { - nAmount = (nAmount/2)+(nAmount%2); - nAmount = nAmount-5; - } - else - { - nAmount = (nAmount/2)+(nAmount%2); - nAmount = nAmount-6; - } - return nAmount; -} - -int GetHasGreatStrenth(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_STRENGTH_10,oPC)) nFeat++; - return nFeat; -} - -int GetHasGreatDexterity(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_DEXTERITY_10,oPC)) nFeat++; - return nFeat; -} - -int GetHasGreatConstitution(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CONSTITUTION_10,oPC)) nFeat++; - return nFeat; -} - -int GetHasGreatIntelligence(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_INTELLIGENCE_10,oPC)) nFeat++; - return nFeat; -} - -int GetHasGreatWisdom(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_WISDOM_10,oPC)) nFeat++; - return nFeat; -} - -int GetHasGreatCharisma(object oPC) -{ - int nFeat = 0; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_1,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_2,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_3,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_4,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_5,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_6,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_7,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_8,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_9,oPC)) nFeat++; - if(GetHasFeat(FEAT_EPIC_GREAT_CHARISMA_10,oPC)) nFeat++; - return nFeat; -} - -int GetBaseStat(int nStatType, int nStat, object oPC) -{ -int nSubtract = 0; -int nBase; -switch(nStatType) - { - case ABILITY_STRENGTH: - nSubtract = GetHasGreatStrenth(oPC) + GetRDDStatMod(nStatType, oPC); - nBase = nStat; break; - case ABILITY_DEXTERITY: - nSubtract = GetHasGreatDexterity(oPC) + GetRDDStatMod(nStatType, oPC); - nBase = nStat; break ; - case ABILITY_CONSTITUTION: - nSubtract = GetHasGreatConstitution(oPC) + GetRDDStatMod(nStatType, oPC);; - nBase = nStat; break; - case ABILITY_INTELLIGENCE: - nSubtract = GetHasGreatIntelligence(oPC) + GetRDDStatMod(nStatType, oPC);; - nBase = nStat; break; - case ABILITY_WISDOM: - nSubtract = GetHasGreatWisdom(oPC) + GetRDDStatMod(nStatType, oPC);; - nBase = nStat; break; - case ABILITY_CHARISMA: - nSubtract = GetHasGreatCharisma(oPC) + GetRDDStatMod(nStatType, oPC);; - nBase = nStat; break; - default: return -3; break; - } -return (nBase-nSubtract); -} - -int GetRDDStatMod(int nStatType, object oPC) -{ -int nRDDLevel = GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC); -int nReturn = 0; -if (nRDDLevel < 1) return 0;//if not rdd, return -switch(nStatType) - { - case ABILITY_STRENGTH: - if (nRDDLevel > 9) nReturn = 8; - else if (nRDDLevel > 3) nReturn = 4; - else if (nRDDLevel > 1) nReturn = 2; - else nReturn = 0; - break; - case ABILITY_DEXTERITY: - if (nRDDLevel > 6) nReturn = 2; - else nReturn = 0; - break; - case ABILITY_CONSTITUTION: - - case ABILITY_INTELLIGENCE: - if (nRDDLevel > 8) nReturn = 2; - else nReturn = 0; - break; - case ABILITY_WISDOM: - nReturn = 0; - break; - case ABILITY_CHARISMA: - if (nRDDLevel > 9) nReturn = 2; - else nReturn = 0; - break; - } -return nReturn; -} - -int GetArmorPenalty(object oPC) -{ - object oItem = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); - if (!GetIsObjectValid(oItem)) return 0; - if (GetBaseItemType(oItem) != BASE_ITEM_ARMOR) return 0; - SetIdentified(oItem,FALSE); - int nPenalty = 0; - switch (GetGoldPieceValue(oItem)) - { - case 1: nPenalty = 0; break; - case 5: nPenalty = 0; break; - case 10: nPenalty = 0; break; - case 15: nPenalty = 1; break; - case 100: nPenalty = 2; break; - case 150: nPenalty = 5; break; - case 200: nPenalty = 7; break; - case 600: nPenalty = 7; break; - case 1500: nPenalty = 8; break; - } - SetIdentified(oItem,TRUE); - return nPenalty; -} - -int GetShieldPenalty(object oPC) -{ - object oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC); - if (!GetIsObjectValid(oItem)) return 0; - int nType = GetBaseItemType(oItem); - int nPenalty = 0; - switch(nType) - { - case BASE_ITEM_SMALLSHIELD: nPenalty = 1; break; - case BASE_ITEM_LARGESHIELD: nPenalty = 2; break; - case BASE_ITEM_TOWERSHIELD: nPenalty = 10; break; - default: nPenalty = 0; break; - } - return nPenalty; -} - -int GetBaseSkill(int nSkill, struct xAbility stat, object oPC) -{ -int nSubtract = 0; -int nModifier = 0; -int nBase = 0; -int nArmorShield = 0; -int nValue = GetSkillRank(nSkill, oPC); -if (GetCostOfSkill(GetControlClass(oPC), nSkill) == -1 || nValue == 0) - { - return 0; //if skill non-available return 0 - } -else - { - switch(nSkill) - { - case SKILL_ANIMAL_EMPATHY: - nBase = stat.nANIMAL_EMPATHY; - if(GetHasFeat(FEAT_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_ANIMAL_EMPATHY,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier=GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_APPRAISE: - nBase = stat.nAPPRAISE; - if(GetHasFeat(FEAT_SILVER_PALM,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILLFOCUS_APPRAISE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_APPRAISE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_BLUFF: - nBase = stat.nBLUFF; - if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) - nSubtract=nSubtract+4; - if(GetHasFeat(FEAT_SKILL_FOCUS_BLUFF,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_BLUFF,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_CONCENTRATION: - nBase = stat.nCONCENTRATION; - if(GetHasFeat(FEAT_SKILL_AFFINITY_CONCENTRATION,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_CONCENTRATION,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CONCENTRATION,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatConstitution(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCON); - break; - case SKILL_CRAFT_ARMOR: - nBase = stat.nCRAFT_ARMOR; - if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_ARMOR,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_ARMOR,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_CRAFT_TRAP: - nBase = stat.nCRAFT_TRAP; - if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_TRAP,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_TRAP,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_CRAFT_WEAPON: - nBase = stat.nCRAFT_WEAPON; - if(GetHasFeat(FEAT_SKILL_FOCUS_CRAFT_WEAPON,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_CRAFT_WEAPON,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_DISABLE_TRAP: - nBase = stat.nDISABLE_TRAP; - if(GetHasFeat(FEAT_SKILL_FOCUS_DISABLE_TRAP,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISABLETRAP,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_DISCIPLINE: - nBase = stat.nDISCIPLINE; - if(GetHasFeat(FEAT_SKILL_FOCUS_DISCIPLINE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_DISCIPLINE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatStrenth(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nSTR); - break; - case SKILL_HEAL: - nBase = stat.nHEAL; - if(GetHasFeat(FEAT_SKILL_FOCUS_HEAL,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HEAL,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nWIS); - break; - case SKILL_HIDE: - nBase = stat.nHIDE; - if(GetHasFeat(FEAT_STEALTHY,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_HIDE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_HIDE,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_INTIMIDATE: - nBase = stat.nINTIMIDATE; - if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) - nSubtract=nSubtract+4; - if(GetHasFeat(FEAT_SKILL_FOCUS_INTIMIDATE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_INTIMIDATE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_LISTEN: - nBase = stat.nLISTEN; - if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_LISTEN,oPC)) - nSubtract++; - if(GetHasFeat(FEAT_ALERTNESS,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_AFFINITY_LISTEN,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_LISTEN,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LISTEN,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nWIS); - break; - case SKILL_LORE: - nBase = stat.nLORE; - if(GetHasFeat(FEAT_BARDIC_KNOWLEDGE,oPC)) - nSubtract=nSubtract+GetLevelByClass(CLASS_TYPE_BARD,oPC)+GetLevelByClass(CLASS_TYPE_HARPER); - if(GetHasFeat(FEAT_SKILL_AFFINITY_LORE,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_LORE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_LORE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_MOVE_SILENTLY: - nBase = stat.nMOVE_SILENTLY; - if(GetHasFeat(FEAT_STEALTHY,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_AFFINITY_MOVE_SILENTLY,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_MOVE_SILENTLY,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_MOVESILENTLY,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_OPEN_LOCK: - nBase = stat.nOPEN_LOCK; - if(GetHasFeat(FEAT_SKILL_FOCUS_OPEN_LOCK,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_OPENLOCK,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_PARRY: - nBase = stat.nPARRY; - if(GetHasFeat(FEAT_SKILL_FOCUS_PARRY,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PARRY,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_PERFORM: - nBase = stat.nPERFORM; - if(GetHasFeat(FEAT_ARTIST,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_PERFORM,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERFORM,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_PERSUADE: - nBase = stat.nPERSUADE; - if(GetHasFeat(FEAT_SILVER_PALM,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_THUG,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) - nSubtract=nSubtract+4; - if(GetHasFeat(FEAT_SKILL_FOCUS_PERSUADE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PERSUADE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_PICK_POCKET: - nBase = stat.nPICK_POCKET; - if(GetHasFeat(FEAT_SKILL_FOCUS_PICK_POCKET,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_PICKPOCKET,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_SEARCH: - nBase = stat.nSEARCH; - if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SEARCH,oPC)) - nSubtract=nSubtract+1; - if(GetHasFeat(FEAT_SKILL_AFFINITY_SEARCH,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_SEARCH,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SEARCH,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_SET_TRAP: - nBase = stat.nSET_TRAP; - if(GetHasFeat(FEAT_SKILL_FOCUS_SET_TRAP,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SETTRAP,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_SPELLCRAFT: - nBase = stat.nSPELLCRAFT; - if(GetHasFeat(FEAT_COURTLY_MAGOCRACY,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_SPELLCRAFT,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPELLCRAFT,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatIntelligence(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nINT); - break; - case SKILL_SPOT: - nBase = stat.nSPOT; - if(GetHasFeat(FEAT_ALERTNESS,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_BLOODED,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_ARTIST,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_PARTIAL_SKILL_AFFINITY_SPOT,oPC)) - nSubtract=nSubtract+1; - if(GetHasFeat(FEAT_SKILL_AFFINITY_SPOT,oPC)) - nSubtract=nSubtract+2; - if(GetHasFeat(FEAT_SKILL_FOCUS_SPOT,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_SPOT,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatWisdom(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nWIS); - break; - case SKILL_TAUNT: - nBase = stat.nTAUNT; - if(GetHasFeat(FEAT_EPIC_REPUTATION,oPC)) - nSubtract=nSubtract+4; - if(GetHasFeat(FEAT_SKILL_FOCUS_TAUNT,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TAUNT,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - case SKILL_TUMBLE: - nBase = stat.nTUMBLE; - if(GetHasFeat(FEAT_SKILL_FOCUS_TUMBLE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_TUMBLE,oPC)) - nSubtract=nSubtract+10; - nArmorShield = GetArmorPenalty(oPC) + GetShieldPenalty(oPC); -// nSubtract = nSubtract + (GetHasGreatDexterity(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nDEX); - break; - case SKILL_USE_MAGIC_DEVICE: - nBase = stat.nUSE_MAGIC_DEVICE; - if(GetHasFeat(FEAT_SKILL_FOCUS_USE_MAGIC_DEVICE,oPC)) - nSubtract=nSubtract+3; - if(GetHasFeat(FEAT_EPIC_SKILL_FOCUS_USEMAGICDEVICE,oPC)) - nSubtract=nSubtract+10; -// nSubtract = nSubtract + (GetHasGreatCharisma(oPC)/2); - nModifier = GetBaseAbilityModifier(stat.nCHA); - break; - default: return -3; - } - return (nBase-nSubtract-nModifier+nArmorShield); - } -} - -struct xAbility GetBaseAbilities(struct xAbility stat, object oPC) -{ -struct xAbility base; -int iCount; -int nBaseAbility; -for(iCount = 0; iCount < 6; iCount++)//filter out the greater stat feats - { - switch(iCount) - { - case ABILITY_STRENGTH: base.nSTR = GetBaseStat(iCount, stat.nSTR, oPC); break; - case ABILITY_DEXTERITY: base.nDEX = GetBaseStat(iCount, stat.nDEX, oPC); break; - case ABILITY_CONSTITUTION: base.nCON = GetBaseStat(iCount, stat.nCON, oPC); break; - case ABILITY_INTELLIGENCE: base.nINT = GetBaseStat(iCount, stat.nINT, oPC); break; - case ABILITY_WISDOM: base.nWIS = GetBaseStat(iCount, stat.nWIS, oPC); break; - case ABILITY_CHARISMA: base.nCHA = GetBaseStat(iCount, stat.nCHA, oPC); break; - } - } -//For skills we must still process them to remove ability and feat bonuses. -for(iCount = 0; iCount < 27; iCount++) - { - nBaseAbility = GetBaseSkill(iCount, stat, oPC); - switch (iCount) - { - case 0: base.nANIMAL_EMPATHY = nBaseAbility; break; - case 1: base.nCONCENTRATION = nBaseAbility; break; - case 2: base.nDISABLE_TRAP = nBaseAbility; break; - case 3: base.nDISCIPLINE = nBaseAbility; break; - case 4: base.nHEAL = nBaseAbility; break; - case 5: base.nHIDE = nBaseAbility; break; - case 6: base.nLISTEN = nBaseAbility; break; - case 7: base.nLORE = nBaseAbility; break; - case 8: base.nMOVE_SILENTLY = nBaseAbility; break; - case 9: base.nOPEN_LOCK = nBaseAbility; break; - case 10: base.nPARRY = nBaseAbility; break; - case 11: base.nPERFORM = nBaseAbility; break; - case 12: base.nPERSUADE = nBaseAbility; break; - case 13: base.nPICK_POCKET = nBaseAbility; break; - case 14: base.nSEARCH = nBaseAbility; break; - case 15: base.nSET_TRAP = nBaseAbility; break; - case 16: base.nSPELLCRAFT = nBaseAbility; break; - case 17: base.nSPOT = nBaseAbility; break; - case 18: base.nTAUNT = nBaseAbility; break; - case 19: base.nUSE_MAGIC_DEVICE = nBaseAbility; break; - case 20: base.nAPPRAISE = nBaseAbility; break; - case 21: base.nTUMBLE = nBaseAbility; break; - case 22: base.nCRAFT_TRAP = nBaseAbility; break; - case 23: base.nBLUFF = nBaseAbility; break; - case 24: base.nINTIMIDATE = nBaseAbility; break; - case 25: base.nCRAFT_ARMOR = nBaseAbility; break; - case 26: base.nCRAFT_WEAPON = nBaseAbility; break; - } - } -return base; -} - -void SetBaseAbilityMarkers(struct xAbility stat, object oPC) -{ -SetLocalInt(oPC, "BASE_STR", stat.nSTR); -SetLocalInt(oPC, "BASE_DEX", stat.nDEX); -SetLocalInt(oPC, "BASE_CON", stat.nCON); -SetLocalInt(oPC, "BASE_INT", stat.nINT); -SetLocalInt(oPC, "BASE_WIS", stat.nWIS); -SetLocalInt(oPC, "BASE_CHA", stat.nCHA); -DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); -SetLocalInt(oPC, "BASE_ANIMAL", stat.nANIMAL_EMPATHY); -SetLocalInt(oPC, "BASE_CONCEN", stat.nCONCENTRATION); -SetLocalInt(oPC, "BASE_DISABL", stat.nDISABLE_TRAP); -SetLocalInt(oPC, "BASE_DISCIP", stat.nDISCIPLINE); -SetLocalInt(oPC, "BASE_HEAL", stat.nHEAL); -SetLocalInt(oPC, "BASE_HIDE", stat.nHIDE); -DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); -SetLocalInt(oPC, "BASE_LISTEN", stat.nLISTEN); -SetLocalInt(oPC, "BASE_LORE", stat.nLORE); -SetLocalInt(oPC, "BASE_MOVE_S", stat.nMOVE_SILENTLY); -SetLocalInt(oPC, "BASE_OPEN_L", stat.nOPEN_LOCK); -SetLocalInt(oPC, "BASE_PARRY", stat.nPARRY); -SetLocalInt(oPC, "BASE_PERFOR", stat.nPERFORM); -DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); -SetLocalInt(oPC, "BASE_PERSUA", stat.nPERSUADE); -SetLocalInt(oPC, "BASE_PICK_P", stat.nPICK_POCKET); -SetLocalInt(oPC, "BASE_SEARCH", stat.nSEARCH); -SetLocalInt(oPC, "BASE_SET_TR", stat.nSET_TRAP); -SetLocalInt(oPC, "BASE_SPELLC", stat.nSPELLCRAFT); -SetLocalInt(oPC, "BASE_SPOT", stat.nSPOT); -DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); -SetLocalInt(oPC, "BASE_TAUNT", stat.nTAUNT); -SetLocalInt(oPC, "BASE_USE_MA", stat.nUSE_MAGIC_DEVICE); -SetLocalInt(oPC, "BASE_APPRAI", stat.nAPPRAISE); -SetLocalInt(oPC, "BASE_TUMBLE", stat.nTUMBLE); -SetLocalInt(oPC, "BASE_CRAFT_T", stat.nCRAFT_TRAP); -SetLocalInt(oPC, "BASE_BLUFF", stat.nBLUFF); -DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); -SetLocalInt(oPC, "BASE_INTIMI", stat.nINTIMIDATE); -SetLocalInt(oPC, "BASE_CRAFT_A", stat.nCRAFT_ARMOR); -SetLocalInt(oPC, "BASE_CRAFT_W", stat.nCRAFT_WEAPON); -DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); -} - -void DeleteBaseAbilityMarkers(object oPC) -{ -DeleteLocalInt(oPC, "BASE_STR"); -DeleteLocalInt(oPC, "BASE_DEX"); -DeleteLocalInt(oPC, "BASE_CON"); -DeleteLocalInt(oPC, "BASE_INT"); -DeleteLocalInt(oPC, "BASE_WIS"); -DeleteLocalInt(oPC, "BASE_CHA"); -DoDebug(oPC, "Base ability ints set as STR: "+IntToString(GetLocalInt(oPC, "BASE_STR"))+", DEX: "+IntToString(GetLocalInt(oPC, "BASE_DEX"))+", CON: "+IntToString(GetLocalInt(oPC, "BASE_CON"))+", INT: "+IntToString(GetLocalInt(oPC, "BASE_INT"))+", WIS: "+IntToString(GetLocalInt(oPC, "BASE_WIS"))+", CHA: "+IntToString(GetLocalInt(oPC, "BASE_CHA"))+"."); -DeleteLocalInt(oPC, "BASE_ANIMAL"); -DeleteLocalInt(oPC, "BASE_CONCEN"); -DeleteLocalInt(oPC, "BASE_DISABL"); -DeleteLocalInt(oPC, "BASE_DISCIP"); -DeleteLocalInt(oPC, "BASE_HEAL"); -DeleteLocalInt(oPC, "BASE_HIDE"); -DoDebug(oPC, "Base ability ints set as ANIMAL: "+IntToString(GetLocalInt(oPC, "BASE_ANIMAL"))+", CONCEN: "+IntToString(GetLocalInt(oPC, "BASE_CONCEN"))+", DISABL: "+IntToString(GetLocalInt(oPC, "BASE_DISABL"))+", DISCIP: "+IntToString(GetLocalInt(oPC, "BASE_DISCIP"))+", HEAL: "+IntToString(GetLocalInt(oPC, "BASE_HEAL"))+", HIDE: "+IntToString(GetLocalInt(oPC, "BASE_HIDE"))+"."); -DeleteLocalInt(oPC, "BASE_LISTEN"); -DeleteLocalInt(oPC, "BASE_LORE"); -DeleteLocalInt(oPC, "BASE_MOVE_S"); -DeleteLocalInt(oPC, "BASE_OPEN_L"); -DeleteLocalInt(oPC, "BASE_PARRY"); -DeleteLocalInt(oPC, "BASE_PERFOR"); -DoDebug(oPC, "Base ability ints set as LISTEN: "+IntToString(GetLocalInt(oPC, "BASE_LISTEN"))+", LORE: "+IntToString(GetLocalInt(oPC, "BASE_LORE"))+", MOVE_S: "+IntToString(GetLocalInt(oPC, "BASE_MOVE_S"))+", OPEN_L: "+IntToString(GetLocalInt(oPC, "BASE_OPEN_L"))+", PARRY: "+IntToString(GetLocalInt(oPC, "BASE_PARRY"))+", PERFOR: "+IntToString(GetLocalInt(oPC, "BASE_PERFOR"))+"."); -DeleteLocalInt(oPC, "BASE_PERSUA"); -DeleteLocalInt(oPC, "BASE_PICK_P"); -DeleteLocalInt(oPC, "BASE_SEARCH"); -DeleteLocalInt(oPC, "BASE_SET_TR"); -DeleteLocalInt(oPC, "BASE_SPELLC"); -DeleteLocalInt(oPC, "BASE_SPOT"); -DoDebug(oPC, "Base ability ints set as PERSUA: "+IntToString(GetLocalInt(oPC, "BASE_PERSUA"))+", PICK_P: "+IntToString(GetLocalInt(oPC, "BASE_PICK_P"))+", SEARCH: "+IntToString(GetLocalInt(oPC, "BASE_SEARCH"))+", SET_TR: "+IntToString(GetLocalInt(oPC, "BASE_SET_TR"))+", SPELLC: "+IntToString(GetLocalInt(oPC, "BASE_SPELLC"))+", SPOT: "+IntToString(GetLocalInt(oPC, "BASE_SPOT"))+"."); -DeleteLocalInt(oPC, "BASE_TAUNT"); -DeleteLocalInt(oPC, "BASE_USE_MA"); -DeleteLocalInt(oPC, "BASE_APPRAI"); -DeleteLocalInt(oPC, "BASE_TUMBLE"); -DeleteLocalInt(oPC, "BASE_CRAFT_T"); -DeleteLocalInt(oPC, "BASE_BLUFF"); -DoDebug(oPC, "Base ability ints set as TAUNT: "+IntToString(GetLocalInt(oPC, "BASE_TAUNT"))+", USE_MA: "+IntToString(GetLocalInt(oPC, "BASE_USE_MA"))+", APPRAI: "+IntToString(GetLocalInt(oPC, "BASE_APPRAI"))+", TUMBLE: "+IntToString(GetLocalInt(oPC, "BASE_TUMBLE"))+", CRAFT_T: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_T"))+", BLUFF: "+IntToString(GetLocalInt(oPC, "BASE_BLUFF"))+"."); -DeleteLocalInt(oPC, "BASE_INTIMI"); -DeleteLocalInt(oPC, "BASE_CRAFT_A"); -DeleteLocalInt(oPC, "BASE_CRAFT_W"); -DoDebug(oPC, "Base ability ints set as INTIMI: "+IntToString(GetLocalInt(oPC, "BASE_INTIMI"))+", CRAFT_A: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_A"))+", CRAFT_W: "+IntToString(GetLocalInt(oPC, "BASE_CRAFT_W"))+"."); -} - -int GetSkillPointsGainedOnLevelUp(object oPC) -{ -int nClass = GetControlClass(oPC); -int nInt = GetLocalInt(oPC, "BASE_INT"); -int nClassBonus = 0; -int nRaceBonus = 0; -int nTotal; -if(GetRacialType(oPC)==RACIAL_TYPE_HUMAN) - { - nRaceBonus = 1; - } -switch(nClass) - { - case CLASS_TYPE_ROGUE: - nClassBonus = 8; break; - case CLASS_TYPE_SHADOWDANCER: - nClassBonus = 6; break; - case CLASS_TYPE_ARCANE_ARCHER: - case CLASS_TYPE_ASSASSIN: - case CLASS_TYPE_BARBARIAN: - case CLASS_TYPE_BARD: - case CLASS_TYPE_DRUID: - case CLASS_TYPE_HARPER: - case CLASS_TYPE_MONK: - case CLASS_TYPE_RANGER: - case CLASS_TYPE_SHIFTER: - nClassBonus = 4; break; - case CLASS_TYPE_BLACKGUARD: - case CLASS_TYPE_CLERIC: - case CLASS_TYPE_FIGHTER: - case CLASS_TYPE_DIVINECHAMPION: - case CLASS_TYPE_DRAGONDISCIPLE: - case CLASS_TYPE_DWARVENDEFENDER: - case CLASS_TYPE_PALADIN: - case CLASS_TYPE_PALEMASTER: - case CLASS_TYPE_SORCERER: - case CLASS_TYPE_WEAPON_MASTER: - case CLASS_TYPE_WIZARD: - nClassBonus = 2; break; - } -nTotal = nClassBonus+nRaceBonus+GetBaseAbilityModifier(nInt); -DoDebug(oPC, "Skill Points Gained: "+IntToString(nTotal)+"."); -return nTotal; -} - -int GetIsSkillAvailable(object oPC, int nSkill) -{ -int nPointsAvailable = GetLocalInt(oPC, "PointsAvailable"); -int nClass = GetControlClass(oPC); -int nLevel = CheckLegendaryLevel(oPC); -int nSkillMax; -int nSkillTotal; -switch (nSkill) - { - case 0: nSkillTotal = GetLocalInt(oPC, "BASE_ANIMAL"); break; - case 1: nSkillTotal = GetLocalInt(oPC, "BASE_CONCEN"); break; - case 2: nSkillTotal = GetLocalInt(oPC, "BASE_DISABL"); break; - case 3: nSkillTotal = GetLocalInt(oPC, "BASE_DISCIP"); break; - case 4: nSkillTotal = GetLocalInt(oPC, "BASE_HEAL"); break; - case 5: nSkillTotal = GetLocalInt(oPC, "BASE_HIDE"); break; - case 6: nSkillTotal = GetLocalInt(oPC, "BASE_LISTEN"); break; - case 7: nSkillTotal = GetLocalInt(oPC, "BASE_LORE"); break; - case 8: nSkillTotal = GetLocalInt(oPC, "BASE_MOVE_S"); break; - case 9: nSkillTotal = GetLocalInt(oPC, "BASE_OPEN_L"); break; - case 10: nSkillTotal = GetLocalInt(oPC, "BASE_PARRY"); break; - case 11: nSkillTotal = GetLocalInt(oPC, "BASE_PERFOR"); break; - case 12: nSkillTotal = GetLocalInt(oPC, "BASE_PERSUA"); break; - case 13: nSkillTotal = GetLocalInt(oPC, "BASE_PICK_P"); break; - case 14: nSkillTotal = GetLocalInt(oPC, "BASE_SEARCH"); break; - case 15: nSkillTotal = GetLocalInt(oPC, "BASE_SET_TR"); break; - case 16: nSkillTotal = GetLocalInt(oPC, "BASE_SPELLC"); break; - case 17: nSkillTotal = GetLocalInt(oPC, "BASE_SPOT"); break; - case 18: nSkillTotal = GetLocalInt(oPC, "BASE_TAUNT"); break; - case 19: nSkillTotal = GetLocalInt(oPC, "BASE_USE_MA"); break; - case 20: nSkillTotal = GetLocalInt(oPC, "BASE_APPRAI"); break; - case 21: nSkillTotal = GetLocalInt(oPC, "BASE_TUMBLE"); break; - case 22: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_T"); break; - case 23: nSkillTotal = GetLocalInt(oPC, "BASE_BLUFF"); break; - case 24: nSkillTotal = GetLocalInt(oPC, "BASE_INTIMI"); break; - case 25: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_A"); break; - case 26: nSkillTotal = GetLocalInt(oPC, "BASE_CRAFT_W"); break; - } -int nSkillCost = GetCostOfSkill(nClass, nSkill);//returns -1 if not available -if (nSkillCost == 2)//cross-class - { - nSkillMax = (nLevel+4)/2;//they can go up to half of (three points higher than their new level), CheckLegendaryLevel returns the CURRENT level - } -else - { - nSkillMax = nLevel+4;//they can go three points higher than their new level, CheckLegendaryLevel returns the CURRENT level - } -if((nSkillCost > 0) && (nPointsAvailable >= nSkillCost) && (nSkillTotal < nSkillMax)) return TRUE; -else return FALSE; -} - -string GetNameOfSkill(int nSkill) -{ -string sSkill; -switch (nSkill) - { - case 0: sSkill = "Animal Empathy"; break; - case 1: sSkill = "Concentration"; break; - case 2: sSkill = "Disable Trap"; break; - case 3: sSkill = "Discipline"; break; - case 4: sSkill = "Heal"; break; - case 5: sSkill = "Hide"; break; - case 6: sSkill = "Listen"; break; - case 7: sSkill = "Lore"; break; - case 8: sSkill = "Move Silently"; break; - case 9: sSkill = "Open Lock"; break; - case 10: sSkill = "Parry"; break; - case 11: sSkill = "Perform"; break; - case 12: sSkill = "Persuade"; break; - case 13: sSkill = "Pick Pocket"; break; - case 14: sSkill = "Search"; break; - case 15: sSkill = "Set Trap"; break; - case 16: sSkill = "Spellcraft"; break; - case 17: sSkill = "Spot"; break; - case 18: sSkill = "Taunt"; break; - case 19: sSkill = "Use Magic Device"; break; - case 20: sSkill = "Appraise"; break; - case 21: sSkill = "Tumble"; break; - case 22: sSkill = "Craft Trap"; break; - case 23: sSkill = "Bluff"; break; - case 24: sSkill = "Intimidate"; break; - case 25: sSkill = "Craft Armor"; break; - case 26: sSkill = "Craft Weapon"; break; - default: sSkill = ""; break; - } -return sSkill; -} - -string GetNameOfTrackingInt(int nSkill) -{ -string sSkill; -switch (nSkill) - { - case 0: sSkill = "BASE_ANIMAL"; break; - case 1: sSkill = "BASE_CONCEN"; break; - case 2: sSkill = "BASE_DISABL"; break; - case 3: sSkill = "BASE_DISCIP"; break; - case 4: sSkill = "BASE_HEAL"; break; - case 5: sSkill = "BASE_HIDE"; break; - case 6: sSkill = "BASE_LISTEN"; break; - case 7: sSkill = "BASE_LORE"; break; - case 8: sSkill = "BASE_MOVE_S"; break; - case 9: sSkill = "BASE_OPEN_L"; break; - case 10: sSkill = "BASE_PARRY"; break; - case 11: sSkill = "BASE_PERFOR"; break; - case 12: sSkill = "BASE_PERSUA"; break; - case 13: sSkill = "BASE_PICK_P"; break; - case 14: sSkill = "BASE_SEARCH"; break; - case 15: sSkill = "BASE_SET_TR"; break; - case 16: sSkill = "BASE_SPELLC"; break; - case 17: sSkill = "BASE_SPOT"; break; - case 18: sSkill = "BASE_TAUNT"; break; - case 19: sSkill = "BASE_USE_MA"; break; - case 20: sSkill = "BASE_APPRAI"; break; - case 21: sSkill = "BASE_TUMBLE"; break; - case 22: sSkill = "BASE_CRAFT_T"; break; - case 23: sSkill = "BASE_BLUFF"; break; - case 24: sSkill = "BASE_INTIMI"; break; - case 25: sSkill = "BASE_CRAFT_A"; break; - case 26: sSkill = "BASE_CRAFT_W"; break; - default: sSkill = ""; break; - } -return sSkill; -} - -int GetHitPointsGainedOnLevelUp(object oPC) -{ -int nClass = GetControlClass(oPC); -int nCon = GetLocalInt(oPC, "BASE_CON"); -int nClassDie; -int nFeatBonus = 0; -int nTotal; -if(GetHasFeat(FEAT_TOUGHNESS, oPC)) -{ -nFeatBonus = 1; -} -switch(nClass) - { - case CLASS_TYPE_DWARVENDEFENDER: - case CLASS_TYPE_BARBARIAN: - nClassDie = 12; break; - case CLASS_TYPE_DIVINECHAMPION: - case CLASS_TYPE_WEAPON_MASTER: - case CLASS_TYPE_PALADIN: - case CLASS_TYPE_RANGER: - case CLASS_TYPE_BLACKGUARD: - case CLASS_TYPE_FIGHTER: - case CLASS_TYPE_DRAGONDISCIPLE: - nClassDie = 10; break; - case CLASS_TYPE_SHADOWDANCER: - case CLASS_TYPE_DRUID: - case CLASS_TYPE_ARCANE_ARCHER: - case CLASS_TYPE_MONK: - case CLASS_TYPE_SHIFTER: - case CLASS_TYPE_CLERIC: - nClassDie = 8; break; - case CLASS_TYPE_ROGUE: - case CLASS_TYPE_ASSASSIN: - case CLASS_TYPE_BARD: - case CLASS_TYPE_HARPER: - case CLASS_TYPE_PALEMASTER: - nClassDie = 6; break; - case CLASS_TYPE_SORCERER: - case CLASS_TYPE_WIZARD: - nClassDie = 4; break; - } -nTotal = nClassDie+nFeatBonus+GetBaseAbilityModifier(nCon)+10; -DoDebug(oPC, "HP Gained: "+IntToString(nTotal)+"."); -return nTotal; -} - -void ReplenishLimitedUseFeats(object oPC) -{ -int nFeat = 0; -for(nFeat = 0; nFeat < 1072; nFeat++) - { - if (GetIsFeatLimitedUses(nFeat)) - { - IncrementRemainingFeatUses(oPC, nFeat); - } - } -} - -int GetIsFeatAvailable(int nFeat, object oPC) -{ -int nClass = GetControlClass(oPC); -if (DEV_CRIT_DISABLED && GetIsFeatDevCrit(nFeat)) return FALSE; -if (GetIsFeatFirstLevelOnly(nFeat)) return FALSE; -if (GetHasFeat(nFeat, oPC) && nFeat != 13) return FALSE;//only Extra Turning (13) may be taken multiple times -if (!GetIsClassFeat(nFeat, nClass, oPC) && !GetIsGeneralFeat(nFeat)) return FALSE;//if it's not a class skill and it's not a general skill return FALSE -if (GetAreFeatStatReqsMet(nFeat, oPC) && - GetAreFeatSkillReqsMet(nFeat, oPC) && - GetAreFeatFeatReqsMet(nFeat, oPC) && - GetHasRequiredSpellLevelForFeat(oPC, nFeat)) return TRUE; - -return FALSE; -} - -string GetNameOfAbility(int nStat) -{ -string sReturn; -switch (nStat) - { - case ABILITY_STRENGTH: sReturn = "Strength"; break; - case ABILITY_DEXTERITY: sReturn = "Dexterity"; break; - case ABILITY_CONSTITUTION: sReturn = "Constitution"; break; - case ABILITY_INTELLIGENCE: sReturn = "Intelligence"; break; - case ABILITY_WISDOM: sReturn = "Wisdom"; break; - case ABILITY_CHARISMA: sReturn = "Charisma"; break; - } -return sReturn; -} - -int GetIsClassFeat(int nFeat, int nClass, object oPC) -{ -int nLevel = GetClassLevelReqForFeat(nFeat, nClass); -if (nLevel < -1) return FALSE; -if (GetLevelByClass(nClass, oPC) < nLevel) return FALSE; -return TRUE; -} - -//below used to compile -/* -void main() -{ - -} -*/ diff --git a/_removed files/hgll_leto_inc.nss b/_removed files/hgll_leto_inc.nss deleted file mode 100644 index 9c7f146c..00000000 --- a/_removed files/hgll_leto_inc.nss +++ /dev/null @@ -1,284 +0,0 @@ -#include "hgll_const_inc" -//--------------------------------DECLARATIONS--------------------------------// - -// This function bridges Letoscript into NWNX. -string LetoScript(string script); -// This function returns the bicfilename of the character specified. -string GetBicFileName(object oPC); -// This function finds the most recently edited .bic file in the player's folder, -// and applies whatever changes are conatained within the string of Letoscript. You must -// set the path to your servervault folder in the hgll_const_inc script for it to work. -// The easiest way to ensure that the ingame character is the most recently edited -// file is to save the character at least 3 seconds or more before calling this function. -void ApplyLetoScriptToPC(string Script, object oPC); -// This function tells Letoscript to add a stat point to the specified stat. -string AddStatPoint(int nStat); -// This function tells Letoscript to add a skill point to the specified skill. -string AddSkillPoint(int iSkill); -// This function tells Letoscript to add +1 to all the character's saving throws. -string ModifySaves(); -// This function tells Letoscript to add the specified number of hit points to the character. -string AddHitPoints(int nHP, int nLevel); -// This function tells Letoscript to add the specified feat to the character, treating -// it as if he had gained it on character creation (level 0). This ensures that deleveling -// the character thus will not remove the feat. -string AddFeat(int iFeat = -1); - -//----------------------------------FUNCTIONS---------------------------------// - -//--------------------------FUNCTIONS TAKEN FROM DAR--------------------------// - -string LetoScript(string script) -{ - SetLocalString(GetModule(), "NWNX!LETO!SCRIPT", script); - return GetLocalString(GetModule(), "NWNX!LETO!SCRIPT"); -} - - -string SetDocumentedLevel(int level = 1) { - string script = ""; - if (PHOENIX) - { - if(level > -1) script = ""; - } - else - { - if(level > -1) script = "/Lootable = "+IntToString(level)+";"; - } - return script; -} - -string GetBicFileName(object oPC) -{ - string sChar, sBicName; - string sPCName = GetStringLowerCase(GetName(oPC)); - int i, iNameLength = GetStringLength(sPCName); - - for(i=0; i < iNameLength; i++) { - sChar = GetSubString(sPCName, i, 1); - if (TestStringAgainstPattern("(*a|*n|*w|'|-|_)", sChar)) { - if (sChar != " ") sBicName += sChar; - } - } - return GetStringLeft(sBicName, 16); -} - -//------------------------------FUNCTIONS ADDED-------------------------------// - -void ApplyLetoScriptToPC(string Script, object oPC) -{ - string VaultPath = NWNPATH; - string Player = GetPCPlayerName(oPC); - string BicPath = VaultPath + Player + "/"; - string BicFile; - if (PHOENIX) - { - BicFile = BicPath + GetBicFileName(oPC)+ ".bic"; - Script = ">"+Script+">"; - } - else - { - Script = - "$RealFile = q<" + BicPath + "> + FindNewestBic q<" + BicPath + ">;" + - "$EditFile = $RealFile + '.utc';" + - "FileRename $RealFile, $EditFile;" + - "%bic = $EditFile or die;" + - Script + - "%bic = '>';" + - "close %bic;" + - "FileRename $EditFile, $RealFile;"; - } - SetLocalString(oPC, "LetoScript", Script); - //DelayCommand(3.0f, ActivatePortal(oPC, "62.167.237.11:5122", "", "",TRUE)); - DelayCommand(3.0f, BootPC(oPC)); - //DelayCommand(3.0f, ActivatePortal(oPC, "64.137.237.115:5121", "", "", TRUE)); -} - -string AddStatPoint(int nStat) -{ -string sReturn; -switch (nStat) - { - case ABILITY_STRENGTH: sReturn = "Str"; break; - case ABILITY_DEXTERITY: sReturn = "Dex"; break; - case ABILITY_CONSTITUTION: sReturn = "Con"; break; - case ABILITY_INTELLIGENCE: sReturn = "Int"; break; - case ABILITY_WISDOM: sReturn = "Wis"; break; - case ABILITY_CHARISMA: sReturn = "Cha"; break; - default: return ""; - } - if (PHOENIX) - { - return "+1)}>"; - } - else - { - return "/"+sReturn+" = /"+sReturn+" + 1;"; - } -} - -string AddSkillPoint(int iSkill) -{ - string sSkill = IntToString(iSkill); - if (PHOENIX) - { - return - "+1)}>"+ - "+1)}>"; - } - else - { - return - "/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "+ - "/LvlStatList/[0]/SkillList/["+sSkill+"]/Rank = /SkillList/["+sSkill+"]/Rank +1; "; - } -} - -string ModifySaves() -{ - string sLeto; - if (PHOENIX) - { - sLeto = "+1}>" + - "+1}>" + - "+1}>"; - } - else - { - sLeto = "/fortbonus = /fortbonus +1; /refbonus = /refbonus +1; /willbonus = /willbonus +1; "; - } - return sLeto; -} - -string AddHitPoints(int nHP, int nLevel) -{ -int nLvlHPAddedAt; -string sLeto; -string sLvl; -string sHP = IntToString(nHP); -if (nLevel < 41) - { - nLvlHPAddedAt = 0;//we add the hp at a different level each level so that the 255 field limit is never reached - if it was, it would roll over, causing the loss of 255 hps - } -else - { - nLvlHPAddedAt = nLevel - 40; - } -sLvl = IntToString(nLvlHPAddedAt); -if (PHOENIX) - { - sLeto = "+" + sHP + "}>" + - "+" + sHP + "}>" + - "+" + sHP + "}>" + - "+" + sHP + "}>" + - "+" + sHP + "}>"; - } -else - { - sLeto = "/HitPoints = /HitPoints + " + sHP + "; "; - sLeto += "/LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie = /LvlStatList/[" + IntToString(nLvlHPAddedAt) + "]/LvlStatHitDie + " + sHP + "; "; - sLeto += "/MaxHitPoints = /MaxHitPoints + " + sHP + "; "; - sLeto += "/CurrentHitPoints = /CurrentHitPoints + " + sHP + "; "; - sLeto += "/PregameCurrent = /PregameCurrent + " + sHP + "; "; - } -return sLeto; -} - -string AddFeat(int iFeat = -1) -{ - string sLeto; - string sEnd; - if(iFeat < 0) return ""; - if(iFeat > 763 && iFeat < 824)//Greater Ability Feats - { - if(iFeat <= 773)//CHA - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Cha = /Cha + 1;"; - } - } - else if(iFeat <= 783)//CON - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Con = /Con + 1;"; - } - } - else if(iFeat <= 793)//DEX - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Dex = /Dex + 1;"; - } - } - else if(iFeat <= 803)//INT - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Int = /Int + 1;"; - } - } - else if(iFeat <= 813)//WIS - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Wis = /Wis + 1;"; - } - } - else // <= 823 STR - { - if (PHOENIX) - { - sLeto = "+1)}>"; - } - else - { - sLeto = "/Str = /Str + 1;"; - } - } - } - else - { - sLeto = ""; - } - if (PHOENIX) - { - sEnd = "" + - ""; - } - else - { - sEnd = "add /FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";" + - "add /LvlStatList/[0]/FeatList/Feat, type => gffWord, value => " + IntToString(iFeat) + ";"; - } - return sLeto + sEnd; - -} -//below used to compile -/* -void main() -{ - -} -*/ diff --git a/_removed files/hgll_spells_inc.nss b/_removed files/hgll_spells_inc.nss deleted file mode 100644 index 0f40c236..00000000 --- a/_removed files/hgll_spells_inc.nss +++ /dev/null @@ -1,808 +0,0 @@ -//Returns the level of the input bard spell. Returns -1 if the input is not a bard spell. -int GetBardSpellLevel(int nSpell); -//Returns the level of the input sorcerer spell. Returns -1 if the input is not a sorcerer spell. -int GetSorcSpellLevel(int nSpell); -//This returns the name of any input sorcerer or bard spell. -string GetSpellName(int nSpell); - -int GetBardSpellLevel(int nSpell) -{ -int nResult = -1; //Defaults to not a Bard Spell - switch (nSpell/150) - { - case 0://0-149 - switch (nSpell/25) - { - case 0://0-24 - switch(nSpell) - { - case 4: nResult=3; break; - case 8: nResult=2; break; - case 9: nResult=2; break; - case 13: nResult=2; break; - case 15: nResult=3; break; - case 16: nResult=1; break; - case 20: nResult=3; break; - case 21: nResult=2; break; - } - break; - case 1://25-49 - switch(nSpell) - { - case 26: nResult=3; break; - case 31: nResult=4; break; - case 32: nResult=1; break; - case 33: nResult=0; break; - case 34: nResult=2; break; - case 35: nResult=3; break; - case 36: nResult=2; break; - case 37: nResult=0; break; - case 40: nResult=4; break; - case 41: nResult=3; break; - case 45: nResult=4; break; - } - break; - case 2://50-74 - switch(nSpell) - { - case 54: nResult=3; break; - case 66: nResult=1; break; - case 67: nResult=5; break; - } - break; - case 3://75-99 - switch(nSpell) - { - case 75: nResult=3; break; - case 78: nResult=3; break; - case 80: nResult=5; break; - case 82: nResult=4; break; - case 83: nResult=2; break; - case 86: nResult=1; break; - case 88: nResult=4; break; - case 90: nResult=2; break; - case 92: nResult=3; break; - case 94: nResult=1; break; - } - break; - case 4://100-124 - switch(nSpell) - { - case 100: nResult=0; break; - case 102: nResult=1; break; - case 113: nResult=6; break; - case 118: nResult=5; break; - case 120: nResult=2; break; - case 121: nResult=5; break; - } - break; - case 5://125-149 - switch(nSpell) - { - case 126: nResult=4; break; - case 146: nResult=3; break; - case 147: nResult=3; break; - } - break; - } - break; - case 1://150-299 - switch (nSpell/25) - { - case 6://150-174 - switch (nSpell) - { - case 151: nResult=0; break; - case 155: nResult=1; break; - case 157: nResult=2; break; - case 163: nResult=2; break; - case 165: nResult=1; break; - case 166: nResult=3; break; - case 167: nResult=2; break; - case 174: nResult=1; break; - } - break; - case 7://175-199 - switch (nSpell) - { - case 175: nResult=2; break; - case 176: nResult=3; break; - case 177: nResult=4; break; - case 179: nResult=5; break; - case 180: nResult=6; break; - } - break; - - } - break; - case 2://300-449 - switch (nSpell/25) - { - case 12://300-324 - switch (nSpell) - { - case 321: nResult=1; break; - case 322: nResult=3; break; - } - break; - case 14://350-374 - switch (nSpell) - { - case 354: nResult=2; break; - case 355: nResult=2; break; - case 356: nResult=2; break; - case 365: nResult=2; break; - case 368: nResult=6; break; - case 369: nResult=6; break; - case 373: nResult=4; break; - } - break; - case 15://375-399 - switch (nSpell) - { - case 376: nResult=4; break; - case 377: nResult=3; break; - } - break; - case 16://400-424 - switch (nSpell) - { - case 416: nResult=0; break; - } - break; - case 17://425-449 - switch (nSpell) - { - case 436: nResult=1; break; - case 442: nResult=1; break; - case 445: nResult=6; break; - } - break; - } - break; - case 3://450-569 - switch (nSpell/25) - { - case 18://450-474 - switch (nSpell) - { - case 456: nResult=1; break; - case 457: nResult=2; break; - case 458: nResult=3; break; - } - break; - - case 21://525-549 - switch (nSpell) - { - case 539: nResult=3; break; - case 544: nResult=1; break; - case 545: nResult=3; break; - } - break; - case 22://550-569 - switch (nSpell) - { - case 569: nResult=2; break; - } - break; - } - break; - } - -return nResult; -} - -int GetSorcSpellLevel(int nSpell) -{ -int nResult=-1;//Defaults to not a sorcerer spell - switch (nSpell/150) - { - case 0://0-149 - switch (nSpell/25) - { - case 0://0-24 - switch (nSpell) - { - case 0: nResult=6; break; - case 2: nResult=5; break; - case 4: nResult=4; break; - case 8: nResult=2; break; - case 9: nResult=2; break; - case 10: nResult=1; break; - case 13: nResult=2; break; - case 14: nResult=6; break; - case 15: nResult=4; break; - case 16: nResult=1; break; - case 18: nResult=6; break; - case 20: nResult=3; break; - case 21: nResult=3; break; - case 23: nResult=5; break; - case 24: nResult=1; break; - } - break; - case 1://25-49 - switch (nSpell) - { - case 25: nResult=5; break; - case 26: nResult=4; break; - case 27: nResult=4; break; - case 28: nResult=7; break; - case 30: nResult=8; break; - case 36: nResult=2; break; - case 37: nResult=0; break; - case 39: nResult=7; break; - case 40: nResult=5; break; - case 41: nResult=3; break; - case 44: nResult=9; break; - case 45: nResult=5; break; - case 47: nResult=4; break; - case 49: nResult=2; break; - } - break; - case 2://50-74 - switch (nSpell) - { - case 50: nResult=1; break; - case 51: nResult=9; break; - case 52: nResult=4; break; - case 54: nResult=4; break; - case 55: nResult=5; break; - case 56: nResult=7; break; - case 58: nResult=3; break; - case 59: nResult=3; break; - case 63: nResult=9; break; - case 64: nResult=2; break; - case 65: nResult=6; break; - case 66: nResult=1; break; - case 67: nResult=6; break; - case 69: nResult=8; break; - case 71: nResult=5; break; - case 72: nResult=6; break; - case 73: nResult=9; break; - case 74: nResult=6; break; - } - break; - case 3://75-99 - switch (nSpell) - { - case 75: nResult=3; break; - case 78: nResult=3; break; - case 82: nResult=5; break; - case 83: nResult=3; break; - case 86: nResult=1; break; - case 88: nResult=4; break; - case 89: nResult=8; break; - case 90: nResult=2; break; - case 92: nResult=3; break; - case 93: nResult=2; break; - case 94: nResult=2; break; - case 95: nResult=5; break; - case 96: nResult=5; break; - case 98: nResult=4; break; - case 99: nResult=5; break; - } - break; - case 4://100-124 - switch (nSpell) - { - case 100: nResult=0; break; - case 101: nResult=3; break; - case 102: nResult=1; break; - case 107: nResult=1; break; - case 110: nResult=8; break; - case 111: nResult=8; break; - case 113: nResult=6; break; - case 115: nResult=2; break; - case 116: nResult=9; break; - case 117: nResult=8; break; - case 118: nResult=5; break; - case 119: nResult=4; break; - case 120: nResult=2; break; - case 121: nResult=6; break; - case 122: nResult=9; break; - case 123: nResult=7; break; - } - break; - case 5://125-149 - switch (nSpell) - { - case 127: nResult=4; break; - case 128: nResult=6; break; - case 130: nResult=4; break; - case 131: nResult=9; break; - case 132: nResult=7; break; - case 134: nResult=8; break; - case 135: nResult=7; break; - case 137: nResult=3; break; - case 141: nResult=7; break; - case 143: nResult=1; break; - case 144: nResult=0; break; - case 145: nResult=4; break; - case 146: nResult=4; break; - } - break; - } - break; - case 1://150-299 - switch (nSpell/25) - { - case 6://150-174 - switch (nSpell) - { - case 150: nResult=2; break; - case 151: nResult=0; break; - case 155: nResult=1; break; - case 157: nResult=2; break; - case 158: nResult=6; break; - case 159: nResult=4; break; - case 160: nResult=7; break; - case 161: nResult=9; break; - case 165: nResult=1; break; - case 166: nResult=3; break; - case 169: nResult=7; break; - case 171: nResult=3; break; - case 172: nResult=4; break; - case 174: nResult=1; break; - } - break; - case 7://175-199 - switch (nSpell) - { - case 175: nResult=2; break; - case 176: nResult=3; break; - case 177: nResult=4; break; - case 178: nResult=9; break; - case 179: nResult=5; break; - case 180: nResult=6; break; - case 181: nResult=7; break; - case 182: nResult=8; break; - case 184: nResult=6; break; - case 185: nResult=9; break; - case 186: nResult=6; break; - case 188: nResult=3; break; - case 190: nResult=9; break; - case 191: nResult=4; break; - case 192: nResult=2; break; - case 193: nResult=9; break; - } - break; - } - break; - case 2://300-449 - switch (nSpell/25) - { - case 12://300-324 - switch (nSpell) - { - case 321: nResult=1; break; - case 322: nResult=3; break; - } - break; - case 14://350-374 - switch (nSpell) - { - case 354: nResult=2; break; - case 355: nResult=2; break; - case 356: nResult=2; break; - case 365: nResult=2; break; - case 367: nResult=8; break; - case 368: nResult=4; break; - case 369: nResult=5; break; - case 370: nResult=3; break; - case 371: nResult=1; break; - } - break; - case 15://375-399 - switch (nSpell) - { - case 375: nResult=4; break; - case 376: nResult=6; break; - case 377: nResult=3; break; - } - break; - case 16://400-424 - switch (nSpell) - { - case 415: nResult=1; break; - case 416: nResult=0; break; - case 417: nResult=1; break; - case 419: nResult=2; break; - case 424: nResult=0; break; - } - break; - case 17://425-449 - switch (nSpell) - { - case 427: nResult=8; break; - case 430: nResult=7; break; - case 436: nResult=2; break; - case 439: nResult=0; break; - case 440: nResult=5; break; - case 443: nResult=8; break; - case 447: nResult=1; break; - case 448: nResult=6; break; - } - break; - } - break; - case 3://450-569 - switch (nSpell/25) - { - case 18://450-474 - switch (nSpell) - { - case 456: nResult=1; break; - case 457: nResult=2; break; - case 458: nResult=3; break; - case 459: nResult=5; break; - case 460: nResult=6; break; - case 461: nResult=7; break; - case 462: nResult=8; break; - case 463: nResult=9; break; - } - break; - case 19://475-499 - switch (nSpell) - { - case 485: nResult=6; break; - case 486: nResult=6; break; - } - break; - case 20://500-524 - switch (nSpell) - { - case 515: nResult=7; break; - case 516: nResult=5; break; - case 518: nResult=2; break; - case 519: nResult=2; break; - case 520: nResult=2; break; - case 521: nResult=1; break; - case 522: nResult=1; break; - case 523: nResult=3; break; - case 524: nResult=5; break; - } - break; - case 21://525-549 - switch (nSpell) - { - case 526: nResult=3; break; - case 527: nResult=2; break; - case 528: nResult=6; break; - case 533: nResult=9; break; - case 534: nResult=1; break; - case 539: nResult=3; break; - case 541: nResult=8; break; - case 542: nResult=2; break; - case 543: nResult=1; break; - case 544: nResult=1; break; - case 545: nResult=3; break; - } - break; - case 22://550-569 - switch (nSpell) - { - case 569: nResult=2; break; - } - break; - } - break; - } -return nResult; -} - -string GetSpellName(int nSpell) -{ -string sResult = ""; - - switch (nSpell/150) - { - case 0://0-149 - switch (nSpell/25) - { - case 0://0-24 - switch (nSpell) - { - case 0: sResult = "Acid Fog"; break; - case 2: sResult = "Animate Dead"; break; - case 4: sResult = "Bestow Curse"; break; - case 8: sResult = "Blindness and Deafness"; break; - case 9: sResult = "Bull's Strength"; break; - case 10: sResult = "Burning Hands"; break; - case 13: sResult = "Cat's Grace"; break; - case 14: sResult = "Chain Lightning"; break; - case 15: sResult = "Charm Monster"; break; - case 16: sResult = "Charm Person"; break; - case 18: sResult = "Circle of Death"; break; - case 20: sResult = "Clairaudience and Clairvoyance"; break; - case 21: sResult = "Clarity"; break; - case 23: sResult = "Cloudkill"; break; - case 24: sResult = "Color Spray"; break; - } - break; - case 1://25-49 - switch (nSpell) - { - case 25: sResult = "Cone of Cold"; break; - case 26: sResult = "Confusion"; break; - case 27: sResult = "Contagion"; break; - case 28: sResult = "Control Undead"; break; - case 30: sResult = "Create Undead"; break; - case 31: sResult = "Cure Critical Wounds"; break; - case 32: sResult = "Cure Light Wounds"; break; - case 33: sResult = "Cure Minor Wounds"; break; - case 34: sResult = "Cure Moderate Wounds"; break; - case 35: sResult = "Cure Serious Wounds"; break; - case 36: sResult = "Darkness"; break; - case 37: sResult = "Daze"; break; - case 39: sResult = "Delayed Blast Fireball"; break; - case 40: sResult = "Dismissal"; break; - case 41: sResult = "Dispel Magic"; break; - case 44: sResult = "Dominate Monster"; break; - case 45: sResult = "Dominate Person"; break; - case 47: sResult = "Elemental Shield"; break; - case 49: sResult = "Endurance"; break; - } - break; - case 2://50-74 - switch (nSpell) - { - case 50: sResult = "Endure Elements"; break; - case 51: sResult = "Energy Drain"; break; - case 52: sResult = "Enervation"; break; - case 54: sResult = "Fear"; break; - case 55: sResult = "Feeblemind"; break; - case 56: sResult = "Finger of Death"; break; - case 58: sResult = "Fireball"; break; - case 59: sResult = "Flame Arrow"; break; - case 63: sResult = "Gate"; break; - case 64: sResult = "Ghoul Touch"; break; - case 65: sResult = "Globe of Invulnerability"; break; - case 66: sResult = "Grease"; break; - case 67: sResult = "Greater Dispelling"; break; - case 69: sResult = "Greater Planar Binding"; break; - case 71: sResult = "Greater Shadow Conjuration"; break; - case 72: sResult = "Greater Spell Breach"; break; - case 73: sResult = "Greater Spell Mantle"; break; - case 74: sResult = "Greater Stoneskin"; break; - } - break; - case 3://75-99 - switch (nSpell) - { - case 75: sResult = "Gust of Wind"; break; - case 78: sResult = "Haste"; break; - case 80: sResult = "Healing Circle"; break; - case 82: sResult = "Hold Monster"; break; - case 83: sResult = "Hold Person"; break; - case 86: sResult = "Identify"; break; - case 88: sResult = "Improved Invisibility"; break; - case 89: sResult = "Incendiary Cloud"; break; - case 90: sResult = "Invisibility"; break; - case 92: sResult = "Invisibility Sphere"; break; - case 93: sResult = "Knock"; break; - case 94: sResult = "Lesser Dispel"; break; - case 95: sResult = "Lesser Mind Blank"; break; - case 96: sResult = "Lesser Planar Binding"; break; - case 97: sResult = "Lesser Restoration"; break; - case 98: sResult = "Lesser Spell Breach"; break; - case 99: sResult = "Lesser Spell Mantle"; break; - } - break; - case 4://100-124 - switch (nSpell) - { - case 100: sResult = "Light"; break; - case 101: sResult = "Lightning Bolt"; break; - case 102: sResult = "Mage Armor"; break; - case 107: sResult = "Magic Missle"; break; - case 110: sResult = "Mass Blindness and Deafness"; break; - case 111: sResult = "Mass Charm"; break; - case 113: sResult = "Mass Haste"; break; - case 115: sResult = "Melf's Acid Arrow"; break; - case 116: sResult = "Meteor Swarm"; break; - case 117: sResult = "Mind Blank"; break; - case 118: sResult = "Mind Fog"; break; - case 119: sResult = "Minor Globe of Invulnerability"; break; - case 120: sResult = "Ghostly Visage"; break; - case 121: sResult = "Ethereal Visage"; break; - case 122: sResult = "Mordenkainen's Disjunction"; break; - case 123: sResult = "Mordenkainen's Sword"; break; - } - break; - case 5://125-149 - switch (nSpell) - { - case 126: sResult = "Neutralize Poison"; break; - case 127: sResult = "Phantasmal Killer"; break; - case 128: sResult = "Planar Binding"; break; - case 130: sResult = "Polymorph Self"; break; - case 131: sResult = "Power Word Kill"; break; - case 132: sResult = "Power Word Stun"; break; - case 134: sResult = "Premonition"; break; - case 135: sResult = "Premonition"; break; - case 137: sResult = "Protection from Elements"; break; - case 141: sResult = "Protection from Spells"; break; - case 143: sResult = "Ray of Enfeeblement"; break; - case 144: sResult = "Ray of Frost"; break; - case 145: sResult = "Remove Blindness and Deafness"; break; - case 146: sResult = "Remove Curse"; break; - case 147: sResult = "Remove Disease"; break; - } - break; - } - break; - case 1://150-299 - switch (nSpell/25) - { - case 6://150-174 - switch (nSpell) - { - case 150: sResult = "Resist Elements"; break; - case 151: sResult = "Resistance"; break; - case 155: sResult = "Scare"; break; - case 157: sResult = "See Invisibility"; break; - case 158: sResult = "Shades"; break; - case 159: sResult = "Shadow Conjuration"; break; - case 160: sResult = "Shadow Shield"; break; - case 161: sResult = "Shapechange"; break; - case 163: sResult = "Silence"; break; - case 165: sResult = "Sleep"; break; - case 166: sResult = "Slow"; break; - case 167: sResult = "Sound Burst"; break; - case 169: sResult = "Spell Mantle"; break; - case 171: sResult = "Stinking Cloud"; break; - case 172: sResult = "Stoneskin"; break; - case 174: sResult = "Summon Creature I"; break; - } - break; - case 7://175-199 - switch (nSpell) - { - case 175: sResult = "Summon Creature II"; break; - case 176: sResult = "Summon Creature III"; break; - case 177: sResult = "Summon Creature IV"; break; - case 178: sResult = "Summon Creature IX"; break; - case 179: sResult = "Summon Creature V"; break; - case 180: sResult = "Summon Creature VI"; break; - case 181: sResult = "Summon Creature VII"; break; - case 182: sResult = "Summon Creature VIII"; break; - case 184: sResult = "Tenser's Transformation"; break; - case 185: sResult = "Timestop"; break; - case 186: sResult = "True Seeing"; break; - case 188: sResult = "Vampric Touch"; break; - case 190: sResult = "Wail of the Banshee"; break; - case 191: sResult = "Wall of Fire"; break; - case 192: sResult = "Web"; break; - case 193: sResult = "Weird"; break; - } - break; - - } - break; - case 2://300-449 - switch (nSpell/25) - { - case 12://300-324 - switch (nSpell) - { - case 321: sResult = "Protection from Alignment"; break; - case 322: sResult = "Magic Circle Against Alignment"; break; - } - break; - case 14://350-374 - switch (nSpell) - { - case 354: sResult = "Eagle's Splendor"; break; - case 355: sResult = "Owl's Wisdom"; break; - case 356: sResult = "Fox's Cunning"; break; - case 365: sResult = "Ultravision"; break; - case 367: sResult = "Horrid Wilting"; break; - case 368: sResult = "Ice Storm"; break; - case 369: sResult = "Energy Buffer"; break; - case 370: sResult = "Negative Energy Burst"; break; - case 371: sResult = "Negative Energy Ray"; break; - case 373: sResult = "War Cry"; break; - } - break; - case 15://375-399 - switch (nSpell) - { - case 376: sResult = "Legend Lore"; break; - case 377: sResult = "Find Traps"; break; - } - break; - case 16://400-424 - switch (nSpell) - { - case 415: sResult = "True Strike"; break; - case 416: sResult = "Flare"; break; - case 417: sResult = "Shield"; break; - case 419: sResult = "Continual Flame"; break; - case 424: sResult = "Acid Splash"; break; - } - break; - case 17://425-449 - switch (nSpell) - { - case 427: sResult = "Sunburst"; break; - case 430: sResult = "Banishment"; break; - case 436: sResult = "Balagarn's Iron Horn"; break; - case 439: sResult = "Electric Jolt"; break; - case 440: sResult = "Firebrand"; break; - case 441: sResult = "Wounding Whispers"; break; - case 442: sResult = "Amplify"; break; - case 443: sResult = "Greater Sanctuary"; break; - case 445: sResult = "Dirge"; break; - case 447: sResult = "Isaac's Lesser Missle Storm"; break; - case 448: sResult = "Isaac's Greater Missle Storm"; break; - } - break; - } - break; - case 3://450-569 - switch (nSpell/25) - { - case 18://450-474 - switch (nSpell) - { - case 456: sResult = "Expeditious Retreat"; break; - case 457: sResult = "Tasha's Hideous Laughter"; break; - case 458: sResult = "Displacement"; break; - case 459: sResult = "Bigby's Interposing Hand"; break; - case 460: sResult = "Bigby's Forceful Hand"; break; - case 461: sResult = "Bigby's Grasping Hand"; break; - case 462: sResult = "Bigby's Clenched Fist"; break; - case 463: sResult = "Bigby's Crushing Hand"; break; - } - break; - case 19://475-499 - switch (nSpell) - { - case 485: sResult = "Flesh to Stone"; break; - case 486: sResult = "Stone to Flesh"; break; - } - break; - case 20://500-524 - switch (nSpell) - { - case 515: sResult = "Great Thunderclap"; break; - case 516: sResult = "Ball Lightning"; break; - case 518: sResult = "Combust"; break; - case 519: sResult = "Death Armor"; break; - case 520: sResult = "Gedlee's Electric Loop"; break; - case 521: sResult = "Horizikaul's Boom"; break; - case 522: sResult = "Ironguts"; break; - case 523: sResult = "Mestil's Acid Breath"; break; - case 524: sResult = "Mestil's Acid Sheath"; break; - } - break; - case 21://525-549 - switch (nSpell) - { - case 526: sResult = "Scintillating Sphere"; break; - case 527: sResult = "Stone Bones"; break; - case 528: sResult = "Undeath to Death"; break; - case 533: sResult = "Black Blade of Disaster"; break; - case 534: sResult = "Shelgarn's Persistent Blade"; break; - case 539: sResult = "Keen Edge"; break; - case 541: sResult = "Blackstaff"; break; - case 542: sResult = "Flame Weapon"; break; - case 543: sResult = "Ice Dagger"; break; - case 544: sResult = "Magic Weapon"; break; - case 545: sResult = "Greater Magic Weapon"; break; - } - break; - case 22://550-569 - switch (nSpell) - { - case 569: sResult = "Cloud of Bewilderment"; break; - } - break; - } - break; - } -return sResult; -} - -//void main(){} diff --git a/_removed files/hgll_struct_stat.nss b/_removed files/hgll_struct_stat.nss deleted file mode 100644 index be0df5e4..00000000 --- a/_removed files/hgll_struct_stat.nss +++ /dev/null @@ -1,39 +0,0 @@ -// Original script taken from post by CID-78 in the Bioware scripting forums. -// Modified to return 'base' skills as well, though they must be passed through -// another filter for feats and stat bonuses after this function. -struct xAbility -{ - int nSTR; //stats in 2da order - int nDEX; - int nCON; - int nINT; - int nWIS; - int nCHA; - int nANIMAL_EMPATHY;//skills in 2da order - int nCONCENTRATION; - int nDISABLE_TRAP; - int nDISCIPLINE; - int nHEAL; - int nHIDE; - int nLISTEN; - int nLORE; - int nMOVE_SILENTLY; - int nOPEN_LOCK; - int nPARRY; - int nPERFORM; - int nPERSUADE; - int nPICK_POCKET; - int nSEARCH; - int nSET_TRAP; - int nSPELLCRAFT; - int nSPOT; - int nTAUNT; - int nUSE_MAGIC_DEVICE; - int nAPPRAISE; - int nTUMBLE; - int nCRAFT_TRAP; - int nBLUFF; - int nINTIMIDATE; - int nCRAFT_ARMOR; - int nCRAFT_WEAPON; -}; diff --git a/_removed files/nw_s0_acidfoga.nss b/_removed files/nw_s0_acidfoga.nss deleted file mode 100644 index 2f5a9fbc..00000000 --- a/_removed files/nw_s0_acidfoga.nss +++ /dev/null @@ -1,64 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Acid Fog: On Enter -//:: NW_S0_AcidFogA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All creatures within the AoE take 2d6 acid damage - per round and upon entering if they fail a Fort Save - their movement is halved. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - - effect eDam; - effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); - effect eSlow = EffectMovementSpeedDecrease(50); - object oTarget = GetEnteringObject(); - float fDelay = GetRandomDelay(1.0, 2.2); - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the target - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); - //Spell resistance check - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) - { - //Roll Damage - //Enter Metamagic conditions - nDamage = d8(5); - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 40;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Make a Fortitude Save to avoid the effects of the movement hit. - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) - { - //slowing effect - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oTarget); - // * BK: Removed this because it reduced damage, didn't make sense nDamage = d6(); - } - - //Set Damage Effect with the modified damage - eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); - //Apply damage and visuals - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - } - } -} diff --git a/_removed files/nw_s0_acidfogc.nss b/_removed files/nw_s0_acidfogc.nss deleted file mode 100644 index b945bf4d..00000000 --- a/_removed files/nw_s0_acidfogc.nss +++ /dev/null @@ -1,79 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Acid Fog: Heartbeat -//:: NW_S0_AcidFogC.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All creatures within the AoE take 2d6 acid damage - per round and upon entering if they fail a Fort Save - their movement is halved. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage = d8(3); - effect eDam; - - effect eVis = EffectVisualEffect(VFX_IMP_ACID_S); - object oTarget; - float fDelay; - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 24;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID); - //Start cycling through the AOE Object for viable targets including doors and placable objects. - oTarget = GetFirstInPersistentObject(OBJECT_SELF); - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay)) - { - nDamage = d6(); - } - fDelay = GetRandomDelay(0.4, 1.2); - //Fire cast spell at event for the affected target - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG)); - //Spell resistance check - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) - { - //Apply damage and visuals - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - //Get next target. - oTarget = GetNextInPersistentObject(OBJECT_SELF); - } -} diff --git a/_removed files/nw_s0_bescurse.nss b/_removed files/nw_s0_bescurse.nss deleted file mode 100644 index ebfe86e4..00000000 --- a/_removed files/nw_s0_bescurse.nss +++ /dev/null @@ -1,64 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Bestow Curse -//:: NW_S0_BesCurse.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Afflicted creature must save or suffer a -2 penalty - to all ability scores. This is a supernatural effect. -*/ -//::////////////////////////////////////////////// -//:: Created By: Bob McCabe -//:: Created On: March 6, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk -//:: VFX Pass By: Preston W, On: June 20, 2001 -//:: Update Pass By: Preston W, On: July 20, 2001 - -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - //Declare major variables - object oTarget = GetSpellTargetObject(); - effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); - effect eCurse = EffectCurse(4, 4, 4, 4, 4, 4); - - //Make sure that curse is of type supernatural not magical - eCurse = SupernaturalEffect(eCurse); - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Signal spell cast at event - SignalEvent(oTarget, EventSpellCastAt(oTarget, SPELL_BESTOW_CURSE)); - //Make SR Check - if (!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Make Will Save - if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) - { - //Apply Effect and VFX - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCurse, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - } -} diff --git a/_removed files/nw_s0_bladebara.nss b/_removed files/nw_s0_bladebara.nss deleted file mode 100644 index 512af426..00000000 --- a/_removed files/nw_s0_bladebara.nss +++ /dev/null @@ -1,66 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Blade Barrier: On Enter -//:: NW_S0_BladeBarA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates a wall 10m long and 2m thick of whirling - blades that hack and slice anything moving into - them. Anything caught in the blades takes - 2d6 per caster level. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: July 20, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - object oTarget = GetEnteringObject(); - effect eDam; - effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); - int nMetaMagic = GetMetaMagicFeat(); - int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); - - //Make level check - if (nLevel > 25) - { - nLevel = 25; - } - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire spell cast at event - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); - //Roll Damage - int nDamage = d6(nLevel); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = nLevel * 6;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - //Make SR Check - if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) - { - if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) - { - nDamage = nDamage/2; - } - //Set damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); - //Apply damage and VFX - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } -} - diff --git a/_removed files/nw_s0_bladebarc.nss b/_removed files/nw_s0_bladebarc.nss deleted file mode 100644 index cd5073b7..00000000 --- a/_removed files/nw_s0_bladebarc.nss +++ /dev/null @@ -1,82 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Blade Barrier: Heartbeat -//:: NW_S0_BladeBarA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates a wall 10m long and 2m thick of whirling - blades that hack and slice anything moving into - them. Anything caught in the blades takes - 2d6 per caster level. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: July 20, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - object oTarget; - effect eDam; - effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED); - int nMetaMagic = GetMetaMagicFeat(); - int nLevel = GetCasterLevel(GetAreaOfEffectCreator()); - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // Add damage to placeables/doors now that the command support bit fields - //-------------------------------------------------------------------------- - oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire spell cast at event - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_BLADE_BARRIER)); - //Make SR Check - if (!MyResistSpell(GetAreaOfEffectCreator(), oTarget) ) - { - //Roll Damage - int nDamage = d6(nLevel); - //Enter Metamagic conditions - if(nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = nLevel * 6;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC())) - { - nDamage = nDamage/2; - } - //Set damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_SLASHING); - //Apply damage and VFX - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR); - } -} - diff --git a/_removed files/nw_s0_calllghtn.nss b/_removed files/nw_s0_calllghtn.nss deleted file mode 100644 index 99f21ff5..00000000 --- a/_removed files/nw_s0_calllghtn.nss +++ /dev/null @@ -1,98 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Call Lightning -//:: NW_S0_CallLghtn.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - This spells smites an area around the caster - with bolts of lightning which strike all enemies. - Bolts do 1d10 per level up 10d10 -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 22, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 20, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - float fDelay; - effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M); - effect eDam; - - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Limit Caster level for the purposes of damage - if (nCasterLvl > 20) - { - nCasterLvl = 20; - } - //Declare the spell shape, size and the location. Capture the first target object in the shape. - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, 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_SELECTIVEHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CALL_LIGHTNING)); - //Get the distance between the explosion and the target to calculate delay - fDelay = GetRandomDelay(0.4, 1.75); - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll damage for each target - nDamage = d6(nCasterLvl); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLvl; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage / 2; - } - //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); - if(nDamage > 0) - { - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/nw_s0_chlightn.nss b/_removed files/nw_s0_chlightn.nss deleted file mode 100644 index bb48393e..00000000 --- a/_removed files/nw_s0_chlightn.nss +++ /dev/null @@ -1,186 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Chain Lightning -//:: NW_S0_ChLightn -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The primary target is struck with 1d6 per caster, - 1/2 with a reflex save. 1 secondary target per - level is struck for 1d6 / 2 caster levels. No - repeat targets can be chosen. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brennon Holmes -//:: Created On: March 8, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 26, 2001 -//:: Update Pass By: Preston W, On: July 26, 2001 - -/* -bugfix by Kovi 2002.07.28 -- successful saving throw and (improved) evasion was ignored for - secondary targets, -- all secondary targets suffered exactly the same damage -2002.08.25 -- primary target was not effected -*/ - -#include "x0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - - //Limit caster level - // June 2/04 - Bugfix: Cap the level BEFORE the damage calculation, not after. Doh. - if (nCasterLevel > 20) - { - nCasterLevel = 20; - } - int nDamage = d6(nCasterLevel); - int nDamStrike; - int nNumAffected = 0; - int nMetaMagic = GetMetaMagicFeat(); - //Declare lightning effect connected the casters hands - effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);; - effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); - effect eDamage; - object oFirstTarget = GetSpellTargetObject(); - object oHolder; - object oTarget; - location lSpellLocation; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/is +50% - } - //Damage the initial target - if (spellsIsTarget(oFirstTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oFirstTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); - //Make an SR Check - if (!MyResistSpell(OBJECT_SELF, oFirstTarget)) - { - //Adjust damage via Reflex Save or Evasion or Improved Evasion - nDamStrike = GetReflexAdjustedDamage(nDamage, oFirstTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); - //Set the damage effect for the first target - eDamage = EffectDamage(nDamStrike, DAMAGE_TYPE_ELECTRICAL); - //Apply damage to the first target and the VFX impact. - if(nDamStrike > 0) - { - ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oFirstTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oFirstTarget); - } - } - } - //Apply the lightning stream effect to the first target, connecting it with the caster - ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oFirstTarget,0.5); - - - //Reinitialize the lightning effect so that it travels from the first target to the next target - eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oFirstTarget, BODY_NODE_CHEST); - - - float fDelay = 0.2; - int nCnt = 0; - - - // * - // * Secondary Targets - // * - - - //Get the first target in the spell shape - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - while (GetIsObjectValid(oTarget) && nCnt < nCasterLevel) - { - //Make sure the caster's faction is not hit and the first target is not hit - if (oTarget != oFirstTarget && spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) - { - //Connect the new lightning stream to the older target and the new target - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5)); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING)); - //Do an SR check - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - - nDamage = d6(nCasterLevel) ; - - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/is +50% - } - //Adjust damage via Reflex Save or Evasion or Improved Evasion - nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); - //Apply the damage and VFX impact to the current target - eDamage = EffectDamage(nDamStrike /2, DAMAGE_TYPE_ELECTRICAL); - if(nDamStrike > 0) //age > 0) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); - } - } - oHolder = oTarget; - - //change the currect holder of the lightning stream to the current target - if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) - { - eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); - } - else - { - // * April 2003 trying to make sure beams originate correctly - effect eNewLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST); - if(GetIsEffectValid(eNewLightning)) - { - eLightning = eNewLightning; - } - } - - fDelay = fDelay + 0.1f; - } - //Count the number of targets that have been hit. - if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) - { - nCnt++; - } - - // April 2003: Setting the new origin for the beam - // oFirstTarget = oTarget; - - //Get the next target in the shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } - } diff --git a/_removed files/nw_s0_conecold.nss b/_removed files/nw_s0_conecold.nss deleted file mode 100644 index c04fa62e..00000000 --- a/_removed files/nw_s0_conecold.nss +++ /dev/null @@ -1,105 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Cone of Cold -//:: NW_S0_ConeCold -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// Cone of cold creates an area of extreme cold, -// originating at your hand and extending outward -// in a cone. It drains heat, causing 1d6 points of -// cold damage per caster level (maximum 15d6). -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: 10/18/02000 -//::////////////////////////////////////////////// -//:: Last Updated By: Aidan Scanlan On: April 11, 2001 -//:: Update Pass By: Preston W, On: July 25, 2001 - -float SpellDelay (object oTarget, int nShape); - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - - float fDelay; - location lTargetLocation = GetSpellTargetLocation(); - object oTarget; - //Limit Caster level for the purposes of damage. - if (nCasterLevel > 25) - { - nCasterLevel = 25; - } - //Declare the spell shape, size and the location. Capture the first target object in the shape. - oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, 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)) - { - // March 2003. Removed this as part of the reputation pass - // if((GetSpellId() == 340 && !GetIsFriend(oTarget)) || GetSpellId() == 25) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CONE_OF_COLD)); - //Get the distance between the target and caster to delay the application of effects - fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20.0; - //Make SR check, and appropriate saving throw(s). - if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay) && (oTarget != OBJECT_SELF)) - { - //Detemine damage - nDamage = d6(nCasterLevel); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Adjust damage according to Reflex Save, Evasion or Improved Evasion - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_COLD); - - // Apply effects to the currently selected target. - effect eCold = EffectDamage(nDamage, DAMAGE_TYPE_COLD); - effect eVis = EffectVisualEffect(VFX_IMP_FROST_L); - if(nDamage > 0) - { - //Apply delayed effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eCold, oTarget)); - } - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} - diff --git a/_removed files/nw_s0_crgrund.nss b/_removed files/nw_s0_crgrund.nss deleted file mode 100644 index afb3df79..00000000 --- a/_removed files/nw_s0_crgrund.nss +++ /dev/null @@ -1,70 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Create Greater Undead -//:: NW_S0_CrGrUnd.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons an undead type pegged to the character's - level. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = nCasterLevel; - nDuration = 24; - effect eSummon; - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - //Make metamagic extend check - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Determine undead to summon based on level - if (nCasterLevel <= 15) - { - eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 16) && (nCasterLevel <= 18)) - { - eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 19) && (nCasterLevel <= 24)) - { - eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); - } - else - { - eSummon = EffectSummonCreature("greatlich02",VFX_FNF_SUMMON_UNDEAD); - } - //Apply summon effect and VFX impact. - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); -} - diff --git a/_removed files/nw_s0_crpdooma.nss b/_removed files/nw_s0_crpdooma.nss deleted file mode 100644 index f20713f9..00000000 --- a/_removed files/nw_s0_crpdooma.nss +++ /dev/null @@ -1,51 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Creeping Doom: On Enter -//:: NW_S0_AcidFogA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creature caught in the swarm take an initial - damage of 1d20, but there after they take - 1d4 per swarm counter on the AOE. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - - //Declare major variables - int nDamage; - effect eDam; - effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); - object oTarget = GetEnteringObject(); - effect eSpeed = EffectMovementSpeedDecrease(50); - effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eLink = EffectLinkEffects(eSpeed, eVis2); - - float fDelay; - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the target - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); - fDelay = GetRandomDelay(1.0, 1.8); - //Spell resistance check - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) - { - //Roll Damage - nDamage = d6(4)+ 6; - - //Set Damage Effect with the modified damage - eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); - //Apply damage and visuals - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - } - } -} diff --git a/_removed files/nw_s0_crpdoomc.nss b/_removed files/nw_s0_crpdoomc.nss deleted file mode 100644 index 12f3b18a..00000000 --- a/_removed files/nw_s0_crpdoomc.nss +++ /dev/null @@ -1,85 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Creeping Doom: Heartbeat -//:: NW_S0_CrpDoomC.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creature caught in the swarm take an initial - damage of 1d20, but there after they take - 1d6 per swarm counter on the AOE. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - - //Declare major variables - int nDamage; - effect eDam; - effect eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED); - object oTarget = GetEnteringObject(); - string sConstant1 = "NW_SPELL_CONSTANT_CREEPING_DOOM1" + ObjectToString(GetAreaOfEffectCreator()); - string sConstant2 = "NW_SPELL_CONSTANT_CREEPING_DOOM2" + ObjectToString(GetAreaOfEffectCreator()); - int nSwarm = GetLocalInt(OBJECT_SELF, sConstant1); - int nDamCount = GetLocalInt(OBJECT_SELF, sConstant2); - float fDelay; - if(nSwarm < 1) - { - nSwarm = 1; - } - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - - //Get first target in spell area - oTarget = GetFirstInPersistentObject(); - while(GetIsObjectValid(oTarget) && nDamCount < 1000) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - fDelay = GetRandomDelay(1.0, 2.2); - //------------------------------------------------------------------ - // According to the book, SR Does not count against creeping doom - //------------------------------------------------------------------ - //Spell resistance check -// if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) -// { - SignalEvent(oTarget,EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_CREEPING_DOOM)); - //Roll Damage - nDamage = d6(nSwarm)+ 12; - //Set Damage Effect with the modified damage - eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); - //Apply damage and visuals - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - nDamCount = nDamCount + nDamage; -// } - } - //Get next target in spell area - oTarget = GetNextInPersistentObject(); - } - if(nDamCount >= 1000) - { - DestroyObject(OBJECT_SELF, 1.0); - } - else - { - nSwarm++; - SetLocalInt(OBJECT_SELF, sConstant1, nSwarm); - SetLocalInt(OBJECT_SELF, sConstant2, nDamCount); - } -} diff --git a/_removed files/nw_s0_crundead.nss b/_removed files/nw_s0_crundead.nss deleted file mode 100644 index d0448a14..00000000 --- a/_removed files/nw_s0_crundead.nss +++ /dev/null @@ -1,71 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Create Undead -//:: NW_S0_CrUndead.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Spell summons a Ghoul, Shadow, Ghast, Wight or - Wraith -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = nCasterLevel; - nDuration = 24; - effect eSummon; - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Set the summoned undead to the appropriate template based on the caster level - if (nCasterLevel <= 13) - { - eSummon = EffectSummonCreature("doomknight01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 14) && (nCasterLevel <= 18)) - { - eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 19) && (nCasterLevel <= 25)) - { - eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); // change later - } - else if ((nCasterLevel >= 26)) - { - eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD); - } - - //Apply VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); -} - diff --git a/_removed files/nw_s0_delfirea.nss b/_removed files/nw_s0_delfirea.nss deleted file mode 100644 index 8b288074..00000000 --- a/_removed files/nw_s0_delfirea.nss +++ /dev/null @@ -1,98 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Delayed Blast Fireball: On Enter -//:: NW_S0_DelFireA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The caster creates a trapped area which detects - the entrance of enemy creatures into 3 m area - around the spell location. When tripped it - causes a fiery explosion that does 1d6 per - caster level up to a max of 20d6 damage. -*/ -//::////////////////////////////////////////////// -//:: Georg: Removed Spellhook, fixed damage cap -//:: Created By: Preston Watamaniuk -//:: Created On: July 27, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" -void main() -{ - - //Declare major variables - object oTarget = GetEnteringObject(); - object oCaster = GetAreaOfEffectCreator(); - location lTarget = GetLocation(OBJECT_SELF); - int nDamage; - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(oCaster); - int nFire = GetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL"); - //Limit caster level - if (nCasterLevel > 30) - { - nCasterLevel = 30; - } - effect eDam; - effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - //Check the faction of the entering object to make sure the entering object is not in the casters faction - if(nFire == 0) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - SetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL",TRUE); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); - //Cycle through the targets in the explosion area - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_DELAYED_BLAST_FIREBALL)); - //Make SR check - if (!MyResistSpell(oCaster, oTarget)) - { - nDamage = d8(nCasterLevel); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * nCasterLevel;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% - } - //Change damage according to Reflex, Evasion and Improved Evasion - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); - //Set up the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - //Apply VFX impact and damage effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - } - else - { - //They will be taking SOMETHING! - nDamage = d8(12); - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - - //Apply VFX impact and damage effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - - } - } - } - //Get next target in the sequence - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } - DestroyObject(OBJECT_SELF, 1.0); - } - } -} diff --git a/_removed files/nw_s0_delfirebal.nss b/_removed files/nw_s0_delfirebal.nss deleted file mode 100644 index 02a5d66a..00000000 --- a/_removed files/nw_s0_delfirebal.nss +++ /dev/null @@ -1,59 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Delayed Blast Fireball -//:: NW_S0_DelFirebal.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The caster creates a trapped area which detects - the entrance of enemy creatures into 3 m area - around the spell location. When tripped it - causes a fiery explosion that does 1d6 per - caster level up to a max of 20d6 damage. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: July 27, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables including Area of Effect Object - effect eAOE = EffectAreaOfEffect(AOE_PER_DELAY_BLAST_FIREBALL); - location lTarget = GetSpellTargetLocation(); - int nDuration = GetCasterLevel(OBJECT_SELF); - //Make sure the duration is at least one round - if (nDuration == 0) - { - nDuration = 1; - } - int nMetaMagic = GetMetaMagicFeat(); - //Check Extend metamagic feat. - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2;//Duration is +100% - } - //Create an instance of the AOE Object using the Apply Effect function - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration)); -} - - diff --git a/_removed files/nw_s0_destruc.nss b/_removed files/nw_s0_destruc.nss deleted file mode 100644 index add3a9c9..00000000 --- a/_removed files/nw_s0_destruc.nss +++ /dev/null @@ -1,82 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Destruction -//:: NW_S0_Destruc -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The target creature is destroyed if it fails a - Fort save, otherwise it takes 10d6 damage. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Aug 13, 2001 -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - int nCasterLevel = GetCasterLevel(OBJECT_SELF)/2; - effect eSlay = EffectDeath(); - effect eDam; - effect eVis = EffectVisualEffect(234); - - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DESTRUCTION)); - //Make SR check - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Make a saving throw check - //This spell is no longer a Death Effect They make a save or die. - if(!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC())) - { - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); - } - else - { - nDamage = d8(1) * nCasterLevel; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * nCasterLevel;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Set damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - } - //Apply VFX impact - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } -} diff --git a/_removed files/nw_s0_eleswarm.nss b/_removed files/nw_s0_eleswarm.nss deleted file mode 100644 index c3ae370e..00000000 --- a/_removed files/nw_s0_eleswarm.nss +++ /dev/null @@ -1,59 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Elemental Swarm -//:: NW_S0_EleSwarm.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - This spell creates a conduit from the caster - to the elemental planes. The first elemental - summoned is a 24 HD Air elemental. Whenever an - elemental dies it is replaced by the next - elemental in the chain Air, Water, Earth, Fire -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: Update Pass By: Preston W, On: July 30, 2001 - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = GetCasterLevel(OBJECT_SELF); - nDuration = 24; - effect eSummon; - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //Check for metamagic duration - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration * 2; //Duration is +100% - } - //Set the summoning effect - // eSummon = EffectSwarm(FALSE, "NW_SW_AIRGREAT", "NW_SW_WATERGREAT","NW_SW_EARTHGREAT","NW_SW_FIREGREAT"); - eSummon = EffectSwarm(TRUE, "airgreat8", "watergreat8", "earthgreat8", "firegreat8"); - //Apply the summon effect - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSummon, OBJECT_SELF, HoursToSeconds(nDuration)); -} - diff --git a/_removed files/nw_s0_enedrain.nss b/_removed files/nw_s0_enedrain.nss deleted file mode 100644 index d1462c36..00000000 --- a/_removed files/nw_s0_enedrain.nss +++ /dev/null @@ -1,68 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Energy Drain -//:: NW_S0_EneDrain.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Target loses 2d4 levels. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - int nDrain = d4(2); - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDrain = 8;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% - } - effect eDrain = EffectNegativeLevel(nDrain); - eDrain = SupernaturalEffect(eDrain); - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERGY_DRAIN)); - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) - { - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - } -} - diff --git a/_removed files/nw_s0_enervat.nss b/_removed files/nw_s0_enervat.nss deleted file mode 100644 index 34a17ca0..00000000 --- a/_removed files/nw_s0_enervat.nss +++ /dev/null @@ -1,79 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Enervation -//:: NW_S0_Enervat.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Target Loses 1d4 levels for 1 hour per caster - level -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - int nDrain = d4(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDrain = 4;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDrain = nDrain + (nDrain/2); //Damage/Healing is +50% - } - else if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - - effect eDrain = EffectNegativeLevel(nDrain); - effect eLink = EffectLinkEffects(eDrain, eDur); - - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERVATION)); - //Resist magic check - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) - { - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - } -} - diff --git a/_removed files/nw_s0_findtrap.nss b/_removed files/nw_s0_findtrap.nss deleted file mode 100644 index bc46da73..00000000 --- a/_removed files/nw_s0_findtrap.nss +++ /dev/null @@ -1,36 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Find Traps -//:: NW_S0_FindTrap -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Finds and removes all traps within 30m. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 29, 2001 -//::////////////////////////////////////////////// - -void main() -{ - effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); - int nCnt = 1; - - object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); - - while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0) - { - if(GetIsTrapped(oTrap)) - { - int DC = GetTrapDisarmDC(oTrap); - if (DC <= 30){ - SetTrapDetectedBy(oTrap, OBJECT_SELF); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap)); - DelayCommand(2.0, SetTrapDisabled(oTrap)); - } - } - nCnt++; - oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); - } -} - diff --git a/_removed files/nw_s0_fingdeath.nss b/_removed files/nw_s0_fingdeath.nss deleted file mode 100644 index 88ff52a5..00000000 --- a/_removed files/nw_s0_fingdeath.nss +++ /dev/null @@ -1,97 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Finger of Death -//:: NW_S0_FingDeath -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// You can slay any one living creature within range. -// The victim is entitled to a Fortitude saving throw to -// survive the attack. If he succeeds, he instead -// sustains 3d6 points of damage +1 point per caster -// level. -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: Oct 17, 2000 -//::////////////////////////////////////////////// -//:: Updated By: Georg Z, On: Aug 21, 2003 - no longer affects placeables - -#include "x0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - effect eDam; - effect eVis = EffectVisualEffect(VFX_IMP_DEATH_L); - effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - - if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE,OBJECT_SELF)) - { - //GZ: I still signal this event for scripting purposes, even if a placeable - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FINGER_OF_DEATH)); - if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) - { - - //Make SR check - if (!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Make Forttude save - if (!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) - { - //Apply the death effect and VFX impact - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); - //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - else - { - // Target shouldn't take damage if they are immune to death magic. - - //NOTE: I have made it where they take dmg no matter what! - // if ( GetIsImmune( oTarget, IMMUNITY_TYPE_DEATH) == FALSE ) - // { - //Roll damage(d6 X Caster Level up 40!) - nDamage = d6(1) * nCasterLvl; - //Make metamagic checks - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLvl; - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - //Set damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - //Apply damage effect and VFX impact - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); - // } - } - } - } - } -} diff --git a/_removed files/nw_s0_fireball.nss b/_removed files/nw_s0_fireball.nss deleted file mode 100644 index 559a028e..00000000 --- a/_removed files/nw_s0_fireball.nss +++ /dev/null @@ -1,109 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Fireball -//:: NW_S0_Fireball -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// A fireball is a burst of flame that detonates with -// a low roar and inflicts 1d6 points of damage per -// caster level (maximum of 10d6) to all creatures -// within the area. Unattended objects also take -// damage. The explosion creates almost no pressure. -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: Oct 18 , 2000 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001 -//:: Last Updated By: AidanScanlan, On: April 11, 2001 -//:: Last Updated By: Preston Watamaniuk, On: May 25, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - float fDelay; - effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - effect eDam; - - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Limit Caster level for the purposes of damage - if (nCasterLvl > 15) - { - nCasterLvl = 15; - } - //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 = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, 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)) - { - if((GetSpellId() == 341) || GetSpellId() == 58) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIREBALL)); - //Get the distance between the explosion and the target to calculate delay - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll damage for each target - nDamage = d6(nCasterLvl); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLvl; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage / 2; - } - //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} - diff --git a/_removed files/nw_s0_firestrm.nss b/_removed files/nw_s0_firestrm.nss deleted file mode 100644 index 70a8a1b6..00000000 --- a/_removed files/nw_s0_firestrm.nss +++ /dev/null @@ -1,104 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Fire Storm -//:: NW_S0_FireStm -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates a zone of destruction around the caster - within which all living creatures are pummeled - with fire. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 11, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 21, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - int nDamage2; - - //Level Capp - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - if(nCasterLevel > 30) - { - nCasterLevel == 30; - } - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - effect eFireStorm = EffectVisualEffect(VFX_FNF_FIRESTORM); - float fDelay; - //Apply Fire and Forget Visual in the area; - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireStorm, GetLocation(OBJECT_SELF)); - //Declare the spell shape, size and the location. Capture the first target object in the shape. - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), 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)) - { - //This spell smites everyone who is more than 2 meters away from the caster. - //if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) - //{ - if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) - { - fDelay = GetRandomDelay(1.5, 2.5); - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIRE_STORM)); - //Make SR check, and appropriate saving throw(s). - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll Damage - nDamage = d6(nCasterLevel); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% - } - //Save versus both holy and fire damage - nDamage2 = nDamage; //No Save for Divine Dmg.. - //GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); - nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - if(nDamage > 0) - { - // Apply effects to the currently selected target. For this spell we have used - //both Divine and Fire damage. - effect eDivine = EffectDamage(nDamage2, DAMAGE_TYPE_DIVINE); - effect eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDivine, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - //} - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF), OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/nw_s0_flmarrow.nss b/_removed files/nw_s0_flmarrow.nss deleted file mode 100644 index 09467c42..00000000 --- a/_removed files/nw_s0_flmarrow.nss +++ /dev/null @@ -1,99 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Flame Arrow -//:: NW_S0_FlmArrow -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Fires a stream of fiery arrows at the selected - target that do 4d6 damage per arrow. 1 Arrow - per 4 levels is created. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Sept 20, 2001 -//:: Updated By: Georg Zoeller, Aug 18 2003: Uncapped -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) - object oTarget = GetSpellTargetObject(); - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nDamage = 0; - int nMetaMagic = GetMetaMagicFeat(); - int nCnt; - effect eMissile; - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); - int nMissiles = (nCasterLvl)/4; - - float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); - float fDelay = fDist/(3.0 * log(fDist) + 2.0); - //Limit missiles to five - if(nMissiles == 0) - { - nMissiles = 1; - } - /* Uncapped because PHB does list any cap and we now got epic levels - else if (nMissiles > 5) - { - nMissiles = 5; - }*/ - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_ARROW)); - //Apply a single damage hit for each missile instead of as a single mass - //Make SR Check - for (nCnt = 1; nCnt <= nMissiles; nCnt++) - { - if(!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - - //Roll damage - int nDam = d6(3) + 8; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDam = 26;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDam = nDam + nDam/2; //Damage/Healing is +50% - } - nDam = GetReflexAdjustedDamage(nDam, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - //Set damage effect - effect eDam = EffectDamage(nDam, DAMAGE_TYPE_FIRE); - //Apply the MIRV and damage effect - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget)); - - } - // * May 2003: Make it so the arrow always appears, even if resisted - eMissile = EffectVisualEffect(VFX_IMP_MIRV_FLAME); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget); - } - } -} - diff --git a/_removed files/nw_s0_flmstrike.nss b/_removed files/nw_s0_flmstrike.nss deleted file mode 100644 index 0359a17b..00000000 --- a/_removed files/nw_s0_flmstrike.nss +++ /dev/null @@ -1,108 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Flame Strike -//:: NW_S0_FlmStrike -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// A flame strike is a vertical column of divine fire -// roaring downward. The spell deals 1d6 points of -// damage per level, to a maximum of 15d6. Half the -// damage is fire damage, but the rest of the damage -// results directly from divine power and is therefore -// not subject to protection from elements (fire), -// fire shield (chill shield), etc. -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: Oct 19, 2000 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 20, 2001 -//:: Update Pass By: Preston W, On: Aug 1, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget; - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nDamage, nDamage2; - int nMetaMagic = GetMetaMagicFeat(); - effect eStrike = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); - effect eHoly; - effect eFire; - - //Limit caster level for the purposes of determining damage. - if (nCasterLvl > 25) - { - nCasterLvl = 25; - } - - - //Declare the spell shape, size and the location. Capture the first target object in the shape. - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); - //Apply the location impact visual to the caster location instead of caster target creature. - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); - //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)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FLAME_STRIKE)); - //Make SR check, and appropriate saving throw(s). - if (!MyResistSpell(OBJECT_SELF, oTarget, 0.6)) - { - nDamage = d6(nCasterLvl); - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLvl; - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - //Adjust the damage based on Reflex Save, Evasion and Improved Evasion - nDamage2 = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE); - nDamage = GetReflexAdjustedDamage(nDamage/2, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - //Make a faction check so that only enemies receieve the full brunt of the damage. - if(!GetIsFriend(oTarget)) - { - eHoly = EffectDamage(nDamage2,DAMAGE_TYPE_DIVINE); - DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHoly, oTarget)); - } - // Apply effects to the currently selected target. - eFire = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); - DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM,GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR); - } -} diff --git a/_removed files/nw_s0_gate.nss b/_removed files/nw_s0_gate.nss deleted file mode 100644 index 376f0bd2..00000000 --- a/_removed files/nw_s0_gate.nss +++ /dev/null @@ -1,70 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Gate -//:: NW_S0_Gate.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -//:: Summons a Balor to fight for the caster. -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -void CreateBalor(); -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE); - //Make metamagic extend check - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Summon the Balor and apply the VFX impact - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - location lSpellTargetLOC = GetSpellTargetLocation(); - - if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) || - GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) || - GetHasSpellEffect(SPELL_HOLY_AURA)) - { - eSummon = EffectSummonCreature("gatebalor01",VFX_FNF_SUMMON_GATE,3.0); - float fSeconds = RoundsToSeconds(nDuration); - DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds)); - - } - else - { - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lSpellTargetLOC); - DelayCommand(3.0, CreateBalor()); - } -} - -void CreateBalor() -{ - CreateObject(OBJECT_TYPE_CREATURE, "gatebalor1", GetSpellTargetLocation()); -} - diff --git a/_removed files/nw_s0_grplanar.nss b/_removed files/nw_s0_grplanar.nss deleted file mode 100644 index 748de3fd..00000000 --- a/_removed files/nw_s0_grplanar.nss +++ /dev/null @@ -1,102 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Greater Planar Binding -//:: NW_S0_GrPlanar.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons an outsider dependant on alignment, or - holds an outsider if the creature fails a save. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - effect eGate; - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); - effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); - - effect eLink = EffectLinkEffects(eDur, EffectParalyze()); - eLink = EffectLinkEffects(eLink, eDur2); - eLink = EffectLinkEffects(eLink, eDur3); - - object oTarget = GetSpellTargetObject(); - int nRacial = GetRacialType(oTarget); - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Check to see if a valid target has been chosen - if (GetIsObjectValid(oTarget)) - { - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_PLANAR_BINDING)); - //Check for racial type - if(nRacial == RACIAL_TYPE_OUTSIDER) - { - //Allow will save to negate hold effect - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+20)) - { - //Apply the hold effect - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); - } - } - } - } - else - { - //If the ground was clicked on summon an outsider based on alignment - int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); - float fDelay = 3.0; - switch (nAlign) - { - case ALIGNMENT_EVIL: - eSummon = EffectSummonCreature("succubus03", VFX_FNF_SUMMON_GATE, 3.0); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); - break; - case ALIGNMENT_GOOD: - eSummon = EffectSummonCreature("avenger03", VFX_FNF_SUMMON_CELESTIAL, 3.0); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL); - break; - case ALIGNMENT_NEUTRAL: - eSummon = EffectSummonCreature("slaad03", VFX_FNF_SUMMON_MONSTER_3, 1.0); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - fDelay = 1.0; - break; - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); - } -} - diff --git a/_removed files/nw_s0_hammgods.nss b/_removed files/nw_s0_hammgods.nss deleted file mode 100644 index cd522c76..00000000 --- a/_removed files/nw_s0_hammgods.nss +++ /dev/null @@ -1,110 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Hammer of the Gods -//:: [NW_S0_HammGods.nss] -//:: Copyright (c) 2000 Bioware Corp. -//::////////////////////////////////////////////// -//:: Does 1d8 damage to all enemies within the -//:: spells 20m radius and dazes them if a -//:: Will save is failed. -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 21, 2001 -//:: Update Pass By: Preston W, On: Aug 1, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - effect eDam; - effect eDaze = EffectDazed(); - effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - - effect eLink = EffectLinkEffects(eMind, eDaze); - eLink = EffectLinkEffects(eLink, eDur); - - effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY); - effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY); - float fDelay; - int nDamageDice = nCasterLvl/2; - if(nDamageDice == 0) - { - nDamageDice = 1; - } - //Limit caster level - if (nDamageDice > 15) - { - nDamageDice = 15; - } - int nDamage; - //Apply the holy strike VFX - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation()); - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); - while (GetIsObjectValid(oTarget)) - { - //Make faction checks - if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS)); - //Make SR Check - if (!MyResistSpell(OBJECT_SELF, oTarget)) - { - fDelay = GetRandomDelay(0.6, 1.3); - //Roll damage - nDamage = d8(nDamageDice); - //Make metamagic checks - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * nDamageDice; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 ); - } - //Make a will save for half damage and negation of daze effect - if (MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5)) - { - nDamage = nDamage / 2; - } - else - { - //Apply daze effect - DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6()))); - } - //Set damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE ); - //Apply the VFX impact and damage effect - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - //Get next target in shape - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation()); - } -} diff --git a/_removed files/nw_s0_horrwilt.nss b/_removed files/nw_s0_horrwilt.nss deleted file mode 100644 index 5dbcfc4e..00000000 --- a/_removed files/nw_s0_horrwilt.nss +++ /dev/null @@ -1,105 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Horrid Wilting -//:: NW_S0_HorrWilt -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All living creatures (not undead or constructs) - suffer 1d8 damage per caster level to a maximum - of 25d8 damage. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Sept 12 , 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -int bInt; - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - float fDelay; - effect eExplode = EffectVisualEffect(VFX_FNF_HORRID_WILTING); - effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eDam; - - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Limit Caster level for the purposes of damage - if (nCasterLvl > 35) - { - nCasterLvl = 35; - } - //Apply the horrid wilting 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 = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); - //Cycle through the targets within the spell shape until an invalid object is captured. - while (GetIsObjectValid(oTarget)) - { - // GZ: Not much fun if the caster is always killing himself - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HORRID_WILTING)); - //Get the distance between the explosion and the target to calculate delay - fDelay = GetRandomDelay(1.5, 2.5); - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - if(GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) - { - //Roll damage for each target - nDamage = d8(nCasterLvl); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * nCasterLvl; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage / 2; - } //Epic DC Bonus Added - if(/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) - { - nDamage = nDamage/2; - } - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); - } -} diff --git a/_removed files/nw_s0_icestorm.nss b/_removed files/nw_s0_icestorm.nss deleted file mode 100644 index 3a0891bc..00000000 --- a/_removed files/nw_s0_icestorm.nss +++ /dev/null @@ -1,97 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Ice Storm -//:: NW_S0_IceStorm -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Everyone in the area takes 3d6 Bludgeoning - and 2d6 Cold damage. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Sept 12, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage, nDamage2, nDamage3; - int nVariable = nCasterLvl/2; - float fDelay; - effect eExplode = EffectVisualEffect(VFX_FNF_ICESTORM); //USE THE ICESTORM FNF - effect eVis = EffectVisualEffect(VFX_IMP_FROST_S); - effect eDam,eDam2, eDam3; - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Apply the ice storm VFX 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 = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, 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)) - { - fDelay = GetRandomDelay(0.75, 2.25); - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ICE_STORM)); - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll damage for each target - nDamage = d6(3); - nDamage2 = d6(2); - nDamage3 = d6(nVariable); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 18; - nDamage2 = 12; - nDamage3 = 6 * nVariable; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage / 2); - nDamage2 = nDamage2 + (nDamage2 / 2); - nDamage3 = nDamage3 + (nDamage3 / 2); - } - nDamage2 = nDamage2 + nDamage3; - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); - eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_COLD); - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the impact that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} - diff --git a/_removed files/nw_s0_implosion.nss b/_removed files/nw_s0_implosion.nss deleted file mode 100644 index 78100d10..00000000 --- a/_removed files/nw_s0_implosion.nss +++ /dev/null @@ -1,80 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Implosion -//:: NW_S0_Implosion.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All persons within a 5ft radius of the spell must - save at +3 DC or die. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 13, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget; - effect eDeath = EffectDeath(TRUE); - effect eEffect; - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nMult = d6(1); - int nTotalDmg = nMult * nCasterLvl; - eDeath = SupernaturalEffect(eDeath); - effect eImplode= EffectVisualEffect(VFX_FNF_IMPLOSION); - float fDelay; - //Apply the implose effect - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImplode, GetSpellTargetLocation()); - //Get the first target in the shape - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); - - while (GetIsObjectValid(oTarget)) - { - if (oTarget != OBJECT_SELF && spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPLOSION)); - fDelay = GetRandomDelay(0.4, 1.2); - //Make SR check - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Make Reflex save - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay)) - { - //Apply death effect and the VFX impact - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget)); - } - - //Apply Damage If spell is not resisted by magic... - eEffect = EffectDamage(nTotalDmg, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_ENERGY); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget, 0.0f); - } - } - //Get next target in the shape - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation()); - } -} - diff --git a/_removed files/nw_s0_imprinvis.nss b/_removed files/nw_s0_imprinvis.nss deleted file mode 100644 index d861e413..00000000 --- a/_removed files/nw_s0_imprinvis.nss +++ /dev/null @@ -1,66 +0,0 @@ -///:://///////////////////////////////////////////// -//:: Improved Invisibility -//:: NW_S0_ImprInvis.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Target creature can attack and cast spells while - invisible -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_MIND); - - effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_IMPROVED); - - effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eCover = EffectConcealment(55); - effect eLink = EffectLinkEffects(eDur, eCover); - eLink = EffectLinkEffects(eLink, eVis); - - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPROVED_INVISIBILITY, FALSE)); - int nDuration = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget); - - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oTarget, TurnsToSeconds(nDuration)); -} - - diff --git a/_removed files/nw_s0_incclouda.nss b/_removed files/nw_s0_incclouda.nss deleted file mode 100644 index c8c7b7e7..00000000 --- a/_removed files/nw_s0_incclouda.nss +++ /dev/null @@ -1,67 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Incendiary Cloud -//:: NW_S0_IncCloud.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Person within the AoE take 4d6 fire damage - per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// -//:: March 2003: Removed movement speed penalty -#include "X0_I0_SPELLS" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - effect eDam; - object oTarget; - //Declare and assign personal impact visual effect. - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); - // effect eSpeed = EffectMovementSpeedDecrease(50); - effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eLink = eVis2; //EffectLinkEffects(eSpeed, eVis2); - - float fDelay; - //Capture the first target object in the shape. - oTarget = GetEnteringObject(); - //Declare the spell shape, size and the location. - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INCENDIARY_CLOUD)); - //Make SR check, and appropriate saving throw(s). - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) - { - fDelay = GetRandomDelay(0.5, 2.0); - //Roll damage. - nDamage = d8(6) + 16; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 64;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Adjust damage for Reflex Save, Evasion and Improved Evasion - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); - // Apply effects to the currently selected target. - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - // ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget); - } -} diff --git a/_removed files/nw_s0_inccloudc.nss b/_removed files/nw_s0_inccloudc.nss deleted file mode 100644 index 3cf4999e..00000000 --- a/_removed files/nw_s0_inccloudc.nss +++ /dev/null @@ -1,80 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Incendiary Cloud -//:: NW_S0_IncCloudC.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Objects within the AoE take 4d6 fire damage - per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// -//:: Updated By: GeorgZ 2003-08-21: Now affects doors and placeables as well -#include "X0_I0_SPELLS" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - effect eDam; - object oTarget; - //Declare and assign personal impact visual effect. - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S); - - float fDelay; - //Capture the first target object in the shape. - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - - oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - //Declare the spell shape, size and the location. - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - fDelay = GetRandomDelay(0.5, 2.0); - //Make SR check, and appropriate saving throw(s). - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay)) - { - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_INCENDIARY_CLOUD)); - //Roll damage. - nDamage = d8(4) + 16; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 50;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Adjust damage for Reflex Save, Evasion and Improved Evasion - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator()); - // Apply effects to the currently selected target. - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/nw_s0_knock.nss b/_removed files/nw_s0_knock.nss deleted file mode 100644 index d4a54c67..00000000 --- a/_removed files/nw_s0_knock.nss +++ /dev/null @@ -1,35 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Knock -//:: NW_S0_Knock -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Opens doors not locked by magical means. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Nov 29, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk -//:: VFX Pass By: Preston W, On: June 22, 2001 -#include "nw_i0_spells" - -void main() -{ - object oTarget; - effect eVis = EffectVisualEffect(VFX_IMP_KNOCK); - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - float fDelay; - while(GetIsObjectValid(oTarget)) - { - fDelay = GetRandomDelay(0.5, 2.5); - if( GetLocked(oTarget)) - { - if (GetLockUnlockDC(oTarget) <= 30){ - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - AssignCommand(oTarget, ActionUnlockObject(oTarget)); - } - } - oTarget = GetNextObjectInShape(SHAPE_SPHERE, 50.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/nw_s0_lghtnbolt.nss b/_removed files/nw_s0_lghtnbolt.nss deleted file mode 100644 index 51e19578..00000000 --- a/_removed files/nw_s0_lghtnbolt.nss +++ /dev/null @@ -1,112 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Lightning Bolt -//:: NW_S0_LightnBolt -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Does 1d6 per level in a 5ft tube for 30m -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: March 8, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: May 2, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - - //Limit caster level - if (nCasterLevel > 15) - { - nCasterLevel = 15; - } - int nDamage; - int nMetaMagic = GetMetaMagicFeat(); - //Set the lightning stream to start at the caster's hands - effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND); - effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); - effect eDamage; - object oTarget = GetSpellTargetObject(); - location lTarget = GetLocation(oTarget); - object oNextTarget, oTarget2; - float fDelay; - int nCnt = 1; - - oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); - while(GetIsObjectValid(oTarget2) && GetDistanceToObject(oTarget2) <= 30.0) - { - //Get first target in the lightning area by passing in the location of first target and the casters vector (position) - oTarget = GetFirstObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); - while (GetIsObjectValid(oTarget)) - { - //Exclude the caster from the damage effects - if (oTarget != OBJECT_SELF && oTarget2 == oTarget) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LIGHTNING_BOLT)); - //Make an SR check - if (!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Roll damage - nDamage = d6(nCasterLevel); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - //Adjust damage based on Reflex Save, Evasion and Improved Evasion - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_ELECTRICITY); - //Set damage effect - eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); - if(nDamage > 0) - { - fDelay = GetSpellEffectDelay(GetLocation(oTarget), oTarget); - //Apply VFX impcat, damage effect and lightning effect - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget)); - } - } - ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,1.0); - //Set the currect target as the holder of the lightning effect - oNextTarget = oTarget; - eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNextTarget, BODY_NODE_CHEST); - } - } - //Get the next object in the lightning cylinder - oTarget = GetNextObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF)); - } - nCnt++; - oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt); - } -} - diff --git a/_removed files/nw_s0_lsplanar.nss b/_removed files/nw_s0_lsplanar.nss deleted file mode 100644 index 084dbf88..00000000 --- a/_removed files/nw_s0_lsplanar.nss +++ /dev/null @@ -1,114 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Lesser Planar Binding -//:: NW_S0_LsPlanar.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons an outsider dependant on alignment, or - holds an outsider if the creature fails a save. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 20, 2001 - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - effect eGate; - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); - effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); - effect eLink = EffectLinkEffects(eDur, EffectParalyze()); - eLink = EffectLinkEffects(eLink, eDur2); - eLink = EffectLinkEffects(eLink, eDur3); - - object oTarget = GetSpellTargetObject(); - int nRacial = GetRacialType(oTarget); - if(nDuration == 0) - { - nDuration = 1; - } - - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Check to see if the target is valid - if (GetIsObjectValid(oTarget)) - { - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LESSER_PLANAR_BINDING)); - //Check to make sure the target is an outsider - if(nRacial == RACIAL_TYPE_OUTSIDER) - { - //Make a will save - if(!WillSave(oTarget, GetSpellSaveDC())) - { - //Apply the linked effect - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); - } - } - } - } - else - { - //Get the alignment of the caster - int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); - float fDelay = 3.0; - switch (nAlign) - { - //Set the summon effect based on alignment - case ALIGNMENT_EVIL: - { - eSummon = EffectSummonCreature("succubus01",VFX_FNF_SUMMON_GATE , fDelay); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); - } - break; - case ALIGNMENT_GOOD: - { - eSummon = EffectSummonCreature("lantern01", 219 ,fDelay); - //eGate = EffectVisualEffect(219); - } - break; - case ALIGNMENT_NEUTRAL: - { - eSummon = EffectSummonCreature("slaad01", VFX_FNF_SUMMON_MONSTER_3); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3, ,1.0); - } - break; - } - //Apply the summon effect and the VFX impact - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - } -} - diff --git a/_removed files/nw_s0_metswarm.nss b/_removed files/nw_s0_metswarm.nss deleted file mode 100644 index 348b3d81..00000000 --- a/_removed files/nw_s0_metswarm.nss +++ /dev/null @@ -1,94 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Meteor Swarm -//:: NW_S0_MetSwarm -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Everyone in a 50ft radius around the caster - takes 20d6 fire damage. Those within 6ft of the - caster will take no damage. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 24 , 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 22, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic; - int nDamage; - effect eFire; - effect eMeteor = EffectVisualEffect(VFX_FNF_METEOR_SWARM); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - //Apply the meteor swarm VFX area impact - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMeteor, GetLocation(OBJECT_SELF)); - //Get first object in the spell area - float fDelay; - - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) - { - fDelay = GetRandomDelay(); - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_METEOR_SWARM)); - //Make sure the target is outside the 2m safe zone - if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0) - { - //Make SR check - if (!MyResistSpell(OBJECT_SELF, oTarget, 0.5)) - { - //Roll damage - nDamage = d6(20); - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 120;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_FIRE); - //Set the damage effect - eFire = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - if(nDamage > 0) - { - //Apply damage effect and VFX impact. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - } - //Get next target in the spell area - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); - } -} - diff --git a/_removed files/nw_s0_mordswrd.nss b/_removed files/nw_s0_mordswrd.nss deleted file mode 100644 index f90e6f9b..00000000 --- a/_removed files/nw_s0_mordswrd.nss +++ /dev/null @@ -1,50 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Mordenkainen's Sword -//:: NW_S0_MordSwrd.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a Helmed Horror to battle for the caster -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 29, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("mordsword01"); - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); -} - diff --git a/_removed files/nw_s0_negray.nss b/_removed files/nw_s0_negray.nss deleted file mode 100644 index 78bd0f32..00000000 --- a/_removed files/nw_s0_negray.nss +++ /dev/null @@ -1,96 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Negative Energy Ray -//:: NW_S0_NegRay -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Fires a bolt of negative energy at the target - doing 1d6 damage. Does an additional 1d6 - damage for 2 levels after level 1 (3,5,7,9) to - a maximum of 5d6 at level 9. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Sept 13, 2001 -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - - if(nCasterLevel > 20) - { - nCasterLevel = 20; - } - nCasterLevel = (nCasterLevel + 1) / 2; - int nDamage = d6(nCasterLevel); - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLevel;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); - effect eRay; - if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD) - { - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY)); - eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); - if (!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Make a saving throw check - if(/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NEGATIVE)) - { - nDamage /= 2; - } - effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - //Apply the VFX impact and effects - //DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - } - } - } - else - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_NEGATIVE_ENERGY_RAY, FALSE)); - eRay = EffectBeam(VFX_BEAM_EVIL, OBJECT_SELF, BODY_NODE_HAND); - effect eHeal = EffectHeal(nDamage); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); - } - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7); -} diff --git a/_removed files/nw_s0_planar.nss b/_removed files/nw_s0_planar.nss deleted file mode 100644 index baf01289..00000000 --- a/_removed files/nw_s0_planar.nss +++ /dev/null @@ -1,107 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Planar Binding -//:: NW_S0_Planar.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons an outsider dependant on alignment, or - holds an outsider if the creature fails a save. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -#include "NW_I0_SPELLS" - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - effect eGate; - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED); - effect eDur3 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); - effect eLink = EffectLinkEffects(eDur, EffectParalyze()); - eLink = EffectLinkEffects(eLink, eDur2); - eLink = EffectLinkEffects(eLink, eDur3); - - int nRacial = GetRacialType(oTarget); - int nAlign = GetAlignmentGoodEvil(OBJECT_SELF); - if(nDuration == 0) - { - nDuration == 1; - } - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Check to make sure a target was selected - if (GetIsObjectValid(oTarget)) - { - //Check the racial type of the target - if(nRacial == RACIAL_TYPE_OUTSIDER) - { - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PLANAR_BINDING)); - //Make a Will save - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()+2)) - { - //Apply the linked effect - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration/2)); - } - } - } - } - else - { - //Set the summon effect based on the alignment of the caster - float fDelay = 3.0; - switch (nAlign) - { - case ALIGNMENT_EVIL: - eSummon = EffectSummonCreature("succubus02",VFX_FNF_SUMMON_GATE, fDelay); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); - break; - case ALIGNMENT_GOOD: - eSummon = EffectSummonCreature("hound02", VFX_FNF_SUMMON_CELESTIAL, fDelay); - //eGate = EffectVisualEffect(219); - break; - case ALIGNMENT_NEUTRAL: - eSummon = EffectSummonCreature("slaad02",VFX_FNF_SUMMON_MONSTER_3, 1.0); - //eGate = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //fDelay = 1.0; - break; - } - //Apply the summon effect and VFX impact - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eGate, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - } -} - diff --git a/_removed files/nw_s0_pwkill.nss b/_removed files/nw_s0_pwkill.nss deleted file mode 100644 index 0d0d3905..00000000 --- a/_removed files/nw_s0_pwkill.nss +++ /dev/null @@ -1,136 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Power Word, Kill -//:: NW_S0_PWKill -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// When power word, kill is uttered, you can either -// target a single creature or let the spell affect a -// group. -// If power word, kill is targeted at a single creature, -// that creature dies if it has 100 or fewer hit points. -// If the power word, kill is cast as an area spell, it -// kills creatures in a 15-foot-radius sphere. It only -// kills creatures that have 20 or fewer hit points, and -// only up to a total of 200 hit points of such -// creatures. The spell affects creatures with the lowest. -*/ -//::////////////////////////////////////////////// -//:: Created By: Noel Borstad -//:: Created On: Dec 18, 2000 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 22, 2001 -//:: Update Pass By: Preston W, On: Aug 3, 2001 -#include "X0_I0_SPELLS" - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nDamageDealt = 0; - int nHitpoints, nMin; - object oWeakest; - effect eDeath = EffectDeath(); - effect eVis = EffectVisualEffect(VFX_IMP_DEATH); - effect eWord = EffectVisualEffect(VFX_FNF_PWKILL); - float fDelay; - int bKill; - - //Apply the VFX impact - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWord, GetSpellTargetLocation()); - //Check for the single creature or area targeting of the spell - if (GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); - //Check the creatures HP - if ( GetCurrentHitPoints(oTarget) <= 200 ) - { - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Apply the death effect and the VFX impact - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - } - } - else - { - //Continue through the while loop while the damage deal is less than 200. - while (nDamageDealt < 200) - { - //Set nMin higher than the highest HP amount allowed - nMin = 25; - oWeakest = OBJECT_INVALID; - //Get the first target in the spell area - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); - while (GetIsObjectValid(oTarget)) - { - //Make sure the target avoids all allies. - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - bKill = GetLocalInt(oTarget, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF)); - //Get the HP of the current target - nHitpoints = GetCurrentHitPoints(oTarget); - //Check if the currently selected target is lower in HP than the weakest stored creature - if ((nHitpoints < nMin) && ((nHitpoints > 0) && (nHitpoints <= 20)) && bKill == FALSE) - { - nMin = nHitpoints; - oWeakest = oTarget; - } - } - //Get next target in the spell area - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetSpellTargetLocation()); - } - //If no weak targets are available then break out of the loop - if (!GetIsObjectValid(oWeakest)) - { - nDamageDealt = 250; - } - else - { - fDelay = GetRandomDelay(0.75, 2.0); - SetLocalInt(oWeakest, "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF), TRUE); - //Fire cast spell at event for the specified target - SignalEvent(oWeakest, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_KILL)); - if(!MyResistSpell(OBJECT_SELF, oWeakest, fDelay)) - { - //Apply the VFX impact and death effect - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oWeakest)); - if(!GetIsImmune(oWeakest, IMMUNITY_TYPE_DEATH)) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oWeakest)); - } - //Add the creatures HP to the total - nDamageDealt = nDamageDealt + nMin; - string sTag = "NW_SPELL_PW_KILL_" + GetTag(OBJECT_SELF); - DelayCommand(fDelay + 0.25, DeleteLocalInt(oWeakest, sTag)); - } - } - } - } -} diff --git a/_removed files/nw_s0_raisdead.nss b/_removed files/nw_s0_raisdead.nss deleted file mode 100644 index 4ee6f14c..00000000 --- a/_removed files/nw_s0_raisdead.nss +++ /dev/null @@ -1,47 +0,0 @@ -//:://///////////////////////////////////////////// -//:: [Raise Dead] -//:: [NW_S0_RaisDead.nss] -//:: Copyright (c) 2000 Bioware Corp. -//::////////////////////////////////////////////// -//:: Brings a character back to life with 1 HP. -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 31, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 -//:: VFX Pass By: Preston W, On: June 22, 2001 - -void main() -{ - //Declare major variables - object oTarget = GetSpellTargetObject(); - object oPC = oTarget; - object oItem; - - //Remove the death token - object oDeath = GetItemPossessedBy(oPC, "death"); - DestroyObject(oDeath, 0.0f); - - effect eRaise = EffectResurrection(); - effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); - - if (GetLocalInt(GetArea(oTarget), "streamed")==2){ - return; - } - if(GetIsDead(oTarget)) - { - SetPlotFlag(oTarget, 0); - - SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); - - - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE)); - //Apply raise dead effect and VFX impact - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); - - } -} - diff --git a/_removed files/nw_s0_regen.nss b/_removed files/nw_s0_regen.nss deleted file mode 100644 index c20c792c..00000000 --- a/_removed files/nw_s0_regen.nss +++ /dev/null @@ -1,59 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Regenerate -//:: NW_S0_Regen -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Grants the selected target 6 HP of regeneration - every round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 22, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - effect eRegen = EffectRegenerate(12, 6.0); - effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - - effect eLink = EffectLinkEffects(eRegen, eDur); - - - int nMeta = GetMetaMagicFeat(); - int nLevel = GetCasterLevel(OBJECT_SELF); - //Meta-Magic Checks - if (nMeta == METAMAGIC_EXTEND) - { - nLevel *= 2; - - } - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REGENERATE, FALSE)); - //Apply effects and VFX - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - -} diff --git a/_removed files/nw_s0_resserec.nss b/_removed files/nw_s0_resserec.nss deleted file mode 100644 index 115921f8..00000000 --- a/_removed files/nw_s0_resserec.nss +++ /dev/null @@ -1,52 +0,0 @@ -//:://///////////////////////////////////////////// -//:: [Ressurection] -//:: [NW_S0_Ressurec.nss] -//:: Copyright (c) 2000 Bioware Corp. -//::////////////////////////////////////////////// -//:: Brings a character back to life with full -//:: health. -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 31, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 -//:: VFX Pass By: Preston W, On: June 22, 2001 - -void main() -{ - //Get the spell target - object oTarget = GetSpellTargetObject(); - object oPC = oTarget; - object oItem; - object oDeath = GetItemPossessedBy(oPC, "death"); - DestroyObject(oDeath, 0.0f); - - if (!GetIsDead(oTarget)){return;} - - if (GetLocalInt(GetArea(oTarget), "streamed")==2){ - return; - } - - //Check to make sure the target is dead first - if (GetIsDead(oTarget)) - { - SetPlotFlag(oTarget, 0); - - //Remove the Death Logging from the player.. - SetCampaignInt(GetName(GetModule()), "DEATH_LOG", 0, oPC); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE)); - //Declare major variables - int nHealed = GetMaxHitPoints(oTarget); - effect eRaise = EffectResurrection(); - effect eHeal = EffectHeal(nHealed + 10); - effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD); - //Apply the heal, raise dead and VFX impact effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget)); - - } -} - diff --git a/_removed files/nw_s0_shadconj.nss b/_removed files/nw_s0_shadconj.nss deleted file mode 100644 index 8b569af4..00000000 --- a/_removed files/nw_s0_shadconj.nss +++ /dev/null @@ -1,105 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Shadow Conjuration -//:: NW_S0_ShadConj.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - If the opponent is clicked on Shadow Bolt is cast. - If the caster clicks on himself he will cast - Mage Armor and Mirror Image. If they click on - the ground they will summon a Shadow. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -void ShadowBolt (object oTarget, int nMetaMagic); - -void main() -{ - int nMetaMagic = GetMetaMagicFeat(); - object oTarget = GetSpellTargetObject(); - int nCast; - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eVis; - - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - - if (GetIsObjectValid(oTarget)) - { - if (oTarget == OBJECT_SELF) - { - nCast = 1; - } - else - { - nCast = 2; - } - } - else - { - nCast = 3; - } - - switch (nCast) - { - case 1: - { - eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); - effect eAC = EffectACIncrease(4, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL); - effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); - effect eMiss = EffectConcealment(40); - effect eLink = EffectLinkEffects(eAC, eMirror); - eLink = EffectLinkEffects(eLink, eVis); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, TurnsToSeconds(nDuration)); - } - case 2: - if (!ResistSpell(OBJECT_SELF, oTarget)) - { - ShadowBolt(oTarget, nMetaMagic); - } - case 3: - eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("shadfiend01"); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - } -} - -void ShadowBolt (object oTarget, int nMetaMagic) -{ - int nDamage; - int nBolts = GetCasterLevel(OBJECT_SELF)/5; - int nCnt; - effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eDam; - for (nCnt = 0; nCnt < nBolts; nCnt++) - { - int nDam = d6(2); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 12;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage/2; //Damage/Healing is +50% - } - if (ReflexSave(oTarget, GetSpellSaveDC())) - { - nDamage = nDamage/2; - } - eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - } -} - - diff --git a/_removed files/nw_s0_shades.nss b/_removed files/nw_s0_shades.nss deleted file mode 100644 index 265bae6c..00000000 --- a/_removed files/nw_s0_shades.nss +++ /dev/null @@ -1,105 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Shades -//:: NW_S0_Shades.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - If the opponent is clicked on Shadow Bolt is cast. - If the caster clicks on himself he will cast - Stoneskin and Mirror Image. If they click on - the ground they will summon a Shadow Lord. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -void ShadowBolt (object oTarget, int nMetaMagic); - -void main() -{ - int nMetaMagic = GetMetaMagicFeat(); - object oTarget = GetSpellTargetObject(); - int nCast; - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eVis; - - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - - if (GetIsObjectValid(oTarget)) - { - if (oTarget == OBJECT_SELF) - { - nCast = 1; - } - else - { - nCast = 2; - } - } - else - { - nCast = 3; - } - - switch (nCast) - { - case 1: - { - eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); - effect eStone = EffectDamageReduction(5, DAMAGE_POWER_PLUS_FIVE, nDuration * 10); - effect eMirror = EffectVisualEffect(VFX_DUR_BLUR); - effect eLink = EffectLinkEffects(eStone, eMirror); - effect eMiss = EffectConcealment(40); - eLink = EffectLinkEffects(eLink, eVis); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eMiss, OBJECT_SELF, HoursToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); - } - case 2: - if (!ResistSpell(OBJECT_SELF, oTarget)) - { - ShadowBolt(oTarget, nMetaMagic); - } - case 3: - eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("shadlord01"); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - } -} - -void ShadowBolt (object oTarget, int nMetaMagic) -{ - int nDamage; - int nBolts = GetCasterLevel(OBJECT_SELF)/5; - int nCnt; - effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - - for (nCnt = 0; nCnt < nBolts; nCnt++) - { - int nDam = d6(4); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 24;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage/2; //Damage/Healing is +50% - } - if (ReflexSave(oTarget, GetSpellSaveDC())) - { - nDamage = nDamage/2; - } - effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - } -} - - diff --git a/_removed files/nw_s0_slaylive.nss b/_removed files/nw_s0_slaylive.nss deleted file mode 100644 index 61809695..00000000 --- a/_removed files/nw_s0_slaylive.nss +++ /dev/null @@ -1,85 +0,0 @@ -//:://///////////////////////////////////////////// -//:: [Slay Living] -//:: [NW_S0_SlayLive.nss] -//:: Copyright (c) 2000 Bioware Corp. -//::////////////////////////////////////////////// -//:: Caster makes a touch attack and if the target -//:: fails a Fortitude save they die. -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: January 22nd / 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "NW_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - object oTarget = GetSpellTargetObject(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDamage; - effect eDam; - effect eVis = EffectVisualEffect(VFX_IMP_DEATH); - effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - - if(!GetIsReactionTypeFriendly(oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLAY_LIVING)); - //Make SR check - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Make melee touch attack - if(TouchAttackMelee(oTarget)) - { - //Make Fort save - if (!/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_DEATH)) - { - //Apply the death effect and VFX impact - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget); - //ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - else - { - //Roll damage - nDamage = d6(3)+ nCasterLevel; - //Make metamagic checks - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 18 + nCasterLevel; - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - //Apply damage effect and VFX impact - eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - } - } - } - } -} diff --git a/_removed files/nw_s0_slow.nss b/_removed files/nw_s0_slow.nss deleted file mode 100644 index 67bd7fe0..00000000 --- a/_removed files/nw_s0_slow.nss +++ /dev/null @@ -1,84 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Slow -//:: NW_S0_Slow.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Character can take only one partial action - per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 29, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget; - effect eSlow = EffectSlow(); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eLink = EffectLinkEffects(eSlow, eDur); - - effect eVis = EffectVisualEffect(VFX_IMP_SLOW); - effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30); - int nMetaMagic = GetMetaMagicFeat(); - //Determine spell duration as an integer for later conversion to Rounds, Turns or Hours. - int nDuration = GetCasterLevel(OBJECT_SELF); - int nLevel = nDuration; - int nCount = 0; - location lSpell = GetSpellTargetLocation(); - - //Metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation()); - //Declare the spell shape, size and the location. Capture the first target object in the shape. - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); - //Cycle through the targets within the spell shape until an invalid object is captured or the number of - //targets affected is equal to the caster level. - while(GetIsObjectValid(oTarget) && nCount < nLevel) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLOW)); - if (!MyResistSpell(OBJECT_SELF, oTarget) && !/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC())) - { - //Apply the slow effect and VFX impact - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - //Count the number of creatures affected - nCount++; - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell); - } -} - diff --git a/_removed files/nw_s0_splresis.nss b/_removed files/nw_s0_splresis.nss deleted file mode 100644 index 9afb25b0..00000000 --- a/_removed files/nw_s0_splresis.nss +++ /dev/null @@ -1,76 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Spell Resistance -//:: NW_S0_SplResis -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The target creature gains 12 + Caster Level SR. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: March 19, 2001 -//::////////////////////////////////////////////// -//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001 -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - int nLevel = GetCasterLevel(OBJECT_SELF); - - //Epic Spell Resistance Added - int nDC; - int nAdjs; - nAdjs = GetCasterLevel(OBJECT_SELF) - 20; - if(GetCasterLevel(OBJECT_SELF)>=23) - { - nDC = nAdjs/3; - SendMessageToPC(OBJECT_SELF, "Your Epic Spell Resistance Bonus = + " + IntToString(nDC) + " DC"); - } - else if(GetCasterLevel(OBJECT_SELF) <=22) - { - nDC = 0; - } - - //Epic Resistance Added - int nBonus = 12 + nLevel + nDC; - effect eSR = EffectSpellResistanceIncrease(nBonus); - effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eDur2 = EffectVisualEffect(249); - effect eLink = EffectLinkEffects(eSR, eDur); - eLink = EffectLinkEffects(eLink, eDur2); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE)); - //Check for metamagic extension - if (nMetaMagic == METAMAGIC_EXTEND) - { - nLevel = nLevel *2; //Duration is +100% - } - //Apply VFX impact and SR bonus effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nLevel)); -} diff --git a/_removed files/nw_s0_stormvenc.nss b/_removed files/nw_s0_stormvenc.nss deleted file mode 100644 index b2b89098..00000000 --- a/_removed files/nw_s0_stormvenc.nss +++ /dev/null @@ -1,74 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Storm of Vengeance: Heartbeat -//:: NW_S0_StormVenC.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates an AOE that decimates the enemies of - the cleric over a 30ft radius around the caster -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Nov 8, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - effect eAcid = EffectDamage(d8(5), DAMAGE_TYPE_ACID); - effect eElec = EffectDamage(d8(7), DAMAGE_TYPE_ELECTRICAL); - effect eStun = EffectStunned(); - effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S); - effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M); - effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eLink = EffectLinkEffects(eStun, eVisStun); - eLink = EffectLinkEffects(eLink, eDur); - - float fDelay; - //Get first target in spell area - object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE)); - //Make an SR Check - fDelay = GetRandomDelay(0.5, 2.0); - if(MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay) == 0) - { - //Make a saving throw check - // * if the saving throw is made they still suffer acid damage. - // * if they fail the saving throw, they suffer Electrical damage too - if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY, GetAreaOfEffectCreator(), fDelay)) - { - //Apply the VFX impact and effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); - if (d2()==1) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); - } - } - else - { - //Apply the VFX impact and effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget)); - //Apply the VFX impact and effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eElec, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2))); - } - } - } - //Get next target in spell area - oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE); - } -} diff --git a/_removed files/nw_s0_summon.nss b/_removed files/nw_s0_summon.nss deleted file mode 100644 index 5f8a7740..00000000 --- a/_removed files/nw_s0_summon.nss +++ /dev/null @@ -1,260 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Creature Series -//:: NW_S0_Summon -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Carries out the summoning of the appropriate - creature for the Summon Monster Series of spells - 1 to 9 -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 8, 2002 -//::////////////////////////////////////////////// - -effect SetSummonEffect(int nSpellID); - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nSpellID = GetSpellId(); - int nDuration = GetCasterLevel(OBJECT_SELF); - nDuration = 24; - if(nDuration == 1) - { - nDuration = 4; - } - effect eSummon = SetSummonEffect(nSpellID); - - //Make metamagic check for extend - int nMetaMagic = GetMetaMagicFeat(); - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); -} - - -effect SetSummonEffect(int nSpellID) -{ - int nFNF_Effect; - int nRoll = d3(); - string sSummon; - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) //WITH THE ANIMAL DOMAIN - { - if(nSpellID == SPELL_SUMMON_CREATURE_I) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "NW_S_BOARDIRE"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_II) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "NW_S_WOLFDIRE"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_III) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "direspider4"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_IV) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; - sSummon = "diretiger5"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_V) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; - sSummon = "direbear6"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VI) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "airelder7"; - break; - - case 2: - sSummon = "waterelder7"; - break; - - case 3: - sSummon = "fireelder7"; - break; - } - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VII) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "airgreat8"; - break; - - case 2: - sSummon = "watergreat8"; - break; - - case 3: - sSummon = "firegreat8"; - break; - } - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "asummon9"; - break; - - case 2: - sSummon = "bsummon9"; - break; - - case 3: - sSummon = "csummon9"; - break; - } - } - else if(nSpellID == SPELL_SUMMON_CREATURE_IX) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "asummon9"; - break; - - case 2: - sSummon = "csummon9"; - break; - - case 3: - sSummon = "dsummon9"; - break; - } - } - } - else //WITOUT THE ANIMAL DOMAIN - { - if(nSpellID == SPELL_SUMMON_CREATURE_I) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "NW_S_badgerdire"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_II) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "NW_S_BOARDIRE"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_III) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1; - sSummon = "NW_S_WOLFDIRE"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_IV) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; - sSummon = "direspider4"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_V) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; - sSummon = "diretiger5"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VI) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2; - sSummon = "direbear6"; - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VII) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "airelder7"; - break; - - case 2: - sSummon = "waterelder7"; - break; - - case 3: - sSummon = "fireelder7"; - break; - } - } - else if(nSpellID == SPELL_SUMMON_CREATURE_VIII) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "airgreat8"; - break; - - case 2: - sSummon = "watergreat8"; - break; - - case 3: - sSummon = "firegreat8"; - break; - } - } - else if(nSpellID == SPELL_SUMMON_CREATURE_IX) - { - nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3; - switch (nRoll) - { - case 1: - sSummon = "asummon9"; - break; - - case 2: - sSummon = "bsummon9"; - break; - - case 3: - sSummon = "csummon9"; - break; - - } - } - } - //effect eVis = EffectVisualEffect(nFNF_Effect); - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - effect eSummonedMonster = EffectSummonCreature(sSummon, nFNF_Effect); - return eSummonedMonster; -} - diff --git a/_removed files/nw_s0_summon4.nss b/_removed files/nw_s0_summon4.nss deleted file mode 100644 index 9beb093d..00000000 --- a/_removed files/nw_s0_summon4.nss +++ /dev/null @@ -1,54 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster IV -//:: NW_S0_Summon4 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a Sword Spider to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - - -#include "x2_inc_spellhook" -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("direspider4"); - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) - { - eSummon = EffectSummonCreature("diretiger5"); - } - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} - diff --git a/_removed files/nw_s0_summon5.nss b/_removed files/nw_s0_summon5.nss deleted file mode 100644 index 9ea66ffc..00000000 --- a/_removed files/nw_s0_summon5.nss +++ /dev/null @@ -1,52 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster V -//:: NW_S0_Summon5 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a dire spider to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12 , 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" -void main() -{ - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("diretiger5"); - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) - { - eSummon = EffectSummonCreature("direbear6"); - } - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} diff --git a/_removed files/nw_s0_summon6.nss b/_removed files/nw_s0_summon6.nss deleted file mode 100644 index 669b3b93..00000000 --- a/_removed files/nw_s0_summon6.nss +++ /dev/null @@ -1,70 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster VI -//:: NW_S0_Summon6 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a dire bear to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("direbear6"); - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) - { - int nRoll = d4(); - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("airelder7"); - break; - - case 2: - eSummon = EffectSummonCreature("waterelder7"); - break; - - case 3: - eSummon = EffectSummonCreature("earthelder7"); - break; - - case 4: - eSummon = EffectSummonCreature("fireelder7"); - break; - } - } - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} diff --git a/_removed files/nw_s0_summon7.nss b/_removed files/nw_s0_summon7.nss deleted file mode 100644 index 9c3ed080..00000000 --- a/_removed files/nw_s0_summon7.nss +++ /dev/null @@ -1,90 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster VII -//:: NW_S0_Summon7 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a Minogon to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" -void main() -{ - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - int nRoll = d4(); - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) - { - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("airegreat8"); - break; - - case 2: - eSummon = EffectSummonCreature("watergreat8"); - break; - - case 3: - eSummon = EffectSummonCreature("earthgreat8"); - break; - - case 4: - eSummon = EffectSummonCreature("firegreat8"); - break; - } - } - else - { - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("airelder7"); - break; - - case 2: - eSummon = EffectSummonCreature("waterelder7"); - break; - - case 3: - eSummon = EffectSummonCreature("earthelder7"); - break; - - case 4: - eSummon = EffectSummonCreature("fireelder7"); - break; - } - } - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} diff --git a/_removed files/nw_s0_summon8.nss b/_removed files/nw_s0_summon8.nss deleted file mode 100644 index 4b773f24..00000000 --- a/_removed files/nw_s0_summon8.nss +++ /dev/null @@ -1,92 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster VIII -//:: NW_S0_Summon8 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a greater earth elemental to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" -void main() -{ - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - int nRoll = d4(); - if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) - { - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("asummon9"); - break; - - case 2: - eSummon = EffectSummonCreature("bsummon9"); - break; - - case 3: - eSummon = EffectSummonCreature("csummon9"); - break; - - case 4: - eSummon = EffectSummonCreature("dsummon9"); - break; - - } - } - else - { - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("airgreat8"); - break; - - case 2: - eSummon = EffectSummonCreature("watergreat8"); - break; - - case 3: - eSummon = EffectSummonCreature("earthgreat8"); - break; - - case 4: - eSummon = EffectSummonCreature("firegreat8"); - break; - } - } - - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} diff --git a/_removed files/nw_s0_summon9.nss b/_removed files/nw_s0_summon9.nss deleted file mode 100644 index 35fc9ea8..00000000 --- a/_removed files/nw_s0_summon9.nss +++ /dev/null @@ -1,66 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Monster IX -//:: NW_S0_Summon9 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a elder elemental to fight for the character -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: April 12, 2001 -//::////////////////////////////////////////////// -//:: VFX Pass By: Preston W, On: June 25, 2001 - -#include "x2_inc_spellhook" -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon; - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - int nRoll = d4(); - switch (nRoll) - { - case 1: - eSummon = EffectSummonCreature("asummon9"); - break; - - case 2: - eSummon = EffectSummonCreature("bsummon9"); - break; - - case 3: - eSummon = EffectSummonCreature("csummon9"); - break; - - case 4: - eSummon = EffectSummonCreature("dsummon9"); - break; - } - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), TurnsToSeconds(nDuration)); -} diff --git a/_removed files/nw_s0_summshad.nss b/_removed files/nw_s0_summshad.nss deleted file mode 100644 index 6b9be3a3..00000000 --- a/_removed files/nw_s0_summshad.nss +++ /dev/null @@ -1,70 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Shadow -//:: NW_S0_SummShad.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Spell powerful ally from the shadow plane to - battle for the wizard -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 26, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = nCasterLevel; - effect eSummon; - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Set the summoned undead to the appropriate template based on the caster level - if (nCasterLevel <= 7) - { - eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) - { - eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) - { - eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later - } - else if ((nCasterLevel >= 24)) - { - eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); - } - - //Apply VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); -} - diff --git a/_removed files/nw_s0_summshad02.nss b/_removed files/nw_s0_summshad02.nss deleted file mode 100644 index ea3664fe..00000000 --- a/_removed files/nw_s0_summshad02.nss +++ /dev/null @@ -1,64 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Shadow -//:: NW_S0_SummShad02.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Spell powerful ally from the shadow plane to - battle for the wizard -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 26, 2001 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-23 by GeorgZ - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC); - effect eSummon; - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - - //Set the summoned undead to the appropriate template based on the caster level - if (nCasterLevel <= 7) - { - eSummon = EffectSummonCreature("shadow01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 8) && (nCasterLevel <= 17)) - { - eSummon = EffectSummonCreature("shadhound01",VFX_FNF_SUMMON_UNDEAD); - } - else if ((nCasterLevel >= 18) && (nCasterLevel <= 23)) - { - eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); // change later - } - else if ((nCasterLevel >= 24)) - { - eSummon = EffectSummonCreature("shadlord01",VFX_FNF_SUMMON_UNDEAD); - } - - //Apply VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(24)); -} - diff --git a/_removed files/nw_s0_timestop.nss b/_removed files/nw_s0_timestop.nss deleted file mode 100644 index e1723a53..00000000 --- a/_removed files/nw_s0_timestop.nss +++ /dev/null @@ -1,158 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Time Stop -//:: NW_S0_TimeStop.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All persons in the Area are frozen in time - except the caster. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// - -// Place the following variable on an area to disable timestop in that area. -// NAME : TIMESTOP_DISABLED TYPE : Int VALUE : 1 - -// If set to zero, the duration will default to 1 + 1d4 rounds. Otherwise, the -// duration will be the number of seconds the variable is changed to. -const int TIME_STOP_OVERRIDE_DURATION = 13; -// ex. const int TIME_STOP_OVERRIDE_DURATION = 9; Timestop lasts 9 seconds. - -// Number of seconds before Timestop can be recast after being cast. Countdown -//messages are sent based on this time. Set to 0.0 if you dont want there to -//be any cooldown -const float TIME_STOP_COOLDOWN_TIME = 0.0; - -//If set to 1, Timestop will not be usable\ -const int TIME_STOP_DISABLE = 0; - -#include "x2_inc_spellhook" - -int DetermineDuration() -{ - int nDuration = 1 + d4(1); - float fDuration = RoundsToSeconds(nDuration); - int nSeconds = FloatToInt(fDuration); - if (TIME_STOP_OVERRIDE_DURATION != 0) nSeconds = TIME_STOP_OVERRIDE_DURATION; - return nSeconds; -} - -void TimeStopDelay(object oCaster) -{ - float Delay1 = TIME_STOP_COOLDOWN_TIME * 0.25; - string Message1 = IntToString(FloatToInt(Delay1)); - float Delay2 = TIME_STOP_COOLDOWN_TIME * 0.50; - string Message2 = IntToString(FloatToInt(Delay2)); - float Delay3 = TIME_STOP_COOLDOWN_TIME * 0.75; - string Message3 = IntToString(FloatToInt(Delay3)); - SetLocalInt(oCaster, "TIMESTOP_DELAY", 1); - DelayCommand(Delay1, FloatingTextStringOnCreature("Time Stop Recastable In " + Message3 + " seconds", oCaster, FALSE)); - DelayCommand(Delay2, FloatingTextStringOnCreature("Time Stop Recastable In " + Message2 + " seconds", oCaster, FALSE)); - DelayCommand(Delay3, FloatingTextStringOnCreature("Time Stop Recastable In " + Message1 + " seconds", oCaster, FALSE)); - DelayCommand(TIME_STOP_COOLDOWN_TIME, FloatingTextStringOnCreature("Time Stop Ready", oCaster, FALSE)); - DelayCommand(TIME_STOP_COOLDOWN_TIME, DeleteLocalInt(oCaster, "TIMESTOP_DELAY")); -} -void Timestop(object oCaster) -{ - object oArea = GetArea(oCaster); - - effect eParalyze = EffectCutsceneParalyze(); - int nDuration = DetermineDuration(); - float fDuration = IntToFloat(nDuration); - object oTarget = GetFirstObjectInArea(oArea); - - while (GetIsObjectValid(oTarget)) { - if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { - if (GetIsDM(oTarget) == FALSE) { - if (oTarget != oCaster) { - FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); - AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } } } - - oTarget = GetNextObjectInArea(oArea); } -} - -void TimestopCheck(object oCaster, int nDuration) -{ - if (nDuration == 0) return; - - nDuration = nDuration - 1; - float fDuration = IntToFloat(nDuration); - object oArea = GetArea(oCaster); - location lCaster = GetLocation(oCaster); - - effect eParalyze = EffectCutsceneParalyze(); - object oTarget = GetFirstObjectInArea(oArea); - - while (GetIsObjectValid(oTarget)) { - if (GetIsPC(oTarget) == TRUE || GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) { - if (GetIsDM(oTarget) == FALSE) { - if (oTarget != oCaster) { - - effect eEffect = GetFirstEffect(oTarget); - while (GetIsEffectValid(eEffect)) { - if (GetEffectType(eEffect) == EFFECT_TYPE_CUTSCENE_PARALYZE) { - SetLocalInt(oTarget, "TIME_STOPPED", 1); } - eEffect = GetNextEffect(oTarget); } - - if (GetLocalInt(oTarget, "TIME_STOPPED") == 0) { - FloatingTextStringOnCreature("Time Stopped", oTarget, FALSE); - AssignCommand(oTarget, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oTarget, fDuration)); } - - DeleteLocalInt(oTarget, "TIME_STOPPED"); } } } - - oTarget = GetNextObjectInArea(oArea); } - - DelayCommand(1.0, TimestopCheck(oCaster, nDuration)); -} - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - string sName = GetName(OBJECT_SELF); - if (TIME_STOP_DISABLE == 1) { - FloatingTextStringOnCreature("Timestop is disabled on this server", OBJECT_SELF, FALSE); - return; } - - - if (GetLocalInt(GetArea(OBJECT_SELF), "TIMESTOP_DISABLED") == 1 && GetName(OBJECT_SELF) != "Archmage Jezebeth") { - FloatingTextStringOnCreature("Time Stop is not permitted in this area", OBJECT_SELF, FALSE); - return; } - - if (GetLocalInt(OBJECT_SELF, "TIMESTOP_DELAY") == 1) { - FloatingTextStringOnCreature("Timestop is not castable yet", OBJECT_SELF, FALSE); - return; } - - if (TIME_STOP_COOLDOWN_TIME != 0.0) { - string Message = IntToString(FloatToInt(TIME_STOP_COOLDOWN_TIME)); - FloatingTextStringOnCreature("Time Stop Recastable In " + Message + " seconds", OBJECT_SELF, FALSE); - DelayCommand(0.6, TimeStopDelay(OBJECT_SELF)); } - - //Declare major variables - location lTarget = GetSpellTargetLocation(); - effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP); - int nDuration = DetermineDuration(); - - //Fire cast spell at event for the specified target - SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget); - Timestop(OBJECT_SELF); - DelayCommand(1.0, TimestopCheck(OBJECT_SELF, nDuration)); - -} diff --git a/_removed files/nw_s0_timestop1.nss b/_removed files/nw_s0_timestop1.nss deleted file mode 100644 index 13a7119f..00000000 --- a/_removed files/nw_s0_timestop1.nss +++ /dev/null @@ -1,56 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Time Stop -//:: NW_S0_TimeStop.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - All persons in the Area are frozen in time - except the caster. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// - -/*This is a modified version of kaltors PW friendly time stop script -It has been modified to do several new functions - ---It not will not dominate summoned units, to prevent them from becomine masterless ---It follows standard 9.0 second timestop with a .75 delay ---It applies a small visual affect to all units to show a timestop in effect ---It applies a knockdown effect to summoned units to prevent them doing anything(no summoned unit has - immune to knockdown to my knowledge ---it applies a Immobilize effect to prevent units from moving (an occasional bug with big PW's on high CPU load). -*/ - -void main() -{ - object oArea = GetArea(OBJECT_SELF); - location lLocation = GetLocation(OBJECT_SELF); - object oTG = GetFirstObjectInArea(oArea); - - int nRoll = 2 + d4(); - int bonus = ( (GetCasterLevel(OBJECT_SELF)-20) / 10 ); - if(bonus < 1 || bonus >40) - { bonus = 0; } - - SendMessageToPC(OBJECT_SELF, "Time stopped for " + IntToString(nRoll+bonus) + " rounds."); - - while (oTG != OBJECT_INVALID) - { - if(GetObjectType(oTG) == OBJECT_TYPE_CREATURE && oTG != OBJECT_SELF){ - if(!GetIsObjectValid(GetMaster(oTG))){ - DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); - } - else{ - DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); - } - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BLUR), oTG, 3.75f); - DelayCommand(0.35f, AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneImmobilize(), oTG, (RoundsToSeconds(nRoll+bonus) + 2.0)))); - } - oTG = GetNextObjectInArea(oArea); - } - SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), lLocation); -} diff --git a/_removed files/nw_s0_timestop3.nss b/_removed files/nw_s0_timestop3.nss deleted file mode 100644 index 6af4d98e..00000000 --- a/_removed files/nw_s0_timestop3.nss +++ /dev/null @@ -1,76 +0,0 @@ -// Function to get creature(s) within radius and apply the alternate TimeStop - -int TestScrollUsage() -{ - int n = GetLevelByClass(CLASS_TYPE_BARD) + - GetLevelByClass(CLASS_TYPE_SORCERER) + - GetLevelByClass(CLASS_TYPE_WIZARD) + - GetLevelByClass(CLASS_TYPE_ROGUE); - return Random(15) < n; -} -// Begin Main Function -void main() - { - int fDur = 12+ d6(); - float dur = IntToFloat(fDur); - - if (!TestScrollUsage() && !GetIsDM(OBJECT_SELF) && GetRacialType(OBJECT_SELF) != RACIAL_TYPE_DRAGON) { - SendMessageToPC(OBJECT_SELF, "Casting from item failed"); - return; - } - int nRoll; - int nRoll2 = d4(); - if (nRoll2 == 1){nRoll = 2;} - if (nRoll2 == 2 || nRoll2 == 3){nRoll = 3;} - if (nRoll2 == 4){nRoll = 4;} - - object dragon = GetNearestCreature(CREATURE_TYPE_RACIAL_TYPE, RACIAL_TYPE_DRAGON); - object area = GetArea(dragon); - - string pc = GetPCPlayerName(OBJECT_SELF); - - object area2 = GetArea(OBJECT_SELF); - string busted = GetName(area2); - if (GetRacialType(OBJECT_SELF) == RACIAL_TYPE_DRAGON){ - area = GetArea(GetWaypointByTag("sage")); - fDur = 18+ d6();} - if (dragon != OBJECT_INVALID && area == area2){ - SendMessageToPC(OBJECT_SELF, "There is a disturbance in the time stream, and you cannot cast Time Stop."); - return; - } - - - if (GetLocalInt(GetArea(OBJECT_SELF), "streamed")==2) { - SendMessageToPC(OBJECT_SELF, "Time is already stopped"); - return; - } - - DelayCommand(1.0, SetLocalInt(GetArea(OBJECT_SELF), "streamed", 2)); - DelayCommand(dur, DeleteLocalInt(OBJECT_SELF, "streamed")); - //Signal event to start the TimeStop - SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE)); - // Begin custom TimeStop - SendMessageToAllDMs("Timestop cast by " + pc + " in " + busted); - -float fDist = 200.0; - object oNearestC; // Define nearest creature - // Begin loop to find all creatures within the fDist meter radius - oNearestC = GetFirstObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); - while(GetIsObjectValid(oNearestC)) - { - - - - // This makes sure the Caster is not Timestopped and skips any PC's/NPC's associates - if (oNearestC != OBJECT_SELF) { - AssignCommand(oNearestC, ClearAllActions()); - DelayCommand(0.01, SetCommandable( FALSE, oNearestC )); - DelayCommand(dur, SetCommandable( FALSE, oNearestC )); - - } - // Get the next creature in the fDist meter radius and continue loop - oNearestC = GetNextObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE); - } - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetSpellTargetLocation()); -} diff --git a/_removed files/nw_s0_vamptch.nss b/_removed files/nw_s0_vamptch.nss deleted file mode 100644 index d81a1e42..00000000 --- a/_removed files/nw_s0_vamptch.nss +++ /dev/null @@ -1,125 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Vampiric Touch -//:: NW_S0_VampTch -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - drain 1d6 - HP per 2 caster levels from the target. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Oct 29, 2001 -//::////////////////////////////////////////////// - -/* -bugfix by Kovi 2002.07.22 -- did double damage with maximize -- temporary hp was stacked -2002.08.25 -- got temporary hp some immune creatures (Negative Energy Protection), lost -temporary hp against other resistant (SR, Shadow Shield) - -Georg 2003-09-11 -- Put in melee touch attack check, as the fixed attack bonus is now calculated correctly - -*/ - -#include "x0_I0_SPELLS" - - -#include "x2_inc_spellhook" - -void main() -{ - - //-------------------------------------------------------------------------- - /* Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - */ - //-------------------------------------------------------------------------- - - if (!X2PreSpellCastCode()) - { - return; - } - //-------------------------------------------------------------------------- - // End of Spell Cast Hook - //-------------------------------------------------------------------------- - - - object oTarget = GetSpellTargetObject(); - int nMetaMagic = GetMetaMagicFeat(); - - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDDice = nCasterLevel /2; - if ((nDDice) == 0) - { - nDDice = 1; - } - //-------------------------------------------------------------------------- - // GZ: Cap according to the book - //-------------------------------------------------------------------------- - else if (nDDice>20) - { - nDDice = 20; - } - - int nDamage = d6(nDDice); - - //-------------------------------------------------------------------------- - //Enter Metamagic conditions - //-------------------------------------------------------------------------- - - nDamage = MaximizeOrEmpower(6,nDDice,nMetaMagic); - int nDuration = nCasterLevel/2; - - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration *= 2; - } - - //-------------------------------------------------------------------------- - //Limit damage to max hp + 10 - //-------------------------------------------------------------------------- - int nMax = GetCurrentHitPoints(oTarget) + 20; - if(nMax < nDamage) - { - nDamage = nMax; - } - - effect eHeal = EffectTemporaryHitpoints(nDamage); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eLink = EffectLinkEffects(eHeal, eDur); - - effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); - effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M); - if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) - { - if(!GetIsReactionTypeFriendly(oTarget) && - GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD && - GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT && - !GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget)) - { - - - SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, FALSE)); - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, TRUE)); - // GZ: * GetSpellCastItem() == OBJECT_INVALID is used to prevent feedback from showing up when used as OnHitCastSpell property - if (TouchAttackMelee(oTarget,GetSpellCastItem() == OBJECT_INVALID)>0) - { - if(MyResistSpell(OBJECT_SELF, oTarget) == 0) - { - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, OBJECT_SELF); - RemoveTempHitPoints(); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, HoursToSeconds(nDuration)); - } - } - } - } -} diff --git a/_removed files/nw_s0_wallfirea.nss b/_removed files/nw_s0_wallfirea.nss deleted file mode 100644 index 03b09932..00000000 --- a/_removed files/nw_s0_wallfirea.nss +++ /dev/null @@ -1,60 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Wall of Fire: On Enter -//:: NW_S0_WallFireA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Person within the AoE take 4d6 fire damage - per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - effect eDam; - object oTarget; - - //Declare and assign personal impact visual effect. - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - //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, SPELL_WALL_OF_FIRE)); - //Make SR check, and appropriate saving throw(s). - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) - { - //Roll damage. - nDamage = d6(4) + 16; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 40;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - if(nDamage > 0) - { - // Apply effects to the currently selected target. - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - } - } - } -} diff --git a/_removed files/nw_s0_wallfirec.nss b/_removed files/nw_s0_wallfirec.nss deleted file mode 100644 index fcf7c778..00000000 --- a/_removed files/nw_s0_wallfirec.nss +++ /dev/null @@ -1,78 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Wall of Fire: Heartbeat -//:: NW_S0_WallFireA.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Person within the AoE take 4d6 fire damage - per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 17, 2001 -//::////////////////////////////////////////////// - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - effect eDam; - object oTarget; - - //Declare and assign personal impact visual effect. - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - //Capture the first target object in the shape. - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. Its better to remove the barrier then - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - //Declare the spell shape, size and the location. - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE)); - //Make SR check, and appropriate saving throw(s). - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) - { - //Roll damage. - nDamage = d6(4) + 16; - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 40;//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); //Damage/Healing is +50% - } - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); - if(nDamage > 0) - { - // Apply effects to the currently selected target. - eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, 1.0); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/nwnx_admin_t.nss b/_removed files/nwnx_admin_t.nss deleted file mode 100644 index 113ce5ef..00000000 --- a/_removed files/nwnx_admin_t.nss +++ /dev/null @@ -1,26 +0,0 @@ -#include "nwnx_admin" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Administration unit test begin.."); - - string sString = "FuzzyKittens"; - - NWNX_Administration_SetPlayerPassword(sString); - NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayerPassword", NWNX_Administration_GetPlayerPassword() == sString); - - NWNX_Administration_ClearPlayerPassword(); - NWNX_Tests_Report("NWNX_Administration", "ClearPlayerPassword", NWNX_Administration_GetPlayerPassword() == ""); - - NWNX_Administration_SetDMPassword(sString); - NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DMPassword", NWNX_Administration_GetDMPassword() == sString); - - NWNX_Administration_SetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS, TRUE); - NWNX_Tests_Report("NWNX_Administration", "{Set/Get}PlayOption", NWNX_Administration_GetPlayOption(NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS)); - - NWNX_Administration_SetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED, TRUE); - NWNX_Tests_Report("NWNX_Administration", "{Set/Get}DebugValue", NWNX_Administration_GetDebugValue(NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED)); - - WriteTimestampedLogEntry("NWNX_Administration unit test end."); -} diff --git a/_removed files/nwnx_area_t.nss b/_removed files/nwnx_area_t.nss deleted file mode 100644 index 0cef05af..00000000 --- a/_removed files/nwnx_area_t.nss +++ /dev/null @@ -1,73 +0,0 @@ -#include "nwnx_area" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Area unit test begin.."); - - object oArea = GetAreaFromLocation(GetStartingLocation()); - - if (GetIsObjectValid(oArea)) - { - WriteTimestampedLogEntry("Using starting area: " + GetName(oArea)); - - object oPC = GetFirstPC(); - - if (GetIsObjectValid(oPC) && GetArea(oPC) == oArea) - { - NWNX_Tests_Report("NWNX_Area", "GetNumberOfPlayersInArea", NWNX_Area_GetNumberOfPlayersInArea(oArea) == 1); - } - else - { - WriteTimestampedLogEntry("No player in area, skipping 'GetNumberOfPlayersInArea' test"); - } - - NWNX_Area_SetPVPSetting(oArea, NWNX_AREA_PVP_SETTING_PARTY_PVP); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}PVPSetting", NWNX_Area_GetPVPSetting(oArea) == NWNX_AREA_PVP_SETTING_PARTY_PVP); - - NWNX_Area_SetAreaSpotModifier(oArea, 25); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaSpotModifier", NWNX_Area_GetAreaSpotModifier(oArea) == 25); - - NWNX_Area_SetAreaListenModifier(oArea, 25); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}AreaListenModifier", NWNX_Area_GetAreaListenModifier(oArea) == 25); - - NWNX_Area_SetNoRestingAllowed(oArea, TRUE); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}NoRestingAllowed", NWNX_Area_GetNoRestingAllowed(oArea)); - - NWNX_Area_SetWindPower(oArea, 2); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}WindPower", NWNX_Area_GetWindPower(oArea) == 2); - - NWNX_Area_SetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING, 50); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}WeatherChance", NWNX_Area_GetWeatherChance(oArea, NWNX_AREA_WEATHER_CHANCE_LIGHTNING) == 50); - - NWNX_Area_SetFogClipDistance(oArea, 12.5f); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}FogClipDistance", NWNX_Area_GetFogClipDistance(oArea) == 12.5f); - - NWNX_Area_SetShadowOpacity(oArea, 75); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}ShadowOpacity", NWNX_Area_GetShadowOpacity(oArea) == 75); - - NWNX_Area_SetDayNightCycle(oArea, NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}DayNightCycle", NWNX_Area_GetDayNightCycle(oArea) == NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK); - - NWNX_Area_SetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE, FOG_COLOR_GREEN); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}SunMoonColors", NWNX_Area_GetSunMoonColors(oArea, NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE) == FOG_COLOR_GREEN); - - vector vLoc = GetPositionFromLocation(GetStartingLocation()); - object oWP = CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", GetStartingLocation()); - object oAT = NWNX_Area_CreateTransition(oArea, oWP, vLoc.x, vLoc.y, vLoc.z); - NWNX_Tests_Report("NWNX_Area", "CreateTransition", oAT != OBJECT_INVALID); - - string sResult = NWNX_Area_GetTileModelResRef(oArea, vLoc.x, vLoc.y); - NWNX_Tests_Report("NWNX_Area", "GetTileModelResRef", sResult != ""); - - NWNX_Area_SetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1, FALSE); - NWNX_Tests_Report("NWNX_Area", "{Set/Get}TileAnimationLoop", NWNX_Area_GetTileAnimationLoop(oArea, vLoc.x, vLoc.y, 1) == FALSE); - } - else - { - WriteTimestampedLogEntry("No valid area found, aborting."); - } - - - WriteTimestampedLogEntry("NWNX_Area unit test end."); -} diff --git a/_removed files/nwnx_chat_t.nss b/_removed files/nwnx_chat_t.nss deleted file mode 100644 index 03c35cea..00000000 --- a/_removed files/nwnx_chat_t.nss +++ /dev/null @@ -1,20 +0,0 @@ -#include "nwnx_chat" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Chat unit test begin.."); - - float fDefaultTalk = NWNX_Chat_GetChatHearingDistance(); - NWNX_Chat_SetChatHearingDistance(fDefaultTalk + 10.0f); - - NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Default", fDefaultTalk == NWNX_Chat_GetChatHearingDistance() - 10.0f); - - object oPC = GetFirstPC(); - float fPCWhisper = NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); - NWNX_Chat_SetChatHearingDistance(fPCWhisper + 2.0f, oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER); - - NWNX_Tests_Report("NWNX_Chat", "SetChatHearingDistance Per PC", fPCWhisper == NWNX_Chat_GetChatHearingDistance(oPC, NWNX_CHAT_CHANNEL_PLAYER_WHISPER) - 2.0f); - - WriteTimestampedLogEntry("NWNX_Chat unit test end."); -} diff --git a/_removed files/nwnx_creature_t.nss b/_removed files/nwnx_creature_t.nss deleted file mode 100644 index ee192a66..00000000 --- a/_removed files/nwnx_creature_t.nss +++ /dev/null @@ -1,256 +0,0 @@ -#include "nwnx_creature" -#include "nwnx_tests" - -const int FEAT_BARBARIAN_RAGE_2 = 326; - -void main() -{ - WriteTimestampedLogEntry("NWNX_Creature unit test begin.."); - - object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - if (!GetIsObjectValid(oCreature)) - { - WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); - return; - } - - - // - // FEAT related functions - // - - int nFeatCountLvl1 = NWNX_Creature_GetFeatCountByLevel(oCreature, 1); - int nFeatCountTotal = NWNX_Creature_GetFeatCount(oCreature); - - NWNX_Tests_Report("NWNX_Creature", "GetKnowsFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); - - NWNX_Creature_AddFeat(oCreature, FEAT_PLAYER_TOOL_01); - NWNX_Tests_Report("NWNX_Creature", "AddFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); - - NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) == nFeatCountLvl1); - NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); - - NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); - - NWNX_Creature_RemoveFeat(oCreature, FEAT_PLAYER_TOOL_01); - NWNX_Tests_Report("NWNX_Creature", "RemoveFeat", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 0); - NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == nFeatCountTotal); - NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == -1); - - NWNX_Creature_AddFeatByLevel(oCreature, FEAT_PLAYER_TOOL_01, 1); - NWNX_Tests_Report("NWNX_Creature", "AddFeatByLevel", NWNX_Creature_GetKnowsFeat(oCreature, FEAT_PLAYER_TOOL_01) == 1); - NWNX_Tests_Report("NWNX_Creature", "GetFeatCountByLevel", NWNX_Creature_GetFeatCountByLevel(oCreature, 1) > nFeatCountLvl1); - NWNX_Tests_Report("NWNX_Creature", "GetFeatCount", NWNX_Creature_GetFeatCount(oCreature) == (nFeatCountTotal+1)); - NWNX_Tests_Report("NWNX_Creature", "GetFeatByIndex", NWNX_Creature_GetFeatByIndex(oCreature, nFeatCountTotal) == FEAT_PLAYER_TOOL_01); - - NWNX_Tests_Report("NWNX_Creature", "GetFeatByLevel", NWNX_Creature_GetFeatByLevel(oCreature, 1, nFeatCountLvl1) == FEAT_PLAYER_TOOL_01); - NWNX_Tests_Report("NWNX_Creature", "GetFeatGrantLevel", NWNX_Creature_GetFeatGrantLevel(oCreature, FEAT_PLAYER_TOOL_01) == 1); - - NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE); - NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE); - NWNX_Creature_AddFeat(oCreature, FEAT_BARBARIAN_RAGE_2); - NWNX_Tests_Report("NWNX_Creature", "GetHighestLevelOfFeat", NWNX_Creature_GetHighestLevelOfFeat(oCreature, FEAT_BARBARIAN_RAGE) == FEAT_BARBARIAN_RAGE_2); - - NWNX_Creature_AddFeat(oCreature, FEAT_STUNNING_FIST); - NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 1); - NWNX_Creature_SetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST, 0); - NWNX_Tests_Report("NWNX_Creature", "GetFeatRemainingUses", NWNX_Creature_GetFeatRemainingUses(oCreature, FEAT_STUNNING_FIST) == 0); - - int uses = NWNX_Creature_GetFeatTotalUses(oCreature, FEAT_STUNNING_FIST); - WriteTimestampedLogEntry("Creature has " + IntToString(uses) + " total uses of STUNNING FIST left"); - - // - // SPECIAL ABILITY functions - // - struct NWNX_Creature_SpecialAbility ability; - ability.id = 1; ability.ready = 1; ability.level = 1; - - int nAbilityCount = NWNX_Creature_GetSpecialAbilityCount(oCreature); - NWNX_Creature_AddSpecialAbility(oCreature, ability); - NWNX_Tests_Report("NWNX_Creature", "AddSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) > nAbilityCount); - - ability = NWNX_Creature_GetSpecialAbility(oCreature, nAbilityCount); - NWNX_Tests_Report("NWNX_Creature", "GetSpecialAbility", ability.id == 1); - - NWNX_Creature_RemoveSpecialAbility(oCreature, nAbilityCount); - NWNX_Tests_Report("NWNX_Creature", "RemoveSpecialAbility", NWNX_Creature_GetSpecialAbilityCount(oCreature) == nAbilityCount); - - // - // SPELL functions - // - // TODO: Need a wizard. - - // - // MISC - // - - int nBaseAC = NWNX_Creature_GetBaseAC(oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetBaseAC", nBaseAC >= 0); - - NWNX_Creature_SetBaseAC(oCreature, nBaseAC + 5); - NWNX_Tests_Report("NWNX_Creature", "SetBaseAC", NWNX_Creature_GetBaseAC(oCreature) > nBaseAC); - - - int nOldStr = GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE); - NWNX_Creature_SetRawAbilityScore(oCreature, ABILITY_STRENGTH, 25); - NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", nOldStr != GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); - NWNX_Tests_Report("NWNX_Creature", "SetAbilityScore", 25 == GetAbilityScore(oCreature, ABILITY_STRENGTH, TRUE)); - - ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPolymorph(POLYMORPH_TYPE_BADGER), oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetPrePolymorphAbilityScore", 25 == NWNX_Creature_GetPrePolymorphAbilityScore(oCreature, ABILITY_STRENGTH)); - RemoveEffect(oCreature, GetFirstEffect(oCreature)); - - NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.0 == NWNX_Creature_GetMovementRateFactor(oCreature)); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectMovementSpeedIncrease(25), oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetMovementRateFactor", 1.25 == NWNX_Creature_GetMovementRateFactor(oCreature)); - NWNX_Creature_SetMovementRateFactor(oCreature, 1.5); - NWNX_Tests_Report("NWNX_Creature", "SetMovementRateFactor", 1.5 == NWNX_Creature_GetMovementRateFactor(oCreature)); - - int nLvl1HP = NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1); - NWNX_Tests_Report("NWNX_Creature", "GetMaxHitPointsByLevel", nLvl1HP >= 0); - - NWNX_Creature_SetMaxHitPointsByLevel(oCreature, 1, nLvl1HP + 5); - NWNX_Tests_Report("NWNX_Creature", "SetMaxHitPointsByLevel", NWNX_Creature_GetMaxHitPointsByLevel(oCreature, 1) > nLvl1HP); - - - int nSkillRanks = GetSkillRank(SKILL_LISTEN, oCreature, TRUE); - NWNX_Creature_SetSkillRank(oCreature, SKILL_LISTEN, nSkillRanks + 5); - NWNX_Tests_Report("NWNX_Creature", "SetSkillRank", GetSkillRank(SKILL_LISTEN, oCreature, TRUE) > nSkillRanks); - - int nBAB = GetBaseAttackBonus(oCreature); - NWNX_Creature_SetBaseAttackBonus(oCreature, 6); - NWNX_Tests_Report("NWNX_Creature", "SetBaseAttackBonus", GetBaseAttackBonus(oCreature) == 6); - SetBaseAttackBonus(4, oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); - NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 4); - RestoreBaseAttackBonus(oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - base", NWNX_Creature_GetAttacksPerRound(oCreature, TRUE) == 2); - NWNX_Tests_Report("NWNX_Creature", "GetAttacksPerRound - override", NWNX_Creature_GetAttacksPerRound(oCreature, FALSE) == 2); - - int nGender = GetGender(oCreature); - NWNX_Creature_SetGender(oCreature, !nGender); - NWNX_Tests_Report("NWNX_Creature", "SetGender", GetGender(oCreature) != nGender); - - int nSize = GetCreatureSize(oCreature); - NWNX_Creature_SetSize(oCreature, nSize + 1); - NWNX_Tests_Report("NWNX_Creature", "SetSize", GetCreatureSize(oCreature) != nSize); - - int nSkillPointsRemaining = NWNX_Creature_GetSkillPointsRemaining(oCreature); - NWNX_Tests_Report("NWNX_Creature", "GetSkillPointsRemaining", nSkillPointsRemaining >= 0); - NWNX_Creature_SetSkillPointsRemaining(oCreature, nSkillPointsRemaining+1); - NWNX_Tests_Report("NWNX_Creature", "SetSkillPointsRemaining", NWNX_Creature_GetSkillPointsRemaining(oCreature) == nSkillPointsRemaining+1); - - int nGold = GetGold(oCreature); - NWNX_Creature_SetGold(oCreature, nGold + 100); - NWNX_Tests_Report("NWNX_Creature", "SetGold", GetGold(oCreature) == (nGold+100)); - - int nSave = NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL); - NWNX_Creature_SetBaseSavingThrow(oCreature, SAVING_THROW_WILL, nSave + 10); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etBaseSavingThrow", NWNX_Creature_GetBaseSavingThrow(oCreature, SAVING_THROW_WILL) == nSave+10); - - - int cls = NWNX_Creature_GetClassByLevel(oCreature, 1); - NWNX_Creature_LevelUp(oCreature, cls, 10); - NWNX_Tests_Report("NWNX_Creature", "LevelUp", GetLevelByPosition(1, oCreature) == 11); - NWNX_Creature_LevelDown(oCreature, 10); - NWNX_Tests_Report("NWNX_Creature", "LevelDown", GetLevelByPosition(1, oCreature) == 1); - NWNX_Creature_SetClassByPosition(oCreature, 0, CLASS_TYPE_ROGUE); - NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); - NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); - NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); - NWNX_Creature_LevelUp(oCreature, CLASS_TYPE_ROGUE, 20); - NWNX_Tests_Report("NWNX_Creature", "LevelUp+SetLevelByPosition", GetLevelByPosition(1, oCreature) == 60); - - NWNX_Creature_SetLevelByPosition(oCreature, 0, 1); // Ugh, game uses 1-based indexing here.. - NWNX_Tests_Report("NWNX_Creature", "SetLevelByPosition", GetLevelByPosition(1, oCreature) == 1); - - float fCR = GetChallengeRating(oCreature); - NWNX_Creature_SetChallengeRating(oCreature, fCR + 1.0); - NWNX_Tests_Report("NWNX_Creature", "SetChallengeRating", GetChallengeRating(oCreature) == (fCR + 1.0)); - - int iOldBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); - effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH,1); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStr, oCreature, 2.0f); - int iNewBonus = NWNX_Creature_GetTotalEffectBonus(oCreature, NWNX_CREATURE_BONUS_TYPE_ABILITY, OBJECT_INVALID, 0, 0, -1, -1, -1, ABILITY_STRENGTH); - NWNX_Tests_Report("NWNX_Creature", "GetTotalEffectBonus", iOldBonus+1 == iNewBonus); - - int iSR = GetSpellResistance(oCreature); - NWNX_Creature_SetSpellResistance(oCreature, iSR + 10); - NWNX_Tests_Report("NWNX_Creature", "SetSpellResistance", GetSpellResistance(oCreature) == (iSR + 10)); - - NWNX_Creature_SetAnimalCompanionCreatureType(oCreature, ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); - NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionCreatureType", GetAnimalCompanionCreatureType(oCreature) == ANIMAL_COMPANION_CREATURE_TYPE_PANTHER); - - NWNX_Creature_SetFamiliarCreatureType(oCreature, FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); - NWNX_Tests_Report("NWNX_Creature", "SetFamiliarCreatureType", GetFamiliarCreatureType(oCreature) == FAMILIAR_CREATURE_TYPE_PSEUDO_DRAGON); - - NWNX_Creature_SetAnimalCompanionName(oCreature, "Fuzzles"); - NWNX_Tests_Report("NWNX_Creature", "SetAnimalCompanionName", GetAnimalCompanionName(oCreature) == "Fuzzles"); - - NWNX_Creature_SetFamiliarName(oCreature, "Fuzzles"); - NWNX_Tests_Report("NWNX_Creature", "SetFamiliarName", GetFamiliarName(oCreature) == "Fuzzles"); - - int bDisarmable = NWNX_Creature_GetDisarmable(oCreature); - NWNX_Creature_SetDisarmable(oCreature, !bDisarmable); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etDisarmable", NWNX_Creature_GetDisarmable(oCreature) != bDisarmable); - - //Spawn a Wizard - oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_ELFMAGE001", GetStartingLocation()); - if (!GetIsObjectValid(oCreature)) - { - WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); - return; - } - - //Test specialization functions on a class that has specialization - int nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD); - NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_WIZARD, (nSchool+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_WIZARD) == (nSchool+1)%5); - - //Test old functions for compatibility (deprecated) - nSchool = NWNX_Creature_GetWizardSpecialization(oCreature); - NWNX_Creature_SetWizardSpecialization(oCreature, (nSchool+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etWizardSpecialization", NWNX_Creature_GetWizardSpecialization(oCreature) == (nSchool+1)%5); - - //Test domain functions on a class that doesn't have domains - int nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1); - NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == 0); - NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 1, (nDomain+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 1) == (nDomain+1)%5); - int nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2); - NWNX_Tests_Report("NWNX_Creature", "GetDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == 0); - NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_WIZARD, 2, (nDomain2+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_WIZARD, 2) == (nDomain2+1)%5); - - //Spawn a cleric - oCreature = CreateObject(OBJECT_TYPE_CREATURE, "NW_BANDIT004", GetStartingLocation()); - if (!GetIsObjectValid(oCreature)) - { - WriteTimestampedLogEntry("NWNX_Creature test: Failed to create creature"); - return; - } - - //Test specialization functions on a class that doesn't have specialization - nSchool = NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC); - NWNX_Tests_Report("NWNX_Creature", "GetSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == 0); - NWNX_Creature_SetSpecialization(oCreature, CLASS_TYPE_CLERIC, (nSchool+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etSpecialization", NWNX_Creature_GetSpecialization(oCreature, CLASS_TYPE_CLERIC) == (nSchool+1)%5); - - //Test domain functions on a class that has domains - nDomain = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1); - NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 1, (nDomain+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 1) == (nDomain+1)%5); - nDomain2 = NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2); - NWNX_Creature_SetDomain(oCreature, CLASS_TYPE_CLERIC, 2, (nDomain2+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etDomain", NWNX_Creature_GetDomain(oCreature, CLASS_TYPE_CLERIC, 2) == (nDomain2+1)%5); - - //Test old functions for compatibility (deprecated) - nDomain = NWNX_Creature_GetClericDomain(oCreature, 1); - NWNX_Creature_SetClericDomain(oCreature, 1, (nDomain+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 1) == (nDomain+1)%5); - nDomain2 = NWNX_Creature_GetClericDomain(oCreature, 2); - NWNX_Creature_SetClericDomain(oCreature, 2, (nDomain2+1)%5); - NWNX_Tests_Report("NWNX_Creature", "{S,G}etClericDomain", NWNX_Creature_GetClericDomain(oCreature, 2) == (nDomain2+1)%5); - - WriteTimestampedLogEntry("NWNX_Creature unit test end."); -} diff --git a/_removed files/nwnx_dialog_t.nss b/_removed files/nwnx_dialog_t.nss deleted file mode 100644 index ff74404f..00000000 --- a/_removed files/nwnx_dialog_t.nss +++ /dev/null @@ -1,37 +0,0 @@ -#include "nwnx_dialog" - -void _report() -{ - string sMessage = "NWNX_Dialog debug:"; - int id = NWNX_Dialog_GetCurrentNodeID(); - sMessage = "\nNode ID = " + IntToString(id); - - int type = NWNX_Dialog_GetCurrentNodeType(); - sMessage += "\nCurrent node type = " + IntToString(type) + " ("; - switch (type) - { - case NWNX_DIALOG_NODE_TYPE_INVALID: sMessage += "INVALID)"; break; - case NWNX_DIALOG_NODE_TYPE_STARTING_NODE: sMessage += "STARTING_NODE)"; break; - case NWNX_DIALOG_NODE_TYPE_ENTRY_NODE: sMessage += "ENTRY_NODE)"; break; - case NWNX_DIALOG_NODE_TYPE_REPLY_NODE: sMessage += "REPLY_NODE)"; break; - } - - int scripttype = NWNX_Dialog_GetCurrentScriptType(); - sMessage += "\nScript type = " + IntToString(scripttype) + " ("; - switch (scripttype) - { - case NWNX_DIALOG_SCRIPT_TYPE_OTHER: sMessage += "OTHER)"; break; - case NWNX_DIALOG_SCRIPT_TYPE_STARTING_CONDITIONAL: sMessage += "STARTING_CONDITIONAL)"; break; - case NWNX_DIALOG_SCRIPT_TYPE_ACTION_TAKEN: sMessage += "ACTION_TAKEN)"; break; - } - - int index = NWNX_Dialog_GetCurrentNodeIndex(); - sMessage += "\nNode index = " + IntToString(index); - - string text = NWNX_Dialog_GetCurrentNodeText(); - sMessage += "\nText = '" + text + "'"; - - NWNX_Dialog_SetCurrentNodeText(text + " [ADDED]"); - - SendMessageToPC(GetFirstPC(), sMessage); -} diff --git a/_removed files/nwnx_dialog_t1.nss b/_removed files/nwnx_dialog_t1.nss deleted file mode 100644 index 11f93fd7..00000000 --- a/_removed files/nwnx_dialog_t1.nss +++ /dev/null @@ -1,7 +0,0 @@ -#include "nwnx_dialog_t" - -int StartingConditional() -{ - _report(); - return FALSE; -} diff --git a/_removed files/nwnx_dialog_t2.nss b/_removed files/nwnx_dialog_t2.nss deleted file mode 100644 index 7249a40f..00000000 --- a/_removed files/nwnx_dialog_t2.nss +++ /dev/null @@ -1,7 +0,0 @@ -#include "nwnx_dialog_t" - -int StartingConditional() -{ - _report(); - return TRUE; -} diff --git a/_removed files/nwnx_dialog_t3.nss b/_removed files/nwnx_dialog_t3.nss deleted file mode 100644 index fb2a52e8..00000000 --- a/_removed files/nwnx_dialog_t3.nss +++ /dev/null @@ -1,6 +0,0 @@ -#include "nwnx_dialog_t" - -void main() -{ - _report(); -} diff --git a/_removed files/nwnx_effect_t.nss b/_removed files/nwnx_effect_t.nss deleted file mode 100644 index 52431842..00000000 --- a/_removed files/nwnx_effect_t.nss +++ /dev/null @@ -1,80 +0,0 @@ -#include "nwnx_effect" -#include "nwnx_tests" - -void printeff(struct NWNX_EffectUnpacked n) -{ - string s = "Unpacked effect: \n"; - s += "nType = " + IntToString(n.nType) + "\n"; - s += "nSubType = " + IntToString(n.nSubType) + "\n"; - - s += "fDuration = " + FloatToString(n.fDuration) + "\n"; - s += "nExpiryCalendarDay = " + IntToString(n.nExpiryCalendarDay) + "\n"; - s += "nExpiryTimeOfDay = " + IntToString(n.nExpiryTimeOfDay) + "\n"; - - s += "oCreator = " + ObjectToString(n.oCreator) + "\n"; - s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; - s += "bExpose = " + IntToString(n.bExpose) + "\n"; - s += "bShowIcon = " + IntToString(n.bShowIcon) + "\n"; - s += "nCasterLevel = " + IntToString(n.nCasterLevel) + "\n"; - - s += "bLinkLeftValid = " + IntToString(n.bLinkLeftValid) + "\n"; - struct NWNX_EffectUnpacked link = NWNX_Effect_UnpackEffect(n.eLinkLeft); - s += "bLinkLeft (nType) = " + IntToString(link.nType) + "\n"; - s += "bLinkRightValid = " + IntToString(n.bLinkRightValid) + "\n"; - link = NWNX_Effect_UnpackEffect(n.eLinkRight); - s += "bLinkRight (nType) = " + IntToString(link.nType) + "\n"; - - s += "nNumIntegers = " + IntToString(n.nNumIntegers) + "\n"; - s += "nParam0 = " + IntToString(n.nParam0) + "\n"; - s += "nParam1 = " + IntToString(n.nParam1) + "\n"; - s += "nParam2 = " + IntToString(n.nParam2) + "\n"; - s += "nParam3 = " + IntToString(n.nParam3) + "\n"; - s += "nParam4 = " + IntToString(n.nParam4) + "\n"; - s += "nParam5 = " + IntToString(n.nParam5) + "\n"; - s += "nParam6 = " + IntToString(n.nParam6) + "\n"; - s += "nParam7 = " + IntToString(n.nParam7) + "\n"; - s += "fParam0 = " + FloatToString(n.fParam0) + "\n"; - s += "fParam1 = " + FloatToString(n.fParam1) + "\n"; - s += "fParam2 = " + FloatToString(n.fParam2) + "\n"; - s += "fParam3 = " + FloatToString(n.fParam3) + "\n"; - s += "sParam0 = " + "'" + n.sParam0 + "'" + "\n"; - s += "sParam1 = " + "'" + n.sParam1 + "'" + "\n"; - s += "sParam2 = " + "'" + n.sParam2 + "'" + "\n"; - s += "sParam3 = " + "'" + n.sParam3 + "'" + "\n"; - s += "sParam4 = " + "'" + n.sParam4 + "'" + "\n"; - s += "sParam5 = " + "'" + n.sParam5 + "'" + "\n"; - s += "oParam0 = " + ObjectToString(n.oParam0) + "\n"; - s += "oParam1 = " + ObjectToString(n.oParam1) + "\n"; - s += "oParam2 = " + ObjectToString(n.oParam2) + "\n"; - s += "oParam3 = " + ObjectToString(n.oParam3) + "\n"; - - s += "sTag = " + "'" + n.sTag + "'" + "\n"; - - WriteTimestampedLogEntry(s); -} - -void main() -{ - WriteTimestampedLogEntry("NWNX_Effect unit test begin.."); - - effect eCurse = EffectCurse(1, 2, 3, 4, 5, 6); - effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN); - effect e = EffectLinkEffects(eCurse, eVis); - e = TagEffect(e, "NWNX_EFFECT_TEST"); - - struct NWNX_EffectUnpacked unpacked = NWNX_Effect_UnpackEffect(e); - printeff(unpacked); - NWNX_Tests_Report("NWNX_Effect", "UnpackEffect", unpacked.sTag == "NWNX_EFFECT_TEST"); - - effect packed = NWNX_Effect_PackEffect(unpacked); - NWNX_Tests_Report("NWNX_Effect", "PackEffect", GetEffectTag(packed) == "NWNX_EFFECT_TEST"); - - object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, packed, oCreature); - - e = NWNX_Effect_SetEffectExpiredScript(EffectDarkness(), "effect_test"); - unpacked = NWNX_Effect_UnpackEffect(e); - NWNX_Tests_Report("NWNX_Effect", "SetEffectExpiredScript", unpacked.sParam4 == "effect_test"); - - WriteTimestampedLogEntry("NWNX_Effect unit test end."); -} diff --git a/_removed files/nwnx_feedback_t.nss b/_removed files/nwnx_feedback_t.nss deleted file mode 100644 index 7a3edabc..00000000 --- a/_removed files/nwnx_feedback_t.nss +++ /dev/null @@ -1,34 +0,0 @@ -#include "nwnx_feedback" -#include "nwnx_tests" - -const int NWNX_FEEDBACK_REST_BEGINNING_REST = 18; -const int NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE = 3; - -void main() -{ - WriteTimestampedLogEntry("NWNX_Feedback unit test begin.."); - - NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE); - NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Global)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST)); - - NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE); - NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Global)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE)); - - object oPC = GetFirstPC(); - - if( GetIsObjectValid(oPC) ) - { - NWNX_Feedback_SetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, TRUE, oPC); - NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}FeedbackMessageHidden (Personal)", NWNX_Feedback_GetFeedbackMessageHidden(NWNX_FEEDBACK_REST_BEGINNING_REST, oPC)); - - NWNX_Feedback_SetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, TRUE, oPC); - NWNX_Tests_Report("NWNX_Feedback", "{Set/Get}CombatMessageHidden (Personal)", NWNX_Feedback_GetCombatLogMessageHidden(NWNX_FEEDBACK_COMBATLOG_COMPLEX_DAMAGE, oPC)); - } - else - { - WriteTimestampedLogEntry("No valid PC found, skipping personal feedback state tests"); - } - - - WriteTimestampedLogEntry("NWNX_Feedback unit test end."); -} diff --git a/_removed files/nwnx_itemprop_t.nss b/_removed files/nwnx_itemprop_t.nss deleted file mode 100644 index f7886565..00000000 --- a/_removed files/nwnx_itemprop_t.nss +++ /dev/null @@ -1,42 +0,0 @@ -#include "nwnx_itemprop" -#include "nwnx_tests" - -void printip(struct NWNX_IPUnpacked n) -{ - string s = "Unpacked IP: \n"; - s += "nProperty = " + IntToString(n.nProperty) + "\n"; - s += "nSubType = " + IntToString(n.nSubType) + "\n"; - s += "nCostTable = " + IntToString(n.nCostTable) + "\n"; - s += "nCostTableValue = " + IntToString(n.nCostTableValue) + "\n"; - s += "nParam1 = " + IntToString(n.nParam1) + "\n"; - s += "nParam1Value = " + IntToString(n.nParam1Value) + "\n"; - s += "nUsesPerDay = " + IntToString(n.nUsesPerDay) + "\n"; - s += "nChanceToAppear = " + IntToString(n.nChanceToAppear) + "\n"; - s += "bUsable = " + IntToString(n.bUsable) + "\n"; - s += "nSpellId = " + IntToString(n.nSpellId) + "\n"; - s += "sTag = " + "'" + n.sTag + "'" + "\n"; - - WriteTimestampedLogEntry(s); -} - -void main() -{ - WriteTimestampedLogEntry("NWNX_ItemProperty unit test begin.."); - - itemproperty ip = ItemPropertyDamageBonusVsRace(1,2,3); - ip = TagItemProperty(ip, "NWNX_ItemProperty_TEST"); - - struct NWNX_IPUnpacked unpacked = NWNX_ItemProperty_UnpackIP(ip); - printip(unpacked); - NWNX_Tests_Report("NWNX_ItemProperty", "UnpackIP", unpacked.sTag == "NWNX_ItemProperty_TEST"); - - itemproperty ip2 = NWNX_ItemProperty_PackIP(unpacked); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetIsItemPropertyValid(ip2)); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyTag(ip2) == "NWNX_ItemProperty_TEST"); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTable(ip2) == unpacked.nCostTable); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyCostTableValue(ip2) == unpacked.nCostTableValue); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1(ip2) == unpacked.nParam1); - NWNX_Tests_Report("NWNX_ItemProperty", "PackIP", GetItemPropertyParam1Value(ip2) == unpacked.nParam1Value); - - WriteTimestampedLogEntry("NWNX_ItemProperty unit test end."); -} diff --git a/_removed files/nwnx_object_t.nss b/_removed files/nwnx_object_t.nss deleted file mode 100644 index 6bf99fda..00000000 --- a/_removed files/nwnx_object_t.nss +++ /dev/null @@ -1,121 +0,0 @@ -#include "nwnx_object" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Object unit test begin.."); - - object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - if (!GetIsObjectValid(o)) - { - WriteTimestampedLogEntry("NWNX_Object test: Failed to create creature"); - return; - } - - int nVarCount = NWNX_Object_GetLocalVariableCount(o); - SetLocalInt(o, "nwnx_object_test", 1); - NWNX_Tests_Report("NWNX_Object", "GetLocalVariableCount", NWNX_Object_GetLocalVariableCount(o) == (nVarCount+1)); - - struct NWNX_Object_LocalVariable lv = NWNX_Object_GetLocalVariable(o, nVarCount); - NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.key == "nwnx_object_test"); - NWNX_Tests_Report("NWNX_Object", "GetLocalVariable", lv.type == NWNX_OBJECT_LOCALVAR_TYPE_INT); - - string sObj = ObjectToString(o); - NWNX_Tests_Report("NWNX_Object", "StringToObject", NWNX_Object_StringToObject(sObj) == o); - NWNX_Tests_Report("NWNX_Object", "Negative: StringToObject", NWNX_Object_StringToObject("!@#!@#!@#!") == OBJECT_INVALID); - - vector vPos = GetPosition(o); - vPos.x += 1; - NWNX_Object_SetPosition(o, vPos); - NWNX_Tests_Report("NWNX_Object", "SetPosition", GetPosition(o).x == vPos.x); - - int nMaxHP = GetMaxHitPoints(o); - NWNX_Object_SetMaxHitPoints(o, nMaxHP + 1); - NWNX_Tests_Report("NWNX_Object", "SetMaxHitPoints", GetMaxHitPoints(o) == (nMaxHP + 1)); - - int nCurrHP = GetCurrentHitPoints(o); - NWNX_Object_SetCurrentHitPoints(o, nCurrHP + 1); - NWNX_Tests_Report("NWNX_Object", "SetCurrentHitPoints", GetCurrentHitPoints(o) == (nCurrHP + 1)); - - string dialog = "nwnxtest"; - NWNX_Object_SetDialogResref(o, dialog); - NWNX_Tests_Report("NWNX_Object", "SetDialogResRef/GetDialogResRef", NWNX_Object_GetDialogResref(o) == dialog); - - NWNX_Object_SetInt(o, "TestInt", 10, TRUE); - NWNX_Object_SetString(o, "TestString_1", "This is a string.", TRUE); - NWNX_Object_SetString(o, "TestString_2", "This is another string.", TRUE); - NWNX_Object_SetFloat(o, "TestFloat", 1.5f, TRUE); - NWNX_Tests_Report("NWNX_Object", "Set/GetInt", NWNX_Object_GetInt(o, "TestInt") == 10); - NWNX_Tests_Report("NWNX_Object", "Set/GetString #1", NWNX_Object_GetString(o, "TestString_1") == "This is a string."); - NWNX_Tests_Report("NWNX_Object", "Set/GetString #2", NWNX_Object_GetString(o, "TestString_2") == "This is another string."); - NWNX_Tests_Report("NWNX_Object", "Set/GetFloat", NWNX_Object_GetFloat(o, "TestFloat") == 1.5f); - - string sSerialized = NWNX_Object_Serialize(o); - NWNX_Tests_Report("NWNX_Object", "Serialize", sSerialized != ""); - WriteTimestampedLogEntry("Serialized chicken: " + sSerialized); - - object oDeserialized = NWNX_Object_Deserialize(sSerialized); - NWNX_Tests_Report("NWNX_Object", "Deserialize", GetIsObjectValid(oDeserialized)); - - NWNX_Object_DeleteInt(o, "TestInt"); - NWNX_Object_DeleteString(o, "TestString_1"); - NWNX_Object_DeleteString(o, "TestString_2"); - NWNX_Object_DeleteFloat(o, "TestFloat"); - NWNX_Tests_Report("NWNX_Object", "DeleteInt", NWNX_Object_GetInt(o, "TestInt") == 0); - NWNX_Tests_Report("NWNX_Object", "DeleteString #1", NWNX_Object_GetString(o, "TestString_1") == ""); - NWNX_Tests_Report("NWNX_Object", "DeleteString #2", NWNX_Object_GetString(o, "TestString_2") == ""); - NWNX_Tests_Report("NWNX_Object", "DeleteFloat", NWNX_Object_GetFloat(o, "TestFloat") == 0.0f); - - NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetInt", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); - NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #1", NWNX_Object_GetString(oDeserialized, "TestString_1") == "This is a string."); - NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetString #2", NWNX_Object_GetString(oDeserialized, "TestString_2") == "This is another string."); - NWNX_Tests_Report("NWNX_Object", "(Deserialized Object) GetFloat", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); - - NWNX_Object_DeleteVarRegex(oDeserialized, ".*TestString.*"); - - NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetInt(oDeserialized, "TestInt") == 10); - NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_1") == ""); - NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetString(oDeserialized, "TestString_2") == ""); - NWNX_Tests_Report("NWNX_Object", "DeleteVarRegex", NWNX_Object_GetFloat(oDeserialized, "TestFloat") == 1.5f); - - WriteTimestampedLogEntry("Deserialized " + GetName(oDeserialized) + " in " + GetName(GetArea(oDeserialized))); - - object bag = CreateObject(OBJECT_TYPE_ITEM, "nw_it_contain006", GetStartingLocation()); // Bag of holding - CreateItemOnObject("x2_it_adaplate", bag, 1); - CreateItemOnObject("x2_it_adaplate", bag, 1); - CreateItemOnObject("x2_it_adaplate", bag, 1); - int iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARROW); - NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 1); - iFits = NWNX_Object_CheckFit(bag, BASE_ITEM_ARMOR); - NWNX_Tests_Report("NWNX_Object", "CheckFit", iFits == 0); - object oItem = GetFirstItemInInventory(bag); - while (oItem != OBJECT_INVALID) - { - DestroyObject(oItem); - oItem = GetNextItemInInventory(bag); - } - DestroyObject(bag); - - NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 0); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50), o); - NWNX_Tests_Report("NWNX_Object", "GetDamageImmunity", NWNX_Object_GetDamageImmunity(o, DAMAGE_TYPE_FIRE) == 50); - - object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_defportal", GetStartingLocation()); - NWNX_Object_SetPlaceableIsStatic(oPlc, 1); - NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 1", NWNX_Object_GetPlaceableIsStatic(oPlc) == 1); - DestroyObject(oPlc); - - oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); - NWNX_Object_SetPlaceableIsStatic(oPlc, 0); - NWNX_Tests_Report("NWNX_Object", "SetPlaceableIsStatic 2", NWNX_Object_GetPlaceableIsStatic(oPlc) == 0); - DestroyObject(oPlc); - - oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_driftwd1", GetStartingLocation()); - NWNX_Object_SetAutoRemoveKey(oPlc, 1); - NWNX_Tests_Report("NWNX_Object", "SetAutoRemoveKey", NWNX_Object_GetAutoRemoveKey(oPlc) == 1); - DestroyObject(oPlc); - - DestroyObject(o); - DestroyObject(oDeserialized); - WriteTimestampedLogEntry("NWNX_Object unit test end."); -} diff --git a/_removed files/nwnx_player_t.nss b/_removed files/nwnx_player_t.nss deleted file mode 100644 index 574431cb..00000000 --- a/_removed files/nwnx_player_t.nss +++ /dev/null @@ -1,16 +0,0 @@ -#include "nwnx_player" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Player unit test begin.."); - - object oPC = GetFirstPC(); - if (!GetIsObjectValid(oPC)) - { - WriteTimestampedLogEntry("NWNX_Player test: No PC found"); - return; - } - - WriteTimestampedLogEntry("NWNX_Player unit test end."); -} diff --git a/_removed files/nwnx_race_t.nss b/_removed files/nwnx_race_t.nss deleted file mode 100644 index 48a15c79..00000000 --- a/_removed files/nwnx_race_t.nss +++ /dev/null @@ -1,33 +0,0 @@ -#include "nwnx_race" -#include "nwnx_tests" - -void main() -{ - WriteTimestampedLogEntry("NWNX_Race unit test begin.."); - - object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - int iSR = GetSpellResistance(oCreature); - int iSkillRank = GetSkillRank(SKILL_HEAL, oCreature); - int iAC = GetAC(oCreature); - int iImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); - DestroyObject(oCreature); - - NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SRCHARGEN, 10); - NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SKILL, SKILL_HEAL, 5); - NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_AC, 1); - NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_IMMUNITY, IMMUNITY_TYPE_CURSED); - - oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - int iNewSR = GetSpellResistance(oCreature); - int iNewSkillRank = GetSkillRank(SKILL_HEAL, oCreature); - int iNewAC = GetAC(oCreature); - int iNewImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED); - DestroyObject(oCreature); - - NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SR", iSR == iNewSR - 10); - NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SkillRank", iSkillRank == iNewSkillRank - 5); - NWNX_Tests_Report("NWNX_Race", "SetRacialModifier AC", iAC == iNewAC - 1); - NWNX_Tests_Report("NWNX_Race", "SetRacialModifier Immunity", iImmune != iNewImmune); - - WriteTimestampedLogEntry("NWNX_Race unit test end."); -} diff --git a/_removed files/nwnx_sql_t.nss b/_removed files/nwnx_sql_t.nss deleted file mode 100644 index ffbb7306..00000000 --- a/_removed files/nwnx_sql_t.nss +++ /dev/null @@ -1,249 +0,0 @@ -#include "nwnx_sql" -#include "nwnx_object" -#include "nwnx_tests" - -void cleanup() -{ - NWNX_Tests_Report("NWNX_SQL", "Cleanup sql_test", NWNX_SQL_ExecuteQuery("DROP TABLE sql_test")); - NWNX_Tests_Report("NWNX_SQL", "Cleanup stress_test", NWNX_SQL_ExecuteQuery("DROP TABLE stress_test")); - NWNX_Tests_Report("NWNX_SQL", "Cleanup error_test", NWNX_SQL_ExecuteQuery("DROP TABLE error_test")); -} - -void main() -{ - WriteTimestampedLogEntry("NWNX_SQL unit test begin.."); - - string db_type = GetStringUpperCase(NWNX_SQL_GetDatabaseType()); - WriteTimestampedLogEntry("Testing database " + db_type); - - string sCreate = ""; - string sInsert = ""; - - /* MySQL and SQLite version */ - if (db_type == "MYSQL" || db_type == "SQLITE") - { - sCreate = "CREATE TABLE sql_test (" + - "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + - "colObjId INT, colObj TEXT(1000000) );"; - - sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(?, ?, ?, ?, ?)"; - } - - /* PostgreSQL version */ - if (db_type == "POSTGRESQL") - { - sCreate = "CREATE TABLE sql_test (" + - "colInt INT, colFloat FLOAT, colStr VARCHAR(256)," + - "colObjId INT, colObj TEXT );"; - - // Even though we're using 0 based parameter numbers, PostgreSQL requires the parameter - // numbers in the actual SQL string to be 1 based (e.g. $1, $2... not $0, $1... ) - sInsert = "INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES($1, $2, $3, $4, $5)"; - } - - int b = NWNX_SQL_ExecuteQuery(sCreate); - NWNX_Tests_Report("NWNX_SQL", "Create Table", b); - - object o = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()); - if (!GetIsObjectValid(o)) - { - WriteTimestampedLogEntry("NWNX_SQL test: Failed to create creature"); - cleanup(); - return; - } - - vector v = Vector(5.0, 5.0, 0.0); // slightly different location. - - b = NWNX_SQL_PrepareQuery(sInsert); - NWNX_Tests_Report("NWNX_SQL", "Complex PrepareQuery", b); - NWNX_Tests_Report("NWNX_SQL", "GetPreparedQueryParamCount", NWNX_SQL_GetPreparedQueryParamCount() == 5); - - NWNX_SQL_PreparedInt(0, 42); - NWNX_SQL_PreparedFloat(1, 0.42); - NWNX_SQL_PreparedString(2, "FourtyTwooo"); - NWNX_SQL_PreparedObjectId(3, o); - NWNX_SQL_PreparedObjectFull(4, o); - - b = NWNX_SQL_ExecutePreparedQuery(); - NWNX_Tests_Report("NWNX_SQL", "Complex ExecutePreparedQuery", b); - - b = NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test;"); - NWNX_Tests_Report("NWNX_SQL", "Select ExecuteQuery", b); - - if (b) - { - while (NWNX_SQL_ReadyToReadNextRow()) - { - NWNX_SQL_ReadNextRow(); - int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); - NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 42); - float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); - NWNX_Tests_Report("NWNX_SQL", "ReadFloat", fabs(f - 0.42) < 0.01); - string s = NWNX_SQL_ReadDataInActiveRow(2); - NWNX_Tests_Report("NWNX_SQL", "ReadString", s == "FourtyTwooo"); - - string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 - object o2 = NWNX_Object_StringToObject(IntToHexString(StringToInt(sObjId))); - NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", o == o2); - - object o3 = NWNX_SQL_ReadFullObjectInActiveRow(4, GetArea(o), v.x, v.y, v.z); - NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", GetIsObjectValid(o3)); - // Alternatively: - // object o3 = NWNX_Object_Deserialize(NWNX_SQL_ReadDataInActiveRow(4)); - } - } - - - object oPlc = CreateObject(OBJECT_TYPE_PLACEABLE, "nw_plc_chestburd", GetStartingLocation()); - object oItem = CreateObject(OBJECT_TYPE_ITEM, "x0_it_mring013", GetStartingLocation()); - if (!GetIsObjectValid(oPlc) || !GetIsObjectValid(oItem)) - { - WriteTimestampedLogEntry("NWNX_SQL test: Failed to create objects.."); - } - else - { - object oTmp = GetFirstItemInInventory(oPlc); - while (GetIsObjectValid(oTmp)) - { - WriteTimestampedLogEntry("NWNX_SQL Destroying auto created object " + GetTag(oTmp)); - DestroyObject(oTmp); - oTmp = GetNextItemInInventory(oPlc); - } - - string test2 = ""; - if (db_type == "MYSQL" || db_type == "SQLITE") - { - test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,?)"; - } - if (db_type == "POSTGRESQL") - { - test2="INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(1337,0.0,'xxx',1337,$1)"; - } - - NWNX_SQL_PrepareQuery(test2); - - NWNX_SQL_PreparedObjectFull(0, oItem); - b = NWNX_SQL_ExecutePreparedQuery(); - NWNX_Tests_Report("NWNX_SQL", "Insert item full", b); - - b = NWNX_SQL_ExecuteQuery("SELECT colObj FROM sql_test WHERE colInt=1337"); - NWNX_Tests_Report("NWNX_SQL", "Select item", b); - - if (NWNX_SQL_ReadyToReadNextRow()) - { - NWNX_SQL_ReadNextRow(); - - object oItem2 = NWNX_SQL_ReadFullObjectInActiveRow(0, oPlc); - NWNX_Tests_Report("NWNX_SQL", "ReadFullObject Item", GetIsObjectValid(oItem2)); - NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory", oItem2 == GetFirstItemInInventory(oPlc)); - NWNX_Tests_Report("NWNX_SQL", "Deserialized to placeable's inventory - possessor", GetItemPossessor(oItem2) == oPlc); - - object oItem3 = NWNX_SQL_ReadFullObjectInActiveRow(0, GetArea(oPlc), v.x, v.y, v.z); - NWNX_Tests_Report("NWNX_SQL", "Deserialized to area", GetArea(oItem3) == GetArea(oPlc)); - - object oItem4 = NWNX_SQL_ReadFullObjectInActiveRow(0, o); - NWNX_Tests_Report("NWNX_SQL", "Deserialized to creature's inventory - possessor", GetItemPossessor(oItem4) == o); - } - else - { - WriteTimestampedLogEntry("NWNX_SQL not ready to read item"); - } - - } - - int STRESS_CNT = 10; - - WriteTimestampedLogEntry("NWNX_SQL stress test."); - NWNX_SQL_ExecuteQuery("create table stress_test ( i_key int, i_int int, s_text varchar(8))"); - int i; - // Brute force some inserts - for ( i=1 ; i<=STRESS_CNT ; i++ ) // Generate 1000 rows. - { - // Simulates the existing NWNX2 ODBC way of generating SQL. - NWNX_SQL_ExecuteQuery("insert into stress_test values ( " + IntToString(i) + ", " + IntToString(i*2) + ", '" + IntToString(i*100) + "')"); - } - NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); - int res = NWNX_SQL_GetAffectedRows(); - WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); - report ("Delete rows", res == STRESS_CNT); - - // now do some elegant inserts - string test3 = ""; - if (db_type == "MYSQL" || db_type == "SQLITE") - { - test3 = "insert into stress_test values ( ?, ?, ? )"; - } - if (db_type == "POSTGRESQL") - { - test3 = "insert into stress_test values ( $1, $2, $3 )"; - } - - NWNX_SQL_PrepareQuery(test3); - for ( i = 1 ; i <= STRESS_CNT ; i++ ) - { - NWNX_SQL_PreparedInt(0, i); - NWNX_SQL_PreparedInt(1, i*2); - NWNX_SQL_PreparedString(2, IntToString(i*100)); - b = NWNX_SQL_ExecutePreparedQuery(); - NWNX_Tests_Report("NWNX_SQL", "Elegant Looping ExecutePreparedQuery", b); - } - NWNX_SQL_ExecuteQuery("delete from stress_test where i_key > 0"); - res = NWNX_SQL_GetAffectedRows(); - WriteTimestampedLogEntry("Deleted " + IntToString(res) + " rows."); - NWNX_Tests_Report("Delete rows", res == STRESS_CNT); - - // Test some error output. - b = NWNX_SQL_ExecuteQuery("create table error_test (col varchar(10))"); - NWNX_Tests_Report("Test Table Create", b); - - b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcdefghij')"); - NWNX_Tests_Report("good insert", b); - - if (db_type != "SQLITE") - {// SQLite doesn't care about size constraints of columns - b = NWNX_SQL_ExecuteQuery("insert into error_test values('abcde000fghij')"); - report ("bad insert", !b); - if (!b) { - WriteTimestampedLogEntry("There should be an error a couple rows up."); - } - } - - string test4 = ""; - if (db_type == "MYSQL" || db_type == "SQLITE") - { - test3 = "insert into error_test values ( ? )"; - } - if (db_type == "POSTGRESQL") - { - test3 = "insert into error_test values ( $1 )"; - } - NWNX_SQL_PrepareQuery(test3); - NWNX_SQL_PreparedString(100, "lala"); // out of bounds, must not crash. - - NWNX_Tests_Report("NWNX_SQL", "Negative prepare query", NWNX_SQL_PrepareQuery("not a valid query!") == 0); - NWNX_Tests_Report("NWNX_SQL", "GetLastError", NWNX_SQL_GetLastError() != ""); - - // Test with null values - NWNX_SQL_ExecuteQuery("INSERT INTO sql_test(colInt, colFloat, colStr, colObjId, colObj) VALUES(5121, null, null, null, null)"); - NWNX_Tests_Report("NWNX_SQL", "Select null", NWNX_SQL_ExecuteQuery("SELECT * FROM sql_test WHERE colInt=5121")); - if (NWNX_SQL_ReadyToReadNextRow()) - { - NWNX_SQL_ReadNextRow(); - int n = StringToInt(NWNX_SQL_ReadDataInActiveRow(0)); - NWNX_Tests_Report("NWNX_SQL", "ReadInt", n == 5121); - float f = StringToFloat(NWNX_SQL_ReadDataInActiveRow(1)); - NWNX_Tests_Report("NWNX_SQL", "ReadFloat", f == 0.0); - string s = NWNX_SQL_ReadDataInActiveRow(2); - NWNX_Tests_Report("NWNX_SQL", "ReadString", s == ""); - - string sObjId = NWNX_SQL_ReadDataInActiveRow(3); // In base 10 - NWNX_Tests_Report("NWNX_SQL", "ReadObjectId", sObjId == ""); - - object obj = NWNX_SQL_ReadFullObjectInActiveRow(4); - NWNX_Tests_Report("NWNX_SQL", "ReadFullObject", obj == OBJECT_INVALID); - } - - cleanup(); - WriteTimestampedLogEntry("Testing database " + db_type + " complete."); - WriteTimestampedLogEntry("NWNX_SQL unit tests end."); -} diff --git a/_removed files/old_thunderclap.nss b/_removed files/old_thunderclap.nss deleted file mode 100644 index 188e42a2..00000000 --- a/_removed files/old_thunderclap.nss +++ /dev/null @@ -1,107 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Great Thunderclap -//:: X2_S0_GrtThdclp -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// You create a loud noise equivalent to a peal of -// thunder and its acommpanying shock wave. The -// spell has three effects. First, all creatures -// in the area must make Will saves to avoid being -// stunned for 1 round. Second, the creatures must -// make Fortitude saves or be deafened for 1 minute. -// Third, they must make Reflex saves or fall prone. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 20, 2002 -//:: Updated On: Oct 20, 2003 - some nice Vfx:) -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" - -#include "x2_inc_spellhook" - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Epic DC Bonus Added - int nDB; - int nAdjs; - nAdjs = GetCasterLevel(OBJECT_SELF) - 20; - if(GetCasterLevel(OBJECT_SELF)>=23) - { - nDB = nAdjs/3; - SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDB) + " DC"); - } - else if(GetCasterLevel(OBJECT_SELF) <=22) - { - nDB = 0; - } - - int nDamage = 0; - int nDC = GetSpellSaveDC(); - float fDelay; - effect eExplode = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); - effect eVis = EffectVisualEffect(VFX_IMP_SONIC); - effect eVis2 = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M); - effect eVis3 = EffectVisualEffect(VFX_IMP_STUN); - effect eDeaf = EffectDeaf(); - effect eKnock = EffectKnockdown(); - effect eStun = EffectStunned(); - effect eShake = EffectVisualEffect(356); - effect eDmg = EffectDamage(d8(3), DAMAGE_TYPE_SONIC, DAMAGE_POWER_ENERGY); - - location lTarget = GetSpellTargetLocation(); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eShake, OBJECT_SELF, 2.0f); - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); - while (GetIsObjectValid(oTarget)) - { - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - - //Get the distance between the explosion and the target to calculate delay - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; - - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(10))); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); - } - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eStun, oTarget, RoundsToSeconds(1))); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_SONIC)) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget, 6.0f)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis3, oTarget,4.0f)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDmg, oTarget)); - } - } - } - - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE); - -} - diff --git a/_removed files/vat_stripdmfi.nss b/_removed files/vat_stripdmfi.nss deleted file mode 100644 index 0c14b6cb..00000000 --- a/_removed files/vat_stripdmfi.nss +++ /dev/null @@ -1,28 +0,0 @@ -#include "inc_levelset" - -void main() -{ - object oTarget = GetPCSpeaker(); - int iFoundItemFlag = 0; - //for testing - //AssignCommand(oTarget, SpeakString("stripInventory fired")); - - //valid only for creatures - //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; - - // set the variables - int i; - object oItem = GetFirstItemInInventory(oTarget); - - // destroy unequipped items in inventory - while ( GetIsObjectValid(oItem) ) - { - if (GetIsDMFI(oItem)) - { - DestroyObject(oItem); - iFoundItemFlag = 1; - } - oItem = GetNextItemInInventory(oTarget); - } - if (iFoundItemFlag = 0) FloatingTextStringOnCreature("No DMFI items found.", oTarget, FALSE); -} diff --git a/_removed files/vat_stripflags.nss b/_removed files/vat_stripflags.nss deleted file mode 100644 index 0a557029..00000000 --- a/_removed files/vat_stripflags.nss +++ /dev/null @@ -1,60 +0,0 @@ -#include "inc_levelset" - -void main() -{ - object oTarget = GetPCSpeaker(); - int iFoundItemFlag = 0; - int i = 0; - //for testing - //AssignCommand(oTarget, SpeakString("stripInventory fired")); - - //valid only for creatures - //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; - - // set the variables - object oItem = GetFirstItemInInventory(oTarget); - - // unflag unequipped items in inventory - while ( GetIsObjectValid(oItem) ) - { - //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); - - if (GetPlotFlag(oItem) == TRUE) - { - SetPlotFlag(oItem, FALSE); - SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); - iFoundItemFlag = 1; - } - - if (GetStolenFlag(oItem) == TRUE) - { - SetStolenFlag(oItem, FALSE); - SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); - iFoundItemFlag = 1; - } - //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); - - oItem = GetNextItemInInventory(oTarget); - } - - //unflag equipped items in slots - for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) - { - oItem = GetItemInSlot(i, oTarget); - if (GetPlotFlag(oItem) == TRUE) - { - SetPlotFlag(oItem, FALSE); - SendMessageToPC(oTarget, "Plot flag removed from " + GetName(oItem)); - iFoundItemFlag = 1; - } - - if (GetStolenFlag(oItem) == TRUE) - { - SetStolenFlag(oItem, FALSE); - SendMessageToPC(oTarget, "Stolen flag removed from " + GetName(oItem)); - iFoundItemFlag = 1; - } - } - - if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No Plot or Stolen items found."); -} diff --git a/_removed files/vat_stripnondrop.nss b/_removed files/vat_stripnondrop.nss deleted file mode 100644 index 08ae6aa0..00000000 --- a/_removed files/vat_stripnondrop.nss +++ /dev/null @@ -1,51 +0,0 @@ -#include "inc_levelset" - -void main() -{ - object oTarget = GetPCSpeaker(); - int iFoundItemFlag = 0; - int i = 0; - //for testing - //AssignCommand(oTarget, SpeakString("stripInventory fired")); - - //valid only for creatures - //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return; - - // set the variables - object oItem = GetFirstItemInInventory(oTarget); - - // unflag unequipped items in inventory - while ( GetIsObjectValid(oItem) ) - { - //SendMessageToPC(oTarget, "Evaluating " + GetName(oItem)); - - if (GetIsDMFI(oItem) != TRUE) - { - if (GetItemCursedFlag(oItem) == TRUE) - { - - SetItemCursedFlag(oItem, FALSE); - SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); - iFoundItemFlag = 1; - } - //else SendMessageToPC(oTarget, GetName(oItem) + " was not changed."); - } - else SendMessageToPC(oTarget, GetName(oItem) + " is a DMFI item."); - - oItem = GetNextItemInInventory(oTarget); - } - - //unflag equipped items in slots - for ( i = 0; i < NUM_INVENTORY_SLOTS; i++ ) - { - oItem = GetItemInSlot(i, oTarget); - if (GetItemCursedFlag(oItem) == TRUE) - { - SetItemCursedFlag(oItem, FALSE); - SendMessageToPC(oTarget, GetName(oItem) + " changed to droppable."); - iFoundItemFlag = 1; - } - } - - if (iFoundItemFlag == 0) SendMessageToPC(oTarget, "No cursed / non-droppable items found."); -} diff --git a/_removed files/x0_s0_bombard.nss b/_removed files/x0_s0_bombard.nss deleted file mode 100644 index e42b51f4..00000000 --- a/_removed files/x0_s0_bombard.nss +++ /dev/null @@ -1,107 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Bombardment -//:: X0_S0_Bombard -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* -// Rocks fall from sky -// 1d8 damage/level to a max of 10d8 -// Reflex save for half -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent -//:: Created On: July 22 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs May 01, 2003 - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - float fDelay; - effect eExplode = EffectVisualEffect(VFX_FNF_METEOR_SWARM); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - effect eDam; - - - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Limit Caster level for the purposes of damage - if (nCasterLvl > 20) - { - nCasterLvl = 20; - } - - //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 = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, 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) == TRUE) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - //Get the distance between the explosion and the target to calculate delay - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll damage for each target - nDamage = d8(nCasterLvl); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * nCasterLvl; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage / 2; - } - //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ALL); - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING); - if(nDamage > 0) - { - - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} - - - diff --git a/_removed files/x0_s0_enten.nss b/_removed files/x0_s0_enten.nss deleted file mode 100644 index 645796ad..00000000 --- a/_removed files/x0_s0_enten.nss +++ /dev/null @@ -1,24 +0,0 @@ -//:://///////////////////////////////////////////// -//:: x0_s0_entEN -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Applies a miss chance to any enemies - of the area of effect creator. -*/ -//::////////////////////////////////////////////// -//:: Created By: -//:: Created On: -//::////////////////////////////////////////////// - -void main() -{ - object oTarget = GetEnteringObject(); - if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator())) - { - effect eMiss = EffectMissChance(40, MISS_CHANCE_TYPE_VS_RANGED); - - // * only leaving the area of effect removes the miss chance - ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMiss, oTarget); - } -} diff --git a/_removed files/x0_s0_entrshield.nss b/_removed files/x0_s0_entrshield.nss deleted file mode 100644 index 24518009..00000000 --- a/_removed files/x0_s0_entrshield.nss +++ /dev/null @@ -1,65 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Entropic Shield -//:: x0_s0_entrshield.nss -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - 20% concealment to ranged attacks including - ranged spell attacks - - Duration: 1 turn/level - -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent Knowles -//:: Created On: July 18, 2002 -//::////////////////////////////////////////////// -//:: VFX Pass By: -#include "NW_I0_SPELLS" - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = OBJECT_SELF; - int nDuration = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS); - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100% - { - nDuration = nDuration * 2; - } - //Set the four unique armor bonuses - effect eShield = EffectConcealment(40, MISS_CHANCE_TYPE_VS_RANGED); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - - effect eLink = EffectLinkEffects(eShield, eDur); -// RemoveEffectsFromSpell(oTarget, GetSpellId()); - - //Apply the armor bonuses and the VFX impact - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); -} - diff --git a/_removed files/x0_s0_ether.nss b/_removed files/x0_s0_ether.nss deleted file mode 100644 index 9a44c6d6..00000000 --- a/_removed files/x0_s0_ether.nss +++ /dev/null @@ -1,48 +0,0 @@ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - effect eVis = EffectVisualEffect(VFX_DUR_SANCTUARY); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eSanc = EffectEthereal(); - - effect eLink = EffectLinkEffects(eVis, eSanc); - eLink = EffectLinkEffects(eLink, eDur); - - int nDuration = GetCasterLevel(OBJECT_SELF); - //Enter Metamagic conditions - int nMetaMagic = GetMetaMagicFeat(); - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ETHEREALNESS, FALSE)); - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); -} diff --git a/_removed files/x0_s0_firebrand.nss b/_removed files/x0_s0_firebrand.nss deleted file mode 100644 index 92897881..00000000 --- a/_removed files/x0_s0_firebrand.nss +++ /dev/null @@ -1,50 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Firebrand -//:: x0_x0_Firebrand -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* -// * Fires a flame arrow to every target in a -// * colossal area -// * Each target explodes into a small fireball for -// * 1d6 damage / level (max = 15 levels) -// * Only nLevel targets can be affected -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent -//:: Created On: July 29 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - int nDamage = GetCasterLevel(OBJECT_SELF); - if (nDamage > 25) - nDamage = 25; - - DoMissileStorm(nDamage, 25, SPELL_FIREBRAND, VFX_IMP_MIRV_FLAME, VFX_IMP_FLAME_M, DAMAGE_TYPE_FIRE, TRUE, TRUE); -} - - - - diff --git a/_removed files/x0_s0_fleshsto.nss b/_removed files/x0_s0_fleshsto.nss deleted file mode 100644 index 67f5d2a9..00000000 --- a/_removed files/x0_s0_fleshsto.nss +++ /dev/null @@ -1,57 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Flesh to Stone -//:: x0_s0_fleshsto -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* -//:: The target freezes in place, standing helpless. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent Knowles -//:: Created On: October 16, 2002 -//::////////////////////////////////////////////// -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -//Override in town, no casting! -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - - - if (MyResistSpell(OBJECT_SELF,oTarget) <1) - { - DoPetrification(nCasterLvl, OBJECT_SELF, oTarget, GetSpellId(), GetEpicSpellSaveDC()); - } -} - - diff --git a/_removed files/x0_s0_missstorm1.nss b/_removed files/x0_s0_missstorm1.nss deleted file mode 100644 index 21c2fdd0..00000000 --- a/_removed files/x0_s0_missstorm1.nss +++ /dev/null @@ -1,65 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Isaacs Lesser Missile Storm -//:: x0_s0_MissStorm1 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Up to 10 missiles, each doing 1d6 damage to all - targets in area. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent -//:: Created On: July 31, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - -//Epic Adjustment By Genisys -//I added a level adjustment to the spell -int nInt; -int nDD; -object oCaster = OBJECT_SELF; -int nCL = GetCasterLevel(oCaster); - -//If caster level is 9 or higher.. -if(nCL >8) -{ -int nEL = nCL - 6; -int nDiv = nEL / 3; -nInt = nDiv + 6; //6 missles + 1 missle every 3 levels over level 6 caster -//(16 Max total Missles) - -//end if Level Check -} -//If not level 9+, then 6 is the max # of missles / level -else -{ -nInt = 6; -} - - //SpawnScriptDebugger(); - DoMissileStorm(1, nInt, SPELL_ISAACS_LESSER_MISSILE_STORM); -} - - diff --git a/_removed files/x0_s0_missstorm2.nss b/_removed files/x0_s0_missstorm2.nss deleted file mode 100644 index c30470db..00000000 --- a/_removed files/x0_s0_missstorm2.nss +++ /dev/null @@ -1,62 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Isaacs Greater Missile Storm -//:: x0_s0_MissStorm2 -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* - Up to 20 missiles, each doing 3d6 damage to each - target in area. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent -//:: Created On: July 31, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - -//Epic Adjustment Added By Genisys -int nInt; -int nDD; -object oCaster = OBJECT_SELF; -int nCL = GetCasterLevel(oCaster); - -//If caster level is 22 or higher.. -if(nCL >21) -{ -int nEL = nCL - 20; -int nDiv = nEL / 2; -nInt = nDiv + 10; //10 + 1 / 2 levels over level 10 -//(25 Max Total Missles) - -//end if Level Check -} -//If not greater than level 21, then 10 is the max level cap -else -{ -nInt = 10; -} - - DoMissileStorm(2, nInt, SPELL_ISAACS_GREATER_MISSILE_STORM); -} - diff --git a/_removed files/x0_s0_truestrike.nss b/_removed files/x0_s0_truestrike.nss deleted file mode 100644 index 61bea73c..00000000 --- a/_removed files/x0_s0_truestrike.nss +++ /dev/null @@ -1,62 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Truestrike -//:: x0_s0_truestrike.nss -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* -+20 attack bonus for 9 seconds. -CHANGE: Miss chance still applies, unlike rules. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent Knowles -//:: Created On: July 15, 2002 -//::////////////////////////////////////////////// -//:: VFX Pass By: -#include "NW_I0_SPELLS" - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oTarget; - effect eVis = EffectVisualEffect(VFX_IMP_HEAD_ODD); - - - // * determine the damage bonus to apply - effect eAttack = EffectAttackIncrease(20); - - - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eLink = eAttack; - eLink = EffectLinkEffects(eLink, eDur); - - - oTarget = OBJECT_SELF; - - //Fire spell cast at event for target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 415, FALSE)); - //Apply VFX impact and bonus effects - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, 18.0); - -} - diff --git a/_removed files/x0_s0_woundwhis.nss b/_removed files/x0_s0_woundwhis.nss deleted file mode 100644 index 4389a182..00000000 --- a/_removed files/x0_s0_woundwhis.nss +++ /dev/null @@ -1,69 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Wounding Whispers -//:: x0_s0_WoundWhis.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Magical whispers cause 1d8 sonic damage to attackers who hit you. - Made the damage slightly more than the book says because we cannot - do the +1 per level. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: Jan 7, 2002 -//::////////////////////////////////////////////// -//:: Modified for wounding whispers, July 30 2002, Brent -//::////////////////////////////////////////////// -//:: Last Update By: Andrew Nobbs May 01, 2003 - -#include "x2_inc_spellhook" -#include "x0_i0_spells" -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE); - int nDuration = GetCasterLevel(OBJECT_SELF); - int nBonus = nDuration; - int nMetaMagic = GetMetaMagicFeat(); - object oTarget = OBJECT_SELF; - effect eShield = EffectDamageShield(d6(3) + nBonus, 0, DAMAGE_TYPE_SONIC); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - - //Link effects - effect eLink = EffectLinkEffects(eShield, eDur); - eLink = EffectLinkEffects(eLink, eVis); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 441, FALSE)); - - if (GetHasSpellEffect(GetSpellId())) - { - RemoveSpellEffects(GetSpellId(),OBJECT_SELF,OBJECT_SELF); - } - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); -} diff --git a/_removed files/x2_m1_mindblast.nss b/_removed files/x2_m1_mindblast.nss deleted file mode 100644 index ff8332f4..00000000 --- a/_removed files/x2_m1_mindblast.nss +++ /dev/null @@ -1,118 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Cone: Mindflayer Mind Blast -//:: x2_m1_mindblast -//:: Copyright (c) 2002 Bioware Corp. -//::////////////////////////////////////////////// -/* - Anyone caught in the cone must make a - Will save (DC 17) or be stunned for 3d4 rounds -*/ -//::////////////////////////////////////////////// -//:: Created By: Keith Warner -//:: Created On: Dec 5/02 -//::////////////////////////////////////////////// - -#include "x2_i0_spells" - -void main() -{ - int nSaveDC = 14 +(GetHitDice(OBJECT_SELF)/2) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); - int nDC = (GetHitDice(OBJECT_SELF)-20)+ nSaveDC; - object oTarget = GetSpellTargetObject(); - object oCaster = OBJECT_SELF; - float fRange = 15.0f; - int nDuration = d4(1)+1; - //DoMindBlast(nSaveDC, d6(10), 15.0f); - - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) -{ - -//Make them stop what they are doing instantly! -AssignCommand(oCaster, ClearAllActions()); - -//Though the player may show animation, nothing happens! :) -//SetModuleOverrideSpellScriptFinished(); - -FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); - -return; -} - -/////////////////////////////////////////////////////////////////////////////// -//Handle Jail... -//NO ITEMS WORK IN JAIL!!! -if(GetLocalInt(GetArea(oCaster), "JAIL")==1) -{ - AssignCommand(oCaster, ClearAllActions()); - //Though the player may show animation, nothing happens! :) - //SetModuleOverrideSpellScriptFinished(); - - return; -} - -/////////////////////////////////////////////////////////////////////////////// - - { - int nStunTime; - float fDelay; - - location lTargetLocation = GetSpellTargetLocation(); - object oTarget; - effect eCone; - effect eVis = EffectVisualEffect(VFX_IMP_SONIC); - - oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); - - while(GetIsObjectValid(oTarget)) - { - int nApp = GetAppearanceType(oTarget); - int bImmune = FALSE; - //---------------------------------------------------------------------- - // Hack to make mind flayers immune to their psionic attacks... - //---------------------------------------------------------------------- - if (nApp == 413 ||nApp== 414 || nApp == 415) - { - bImmune = TRUE; - } - - if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF && !bImmune ) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; - // already stunned - if (GetHasSpellEffect(GetSpellId(),oTarget)) - { - // only affects the targeted object - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget); - int nDamage; - if (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)>0) - { - nDamage = d6(GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/2); - } - else - { - nDamage = d6(GetHitDice(OBJECT_SELF)/2); - } - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND), oTarget); - } - else if (WillSave(oTarget, nDC) < 1) - { - //Calculate the length of the stun - nStunTime = nDuration; - //Set stunned effect - eCone = EffectStunned(); - eCone = SupernaturalEffect(eCone); //Hack to make it bypass immunities :) - //Apply the VFX impact and effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCone, oTarget, RoundsToSeconds(nStunTime))); - } - } - //Get next target in spell area - oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE); - } -} - -} - diff --git a/_removed files/x2_p_craftskills.dlg b/_removed files/x2_p_craftskills.dlg deleted file mode 100644 index 4066ed93..00000000 Binary files a/_removed files/x2_p_craftskills.dlg and /dev/null differ diff --git a/_removed files/x2_s0_balllghtng.nss b/_removed files/x2_s0_balllghtng.nss deleted file mode 100644 index 32cf3010..00000000 --- a/_removed files/x2_s0_balllghtng.nss +++ /dev/null @@ -1,39 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Isaacs Lesser Missile Storm -//:: x0_s0_MissStorm1 -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Up to 10 missiles, each doing 1d6 damage to all - targets in area. -*/ -//::////////////////////////////////////////////// -//:: Created By: Brent -//:: Created On: July 31, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: - -#include "X0_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //SpawnScriptDebugger(); 503 - DoMissileStorm(1, 20, GetSpellId(), 503,VFX_IMP_LIGHTNING_S ,DAMAGE_TYPE_ELECTRICAL, FALSE, TRUE ); -} diff --git a/_removed files/x2_s0_blckblde.nss b/_removed files/x2_s0_blckblde.nss deleted file mode 100644 index 7d1f15e9..00000000 --- a/_removed files/x2_s0_blckblde.nss +++ /dev/null @@ -1,109 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Black Blade of Disaster -//:: X2_S0_BlckBlde -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a greatsword to battle for the caster -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 26, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: Georg Zoeller, July 28 - 2003 - - -#include "x2_i0_spells" - -//Creates the weapon that the creature will be using. -void spellsCreateItemForSummoned() -{ - //Declare major variables - int nStat; - - // cast from scroll, we just assume +5 ability modifier - if (GetSpellCastItem() != OBJECT_INVALID) - { - nStat = 5; - } - else - { - int nClass = GetLastSpellCastClass(); - int nLevel = GetLevelByClass(nClass); - - int nStat; - - int nCha = GetAbilityModifier(ABILITY_CHARISMA,OBJECT_SELF); - int nInt = GetAbilityModifier(ABILITY_INTELLIGENCE,OBJECT_SELF); - - if (nClass == CLASS_TYPE_WIZARD) - { - nStat = nInt; - } - else - { - nStat = nCha; - } - - if (nStat >20) - { - nStat =20; - } - - if (nStat <1) - { - nStat = 0; - } - } - - object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED); - // Make the blade require concentration - SetLocalInt(oSummon,"X2_L_CREATURE_NEEDS_CONCENTRATION",TRUE); - SetPlotFlag (oSummon,TRUE); - object oWeapon; - //Create item on the creature, epuip it and add properties. - oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSummon); - if (nStat > 0) - { - IPSetWeaponEnhancementBonus(oWeapon, nStat); - } - SetDroppableFlag(oWeapon, FALSE); -} - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nDuration = GetCasterLevel(OBJECT_SELF); - effect eSummon = EffectSummonCreature("blackblade01"); - effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3); - //Make metamagic check for extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2;//Duration is +100% - } - //Apply the VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration)); - DelayCommand(1.5, spellsCreateItemForSummoned()); -} diff --git a/_removed files/x2_s0_blckstff.nss b/_removed files/x2_s0_blckstff.nss deleted file mode 100644 index b3254728..00000000 --- a/_removed files/x2_s0_blckstff.nss +++ /dev/null @@ -1,89 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Blackstaff -//:: X2_S0_Blckstff -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Adds +4 enhancement bonus, On Hit: Dispel. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 29, 2002 -//::////////////////////////////////////////////// -//:: Updated by Andrew Nobbs May 07, 2003 -//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller -//:: 2003-07-15: Complete Rewrite to make use of Item Property System - -#include "nw_i0_spells" -#include "x2_i0_spells" - -#include "x2_inc_spellhook" - - -void AddBlackStaffEffectOnWeapon (object oTarget, float fDuration) -{ - IPSafeAddItemProperty(oTarget, ItemPropertyEnhancementBonus(8), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE, TRUE); - IPSafeAddItemProperty(oTarget, ItemPropertyOnHitProps(IP_CONST_ONHIT_DISPELMAGIC, IP_CONST_ONHIT_SAVEDC_16), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING ); - IPSafeAddItemProperty(oTarget, ItemPropertyVisualEffect(ITEM_VISUAL_EVIL), fDuration,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE ); - return; -} - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - - //Declare major variables - effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - int nDuration = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - - object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); - - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration * 2; //Duration is +100% - } - - if(GetIsObjectValid(oMyWeapon) ) - { - SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - - if (GetBaseItemType(oMyWeapon) == BASE_ITEM_QUARTERSTAFF) - { - if (nDuration>0) - { - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration)); - AddBlackStaffEffectOnWeapon(oMyWeapon, RoundsToSeconds(nDuration)); - } - return; - } - else - { - FloatingTextStrRefOnCreature(83620, OBJECT_SELF); // not a qstaff - return; - } - } - else - { - FloatingTextStrRefOnCreature(83615, OBJECT_SELF); - return; - } -} diff --git a/_removed files/x2_s0_combust.nss b/_removed files/x2_s0_combust.nss deleted file mode 100644 index 12e304ed..00000000 --- a/_removed files/x2_s0_combust.nss +++ /dev/null @@ -1,214 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Combust -//:: X2_S0_Combust -//:: Copyright (c) 2000 Bioware Corp. -//::////////////////////////////////////////////// -/* - The initial eruption of flame causes 2d6 fire damage +1 - point per caster level(maximum +10) - with no saving throw. - - Further, the creature must make - a Reflex save or catch fire taking a further 1d6 points - of damage. This will continue until the Reflex save is - made. - - There is an undocumented artificial limit of - 10 + casterlevel rounds on this spell to prevent - it from running indefinitly when used against - fire resistant creatures with bad saving throws - -*/ -//::////////////////////////////////////////////// -// Created: 2003/09/05 Georg Zoeller -//::////////////////////////////////////////////// - -#include "x2_I0_SPELLS" -#include "x2_inc_toollib" -#include "x2_inc_spellhook" - -void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic); - -void main() -{ - - object oTarget = GetSpellTargetObject(); - object oCaster = OBJECT_SELF; - - //-------------------------------------------------------------------------- - // Spellcast Hook Code - // Added 2003-06-20 by Georg - // If you want to make changes to all spells, check x2_inc_spellhook.nss to - // find out more - //-------------------------------------------------------------------------- - if (!X2PreSpellCastCode()) - { - return; - } - // End of Spell Cast Hook - - //-------------------------------------------------------------------------- - // Calculate the save DC - //-------------------------------------------------------------------------- - //Epic DC Bonus Added - int nDB; - int nAdjs; - nAdjs = GetCasterLevel(OBJECT_SELF) - 20; - if(GetCasterLevel(OBJECT_SELF)>=23) - { - nDB = nAdjs/3; - SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = + " + IntToString(nDB) + " DC"); - } - else if(GetCasterLevel(OBJECT_SELF) <=22) - { - nDB = 0; - } - int nDC = GetSpellSaveDC() + nDB; - int nLevel = GetCasterLevel(OBJECT_SELF); - - - //-------------------------------------------------------------------------- - // Calculate the damage, 2d6 + casterlevel, capped at +10 - //-------------------------------------------------------------------------- - int nDamage = GetCasterLevel(OBJECT_SELF); - if (nDamage > 20) - { - nDamage = 20; - } - int nMetaMagic = GetMetaMagicFeat(); - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage += 12;//Damage is at max - } - else - { - nDamage += d6(2); - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% - } - } - - //-------------------------------------------------------------------------- - // Calculate the duration (we need a duration or bad things would happen - // if someone is immune to fire but fails his safe all the time) - //-------------------------------------------------------------------------- - int nDuration = 10 + GetCasterLevel(OBJECT_SELF); - if (nDuration < 1) - { - nDuration = 10; - } - - //-------------------------------------------------------------------------- - // Setup Effects - //-------------------------------------------------------------------------- - effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); - effect eDur = EffectVisualEffect(498); - - if(!GetIsReactionTypeFriendly(oTarget)) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - - //----------------------------------------------------------------------- - // Check SR - //----------------------------------------------------------------------- - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - - //------------------------------------------------------------------- - // Apply VFX - //------------------------------------------------------------------- - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - TLVFXPillar(VFX_IMP_FLAME_M, GetLocation(oTarget), 5, 0.1f,0.0f, 2.0f); - - //------------------------------------------------------------------ - // This spell no longer stacks. If there is one of that type, - // that's enough - //------------------------------------------------------------------ - if (GetHasSpellEffect(GetSpellId(),oTarget) || GetHasSpellEffect(SPELL_INFERNO,oTarget) ) - { - FloatingTextStrRefOnCreature(100775,OBJECT_SELF,FALSE); - return; - } - - //------------------------------------------------------------------ - // Apply the VFX that is used to track the spells duration - //------------------------------------------------------------------ - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, RoundsToSeconds(nDuration)); - - //------------------------------------------------------------------ - // Save the spell save DC as a variable for later retrieval - //------------------------------------------------------------------ - SetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST), nDC); - - //------------------------------------------------------------------ - // Tick damage after 6 seconds again - //------------------------------------------------------------------ - DelayCommand(6.0, RunCombustImpact(oTarget,oCaster,nLevel, nMetaMagic)); - } - } -} - -void RunCombustImpact(object oTarget, object oCaster, int nLevel, int nMetaMagic) -{ - //-------------------------------------------------------------------------- - // Check if the spell has expired (check also removes effects) - //-------------------------------------------------------------------------- - if (GZGetDelayedSpellEffectsExpired(SPELL_COMBUST,oTarget,oCaster)) - { - return; - } - - if (GetIsDead(oTarget) == FALSE) - { - - int nDC = GetLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); - - if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) - { - //------------------------------------------------------------------ - // Calculate the damage, 1d6 + casterlevel, capped at +10 - //------------------------------------------------------------------ - int nDamage = nLevel; - if (nDamage > 20) - { - nDamage = 20; - } - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage += 6; - } - else - { - nDamage += d6(); - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2); - } - } - - effect eDmg = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); - effect eVFX = EffectVisualEffect(VFX_IMP_FLAME_S); - - ApplyEffectToObject(DURATION_TYPE_INSTANT,eDmg,oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT,eVFX,oTarget); - - //------------------------------------------------------------------ - // After six seconds (1 round), check damage again - //------------------------------------------------------------------ - DelayCommand(6.0f,RunCombustImpact(oTarget,oCaster, nLevel,nMetaMagic)); - } - else - { - DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (SPELL_COMBUST)); - GZRemoveSpellEffects(SPELL_COMBUST, oTarget); - } - - } - -} - - - - - diff --git a/_removed files/x2_s0_crshadow.nss b/_removed files/x2_s0_crshadow.nss deleted file mode 100644 index 3b4e8e73..00000000 --- a/_removed files/x2_s0_crshadow.nss +++ /dev/null @@ -1,63 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Create Undead -//:: x2_s0_CrShadow.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - This spell will summon a shadow - 20% of the time, - the shadow will be hostile to the summoner. -*/ -//::////////////////////////////////////////////// -//:: Created By: Keith Warner -//:: Created On: Jan 2/03 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - - //Declare major variables - int nMetaMagic = GetMetaMagicFeat(); - int nCasterLevel = GetCasterLevel(OBJECT_SELF); - int nDuration = nCasterLevel; - nDuration = 24; - effect eSummon; - - //Check for metamagic extend - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - //Set the summoned undead to the appropriate template based on the caster level - if (d100() > 20) - { - eSummon = EffectSummonCreature("shadfiend01",VFX_FNF_SUMMON_UNDEAD); - } - else - { - eSummon = EffectSummonCreature("x2shfiendfoe",VFX_FNF_SUMMON_UNDEAD); - } - - - //Apply VFX impact and summon effect - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); -} - diff --git a/_removed files/x2_s0_dtharm.nss b/_removed files/x2_s0_dtharm.nss deleted file mode 100644 index dc978748..00000000 --- a/_removed files/x2_s0_dtharm.nss +++ /dev/null @@ -1,70 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Death Armor -//:: X2_S0_DthArm -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - You are surrounded with a magical aura that injures - creatures that contact it. Any creature striking - you with its body or handheld weapon takes 1d4 points - of damage +1 point per 2 caster levels (maximum +5). -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Jan 6, 2003 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs, 02/06/2003 -//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller - -#include "x2_inc_spellhook" -#include "x0_i0_spells" - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - object oTarget = GetSpellTargetObject(); - - int nDuration = GetCasterLevel(oTarget); - int nCasterLvl = GetCasterLevel(oTarget)/2; - if(nCasterLvl > 10) - { - nCasterLvl = 10; - } - int nMetaMagic = GetMetaMagicFeat(); - - effect eShield = EffectDamageShield(nCasterLvl, DAMAGE_BONUS_1d8, DAMAGE_TYPE_MAGICAL); - effect eDur = EffectVisualEffect(463); - - //Link effects - effect eLink = EffectLinkEffects(eShield, eDur); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration *2; //Duration is +100% - } - - //Stacking Spellpass, 2003-07-07, Georg - RemoveEffectsFromSpell(oTarget, GetSpellId()); - - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); -} - diff --git a/_removed files/x2_s0_elecloop.nss b/_removed files/x2_s0_elecloop.nss deleted file mode 100644 index 72006fae..00000000 --- a/_removed files/x2_s0_elecloop.nss +++ /dev/null @@ -1,157 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Gedlee's Electric Loop -//:: X2_S0_ElecLoop -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - You create a small stroke of lightning that - cycles through all creatures in the area of effect. - The spell deals 1d6 points of damage per 2 caster - levels (maximum 5d6). Those who fail their Reflex - saves must succeed at a Will save or be stunned - for 1 round. - - Spell is standard hostile, so if you use it - in hardcore mode, it will zap yourself! - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: Oct 19 2003 -//::////////////////////////////////////////////// - - -#include "x2_I0_SPELLS" -#include "x2_inc_spellhook" - -void main() -{ - - //-------------------------------------------------------------------------- - // Spellcast Hook Code - // Added 2003-06-20 by Georg - // If you want to make changes to all spells, check x2_inc_spellhook.nss to - // find out more - //-------------------------------------------------------------------------- - if (!X2PreSpellCastCode()) - { - return; - } - // End of Spell Cast Hook - - - location lTarget = GetSpellTargetLocation(); - effect eStrike = EffectVisualEffect(VFX_IMP_LIGHTNING_S); - int nMetaMagic = GetMetaMagicFeat(); - float fDelay; - effect eBeam; - int nDamage; - int nPotential; - effect eDam; - object oLastValid; - effect eStun = EffectLinkEffects(EffectVisualEffect(VFX_IMP_STUN),EffectStunned()); - - //Epic DC Bonus Added - int nDC; - int nAdjs; - nAdjs = GetCasterLevel(OBJECT_SELF) - 20; - if(GetCasterLevel(OBJECT_SELF)>=23) - { - nDC = nAdjs/3; - SendMessageToPC(OBJECT_SELF, "Your Epic DC Bonus = +" + IntToString(nDC) + " DC"); - } - else if(GetCasterLevel(OBJECT_SELF) <=22) - { - nDC = 0; - } - - //-------------------------------------------------------------------------- - // Calculate Damage Dice. 1d per 2 caster levels, max 5d - //-------------------------------------------------------------------------- - int nNumDice = GetCasterLevel(OBJECT_SELF)/2; - if (nNumDice<1) - { - nNumDice = 1; - } - else if (nNumDice >10) - { - nNumDice = 10; - } - - //-------------------------------------------------------------------------- - // Loop through all targets - //-------------------------------------------------------------------------- - - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE); - while (GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - - //------------------------------------------------------------------ - // Calculate delay until spell hits current target. If we are the - // first target, the delay is the time until the spell hits us - //------------------------------------------------------------------ - if (GetIsObjectValid(oLastValid)) - { - fDelay += 0.2f; - fDelay += GetDistanceBetweenLocations(GetLocation(oLastValid), GetLocation(oTarget))/20; - } - else - { - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; - } - - //------------------------------------------------------------------ - // If there was a previous target, draw a lightning beam between us - // and iterate delay so it appears that the beam is jumping from - // target to target - //------------------------------------------------------------------ - if (GetIsObjectValid(oLastValid)) - { - eBeam = EffectBeam(VFX_BEAM_LIGHTNING, oLastValid, BODY_NODE_CHEST); - DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam,oTarget,1.5f)); - } - - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - - nPotential = MaximizeOrEmpower(6, nNumDice, nMetaMagic); - nDamage = GetReflexAdjustedDamage(nPotential, oTarget, GetSpellSaveDC() + nDC, SAVING_THROW_TYPE_ELECTRICITY); - - //-------------------------------------------------------------- - // If we failed the reflex save, we save vs will or are stunned - // for one round - //-------------------------------------------------------------- - if (nPotential == nDamage || (GetHasFeat(FEAT_IMPROVED_EVASION,oTarget) && nDamage == (nPotential/2))) - { - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay)) - { - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eStun,oTarget, RoundsToSeconds(1))); - } - - } - - - if (nDamage >0) - { - eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eStrike, oTarget)); - } - } - - //------------------------------------------------------------------ - // Store Target to make it appear that the lightning bolt is jumping - // from target to target - //------------------------------------------------------------------ - oLastValid = oTarget; - - } - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lTarget, TRUE, OBJECT_TYPE_CREATURE ); - } - -} - - diff --git a/_removed files/x2_s0_glphwardx.nss b/_removed files/x2_s0_glphwardx.nss deleted file mode 100644 index 8a29670d..00000000 --- a/_removed files/x2_s0_glphwardx.nss +++ /dev/null @@ -1,117 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Glyph of Warding Heartbet -//:: x2_o0_glyphhb -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - Default Glyph of warding damage script - - This spellscript is fired when someone triggers - a player cast Glyph of Warding - - - Check x2_o0_hhb.nss and the Glyph of Warding - placeable object for details - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: 2003-09-02 -//::////////////////////////////////////////////// - -#include "x0_i0_spells" -#include "epicdc_inc" - -void DoDamage(int nDamage, object oTarget) -{ - effect eVis = EffectVisualEffect(VFX_IMP_SONIC); - effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_SONIC); - if(nDamage > 0) - { - //Apply VFX impact and damage effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - } -} - -void main() -{ - - //Declare major variables - object oTarget = GetLocalObject(OBJECT_SELF,"X2_GLYPH_LAST_ENTER"); - location lTarget = GetLocation(OBJECT_SELF); - effect eDur = EffectVisualEffect(445); - int nDamage; - int nCasterLevel = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_LEVEL"); - int nMetaMagic = GetLocalInt(OBJECT_SELF,"X2_PLC_GLYPH_CASTER_METAMAGIC"); - object oCreator = GetLocalObject(OBJECT_SELF,"X2_PLC_GLYPH_CASTER") ; - - if ( GetLocalInt (OBJECT_SELF,"X2_PLC_GLYPH_PLAYERCREATED") == 0 ) - { - oCreator = OBJECT_SELF; - } - - if (!GetIsObjectValid(oCreator)) - { - DestroyObject(OBJECT_SELF); - return; - } - - int nDice = nCasterLevel /2; - - if (nDice > 10) - nDice = 10; - else if (nDice <1 ) - nDice = 1; - - effect eDam; - effect eExplode = EffectVisualEffect(459); - - //Check the faction of the entering object to make sure the entering object is not in the casters faction - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); - //Cycle through the targets in the explosion area - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - while(GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,oCreator)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(oCreator, GetSpellId())); - //Make SR check - if (!MyResistSpell(oCreator, oTarget)) - { - nDamage = d8(nDice); - //Enter Metamagic conditions - - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 8 * 10;//Damage is at max - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + (nDamage/2);//Damage/Healing is +50% - } - - //Change damage according to Reflex, Evasion and Improved Evasion +5 DC Added - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC() + 5, SAVING_THROW_TYPE_SONIC, oCreator); - - - //---------------------------------------------------------- - // Have the creator do the damage so he gets feedback strings - //---------------------------------------------------------- - if (oCreator != OBJECT_SELF) - { - AssignCommand(oCreator, DoDamage(nDamage,oTarget)); - } - else - { - DoDamage(nDamage,oTarget); - } - - } - } - //Get next target in the sequence - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} diff --git a/_removed files/x2_s0_grmagweap.nss b/_removed files/x2_s0_grmagweap.nss deleted file mode 100644 index 0086922b..00000000 --- a/_removed files/x2_s0_grmagweap.nss +++ /dev/null @@ -1,89 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Greater Magic Weapon -//:: X2_S0_GrMagWeap -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Grants a +1 enhancement bonus per 3 caster levels - (maximum of +5). - lasts 1 hour per level -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 28, 2002 -//::////////////////////////////////////////////// -//:: Updated by Andrew Nobbs May 08, 2003 -//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller -//:: 2003-07-17: Complete Rewrite to make use of Item Property System - - -#include "nw_i0_spells" -#include "x2_i0_spells" - -#include "x2_inc_spellhook" - -void AddGreaterEnhancementEffectToWeapon(object oMyWeapon, float fDuration, int nBonus) -{ - IPSafeAddItemProperty(oMyWeapon,ItemPropertyEnhancementBonus(nBonus), fDuration, X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE); - return; -} - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - - //Declare major variables - effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - int nDuration = GetCasterLevel(OBJECT_SELF); - int nCasterLvl = nDuration / 3; - int nMetaMagic = GetMetaMagicFeat(); - - //Limit nCasterLvl to 5, so it max out at +5 enhancement to the weapon. - if(nCasterLvl > 8) - { - nCasterLvl = 8; - } - - object oMyWeapon = IPGetTargetedOrEquippedMeleeWeapon(); - - if (nMetaMagic == METAMAGIC_EXTEND) - { - nDuration = nDuration * 2; //Duration is +100% - } - - if(GetIsObjectValid(oMyWeapon) ) - { - SignalEvent(GetItemPossessor(oMyWeapon), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - - if (nDuration>0) - { - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), HoursToSeconds(nDuration)); - AddGreaterEnhancementEffectToWeapon(oMyWeapon, (HoursToSeconds(nDuration)), nCasterLvl); - - } - return; - } - else - { - FloatingTextStrRefOnCreature(83615, OBJECT_SELF); - return; - } -} diff --git a/_removed files/x2_s0_horiboom.nss b/_removed files/x2_s0_horiboom.nss deleted file mode 100644 index 66be8d8f..00000000 --- a/_removed files/x2_s0_horiboom.nss +++ /dev/null @@ -1,90 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Horizikaul's Boom -//:: X2_S0_HoriBoom -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// You blast the target with loud and high-pitched -// sounds. The target takes 1d4 points of sonic -// damage per two caster levels (maximum 5d4) and -// must make a Will save or be deafened for 1d4 -// rounds. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 22, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs, 02/06/2003 - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) ) - object oTarget = GetSpellTargetObject(); - int nCasterLvl = GetCasterLevel(OBJECT_SELF)/2; - int nRounds = d4(1); - int nMetaMagic = GetMetaMagicFeat(); - effect eVis = EffectVisualEffect(VFX_IMP_SONIC); - effect eDeaf = EffectDeaf(); - - //Minimum caster level of 1, maximum of 15. - if(nCasterLvl == 0) - { - nCasterLvl = 1; - } - else if (nCasterLvl > 5) - { - nCasterLvl = 5; - } - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - if(!MyResistSpell(OBJECT_SELF, oTarget)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - //Roll damage - int nDam = d4(nCasterLvl); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDam = 4 * nCasterLvl; //Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDam = nDam + nDam/2; //Damage/Healing is +50% - } - //Set damage effect - effect eDam = EffectDamage(nDam, DAMAGE_TYPE_SONIC); - //Apply the MIRV and damage effect - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS)) - { - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, RoundsToSeconds(nRounds)); - } - } - } -} diff --git a/_removed files/x2_s0_monregen.nss b/_removed files/x2_s0_monregen.nss deleted file mode 100644 index 55f82a65..00000000 --- a/_removed files/x2_s0_monregen.nss +++ /dev/null @@ -1,64 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Monstrous Regeneration -//:: X2_S0_MonRegen -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Grants the selected target 3 HP of regeneration - every round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 25, 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs May 09, 2003 -//:: 2003-07-07: Stacking Spell Pass, Georg Zoeller - -#include "x2_inc_spellhook" -#include "x0_i0_spells" - -void main() -{ - - - //-------------------------------------------------------------------------- - // Spellcast Hook Code - // Added 2003-06-20 by Georg - // If you want to make changes to all spells, check x2_inc_spellhook.nss to - // find out more - //-------------------------------------------------------------------------- - if (!X2PreSpellCastCode()) - { - return; - } - // End of Spell Cast Hook - - - object oTarget = GetSpellTargetObject(); - - /* Bug fix 21/07/03: Andrew. Lowered regen to 3 HP per round, instead of 10. */ - effect eRegen = EffectRegenerate(6, 6.0); - - effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - - effect eLink = EffectLinkEffects(eRegen, eDur); - - int nMeta = GetMetaMagicFeat(); - int nLevel = (GetCasterLevel(OBJECT_SELF)/2)+1; - - if (nMeta == METAMAGIC_EXTEND) - { - nLevel *= 2; - } - - // Stacking Spellpass, 2003-07-07, Georg ... just in case - RemoveEffectsFromSpell(oTarget, GetSpellId()); - - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - - //Apply effects and VFX - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - -} diff --git a/_removed files/x2_s0_scntsphere.nss b/_removed files/x2_s0_scntsphere.nss deleted file mode 100644 index a3593b37..00000000 --- a/_removed files/x2_s0_scntsphere.nss +++ /dev/null @@ -1,105 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Scintillating Sphere -//:: X2_S0_ScntSphere -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* -// A scintillating sphere is a burst of electricity -// that detonates with a low roar and inflicts 1d6 -// points of damage per caster level (maximum of 10d6) -// to all creatures within the area. Unattended objects -// also take damage. The explosion creates almost no pressure. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 25 , 2002 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs, 02/06/2003 - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - - //Declare major variables - object oCaster = OBJECT_SELF; - int nCasterLvl = GetCasterLevel(oCaster); - int nMetaMagic = GetMetaMagicFeat(); - int nDamage; - float fDelay; - effect eExplode = EffectVisualEffect(459); - effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S); - effect eDam; - - //Get the spell target location as opposed to the spell target. - location lTarget = GetSpellTargetLocation(); - //Limit Caster level for the purposes of damage - if (nCasterLvl > 15) - { - nCasterLvl = 15; - } - //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 = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, 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)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - //Get the distance between the explosion and the target to calculate delay - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20; - if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) - { - //Roll damage for each target - nDamage = d6(nCasterLvl); - //Resolve metamagic - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nDamage = 6 * nCasterLvl; - } - else if (nMetaMagic == METAMAGIC_EMPOWER) - { - nDamage = nDamage + nDamage / 2; - } - //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. - nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY); - //Set the damage effect - eDam = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL); - if(nDamage > 0) - { - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } -} - diff --git a/_removed files/x2_s0_stneholda.nss b/_removed files/x2_s0_stneholda.nss deleted file mode 100644 index 9394692a..00000000 --- a/_removed files/x2_s0_stneholda.nss +++ /dev/null @@ -1,55 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Stonehold -//:: X2_S0_StneholdA -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates an area of effect that will cover the - creature with a stone shell holding them in - place. -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: August 2003 -//:: Updated : October 2003 -//::////////////////////////////////////////////// - - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - //Declare major variables - int nRounds; - effect eHold = EffectParalyze(); - effect eDur = EffectVisualEffect(476 ); - effect eFind; - object oTarget; - object oCreator; - float fDelay; - int nMetaMagic = GetMetaMagicFeat(); - - effect eLink = EffectLinkEffects(eDur,eHold); - //Get the first object in the persistant area - oTarget = GetEnteringObject(); - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); - //Make a SR check - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) - { - //Make a Will Save - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) - { - nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); - fDelay = GetRandomDelay(0.45, 1.85); - //Apply the VFX impact and linked effects - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nRounds))); - } - } - } -} diff --git a/_removed files/x2_s0_stneholdc.nss b/_removed files/x2_s0_stneholdc.nss deleted file mode 100644 index b7669662..00000000 --- a/_removed files/x2_s0_stneholdc.nss +++ /dev/null @@ -1,67 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Stonehold -//:: X2_S0_StneholdC -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creates an area of effect that will cover the - creature with a stone shell holding them in - place. -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: May 04, 2002 -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void main() -{ - - //Declare major variables - int nRounds; - int nMetaMagic = GetMetaMagicFeat(); - effect eHold = EffectParalyze(); - effect eDur = EffectVisualEffect(476 ); - eHold = EffectLinkEffects(eDur, eHold); - effect eFind; - object oTarget; - object oCreator; - float fDelay; - - //-------------------------------------------------------------------------- - // GZ 2003-Oct-15 - // When the caster is no longer there, all functions calling - // GetAreaOfEffectCreator will fail. - //-------------------------------------------------------------------------- - if (!GetIsObjectValid(GetAreaOfEffectCreator())) - { - DestroyObject(OBJECT_SELF); - return; - } - - oTarget = GetFirstInPersistentObject(); - while(GetIsObjectValid(oTarget)) - { - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator())) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STONEHOLD)); - if (!GetHasSpellEffect(SPELL_STONEHOLD,oTarget)) - { - if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget)) - { - if(!MySavingThrow(SAVING_THROW_WILL, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_SPELL)) - { - nRounds = MaximizeOrEmpower(6, 1, nMetaMagic); - fDelay = GetRandomDelay(0.75, 1.75); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHold, oTarget, RoundsToSeconds(nRounds))); - } - } - } - } - oTarget = GetNextInPersistentObject(); - } -} diff --git a/_removed files/x2_s0_undeath.nss b/_removed files/x2_s0_undeath.nss deleted file mode 100644 index 706e3715..00000000 --- a/_removed files/x2_s0_undeath.nss +++ /dev/null @@ -1,155 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Undeath to Death -//:: X2_S0_Undeath -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - - This spell slays 1d4 HD worth of undead creatures - per caster level (maximum 20d4). Creatures with - the fewest HD are affected first; - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: August 13,2003 -//::////////////////////////////////////////////// - - -#include "NW_I0_SPELLS" -#include "x0_i0_spells" -#include "x2_inc_toollib" -#include "x2_inc_spellhook" -#include "epicdc_inc" - -void DoUndeadToDeath(object oCreature) -{ - SignalEvent(oCreature, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - SetLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD", TRUE); - - if (!MySavingThrow(SAVING_THROW_WILL,oCreature, GetEpicSpellSaveDC(),SAVING_THROW_TYPE_NONE,OBJECT_SELF)) - { - float fDelay = GetRandomDelay(0.2f,0.4f); - if (!MyResistSpell(OBJECT_SELF, oCreature, fDelay)) - { - effect eDeath = EffectDamage(GetCurrentHitPoints(oCreature),DAMAGE_TYPE_DIVINE,DAMAGE_POWER_ENERGY); - effect eVis = EffectVisualEffect(VFX_IMP_DEATH); - DelayCommand(fDelay+0.5f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDeath,oCreature)); - DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oCreature)); - } - else - { - DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); - } - } - else - { - DelayCommand(1.0f,DeleteLocalInt(oCreature,"X2_EBLIGHT_I_AM_DEAD")); - } -} - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-07-07 by Georg Zoeller - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - int nMetaMagic = GetMetaMagicFeat(); - - -// End of Spell Cast Hook - - // Impact VFX - location lLoc = GetSpellTargetLocation(); - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_STRIKE_HOLY),lLoc); - TLVFXPillar(VFX_FNF_LOS_HOLY_20, lLoc,3,0.0f); - - - // build list with affected creatures - - // calculation - int nLevel = GetCasterLevel(OBJECT_SELF); - if (nLevel>30) - { - nLevel = 30; - } - - // calculate number of hitdice affected - int nLow = 9999; - object oLow; - int nHDLeft = nLevel *d4(); - //Enter Metamagic conditions - if (nMetaMagic == METAMAGIC_MAXIMIZE) - { - nHDLeft = 4 * GetCasterLevel(OBJECT_SELF);//Damage is at max - } - if (nMetaMagic == METAMAGIC_EMPOWER) - { - nHDLeft += (nHDLeft/2); //Damage/Healing is +50% - } - - int nCurHD; - object oFirst = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f,lLoc ); - - // Only start loop if there is a creature in the area of effect - if (GetIsObjectValid(oFirst)) - { - - object oTarget = oFirst; - while (GetIsObjectValid(oTarget) && nHDLeft >0) - { - - if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) - { - nCurHD = GetHitDice(oTarget); - if (nCurHD <= nHDLeft ) - { - if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - // ignore creatures already affected - if (GetLocalInt(oTarget,"X2_EBLIGHT_I_AM_DEAD") == 0 && !GetPlotFlag(oTarget) && !GetIsDead(oTarget)) - { - // store the creature with the lowest HD - if (GetHitDice(oTarget) <= nLow) - { - nLow = GetHitDice(oTarget); - oLow = oTarget; - } - } - } - } - } - - // Get next target - oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f ,lLoc); - - // End of cycle, time to kill the lowest creature - if (!GetIsObjectValid(oTarget)) - { - // we have a valid lowest creature we can affect with the remaining HD - if (GetIsObjectValid(oLow) && nHDLeft >= nLow) - { - DoUndeadToDeath(oLow); - // decrement remaining HD - nHDLeft -= nLow; - // restart the loop - oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, GetSpellTargetLocation()); - } - // reset counters - oLow = OBJECT_INVALID; - nLow = 9999; - } - } - } - } diff --git a/_removed files/x2_s1_chaosspit.nss b/_removed files/x2_s1_chaosspit.nss deleted file mode 100644 index 0b5c097b..00000000 --- a/_removed files/x2_s1_chaosspit.nss +++ /dev/null @@ -1,90 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Slaad Chaos Spittle -//:: x2_s1_chaosspit -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Creature must make a ranged touch attack to hit - the intended target. - - Damage is 20d4 for black slaad, 10d4 for white - slaad and hd/2 d4 for any other creature this - spell is assigned to - - A shifter will do his shifter level /3 d6 - points of damage - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: Sept 08 , 2003 -//::////////////////////////////////////////////// -#include "x0_i0_spells" -#include "NW_I0_SPELLS" -void main() -{ - //Declare major variables - object oTarget = GetSpellTargetObject(); - int nHD = GetHitDice(OBJECT_SELF); - effect eVis = EffectVisualEffect(VFX_IMP_ACID_L); - effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_S); - effect eBolt; - int nCount; - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - - if (GetIsPC(OBJECT_SELF)) - { - nCount = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3) + 2 ; - } - else if (GetAppearanceType(OBJECT_SELF) == 426) // black slaad = 20d6 - { - nCount = 20 ; - } - else if (GetAppearanceType(OBJECT_SELF) == 427) // white slaad = 10d6 - { - nCount = 10 ; - } - else - { - nCount = nHD /2; - } - - if (nCount == 0) - { - nCount = 1; - } - - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - int nDamage = d4(nCount); - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - //Adjust the damage based on the Reflex Save, Evasion and Improved Evasion. - - //Make a ranged touch attack - int nTouch = TouchAttackRanged(oTarget); - if(nTouch > 0) - { - if(nTouch == 2) - { - nDamage *= 2; - } - //Set damage effect - eBolt = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); - if(nDamage > 0) - { - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); - } - } - } -} diff --git a/_removed files/x2_s1_petrgaze.nss b/_removed files/x2_s1_petrgaze.nss deleted file mode 100644 index 994ccd23..00000000 --- a/_removed files/x2_s1_petrgaze.nss +++ /dev/null @@ -1,92 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Gaze attack for shifter forms -//:: x2_s1_petrgaze -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - - Petrification gaze for polymorph type - basilisk and medusa - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: July, 09, 2003 -//::////////////////////////////////////////////// - -#include "x0_i0_spells" -#include "x2_inc_shifter" - -void main() -{ -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - //-------------------------------------------------------------------------- - // Enforce artifical use limit on that ability - //-------------------------------------------------------------------------- - //Comment out to make unlimited! - if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) - { - FloatingTextStrRefOnCreature(83576, OBJECT_SELF); - return; - } - - //-------------------------------------------------------------------------- - // Make sure we are not blind - //-------------------------------------------------------------------------- - if( GZCanNotUseGazeAttackCheck(OBJECT_SELF)) - { - return; - } - - //-------------------------------------------------------------------------- - // Calculate Save DC - //-------------------------------------------------------------------------- - //Here we can adjust how hard the DC is on the Gaze Press the Constant buttn - int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_HARD); - - float fDelay; - object oTarget = GetSpellTargetObject(); - int nHitDice = GetCasterLevel(OBJECT_SELF); - int nSpellID = GetSpellId(); - object oSelf = OBJECT_SELF; - - //-------------------------------------------------------------------------- - // Loop through all available targets in spellcone - //-------------------------------------------------------------------------- - location lFinalTarget = GetSpellTargetLocation(); - vector vFinalPosition; - if ( lFinalTarget == GetLocation(OBJECT_SELF) ) - { - // Since the target and origin are the same, we have to determine the - // direction of the spell from the facing of OBJECT_SELF (which is more - // intuitive than defaulting to East everytime). - - // In order to use the direction that OBJECT_SELF is facing, we have to - // instead we pick a point slightly in front of OBJECT_SELF as the target. - vector lTargetPosition = GetPositionFromLocation(lFinalTarget); - vFinalPosition.x = lTargetPosition.x + cos(GetFacing(OBJECT_SELF)); - vFinalPosition.y = lTargetPosition.y + sin(GetFacing(OBJECT_SELF)); - lFinalTarget = Location(GetAreaFromLocation(lFinalTarget),vFinalPosition,GetFacingFromLocation(lFinalTarget)); - } - oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); - while(GetIsObjectValid(oTarget)) - { - fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; - - if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF) - { - DelayCommand(fDelay, DoPetrification(nHitDice, oSelf, oTarget, nSpellID, nDC)); - //Get next target in spell area - } - oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lFinalTarget, TRUE); - } - -} - - diff --git a/_removed files/x2_s1_wyrmbreath.nss b/_removed files/x2_s1_wyrmbreath.nss deleted file mode 100644 index db31b9c1..00000000 --- a/_removed files/x2_s1_wyrmbreath.nss +++ /dev/null @@ -1,153 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Dragon Breath for Wyrmling Shape -//:: x2_s1_wyrmbreath -//:: Copyright (c) 2003Bioware Corp. -//::////////////////////////////////////////////// -/* - Calculates the power of the dragon breath - used by a player polymorphed into wyrmling - shape - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: June, 17, 2003 -//::////////////////////////////////////////////// -/* --- Modified by Iznoghoud January 13 2004 -Made a fix for the way the damage is calculated. - -- Before, it would determine a number of dice and die type (d4, d6, d8, d10), throw -that die one time, and then multiply that number with the number of dice. -Also, every target got the same amount of damage. - -- Now, it determines a number of dice N and die type (d4, d6, d8, d10), throws that -die N times, and adds up the results. -This results in the damage being averaged out like all other spells, instead of -going into the low or high extremes so often. Also, every target can get a -different amount of damage, just like with other spells. -*/ -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -#include "x2_inc_shifter" - -void main() -{ - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - - //-------------------------------------------------------------------------- - // Set up variables - //-------------------------------------------------------------------------- - int nType = GetSpellId(); - int nDamageType; - int nDamageDie; - int nVfx; - int nSave; - int nSpell; - int nDice; - - - //-------------------------------------------------------------------------- - // Decide on breath weapon type, vfx based on spell id - //-------------------------------------------------------------------------- - switch (nType) - { - case 663: //white - nDamageDie = 4; - nDamageType = DAMAGE_TYPE_COLD; - nVfx = VFX_IMP_FROST_S; - nSave = SAVING_THROW_TYPE_COLD; - nSpell = SPELLABILITY_DRAGON_BREATH_COLD; - nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; - break; - - case 664: //black - nDamageDie = 4; - nDamageType = DAMAGE_TYPE_ACID; - nVfx = VFX_IMP_ACID_S; - nSave = SAVING_THROW_TYPE_ACID; - nSpell = SPELLABILITY_DRAGON_BREATH_ACID; - nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; - break; - - case 665: //red - nDamageDie = 10; - nDamageType = DAMAGE_TYPE_FIRE; - nVfx = VFX_IMP_FLAME_M; - nSave = SAVING_THROW_TYPE_FIRE; - nSpell = SPELLABILITY_DRAGON_BREATH_FIRE; - nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; - break; - - case 666: //green - nDamageDie = 6; - nDamageType = DAMAGE_TYPE_ACID; - nVfx = VFX_IMP_ACID_S; - nSave = SAVING_THROW_TYPE_ACID; - nSpell = SPELLABILITY_DRAGON_BREATH_GAS; - nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /2)+1; - break; - - case 667: //blue - nDamageDie = 8; - nDamageType = DAMAGE_TYPE_ELECTRICAL; - nVfx = VFX_IMP_LIGHTNING_S; - nSave = SAVING_THROW_TYPE_ELECTRICITY; - nSpell = SPELLABILITY_DRAGON_BREATH_LIGHTNING; - nDice = (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF) /3)+1; - break; - - } - - //-------------------------------------------------------------------------- - // Calculate Save DC based on shifter level - //-------------------------------------------------------------------------- - int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); - - //-------------------------------------------------------------------------- - // Calculate Damage - //-------------------------------------------------------------------------- - - - int nDamage = 0; - int i; - int nDamStrike; - float fDelay; - object oTarget; - effect eVis, eBreath; - - //-------------------------------------------------------------------------- - //Loop through all targets and do damage - //-------------------------------------------------------------------------- - oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); - while(GetIsObjectValid(oTarget)) - { - if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget)) - { - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpell)); - fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20; - // Calculate damage for this target - nDamage = 0; - for (i = 0; i < nDice; i++) // Roll the damage die nDice times and add up the damage. - nDamage += (Random(nDamageDie)+1); - - nDamStrike = GetReflexAdjustedDamage(nDamage, oTarget, nDC); - if (nDamStrike > 0) - { - eBreath = EffectDamage(nDamStrike, nDamageType); - eVis = EffectVisualEffect(nVfx); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget)); - } - } - oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE); - } -} diff --git a/_removed files/x2_s2_blindspd.nss b/_removed files/x2_s2_blindspd.nss deleted file mode 100644 index 237a274c..00000000 --- a/_removed files/x2_s2_blindspd.nss +++ /dev/null @@ -1,107 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Haste -//:: NW_S0_Haste.nss -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Gives the targeted creature one extra partial - action per round. -*/ -//::////////////////////////////////////////////// -//:: Created By: Preston Watamaniuk -//:: Created On: May 29, 2001 -//::////////////////////////////////////////////// -// Modified March 2003: Remove Expeditious Retreat effects - -#include "x0_i0_spells" - -#include "x2_inc_spellhook" - -void main() -{ - -/* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - -*/ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - -// End of Spell Cast Hook - - //Declare major variables - object oTarget = GetSpellTargetObject(); - - if (GetHasSpellEffect(SPELL_EXPEDITIOUS_RETREAT, oTarget) == TRUE) - { - RemoveSpellEffects(SPELL_EXPEDITIOUS_RETREAT, OBJECT_SELF, oTarget); - } - - if (GetHasSpellEffect(SPELL_HASTE, oTarget) == TRUE) - { - RemoveSpellEffects(SPELL_HASTE, OBJECT_SELF, oTarget); - } - - if (GetHasSpellEffect(SPELL_MASS_HASTE, oTarget) == TRUE) - { - RemoveSpellEffects(SPELL_MASS_HASTE, OBJECT_SELF, oTarget); - } - - if (GetHasSpellEffect(GetSpellId(), oTarget) == TRUE) - { - RemoveSpellEffects(GetSpellId(), OBJECT_SELF, oTarget); - } - - effect eHaste = EffectHaste(); - effect eVis = EffectVisualEffect(460); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - effect eLink = EffectLinkEffects(eHaste, eDur); - - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - //Check for metamagic extension - - // Apply effects to the currently selected target. - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - -effect eEffect; -eEffect = EffectModifyAttacks(2); - -eEffect = SupernaturalEffect(eEffect); - -ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); - -eEffect = EffectACIncrease(4, AC_DODGE_BONUS); - -eEffect = SupernaturalEffect(eEffect); - -ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); - -eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 4, SAVING_THROW_TYPE_ALL); - -eEffect = SupernaturalEffect(eEffect); - -ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); - -eEffect = EffectAttackIncrease(2); - -eEffect = SupernaturalEffect(eEffect); - -ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); - -eEffect = EffectDamageIncrease(DAMAGE_BONUS_1d8, DAMAGE_TYPE_BLUDGEONING); - -eEffect = SupernaturalEffect(eEffect); - -ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f); -} - - diff --git a/_removed files/x2_s2_cursesong.nss b/_removed files/x2_s2_cursesong.nss deleted file mode 100644 index bc7f8cab..00000000 --- a/_removed files/x2_s2_cursesong.nss +++ /dev/null @@ -1,417 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Curse Song -//:: X2_S2_CurseSong -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - This spells applies penalties to all of the - bard's enemies within 30ft for a set duration of - 10 rounds. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: May 16, 2003 -//::////////////////////////////////////////////// -//:: Last Updated By: Andrew Nobbs May 20, 2003 - -#include "x2_i0_spells" - -void main() -{ - -//Override in town, no casting! -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - - if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF)) - { - FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left - return; - } - - if (GetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF)) - { - FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced - return; - } - - - //Declare major variables - int nLevel = GetLevelByClass(CLASS_TYPE_BARD); - int nRanks = GetSkillRank(SKILL_PERFORM); - int nPerform = nRanks; - int nDuration = 10; //+ nChr; - - effect eAttack; - effect eDamage; - effect eWill; - effect eFort; - effect eReflex; - effect eHP; - effect eAC; - effect eSkill; - - int nAttack; - int nDamage; - int nWill; - int nFort; - int nReflex; - int nHP; - int nAC; - int nSkill; - //Check to see if the caster has Lasting Impression and increase duration. - if(GetHasFeat(870)) - { - nDuration *= 10; - } - - if(GetHasFeat(424)) // lingering song - { - nDuration += 5; - } - - if(nPerform >= 90 && nLevel >= 30) - { - nAttack = 4; - nDamage = 6; - nWill = 4; - nFort = 4; - nReflex = 4; - nHP = 70; - nAC = 5; - nSkill = 20; - } - else if(nPerform >= 85 && nLevel >= 29) - { - nAttack = 4; - nDamage = 6; - nWill = 4; - nFort = 4; - nReflex = 4; - nHP = 65; - nAC = 5; - nSkill = 18; - } - else if(nPerform >= 82 && nLevel >= 28) - { - nAttack = 3; - nDamage = 5; - nWill = 3; - nFort = 3; - nReflex = 3; - nHP = 60; - nAC = 5; - nSkill = 16; - } - else if(nPerform >= 78 && nLevel >= 27) - { - nAttack = 3; - nDamage = 5; - nWill = 3; - nFort = 3; - nReflex = 3; - nHP = 55; - nAC = 4; - nSkill = 14; - } - else if(nPerform >= 75 && nLevel >= 26) - { - nAttack = 3; - nDamage = 4; - nWill = 3; - nFort = 3; - nReflex = 3; - nHP = 50; - nAC = 4; - nSkill = 14; - } - else if(nPerform >= 75 && nLevel >= 25) - { - nAttack = 2; - nDamage = 4; - nWill = 3; - nFort = 3; - nReflex = 3; - nHP = 45; - nAC = 4; - nSkill = 13; - } - else if(nPerform >= 70 && nLevel >= 24) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 40; - nAC = 4; - nSkill = 12; - } - else if(nPerform >= 65 && nLevel >= 23) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 36; - nAC = 4; - nSkill = 11; - } - else if(nPerform >= 60 && nLevel >= 22) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 34; - nAC = 4; - nSkill = 10; - } - else if(nPerform >= 55 && nLevel >= 21) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 32; - nAC = 4; - nSkill = 9; - } - else if(nPerform >= 50 && nLevel >= 20) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 28; - nAC = 3; - nSkill = 8; - } - else if(nPerform >= 45 && nLevel >= 19) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 26; - nAC = 3; - nSkill = 7; - } - else if(nPerform >= 40 && nLevel >= 18) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 24; - nAC = 3; - nSkill = 6; - } - else if(nPerform >= 35 && nLevel >= 17) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 22; - nAC = 3; - nSkill = 5; - } - else if(nPerform >= 30 && nLevel >= 16) - { - nAttack = 2; - nDamage = 3; - nWill = 3; - nFort = 2; - nReflex = 2; - nHP = 20; - nAC = 3; - nSkill = 4; - } - else if(nPerform >= 24 && nLevel >= 15) - { - nAttack = 2; - nDamage = 3; - nWill = 2; - nFort = 2; - nReflex = 2; - nHP = 16; - nAC = 3; - nSkill = 3; - } - else if(nPerform >= 21 && nLevel >= 14) - { - nAttack = 2; - nDamage = 3; - nWill = 1; - nFort = 1; - nReflex = 1; - nHP = 16; - nAC = 3; - nSkill = 2; - } - else if(nPerform >= 18 && nLevel >= 12) - { - nAttack = 2; - nDamage = 2; - nWill = 1; - nFort = 1; - nReflex = 1; - nHP = 8; - nAC = 2; - nSkill = 2; - } - else if(nPerform >= 15 && nLevel >= 8) - { - nAttack = 2; - nDamage = 2; - nWill = 1; - nFort = 1; - nReflex = 1; - nHP = 8; - nAC = 0; - nSkill = 1; - } - else if(nPerform >= 12 && nLevel >= 6) - { - nAttack = 1; - nDamage = 2; - nWill = 1; - nFort = 1; - nReflex = 1; - nHP = 0; - nAC = 0; - nSkill = 1; - } - else if(nPerform >= 9 && nLevel >= 3) - { - nAttack = 1; - nDamage = 2; - nWill = 1; - nFort = 1; - nReflex = 0; - nHP = 0; - nAC = 0; - nSkill = 0; - } - else if(nPerform >= 6 && nLevel >= 2) - { - nAttack = 1; - nDamage = 1; - nWill = 1; - nFort = 0; - nReflex = 0; - nHP = 0; - nAC = 0; - nSkill = 0; - } - else if(nPerform >= 3 && nLevel >= 1) - { - nAttack = 1; - nDamage = 1; - nWill = 0; - nFort = 0; - nReflex = 0; - nHP = 0; - nAC = 0; - nSkill = 0; - } - effect eVis = EffectVisualEffect(VFX_IMP_DOOM); - - eAttack = EffectAttackDecrease(nAttack); - eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_SLASHING); - effect eLink = EffectLinkEffects(eAttack, eDamage); - - if(nWill > 0) - { - eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill); - eLink = EffectLinkEffects(eLink, eWill); - } - if(nFort > 0) - { - eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort); - eLink = EffectLinkEffects(eLink, eFort); - } - if(nReflex > 0) - { - eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex); - eLink = EffectLinkEffects(eLink, eReflex); - } - if(nHP > 0) - { - //SpeakString("HP Bonus " + IntToString(nHP)); - eHP = EffectDamage(nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL); -// eLink = EffectLinkEffects(eLink, eHP); - } - if(nAC > 0) - { - eAC = EffectACDecrease(nAC, AC_DODGE_BONUS); - eLink = EffectLinkEffects(eLink, eAC); - } - if(nSkill > 0) - { - eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill); - eLink = EffectLinkEffects(eLink, eSkill); - } - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); - effect eDur2 = EffectVisualEffect(507); - eLink = EffectLinkEffects(eLink, eDur); - - effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC); - effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF)); - - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); - - eHP = ExtraordinaryEffect(eHP); - eLink = ExtraordinaryEffect(eLink); - - if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) - { - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur2, OBJECT_SELF, RoundsToSeconds(nDuration)); - } - float fDelay; - while(GetIsObjectValid(oTarget)) - { - if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) - { - // * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song - if (!GetHasEffect(EFFECT_TYPE_DEAF,oTarget)) - { - if(!GetHasFeatEffect(871, oTarget)&& !GetHasSpellEffect(GetSpellId(),oTarget)) - { - if (nHP > 0) - { - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget); - DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget)); - } - - if (!GetIsDead(oTarget)) - { - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); - DelayCommand(GetRandomDelay(0.1,0.5),ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - } - } - } - else - { - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget); - } - } - - oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); - } - DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS); -} diff --git a/_removed files/x2_s2_dragknght.nss b/_removed files/x2_s2_dragknght.nss deleted file mode 100644 index bb1757ba..00000000 --- a/_removed files/x2_s2_dragknght.nss +++ /dev/null @@ -1,46 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Dragon Knight -//:: X2_S2_DragKnght -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons an adult red dragon for you to - command. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Feb 07, 2003 -//::////////////////////////////////////////////// -#include "x2_inc_toollib" - -#include "x2_inc_spellhook" -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - */ - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - - //Declare major variables - int nDuration = 20; - effect eSummon; - effect eVis = EffectVisualEffect(460); - eSummon = EffectSummonCreature("epicdragon1",481,0.0f,TRUE); - - // * make it so dragon cannot be dispelled - eSummon = ExtraordinaryEffect(eSummon); - //Apply the summon visual and summon the dragon. - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon,GetSpellTargetLocation(), RoundsToSeconds(nDuration)); - DelayCommand(1.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis,GetSpellTargetLocation())); -} - - diff --git a/_removed files/x2_s2_dthmsttch.nss b/_removed files/x2_s2_dthmsttch.nss deleted file mode 100644 index 77c97dd3..00000000 --- a/_removed files/x2_s2_dthmsttch.nss +++ /dev/null @@ -1,85 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Deathless Master Touch -//:: X2_S2_dthmsttch -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - Pale Master may use their undead arm to - kill their foes. - - -Requires melee Touch attack - -Save vs DC 17 to resist - - Epic: - -SaveDC raised by +1 for each 2 levels past 10th -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: July, 24, 2003 -//::////////////////////////////////////////////// - - -#include "NW_I0_SPELLS" -#include "X2_inc_switches" - -void main() -{ - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - - //Declare major variables - object oTarget = GetSpellTargetObject(); - //object oCaster = GetCurrentHitPoints(OBJECT_SELF); - int nCasterLvl = GetCasterLevel(OBJECT_SELF); - int nMetaMagic = GetMetaMagicFeat(); - - //Declare effects - effect eSlay = EffectDeath(); - effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH); - int nSave = 24; - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - - //* GZ: Handle Epic Save Progression - int nEpicMod = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF) - 10 ; - if (nEpicMod>0) - { - nSave += (nEpicMod/2); - } - - //Link effects - - if(TouchAttackMelee(oTarget,TRUE)>0) - { - //Signal spell cast at event - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 624)); - //Saving Throw - - if ((GetCreatureSize(oTarget)>CREATURE_SIZE_LARGE )&& (GetModuleSwitchValue(MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH) == TRUE)) - { - return; // creature too large to be affected. - } - - if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nSave, SAVING_THROW_TYPE_NEGATIVE)) - { - //Apply effects to target and caster - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget); - } - } - -} diff --git a/_removed files/x2_s2_gwburn.nss b/_removed files/x2_s2_gwburn.nss deleted file mode 100644 index 8b2387f7..00000000 --- a/_removed files/x2_s2_gwburn.nss +++ /dev/null @@ -1,66 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Outsider Shape - Azer - Fire stream -//:: x2_s2_gwburn -//:: Copyright (c) 2003Bioware Corp. -//::////////////////////////////////////////////// -/* - - Azer shoot fire ability. The fire they breathe - is natural, so there is no SR check against it - -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: July, 07, 2003 -//::////////////////////////////////////////////// - -#include "x2_inc_shifter" -void main() -{ - //-------------------------------------------------------------------------- - // Enforce artifical use limit on that ability - //-------------------------------------------------------------------------- - /* if (ShifterDecrementGWildShapeSpellUsesLeft() <1 ) - { - FloatingTextStrRefOnCreature(83576, OBJECT_SELF); - return; - } - */ - - //-------------------------------------------------------------------------- - // Create VFX - //-------------------------------------------------------------------------- - object oTarget = GetSpellTargetObject(); - int nTouch = TouchAttackRanged(oTarget); - effect eRay = EffectBeam(444,OBJECT_SELF,BODY_NODE_CHEST,(nTouch == 0)); - effect eDur = EffectVisualEffect(498); - - - float fDelay = GetDistanceBetween(oTarget, OBJECT_SELF)/14; - - ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eRay,oTarget,1.7f); - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - - - if (nTouch > 0) - { - int nDamage = d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); - if (nTouch ==2) - { - nDamage += d4( GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3 ) + GetAbilityModifier(ABILITY_WISDOM,OBJECT_SELF); - } - int nDC = ShifterGetSaveDC(OBJECT_SELF,SHIFTER_DC_NORMAL); - nDamage = GetReflexAdjustedDamage(nDamage,oTarget,nDC,SAVING_THROW_TYPE_FIRE,OBJECT_SELF); - effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE); - effect eHit = EffectVisualEffect(VFX_IMP_FLAME_S); - - eHit = EffectLinkEffects(eDamage,eHit); - DelayCommand(fDelay,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eDur,oTarget,3.0f)); - DelayCommand(fDelay+0.3f,ApplyEffectToObject(DURATION_TYPE_INSTANT,eHit,oTarget,3.0f)); - } - - -} - - - diff --git a/_removed files/x2_s2_gwildshp.nss b/_removed files/x2_s2_gwildshp.nss deleted file mode 100644 index 0f668ba8..00000000 --- a/_removed files/x2_s2_gwildshp.nss +++ /dev/null @@ -1,458 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Greater Wild Shape, Humanoid Shape -//:: x2_s2_gwildshp -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - Allows the character to shift into one of these - forms, gaining special abilities - Credits must be given to mr_bumpkin from the NWN - community who had the idea of merging item properties - from weapon and armor to the creatures new forms. -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: 2003-07-02 -//::////////////////////////////////////////////// -//:: Modified By: Iznoghoud -/* -What this script changes: -- Tower shields now carry over their properties just like Small and Large -shields. (Which has been a bug I believe since the original script had 2 checks -for SMALLSHIELD in it, one probably should have been TOWERSHIELD) -- Melee Weapon properties now carry over to the unarmed forms' claws and bite -attacks. -- My last (and most complicated) changes: -1) Now, items with an AC bonus (or penalty) carry over to the shifted form as -the correct type. This means if you wear an amulet of natural armor +4, and a -cloak of protection +5, and you shift to a form that gets all item properties -carried over, you will have the +4 natural armor bonus from the ammy, as well as -the +5 deflection bonus from the cloak. No longer will the highest one override -all the other AC bonuses even if they are a different type. Note that some -forms, such as the dragon, get an inherent natural AC bonus, which may still -override your amulet of natural armor, if the inherent bonus is better. -2) Other "stackable" item properties, like ability bonuses, skill bonuses and -saving throw bonuses, now correctly add up in shifted form. This means if you -have a ring that gives +2 strength, and a ring with +3 strength, and you shift -into a drow warrior, you get +5 strength in shifted form, where you used to get -only +3. (the highest) - --- Modified by StoneDK 2003.12.21 -Added saving of old equip to allow items to be applied without going -through normal shape, should now get item effects even when changing -directly from wyrm to kobold shape. -Added message to player about which items are merged. - --- Modified by Iznoghoud 2003-12-26 -Added storing of Polymorph ID on the player for letting exportallchars() scripts -reapply polymorphing effects when saving - --- Modified by Iznoghoud 2003-12-27 -Added regeneration as a stacking property, bracers now stored correctly for re-shifting, -Added constants for easy configuration. - --- Modified by Iznoghoud January 13 2004 -The bulk of the handling of stacking item properties, as well as the constants -for configuration, are now in ws_inc_shifter, which is included -by this file, and the two druid polymorphing scripts, nw_s2_elemshape and nw_s2_wildshape. -Made the message about which items are merged more explicit. -*/ -//::////////////////////////////////////////////// - -#include "ws_inc_shifter" - -// Main function of the script -void main() -{ - -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(OBJECT_SELF)) -{ - - FloatingTextStringOnCreature("All spells fizzle in town.", OBJECT_SELF); - - return; -} - //-------------------------------------------------------------------------- - // Declare major variables - //-------------------------------------------------------------------------- - object oPC = OBJECT_SELF; - int nSpell = GetSpellId(); - object oTarget = GetSpellTargetObject(); - effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH); - int nShifter = GetLevelByClass(CLASS_TYPE_SHIFTER); - effect ePoly; - int nPoly; - //-------------------------------------------------------------------------- - // Determine which form to use based on spell id, gender and level - //-------------------------------------------------------------------------- - switch (nSpell) - { - //----------------------------------------------------------------------- - // Greater Wildshape I - Wyrmling Shape - //----------------------------------------------------------------------- - case 658: nPoly = POLYMORPH_TYPE_WYRMLING_RED; break; - case 659: nPoly = POLYMORPH_TYPE_WYRMLING_BLUE; break; - case 660: nPoly = POLYMORPH_TYPE_WYRMLING_BLACK; break; - case 661: nPoly = POLYMORPH_TYPE_WYRMLING_WHITE; break; - case 662: nPoly = POLYMORPH_TYPE_WYRMLING_GREEN; break; - //----------------------------------------------------------------------- - // Greater Wildshape II - Minotaur, Gargoyle, Harpy - //----------------------------------------------------------------------- - case 672: if (nShifter < X2_GW2_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_HARPY; - else - nPoly = 97; - break; - case 678: if (nShifter < X2_GW2_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_GARGOYLE; - else - nPoly = 98; - break; - case 680: if (nShifter < X2_GW2_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_MINOTAUR; - else - nPoly = 96; - break; - //----------------------------------------------------------------------- - // Greater Wildshape III - Drider, Basilisk, Manticore - //----------------------------------------------------------------------- - case 670: if (nShifter < X2_GW3_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_BASILISK; - else - nPoly = 99; - break; - case 673: if (nShifter < X2_GW3_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_DRIDER; - else - nPoly = 100; - break; - case 674: if (nShifter < X2_GW3_EPIC_THRESHOLD) - nPoly = POLYMORPH_TYPE_MANTICORE; - else - nPoly = 101; - break; - //----------------------------------------------------------------------- - // Greater Wildshape IV - Dire Tiger, Medusa, MindFlayer - //----------------------------------------------------------------------- - case 679: nPoly = POLYMORPH_TYPE_MEDUSA; break; - case 691: nPoly = 68; break; // Mindflayer - case 694: nPoly = 69; break; // DireTiger - //----------------------------------------------------------------------- - // Humanoid Shape - Kobold Commando, Drow, Lizard Crossbow Specialist - //----------------------------------------------------------------------- - case 682: - if(nShifter< 17) - { - if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow - nPoly = 59; - else - nPoly = 70; - } - else - { - if (GetGender(OBJECT_SELF) == GENDER_MALE) //drow - nPoly = 105; - else - nPoly = 106; - } - break; - case 683: - if(nShifter< 17) - { - nPoly = 82; break; // Lizard - } - else - { - nPoly =104; break; // Epic Lizard - } - case 684: if(nShifter< 17) - { - nPoly = 83; break; // Kobold Commando - } - else - { - nPoly = 103; break; // Kobold Commando - } - //----------------------------------------------------------------------- - // Undead Shape - Spectre, Risen Lord, Vampire - //----------------------------------------------------------------------- - case 704: nPoly = 75; break; // Risen lord - case 705: if (GetGender(OBJECT_SELF) == GENDER_MALE) // vampire - nPoly = 74; - else - nPoly = 77; - break; - case 706: nPoly = 76; break; /// spectre - //----------------------------------------------------------------------- - // Dragon Shape - Red Blue and Green Dragons - //----------------------------------------------------------------------- - case 707: nPoly = 72; break; // Ancient Red Dragon - case 708: nPoly = 71; break; // Ancient Blue Dragon - case 709: nPoly = 73; break; // Ancient Green Dragon - //----------------------------------------------------------------------- - // Outsider Shape - Rakshasa, Azer Chieftain, Black Slaad - //----------------------------------------------------------------------- - case 733: if (GetGender(OBJECT_SELF) == GENDER_MALE) //azer - nPoly = 85; - else // anything else is female - nPoly = 86; - break; - case 734: if (GetGender(OBJECT_SELF) == GENDER_MALE) //rakshasa - nPoly = 88; - else // anything else is female - nPoly = 89; - break; - case 735: nPoly =87; break; // slaad - //----------------------------------------------------------------------- - // Construct Shape - Stone Golem, Iron Golem, Demonflesh Golem - //----------------------------------------------------------------------- - case 738: nPoly =91; break; // stone golem - case 739: nPoly =92; break; // demonflesh golem - case 740: nPoly =90; break; // iron golem - } - //-------------------------------------------------------------------------- - // Determine which items get their item properties merged onto the shifters - // new form. - //-------------------------------------------------------------------------- - int bWeapon; - int bArmor; - int bItems; - int bCopyGlovesToClaws = FALSE; - - bWeapon = ShifterMergeWeapon(nPoly); - - if ( GW_ALWAYS_COPY_ARMOR_PROPS ) - bArmor = TRUE; - else - bArmor = ShifterMergeArmor(nPoly); - - if ( GW_ALWAYS_COPY_ITEM_PROPS ) - bItems = TRUE; - else - bItems = ShifterMergeItems(nPoly); - - // Send message to PC about which items get merged to this form - string sMerge; - sMerge = "Merged: "; // : This is a color code that makes the text behind it sort of light blue. - if(bArmor) sMerge += "Armor, Helmet, Shield"; - if(bItems) sMerge += ", Rings, Amulet, Cloak, Boots, Belt, Bracers"; - if( bWeapon || GW_COPY_WEAPON_PROPS_TO_UNARMED == 1 ) - sMerge += ", Weapon"; - else if ( GW_COPY_WEAPON_PROPS_TO_UNARMED == 2 ) - sMerge += ", Gloves to unarmed attacks"; - else if (GW_COPY_WEAPON_PROPS_TO_UNARMED == 3 ) - sMerge += ", Weapon (if you had one equipped) or gloves to unarmed attacks"; - else - sMerge += ", No weapon or gloves to unarmed attacks"; - SendMessageToPC(oTarget,sMerge + "."); - - // Store which items should transfer to this polymorph type. (For exportallchar scripts) - SetLocalInt(oTarget, "GW_PolyID", nPoly); - SetLocalInt(oTarget, "GW_bWeapon", bWeapon ); - SetLocalInt(oTarget, "GW_bArmor", bArmor ); - SetLocalInt(oTarget, "GW_bItems", bItems ); - - //-------------------------------------------------------------------------- - // Store the old objects so we can access them after the character has - // changed into his new form - //-------------------------------------------------------------------------- - object oWeaponOld; - object oArmorOld; - object oRing1Old ; - object oRing2Old; - object oAmuletOld; - object oCloakOld ; - object oBootsOld ; - object oBeltOld ; - object oHelmetOld; - object oShield ; - object oBracerOld; - object oHideOld; - //Assume the normal shape doesn't have a creature skin object. - //If using a subracesystem or something else that places a skin on the normal shape - //another condition is needed to decide whether or not to store current items. - //One way could be to scan all effects to see whether one is a polymorph effect. - int nPolyed = GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF)); - // If there is a creature armor see if it is a creature hide put - // on the unpolymorphed player by scanning for a polymorph effect. - if ( nPolyed ) - nPolyed = ( ScanForPolymorphEffect(OBJECT_SELF) != -2 ); - if(! nPolyed) - { - //if not polymorphed get items worn and store on player. - oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); - oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF); - oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF); - oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF); - oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF); - oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF); - oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF); - oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF); - oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF); - oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF); - oBracerOld = GetItemInSlot(INVENTORY_SLOT_ARMS,OBJECT_SELF); - oHideOld = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); - SetLocalObject(OBJECT_SELF,"GW_OldWeapon",oWeaponOld); - SetLocalObject(OBJECT_SELF,"GW_OldArmor",oArmorOld); - SetLocalObject(OBJECT_SELF,"GW_OldRing1",oRing1Old); - SetLocalObject(OBJECT_SELF,"GW_OldRing2",oRing2Old); - SetLocalObject(OBJECT_SELF,"GW_OldAmulet",oAmuletOld); - SetLocalObject(OBJECT_SELF,"GW_OldCloak",oCloakOld); - SetLocalObject(OBJECT_SELF,"GW_OldBoots",oBootsOld); - SetLocalObject(OBJECT_SELF,"GW_OldBelt",oBeltOld); - SetLocalObject(OBJECT_SELF,"GW_OldHelmet",oHelmetOld); - SetLocalObject(OBJECT_SELF,"GW_OldBracer",oBracerOld); - SetLocalObject(OBJECT_SELF,"GW_OldHide",oHideOld); - if (GetIsObjectValid(oShield)) - { - if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD && - GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD && - GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD) - { - oShield = OBJECT_INVALID; - } - } - SetLocalObject(OBJECT_SELF,"GW_OldShield",oShield); - - } - else - { - //if already polymorphed use items stored earlier. - oWeaponOld = GetLocalObject(OBJECT_SELF,"GW_OldWeapon"); - oArmorOld = GetLocalObject(OBJECT_SELF,"GW_OldArmor"); - oRing1Old = GetLocalObject(OBJECT_SELF,"GW_OldRing1"); - oRing2Old = GetLocalObject(OBJECT_SELF,"GW_OldRing2"); - oAmuletOld = GetLocalObject(OBJECT_SELF,"GW_OldAmulet"); - oCloakOld = GetLocalObject(OBJECT_SELF,"GW_OldCloak"); - oBootsOld = GetLocalObject(OBJECT_SELF,"GW_OldBoots"); - oBeltOld = GetLocalObject(OBJECT_SELF,"GW_OldBelt"); - oHelmetOld = GetLocalObject(OBJECT_SELF,"GW_OldHelmet"); - oShield = GetLocalObject(OBJECT_SELF,"GW_OldShield"); - oBracerOld = GetLocalObject(OBJECT_SELF,"GW_OldBracer"); - oHideOld = GetLocalObject(OBJECT_SELF,"GW_OldHide"); - } - - //-------------------------------------------------------------------------- - // Here the actual polymorphing is done - //-------------------------------------------------------------------------- - ePoly = EffectPolymorph(nPoly); - //-------------------------------------------------------------------------- - // Iznoghoud: Link the stackable properties as permanent bonuses to the - // Polymorph effect, instead of putting them on the creature hide. They will - // properly disappear as soon as the polymorph is ended. - //-------------------------------------------------------------------------- - ePoly = AddStackablePropertiesToPoly ( oPC, ePoly, bWeapon, bItems, bArmor, oArmorOld, oRing1Old, oRing2Old, oAmuletOld, oCloakOld, oBracerOld, oBootsOld, oBeltOld, oHelmetOld, oShield, oWeaponOld, oHideOld); - ePoly = ExtraordinaryEffect(ePoly); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); - ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, OBJECT_SELF); - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - //-------------------------------------------------------------------------- - // This code handles the merging of item properties - //-------------------------------------------------------------------------- - object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF); - object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF); - object oClawLeft = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,OBJECT_SELF); - object oClawRight = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,OBJECT_SELF); - object oBite = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,OBJECT_SELF); - //-------------------------------------------------------------------------- - // ...Weapons - //-------------------------------------------------------------------------- - if (bWeapon) - { - //---------------------------------------------------------------------- - // GZ: 2003-10-20 - // Sorry, but I was forced to take that out, it was confusing people - // and there were problems with updating the stats sheet. - //---------------------------------------------------------------------- - /* if (!GetIsObjectValid(oWeaponOld)) - { - //------------------------------------------------------------------ - // If we had no weapon equipped before, remove the old weapon - // to allow monks to change into unarmed forms by not equipping any - // weapon before polymorphing - //------------------------------------------------------------------ - DestroyObject(oWeaponNew); - } - else*/ - { - //------------------------------------------------------------------ - // Merge item properties... - //------------------------------------------------------------------ - WildshapeCopyWeaponProperties(oTarget, oWeaponOld,oWeaponNew); - } - } - else { - switch ( GW_COPY_WEAPON_PROPS_TO_UNARMED ) - { - case 1: // Copy over weapon properties to claws/bite - WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); - WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); - WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); - break; - case 2: // Copy over glove properties to claws/bite - WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); - WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); - WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); - bCopyGlovesToClaws = TRUE; - break; - case 3: // Copy over weapon properties to claws/bite if wearing a weapon, otherwise copy gloves - if ( GetIsObjectValid(oWeaponOld) ) - { - WildshapeCopyNonStackProperties(oWeaponOld,oClawLeft, TRUE); - WildshapeCopyNonStackProperties(oWeaponOld,oClawRight, TRUE); - WildshapeCopyNonStackProperties(oWeaponOld,oBite, TRUE); - } - else - { - WildshapeCopyNonStackProperties(oBracerOld,oClawLeft, FALSE); - WildshapeCopyNonStackProperties(oBracerOld,oClawRight, FALSE); - WildshapeCopyNonStackProperties(oBracerOld,oBite, FALSE); - bCopyGlovesToClaws = TRUE; - } - break; - default: // Do not copy over anything - break; - }; - } - //-------------------------------------------------------------------------- - // ...Armor - //-------------------------------------------------------------------------- - if (bArmor) - { - //---------------------------------------------------------------------- - // Merge item properties from armor and helmet... - //---------------------------------------------------------------------- - WildshapeCopyNonStackProperties(oArmorOld,oArmorNew); - WildshapeCopyNonStackProperties(oHelmetOld,oArmorNew); - WildshapeCopyNonStackProperties(oShield,oArmorNew); - WildshapeCopyNonStackProperties(oHideOld,oArmorNew); - } - //-------------------------------------------------------------------------- - // ...Magic Items - //-------------------------------------------------------------------------- - if (bItems) - { - //---------------------------------------------------------------------- - // Merge item properties from from rings, amulets, cloak, boots, belt - // Iz: And bracers, in case oBracerOld gets set to a valid object. - //---------------------------------------------------------------------- - WildshapeCopyNonStackProperties(oRing1Old,oArmorNew); - WildshapeCopyNonStackProperties(oRing2Old,oArmorNew); - WildshapeCopyNonStackProperties(oAmuletOld,oArmorNew); - WildshapeCopyNonStackProperties(oCloakOld,oArmorNew); - WildshapeCopyNonStackProperties(oBootsOld,oArmorNew); - WildshapeCopyNonStackProperties(oBeltOld,oArmorNew); - // Because Bracers can have On Hit Cast Spell type properties we should - // avoid copying the bracers twice. Otherwise the player can get that On - // Hit effect both when hitting, and getting hit. - if ( bCopyGlovesToClaws == FALSE ) - WildshapeCopyNonStackProperties(oBracerOld,oArmorNew); - } - //-------------------------------------------------------------------------- - // Set artificial usage limits for special ability spells to work around - // the engine limitation of not being able to set a number of uses for - // spells in the polymorph radial - //-------------------------------------------------------------------------- - ShifterSetGWildshapeSpellLimits(nSpell); -} - diff --git a/_removed files/x2_s2_hellball.nss b/_removed files/x2_s2_hellball.nss deleted file mode 100644 index 660a0a01..00000000 --- a/_removed files/x2_s2_hellball.nss +++ /dev/null @@ -1,144 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Hellball -//:: X2_S2_HELLBALL -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - Long range area of effect spell - 10d6 sonic, acid, fire and lightning damage to all - objects in the area - - 10d6 points of negative energy damage to caster - if MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER switch - was enabled on the module. - - This spell is supposed to hurt the caster if he - is stupid enough to stand in the area of effect - when all hell breaks loose. It will hurt other - players allied with the caster as well. These - effects are dependent on your difficulty setting - - Save is 20 + relevant ability score, or, when cast - by a placeable, equal to the placeables WILL Save - - There is no benefit from the evasion feats here - as the are of the spell is too large to avoid it - - -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Noobs, Georg Zoeller -//:: Created On: 2003-08-20 -//::////////////////////////////////////////////// - - -#include "X0_I0_SPELLS" -#include "x2_i0_spells" -#include "x2_inc_spellhook" - - -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - //Declare major variables - int nDamage1, nDamage2, nDamage3, nDamage4; - float fDelay; - effect eExplode = EffectVisualEffect(464); - effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); - effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_L); - effect eVis3 = EffectVisualEffect(VFX_IMP_SONIC); - - int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); - - // if this option has been enabled, the caster will take damage for casting - // epic spells, as descripbed in the ELHB - if (GetModuleSwitchValue( MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER) == TRUE) - { - effect eCast = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); - int nDamage5 = d8(10); - effect eDam5 = EffectDamage(nDamage5, DAMAGE_TYPE_NEGATIVE); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, OBJECT_SELF); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam5, OBJECT_SELF); - } - - - - effect eDam1, eDam2, eDam3, eDam4, eDam5, eKnock; - eKnock= EffectKnockdown(); - - location lTarget = GetSpellTargetLocation(); - - ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget); - - object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - - int nTotalDamage; - while (GetIsObjectValid(oTarget)) - { - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - - fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20 + 0.5f; - //Roll damage for each target - nDamage1 = d10(10) + 20; - nDamage2 = d10(10) + 20; - nDamage3 = d10(10) + 20; - nDamage4 = d10(10) + 20; - // no we don't care about evasion. there is no evasion to hellball - if (MySavingThrow(SAVING_THROW_REFLEX,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF,fDelay) >0) - { - nDamage1 /=2; - nDamage2 /=2; - nDamage3 /=2; - nDamage4 /=2; - } - nTotalDamage = nDamage1+nDamage2+nDamage3+nDamage4; - //Set the damage effect - eDam1 = EffectDamage(nDamage1, DAMAGE_TYPE_NEGATIVE); - eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_POSITIVE); - eDam3 = EffectDamage(nDamage3, DAMAGE_TYPE_FIRE); - eDam4 = EffectDamage(nDamage4, DAMAGE_TYPE_SONIC); - - if(nTotalDamage > 0) - { - if (nTotalDamage > 50) - { - DelayCommand(fDelay+0.3f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget,3.0f)); - } - - // Apply effects to the currently selected target. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam1, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam3, oTarget)); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam4, oTarget)); - //This visual effect is applied to the target object not the location as above. This visual effect - //represents the flame that erupts on the target not on the ground. - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget)); - DelayCommand(fDelay+0.2f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget)); - DelayCommand(fDelay+0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget)); - } - } - //Select the next target within the spell shape. - oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); - } - - -} - diff --git a/_removed files/x2_s2_mghtyrage.nss b/_removed files/x2_s2_mghtyrage.nss deleted file mode 100644 index 350ec4d2..00000000 --- a/_removed files/x2_s2_mghtyrage.nss +++ /dev/null @@ -1,62 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Mighty Rage -//:: X2_S2_MghtyRage -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The Str and Con of the Barbarian increases, - Will Save are +2, AC -2. - Greater Rage starts at level 15. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: May 16, 2003 -//::////////////////////////////////////////////// -#include "x2_i0_spells" -void main() -{ - if(!GetHasFeatEffect(FEAT_BARBARIAN_RAGE)) - { - //Declare major variables - int nLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN); - PlayVoiceChat(VOICE_CHAT_BATTLECRY1); - //Determine the duration by getting the con modifier after being modified - int nCon = 3 + GetAbilityModifier(ABILITY_CONSTITUTION) + 8; - effect eStr = EffectAbilityIncrease(ABILITY_CONSTITUTION, 8); - effect eCon = EffectAbilityIncrease(ABILITY_STRENGTH, 8); - effect eSave = EffectSavingThrowIncrease(SAVING_THROW_WILL, 4); - effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); - //Added by Guile(This offsets the +12 Cap Some. - effect eAtk; - eAtk = EffectAttackIncrease(6); - eAtk = SupernaturalEffect(eAtk); - effect eDmg; - eDmg = EffectDamageIncrease(DAMAGE_BONUS_8, DAMAGE_TYPE_BLUDGEONING); - eDmg = SupernaturalEffect(eDmg); - effect eHP; - eHP = EffectTemporaryHitpoints(nLevel * 6); - eHP = SupernaturalEffect(eHP); - - effect eLink = EffectLinkEffects(eCon, eStr); - eLink = EffectLinkEffects(eLink, eSave); - eLink = EffectLinkEffects(eLink, eDur); - SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); - //Make effect extraordinary - eLink = ExtraordinaryEffect(eLink); - effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); //Change to the Rage VFX - - if (nCon > 0) - { - //Apply the VFX impact and effects - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nCon)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF) ; - //This part was added by Guile to offset +12 Cap. - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAtk, OBJECT_SELF, RoundsToSeconds(nCon)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDmg, OBJECT_SELF, RoundsToSeconds(nCon)); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nCon)); - - // 2003-07-08, Georg: Rage Epic Feat Handling - CheckAndApplyEpicRageFeats(nCon); - } - } -} diff --git a/_removed files/x2_s2_mumdust.nss b/_removed files/x2_s2_mumdust.nss deleted file mode 100644 index c596cc4d..00000000 --- a/_removed files/x2_s2_mumdust.nss +++ /dev/null @@ -1,46 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Mummy Dust -//:: X2_S2_MumDust -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - Summons a strong warrior mummy for you to - command. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Feb 07, 2003 -//::////////////////////////////////////////////// - -#include "x2_inc_spellhook" -void main() -{ - /* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - - //Declare major variables - int nDuration = 24; - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - effect eSummon; - //Summon the appropriate creature based on the summoner level - //Warrior Mummy - eSummon = EffectSummonCreature("epicmummy1",496,1.0f); - eSummon = ExtraordinaryEffect(eSummon); - //Apply the summon visual and summon the undead. - //ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); -} - - diff --git a/_removed files/x2_s2_ruin.nss b/_removed files/x2_s2_ruin.nss deleted file mode 100644 index 46c168f3..00000000 --- a/_removed files/x2_s2_ruin.nss +++ /dev/null @@ -1,66 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Greater Ruin -//:: X2_S2_Ruin -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* -// The caster deals 35d6 damage to a single target - fort save for half damage -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Nov 18, 2002 -//::////////////////////////////////////////////// - -#include "x2_I0_SPELLS" -#include "x2_inc_spellhook" -#include "x0_I0_SPELLS" -void main() -{ - - /* - Spellcast Hook Code - Added 2003-06-20 by Georg - If you want to make changes to all spells, - check x2_inc_spellhook.nss to find out more - - */ - - if (!X2PreSpellCastCode()) - { - // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell - return; - } - - // End of Spell Cast Hook - - //Declare major variables - object oTarget = GetSpellTargetObject(); - - - float fDist = GetDistanceBetween(OBJECT_SELF, oTarget); - float fDelay = fDist/(3.0 * log(fDist) + 2.0); - - int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF); - - if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)) - { - //Fire cast spell at event for the specified target - SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - //Roll damage - int nDam = d10(15) + 150; - //Set damage effect - - if (MySavingThrow(SAVING_THROW_FORT,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF) != 0 ) - { - nDam /=2; - } - - effect eDam = EffectDamage(nDam, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_PLUS_TWENTY); - ApplyEffectAtLocation (DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oTarget)); - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(487), oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget); - ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM), oTarget); - DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); - } -} diff --git a/_removed files/x2_s2_sumundead.nss b/_removed files/x2_s2_sumundead.nss deleted file mode 100644 index 111d3036..00000000 --- a/_removed files/x2_s2_sumundead.nss +++ /dev/null @@ -1,72 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Summon Undead -//:: X2_S2_SumUndead -//:: Copyright (c) 2001 Bioware Corp. -//::////////////////////////////////////////////// -/* - The level of the Pale Master determines the - type of undead that is summoned. -*/ -//::////////////////////////////////////////////// -//:: Created By: Andrew Nobbs -//:: Created On: Feb 05, 2003 -//:: Updated By: Georg Zoeller, Oct 2003 -//::////////////////////////////////////////////// - -void PMUpgradeSummon(object oSelf, string sScript) -{ - object oSummon = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oSelf); - ExecuteScript ( sScript, oSummon); -} - -void main() -{ - //Declare major variables - int nCasterLevel = GetLevelByClass(CLASS_TYPE_PALEMASTER,OBJECT_SELF); - int nDuration = 14 + nCasterLevel; - - - //effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD); - effect eSummon; - //Summon the appropriate creature based on the summoner level - if (nCasterLevel <= 6) - { - //Ghoul - eSummon = EffectSummonCreature("shadow01",VFX_IMP_HARM,0.0f,0); - } - else if (nCasterLevel <= 8) - { - //Shadow - eSummon = EffectSummonCreature("doomknight01",VFX_IMP_HARM,0.0f,0); - } - else if (nCasterLevel <= 10) - { - //Ghast - eSummon = EffectSummonCreature("shadfiend01",VFX_IMP_HARM,0.0f,1); - } - else if (nCasterLevel <= 14) - { - //Wight - eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); - } - else if (nCasterLevel >= 15) - { - //Wraith - eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD,0.0f,1); - } - // * Apply the summon visual and summon the two undead. - // * ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_LOS_EVIL_10),GetSpellTargetLocation()); - ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration)); - - // * If the character has a special pale master item equipped (variable set via OnEquip) - // * run a script on the summoned monster. - string sScript = GetLocalString(OBJECT_SELF,"X2_S_PM_SPECIAL_ITEM"); - if (sScript != "") - { - object oSelf = OBJECT_SELF; - DelayCommand(1.0,PMUpgradeSummon(oSelf,sScript)); - } -} - - diff --git a/_removed files/x2_s3_demitouch.nss b/_removed files/x2_s3_demitouch.nss deleted file mode 100644 index f2464576..00000000 --- a/_removed files/x2_s3_demitouch.nss +++ /dev/null @@ -1,96 +0,0 @@ -//:://///////////////////////////////////////////// -//:: Demilich paralzying touch -//:: x2_s3_demitouch -//:: Copyright (c) 2003 Bioware Corp. -//::////////////////////////////////////////////// -/* - On touch a demilich can paralyze an opponent. - Fort vs DC 38 - - Duration varies by game difficulty between - 1 and 5 rounds - (Sorry, no permanent paralyze, its just not fun) -*/ -//::////////////////////////////////////////////// -//:: Created By: Georg Zoeller -//:: Created On: 2003-08-27 -//::////////////////////////////////////////////// - -#include "NW_I0_SPELLS" -void main() -{ - - object oItem; // The item casting triggering this spellscript - object oSpellTarget; // On a weapon: The one being hit. On an armor: The one hitting the armor - object oSpellOrigin; // On a weapon: The one wielding the weapon. On an armor: The one wearing an armor - - // fill the variables - oSpellOrigin = OBJECT_SELF; - oSpellTarget = GetSpellTargetObject(); - oItem = GetSpellCastItem(); - -object oCaster = OBJECT_SELF; -if(GetLocalInt(GetArea(OBJECT_SELF), "NOCAST")==2 && !GetIsDM(oCaster)) -{ - -//Make them stop what they are doing instantly! -AssignCommand(oCaster, ClearAllActions()); - -//Though the player may show animation, nothing happens! :) -//SetModuleOverrideSpellScriptFinished(); - -FloatingTextStringOnCreature("All spells fizzle in town.", oCaster); - -return; -} - -/////////////////////////////////////////////////////////////////////////////// -//Handle Jail... -//NO ITEMS WORK IN JAIL!!! -if(GetLocalInt(GetArea(oCaster), "JAIL")==1) -{ - AssignCommand(oCaster, ClearAllActions()); - //Though the player may show animation, nothing happens! :) - //SetModuleOverrideSpellScriptFinished(); - - return; -} - -/////////////////////////////////////////////////////////////////////////////// - - - int nDuration = 3; - int nDiff = GetGameDifficulty(); - - if (nDiff == GAME_DIFFICULTY_CORE_RULES) - { - nDuration = 4; - } - else if (nDiff == GAME_DIFFICULTY_DIFFICULT) - { - nDuration = 6; - } - else if (nDiff == GAME_DIFFICULTY_VERY_EASY) - { - nDuration =2; - } - - if (GetIsObjectValid(oItem)) - { - SignalEvent(oSpellTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId())); - if(!GetHasSpellEffect(GetSpellId(),oSpellTarget)) - { - if(!MySavingThrow(SAVING_THROW_FORT, oSpellTarget,36 , SAVING_THROW_TYPE_ALL)) - { - effect eVis = EffectVisualEffect(VFX_IMP_STUN); - effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED); - effect ePara = EffectParalyze(); - ePara = SupernaturalEffect(ePara); - ePara = EffectLinkEffects(eDur,ePara); - ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oSpellTarget); - ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePara,oSpellTarget,RoundsToSeconds(nDuration)); - } - } - } - -}