From 282b33632119571985982fc9f9db70a7bd20548d Mon Sep 17 00:00:00 2001 From: Jaysyn904 <68194417+Jaysyn904@users.noreply.github.com> Date: Sun, 24 May 2026 13:38:28 -0400 Subject: [PATCH] 2026/05/24 Afternoon Update Fixed Contingent Resurrection from stealing epic spell slots. Fixed bonus spell slot itemprops for newspellbook casters. (@lightbeard) Fixed taking Ability Focus: Eldritch Blast from bricking a first level character. --- .../trunk/epicspellscripts/ss_ep_cont_resur.nss | 9 ++++++--- nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss | 14 +++++--------- nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss b/nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss index a350fcc7..9a8fbe5f 100644 --- a/nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss +++ b/nwn/nwnprc/trunk/epicspellscripts/ss_ep_cont_resur.nss @@ -71,9 +71,12 @@ void main() void ContingencyResurrect(object oTarget, int nCount, object oCaster) { - // If the contingency has been turned off, terminate HB - if(!GetLocalInt(oCaster, "nContingentRez")) - return; + // If the contingency has been turned off, terminate HB and restore spellslot + if(!GetLocalInt(oCaster, "nContingentRez")) + { + RestoreSpellSlotForCaster(oCaster); + return; + } // If the target isn't dead, just toss out a notice that the heartbeat is running if(!GetIsDead(oTarget)) diff --git a/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss b/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss index dd852f0b..776b3900 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss @@ -490,14 +490,10 @@ int CheckPRCLimitations(object oItem, object oPC = OBJECT_INVALID) if(bEquip || bUnequip) { int nSubType = GetItemPropertySubType(ipTest); - int nCost = GetItemPropertyCostTable(ipTest); - SetLocalInt(oPC, - "PRC_IPRPBonSpellSlots_" + IntToString(nSubType) + "_" + IntToString(nCost), - GetLocalInt(oPC, - "PRC_IPRPBonSpellSlots_" + IntToString(nSubType) + "_" + IntToString(nCost) - ) - + (bEquip ? 1 : -1) - ); + int nCost = GetItemPropertyCostTableValue(ipTest); + string sVar = "PRC_IPRPBonSpellSlots_" + IntToString(nSubType) + "_" + IntToString(nCost); + + SetLocalInt(oPC, sVar, GetLocalInt(oPC, sVar) + (bEquip ? 1 : -1)); } } else if(ipType == ITEM_PROPERTY_WIZARDRY) @@ -557,4 +553,4 @@ void CheckForPnPHolyAvenger(object oItem) } //:: Test Void -//void main (){} \ No newline at end of file +//void main (){} diff --git a/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss b/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss index dd2266c2..4fc503fa 100644 --- a/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss +++ b/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss @@ -176,7 +176,7 @@ int CheckDivineGifts(object oPC = OBJECT_SELF) int CheckInvokerAbilityFocus(object oPC = OBJECT_SELF) { - if (GetHasFeat(FEAT_ABFOC_ELDRITCH_BLAST, oPC) && !GetHasInvocation(INVOKE_ELDRITCH_BLAST, oPC)) return TRUE; + if (GetHasFeat(FEAT_ABFOC_ELDRITCH_BLAST, oPC) && !GetHasFeat(FEAT_ELDRITCH_BLAST)) return TRUE; if (GetHasFeat(FEAT_ABFOC_ELDRITCH_CHAIN, oPC) && !GetHasInvocation(INVOKE_ELDRITCH_CHAIN, oPC)) return TRUE; if (GetHasFeat(FEAT_ABFOC_ELDRITCH_CONE, oPC) && !GetHasInvocation(INVOKE_ELDRITCH_CONE, oPC)) return TRUE; if (GetHasFeat(FEAT_ABFOC_ELDRITCH_DOOM, oPC) && !GetHasInvocation(INVOKE_ELDRITCH_DOOM, oPC)) return TRUE;