From 9ae865e0cb7005e8d1d88c925ffa9fb443ab34cf Mon Sep 17 00:00:00 2001 From: Jaysyn904 <68194417+Jaysyn904@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:22:02 -0400 Subject: [PATCH] Update prc_add_spell_dc.nss --- nwn/nwnprc/trunk/include/prc_add_spell_dc.nss | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nwn/nwnprc/trunk/include/prc_add_spell_dc.nss b/nwn/nwnprc/trunk/include/prc_add_spell_dc.nss index fc5a080a..8f3f8df5 100644 --- a/nwn/nwnprc/trunk/include/prc_add_spell_dc.nss +++ b/nwn/nwnprc/trunk/include/prc_add_spell_dc.nss @@ -634,13 +634,7 @@ int PRCGetSpellSaveDC(int nSpellID = -1, int nSchool = -1, object oCaster = OBJE } } - if (GetPRCSwitch(PRC_ACTIVATE_MAX_SPELL_DC_CAP)) - { - if (nDC > GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP)) - { - nDC = GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP); - } - } + return nDC; } @@ -719,6 +713,15 @@ int PRCGetSaveDC(object oTarget, object oCaster, int nSpellID = -1) //target-based adjustments go here nDC += RedWizardDCPenalty(nSpellID, nSchool, oTarget); nDC += ShadowAdeptDCPenalty(nSpellID, nSchool, oTarget); + + if (GetPRCSwitch(PRC_ACTIVATE_MAX_SPELL_DC_CAP)) + { + if (nDC > GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP)) + { + nDC = GetPRCSwitch(PRC_SET_MAX_SPELL_DC_CAP); + } + } + return nDC; }