Expanded Justice of Weald & Woe for epic progression

Expanded Justice of Weald & Woe for epic progression.
Updated DoFortification()
Moved Dread Necro over to use DoFortification().
This commit is contained in:
Jaysyn904
2025-05-11 01:20:36 -04:00
parent 2792ed00fc
commit f384d43821
11 changed files with 1361 additions and 1201 deletions

View File

@@ -5,47 +5,6 @@
#include "prc_inc_spells"
void DoFortification(object oPC)
{
if(DEBUG) DoDebug("race_hb >> DoFortification() is running.");
// Get or create the player's skin object
object oHide = GetPCSkin(oPC);
int nRace = GetRacialType(oPC);
if (nRace == RACIAL_TYPE_RETH_DEKALA)
{
// Apply immunity properties for 2 seconds
if(DEBUG) DoDebug("Applying Fortification");
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_CRITICAL_HITS), 2.0f);
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_BACKSTAB), 2.0f);
// Schedule the next toggle in 4 seconds
DelayCommand(4.0f, DoFortification(oPC));
}
else if (nRace == RACIAL_TYPE_WARFORGED && !GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oPC) && !GetHasFeat(FEAT_UNARMORED_BODY, oPC))
{
// Apply immunity properties for 1 seconds
if(DEBUG) DoDebug("Applying Light Fortification");
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_CRITICAL_HITS), 1.0f);
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_BACKSTAB), 1.0f);
// Schedule the next toggle in 4 seconds
DelayCommand(4.0f, DoFortification(oPC));
}
else if (nRace == RACIAL_TYPE_WARFORGED_CHARGER && !GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oPC) && !GetHasFeat(FEAT_UNARMORED_BODY, oPC))
{
// Apply immunity properties for 3 seconds
if(DEBUG) DoDebug("Applying Moderate Fortification");
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_CRITICAL_HITS), 3.0f);
IPSafeAddItemProperty(oHide, ItemPropertyImmunityMisc(IP_CONST_IMMUNITYMISC_BACKSTAB), 3.0f);
// Schedule the next toggle in 4 seconds
DelayCommand(4.0f, DoFortification(oPC));
}
}
void main()
{
object oPC = OBJECT_SELF;
@@ -249,16 +208,48 @@ void main()
}
}
if (GetRacialType(oPC) == RACIAL_TYPE_RETH_DEKALA || GetRacialType(oPC) == RACIAL_TYPE_WARFORGED || GetRacialType(oPC) == RACIAL_TYPE_WARFORGED_CHARGER)
if (GetRacialType(oPC) == RACIAL_TYPE_WARFORGED && !GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oPC) && !GetHasFeat(FEAT_UNARMORED_BODY, oPC))
{
int bFortification = GetLocalInt(oPC, "FORTIFCATION_ACTIVE");
int bFortification = GetLocalInt(oPC, "LIGHT_FORTIFCATION_ACTIVE");
if (!bFortification)
{
DoFortification(oPC);
SetLocalInt(oPC, "FORTIFCATION_ACTIVE", 1);
DoFortification(oPC, FORTIFICATION_LIGHT);
SetLocalInt(oPC, "LIGHT_FORTIFCATION_ACTIVE", 1);
if(DEBUG) DoDebug("race_hb >> DoFortification() activated.");
}
}
if (GetRacialType(oPC) == RACIAL_TYPE_RETH_DEKALA)
{
int bFortification = GetLocalInt(oPC, "MED_FORTIFCATION_ACTIVE");
if (!bFortification)
{
DoFortification(oPC, FORTIFICATION_MEDIUM);
SetLocalInt(oPC, "MED_FORTIFCATION_ACTIVE", 1);
if(DEBUG) DoDebug("race_hb >> DoFortification() activated.");
}
}
if (GetRacialType(oPC) == RACIAL_TYPE_WARFORGED_CHARGER && !GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oPC) && !GetHasFeat(FEAT_UNARMORED_BODY, oPC))
{
int bFortification = GetLocalInt(oPC, "MOD_FORTIFCATION_ACTIVE");
if (!bFortification)
{
DoFortification(oPC, FORTIFICATION_MODERATE);
SetLocalInt(oPC, "MOD_FORTIFCATION_ACTIVE", 1);
if(DEBUG) DoDebug("race_hb >> DoFortification() activated.");
}
}
if (GetRacialType(oPC) == RACIAL_TYPE_WARFORGED || GetRacialType(oPC) == RACIAL_TYPE_WARFORGED_CHARGER && GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oPC))
{
int bFortification = GetLocalInt(oPC, "HEAVY_FORTIFCATION_ACTIVE");
if (!bFortification)
{
DoFortification(oPC, FORTIFICATION_HEAVY);
SetLocalInt(oPC, "HEAVY_FORTIFCATION_ACTIVE", 1);
if(DEBUG) DoDebug("race_hb >> DoFortification() activated.");
}
}
}