202/05/24 Evening Update
Archivist should use INT for epic spell DCs, not WIS. Fixed Sublime Chord epic spell DCs.
This commit is contained in:
@@ -835,12 +835,24 @@ int GetEpicSpellSaveDC(object oCaster = OBJECT_SELF, object oTarget = OBJECT_INV
|
|||||||
int iBeg = GetPrCAdjustedCasterLevel(CLASS_TYPE_BEGUILER, oCaster); // int determines DC
|
int iBeg = GetPrCAdjustedCasterLevel(CLASS_TYPE_BEGUILER, oCaster); // int determines DC
|
||||||
int iTpl = GetPrCAdjustedCasterLevel(CLASS_TYPE_TEMPLAR, oCaster); // cha determines DC
|
int iTpl = GetPrCAdjustedCasterLevel(CLASS_TYPE_TEMPLAR, oCaster); // cha determines DC
|
||||||
|
|
||||||
|
// Sublime Chord uses the primary arcane class for caster level calculation
|
||||||
|
int iSCh;
|
||||||
|
if(GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oCaster) > 0)
|
||||||
|
{
|
||||||
|
int nPrimaryArcane = GetPrimaryArcaneClass(oCaster);
|
||||||
|
iSCh = GetPrCAdjustedCasterLevel(nPrimaryArcane, oCaster);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
iSCh = 0;
|
||||||
|
}
|
||||||
|
|
||||||
int iBest = 0;
|
int iBest = 0;
|
||||||
int iAbility;
|
int iAbility;
|
||||||
if(nSpellID == -1)
|
if(nSpellID == -1)
|
||||||
nSpellID = PRCGetSpellId();
|
nSpellID = PRCGetSpellId();
|
||||||
|
|
||||||
if (iArc > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iWit; }
|
if (iArc > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iArc; }
|
||||||
if (iTpl > iBest) { iAbility = ABILITY_CHARISMA; iBest = iTpl; }
|
if (iTpl > iBest) { iAbility = ABILITY_CHARISMA; iBest = iTpl; }
|
||||||
if (iWiz > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iWiz; }
|
if (iWiz > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iWiz; }
|
||||||
if (iWMa > iBest) { iAbility = ABILITY_CHARISMA; iBest = iWMa; }
|
if (iWMa > iBest) { iAbility = ABILITY_CHARISMA; iBest = iWMa; }
|
||||||
@@ -849,6 +861,7 @@ int GetEpicSpellSaveDC(object oCaster = OBJECT_SELF, object oTarget = OBJECT_INV
|
|||||||
if (iWit > iBest) { iAbility = ABILITY_WISDOM; iBest = iWit; }
|
if (iWit > iBest) { iAbility = ABILITY_WISDOM; iBest = iWit; }
|
||||||
if (iBeg > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iBeg; }
|
if (iBeg > iBest) { iAbility = ABILITY_INTELLIGENCE; iBest = iBeg; }
|
||||||
if (iDiv > iBest) { iAbility = ABILITY_WISDOM; iBest = iDiv; }
|
if (iDiv > iBest) { iAbility = ABILITY_WISDOM; iBest = iDiv; }
|
||||||
|
if (iSCh > iBest) { iAbility = ABILITY_CHARISMA; iBest = iSCh; }
|
||||||
|
|
||||||
int nDC;
|
int nDC;
|
||||||
if (iBest) nDC = 20 + GetAbilityModifier(iAbility, oCaster);
|
if (iBest) nDC = 20 + GetAbilityModifier(iAbility, oCaster);
|
||||||
|
|||||||
@@ -721,13 +721,21 @@ int PRCGetLastSpellCastClass(object oCaster = OBJECT_SELF)
|
|||||||
if(nClass == CLASS_TYPE_INVALID && GetSpellCastItem() == OBJECT_INVALID && NSB_Class)
|
if(nClass == CLASS_TYPE_INVALID && GetSpellCastItem() == OBJECT_INVALID && NSB_Class)
|
||||||
nClass = NSB_Class;
|
nClass = NSB_Class;
|
||||||
|
|
||||||
|
// If caster has Sublime Chord levels and is casting an epic spell, always use Sublime Chord
|
||||||
|
if(GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oCaster) > 0 && nClass != CLASS_TYPE_INVALID)
|
||||||
|
{
|
||||||
|
int nSpellID = PRCGetSpellId(oCaster);
|
||||||
|
// Epic spells are rows 4000-4172 in spells.2da
|
||||||
|
if(nSpellID >= 4000 && nSpellID <= 4172)
|
||||||
|
{
|
||||||
|
nClass = CLASS_TYPE_SUBLIME_CHORD;
|
||||||
|
}
|
||||||
|
}
|
||||||
// If caster has Sublime Chord levels, check if the spell
|
// If caster has Sublime Chord levels, check if the spell
|
||||||
// is outside the base class's native range.
|
// is outside the base class's native range.
|
||||||
if(GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oCaster) > 0 && nClass != CLASS_TYPE_INVALID)
|
if(GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oCaster) > 0 && nClass != CLASS_TYPE_INVALID)
|
||||||
{
|
{
|
||||||
int nSpellID = PRCGetSpellId(oCaster);
|
int nSpellID = PRCGetSpellId(oCaster);
|
||||||
// If the spell is NOT found in the base class's spell list (returns -1),
|
|
||||||
// it must be a Sublime Chord spell (Level 4-9 or Epic).
|
|
||||||
if(PRCGetSpellLevelForClass(nSpellID, nClass) == -1 && nSpellID != -1)
|
if(PRCGetSpellLevelForClass(nSpellID, nClass) == -1 && nSpellID != -1)
|
||||||
{
|
{
|
||||||
nClass = CLASS_TYPE_SUBLIME_CHORD;
|
nClass = CLASS_TYPE_SUBLIME_CHORD;
|
||||||
|
|||||||
Reference in New Issue
Block a user