Spell: resist elements gsf abj.
-
Version: 9085


It doesn't seem like the GSF Abjuration 5 elemental DR turn/level bonus is being added.
-
It does appear to be set up properly, is there a chance the time had passed? A turn is one minute long.
//:://///////////////////////////////////////////// //:: Resist Elements //:: NW_S0_ResEle //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Offers 20 points of elemental resistance. If 30 points of a single elemental type is done to the protected creature the spell fades */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Oct 22, 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 nDuration = GetAdjustedCasterLevel(OBJECT_SELF); int nAmount = 30; int nResistance = 20; int nMetaMagic = GetMetaMagicFeat(); if(GetHasFeat(FEAT_SPELL_FOCUS_ABJURATION, OBJECT_SELF))nAmount = nAmount + 10; effect eCold = EffectDamageResistance(DAMAGE_TYPE_COLD, nResistance, nAmount); effect eFire = EffectDamageResistance(DAMAGE_TYPE_FIRE, nResistance, nAmount); effect eAcid = EffectDamageResistance(DAMAGE_TYPE_ACID, nResistance, nAmount); effect eSonic = EffectDamageResistance(DAMAGE_TYPE_SONIC, nResistance, nAmount); effect eElec = EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, nResistance, nAmount); effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_ELEMENTS); effect eVis = EffectVisualEffect(VFX_IMP_ELEMENTAL_PROTECTION); effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESIST_ELEMENTS, FALSE)); //Link Effects effect eLink2; effect eLink = EffectLinkEffects(eCold, eFire); eLink = EffectLinkEffects(eLink, eAcid); eLink = EffectLinkEffects(eLink, eSonic); eLink = EffectLinkEffects(eLink, eElec); eLink = EffectLinkEffects(eLink, eDur); eLink = EffectLinkEffects(eLink, eDur2); if(GetHasFeat(FEAT_GREATER_SPELL_FOCUS_ABJURATION, OBJECT_SELF)) { eLink2 = EffectDamageResistance(DAMAGE_TYPE_COLD, 5); eLink2 = EffectLinkEffects(eLink2, EffectDamageResistance(DAMAGE_TYPE_FIRE, 5)); eLink2 = EffectLinkEffects(eLink2, EffectDamageResistance(DAMAGE_TYPE_ACID, 5)); eLink2 = EffectLinkEffects(eLink2, EffectDamageResistance(DAMAGE_TYPE_SONIC, 5)); eLink2 = EffectLinkEffects(eLink2, EffectDamageResistance(DAMAGE_TYPE_ELECTRICAL, 5)); } //Enter Metamagic conditions if (nMetaMagic == METAMAGIC_EXTEND) { nDuration = nDuration * 2; //Duration is +100% } RemoveEffectsFromSpell(oTarget, GetSpellId()); //Apply the VFX impact and effects ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, oTarget, TurnsToSeconds(nDuration)); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); } -
I thought it may have been a time issue too, but this was near the start of the quest. I also had ghostly visage on, which should have the same duration, turn/level, so that ruled out that. Of note, I do apply Endure elements before casting resist elements, and endure elements is from my wizard class while resist elements is from ranger. No idea if that changes things.
-
I know there are three kinds of damage absorption forms. Resistance, reduction, and immunity. They stack with each other, but resistance only takes the highest value if stacked with itself, right? It looks like both bonuses are being counted as EffectDamageResistance. One is the spells original value nResistance (which equals 20) and the other is gsf abjur 5, so it looks like it's just using the 20.
-
@Swifty-Willownall That's very likely the issue.
-
So I was able to test this earlier with some Ice elementals in the mountains. They drained the pool of absorption I had, but I noticed afterwards that I still had 5 resist. You just won't notice it until after the pool of absorption is used up.
-
@Swifty-Willownall Thanks closing this up then.
-
M Mr.Moloch moved this topic from Bug Reports