2025/06/07 Evening Update

Fixed Opportunistic Piety & Turning.
Fixed Midnight Augmentation.
This commit is contained in:
Jaysyn904 2025-06-07 20:48:29 -04:00
parent 01f4c1b408
commit a668be703a
4 changed files with 59 additions and 33 deletions

View File

@ -1335,7 +1335,7 @@ void DelayAddItemProperty(float fDelay, object oGenerationHolder, string sGenera
* @see DecrementRemainingFeatUses()
* @see IncrementRemainingFeatUses()
*/
void FeatUsePerDay(object oPC, int iFeat, int iAbiMod = ABILITY_CHARISMA, int iMod = 0, int iMin = 1)
void FeatUsePerDay(object oPC, int iFeat, int iAbiMod = ABILITY_CHARISMA, int iMod = 0, int iMin = 1)
{
if(!GetHasFeat(iFeat,oPC))
return;
@ -2042,6 +2042,34 @@ void WildMage(object oPC)
} */
void Factotum(object oPC)
{
int nClass = GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC);
if(nClass > 0)
{
if (nClass >= 20)
{
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_TURN, ABILITY_WISDOM, 6);
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_HEAL, ABILITY_WISDOM, 6);
}
else if (nClass >= 15)
{
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_TURN, ABILITY_WISDOM, 5);
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_HEAL, ABILITY_WISDOM, 5);
}
else if (nClass >= 10)
{
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_TURN, ABILITY_WISDOM, 4);
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_HEAL, ABILITY_WISDOM, 4);
}
else
{
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_TURN, ABILITY_WISDOM, 3);
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_HEAL, ABILITY_WISDOM, 3);
}
}
}
/* void Factotum(object oPC)
{
int nClass = GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC);
if(nClass > 0)
@ -2067,7 +2095,7 @@ void Factotum(object oPC)
FeatUsePerDay(oPC, FEAT_OPPORTUNISTIC_PIETY_HEAL, ABILITY_WISDOM, 0, 3);
}
}
}
} */
void Sharess(object oPC)
{

View File

@ -456,7 +456,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow
int nAugPPCostReductions = 0;
int bMaxAugment = GetLocalInt(manif.oManifester, PRC_AUGMENT_MAXAUGMENT) &&
!GetLocalInt(manif.oManifester, PRC_AUGMENT_OVERRIDE); // Override profile also overrides max augment
// Initialise the augmentation data in the manifestation structure to zero
/* Probably unnecessary due to auto-init
manif.nTimesAugOptUsed_1 = 0;
@ -545,27 +545,25 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow
nAugPPCostReductions += nSurge;
// Midnight Augmentation feat from incarnum
if (GetHasFeat(FEAT_MIDNIGHT_AUGMENTATION, manif.oManifester))
{
int nPower = GetLocalInt(manif.oManifester, "MidnightAugPower");
if (manif.nSpellID == nPower)
{
int bUsedFocus = UsePsionicFocus(manif.oManifester);
if (bUsedFocus)
{
nAugPPCostReductions += GetEssentiaInvestedFeat(manif.oManifester, FEAT_MIDNIGHT_AUGMENTATION);
}
}
}
/* // Midnight Augmentation feat from incarnum
if (GetHasFeat(FEAT_MIDNIGHT_AUGMENTATION, manif.oManifester))
int bMidAug = GetLocalInt(manif.oManifester, "MidnightAugPower");
int nMidnightAugReduction = 0;
//if (GetHasFeat(FEAT_MIDNIGHT_AUGMENTATION, manif.oManifester))
if(bMidAug > 0)
{
// Make sure the power is the correct one, and that you can expend your psionic focus
if(DEBUG) DoDebug("Checking Midnight Augumentation");
int bMidAugInvestment = GetLocalInt(manif.oManifester, "MidnightAugPowerInvestment");
// Make sure the power is the correct one, and that you can expend your psionic focus
if (manif.nSpellID == GetLocalInt(manif.oManifester, "MidnightAugPower") && UsePsionicFocus(manif.oManifester))
nAugPPCostReductions += GetEssentiaInvestedFeat(manif.oManifester, FEAT_MIDNIGHT_AUGMENTATION);
} */
{
if(DEBUG) DoDebug("Midnight Augumentation power invested Essentia is: "+IntToString(bMidAugInvestment)+".");
//nAugPPCostReductions = nAugPPCostReductions + bMidAugInvestment;
nMidnightAugReduction = bMidAugInvestment;
if(DEBUG) DoDebug("Final Midnight Augumentation power adjustment "+IntToString(nMidnightAugReduction)+".");
}
}
/*/ Various effects modifying the augmentation go above /*/
// Auto-distribution, if modifying effects provided more PP than has been used so far or
@ -701,10 +699,11 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow
}
// Add in cost reduction
nAugPPCost = PRCMax(0, nAugPPCost - nAugPPCostReductions);
//nAugPPCost = PRCMax(0, nAugPPCost - nAugPPCostReductions);
nAugPPCost = nAugPPCost - nAugPPCostReductions;
// Store the PP cost increase
manif.nPPCost += nAugPPCost;
manif.nPPCost -= nMidnightAugReduction; //:: Had to apply this directly, wouldn't work otherwise. -Jaysyn
return manif;
}

View File

@ -176,8 +176,6 @@ void main()
if(sName != "")
{
// Replace this with the correct check for whether oMeldshaper actually knows the power.
// Example using GetHasSpell:
if (GetHasPower(i, oMeldshaper))
{
if(SORT) AddToTempList(oMeldshaper, sName, i);
@ -296,6 +294,7 @@ void main()
if (nChoice)
{
SetLocalInt(oMeldshaper, "MidnightAugPower", GetLocalInt(oMeldshaper, "nPower"));
SetLocalInt(oMeldshaper, "MidnightAugPowerInvestment", GetLocalInt(oMeldshaper, "nEssentia"));
InvestEssentiaFeat(oMeldshaper, FEAT_MIDNIGHT_AUGMENTATION, GetLocalInt(oMeldshaper, "nEssentia"));
DeleteLocalInt(oMeldshaper, "nPower");
DeleteLocalInt(oMeldshaper, "nEssentia");

View File

@ -61,13 +61,13 @@ void main()
int nItemType = GetBaseItemType(oItem);
if(nItemType == BASE_ITEM_CBLUDGWEAPON
|| BASE_ITEM_CPIERCWEAPON
|| BASE_ITEM_CSLASHWEAPON
|| BASE_ITEM_CSLSHPRCWEAP)
{
DestroyObject(oItem);
}
if(nItemType == BASE_ITEM_CBLUDGWEAPON
|| nItemType == BASE_ITEM_CPIERCWEAPON
|| nItemType == BASE_ITEM_CSLASHWEAPON
|| nItemType == BASE_ITEM_CSLSHPRCWEAP)
{
DestroyObject(oItem);
}
int nClaw = GetStringLeft(GetResRef(oItem), 12) == "prc_diaclaw_" ? TRUE : FALSE;
if(nClaw)DestroyObject(oItem);