Major script update for 8 class support

Major script update for 8 class support.

prc_wipeNSB.nss

PRC_S_spellb.nss

prc_amagsys_gain.nss	- AMSCompatibilityCheck()

prc_prereq.nss			- Dragonheart(), KnightWeave()

prc_onenter.nss			- OnEnter_AMSCompatibilityCheck()

prc_metamagic.nss		- GetHasSpontaneousNSBClass()

prc_feats.nss

prc_dracactive.nss

prc_debug_hfeatm.nss

prc_cbtmed_spnhl.nss

psi_powconv.nss

psi_pow_bstpwr.nss

x2_pc_umdcheck.nss
This commit is contained in:
Jaysyn904
2023-03-11 12:04:30 -05:00
parent a668275943
commit 6585d40a0f
17 changed files with 155 additions and 23 deletions

View File

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

View File

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

View File

@@ -12,6 +12,8 @@
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "inc_utility"
const string SET_NAME = "PRC_DEBUG_HFeatM_IPs";
@@ -67,6 +69,26 @@ void main()
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(3, oPC)))) + " " + IntToString(GetLevelByPosition(3, oPC))
: ""
)
+ (GetClassByPosition(4, oPC) != CLASS_TYPE_INVALID ?
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(4, oPC)))) + " " + IntToString(GetLevelByPosition(4, oPC))
: ""
)
+ (GetClassByPosition(5, oPC) != CLASS_TYPE_INVALID ?
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(5, oPC)))) + " " + IntToString(GetLevelByPosition(5, oPC))
: ""
)
+ (GetClassByPosition(6, oPC) != CLASS_TYPE_INVALID ?
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(6, oPC)))) + " " + IntToString(GetLevelByPosition(6, oPC))
: ""
)
+ (GetClassByPosition(7, oPC) != CLASS_TYPE_INVALID ?
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(7, oPC)))) + " " + IntToString(GetLevelByPosition(7, oPC))
: ""
)
+ (GetClassByPosition(8, oPC) != CLASS_TYPE_INVALID ?
" / " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", GetClassByPosition(8, oPC)))) + " " + IntToString(GetLevelByPosition(8, oPC))
: ""
)
);
DoDebug("A duplicate itemproperty feat has been discovered. This is a critical bug, so please report it.\n\n"

View File

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

View File

@@ -11,6 +11,9 @@
*/
//////////////////////////////////////////////////////////
//:: Updated for .35 by Jaysyn 2023/03/11
#include "moi_inc_moifunc"
#include "prc_inc_clsfunc"
@@ -722,17 +725,43 @@ void PRCFeat_AddCompositeBonuses(object oPC, object oSkin)
int nClass1 = GetClassByPosition(1, oPC);
int nClass2 = GetClassByPosition(2, oPC);
int nClass3 = GetClassByPosition(3, oPC);
int nClass4 = GetClassByPosition(4, oPC);
int nClass5 = GetClassByPosition(5, oPC);
int nClass6 = GetClassByPosition(6, oPC);
int nClass7 = GetClassByPosition(7, oPC);
int nClass8 = GetClassByPosition(8, oPC);
int nClass1Lvl = GetLevelByClass(nClass1, oPC);
int nClass2Lvl = GetLevelByClass(nClass2, oPC);
int nClass3Lvl = GetLevelByClass(nClass3, oPC);
int nLevel = nClass1Lvl + nClass2Lvl + nClass3Lvl;
int nClass4Lvl = GetLevelByClass(nClass4, oPC);
int nClass5Lvl = GetLevelByClass(nClass5, oPC);
int nClass6Lvl = GetLevelByClass(nClass6, oPC);
int nClass7Lvl = GetLevelByClass(nClass7, oPC);
int nClass8Lvl = GetLevelByClass(nClass8, oPC);
int nLevel = nClass1Lvl + nClass2Lvl + nClass3Lvl + nClass4Lvl + nClass5Lvl + nClass6Lvl + nClass7Lvl + nClass8Lvl;
int nDie1 = StringToInt(Get2DAString("classes", "HitDie", nClass1));
int nDie2 = StringToInt(Get2DAString("classes", "HitDie", nClass2));
int nDie3 = StringToInt(Get2DAString("classes", "HitDie", nClass3));
int nDie4 = StringToInt(Get2DAString("classes", "HitDie", nClass4));
int nDie5 = StringToInt(Get2DAString("classes", "HitDie", nClass5));
int nDie6 = StringToInt(Get2DAString("classes", "HitDie", nClass6));
int nDie7 = StringToInt(Get2DAString("classes", "HitDie", nClass7));
int nDie8 = StringToInt(Get2DAString("classes", "HitDie", nClass8));
int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 +
nClass2Lvl * nDie2 +
nClass3Lvl * nDie3 +
nClass4Lvl * nDie4 +
nClass5Lvl * nDie5 +
nClass6Lvl * nDie6 +
nClass7Lvl * nDie7 +
nClass8Lvl * nDie8))/nLevel;
int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 + nClass2Lvl * nDie2 + nClass3Lvl * nDie3))/nLevel;
/* int nFortPenalty = (nLevel * 12 - (nClass1Lvl * nDie1 + nClass2Lvl * nDie2 + nClass3Lvl * nDie3))/nLevel; */
if(nFortPenalty > 6)
nFortPenalty = 6;
int nConBonus = nFortPenalty * 2;

View File

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

View File

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

View File

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

View File

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