2025/09/14 Update

Updated readme
Updated PRC8 includes
This commit is contained in:
Jaysyn904
2025-09-14 13:48:12 -04:00
parent 5be8398033
commit cc110a9dd3
15 changed files with 240 additions and 89 deletions

View File

@@ -1,19 +1,16 @@
# Default Module Template # Siege of Shadowdale EE [PRC8]
Repository for the development of the PRC8 version of ..... Repository for the development of the PRC8 version of Siege of Shadowdale EE.
[Discussion Thread on Discord](https://discord.gg/ca2ru3KxYd) [Discussion Thread on Discord](https://discord.gg/ca2ru3KxYd)
## Requirements ## Requirements
1.) [Nasher](https://github.com/squattingmonk/nasher), installed in your system path. 1.) [Nasher](https://github.com/squattingmonk/nasher), installed in your system path.
2.) [Original module resources]() 2.) [Original module resources](https://neverwintervault.org/project/nwnee/module/siege-shadowdale-enhanced-edition)
3.) [PRC8](https://gitea.raptio.us/Jaysyn/PRC8/releases) 3.) [PRC8](https://gitea.raptio.us/Jaysyn/PRC8/releases)
3.) [CEP3](https://neverwintervault.org/project/nwnee/hakpak/combined/cep-3-community-expansion-pack)
4.) [CEP2](https://neverwintervault.org/cep)
## Instructions ## Instructions

View File

@@ -20,6 +20,8 @@ Add class to GetCasterLvl() in prc_inc_spells
Add Practiced Spellcaster feat to feat.2da and to PracticedSpellcasting() in prc_inc_castlvl Add Practiced Spellcaster feat to feat.2da and to PracticedSpellcasting() in prc_inc_castlvl
Run the assemble_spellbooks.bat file Run the assemble_spellbooks.bat file
Make the prc_* scripts in newspellbook. The filenames can be found under the spell entries for the class in spells.2da. Make the prc_* scripts in newspellbook. The filenames can be found under the spell entries for the class in spells.2da.
Update the fileends for all relevant files in inc_switch_setup
Delete prc_data in the \database\ folder before testing new spells.
Spont: Spont:
Make cls_spgn_*.2da Make cls_spgn_*.2da
@@ -41,6 +43,8 @@ Add class to prc_amagsys_gain if(CheckMissingSpells(oPC, CLASS_TYPE_SORCERER, Mi
Add class to ExecuteScript("prc_amagsys_gain", oPC) list in EvalPRCFeats in prc_inc_function Add class to ExecuteScript("prc_amagsys_gain", oPC) list in EvalPRCFeats in prc_inc_function
Run the assemble_spellbooks.bat file Run the assemble_spellbooks.bat file
Make the prc_* scripts in newspellbook Make the prc_* scripts in newspellbook
Update the fileends for all relevant files in inc_switch_setup
Delete prc_data in the \database\ folder before testing new spells.
prc_classes.2da entry: prc_classes.2da entry:
Label - name for the class Label - name for the class

View File

@@ -221,9 +221,9 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_cls_spcr_bard", 144); SetPRCSwitch("PRC_FILE_END_cls_spcr_bard", 144);
SetPRCSwitch("PRC_FILE_END_cls_spcr_beguil", 142); SetPRCSwitch("PRC_FILE_END_cls_spcr_beguil", 142);
SetPRCSwitch("PRC_FILE_END_cls_spcr_blkgrd", 47); SetPRCSwitch("PRC_FILE_END_cls_spcr_blkgrd", 47);
SetPRCSwitch("PRC_FILE_END_cls_spcr_dnecro", 137); SetPRCSwitch("PRC_FILE_END_cls_spcr_dnecro", 138);
SetPRCSwitch("PRC_FILE_END_cls_spcr_duskbl", 69); SetPRCSwitch("PRC_FILE_END_cls_spcr_duskbl", 69);
SetPRCSwitch("PRC_FILE_END_cls_spcr_favsol", 290); SetPRCSwitch("PRC_FILE_END_cls_spcr_favsol", 300);
SetPRCSwitch("PRC_FILE_END_cls_spcr_harper", 35); SetPRCSwitch("PRC_FILE_END_cls_spcr_harper", 35);
SetPRCSwitch("PRC_FILE_END_cls_spcr_healer", 77); SetPRCSwitch("PRC_FILE_END_cls_spcr_healer", 77);
SetPRCSwitch("PRC_FILE_END_cls_spcr_hexbl", 73); SetPRCSwitch("PRC_FILE_END_cls_spcr_hexbl", 73);
@@ -251,9 +251,9 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_cls_spell_bard", 169); SetPRCSwitch("PRC_FILE_END_cls_spell_bard", 169);
SetPRCSwitch("PRC_FILE_END_cls_spell_beguil", 119); SetPRCSwitch("PRC_FILE_END_cls_spell_beguil", 119);
SetPRCSwitch("PRC_FILE_END_cls_spell_blkgrd", 163); SetPRCSwitch("PRC_FILE_END_cls_spell_blkgrd", 163);
SetPRCSwitch("PRC_FILE_END_cls_spell_dnecro", 134); SetPRCSwitch("PRC_FILE_END_cls_spell_dnecro", 135);
SetPRCSwitch("PRC_FILE_END_cls_spell_duskbl", 84); SetPRCSwitch("PRC_FILE_END_cls_spell_duskbl", 84);
SetPRCSwitch("PRC_FILE_END_cls_spell_favsol", 363); SetPRCSwitch("PRC_FILE_END_cls_spell_favsol", 373);
SetPRCSwitch("PRC_FILE_END_cls_spell_harper", 21); SetPRCSwitch("PRC_FILE_END_cls_spell_harper", 21);
SetPRCSwitch("PRC_FILE_END_cls_spell_healer", 271); SetPRCSwitch("PRC_FILE_END_cls_spell_healer", 271);
SetPRCSwitch("PRC_FILE_END_cls_spell_hexbl", 79); SetPRCSwitch("PRC_FILE_END_cls_spell_hexbl", 79);
@@ -267,7 +267,7 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_cls_spell_sod", 110); SetPRCSwitch("PRC_FILE_END_cls_spell_sod", 110);
SetPRCSwitch("PRC_FILE_END_cls_spell_sohei", 131); SetPRCSwitch("PRC_FILE_END_cls_spell_sohei", 131);
SetPRCSwitch("PRC_FILE_END_cls_spell_sol", 114); SetPRCSwitch("PRC_FILE_END_cls_spell_sol", 114);
SetPRCSwitch("PRC_FILE_END_cls_spell_sorc", 541); SetPRCSwitch("PRC_FILE_END_cls_spell_sorc", 550);
SetPRCSwitch("PRC_FILE_END_cls_spell_suel", 160); SetPRCSwitch("PRC_FILE_END_cls_spell_suel", 160);
SetPRCSwitch("PRC_FILE_END_cls_spell_templ", 95); SetPRCSwitch("PRC_FILE_END_cls_spell_templ", 95);
SetPRCSwitch("PRC_FILE_END_cls_spell_tfshad", 70); SetPRCSwitch("PRC_FILE_END_cls_spell_tfshad", 70);
@@ -355,7 +355,7 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_des_crft_poison", 100); SetPRCSwitch("PRC_FILE_END_des_crft_poison", 100);
SetPRCSwitch("PRC_FILE_END_des_crft_props", 27); SetPRCSwitch("PRC_FILE_END_des_crft_props", 27);
SetPRCSwitch("PRC_FILE_END_des_crft_scroll", 3999); SetPRCSwitch("PRC_FILE_END_des_crft_scroll", 3999);
SetPRCSwitch("PRC_FILE_END_des_crft_spells", 19348); SetPRCSwitch("PRC_FILE_END_des_crft_spells", 20000);
SetPRCSwitch("PRC_FILE_END_des_crft_weapon", 29); SetPRCSwitch("PRC_FILE_END_des_crft_weapon", 29);
SetPRCSwitch("PRC_FILE_END_des_cutconvdur", 26); SetPRCSwitch("PRC_FILE_END_des_cutconvdur", 26);
SetPRCSwitch("PRC_FILE_END_des_feat2item", 1000); SetPRCSwitch("PRC_FILE_END_des_feat2item", 1000);
@@ -423,7 +423,7 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_iprp_damvulcost", 7); SetPRCSwitch("PRC_FILE_END_iprp_damvulcost", 7);
SetPRCSwitch("PRC_FILE_END_iprp_decvalue1", 9); SetPRCSwitch("PRC_FILE_END_iprp_decvalue1", 9);
SetPRCSwitch("PRC_FILE_END_iprp_decvalue2", 9); SetPRCSwitch("PRC_FILE_END_iprp_decvalue2", 9);
SetPRCSwitch("PRC_FILE_END_iprp_feats", 24819); SetPRCSwitch("PRC_FILE_END_iprp_feats", 26999);
SetPRCSwitch("PRC_FILE_END_iprp_immuncost", 7); SetPRCSwitch("PRC_FILE_END_iprp_immuncost", 7);
SetPRCSwitch("PRC_FILE_END_iprp_immunity", 9); SetPRCSwitch("PRC_FILE_END_iprp_immunity", 9);
SetPRCSwitch("PRC_FILE_END_iprp_incvalue1", 9); SetPRCSwitch("PRC_FILE_END_iprp_incvalue1", 9);
@@ -458,11 +458,11 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_iprp_soakcost", 50); SetPRCSwitch("PRC_FILE_END_iprp_soakcost", 50);
SetPRCSwitch("PRC_FILE_END_iprp_speed_dec", 9); SetPRCSwitch("PRC_FILE_END_iprp_speed_dec", 9);
SetPRCSwitch("PRC_FILE_END_iprp_speed_enh", 9); SetPRCSwitch("PRC_FILE_END_iprp_speed_enh", 9);
SetPRCSwitch("PRC_FILE_END_iprp_spellcost", 243); SetPRCSwitch("PRC_FILE_END_iprp_spellcost", 298);
SetPRCSwitch("PRC_FILE_END_iprp_spellcstr", 42); SetPRCSwitch("PRC_FILE_END_iprp_spellcstr", 42);
SetPRCSwitch("PRC_FILE_END_iprp_spelllvcost", 9); SetPRCSwitch("PRC_FILE_END_iprp_spelllvcost", 9);
SetPRCSwitch("PRC_FILE_END_iprp_spelllvlimm", 9); SetPRCSwitch("PRC_FILE_END_iprp_spelllvlimm", 9);
SetPRCSwitch("PRC_FILE_END_iprp_spells", 1456); SetPRCSwitch("PRC_FILE_END_iprp_spells", 1552);
SetPRCSwitch("PRC_FILE_END_iprp_spellshl", 7); SetPRCSwitch("PRC_FILE_END_iprp_spellshl", 7);
SetPRCSwitch("PRC_FILE_END_iprp_srcost", 99); SetPRCSwitch("PRC_FILE_END_iprp_srcost", 99);
SetPRCSwitch("PRC_FILE_END_iprp_staminacost", -1); SetPRCSwitch("PRC_FILE_END_iprp_staminacost", -1);
@@ -492,9 +492,9 @@ void SetDefaultFileEnds()
SetPRCSwitch("PRC_FILE_END_itmwizwands", 38); SetPRCSwitch("PRC_FILE_END_itmwizwands", 38);
SetPRCSwitch("PRC_FILE_END_keymap", 70); SetPRCSwitch("PRC_FILE_END_keymap", 70);
SetPRCSwitch("PRC_FILE_END_lightcolor", 32); SetPRCSwitch("PRC_FILE_END_lightcolor", 32);
SetPRCSwitch("PRC_FILE_END_loadhints", 88); SetPRCSwitch("PRC_FILE_END_loadhints", 101);
SetPRCSwitch("PRC_FILE_END_loadscreens", 259); SetPRCSwitch("PRC_FILE_END_loadscreens", 259);
SetPRCSwitch("PRC_FILE_END_masterfeats", 113); SetPRCSwitch("PRC_FILE_END_masterfeats", 125);
SetPRCSwitch("PRC_FILE_END_materialcomp", 200); SetPRCSwitch("PRC_FILE_END_materialcomp", 200);
SetPRCSwitch("PRC_FILE_END_metamagic", 6); SetPRCSwitch("PRC_FILE_END_metamagic", 6);
SetPRCSwitch("PRC_FILE_END_namefilter", 3); SetPRCSwitch("PRC_FILE_END_namefilter", 3);

View File

@@ -78,7 +78,7 @@ void PRCRemoveSpellEffects(int nSpell_ID, object oCaster, object oTarget);
/** /**
* Target is immune to gaze attacks * Target is immune to gaze attacks
* *
* @return the Dazzle effect * @return the Gaze Immunity effect
*/ */
effect EffectGazeImmune(); effect EffectGazeImmune();

View File

@@ -401,4 +401,3 @@ int GetBestAvailableSpell(object oTarget)
if(nBestSpell == 99999) nBestSpell = GetBestL0Spell(oTarget, nBestSpell); if(nBestSpell == 99999) nBestSpell = GetBestL0Spell(oTarget, nBestSpell);
return nBestSpell; return nBestSpell;
} }

View File

@@ -3861,6 +3861,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_ARCHIVIST, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_ARCHIVIST, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_ARCHIVIST, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_ARCHIVIST, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_ARCHIVIST, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -4195,6 +4198,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_CLERIC, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_CLERIC, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_CLERIC, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_CLERIC, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_CLERIC, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -4309,9 +4315,12 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_DRUID, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_DRUID, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); */
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_DRUID, oCaster)) if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_DRUID, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_BFZ_SPELLCASTING_DRUID, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_BFZ, oCaster + 1) / 2 */ nDivine += GetLevelByClass(CLASS_TYPE_BFZ, oCaster + 1) / 2 */
// if(GetHasFeat(FEAT_BRIMSTONE_SPEAKER_SPELLCASTING_DRUID, oCaster)) // if(GetHasFeat(FEAT_BRIMSTONE_SPEAKER_SPELLCASTING_DRUID, oCaster))
@@ -4423,6 +4432,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_FAVOURED_SOUL, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_FAVOURED_SOUL, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_FAVOURED_SOUL, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_FAVOURED_SOUL, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_FAVOURED_SOUL, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -4536,6 +4548,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
/* if(GetHasFeat(FEAT_BFZ_SPELLCASTING_HEALER, oCaster)) /* if(GetHasFeat(FEAT_BFZ_SPELLCASTING_HEALER, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; */ nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; */
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_HEALER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BRIMSTONE_SPEAKER_SPELLCASTING_HEALER, oCaster)) if(GetHasFeat(FEAT_BRIMSTONE_SPEAKER_SPELLCASTING_HEALER, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BRIMSTONE_SPEAKER, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BRIMSTONE_SPEAKER, oCaster) + 1) / 2;
@@ -4643,6 +4658,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_JUSTICEWW, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_JUSTICEWW, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_JOWAW, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_JUSTICEWW, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_JUSTICEWW, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -4743,6 +4761,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_KNIGHT_CHALICE, oCaster)) if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_KNIGHT_CHALICE, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_KOTC, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_KNIGHT_CHALICE, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_KNIGHT_CHALICE, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
@@ -4850,6 +4871,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_KNIGHT_MIDDLECIRCLE, oCaster)) if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_KNIGHT_MIDDLECIRCLE, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_KOTMC, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_KNIGHT_MIDDLECIRCLE, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_KNIGHT_MIDDLECIRCLE, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
@@ -4963,6 +4987,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_NENTYAR_HUNTER, oCaster)) if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_NENTYAR_HUNTER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_NENTYAR_HUNTER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_NENTYAR_HUNTER, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_NENTYAR_HUNTER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); */ nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); */
@@ -5165,6 +5192,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_PALADIN, oCaster)) if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_PALADIN, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_PALADIN, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_PALADIN, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_PALADIN, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
@@ -5274,6 +5304,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_RANGER, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_RANGER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_RANGER, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_RANGER, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_RANGER, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -5387,6 +5420,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_OASHAMAN, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_OASHAMAN, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_OASHAMAN, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_OASHAMAN, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_OASHAMAN, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -5601,6 +5637,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_SOHEI, oCaster)) if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_SOHEI, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_SOHEI, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
if(GetHasFeat(FEAT_BFZ_SPELLCASTING_SOHEI, oCaster)) if(GetHasFeat(FEAT_BFZ_SPELLCASTING_SOHEI, oCaster))
nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2; nDivine += (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2;
@@ -5705,6 +5744,9 @@ int GetDivinePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID)
if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_SOL, oCaster)) if(GetHasFeat(FEAT_SWIFT_WING_SPELLCASTING_SOL, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster);
if(GetHasFeat(FEAT_VERDANT_LORD_SPELLCASTING_SOL, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_VERDANT_LORD, oCaster);
/* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_SOL, oCaster)) /* if(GetHasFeat(FEAT_TENEBROUS_APOSTATE_SPELLCASTING_SOL, oCaster))
nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster); nDivine += GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster);

View File

@@ -410,6 +410,8 @@ int PRCGetSpellLevelForClass(int nSpell, int nClass)
sSpellLevel = Get2DACache("spells", "Cleric", nSpell); sSpellLevel = Get2DACache("spells", "Cleric", nSpell);
else if (nClass == CLASS_TYPE_BARD) else if (nClass == CLASS_TYPE_BARD)
sSpellLevel = Get2DACache("spells", "Bard", nSpell); sSpellLevel = Get2DACache("spells", "Bard", nSpell);
else if (nClass == CLASS_TYPE_ASSASSIN)
sSpellLevel = Get2DACache("spells", "Assassin", nSpell);
else if (nClass == CLASS_TYPE_CULTIST_SHATTERED_PEAK) else if (nClass == CLASS_TYPE_CULTIST_SHATTERED_PEAK)
sSpellLevel = Get2DACache("spells", "Cultist", nSpell); sSpellLevel = Get2DACache("spells", "Cultist", nSpell);
else if (nClass == CLASS_TYPE_NENTYAR_HUNTER) else if (nClass == CLASS_TYPE_NENTYAR_HUNTER)

View File

@@ -97,10 +97,38 @@ struct SizeModifiers
int dexSkillMod; int dexSkillMod;
}; };
//:: Returns ability mod for score
int GetAbilityModFromValue(int nAbilityValue)
{
int nMod = (nAbilityValue - 10) / 2;
// Adjust if below 10 and odd
if (nAbilityValue < 10 && (nAbilityValue % 2) != 0)
{
nMod = nMod - 1;
}
return nMod;
}
//::---------------------------------------------| //::---------------------------------------------|
//:: JSON functions | //:: JSON functions |
//::---------------------------------------------| //::---------------------------------------------|
//:: Returns the Constitution value from a GFF creature UTC
int json_GetCONValue(json jCreature)
{
int nCon = 0; // default if missing
// Check if the Con field exists
if (GffGetFieldExists(jCreature, "Con"))
{
nCon = JsonGetInt(GffGetByte(jCreature, "Con"));
}
return nCon;
}
//:: Returns the integer value of a VarTable entry named sVarName, or 0 if not found. //:: Returns the integer value of a VarTable entry named sVarName, or 0 if not found.
int json_GetLocalIntFromVarTable(json jCreature, string sVarName) int json_GetLocalIntFromVarTable(json jCreature, string sVarName)
{ {
@@ -141,12 +169,12 @@ int json_GetLocalIntFromVarTable(json jCreature, string sVarName)
return 0; return 0;
} }
//:: Returns the total Hit Dice from a JSON creature GFF. //:: Returns the total Hit Dice from a JSON'd creature GFF.
int json_GetCreatureHD(json jGff) int json_GetCreatureHD(json jCreature)
{ {
int nHD = 0; int nHD = 0;
json jClasses = GffGetList(jGff, "ClassList"); json jClasses = GffGetList(jCreature, "ClassList");
if (jClasses == JsonNull()) if (jClasses == JsonNull())
return 0; return 0;
@@ -170,6 +198,30 @@ int json_GetCreatureHD(json jGff)
return nHD; return nHD;
} }
json json_RecalcMaxHP(json jCreature, int iHitDieValue)
{
int iHD = json_GetCreatureHD(jCreature);
int iCON = json_GetCONValue(jCreature);
int iMod = GetAbilityModFromValue(iCON);
int nConBonusHP = iMod * iHD;
int iNewMaxHP = (iHitDieValue * iHD); /* nConBonusHP */
//jCreature = GffReplaceShort(jCreature, "MaxHitPoints", iNewMaxHP);
jCreature = GffReplaceShort(jCreature, "CurrentHitPoints", iNewMaxHP);
jCreature = GffReplaceShort(jCreature, "HitPoints", iNewMaxHP);
/* SendMessageToPC(GetFirstPC(), "HD = " + IntToString(iHD));
SendMessageToPC(GetFirstPC(), "HitDieValue = " + IntToString(iHitDieValue));
SendMessageToPC(GetFirstPC(), "CON = " + IntToString(iCON));
SendMessageToPC(GetFirstPC(), "Mod = " + IntToString(iMod));
SendMessageToPC(GetFirstPC(), "New HP = " + IntToString(iNewMaxHP)); */
return jCreature;
}
//:: Reads ABILITY_TO_INCREASE from creature's VarTable and applies stat boosts based on increased HD //:: Reads ABILITY_TO_INCREASE from creature's VarTable and applies stat boosts based on increased HD
json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifierCap) json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifierCap)
{ {
@@ -180,7 +232,7 @@ json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifier
int nAbilityToIncrease = json_GetLocalIntFromVarTable(jCreature, "ABILITY_TO_INCREASE"); int nAbilityToIncrease = json_GetLocalIntFromVarTable(jCreature, "ABILITY_TO_INCREASE");
if (nAbilityToIncrease < 0 || nAbilityToIncrease > 5) if (nAbilityToIncrease < 0 || nAbilityToIncrease > 5)
{ {
if(DEBUG) DoDebug("json_ApplyAbilityBoostFromHD: Invalid ABILITY_TO_INCREASE value: " + IntToString(nAbilityToIncrease)); DoDebug("json_ApplyAbilityBoostFromHD: Invalid ABILITY_TO_INCREASE value: " + IntToString(nAbilityToIncrease));
return jCreature; // Invalid ability index return jCreature; // Invalid ability index
} }
@@ -188,7 +240,7 @@ json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifier
json jClassList = GffGetList(jCreature, "ClassList"); json jClassList = GffGetList(jCreature, "ClassList");
if (jClassList == JsonNull()) if (jClassList == JsonNull())
{ {
if(DEBUG) DoDebug("json_ApplyAbilityBoostFromHD: Failed to get ClassList"); DoDebug("json_ApplyAbilityBoostFromHD: Failed to get ClassList");
return jCreature; return jCreature;
} }
@@ -211,7 +263,7 @@ json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifier
if (nCurrentTotalHD <= 0) if (nCurrentTotalHD <= 0)
{ {
if(DEBUG) DoDebug("json_ApplyAbilityBoostFromHD: No valid Hit Dice found"); DoDebug("json_ApplyAbilityBoostFromHD: No valid Hit Dice found");
return jCreature; return jCreature;
} }
@@ -273,7 +325,7 @@ json json_ApplyAbilityBoostFromHD(json jCreature, int nOriginalHD, int nModifier
return jCreature; return jCreature;
} }
//:: Adjust a skill by its ID (more efficient than name lookup) //:: Adjust a skill by its ID
json json_AdjustCreatureSkillByID(json jCreature, int nSkillID, int nMod) json json_AdjustCreatureSkillByID(json jCreature, int nSkillID, int nMod)
{ {
// Get the SkillList // Get the SkillList
@@ -470,7 +522,7 @@ int json_GetArraySize(json jArray)
return iSize; return iSize;
} }
//:: Directly modifies oCreature's Base Natural AC if iNewAC is higher. //:: Directly updates oCreature's Base Natural AC if iNewAC is higher.
//:: //::
json json_UpdateBaseAC(json jCreature, int iNewAC) json json_UpdateBaseAC(json jCreature, int iNewAC)
{ {
@@ -493,6 +545,26 @@ json json_UpdateBaseAC(json jCreature, int iNewAC)
} }
} }
//:: Increases jCreature's Natural AC by iAddAC.
//::
json json_IncreaseBaseAC(json jCreature, int iAddAC)
{
json jBaseAC = GffGetByte(jCreature, "NaturalAC");
if (jBaseAC == JsonNull())
{
return JsonNull();
}
else
{
int nBaseAC = JsonGetInt(jBaseAC); // convert JSON number -> int
int nNewAC = nBaseAC + iAddAC;
jCreature = GffReplaceByte(jCreature, "NaturalAC", nNewAC);
return jCreature;
}
}
//:: Directly modifies jCreature's Challenge Rating. //:: Directly modifies jCreature's Challenge Rating.
//:: This is useful for most XP calculations. //:: This is useful for most XP calculations.
json json_UpdateCR(json jCreature, int nBaseCR, int nCRMod) json json_UpdateCR(json jCreature, int nBaseCR, int nCRMod)
@@ -510,8 +582,7 @@ json json_UpdateCR(json jCreature, int nBaseCR, int nCRMod)
//:: Directly modifies ability scores in a creature's JSON GFF. //:: Directly modifies ability scores in a creature's JSON GFF.
//:: //::
json json_UpdateTemplateStats(json jCreature, int iModStr = 0, int iModDex = 0, int iModCon = 0, json json_UpdateTemplateStats(json jCreature, int iModStr = 0, int iModDex = 0, int iModCon = 0, int iModInt = 0, int iModWis = 0, int iModCha = 0)
int iModInt = 0, int iModWis = 0, int iModCha = 0)
{ {
int iCurrent; int iCurrent;
@@ -745,6 +816,37 @@ json json_AdjustCreatureSize(json jCreature, int nSizeDelta)
return jCreature; return jCreature;
} }
//:: Changes jCreature's creature type.
json JsonModifyRacialType(json jCreature, int nNewRacialType)
{
if(DEBUG)DoDebug("prc_inc_function >> JsonModifyRacialType: Entering function");
// Retrieve the RacialType field
json jRacialTypeField = JsonObjectGet(jCreature, "Race");
if (JsonGetType(jRacialTypeField) == JSON_TYPE_NULL)
{
DoDebug("prc_inc_function >> JsonModifyRacialType: JsonGetType error 1: " + JsonGetError(jRacialTypeField));
//SpeakString("JsonGetType error 1: " + JsonGetError(jRacialTypeField));
return JsonNull();
}
// Retrieve the value to modify
json jRacialTypeValue = JsonObjectGet(jRacialTypeField, "value");
if (JsonGetType(jRacialTypeValue) != JSON_TYPE_INTEGER)
{
DoDebug("prc_inc_function >> JsonModifyRacialType: JsonGetType error 2: " + JsonGetError(jRacialTypeValue));
//SpeakString("JsonGetType error 2: " + JsonGetError(jRacialTypeValue));
return JsonNull();
}
jCreature = GffReplaceByte(jCreature, "Race", nNewRacialType);
// Return the new creature object
return jCreature;
}
//:: Test void //:: Test void
//:: void main (){} //:: void main (){}

View File

@@ -1539,8 +1539,8 @@ int GetRemainingSpellChoices(int nClass, int circleLevel, object oPC=OBJECT_SELF
// default logic for spont casters // default logic for spont casters
totalSpellsKnown = GetSpellKnownMaxCount(casterLevel, circleLevel, nClass, oPC); totalSpellsKnown = GetSpellKnownMaxCount(casterLevel, circleLevel, nClass, oPC);
// Favoured Soul has more 0 choices than there are spells for some reason // Favoured Soul has more 0 choices than there are spells for some reason
if (nClass == CLASS_TYPE_FAVOURED_SOUL && circleLevel == 0 && totalSpellsKnown > 6) if (nClass == CLASS_TYPE_FAVOURED_SOUL && circleLevel == 0 && totalSpellsKnown > 7)
totalSpellsKnown = 6; totalSpellsKnown = 7;
// logic for spont casters // logic for spont casters
json selectedCircle = JsonObjectGet(chosenSpells, IntToString(circleLevel)); json selectedCircle = JsonObjectGet(chosenSpells, IntToString(circleLevel));

View File

@@ -180,6 +180,24 @@ void RunImpactScript(object oPC, int nSpellID, int nEventType)
DeleteLocalInt(oPC, PRC_SPELLID_OVERRIDE); DeleteLocalInt(oPC, PRC_SPELLID_OVERRIDE);
} }
//Returns true if the spell is one of the repair spells
int IsRepair(int nSpellID)
{
return ((nSpellID >= SPELL_REPAIR_MINOR_DAMAGE) && (nSpellID <= SPELL_REPAIR_CRITICAL_DAMAGE));
}
//Returns true if the spell is one of the mass repair spells
int IsMassRepair(int nSpellID)
{
return ((nSpellID >= SPELL_MASS_REPAIR_LIGHT_DAMAGE) && (nSpellID <= SPELL_MASS_REPAIR_CRITICAL_DAMAGE));
}
//Returns true if the spell is one of the mass inflict damage spells
int IsMassInflictDamage(int nSpellID)
{
return ((nSpellID >= SPELL_MASS_INFLICT_LIGHT_DAMAGE) && (nSpellID <= SPELL_MASS_INFLICT_CRITICAL_DAMAGE));
}
//Returns true if the spell is one of the cure spells //Returns true if the spell is one of the cure spells
int IsCure(int nSpellID) int IsCure(int nSpellID)
{ {

View File

@@ -1359,8 +1359,27 @@ const int SPELL_SUMMON_NATURES_ALLY_9_ARANEA = 17085;
const int SPELL_CHASING_PERFECTION = 2479; const int SPELL_CHASING_PERFECTION = 2479;
//:: Spell Compendium Spells //:: Spell Compendium Spells
const int SPELL_SPIRIT_WORM = 17248;
const int SPELL_FORCE_MISSILES = 2480; const int SPELL_FORCE_MISSILES = 2480;
const int SPELL_REPAIR_MINOR_DAMAGE = 17094;
const int SPELL_REPAIR_LIGHT_DAMAGE = 17095;
const int SPELL_REPAIR_MODERATE_DAMAGE = 17096;
const int SPELL_REPAIR_SERIOUS_DAMAGE = 17097;
const int SPELL_REPAIR_CRITICAL_DAMAGE = 17098;
const int SPELL_INFLICT_LIGHT_DAMAGE = 17100;
const int SPELL_INFLICT_MODERATE_DAMAGE = 17101;
const int SPELL_INFLICT_SERIOUS_DAMAGE = 17102;
const int SPELL_INFLICT_CRITICAL_DAMAGE = 17103;
const int SPELL_SPIRIT_WORM = 17248;
//:: Races of Eberron
const int SPELL_MASS_REPAIR_LIGHT_DAMAGE = 17105;
const int SPELL_MASS_REPAIR_MODERATE_DAMAGE = 17106;
const int SPELL_MASS_REPAIR_SERIOUS_DAMAGE = 17107;
const int SPELL_MASS_REPAIR_CRITICAL_DAMAGE = 17108;
const int SPELL_MASS_INFLICT_LIGHT_DAMAGE = 17110;
const int SPELL_MASS_INFLICT_MODERATE_DAMAGE = 17111;
const int SPELL_MASS_INFLICT_SERIOUS_DAMAGE = 17112;
const int SPELL_MASS_INFLICT_CRITICAL_DAMAGE = 17113;
//:: Masters of the Wild Spells //:: Masters of the Wild Spells
const int SPELL_FORESTFOLD = 17090; const int SPELL_FORESTFOLD = 17090;

View File

@@ -529,6 +529,7 @@ object CICraftScribeScroll(object oCreator, int nSpellID)
case CLASS_TYPE_WIZARD: case CLASS_TYPE_WIZARD:
case CLASS_TYPE_SORCERER: sClass = "Wiz_Sorc"; break; case CLASS_TYPE_SORCERER: sClass = "Wiz_Sorc"; break;
case CLASS_TYPE_CLERIC: case CLASS_TYPE_CLERIC:
case CLASS_TYPE_OCULAR:
case CLASS_TYPE_UR_PRIEST: sClass = "Cleric"; break; case CLASS_TYPE_UR_PRIEST: sClass = "Cleric"; break;
case CLASS_TYPE_PALADIN: sClass = "Paladin"; break; case CLASS_TYPE_PALADIN: sClass = "Paladin"; break;
case CLASS_TYPE_DRUID: case CLASS_TYPE_DRUID:
@@ -1476,6 +1477,10 @@ int InscribeRune(object oTarget = OBJECT_INVALID, object oCaster = OBJECT_INVALI
if(!GetIsObjectValid(oTarget)) oTarget = PRCGetSpellTargetObject(); if(!GetIsObjectValid(oTarget)) oTarget = PRCGetSpellTargetObject();
int nCaster = GetAlternativeCasterLevel(oCaster, PRCGetCasterLevel(oCaster)); int nCaster = GetAlternativeCasterLevel(oCaster, PRCGetCasterLevel(oCaster));
//:: [TO DO] make Inscribe Epic Rune.
if(nCaster > 20) nCaster = 20;
int nDC = PRCGetSaveDC(oTarget, oCaster); int nDC = PRCGetSaveDC(oTarget, oCaster);
if(!nSpell) nSpell = PRCGetSpellId(); if(!nSpell) nSpell = PRCGetSpellId();
int nSpellLevel = 0; int nSpellLevel = 0;
@@ -1498,6 +1503,7 @@ int InscribeRune(object oTarget = OBJECT_INVALID, object oCaster = OBJECT_INVALI
// Minimum level. // Minimum level.
if (nSpellLevel == 0) nSpellLevel = 1; if (nSpellLevel == 0) nSpellLevel = 1;
// This will be modified with Runecaster code later. // This will be modified with Runecaster code later.
int nCharges = 1; int nCharges = 1;
if (GetLocalInt(oCaster, "RuneCharges")) nCharges = nCount; if (GetLocalInt(oCaster, "RuneCharges")) nCharges = nCount;

View File

@@ -24,6 +24,7 @@
#include "x0_i0_position" #include "x0_i0_position"
#include "X0_INC_HENAI" #include "X0_INC_HENAI"
#include "x3_inc_skin" #include "x3_inc_skin"
#include "prc_racial_const"
/* /*
@@ -638,7 +639,7 @@ int HorseGetMountTail(object oHorse);
// FILE: x3_inc_horse FUNCTION: HorseGetMountFailureMessage() // FILE: x3_inc_horse FUNCTION: HorseGetMountFailureMessage()
// This is a companion function to HorseGetCanBeMounted. If you need a text // This is a companion function to HorseGetCanBeMounted. If you need a text
// message that explains why the horse cannot be mounted. // message that explains why the horse cannot be mounted.
string HorseGetMountFailureMessage(object oTarget,object oRider=OBJECT_INVALID); string HorseGetMountFailureMessage(object oHorse,object oRider=OBJECT_INVALID);
// FILE: x3_inc_horse FUNCTION: HorseAddHorseMenu() // FILE: x3_inc_horse FUNCTION: HorseAddHorseMenu()
@@ -1050,6 +1051,8 @@ void HORSE_SupportOriginalSpeed(object oRider)
} // check to see if matches conditions } // check to see if matches conditions
eSearch=GetNextEffect(oRider); eSearch=GetNextEffect(oRider);
} // cycle through effects } // cycle through effects
} // HORSE_SupportOriginalSpeed() } // HORSE_SupportOriginalSpeed()
@@ -2733,47 +2736,6 @@ object HorseSummonPaladinMount(int bPHBDuration=FALSE)
return oMount; return oMount;
} // HorseSummonPaladinMount() } // HorseSummonPaladinMount()
object HorseSummonPhantomSteed(int nCasterLvl, int nDuration)
{ // PURPOSE: Summon Phantom Steed
object oSummoner=OBJECT_SELF;
object oMount;
location lLoc;
int nDespawnTime;
int nCurrentTime;
int nMountNum=1;
string sResRef=HORSE_PALADIN_PREFIX;
effect eVFX;
oMount=HorseGetPaladinMount(oSummoner);
if (!GetIsObjectValid(oMount) && GetObjectType(oSummoner) == OBJECT_TYPE_CREATURE)
{ // okay to summon - only one mount at a time
if ((GetIsPC(oSummoner) || GetIsDM(oSummoner))&&!GetHasFeat(FEAT_HORSE_MENU,oSummoner)) HorseAddHorseMenu(oSummoner);
if (nCasterLvl < 11) nMountNum = 2;
else if (nCasterLvl > 10 && nCasterLvl < 15) nMountNum = 3;
else if (nCasterLvl > 14 && nCasterLvl < 25) nMountNum = 4;
else if (nCasterLvl > 24 && nCasterLvl < 30) nMountNum = 5;
else if (nCasterLvl > 29 && nCasterLvl < 35) nMountNum = 6;
else if (nCasterLvl > 34 && nCasterLvl < 40) nMountNum = 7;
else if (nCasterLvl > 39) nMountNum = 8;
lLoc=HORSE_SupportGetMountLocation(oSummoner,oSummoner);
oMount=HorseCreateHorse(sResRef+IntToString(nMountNum),lLoc,oSummoner);
if (!GetIsObjectValid(oMount)) oMount=HorseCreateHorse(sResRef+IntToString(nMountNum),GetLocation(oSummoner),oSummoner);
if (GetIsObjectValid(oMount))
{ // oMount created
eVFX=EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eVFX,oMount,3.0);
eVFX=EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
if (nMountNum>3) eVFX=EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVFX,GetLocation(oMount));
nCurrentTime=HORSE_SupportAbsoluteMinute();
nDespawnTime=(nDuration*60)+nCurrentTime;
SetLocalInt(oSummoner,"nX3_PALADIN_UNSUMMON",nDespawnTime);
if (GetLocalInt(GetModule(),"X3_ENABLE_MOUNT_DB")&&GetIsPC(oSummoner)) SetLocalInt(oSummoner,"bX3_STORE_MOUNT_INFO",TRUE);
SetLocalObject(oSummoner,"oX3PaladinMount",oMount);
} // oMount created
} // okay to summon - only one paladin mount at a time
else { oMount=OBJECT_INVALID; }
return oMount;
} // HorseSummonPaladinMount()
void HorseUnsummonPaladinMount() void HorseUnsummonPaladinMount()
{ // PURPOSE: Unsummon Paladin Mount { // PURPOSE: Unsummon Paladin Mount