Major script update for 8 class support
Major script update for 8 class support. prc_wipeNSB.nss PRC_S_spellb.nss prc_amagsys_gain.nss - AMSCompatibilityCheck() prc_prereq.nss - Dragonheart(), KnightWeave() prc_onenter.nss - OnEnter_AMSCompatibilityCheck() prc_metamagic.nss - GetHasSpontaneousNSBClass() prc_feats.nss prc_dracactive.nss prc_debug_hfeatm.nss prc_cbtmed_spnhl.nss psi_powconv.nss psi_pow_bstpwr.nss x2_pc_umdcheck.nss
This commit is contained in:
parent
a668275943
commit
6585d40a0f
Binary file not shown.
@ -1,4 +1,36 @@
|
||||
Functions changed for .35:
|
||||
Scripts changed for .35:
|
||||
|
||||
prc_wipeNSB.nss
|
||||
|
||||
PRC_S_spellb.nss
|
||||
|
||||
prc_amagsys_gain.nss - AMSCompatibilityCheck()
|
||||
|
||||
prc_prereq.nss - Dragonheart(), KnightWeave()
|
||||
|
||||
prc_onenter.nss - OnEnter_AMSCompatibilityCheck()
|
||||
|
||||
prc_metamagic.nss - GetHasSpontaneousNSBClass()
|
||||
|
||||
prc_feats.nss
|
||||
|
||||
prc_dracactive.nss
|
||||
|
||||
prc_debug_hfeatm.nss
|
||||
|
||||
prc_cbtmed_spnhl.nss
|
||||
|
||||
psi_powconv.nss
|
||||
|
||||
psi_pow_bstpwr.nss
|
||||
|
||||
x2_pc_umdcheck.nss
|
||||
|
||||
|
||||
|
||||
Includes & Functions changed for .35:
|
||||
|
||||
inc_sp_gain_mem.nss - set MAX_CLASSES to 8
|
||||
|
||||
inv_inc_invfunc.nss - GetHighestInvokerLevel(), GetFirstInvocationClassPosition(), GetPrimaryInvocationClass()
|
||||
|
||||
|
@ -15,12 +15,19 @@ Created: May 1, 2008
|
||||
|
||||
//#include "prc_inc_core" //granted access via parent (inc_newspellbook)
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "inc_newspellbook.nss"
|
||||
|
||||
//:: Test Void
|
||||
//void main (){}
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Constants
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
// max. number of classes a PC (or creature) can take (3 for NWN, 4 for NWN2)
|
||||
const int MAX_CLASSES = 3;
|
||||
// max. number of classes a PC (or creature) can take (8 for NWN, 4 for NWN2)
|
||||
const int MAX_CLASSES = 8;
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
/* Aid functions */
|
||||
|
@ -217,7 +217,7 @@ int GetHighestMeldshaperLevel(object oMeldshaper)
|
||||
{
|
||||
if(GetClassByPosition(n, oMeldshaper) != CLASS_TYPE_INVALID)
|
||||
{
|
||||
nTemp = GetMeldshaperLevel(oMeldshaper, GetClassByPosition(n, oMeldshaper), -1);
|
||||
nTemp = GetMeldshaperLevel(oMeldshaper, GetClassByPosition(n, oMeldshaper),-1);
|
||||
|
||||
if(nTemp > nHighest)
|
||||
nHighest = nTemp;
|
||||
|
@ -19,6 +19,9 @@
|
||||
@date Created - 2006.12.14
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "inc_dynconv"
|
||||
@ -529,7 +532,7 @@ void AMSCompatibilityCheck(object oPC)
|
||||
object oHideToken = GetHideToken(oPC); //ebonfowl: no longer used but I'm leaving it to not have to edit other functions
|
||||
|
||||
int i;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
string sSpellbook;
|
||||
|
@ -34,6 +34,9 @@
|
||||
2 additional power points.
|
||||
*/
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/10
|
||||
|
||||
|
||||
#include "psi_inc_psifunc"
|
||||
#include "psi_inc_pwresist"
|
||||
#include "psi_spellhook"
|
||||
@ -70,11 +73,29 @@ void main()
|
||||
if(manif.bCanManifest)
|
||||
{
|
||||
// Determine the target's manifester level
|
||||
int nTargetManifesterLevel = max(max(GetClassByPosition(1, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(1, oTarget)) : 0,
|
||||
GetClassByPosition(2, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(2, oTarget)) : 0
|
||||
),
|
||||
GetClassByPosition(3, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(3, oTarget)) : 0
|
||||
);
|
||||
int n = 0;
|
||||
int nTargetManifesterLevel;
|
||||
int nTemp;
|
||||
|
||||
while(n <= 8)
|
||||
{
|
||||
if(GetClassByPosition(n, oTarget) != CLASS_TYPE_INVALID)
|
||||
{
|
||||
nTemp = GetManifesterLevel(oTarget, GetClassByPosition(n, oTarget), -1);
|
||||
|
||||
if(nTemp > nTargetManifesterLevel)
|
||||
nTargetManifesterLevel = nTemp;
|
||||
}
|
||||
n++;
|
||||
|
||||
}
|
||||
|
||||
/* int nTargetManifesterLevel = max(max(GetClassByPosition(1, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(1, oTarget)) : 0,
|
||||
GetClassByPosition(2, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(2, oTarget)) : 0
|
||||
),
|
||||
GetClassByPosition(3, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(3, oTarget)) : 0
|
||||
); */
|
||||
|
||||
int nPPGiven = 2 + 2 * manif.nTimesAugOptUsed_1;
|
||||
// Can't give more than the target has manifester levels
|
||||
nPPGiven = min(nPPGiven, nTargetManifesterLevel);
|
||||
|
@ -189,7 +189,7 @@ void main()
|
||||
|
||||
SetHeader("Select class");
|
||||
int i, nTest, nPrev;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
nTest = GetClassByPosition(i, oPC);
|
||||
if(GetIsPsionicClass(nTest))
|
||||
|
@ -28,6 +28,9 @@ which fires the spellscript prc_spellbook (#1792 in spells.2da), which then call
|
||||
conversation script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
* Created July 17 2005
|
||||
* Author: GaiaWerewolf
|
||||
*/
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_getbest_inc"
|
||||
|
||||
@ -38,7 +42,7 @@ void main()
|
||||
int nBurnableSpell = -1;
|
||||
int bBioCastersLoopDone = 0;//will prevent running 'GetBestSpell' loops twice
|
||||
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
nClass = GetClassByPosition(i, oCaster);
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "inc_utility"
|
||||
|
||||
const string SET_NAME = "PRC_DEBUG_HFeatM_IPs";
|
||||
@ -67,6 +69,26 @@ void main()
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(3, oPC)))) + " " + IntToString(GetLevelByPosition(3, oPC))
|
||||
: ""
|
||||
)
|
||||
+ (GetClassByPosition(4, oPC) != CLASS_TYPE_INVALID ?
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(4, oPC)))) + " " + IntToString(GetLevelByPosition(4, oPC))
|
||||
: ""
|
||||
)
|
||||
+ (GetClassByPosition(5, oPC) != CLASS_TYPE_INVALID ?
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(5, oPC)))) + " " + IntToString(GetLevelByPosition(5, oPC))
|
||||
: ""
|
||||
)
|
||||
+ (GetClassByPosition(6, oPC) != CLASS_TYPE_INVALID ?
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(6, oPC)))) + " " + IntToString(GetLevelByPosition(6, oPC))
|
||||
: ""
|
||||
)
|
||||
+ (GetClassByPosition(7, oPC) != CLASS_TYPE_INVALID ?
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(7, oPC)))) + " " + IntToString(GetLevelByPosition(7, oPC))
|
||||
: ""
|
||||
)
|
||||
+ (GetClassByPosition(8, oPC) != CLASS_TYPE_INVALID ?
|
||||
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(8, oPC)))) + " " + IntToString(GetLevelByPosition(8, oPC))
|
||||
: ""
|
||||
)
|
||||
);
|
||||
|
||||
DoDebug("A duplicate itemproperty feat has been discovered. This is a critical bug, so please report it.\n\n"
|
||||
|
@ -11,6 +11,9 @@
|
||||
//:: Created On: Nov 17, 2007
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
|
||||
#include "prc_inc_burn"
|
||||
#include "prc_inc_breath"
|
||||
|
||||
@ -157,7 +160,7 @@ void main()
|
||||
|
||||
//make sure user is a spontaneous caster
|
||||
int i;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS)
|
||||
|
@ -11,6 +11,9 @@
|
||||
*/
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
|
||||
#include "moi_inc_moifunc"
|
||||
#include "prc_inc_clsfunc"
|
||||
|
||||
@ -722,17 +725,43 @@ void PRCFeat_AddCompositeBonuses(object oPC, object oSkin)
|
||||
int nClass1 = GetClassByPosition(1, oPC);
|
||||
int nClass2 = GetClassByPosition(2, oPC);
|
||||
int nClass3 = GetClassByPosition(3, oPC);
|
||||
|
||||
int nClass4 = GetClassByPosition(4, oPC);
|
||||
int nClass5 = GetClassByPosition(5, oPC);
|
||||
int nClass6 = GetClassByPosition(6, oPC);
|
||||
int nClass7 = GetClassByPosition(7, oPC);
|
||||
int nClass8 = GetClassByPosition(8, oPC);
|
||||
|
||||
int nClass1Lvl = GetLevelByClass(nClass1, oPC);
|
||||
int nClass2Lvl = GetLevelByClass(nClass2, oPC);
|
||||
int nClass3Lvl = GetLevelByClass(nClass3, oPC);
|
||||
int nLevel = nClass1Lvl + nClass2Lvl + nClass3Lvl;
|
||||
int nClass4Lvl = GetLevelByClass(nClass4, oPC);
|
||||
int nClass5Lvl = GetLevelByClass(nClass5, oPC);
|
||||
int nClass6Lvl = GetLevelByClass(nClass6, oPC);
|
||||
int nClass7Lvl = GetLevelByClass(nClass7, oPC);
|
||||
int nClass8Lvl = GetLevelByClass(nClass8, oPC);
|
||||
|
||||
int nLevel = nClass1Lvl + nClass2Lvl + nClass3Lvl + nClass4Lvl + nClass5Lvl + nClass6Lvl + nClass7Lvl + nClass8Lvl;
|
||||
|
||||
int nDie1 = StringToInt(Get2DAString("classes", "HitDie", nClass1));
|
||||
int nDie2 = StringToInt(Get2DAString("classes", "HitDie", nClass2));
|
||||
int nDie3 = StringToInt(Get2DAString("classes", "HitDie", nClass3));
|
||||
int nDie4 = StringToInt(Get2DAString("classes", "HitDie", nClass4));
|
||||
int nDie5 = StringToInt(Get2DAString("classes", "HitDie", nClass5));
|
||||
int nDie6 = StringToInt(Get2DAString("classes", "HitDie", nClass6));
|
||||
int nDie7 = StringToInt(Get2DAString("classes", "HitDie", nClass7));
|
||||
int nDie8 = StringToInt(Get2DAString("classes", "HitDie", nClass8));
|
||||
|
||||
int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 +
|
||||
nClass2Lvl * nDie2 +
|
||||
nClass3Lvl * nDie3 +
|
||||
nClass4Lvl * nDie4 +
|
||||
nClass5Lvl * nDie5 +
|
||||
nClass6Lvl * nDie6 +
|
||||
nClass7Lvl * nDie7 +
|
||||
nClass8Lvl * nDie8))/nLevel;
|
||||
|
||||
int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 + nClass2Lvl * nDie2 + nClass3Lvl * nDie3))/nLevel;
|
||||
/* int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 + nClass2Lvl * nDie2 + nClass3Lvl * nDie3))/nLevel; */
|
||||
|
||||
if(nFortPenalty > 6)
|
||||
nFortPenalty = 6;
|
||||
int nConBonus = nFortPenalty * 2;
|
||||
|
@ -8,12 +8,14 @@
|
||||
//:: Created On: 20/09/2009
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "inc_newspellbook"
|
||||
|
||||
int GetHasSpontaneousNSBClass(object oPC)
|
||||
{
|
||||
int i;
|
||||
for (i = 1; i <= 3; i++)
|
||||
for (i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
if (SPELLBOOK_TYPE_SPONTANEOUS == GetSpellbookTypeForClass(nClass))
|
||||
|
@ -1,3 +1,5 @@
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "inc_leto_prc"
|
||||
#include "x2_inc_switches"
|
||||
#include "prc_inc_teleport"
|
||||
@ -111,7 +113,7 @@ void OnEnter_AMSCompatibilityCheck(object oPC)
|
||||
{
|
||||
SetLocalInt(oPC, "AMS_RESTORE", 1);
|
||||
int i;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
DelayCommand(0.2, DoRestoreAMS(oPC, nClass, oHideToken, oAMSToken));
|
||||
|
@ -8,6 +8,8 @@
|
||||
//:: Created On: July 3rd, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "inc_epicspells"
|
||||
#include "prc_inc_sneak"
|
||||
#include "psi_inc_psifunc"
|
||||
@ -153,7 +155,7 @@ void Dragonheart(object oPC)
|
||||
SetLocalInt(oPC, "PRC_PrereqDragonheart", 1);
|
||||
|
||||
int nClassSlot = 1;
|
||||
while(nClassSlot <= 3)
|
||||
while(nClassSlot <= 8)
|
||||
{
|
||||
int nClass = GetClassByPosition(nClassSlot, oPC);
|
||||
nClassSlot += 1;
|
||||
@ -1037,7 +1039,7 @@ void KnightWeave(object oPC)
|
||||
int bSpontCaster = FALSE;
|
||||
//make sure user is a spontaneous arcane caster
|
||||
int i;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS) && GetMaxSpellLevelForCasterLevel(nClass, GetLevelByTypeArcane(oPC)) >= 3)
|
||||
@ -1262,7 +1264,7 @@ void main()
|
||||
//for(i=1;i<3;i++)
|
||||
int nSpellLevel;
|
||||
int nClassSlot = 1;
|
||||
while(nClassSlot <= 3)
|
||||
while(nClassSlot <= 8)
|
||||
{
|
||||
int nClass = GetClassByPosition(nClassSlot, oPC);
|
||||
nClassSlot += 1;
|
||||
|
@ -28,7 +28,7 @@ void main()
|
||||
object oPC = OBJECT_SELF;
|
||||
|
||||
int i;
|
||||
for(i = 1; i <= 3; i++)
|
||||
for(i = 1; i <= 8; i++)
|
||||
{
|
||||
int nClass = GetClassByPosition(i, oPC);
|
||||
DelayCommand(0.5*i, DeleteArrays(oPC, nClass));
|
||||
|
@ -33,6 +33,8 @@ Note: I am not using the effective level of the spell for DC calculation but
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//:: Updated for .35 by Jaysyn 2023/03/11
|
||||
|
||||
#include "prc_inc_spells"
|
||||
|
||||
int DoCastingClassCheck(object oCaster, int nSpellID, int nClass)
|
||||
@ -55,7 +57,7 @@ int DoCastingClassCheck(object oCaster, int nSpellID, int nClass)
|
||||
int UMD_CheckCastingClass(object oCaster, int nSpellID)
|
||||
{
|
||||
int i;
|
||||
for(i = 1; i < 4; i++)
|
||||
for(i = 1; i < 9; i++)
|
||||
{
|
||||
if(DoCastingClassCheck(oCaster, nSpellID, GetClassByPosition(i, oCaster)))
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user