8 Commits
v0.04 ... v0.07

Author SHA1 Message Date
Jaysyn904
6585d40a0f 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
2023-03-11 12:04:30 -05:00
Jaysyn904
a668275943 Major include update for 8 class support
Major include update for 8 class support

inv_inc_invfunc.nss		- GetHighestInvokerLevel(), GetFirstInvocationClassPosition(), GetPrimaryInvocationClass()

inc_epicspellfnc.nss	- GetCanLearnSeed()

inc_newspellbook.nss 	- CheckNewSpellbooks(), GetSpellslotLevel()

moi_inc_moifunc.nss		- GetHighestMeldshaperLevel(), GetPrimaryIncarnumClass(), GetFirstIncarnumClassPosition()

nw_o2_coninclude.nss	- nDetermineClassToUse()

prc_inc_castlvl.nss		- GetArcanePRCLevels(), GetDivinePRCLevels(), GetFirstArcaneClassPosition(), GetFirstDivineClassPosition(), GetPrimaryArcaneClass(), GetPrimaryDivineClass(), GetPrimarySpellcastingClass(), UrPriestCL(), GetLevelByTypeArcane(), GetLevelByTypeDivine(), [Needs marker feats]

prc_inc_clsfunc.nss		- [Needs marker feats]

prc_inc_core.nss		- PRCGetSpellLevel(), UseNewSpellBook(), PRCGetHasSpell(), PRCGetIsRealSpellKnown()

prc_inc_domain.nss		- CastDomainSpell()

prc_inc_function.nss	- SetupCharacterData(), [Needs marker feats]

prc_inc_itmrstr.nss		- _prc_inc_itmrstr_ApplyWizardry()

prc_inc_leadersh.nss	- StoreCohort()

prc_inc_spells.nss		- GetPrCAdjustedCasterLevelByType(), GetLevelByTypeArcaneFeats(), GetLevelByTypeDivineFeats(), PRCDecrementRemainingSpellUses(), PRCGetSpellUsesLeft()

prc_shifter_info.nss	- _prc_inc_PrintDebugItem(), _prc_inc_PrintShape()

psi_inc_core.nss		- GetHighestManifesterLevel(), GetPrimaryPsionicClass(), GetFirstPsionicClassPosition()

shd_inc_shdfunc.nss		- GetHighestShadowcasterLevel(), GetPrimaryShadowMagicClass(), GetFirstShadowMagicClassPosition()

tob_inc_recovery.nss	- RecoverPrCAbilities()

tob_inc_tobfunc.nss		- GetHighestInitiatorLevel(), GetPrimaryBladeMagicClass(), GetFirstBladeMagicClassPosition()

true_inc_trufunc.nss	- GetHighestTrueSpeakerLevel()
2023-03-11 01:13:46 -05:00
Jaysyn904
b266d1350e Removed changed includes
Removed changed includes.  Screwed up previous commit.
2023-03-11 01:12:18 -05:00
Jaysyn904
525a4f8ccc Revert "Revert "Major update""
This reverts commit 5de4086e8e.
2023-03-11 01:08:00 -05:00
Jaysyn904
5de4086e8e Revert "Major update"
This reverts commit d37dc3e68d.
2023-03-11 01:06:21 -05:00
Jaysyn904
d37dc3e68d Major update
inv_inc_invfunc.nss		- GetHighestInvokerLevel(), GetFirstInvocationClassPosition(), GetPrimaryInvocationClass()

inc_epicspellfnc.nss	- GetCanLearnSeed()

inc_newspellbook.nss 	- CheckNewSpellbooks(), GetSpellslotLevel()

moi_inc_moifunc.nss		- GetHighestMeldshaperLevel(), GetPrimaryIncarnumClass(), GetFirstIncarnumClassPosition()

nw_o2_coninclude.nss	- nDetermineClassToUse()

prc_inc_castlvl.nss		- GetArcanePRCLevels(), GetDivinePRCLevels(), GetFirstArcaneClassPosition(), GetFirstDivineClassPosition(), GetPrimaryArcaneClass(), GetPrimaryDivineClass(), GetPrimarySpellcastingClass(), UrPriestCL(), GetLevelByTypeArcane(), GetLevelByTypeDivine(), [Needs marker feats]

prc_inc_clsfunc.nss		- [Needs marker feats]

prc_inc_core.nss		- PRCGetSpellLevel(), UseNewSpellBook(), PRCGetHasSpell(), PRCGetIsRealSpellKnown()

prc_inc_domain.nss		- CastDomainSpell()

prc_inc_function.nss	- SetupCharacterData(), [Needs marker feats]

prc_inc_itmrstr.nss		- _prc_inc_itmrstr_ApplyWizardry()

prc_inc_leadersh.nss	- StoreCohort()

prc_inc_spells.nss		- GetPrCAdjustedCasterLevelByType(), GetLevelByTypeArcaneFeats(), GetLevelByTypeDivineFeats(), PRCDecrementRemainingSpellUses(), PRCGetSpellUsesLeft()

prc_shifter_info.nss	- _prc_inc_PrintDebugItem(), _prc_inc_PrintShape()

psi_inc_core.nss		- GetHighestManifesterLevel(), GetPrimaryPsionicClass(), GetFirstPsionicClassPosition()

shd_inc_shdfunc.nss		- GetHighestShadowcasterLevel(), GetPrimaryShadowMagicClass(), GetFirstShadowMagicClassPosition()

tob_inc_recovery.nss	- RecoverPrCAbilities()

tob_inc_tobfunc.nss		- GetHighestInitiatorLevel(), GetPrimaryBladeMagicClass(), GetFirstBladeMagicClassPosition()

true_inc_trufunc.nss	- GetHighestTrueSpeakerLevel()
2023-03-11 01:04:56 -05:00
Jaysyn904
e2d524963b Updated Invoking include to allow invoking past 3rd class
Updated Invoking include to allow invoking past 3rd class.  Updated epic spell include to allow epic spellcasting past 3rd class.  Updated nwscript compiler for .35.  Added .35 change log / notes.
2023-03-10 19:04:21 -05:00
Jaysyn904
ef28d788a3 Updated Disciple of Dispater's Iron Power for new weapon types
Updated Disciple of Dispater's Iron Power for new weapon types. Added note about adding new weapons.
2023-03-10 10:12:48 -05:00
39 changed files with 1158 additions and 184 deletions

Binary file not shown.

View File

@@ -0,0 +1,73 @@
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()
inc_epicspellfnc.nss - GetCanLearnSeed()
inc_newspellbook.nss - CheckNewSpellbooks(), GetSpellslotLevel()
moi_inc_moifunc.nss - GetHighestMeldshaperLevel(), GetPrimaryIncarnumClass(), GetFirstIncarnumClassPosition()
nw_o2_coninclude.nss - nDetermineClassToUse()
prc_inc_castlvl.nss - GetArcanePRCLevels(), GetDivinePRCLevels(), GetFirstArcaneClassPosition(), GetFirstDivineClassPosition(), GetPrimaryArcaneClass(), GetPrimaryDivineClass(), GetPrimarySpellcastingClass(), UrPriestCL(), GetLevelByTypeArcane(), GetLevelByTypeDivine(), [Needs marker feats]
prc_inc_clsfunc.nss - [Needs marker feats]
prc_inc_core.nss - PRCGetSpellLevel(), UseNewSpellBook(), PRCGetHasSpell(), PRCGetIsRealSpellKnown()
prc_inc_domain.nss - CastDomainSpell()
prc_inc_function.nss - SetupCharacterData(), [Needs marker feats]
prc_inc_itmrstr.nss - _prc_inc_itmrstr_ApplyWizardry()
prc_inc_leadersh.nss - StoreCohort()
prc_inc_spells.nss - GetPrCAdjustedCasterLevelByType(), GetLevelByTypeArcaneFeats(), GetLevelByTypeDivineFeats(), PRCDecrementRemainingSpellUses(), PRCGetSpellUsesLeft()
prc_shifter_info.nss - _prc_inc_PrintDebugItem(), _prc_inc_PrintShape()
psi_inc_core.nss - GetHighestManifesterLevel(), GetPrimaryPsionicClass(), GetFirstPsionicClassPosition()
shd_inc_shdfunc.nss - GetHighestShadowcasterLevel(), GetPrimaryShadowMagicClass(), GetFirstShadowMagicClassPosition()
tob_inc_recovery.nss - RecoverPrCAbilities()
tob_inc_tobfunc.nss - GetHighestInitiatorLevel(), GetPrimaryBladeMagicClass(), GetFirstBladeMagicClassPosition()
true_inc_trufunc.nss - GetHighestTrueSpeakerLevel()

View File

@@ -0,0 +1,25 @@
Scripts that need to be updated whenever we get a new weapon type:
prc_misc_const.nss - New weapon constants go here
prc_dispater.nss - Metal / Iron weapons
inc_item_props.nss - Missing Light lance
inc_rand_equip.nss - Missing all new weapons
prc_craft_inc.nss
prc_inc_clsfunc.nss - Missing Light Lance & new weapons. Needs update for .35
prc_inc_combat.nss - Missing Light lance, elf blades & new weapons.
prc_inc_fork.nss - Missing Light Lance & new weapons.
prc_inc_wpnrest.nss - Missing Light Lance for some functions
prc_x2_itemprop.nss - Missing Light lance.
psi_callweapon.nss - May need to make a new default version for each new weapon, needs testing.
prc_ad_falskeen.nss - Missing Light lance, elf blades & new weapons.
prc_battletempus.nss - Martial melee weapons. Missing new Martial weapons.
prc_intuiatk.nss - Simple melee weapons. Missing new Simple weapons.
prc_swashweak.nss - All melee weapons. Missing Light lance, elf blades & new weapons.
prc_ipfeat_const.nss - Weapon Feat constants go here.
2DAs that need updating for new weapon types:
baseitems.2da - Obviously.
prc_weap_items.2da

View File

@@ -1,4 +1,6 @@
//:: Updated for .35 by Jaysyn 2023/03/10
int GetFeatForSeed(int nSeedID); int GetFeatForSeed(int nSeedID);
int GetIPForSeed(int nSeedID); int GetIPForSeed(int nSeedID);
int GetDCForSeed(int nSeedID); int GetDCForSeed(int nSeedID);
@@ -25,6 +27,8 @@ int GetSpellFromAbrev(string sAbrev);
/* Includes */ /* Includes */
////////////////////////////////////////////////// //////////////////////////////////////////////////
#include "inc_utility" #include "inc_utility"
//#include "inc_epicspelldef" //#include "inc_epicspelldef"
@@ -132,7 +136,7 @@ int GetCanLearnSeed(object oPC, int nSeedID)
{ {
int nRestr = GetClassForSeed(nSeedID); int nRestr = GetClassForSeed(nSeedID);
int i, nClass; int i, nClass;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nClass = GetClassByPosition(i, oPC); nClass = GetClassByPosition(i, oPC);
if(_CheckEpicSpellcastingForClass(oPC, nClass)//this class has epic spellcasting if(_CheckEpicSpellcastingForClass(oPC, nClass)//this class has epic spellcasting

View File

@@ -349,7 +349,7 @@ int GetSpellslotLevel(int nClass, object oPC)
int nArcSpellslotLevel; int nArcSpellslotLevel;
int nDivSpellslotLevel; int nDivSpellslotLevel;
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nTempClass = GetClassByPosition(i, oPC); int nTempClass = GetClassByPosition(i, oPC);
//spellcasting prc //spellcasting prc
@@ -832,7 +832,7 @@ void CheckNewSpellbooks(object oPC)
{ {
WipeSpellbookHideFeats(oPC); WipeSpellbookHideFeats(oPC);
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
int nLevel = GetLevelByClass(nClass, oPC); int nLevel = GetLevelByClass(nClass, oPC);

View File

@@ -15,12 +15,19 @@ Created: May 1, 2008
//#include "prc_inc_core" //granted access via parent (inc_newspellbook) //#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 //:: Constants
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
// max. number of classes a PC (or creature) can take (3 for NWN, 4 for NWN2) // max. number of classes a PC (or creature) can take (8 for NWN, 4 for NWN2)
const int MAX_CLASSES = 3; const int MAX_CLASSES = 8;
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Aid functions */ /* Aid functions */

View File

@@ -1,6 +1,6 @@
//:://///////////////////////////////////////////// //::///////////////////////////////////////////////
//:: Invocation include: Miscellaneous //:: Invocation include: Miscellaneous
//:: tob_inc_tobfunc //:: inv_inc_invfunc
//:://///////////////////////////////////////////// //::///////////////////////////////////////////////
/** @file /** @file
Defines various functions and other stuff that Defines various functions and other stuff that
@@ -12,6 +12,8 @@
@author Fox @author Fox
@date Created - 2008.1.25 @date Created - 2008.1.25
Updated for .35 by Jaysyn 2023/03/10
*/ */
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
@@ -230,14 +232,37 @@ int GetIsInvocationUser(object oCreature)
); );
} }
int GetHighestInvokerLevel(object oCreature) int GetHighestInvokerLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetInvokerLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestInvokerLevel(object oCreature)
{ {
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
), ),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
); );
} } */
int GetIsInvocationClass(int nClass) int GetIsInvocationClass(int nClass)
{ {
@@ -278,7 +303,7 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
{ {
int nClass; int nClass;
if(GetPRCSwitch(PRC_CASTERLEVEL_FIRST_CLASS_RULE)) if(GetPRCSwitch(PRC_CASTERLEVEL_FIRST_CLASS_RULE)) //: Kinda pointless for .35
{ {
int nInvocationPos = GetFirstInvocationClassPosition(oCreature); int nInvocationPos = GetFirstInvocationClassPosition(oCreature);
if (!nInvocationPos) return CLASS_TYPE_INVALID; // no invoking class if (!nInvocationPos) return CLASS_TYPE_INVALID; // no invoking class
@@ -288,18 +313,30 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
else else
{ {
int nClassLvl; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCreature); nClass1 = GetClassByPosition(1, oCreature);
nClass2 = GetClassByPosition(2, oCreature); nClass2 = GetClassByPosition(2, oCreature);
nClass3 = GetClassByPosition(3, oCreature); nClass3 = GetClassByPosition(3, oCreature);
nClass4 = GetClassByPosition(4, oCreature);
nClass5 = GetClassByPosition(5, oCreature);
nClass6 = GetClassByPosition(6, oCreature);
nClass7 = GetClassByPosition(7, oCreature);
nClass8 = GetClassByPosition(8, oCreature);
if(GetIsInvocationClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature); if(GetIsInvocationClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
if(GetIsInvocationClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature); if(GetIsInvocationClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
if(GetIsInvocationClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature); if(GetIsInvocationClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
if(GetIsInvocationClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
if(GetIsInvocationClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
if(GetIsInvocationClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
if(GetIsInvocationClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
if(GetIsInvocationClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
nClass = nClass1; nClass = nClass1;
nClassLvl = nClass1Lvl; nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl) if(nClass2Lvl > nClassLvl)
{ {
nClass = nClass2; nClass = nClass2;
@@ -310,6 +347,32 @@ int GetPrimaryInvocationClass(object oCreature = OBJECT_SELF)
nClass = nClass3; nClass = nClass3;
nClassLvl = nClass3Lvl; nClassLvl = nClass3Lvl;
} }
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0) if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID; nClass = CLASS_TYPE_INVALID;
} }
@@ -325,6 +388,16 @@ int GetFirstInvocationClassPosition(object oCreature = OBJECT_SELF)
return 2; return 2;
if (GetIsInvocationClass(GetClassByPosition(3, oCreature))) if (GetIsInvocationClass(GetClassByPosition(3, oCreature)))
return 3; return 3;
if (GetIsInvocationClass(GetClassByPosition(4, oCreature)))
return 4;
if (GetIsInvocationClass(GetClassByPosition(5, oCreature)))
return 5;
if (GetIsInvocationClass(GetClassByPosition(6, oCreature)))
return 6;
if (GetIsInvocationClass(GetClassByPosition(7, oCreature)))
return 7;
if (GetIsInvocationClass(GetClassByPosition(8, oCreature)))
return 8;
return 0; return 0;
} }

View File

@@ -12,10 +12,15 @@
@author Stratovarius @author Stratovarius
@date Created - 2019.12.28 @date Created - 2019.12.28
Updated for .35 by Jaysyn 2023/03/10
*/ */
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Test Void
//void main () {}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function prototypes */ /* Function prototypes */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -203,13 +208,35 @@ int GetIncarnumLevelForClass(int nSpecificClass, object oMeldshaper)
} }
int GetHighestMeldshaperLevel(object oMeldshaper) int GetHighestMeldshaperLevel(object oMeldshaper)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oMeldshaper) != CLASS_TYPE_INVALID)
{
nTemp = GetMeldshaperLevel(oMeldshaper, GetClassByPosition(n, oMeldshaper),-1);
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestMeldshaperLevel(object oMeldshaper)
{ {
return max(max(GetClassByPosition(1, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(1, oMeldshaper), -1) : 0, return max(max(GetClassByPosition(1, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(1, oMeldshaper), -1) : 0,
GetClassByPosition(2, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(2, oMeldshaper), -1) : 0 GetClassByPosition(2, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(2, oMeldshaper), -1) : 0
), ),
GetClassByPosition(3, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(3, oMeldshaper), -1) : 0 GetClassByPosition(3, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(3, oMeldshaper), -1) : 0
); );
} } */
int GetIsIncarnumClass(int nClass) int GetIsIncarnumClass(int nClass)
{ {
@@ -260,18 +287,30 @@ int GetPrimaryIncarnumClass(object oMeldshaper = OBJECT_SELF)
else else
{ {
int nClassLvl; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oMeldshaper); nClass1 = GetClassByPosition(1, oMeldshaper);
nClass2 = GetClassByPosition(2, oMeldshaper); nClass2 = GetClassByPosition(2, oMeldshaper);
nClass3 = GetClassByPosition(3, oMeldshaper); nClass3 = GetClassByPosition(3, oMeldshaper);
nClass4 = GetClassByPosition(4, oMeldshaper);
nClass5 = GetClassByPosition(5, oMeldshaper);
nClass6 = GetClassByPosition(6, oMeldshaper);
nClass7 = GetClassByPosition(7, oMeldshaper);
nClass8 = GetClassByPosition(8, oMeldshaper);
if(GetIsIncarnumClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oMeldshaper); if(GetIsIncarnumClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oMeldshaper);
if(GetIsIncarnumClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oMeldshaper); if(GetIsIncarnumClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oMeldshaper);
if(GetIsIncarnumClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oMeldshaper); if(GetIsIncarnumClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oMeldshaper);
if(GetIsIncarnumClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oMeldshaper);
if(GetIsIncarnumClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oMeldshaper);
if(GetIsIncarnumClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oMeldshaper);
if(GetIsIncarnumClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oMeldshaper);
if(GetIsIncarnumClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oMeldshaper);
nClass = nClass1; nClass = nClass1;
nClassLvl = nClass1Lvl; nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl) if(nClass2Lvl > nClassLvl)
{ {
nClass = nClass2; nClass = nClass2;
@@ -282,6 +321,32 @@ int GetPrimaryIncarnumClass(object oMeldshaper = OBJECT_SELF)
nClass = nClass3; nClass = nClass3;
nClassLvl = nClass3Lvl; nClassLvl = nClass3Lvl;
} }
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0) if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID; nClass = CLASS_TYPE_INVALID;
} }
@@ -297,6 +362,16 @@ int GetFirstIncarnumClassPosition(object oMeldshaper = OBJECT_SELF)
return 2; return 2;
if (GetIsIncarnumClass(GetClassByPosition(3, oMeldshaper))) if (GetIsIncarnumClass(GetClassByPosition(3, oMeldshaper)))
return 3; return 3;
if (GetIsIncarnumClass(GetClassByPosition(4, oMeldshaper)))
return 4;
if (GetIsIncarnumClass(GetClassByPosition(5, oMeldshaper)))
return 5;
if (GetIsIncarnumClass(GetClassByPosition(6, oMeldshaper)))
return 6;
if (GetIsIncarnumClass(GetClassByPosition(7, oMeldshaper)))
return 7;
if (GetIsIncarnumClass(GetClassByPosition(8, oMeldshaper)))
return 8;
return 0; return 0;
} }

View File

@@ -11,6 +11,8 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Created By: Brent, Andrew //:: Created By: Brent, Andrew
//:: Created On: November - May //:: Created On: November - May
//::
//:: Updated for .35 by Jaysyn 2023/03/10
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
// :: MODS // :: MODS
// April 23 2002: Removed animal parts. They were silly. // April 23 2002: Removed animal parts. They were silly.
@@ -4703,11 +4705,22 @@ int nDetermineClassToUse(object oCharacter)
int nClass1 = GetClassByPosition(1, oCharacter); int nClass1 = GetClassByPosition(1, oCharacter);
int nClass2 = GetClassByPosition(2, oCharacter); int nClass2 = GetClassByPosition(2, oCharacter);
int nClass3 = GetClassByPosition(3, oCharacter); int nClass3 = GetClassByPosition(3, oCharacter);
int nClass4 = GetClassByPosition(4, oCharacter);
int nClass5 = GetClassByPosition(5, oCharacter);
int nClass6 = GetClassByPosition(6, oCharacter);
int nClass7 = GetClassByPosition(7, oCharacter);
int nClass8 = GetClassByPosition(8, oCharacter);
int nState1 = GetLevelByClass(nClass1, oCharacter) * 100 / nTotal; int nState1 = GetLevelByClass(nClass1, oCharacter) * 100 / nTotal;
int nState2 = GetLevelByClass(nClass2, oCharacter) * 100 / nTotal + nState1; int nState2 = GetLevelByClass(nClass2, oCharacter) * 100 / nTotal + nState1;
// nState3 will always be 100 if there is a third class, or 0 if there isn't int nState3 = GetLevelByClass(nClass3, oCharacter) * 100 / nTotal + nState2;
//int nState3 = GetLevelByClass(nClass3, oCharacter) * 100 / nTotal + nState2; int nState4 = GetLevelByClass(nClass4, oCharacter) * 100 / nTotal + nState3;
int nState5 = GetLevelByClass(nClass5, oCharacter) * 100 / nTotal + nState4;
int nState6 = GetLevelByClass(nClass6, oCharacter) * 100 / nTotal + nState5;
int nState7 = GetLevelByClass(nClass7, oCharacter) * 100 / nTotal + nState6;
// nState8 will always be 100 if there is an eigth class, or 0 if there isn't
//int nState8 = GetLevelByClass(nClass3, oCharacter) * 100 / nTotal + nState7;
// correct for unrecognized classes - assumes the first class will be a non-prestige player class // correct for unrecognized classes - assumes the first class will be a non-prestige player class
if(nClass2 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass2)) if(nClass2 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass2))
@@ -4718,8 +4731,33 @@ int nDetermineClassToUse(object oCharacter)
if(nClass3 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass3)) if(nClass3 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass3))
{ {
nClass3 = CLASS_TYPE_INVALID; nClass3 = CLASS_TYPE_INVALID;
if(nClass2 != CLASS_TYPE_INVALID) nState1 = nState3;
nState2 = 100; }
if(nClass4 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass4))
{
nClass4 = CLASS_TYPE_INVALID;
nState1 = nState4;
}
if(nClass5 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass5))
{
nClass5 = CLASS_TYPE_INVALID;
nState1 = nState5;
}
if(nClass6 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass6))
{
nClass6 = CLASS_TYPE_INVALID;
nState1 = nState6;
}
if(nClass7 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass7))
{
nClass7 = CLASS_TYPE_INVALID;
nState1 = nState7;
}
if(nClass8 != CLASS_TYPE_INVALID && !nGetIsBaseClass(nClass8))
{
nClass8 = CLASS_TYPE_INVALID;
if(nClass7 != CLASS_TYPE_INVALID)
nState7 = 100;
else nState1 = 100; else nState1 = 100;
} }
@@ -4748,4 +4786,6 @@ int nDetermineClassToUse(object oCharacter)
return nClass; return nClass;
} }
//:: Test Void
//void main () {}

View File

@@ -8,6 +8,8 @@
* functions. If this ends up like prc_inc_spells, you get slapped. * functions. If this ends up like prc_inc_spells, you get slapped.
*/ */
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function prototypes */ /* Function prototypes */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -788,9 +790,15 @@ int GetArcanePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
int nArcane; int nArcane;
int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster); int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster);
int nUM = GetLevelByClass(CLASS_TYPE_ULTIMATE_MAGUS, oCaster); int nUM = GetLevelByClass(CLASS_TYPE_ULTIMATE_MAGUS, oCaster);
int nFirstClass = GetClassByPosition(1, oCaster); int nFirstClass = GetClassByPosition(1, oCaster);
int nSecondClass = GetClassByPosition(2, oCaster); int nSecondClass = GetClassByPosition(2, oCaster);
int nThirdClass = GetClassByPosition(3, oCaster); int nThirdClass = GetClassByPosition(3, oCaster);
int nFourthClass = GetClassByPosition(4, oCaster);
int nFifthClass = GetClassByPosition(5, oCaster);
int nSixthClass = GetClassByPosition(6, oCaster);
int nSeventhClass = GetClassByPosition(7, oCaster);
int nEightClass = GetClassByPosition(8, oCaster);
if (GetFirstArcaneClassPosition(oCaster)) nArcane += GetLevelByClass(CLASS_TYPE_SOULCASTER, oCaster); if (GetFirstArcaneClassPosition(oCaster)) nArcane += GetLevelByClass(CLASS_TYPE_SOULCASTER, oCaster);
@@ -857,7 +865,7 @@ int GetArcanePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
* first class slot is NOT divine AND second class slot is arcane OR * first class slot is NOT divine AND second class slot is arcane OR
* first AND second class slot is NOT divine AND 3rd class slot is arcane * first AND second class slot is NOT divine AND 3rd class slot is arcane
*/ */
if (nOozeMLevel) if (nOozeMLevel) //:: [PRC .35] This needs marker feats.
{ {
if (GetIsArcaneClass(nFirstClass, oCaster) if (GetIsArcaneClass(nFirstClass, oCaster)
|| (!GetIsDivineClass(nFirstClass, oCaster) || (!GetIsDivineClass(nFirstClass, oCaster)
@@ -922,9 +930,15 @@ int GetDivinePRCLevels(object oCaster)
{ {
int nDivine; int nDivine;
int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster); int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster);
int nFirstClass = GetClassByPosition(1, oCaster); int nFirstClass = GetClassByPosition(1, oCaster);
int nSecondClass = GetClassByPosition(2, oCaster); int nSecondClass = GetClassByPosition(2, oCaster);
int nThirdClass = GetClassByPosition(3, oCaster); int nThirdClass = GetClassByPosition(3, oCaster);
int nFourthClass = GetClassByPosition(4, oCaster);
int nFifthClass = GetClassByPosition(5, oCaster);
int nSixthClass = GetClassByPosition(6, oCaster);
int nSeventhClass = GetClassByPosition(7, oCaster);
int nEightClass = GetClassByPosition(8, oCaster);
// This section accounts for full progression classes // This section accounts for full progression classes
nDivine += GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oCaster) nDivine += GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oCaster)
@@ -967,7 +981,7 @@ int GetDivinePRCLevels(object oCaster)
nDivine += GetLevelByClass(CLASS_TYPE_SACREDFIST, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SACREDFIST, oCaster);
} }
if (nOozeMLevel) if (nOozeMLevel) //:: [PRC .35] This needs marker feats.
{ {
if (GetIsDivineClass(nFirstClass, oCaster) if (GetIsDivineClass(nFirstClass, oCaster)
|| (!GetIsArcaneClass(nFirstClass, oCaster) || (!GetIsArcaneClass(nFirstClass, oCaster)
@@ -984,7 +998,7 @@ int GetDivinePRCLevels(object oCaster)
int GetFirstArcaneClassPosition(object oCaster = OBJECT_SELF) int GetFirstArcaneClassPosition(object oCaster = OBJECT_SELF)
{ {
int i; int i;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
if(GetIsArcaneClass(GetClassByPosition(i, oCaster), oCaster)) if(GetIsArcaneClass(GetClassByPosition(i, oCaster), oCaster))
return i; return i;
@@ -996,7 +1010,7 @@ int GetFirstArcaneClassPosition(object oCaster = OBJECT_SELF)
int GetFirstDivineClassPosition(object oCaster = OBJECT_SELF) int GetFirstDivineClassPosition(object oCaster = OBJECT_SELF)
{ {
int i; int i;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
if(GetIsDivineClass(GetClassByPosition(i, oCaster), oCaster)) if(GetIsDivineClass(GetClassByPosition(i, oCaster), oCaster))
return i; return i;
@@ -1019,7 +1033,7 @@ int GetPrimaryArcaneClass(object oCaster = OBJECT_SELF)
else else
{ {
int i, nClassTmp, nClassLvl; int i, nClassTmp, nClassLvl;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
nClassTmp = GetClassByPosition(i, oCaster); nClassTmp = GetClassByPosition(i, oCaster);
if(GetIsArcaneClass(nClassTmp, oCaster) && nClassTmp != CLASS_TYPE_SUBLIME_CHORD) if(GetIsArcaneClass(nClassTmp, oCaster) && nClassTmp != CLASS_TYPE_SUBLIME_CHORD)
@@ -1063,7 +1077,7 @@ int GetPrimaryDivineClass(object oCaster = OBJECT_SELF)
else else
{ {
int i, nClassTmp, nClassLvl; int i, nClassTmp, nClassLvl;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
nClassTmp = GetClassByPosition(i, oCaster); nClassTmp = GetClassByPosition(i, oCaster);
if(GetIsDivineClass(nClassTmp, oCaster)) if(GetIsDivineClass(nClassTmp, oCaster))
@@ -1088,7 +1102,7 @@ int GetPrimarySpellcastingClass(object oCaster = OBJECT_SELF)
int nClass; int nClass;
int i, nClassTmp, nClassLvl; int i, nClassTmp, nClassLvl;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
nClassTmp = GetClassByPosition(i, oCaster); nClassTmp = GetClassByPosition(i, oCaster);
if(GetIsArcaneClass(nClassTmp, oCaster) if(GetIsArcaneClass(nClassTmp, oCaster)
@@ -1512,9 +1526,20 @@ int UrPriestCL(object oCaster, int nCastingClass)
int iClass1 = GetClassByPosition(1, oCaster); int iClass1 = GetClassByPosition(1, oCaster);
int iClass2 = GetClassByPosition(2, oCaster); int iClass2 = GetClassByPosition(2, oCaster);
int iClass3 = GetClassByPosition(3, oCaster); int iClass3 = GetClassByPosition(3, oCaster);
int iClass4 = GetClassByPosition(4, oCaster);
int iClass5 = GetClassByPosition(5, oCaster);
int iClass6 = GetClassByPosition(6, oCaster);
int iClass7 = GetClassByPosition(7, oCaster);
int iClass8 = GetClassByPosition(8, oCaster);
int iClass1Lev = GetLevelByPosition(1, oCaster); int iClass1Lev = GetLevelByPosition(1, oCaster);
int iClass2Lev = GetLevelByPosition(2, oCaster); int iClass2Lev = GetLevelByPosition(2, oCaster);
int iClass3Lev = GetLevelByPosition(3, oCaster); int iClass3Lev = GetLevelByPosition(3, oCaster);
int iClass4Lev = GetLevelByPosition(4, oCaster);
int iClass5Lev = GetLevelByPosition(5, oCaster);
int iClass6Lev = GetLevelByPosition(6, oCaster);
int iClass7Lev = GetLevelByPosition(7, oCaster);
int iClass8Lev = GetLevelByPosition(8, oCaster);
/*if (iClass1 == CLASS_TYPE_PALADIN || iClass1 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0; /*if (iClass1 == CLASS_TYPE_PALADIN || iClass1 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass2 == CLASS_TYPE_PALADIN || iClass2 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0; if (iClass2 == CLASS_TYPE_PALADIN || iClass2 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
@@ -1539,28 +1564,69 @@ int UrPriestCL(object oCaster, int nCastingClass)
iClass1 = GetClassByPosition(1, oCaster); iClass1 = GetClassByPosition(1, oCaster);
iClass2 = GetClassByPosition(2, oCaster); iClass2 = GetClassByPosition(2, oCaster);
iClass3 = GetClassByPosition(3, oCaster); iClass3 = GetClassByPosition(3, oCaster);
iClass4 = GetClassByPosition(4, oCaster);
iClass5 = GetClassByPosition(5, oCaster);
iClass6 = GetClassByPosition(6, oCaster);
iClass7 = GetClassByPosition(7, oCaster);
iClass8 = GetClassByPosition(8, oCaster);
iClass1Lev = GetLevelByPosition(1, oCaster); iClass1Lev = GetLevelByPosition(1, oCaster);
iClass2Lev = GetLevelByPosition(2, oCaster); iClass2Lev = GetLevelByPosition(2, oCaster);
iClass3Lev = GetLevelByPosition(3, oCaster); iClass3Lev = GetLevelByPosition(3, oCaster);
iClass4Lev = GetLevelByPosition(4, oCaster);
iClass5Lev = GetLevelByPosition(5, oCaster);
iClass6Lev = GetLevelByPosition(6, oCaster);
iClass7Lev = GetLevelByPosition(7, oCaster);
iClass8Lev = GetLevelByPosition(8, oCaster);
if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0; if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0; if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0; if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0;
if (iClass4 == CLASS_TYPE_HEXBLADE) iClass4Lev = (iClass4Lev >= 4) ? (iClass4Lev / 2) : 0;
if (iClass5 == CLASS_TYPE_HEXBLADE) iClass5Lev = (iClass5Lev >= 4) ? (iClass5Lev / 2) : 0;
if (iClass6 == CLASS_TYPE_HEXBLADE) iClass6Lev = (iClass6Lev >= 4) ? (iClass6Lev / 2) : 0;
if (iClass7 == CLASS_TYPE_HEXBLADE) iClass7Lev = (iClass7Lev >= 4) ? (iClass7Lev / 2) : 0;
if (iClass8 == CLASS_TYPE_HEXBLADE) iClass8Lev = (iClass8Lev >= 4) ? (iClass8Lev / 2) : 0;
if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster); if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster);
if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster); if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster);
if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster); if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster);
if (iClass4 == iFirstArcane) iClass4Lev += GetArcanePRCLevels(oCaster);
if (iClass5 == iFirstArcane) iClass5Lev += GetArcanePRCLevels(oCaster);
if (iClass6 == iFirstArcane) iClass6Lev += GetArcanePRCLevels(oCaster);
if (iClass7 == iFirstArcane) iClass7Lev += GetArcanePRCLevels(oCaster);
if (iClass8 == iFirstArcane) iClass8Lev += GetArcanePRCLevels(oCaster);
iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev); iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev);
iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev); iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev);
iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev); iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev);
iClass4Lev += PracticedSpellcasting(oCaster, iClass4, iClass4Lev);
iClass5Lev += PracticedSpellcasting(oCaster, iClass5, iClass5Lev);
iClass6Lev += PracticedSpellcasting(oCaster, iClass6, iClass5Lev);
iClass7Lev += PracticedSpellcasting(oCaster, iClass7, iClass6Lev);
iClass8Lev += PracticedSpellcasting(oCaster, iClass8, iClass7Lev);
if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0; if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0;
if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0; if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0;
if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0; if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0;
if (!GetIsArcaneClass(iClass4, oCaster)) iClass4Lev = 0;
if (!GetIsArcaneClass(iClass5, oCaster)) iClass5Lev = 0;
if (!GetIsArcaneClass(iClass6, oCaster)) iClass6Lev = 0;
if (!GetIsArcaneClass(iClass7, oCaster)) iClass7Lev = 0;
if (!GetIsArcaneClass(iClass8, oCaster)) iClass8Lev = 0;
nTotal += iClass1Lev + iClass2Lev + iClass3Lev + iClass4Lev + iClass5Lev + iClass6Lev + iClass7Lev + iClass8Lev;
if (DEBUG) DoDebug("UrPriestCL Arcane - iClass1Lev "+IntToString(iClass1Lev)+" iClass2Lev "
+IntToString(iClass2Lev)+" iClass3Lev "
+IntToString(iClass3Lev)+" iClass4Lev "
+IntToString(iClass4Lev)+" iClass5Lev "
+IntToString(iClass5Lev)+" iClass6Lev "
+IntToString(iClass6Lev)+" iClass7Lev "
+IntToString(iClass7Lev)+" iClass8Lev "
+IntToString(iClass8Lev));
nTotal += iClass1Lev + iClass2Lev + iClass3Lev;
if (DEBUG) DoDebug("UrPriestCL Arcane - iClass1Lev "+IntToString(iClass1Lev)+" iClass2Lev "+IntToString(iClass2Lev)+" iClass3Lev "+IntToString(iClass3Lev));
if (DEBUG) DoDebug("UrPriestCL Total - nTotal "+IntToString(nTotal)); if (DEBUG) DoDebug("UrPriestCL Total - nTotal "+IntToString(nTotal));
return nTotal/2; return nTotal/2;
} }
@@ -1620,29 +1686,65 @@ int GetLevelByTypeArcane(object oCaster = OBJECT_SELF)
int iClass1 = GetClassByPosition(1, oCaster); int iClass1 = GetClassByPosition(1, oCaster);
int iClass2 = GetClassByPosition(2, oCaster); int iClass2 = GetClassByPosition(2, oCaster);
int iClass3 = GetClassByPosition(3, oCaster); int iClass3 = GetClassByPosition(3, oCaster);
int iClass4 = GetClassByPosition(4, oCaster);
int iClass5 = GetClassByPosition(5, oCaster);
int iClass6 = GetClassByPosition(6, oCaster);
int iClass7 = GetClassByPosition(8, oCaster);
int iClass8 = GetClassByPosition(8, oCaster);
int iClass1Lev = GetLevelByPosition(1, oCaster); int iClass1Lev = GetLevelByPosition(1, oCaster);
int iClass2Lev = GetLevelByPosition(2, oCaster); int iClass2Lev = GetLevelByPosition(2, oCaster);
int iClass3Lev = GetLevelByPosition(3, oCaster); int iClass3Lev = GetLevelByPosition(3, oCaster);
int iClass4Lev = GetLevelByPosition(4, oCaster);
int iClass5Lev = GetLevelByPosition(5, oCaster);
int iClass6Lev = GetLevelByPosition(6, oCaster);
int iClass7Lev = GetLevelByPosition(7, oCaster);
int iClass8Lev = GetLevelByPosition(8, oCaster);
if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0; if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0; if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0; if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0;
if (iClass4 == CLASS_TYPE_HEXBLADE) iClass4Lev = (iClass4Lev >= 4) ? (iClass4Lev / 2) : 0;
if (iClass5 == CLASS_TYPE_HEXBLADE) iClass5Lev = (iClass5Lev >= 4) ? (iClass5Lev / 2) : 0;
if (iClass6 == CLASS_TYPE_HEXBLADE) iClass6Lev = (iClass6Lev >= 4) ? (iClass6Lev / 2) : 0;
if (iClass7 == CLASS_TYPE_HEXBLADE) iClass7Lev = (iClass7Lev >= 4) ? (iClass7Lev / 2) : 0;
if (iClass8 == CLASS_TYPE_HEXBLADE) iClass8Lev = (iClass8Lev >= 4) ? (iClass8Lev / 2) : 0;
if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster); if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster);
if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster); if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster);
if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster); if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster);
if (iClass4 == iFirstArcane) iClass4Lev += GetArcanePRCLevels(oCaster);
if (iClass5 == iFirstArcane) iClass5Lev += GetArcanePRCLevels(oCaster);
if (iClass6 == iFirstArcane) iClass6Lev += GetArcanePRCLevels(oCaster);
if (iClass7 == iFirstArcane) iClass7Lev += GetArcanePRCLevels(oCaster);
if (iClass8 == iFirstArcane) iClass8Lev += GetArcanePRCLevels(oCaster);
iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev); iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev);
iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev); iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev);
iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev); iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev);
iClass4Lev += PracticedSpellcasting(oCaster, iClass4, iClass4Lev);
iClass5Lev += PracticedSpellcasting(oCaster, iClass5, iClass5Lev);
iClass6Lev += PracticedSpellcasting(oCaster, iClass6, iClass5Lev);
iClass7Lev += PracticedSpellcasting(oCaster, iClass7, iClass6Lev);
iClass8Lev += PracticedSpellcasting(oCaster, iClass8, iClass7Lev);
if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0; if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0;
if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0; if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0;
if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0; if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0;
if (!GetIsArcaneClass(iClass4, oCaster)) iClass4Lev = 0;
if (!GetIsArcaneClass(iClass5, oCaster)) iClass5Lev = 0;
if (!GetIsArcaneClass(iClass6, oCaster)) iClass6Lev = 0;
if (!GetIsArcaneClass(iClass7, oCaster)) iClass7Lev = 0;
if (!GetIsArcaneClass(iClass8, oCaster)) iClass8Lev = 0;
if (iClass1Lev > iBest) iBest = iClass1Lev; if (iClass1Lev > iBest) iBest = iClass1Lev;
if (iClass2Lev > iBest) iBest = iClass2Lev; if (iClass2Lev > iBest) iBest = iClass2Lev;
if (iClass3Lev > iBest) iBest = iClass3Lev; if (iClass3Lev > iBest) iBest = iClass3Lev;
if (iClass4Lev > iBest) iBest = iClass4Lev;
if (iClass5Lev > iBest) iBest = iClass5Lev;
if (iClass6Lev > iBest) iBest = iClass6Lev;
if (iClass7Lev > iBest) iBest = iClass7Lev;
if (iClass8Lev > iBest) iBest = iClass8Lev;
return iBest; return iBest;
} }
@@ -1654,29 +1756,68 @@ int GetLevelByTypeDivine(object oCaster = OBJECT_SELF)
int iClass1 = GetClassByPosition(1, oCaster); int iClass1 = GetClassByPosition(1, oCaster);
int iClass2 = GetClassByPosition(2, oCaster); int iClass2 = GetClassByPosition(2, oCaster);
int iClass3 = GetClassByPosition(3, oCaster); int iClass3 = GetClassByPosition(3, oCaster);
int iClass4 = GetClassByPosition(4, oCaster);
int iClass5 = GetClassByPosition(5, oCaster);
int iClass6 = GetClassByPosition(6, oCaster);
int iClass7 = GetClassByPosition(8, oCaster);
int iClass8 = GetClassByPosition(8, oCaster);
int iClass1Lev = GetLevelByPosition(1, oCaster); int iClass1Lev = GetLevelByPosition(1, oCaster);
int iClass2Lev = GetLevelByPosition(2, oCaster); int iClass2Lev = GetLevelByPosition(2, oCaster);
int iClass3Lev = GetLevelByPosition(3, oCaster); int iClass3Lev = GetLevelByPosition(3, oCaster);
int iClass4Lev = GetLevelByPosition(4, oCaster);
int iClass5Lev = GetLevelByPosition(5, oCaster);
int iClass6Lev = GetLevelByPosition(6, oCaster);
int iClass7Lev = GetLevelByPosition(7, oCaster);
int iClass8Lev = GetLevelByPosition(8, oCaster);
if (iClass1 == CLASS_TYPE_PALADIN || iClass1 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0; if (iClass1 == CLASS_TYPE_PALADIN || iClass1 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass2 == CLASS_TYPE_PALADIN || iClass2 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0; if (iClass2 == CLASS_TYPE_PALADIN || iClass2 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass3 == CLASS_TYPE_PALADIN || iClass3 == CLASS_TYPE_RANGER) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0; if (iClass3 == CLASS_TYPE_PALADIN || iClass3 == CLASS_TYPE_RANGER) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0;
if (iClass4 == CLASS_TYPE_PALADIN || iClass4 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass5 == CLASS_TYPE_PALADIN || iClass5 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass6 == CLASS_TYPE_PALADIN || iClass6 == CLASS_TYPE_RANGER) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0;
if (iClass7 == CLASS_TYPE_PALADIN || iClass7 == CLASS_TYPE_RANGER) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass8 == CLASS_TYPE_PALADIN || iClass8 == CLASS_TYPE_RANGER) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass1 == iFirstDivine) iClass1Lev += GetDivinePRCLevels(oCaster); if (iClass1 == iFirstDivine) iClass1Lev += GetDivinePRCLevels(oCaster);
if (iClass2 == iFirstDivine) iClass2Lev += GetDivinePRCLevels(oCaster); if (iClass2 == iFirstDivine) iClass2Lev += GetDivinePRCLevels(oCaster);
if (iClass3 == iFirstDivine) iClass3Lev += GetDivinePRCLevels(oCaster); if (iClass3 == iFirstDivine) iClass3Lev += GetDivinePRCLevels(oCaster);
if (iClass4 == iFirstDivine) iClass4Lev += GetDivinePRCLevels(oCaster);
if (iClass5 == iFirstDivine) iClass5Lev += GetDivinePRCLevels(oCaster);
if (iClass6 == iFirstDivine) iClass6Lev += GetDivinePRCLevels(oCaster);
if (iClass7 == iFirstDivine) iClass7Lev += GetDivinePRCLevels(oCaster);
if (iClass8 == iFirstDivine) iClass8Lev += GetDivinePRCLevels(oCaster);
iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev); iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev);
iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev); iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev);
iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev); iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev);
iClass4Lev += PracticedSpellcasting(oCaster, iClass4, iClass4Lev);
iClass5Lev += PracticedSpellcasting(oCaster, iClass5, iClass5Lev);
iClass6Lev += PracticedSpellcasting(oCaster, iClass6, iClass5Lev);
iClass7Lev += PracticedSpellcasting(oCaster, iClass7, iClass6Lev);
iClass8Lev += PracticedSpellcasting(oCaster, iClass8, iClass7Lev);
if (!GetIsDivineClass(iClass1, oCaster)) iClass1Lev = 0; if (!GetIsDivineClass(iClass1, oCaster)) iClass1Lev = 0;
if (!GetIsDivineClass(iClass2, oCaster)) iClass2Lev = 0; if (!GetIsDivineClass(iClass2, oCaster)) iClass2Lev = 0;
if (!GetIsDivineClass(iClass3, oCaster)) iClass3Lev = 0; if (!GetIsDivineClass(iClass3, oCaster)) iClass3Lev = 0;
if (!GetIsDivineClass(iClass4, oCaster)) iClass4Lev = 0;
if (!GetIsDivineClass(iClass5, oCaster)) iClass5Lev = 0;
if (!GetIsDivineClass(iClass6, oCaster)) iClass6Lev = 0;
if (!GetIsDivineClass(iClass7, oCaster)) iClass7Lev = 0;
if (!GetIsDivineClass(iClass8, oCaster)) iClass8Lev = 0;
if (iClass1Lev > iBest) iBest = iClass1Lev; if (iClass1Lev > iBest) iBest = iClass1Lev;
if (iClass2Lev > iBest) iBest = iClass2Lev; if (iClass2Lev > iBest) iBest = iClass2Lev;
if (iClass3Lev > iBest) iBest = iClass3Lev; if (iClass3Lev > iBest) iBest = iClass3Lev;
if (iClass4Lev > iBest) iBest = iClass4Lev;
if (iClass5Lev > iBest) iBest = iClass5Lev;
if (iClass6Lev > iBest) iBest = iClass6Lev;
if (iClass7Lev > iBest) iBest = iClass7Lev;
if (iClass8Lev > iBest) iBest = iClass8Lev;
return iBest; return iBest;
} }
//:: Test Void
//void main (){}

View File

@@ -6,7 +6,7 @@
Stratovarius Stratovarius
*/ */
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////Begin Generic//////////////// ////////////////Begin Generic////////////////
@@ -1606,6 +1606,8 @@ void RemoveOldSongs(object oPC)
// since in NWN character can have max 3 classes. We also know that Eldritch Theurge // since in NWN character can have max 3 classes. We also know that Eldritch Theurge
// is at positon 3 (unless player is cheating). // is at positon 3 (unless player is cheating).
// So we just need to check the third class. // So we just need to check the third class.
//:: [PRC .35] This function will require marker feats
int GetETArcaneClass(object oPC) int GetETArcaneClass(object oPC)
{ {
int nClass = GetClassByPosition(1, oPC); int nClass = GetClassByPosition(1, oPC);

View File

@@ -1,6 +1,7 @@
/* Core functions taken from high up the branch /* Core functions taken from high up the branch
which are needed lower. */ which are needed lower. */
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function Prototypes */ /* Function Prototypes */
@@ -446,7 +447,7 @@ int PRCGetSpellLevel(object oCreature, int nSpell)
return nSpellLevel; return nSpellLevel;
int i; int i;
for (i=1;i<=3;i++) for (i=1;i<=8;i++)
{ {
nClass = GetClassByPosition(i, oCreature); nClass = GetClassByPosition(i, oCreature);
int nCharLevel = GetLevelByClass(nClass, oCreature); int nCharLevel = GetLevelByClass(nClass, oCreature);
@@ -514,7 +515,7 @@ int GetIsNSBClass(int nClass)
int UseNewSpellBook(object oCreature) int UseNewSpellBook(object oCreature)
{ {
int i; int i;
for (i = 1; i <= 3; i++) for (i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oCreature); int nClass = GetClassByPosition(i, oCreature);
if(GetIsNSBClass(nClass)) if(GetIsNSBClass(nClass))
@@ -557,7 +558,7 @@ int PRCGetHasSpell(int nRealSpellID, object oCreature = OBJECT_SELF)
int nClass, nSpellbookID, nCount, nMeta, i, j; int nClass, nSpellbookID, nCount, nMeta, i, j;
int nSpellbookType, nSpellLevel; int nSpellbookType, nSpellLevel;
string sFile, sFeat; string sFile, sFeat;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nClass = GetClassByPosition(i, oCreature); nClass = GetClassByPosition(i, oCreature);
sFile = GetFileForClass(nClass); sFile = GetFileForClass(nClass);
@@ -609,7 +610,7 @@ int PRCGetIsRealSpellKnown(int nRealSpellID, object oPC = OBJECT_SELF)
return TRUE; // means they know the spell (close enough) return TRUE; // means they know the spell (close enough)
int nClass; int nClass;
int nClassSlot = 1; int nClassSlot = 1;
while(nClassSlot <= 3) while(nClassSlot <= 8)
{ {
nClass = GetClassByPosition(nClassSlot, oPC); nClass = GetClassByPosition(nClassSlot, oPC);
if(GetIsDivineClass(nClass) || GetIsArcaneClass(nClass)) if(GetIsDivineClass(nClass) || GetIsArcaneClass(nClass))

View File

@@ -8,6 +8,8 @@
//:: Created On: August 31st, 2005 //:: Created On: August 31st, 2005
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/10
// Function returns the domain in the input slot. // Function returns the domain in the input slot.
// A person can have a maximum of 5 bonus domains. // A person can have a maximum of 5 bonus domains.
@@ -240,7 +242,7 @@ void CastDomainSpell(object oPC, int nSlot, int nLevel)
if(!nCount) if(!nCount)
{ {
int n; int n;
for(n = 1; n < 4; n++) for(n = 1; n < 8; n++)
{ {
nClass = GetClassByPosition(n, oPC); nClass = GetClassByPosition(n, oPC);

View File

@@ -15,6 +15,8 @@
//:: Created On: Dec 19, 2003 //:: Created On: Dec 19, 2003
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/10
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// This is the "event" that is called to re-evalutate PRC bonuses. Currently // This is the "event" that is called to re-evalutate PRC bonuses. Currently
// it is fired by OnEquip, OnUnequip and OnLevel. If you want to move any // it is fired by OnEquip, OnUnequip and OnLevel. If you want to move any
@@ -23,6 +25,10 @@
// feats to their own self-contained script // feats to their own self-contained script
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
//:: Test Void
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -89,7 +95,7 @@ void SetupCharacterData(object oPC)
// use bitwise to combine flags // use bitwise to combine flags
int i, iData, iShifting; int i, iData, iShifting;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClassType = GetClassByPosition(i, oPC); int nClassType = GetClassByPosition(i, oPC);
if(nClassType != CLASS_TYPE_INVALID) if(nClassType != CLASS_TYPE_INVALID)
@@ -268,7 +274,12 @@ void SetupCharacterData(object oPC)
SetPersistantLocalInt(oPC, "PRC_UNI_SHIFT_SCRIPT", 1); SetPersistantLocalInt(oPC, "PRC_UNI_SHIFT_SCRIPT", 1);
//Setup class info for onleveldown script //Setup class info for onleveldown script
int nCharData = ((GetClassByPosition(3, oPC) & 0xFF) << 16) | int nCharData = ((GetClassByPosition(8, oPC) & 0xFF) << 56) |
((GetClassByPosition(7, oPC) & 0xFF) << 48) |
((GetClassByPosition(5, oPC) & 0xFF) << 40) |
((GetClassByPosition(5, oPC) & 0xFF) << 32) |
((GetClassByPosition(4, oPC) & 0xFF) << 24) |
((GetClassByPosition(3, oPC) & 0xFF) << 16) |
((GetClassByPosition(2, oPC) & 0xFF) << 8) | ((GetClassByPosition(2, oPC) & 0xFF) << 8) |
(GetClassByPosition(1, oPC) & 0xFF); (GetClassByPosition(1, oPC) & 0xFF);
@@ -558,6 +569,7 @@ void EvalPRCFeats(object oPC)
// Must be after all evaluationscripts that need said function. // Must be after all evaluationscripts that need said function.
ExecuteScript("prc_bab_caller", oPC); ExecuteScript("prc_bab_caller", oPC);
//:: [PRC .35] Needs marker feats
// Classes an invoker can take // Classes an invoker can take
if(GetLevelByClass(CLASS_TYPE_MAESTER, oPC) || if(GetLevelByClass(CLASS_TYPE_MAESTER, oPC) ||
GetLevelByClass(CLASS_TYPE_ACOLYTE, oPC) || GetLevelByClass(CLASS_TYPE_ACOLYTE, oPC) ||

View File

@@ -6,7 +6,7 @@
*/ */
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
@@ -38,7 +38,11 @@ void CheckForPnPHolyAvenger(object oItem);
#include "inc_utility" #include "inc_utility"
#include "prc_inc_newip" #include "prc_inc_newip"
#include "prc_inc_castlvl"
#include "inc_newspellbook"
//:: Test Void
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Internal functions */ /* Internal functions */
@@ -134,7 +138,7 @@ void _prc_inc_itmrstr_ApplyWizardry(object oPC, object oItem, int nSpellLevel, s
SetLocalInt(oItem, "PRC_Wizardry"+IntToString(nSpellLevel), TRUE); SetLocalInt(oItem, "PRC_Wizardry"+IntToString(nSpellLevel), TRUE);
int nClass, nSlots, i; int nClass, nSlots, i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nClass = GetClassByPosition(i, oPC); nClass = GetClassByPosition(i, oPC);
if((sType == "A" && GetIsArcaneClass(nClass)) || (sType == "D" && GetIsDivineClass(nClass))) if((sType == "A" && GetIsArcaneClass(nClass)) || (sType == "D" && GetIsDivineClass(nClass)))

View File

@@ -1,3 +1,5 @@
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -589,6 +591,11 @@ void StoreCohort(object oCohort)
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class1", GetClassByPosition(1, oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class1", GetClassByPosition(1, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class2", GetClassByPosition(2, oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class2", GetClassByPosition(2, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class3", GetClassByPosition(3, oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class3", GetClassByPosition(3, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class4", GetClassByPosition(4, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class5", GetClassByPosition(5, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class6", GetClassByPosition(6, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class7", GetClassByPosition(7, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_class8", GetClassByPosition(8, oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_order", GetLawChaosValue(oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_order", GetLawChaosValue(oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_moral", GetGoodEvilValue(oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_moral", GetGoodEvilValue(oCohort));
SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_ethran", GetHasFeat(FEAT_ETHRAN, oCohort)); SetCampaignInt( COHORT_DATABASE, "Cohort_"+IntToString(nCohortCount)+"_ethran", GetHasFeat(FEAT_ETHRAN, oCohort));
@@ -1032,3 +1039,5 @@ void AddPremadeCohortsToDB()
SetCampaignInt(COHORT_DATABASE, "PremadeCohorts", TRUE); SetCampaignInt(COHORT_DATABASE, "PremadeCohorts", TRUE);
} }
//:: Test Void
//void main (){}

View File

@@ -14,6 +14,8 @@
be necessary, except when new casting feats are created. be necessary, except when new casting feats are created.
*/ */
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function prototypes */ /* Function prototypes */
@@ -407,27 +409,49 @@ int GetPrCAdjustedCasterLevel(int nClass, object oCaster = OBJECT_SELF, int bAdj
int GetPrCAdjustedCasterLevelByType(int nClassType, object oCaster = OBJECT_SELF, int bAdjustForPractisedSpellcaster = TRUE) int GetPrCAdjustedCasterLevelByType(int nClassType, object oCaster = OBJECT_SELF, int bAdjustForPractisedSpellcaster = TRUE)
{ {
int nHighest; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCaster); nClass1 = GetClassByPosition(1, oCaster);
nClass2 = GetClassByPosition(2, oCaster); nClass2 = GetClassByPosition(2, oCaster);
nClass3 = GetClassByPosition(3, oCaster); nClass3 = GetClassByPosition(3, oCaster);
nClass4 = GetClassByPosition(4, oCaster);
nClass5 = GetClassByPosition(5, oCaster);
nClass6 = GetClassByPosition(6, oCaster);
nClass7 = GetClassByPosition(7, oCaster);
nClass8 = GetClassByPosition(8, oCaster);
if(nClassType == TYPE_ARCANE && (GetFirstArcaneClassPosition(oCaster) > 0)) if(nClassType == TYPE_ARCANE && (GetFirstArcaneClassPosition(oCaster) > 0))
{ {
if (GetIsArcaneClass(nClass1, oCaster)) nClass1Lvl = GetPrCAdjustedCasterLevel(nClass1, oCaster, bAdjustForPractisedSpellcaster); if (GetIsArcaneClass(nClass1, oCaster)) nClass1Lvl = GetPrCAdjustedCasterLevel(nClass1, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass2, oCaster)) nClass2Lvl = GetPrCAdjustedCasterLevel(nClass2, oCaster, bAdjustForPractisedSpellcaster); if (GetIsArcaneClass(nClass2, oCaster)) nClass2Lvl = GetPrCAdjustedCasterLevel(nClass2, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass3, oCaster)) nClass3Lvl = GetPrCAdjustedCasterLevel(nClass3, oCaster, bAdjustForPractisedSpellcaster); if (GetIsArcaneClass(nClass3, oCaster)) nClass3Lvl = GetPrCAdjustedCasterLevel(nClass3, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass4, oCaster)) nClass4Lvl = GetPrCAdjustedCasterLevel(nClass4, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass5, oCaster)) nClass5Lvl = GetPrCAdjustedCasterLevel(nClass5, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass6, oCaster)) nClass6Lvl = GetPrCAdjustedCasterLevel(nClass6, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass7, oCaster)) nClass7Lvl = GetPrCAdjustedCasterLevel(nClass7, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsArcaneClass(nClass8, oCaster)) nClass8Lvl = GetPrCAdjustedCasterLevel(nClass8, oCaster, bAdjustForPractisedSpellcaster);
} }
else if (nClassType == TYPE_DIVINE && (GetFirstDivineClassPosition(oCaster) > 0)) else if (nClassType == TYPE_DIVINE && (GetFirstDivineClassPosition(oCaster) > 0))
{ {
if (GetIsDivineClass(nClass1, oCaster)) nClass1Lvl = GetPrCAdjustedCasterLevel(nClass1, oCaster, bAdjustForPractisedSpellcaster); if (GetIsDivineClass(nClass1, oCaster)) nClass1Lvl = GetPrCAdjustedCasterLevel(nClass1, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass2, oCaster)) nClass2Lvl = GetPrCAdjustedCasterLevel(nClass2, oCaster, bAdjustForPractisedSpellcaster); if (GetIsDivineClass(nClass2, oCaster)) nClass2Lvl = GetPrCAdjustedCasterLevel(nClass2, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass3, oCaster)) nClass3Lvl = GetPrCAdjustedCasterLevel(nClass3, oCaster, bAdjustForPractisedSpellcaster); if (GetIsDivineClass(nClass3, oCaster)) nClass3Lvl = GetPrCAdjustedCasterLevel(nClass3, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass4, oCaster)) nClass4Lvl = GetPrCAdjustedCasterLevel(nClass4, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass5, oCaster)) nClass5Lvl = GetPrCAdjustedCasterLevel(nClass5, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass6, oCaster)) nClass6Lvl = GetPrCAdjustedCasterLevel(nClass6, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass7, oCaster)) nClass7Lvl = GetPrCAdjustedCasterLevel(nClass7, oCaster, bAdjustForPractisedSpellcaster);
if (GetIsDivineClass(nClass8, oCaster)) nClass8Lvl = GetPrCAdjustedCasterLevel(nClass8, oCaster, bAdjustForPractisedSpellcaster);
} }
nHighest = nClass1Lvl; int nHighest = nClass1Lvl;
if (nClass2Lvl > nHighest) nHighest = nClass2Lvl; if (nClass2Lvl > nHighest) nHighest = nClass2Lvl;
if (nClass3Lvl > nHighest) nHighest = nClass3Lvl; if (nClass3Lvl > nHighest) nHighest = nClass3Lvl;
if (nClass4Lvl > nHighest) nHighest = nClass4Lvl;
if (nClass5Lvl > nHighest) nHighest = nClass5Lvl;
if (nClass6Lvl > nHighest) nHighest = nClass6Lvl;
if (nClass7Lvl > nHighest) nHighest = nClass7Lvl;
if (nClass8Lvl > nHighest) nHighest = nClass8Lvl;
return nHighest; return nHighest;
} }
@@ -438,9 +462,20 @@ int GetLevelByTypeArcaneFeats(object oCaster = OBJECT_SELF, int iSpellID = -1)
int iClass1 = GetClassByPosition(1, oCaster); int iClass1 = GetClassByPosition(1, oCaster);
int iClass2 = GetClassByPosition(2, oCaster); int iClass2 = GetClassByPosition(2, oCaster);
int iClass3 = GetClassByPosition(3, oCaster); int iClass3 = GetClassByPosition(3, oCaster);
int iClass4 = GetClassByPosition(4, oCaster);
int iClass5 = GetClassByPosition(5, oCaster);
int iClass6 = GetClassByPosition(6, oCaster);
int iClass7 = GetClassByPosition(7, oCaster);
int iClass8 = GetClassByPosition(8, oCaster);
int iClass1Lev = GetLevelByPosition(1, oCaster); int iClass1Lev = GetLevelByPosition(1, oCaster);
int iClass2Lev = GetLevelByPosition(2, oCaster); int iClass2Lev = GetLevelByPosition(2, oCaster);
int iClass3Lev = GetLevelByPosition(3, oCaster); int iClass3Lev = GetLevelByPosition(3, oCaster);
int iClass4Lev = GetLevelByPosition(4, oCaster);
int iClass5Lev = GetLevelByPosition(5, oCaster);
int iClass6Lev = GetLevelByPosition(6, oCaster);
int iClass7Lev = GetLevelByPosition(7, oCaster);
int iClass8Lev = GetLevelByPosition(8, oCaster);
if (iSpellID = -1) iSpellID = PRCGetSpellId(oCaster); if (iSpellID = -1) iSpellID = PRCGetSpellId(oCaster);
@@ -454,7 +489,18 @@ int GetLevelByTypeArcaneFeats(object oCaster = OBJECT_SELF, int iSpellID = -1)
if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0; if (iClass1 == CLASS_TYPE_HEXBLADE) iClass1Lev = (iClass1Lev >= 4) ? (iClass1Lev / 2) : 0;
if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0; if (iClass2 == CLASS_TYPE_HEXBLADE) iClass2Lev = (iClass2Lev >= 4) ? (iClass2Lev / 2) : 0;
if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0; if (iClass3 == CLASS_TYPE_HEXBLADE) iClass3Lev = (iClass3Lev >= 4) ? (iClass3Lev / 2) : 0;
if (iClass4 == CLASS_TYPE_HEXBLADE) iClass4Lev = (iClass4Lev >= 4) ? (iClass4Lev / 2) : 0;
if (iClass5 == CLASS_TYPE_HEXBLADE) iClass5Lev = (iClass5Lev >= 4) ? (iClass5Lev / 2) : 0;
if (iClass6 == CLASS_TYPE_HEXBLADE) iClass6Lev = (iClass6Lev >= 4) ? (iClass6Lev / 2) : 0;
if (iClass7 == CLASS_TYPE_HEXBLADE) iClass7Lev = (iClass7Lev >= 4) ? (iClass7Lev / 2) : 0;
if (iClass8 == CLASS_TYPE_HEXBLADE) iClass8Lev = (iClass8Lev >= 4) ? (iClass8Lev / 2) : 0;
if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster);
if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster);
if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster);
if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster);
if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster);
if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster);
if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster); if (iClass1 == iFirstArcane) iClass1Lev += GetArcanePRCLevels(oCaster);
if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster); if (iClass2 == iFirstArcane) iClass2Lev += GetArcanePRCLevels(oCaster);
if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster); if (iClass3 == iFirstArcane) iClass3Lev += GetArcanePRCLevels(oCaster);
@@ -462,18 +508,38 @@ int GetLevelByTypeArcaneFeats(object oCaster = OBJECT_SELF, int iSpellID = -1)
iClass1Lev += iBoost; iClass1Lev += iBoost;
iClass2Lev += iBoost; iClass2Lev += iBoost;
iClass3Lev += iBoost; iClass3Lev += iBoost;
iClass4Lev += iBoost;
iClass5Lev += iBoost;
iClass6Lev += iBoost;
iClass7Lev += iBoost;
iClass8Lev += iBoost;
iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev); iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev);
iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev); iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev);
iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev); iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev);
iClass4Lev += PracticedSpellcasting(oCaster, iClass4, iClass1Lev);
iClass5Lev += PracticedSpellcasting(oCaster, iClass5, iClass2Lev);
iClass6Lev += PracticedSpellcasting(oCaster, iClass6, iClass3Lev);
iClass7Lev += PracticedSpellcasting(oCaster, iClass7, iClass1Lev);
iClass8Lev += PracticedSpellcasting(oCaster, iClass8, iClass2Lev);
if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0; if (!GetIsArcaneClass(iClass1, oCaster)) iClass1Lev = 0;
if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0; if (!GetIsArcaneClass(iClass2, oCaster)) iClass2Lev = 0;
if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0; if (!GetIsArcaneClass(iClass3, oCaster)) iClass3Lev = 0;
if (!GetIsArcaneClass(iClass4, oCaster)) iClass4Lev = 0;
if (!GetIsArcaneClass(iClass5, oCaster)) iClass5Lev = 0;
if (!GetIsArcaneClass(iClass6, oCaster)) iClass6Lev = 0;
if (!GetIsArcaneClass(iClass7, oCaster)) iClass7Lev = 0;
if (!GetIsArcaneClass(iClass8, oCaster)) iClass8Lev = 0;
if (iClass1Lev > iBest) iBest = iClass1Lev; if (iClass1Lev > iBest) iBest = iClass1Lev;
if (iClass2Lev > iBest) iBest = iClass2Lev; if (iClass2Lev > iBest) iBest = iClass2Lev;
if (iClass3Lev > iBest) iBest = iClass3Lev; if (iClass3Lev > iBest) iBest = iClass3Lev;
if (iClass4Lev > iBest) iBest = iClass4Lev;
if (iClass5Lev > iBest) iBest = iClass5Lev;
if (iClass6Lev > iBest) iBest = iClass6Lev;
if (iClass7Lev > iBest) iBest = iClass7Lev;
if (iClass8Lev > iBest) iBest = iClass8Lev;
return iBest; return iBest;
} }
@@ -485,9 +551,20 @@ int GetLevelByTypeDivineFeats(object oCaster = OBJECT_SELF, int iSpellID = -1)
int iClass1 = GetClassByPosition(1, oCaster); int iClass1 = GetClassByPosition(1, oCaster);
int iClass2 = GetClassByPosition(2, oCaster); int iClass2 = GetClassByPosition(2, oCaster);
int iClass3 = GetClassByPosition(3, oCaster); int iClass3 = GetClassByPosition(3, oCaster);
int iClass4 = GetClassByPosition(4, oCaster);
int iClass5 = GetClassByPosition(5, oCaster);
int iClass6 = GetClassByPosition(6, oCaster);
int iClass7 = GetClassByPosition(7, oCaster);
int iClass8 = GetClassByPosition(8, oCaster);
int iClass1Lev = GetLevelByPosition(1, oCaster); int iClass1Lev = GetLevelByPosition(1, oCaster);
int iClass2Lev = GetLevelByPosition(2, oCaster); int iClass2Lev = GetLevelByPosition(2, oCaster);
int iClass3Lev = GetLevelByPosition(3, oCaster); int iClass3Lev = GetLevelByPosition(3, oCaster);
int iClass4Lev = GetLevelByPosition(4, oCaster);
int iClass5Lev = GetLevelByPosition(5, oCaster);
int iClass6Lev = GetLevelByPosition(6, oCaster);
int iClass7Lev = GetLevelByPosition(7, oCaster);
int iClass8Lev = GetLevelByPosition(8, oCaster);
if (iSpellID = -1) iSpellID = PRCGetSpellId(oCaster); if (iSpellID = -1) iSpellID = PRCGetSpellId(oCaster);
@@ -499,36 +576,81 @@ int GetLevelByTypeDivineFeats(object oCaster = OBJECT_SELF, int iSpellID = -1)
if (iClass1 == CLASS_TYPE_PALADIN if (iClass1 == CLASS_TYPE_PALADIN
|| iClass1 == CLASS_TYPE_RANGER || iClass1 == CLASS_TYPE_RANGER
|| iClass3 == CLASS_TYPE_ANTI_PALADIN) || iClass1 == CLASS_TYPE_ANTI_PALADIN)
iClass1Lev = iClass1Lev / 2; iClass1Lev = iClass1Lev / 2;
if (iClass2 == CLASS_TYPE_PALADIN if (iClass2 == CLASS_TYPE_PALADIN
|| iClass2 == CLASS_TYPE_RANGER || iClass2 == CLASS_TYPE_RANGER
|| iClass3 == CLASS_TYPE_ANTI_PALADIN) || iClass2 == CLASS_TYPE_ANTI_PALADIN)
iClass2Lev = iClass2Lev / 2; iClass2Lev = iClass2Lev / 2;
if (iClass3 == CLASS_TYPE_PALADIN if (iClass3 == CLASS_TYPE_PALADIN
|| iClass3 == CLASS_TYPE_RANGER || iClass3 == CLASS_TYPE_RANGER
|| iClass3 == CLASS_TYPE_ANTI_PALADIN) || iClass3 == CLASS_TYPE_ANTI_PALADIN)
iClass3Lev = iClass3Lev / 2; iClass3Lev = iClass3Lev / 2;
if (iClass4 == CLASS_TYPE_PALADIN
|| iClass4 == CLASS_TYPE_RANGER
|| iClass4 == CLASS_TYPE_ANTI_PALADIN)
iClass4Lev = iClass4Lev / 2;
if (iClass5 == CLASS_TYPE_PALADIN
|| iClass5 == CLASS_TYPE_RANGER
|| iClass5 == CLASS_TYPE_ANTI_PALADIN)
iClass5Lev = iClass5Lev / 2;
if (iClass6 == CLASS_TYPE_PALADIN
|| iClass6 == CLASS_TYPE_RANGER
|| iClass6 == CLASS_TYPE_ANTI_PALADIN)
iClass6Lev = iClass6Lev / 2;
if (iClass7 == CLASS_TYPE_PALADIN
|| iClass7 == CLASS_TYPE_RANGER
|| iClass7 == CLASS_TYPE_ANTI_PALADIN)
iClass7Lev = iClass7Lev / 2;
if (iClass8 == CLASS_TYPE_PALADIN
|| iClass8 == CLASS_TYPE_RANGER
|| iClass8 == CLASS_TYPE_ANTI_PALADIN)
iClass8Lev = iClass7Lev / 2;
if (iClass1 == iFirstDivine) iClass1Lev += GetDivinePRCLevels(oCaster); if (iClass1 == iFirstDivine) iClass1Lev += GetDivinePRCLevels(oCaster);
if (iClass2 == iFirstDivine) iClass2Lev += GetDivinePRCLevels(oCaster); if (iClass2 == iFirstDivine) iClass2Lev += GetDivinePRCLevels(oCaster);
if (iClass3 == iFirstDivine) iClass3Lev += GetDivinePRCLevels(oCaster); if (iClass3 == iFirstDivine) iClass3Lev += GetDivinePRCLevels(oCaster);
if (iClass4 == iFirstDivine) iClass4Lev += GetDivinePRCLevels(oCaster);
if (iClass5 == iFirstDivine) iClass5Lev += GetDivinePRCLevels(oCaster);
if (iClass6 == iFirstDivine) iClass6Lev += GetDivinePRCLevels(oCaster);
if (iClass7 == iFirstDivine) iClass7Lev += GetDivinePRCLevels(oCaster);
if (iClass8 == iFirstDivine) iClass8Lev += GetDivinePRCLevels(oCaster);
iClass1Lev += iBoost; iClass1Lev += iBoost;
iClass2Lev += iBoost; iClass2Lev += iBoost;
iClass3Lev += iBoost; iClass3Lev += iBoost;
iClass4Lev += iBoost;
iClass5Lev += iBoost;
iClass6Lev += iBoost;
iClass7Lev += iBoost;
iClass8Lev += iBoost;
iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev); iClass1Lev += PracticedSpellcasting(oCaster, iClass1, iClass1Lev);
iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev); iClass2Lev += PracticedSpellcasting(oCaster, iClass2, iClass2Lev);
iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev); iClass3Lev += PracticedSpellcasting(oCaster, iClass3, iClass3Lev);
iClass4Lev += PracticedSpellcasting(oCaster, iClass4, iClass4Lev);
iClass5Lev += PracticedSpellcasting(oCaster, iClass5, iClass5Lev);
iClass6Lev += PracticedSpellcasting(oCaster, iClass6, iClass6Lev);
iClass7Lev += PracticedSpellcasting(oCaster, iClass1, iClass7Lev);
iClass8Lev += PracticedSpellcasting(oCaster, iClass2, iClass8Lev);
if (!GetIsDivineClass(iClass1, oCaster)) iClass1Lev = 0; if (!GetIsDivineClass(iClass1, oCaster)) iClass1Lev = 0;
if (!GetIsDivineClass(iClass2, oCaster)) iClass2Lev = 0; if (!GetIsDivineClass(iClass2, oCaster)) iClass2Lev = 0;
if (!GetIsDivineClass(iClass3, oCaster)) iClass3Lev = 0; if (!GetIsDivineClass(iClass3, oCaster)) iClass3Lev = 0;
if (!GetIsDivineClass(iClass4, oCaster)) iClass4Lev = 0;
if (!GetIsDivineClass(iClass5, oCaster)) iClass5Lev = 0;
if (!GetIsDivineClass(iClass6, oCaster)) iClass6Lev = 0;
if (!GetIsDivineClass(iClass7, oCaster)) iClass7Lev = 0;
if (!GetIsDivineClass(iClass8, oCaster)) iClass3Lev = 0;
if (iClass1Lev > iBest) iBest = iClass1Lev; if (iClass1Lev > iBest) iBest = iClass1Lev;
if (iClass2Lev > iBest) iBest = iClass2Lev; if (iClass2Lev > iBest) iBest = iClass2Lev;
if (iClass3Lev > iBest) iBest = iClass3Lev; if (iClass3Lev > iBest) iBest = iClass3Lev;
if (iClass4Lev > iBest) iBest = iClass4Lev;
if (iClass5Lev > iBest) iBest = iClass5Lev;
if (iClass6Lev > iBest) iBest = iClass6Lev;
if (iClass7Lev > iBest) iBest = iClass7Lev;
if (iClass8Lev > iBest) iBest = iClass8Lev;
return iBest; return iBest;
} }
@@ -2041,7 +2163,7 @@ void PRCDecrementRemainingSpellUses(object oCreature, int nSpell)
int nClass, nSpellbookID, nCount, nMeta, i, j; int nClass, nSpellbookID, nCount, nMeta, i, j;
int nSpellbookType, nSpellLevel; int nSpellbookType, nSpellLevel;
string sFile, sFeat; string sFile, sFeat;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nClass = GetClassByPosition(i, oCreature); nClass = GetClassByPosition(i, oCreature);
sFile = GetFileForClass(nClass); sFile = GetFileForClass(nClass);
@@ -2754,7 +2876,7 @@ int PRCGetSpellUsesLeft(int nRealSpellID, object oCreature = OBJECT_SELF)
int nClass, nSpellbookID, nCount, i, j; int nClass, nSpellbookID, nCount, i, j;
int nSpellbookType, nSpellLevel; int nSpellbookType, nSpellLevel;
string sFile, sFeat; string sFile, sFeat;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nClass = GetClassByPosition(i, oCreature); nClass = GetClassByPosition(i, oCreature);
sFile = GetFileForClass(nClass); sFile = GetFileForClass(nClass);
@@ -2920,3 +3042,6 @@ int X2PreSpellCastCode()
return nReturn; return nReturn;
} }
//:: Test Void
//void main (){}

View File

@@ -1,6 +1,13 @@
//:: Updated for .35 by Jaysyn 2023/03/10
#include "prc_inc_function" #include "prc_inc_function"
#include "inc_nwnx_funcs" #include "inc_nwnx_funcs"
//:: Test Void
//void main (){}
const int DEBUG_NATURAL_AC_CALCULATION = FALSE; const int DEBUG_NATURAL_AC_CALCULATION = FALSE;
int MAX_BONUS = GetPRCSwitch(PRC_PNP_SHIFTER_BONUS); int MAX_BONUS = GetPRCSwitch(PRC_PNP_SHIFTER_BONUS);
const int MAX_PENALTY = 10; const int MAX_PENALTY = 10;
@@ -1112,6 +1119,12 @@ void _prc_inc_PrintDebugItem(object oPC, string oItemType, object oItem)
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(1, oItem)); _prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(1, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(2, oItem)); _prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(2, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(3, oItem)); _prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(3, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(4, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(5, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(6, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(7, oItem));
_prc_inc_PrintClassInfo("=== ", oPC, oItem, GetClassByPosition(8, oItem));
_prc_inc_PrintShapeInfo(oPC, "------"); _prc_inc_PrintShapeInfo(oPC, "------");
_prc_inc_PrintShapeInfo(oPC, "====== Main hand weapon: " + (GetIsWeaponEffective(oItem, FALSE) ? "Effective" : "Ineffective")); _prc_inc_PrintShapeInfo(oPC, "====== Main hand weapon: " + (GetIsWeaponEffective(oItem, FALSE) ? "Effective" : "Ineffective"));
@@ -1259,6 +1272,11 @@ void _prc_inc_PrintShape(object oPC, object oTemplate, int bForceLogPrint)
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(1, oTemplate)); _prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(1, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(2, oTemplate)); _prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(2, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(3, oTemplate)); _prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(3, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(4, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(5, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(6, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(7, oTemplate));
_prc_inc_PrintClassInfo("=== ", oPC, oTemplate, GetClassByPosition(8, oTemplate));
_prc_inc_PrintShapeInfo(oPC, "=========="); _prc_inc_PrintShapeInfo(oPC, "==========");

View File

@@ -16,6 +16,7 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/10
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
@@ -33,6 +34,9 @@ const int POWER_LIST_WARMIND = CLASS_TYPE_WARMIND;
#include "psi_inc_const" #include "psi_inc_const"
//:: Test Main
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function prototypes */ /* Function prototypes */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -1059,13 +1063,36 @@ int GetManifesterLevel(object oManifester, int nSpecificClass = CLASS_TYPE_INVAL
} }
int GetHighestManifesterLevel(object oCreature) int GetHighestManifesterLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetManifesterLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestManifesterLevel(object oCreature)
{ {
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
), ),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
); );
} } */
int GetPowerLevel(object oManifester) int GetPowerLevel(object oManifester)
{ {
return GetLocalInt(oManifester, PRC_POWER_LEVEL); return GetLocalInt(oManifester, PRC_POWER_LEVEL);
@@ -1115,18 +1142,31 @@ int GetPrimaryPsionicClass(object oCreature = OBJECT_SELF)
else else
{ {
int nClassLvl; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCreature); nClass1 = GetClassByPosition(1, oCreature);
nClass2 = GetClassByPosition(2, oCreature); nClass2 = GetClassByPosition(2, oCreature);
nClass3 = GetClassByPosition(3, oCreature); nClass3 = GetClassByPosition(3, oCreature);
nClass4 = GetClassByPosition(4, oCreature);
nClass5 = GetClassByPosition(5, oCreature);
nClass6 = GetClassByPosition(6, oCreature);
nClass7 = GetClassByPosition(7, oCreature);
nClass8 = GetClassByPosition(8, oCreature);
if(GetIsPsionicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature); if(GetIsPsionicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
if(GetIsPsionicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature); if(GetIsPsionicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
if(GetIsPsionicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature); if(GetIsPsionicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
if(GetIsPsionicClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
if(GetIsPsionicClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
if(GetIsPsionicClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
if(GetIsPsionicClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
if(GetIsPsionicClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
nClass = nClass1; nClass = nClass1;
nClassLvl = nClass1Lvl; nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl) if(nClass2Lvl > nClassLvl)
{ {
nClass = nClass2; nClass = nClass2;
@@ -1137,6 +1177,32 @@ int GetPrimaryPsionicClass(object oCreature = OBJECT_SELF)
nClass = nClass3; nClass = nClass3;
nClassLvl = nClass3Lvl; nClassLvl = nClass3Lvl;
} }
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0) if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID; nClass = CLASS_TYPE_INVALID;
} }
@@ -1196,6 +1262,16 @@ int GetFirstPsionicClassPosition(object oCreature = OBJECT_SELF)
return 2; return 2;
if (GetIsPsionicClass(GetClassByPosition(3, oCreature))) if (GetIsPsionicClass(GetClassByPosition(3, oCreature)))
return 3; return 3;
if (GetIsPsionicClass(GetClassByPosition(4, oCreature)))
return 4;
if (GetIsPsionicClass(GetClassByPosition(5, oCreature)))
return 5;
if (GetIsPsionicClass(GetClassByPosition(6, oCreature)))
return 6;
if (GetIsPsionicClass(GetClassByPosition(7, oCreature)))
return 7;
if (GetIsPsionicClass(GetClassByPosition(8, oCreature)))
return 8;
return 0; return 0;
} }

View File

@@ -16,6 +16,11 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/10
//:: Test Void
// void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Function prototypes */ /* Function prototypes */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -295,13 +300,35 @@ int GetIsShadowMagicUser(object oCreature)
} }
int GetHighestShadowcasterLevel(object oCreature) int GetHighestShadowcasterLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetShadowcasterLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestShadowcasterLevel(object oCreature)
{ {
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
), ),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
); );
} } */
int GetIsShadowMagicClass(int nClass) int GetIsShadowMagicClass(int nClass)
{ {
@@ -376,18 +403,30 @@ int GetPrimaryShadowMagicClass(object oCreature = OBJECT_SELF)
else else
{ {
int nClassLvl; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCreature); nClass1 = GetClassByPosition(1, oCreature);
nClass2 = GetClassByPosition(2, oCreature); nClass2 = GetClassByPosition(2, oCreature);
nClass3 = GetClassByPosition(3, oCreature); nClass3 = GetClassByPosition(3, oCreature);
nClass4 = GetClassByPosition(4, oCreature);
nClass5 = GetClassByPosition(5, oCreature);
nClass6 = GetClassByPosition(6, oCreature);
nClass7 = GetClassByPosition(7, oCreature);
nClass8 = GetClassByPosition(8, oCreature);
if(GetIsShadowMagicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature); if(GetIsShadowMagicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
if(GetIsShadowMagicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature); if(GetIsShadowMagicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
if(GetIsShadowMagicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature); if(GetIsShadowMagicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
if(GetIsShadowMagicClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
if(GetIsShadowMagicClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
if(GetIsShadowMagicClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
if(GetIsShadowMagicClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
if(GetIsShadowMagicClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
nClass = nClass1; nClass = nClass1;
nClassLvl = nClass1Lvl; nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl) if(nClass2Lvl > nClassLvl)
{ {
nClass = nClass2; nClass = nClass2;
@@ -398,6 +437,32 @@ int GetPrimaryShadowMagicClass(object oCreature = OBJECT_SELF)
nClass = nClass3; nClass = nClass3;
nClassLvl = nClass3Lvl; nClassLvl = nClass3Lvl;
} }
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0) if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID; nClass = CLASS_TYPE_INVALID;
} }
@@ -413,6 +478,16 @@ int GetFirstShadowMagicClassPosition(object oCreature = OBJECT_SELF)
return 2; return 2;
if (GetIsShadowMagicClass(GetClassByPosition(3, oCreature))) if (GetIsShadowMagicClass(GetClassByPosition(3, oCreature)))
return 3; return 3;
if (GetIsShadowMagicClass(GetClassByPosition(4, oCreature)))
return 4;
if (GetIsShadowMagicClass(GetClassByPosition(5, oCreature)))
return 5;
if (GetIsShadowMagicClass(GetClassByPosition(6, oCreature)))
return 6;
if (GetIsShadowMagicClass(GetClassByPosition(7, oCreature)))
return 7;
if (GetIsShadowMagicClass(GetClassByPosition(8, oCreature)))
return 8;
return 0; return 0;
} }

View File

@@ -16,6 +16,11 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/10
//:: Test Void
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
////////////////////////////////////////////////// //////////////////////////////////////////////////

View File

@@ -16,6 +16,11 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
//:: Test Void
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -529,13 +534,35 @@ int GetIsBladeMagicUser(object oCreature)
} }
int GetHighestInitiatorLevel(object oCreature) int GetHighestInitiatorLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetInitiatorLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestInitiatorLevel(object oCreature)
{ {
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
), ),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
); );
} } */
int GetIsBladeMagicClass(int nClass) int GetIsBladeMagicClass(int nClass)
{ {
@@ -646,18 +673,30 @@ int GetPrimaryBladeMagicClass(object oCreature = OBJECT_SELF)
}*/ }*/
int nClassLvl; int nClassLvl;
int nClass1, nClass2, nClass3; int nClass1, nClass2, nClass3, nClass4, nClass5, nClass6, nClass7, nClass8;
int nClass1Lvl, nClass2Lvl, nClass3Lvl; int nClass1Lvl, nClass2Lvl, nClass3Lvl, nClass4Lvl, nClass5Lvl, nClass6Lvl, nClass7Lvl, nClass8Lvl;
nClass1 = GetClassByPosition(1, oCreature); nClass1 = GetClassByPosition(1, oCreature);
nClass2 = GetClassByPosition(2, oCreature); nClass2 = GetClassByPosition(2, oCreature);
nClass3 = GetClassByPosition(3, oCreature); nClass3 = GetClassByPosition(3, oCreature);
nClass4 = GetClassByPosition(4, oCreature);
nClass5 = GetClassByPosition(5, oCreature);
nClass6 = GetClassByPosition(6, oCreature);
nClass7 = GetClassByPosition(7, oCreature);
nClass8 = GetClassByPosition(8, oCreature);
if(GetIsBladeMagicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature); if(GetIsBladeMagicClass(nClass1)) nClass1Lvl = GetLevelByClass(nClass1, oCreature);
if(GetIsBladeMagicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature); if(GetIsBladeMagicClass(nClass2)) nClass2Lvl = GetLevelByClass(nClass2, oCreature);
if(GetIsBladeMagicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature); if(GetIsBladeMagicClass(nClass3)) nClass3Lvl = GetLevelByClass(nClass3, oCreature);
if(GetIsBladeMagicClass(nClass4)) nClass4Lvl = GetLevelByClass(nClass4, oCreature);
if(GetIsBladeMagicClass(nClass5)) nClass5Lvl = GetLevelByClass(nClass5, oCreature);
if(GetIsBladeMagicClass(nClass6)) nClass6Lvl = GetLevelByClass(nClass6, oCreature);
if(GetIsBladeMagicClass(nClass7)) nClass7Lvl = GetLevelByClass(nClass7, oCreature);
if(GetIsBladeMagicClass(nClass8)) nClass8Lvl = GetLevelByClass(nClass8, oCreature);
nClass = nClass1; nClass = nClass1;
nClassLvl = nClass1Lvl; nClassLvl = nClass1Lvl;
if(nClass2Lvl > nClassLvl) if(nClass2Lvl > nClassLvl)
{ {
nClass = nClass2; nClass = nClass2;
@@ -668,6 +707,32 @@ int GetPrimaryBladeMagicClass(object oCreature = OBJECT_SELF)
nClass = nClass3; nClass = nClass3;
nClassLvl = nClass3Lvl; nClassLvl = nClass3Lvl;
} }
if(nClass4Lvl > nClassLvl)
{
nClass = nClass4;
nClassLvl = nClass4Lvl;
}
if(nClass5Lvl > nClassLvl)
{
nClass = nClass5;
nClassLvl = nClass5Lvl;
}
if(nClass6Lvl > nClassLvl)
{
nClass = nClass6;
nClassLvl = nClass6Lvl;
}
if(nClass7Lvl > nClassLvl)
{
nClass = nClass7;
nClassLvl = nClass7Lvl;
}
if(nClass8Lvl > nClassLvl)
{
nClass = nClass8;
nClassLvl = nClass8Lvl;
}
if(nClassLvl == 0) if(nClassLvl == 0)
nClass = CLASS_TYPE_INVALID; nClass = CLASS_TYPE_INVALID;
} }
@@ -683,6 +748,16 @@ int GetFirstBladeMagicClassPosition(object oCreature = OBJECT_SELF)
return 2; return 2;
if (GetIsBladeMagicClass(GetClassByPosition(3, oCreature))) if (GetIsBladeMagicClass(GetClassByPosition(3, oCreature)))
return 3; return 3;
if (GetIsBladeMagicClass(GetClassByPosition(4, oCreature)))
return 4;
if (GetIsBladeMagicClass(GetClassByPosition(5, oCreature)))
return 5;
if (GetIsBladeMagicClass(GetClassByPosition(6, oCreature)))
return 6;
if (GetIsBladeMagicClass(GetClassByPosition(7, oCreature)))
return 7;
if (GetIsBladeMagicClass(GetClassByPosition(8, oCreature)))
return 8;
return 0; return 0;
} }

View File

@@ -16,6 +16,11 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
//:: Test Void
//void main (){}
////////////////////////////////////////////////// //////////////////////////////////////////////////
/* Constants */ /* Constants */
////////////////////////////////////////////////// //////////////////////////////////////////////////
@@ -340,13 +345,35 @@ int GetIsTruenamingUser(object oCreature)
} }
int GetHighestTrueSpeakerLevel(object oCreature) int GetHighestTrueSpeakerLevel(object oCreature)
{
int n = 0;
int nHighest;
int nTemp;
while(n <= 8)
{
if(GetClassByPosition(n, oCreature) != CLASS_TYPE_INVALID)
{
nTemp = GetTruespeakerLevel(oCreature, GetClassByPosition(n, oCreature));
if(nTemp > nHighest)
nHighest = nTemp;
}
n++;
}
return nHighest;
}
/* int GetHighestTrueSpeakerLevel(object oCreature)
{ {
return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0,
GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0
), ),
GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0
); );
} } */
int GetIsTruenamingClass(int nClass) int GetIsTruenamingClass(int nClass)
{ {
@@ -391,7 +418,7 @@ int GetTrueSpeakerDC(object oTrueSpeaker = OBJECT_SELF)
nDC += GetAbilityModifier(GetTruenameAbilityOfClass(nClass), oTrueSpeaker); nDC += GetAbilityModifier(GetTruenameAbilityOfClass(nClass), oTrueSpeaker);
int nFeat = -1; int nFeat = -1;
// Focused Lexicon. Bonus vs chosen racial type // Focused Lexicon. Bonus vs chosen racial type //:: [PRC .35] Needs update for new racialtypes
switch(nRace) switch(nRace)
{ {
case RACIAL_TYPE_ABERRATION: nFeat = FEAT_FOCUSED_LEXICON_ABERRATION; break; case RACIAL_TYPE_ABERRATION: nFeat = FEAT_FOCUSED_LEXICON_ABERRATION; break;

View File

@@ -19,6 +19,9 @@
@date Created - 2006.12.14 @date Created - 2006.12.14
*/ */
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
#include "inc_dynconv" #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 object oHideToken = GetHideToken(oPC); //ebonfowl: no longer used but I'm leaving it to not have to edit other functions
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
string sSpellbook; string sSpellbook;

View File

@@ -34,6 +34,9 @@
2 additional power points. 2 additional power points.
*/ */
//:: Updated for .35 by Jaysyn 2023/03/10
#include "psi_inc_psifunc" #include "psi_inc_psifunc"
#include "psi_inc_pwresist" #include "psi_inc_pwresist"
#include "psi_spellhook" #include "psi_spellhook"
@@ -70,11 +73,29 @@ void main()
if(manif.bCanManifest) if(manif.bCanManifest)
{ {
// Determine the target's manifester level // Determine the target's manifester level
int nTargetManifesterLevel = max(max(GetClassByPosition(1, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(1, 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(2, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(2, oTarget)) : 0
), ),
GetClassByPosition(3, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(3, oTarget)) : 0 GetClassByPosition(3, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(3, oTarget)) : 0
); ); */
int nPPGiven = 2 + 2 * manif.nTimesAugOptUsed_1; int nPPGiven = 2 + 2 * manif.nTimesAugOptUsed_1;
// Can't give more than the target has manifester levels // Can't give more than the target has manifester levels
nPPGiven = min(nPPGiven, nTargetManifesterLevel); nPPGiven = min(nPPGiven, nTargetManifesterLevel);

View File

@@ -189,7 +189,7 @@ void main()
SetHeader("Select class"); SetHeader("Select class");
int i, nTest, nPrev; int i, nTest, nPrev;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
nTest = GetClassByPosition(i, oPC); nTest = GetClassByPosition(i, oPC);
if(GetIsPsionicClass(nTest)) if(GetIsPsionicClass(nTest))

View File

@@ -28,6 +28,9 @@ which fires the spellscript prc_spellbook (#1792 in spells.2da), which then call
conversation script conversation script
*/ */
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
//::////////////////////////////////////////////// //:://////////////////////////////////////////////

View File

@@ -3,6 +3,10 @@
* Created July 17 2005 * Created July 17 2005
* Author: GaiaWerewolf * Author: GaiaWerewolf
*/ */
//:: Updated for .35 by Jaysyn 2023/03/11
#include "prc_inc_spells" #include "prc_inc_spells"
#include "prc_getbest_inc" #include "prc_getbest_inc"
@@ -38,7 +42,7 @@ void main()
int nBurnableSpell = -1; int nBurnableSpell = -1;
int bBioCastersLoopDone = 0;//will prevent running 'GetBestSpell' loops twice 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); nClass = GetClassByPosition(i, oCaster);

View File

@@ -12,6 +12,8 @@
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "inc_utility" #include "inc_utility"
const string SET_NAME = "PRC_DEBUG_HFeatM_IPs"; 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)) " / " + 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" DoDebug("A duplicate itemproperty feat has been discovered. This is a critical bug, so please report it.\n\n"

View File

@@ -36,7 +36,19 @@ int IsItemMetal(object oItem)
type==BASE_ITEM_SICKLE || type==BASE_ITEM_SICKLE ||
type==BASE_ITEM_THROWINGAXE || type==BASE_ITEM_THROWINGAXE ||
type==BASE_ITEM_TWOBLADEDSWORD || type==BASE_ITEM_TWOBLADEDSWORD ||
type==BASE_ITEM_WARHAMMER) type==BASE_ITEM_WARHAMMER ||
type==BASE_ITEM_HEAVY_PICK ||
type==BASE_ITEM_LIGHT_PICK ||
type==BASE_ITEM_SAI ||
type==BASE_ITEM_FALCHION ||
type==BASE_ITEM_KATAR ||
type==BASE_ITEM_HEAVY_MACE ||
type==BASE_ITEM_MAUL ||
type==BASE_ITEM_DOUBLE_SCIMITAR ||
type==BASE_ITEM_EAGLE_CLAW ||
type==BASE_ITEM_ELVEN_LIGHTBLADE ||
type==BASE_ITEM_ELVEN_THINBLADE ||
type==BASE_ITEM_ELVEN_COURTBLADE)
{ {
nReturnVal=2; // Mostly metal nReturnVal=2; // Mostly metal
} }

View File

@@ -11,6 +11,9 @@
//:: Created On: Nov 17, 2007 //:: Created On: Nov 17, 2007
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "prc_inc_burn" #include "prc_inc_burn"
#include "prc_inc_breath" #include "prc_inc_breath"
@@ -157,7 +160,7 @@ void main()
//make sure user is a spontaneous caster //make sure user is a spontaneous caster
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS) if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS)

View File

@@ -11,6 +11,9 @@
*/ */
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "moi_inc_moifunc" #include "moi_inc_moifunc"
#include "prc_inc_clsfunc" #include "prc_inc_clsfunc"
@@ -722,17 +725,43 @@ void PRCFeat_AddCompositeBonuses(object oPC, object oSkin)
int nClass1 = GetClassByPosition(1, oPC); int nClass1 = GetClassByPosition(1, oPC);
int nClass2 = GetClassByPosition(2, oPC); int nClass2 = GetClassByPosition(2, oPC);
int nClass3 = GetClassByPosition(3, 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 nClass1Lvl = GetLevelByClass(nClass1, oPC);
int nClass2Lvl = GetLevelByClass(nClass2, oPC); int nClass2Lvl = GetLevelByClass(nClass2, oPC);
int nClass3Lvl = GetLevelByClass(nClass3, 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 nDie1 = StringToInt(Get2DAString("classes", "HitDie", nClass1));
int nDie2 = StringToInt(Get2DAString("classes", "HitDie", nClass2)); int nDie2 = StringToInt(Get2DAString("classes", "HitDie", nClass2));
int nDie3 = StringToInt(Get2DAString("classes", "HitDie", nClass3)); 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) if(nFortPenalty > 6)
nFortPenalty = 6; nFortPenalty = 6;
int nConBonus = nFortPenalty * 2; int nConBonus = nFortPenalty * 2;

View File

@@ -8,12 +8,14 @@
//:: Created On: 20/09/2009 //:: Created On: 20/09/2009
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "inc_newspellbook" #include "inc_newspellbook"
int GetHasSpontaneousNSBClass(object oPC) int GetHasSpontaneousNSBClass(object oPC)
{ {
int i; int i;
for (i = 1; i <= 3; i++) for (i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
if (SPELLBOOK_TYPE_SPONTANEOUS == GetSpellbookTypeForClass(nClass)) if (SPELLBOOK_TYPE_SPONTANEOUS == GetSpellbookTypeForClass(nClass))

View File

@@ -1,3 +1,5 @@
//:: Updated for .35 by Jaysyn 2023/03/11
#include "inc_leto_prc" #include "inc_leto_prc"
#include "x2_inc_switches" #include "x2_inc_switches"
#include "prc_inc_teleport" #include "prc_inc_teleport"
@@ -111,7 +113,7 @@ void OnEnter_AMSCompatibilityCheck(object oPC)
{ {
SetLocalInt(oPC, "AMS_RESTORE", 1); SetLocalInt(oPC, "AMS_RESTORE", 1);
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
DelayCommand(0.2, DoRestoreAMS(oPC, nClass, oHideToken, oAMSToken)); DelayCommand(0.2, DoRestoreAMS(oPC, nClass, oHideToken, oAMSToken));

View File

@@ -8,6 +8,8 @@
//:: Created On: July 3rd, 2004 //:: Created On: July 3rd, 2004
//::////////////////////////////////////////////// //:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "inc_epicspells" #include "inc_epicspells"
#include "prc_inc_sneak" #include "prc_inc_sneak"
#include "psi_inc_psifunc" #include "psi_inc_psifunc"
@@ -153,7 +155,7 @@ void Dragonheart(object oPC)
SetLocalInt(oPC, "PRC_PrereqDragonheart", 1); SetLocalInt(oPC, "PRC_PrereqDragonheart", 1);
int nClassSlot = 1; int nClassSlot = 1;
while(nClassSlot <= 3) while(nClassSlot <= 8)
{ {
int nClass = GetClassByPosition(nClassSlot, oPC); int nClass = GetClassByPosition(nClassSlot, oPC);
nClassSlot += 1; nClassSlot += 1;
@@ -1037,7 +1039,7 @@ void KnightWeave(object oPC)
int bSpontCaster = FALSE; int bSpontCaster = FALSE;
//make sure user is a spontaneous arcane caster //make sure user is a spontaneous arcane caster
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS) && GetMaxSpellLevelForCasterLevel(nClass, GetLevelByTypeArcane(oPC)) >= 3) if((GetSpellbookTypeForClass(nClass) == SPELLBOOK_TYPE_SPONTANEOUS) && GetMaxSpellLevelForCasterLevel(nClass, GetLevelByTypeArcane(oPC)) >= 3)
@@ -1262,7 +1264,7 @@ void main()
//for(i=1;i<3;i++) //for(i=1;i<3;i++)
int nSpellLevel; int nSpellLevel;
int nClassSlot = 1; int nClassSlot = 1;
while(nClassSlot <= 3) while(nClassSlot <= 8)
{ {
int nClass = GetClassByPosition(nClassSlot, oPC); int nClass = GetClassByPosition(nClassSlot, oPC);
nClassSlot += 1; nClassSlot += 1;

View File

@@ -28,7 +28,7 @@ void main()
object oPC = OBJECT_SELF; object oPC = OBJECT_SELF;
int i; int i;
for(i = 1; i <= 3; i++) for(i = 1; i <= 8; i++)
{ {
int nClass = GetClassByPosition(i, oPC); int nClass = GetClassByPosition(i, oPC);
DelayCommand(0.5*i, DeleteArrays(oPC, nClass)); DelayCommand(0.5*i, DeleteArrays(oPC, nClass));

View File

@@ -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" #include "prc_inc_spells"
int DoCastingClassCheck(object oCaster, int nSpellID, int nClass) 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 UMD_CheckCastingClass(object oCaster, int nSpellID)
{ {
int i; int i;
for(i = 1; i < 4; i++) for(i = 1; i < 9; i++)
{ {
if(DoCastingClassCheck(oCaster, nSpellID, GetClassByPosition(i, oCaster))) if(DoCastingClassCheck(oCaster, nSpellID, GetClassByPosition(i, oCaster)))
return TRUE; return TRUE;

BIN
trunk/tools/.34_nwnsc.exe Normal file

Binary file not shown.

Binary file not shown.