2025/12/03 Update
Finished Hidden Talent. Tweaked Factotum abilities to hopefully not run out of uses. Tweaked Twinfiends skill function. Hopefully fixed the Factotum's Inspiration not generating issues. Hopefullly fixed Double Chakra bind. Hopefully fixed Totemist's Double Totem Bind. Hopefully fixed Girallon Arms. Fixed Kuthrik Claws not granting Weapon Finesse. Added missing medium centaur hoof slam uti. Added new tentacle slam creature weapon (works the same, looks better). Updated Spell Effect NUI to ignore system spells (@Rakiov). Fixed typo in Guided Strike.
This commit is contained in:
@@ -63,7 +63,7 @@ void LycanthropePoly(object oPC, int nPoly)
|
||||
object oMergeWeaponSource = OBJECT_INVALID;
|
||||
object oMergeArmorSource = OBJECT_INVALID;
|
||||
|
||||
// ---- Determine Weapon Merge Source ----
|
||||
//:: Determine Weapon Merge Source
|
||||
if (bWeapon)
|
||||
{
|
||||
if (bMonkGloves)
|
||||
@@ -73,18 +73,18 @@ void LycanthropePoly(object oPC, int nPoly)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Always attempt to merge melee weapon to creature weapon
|
||||
//:: Always attempt to merge melee weapon to creature weapon
|
||||
oMergeWeaponSource = oWeaponOld; // even if empty, ensures proper state
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Weapon not requested, but arms-slot allowed monk gloves can merge via armor branch
|
||||
//:: Weapon not requested, but arms-slot allowed monk gloves can merge via armor branch
|
||||
if (bMonkGloves && bArmsSlotAllowed && GetIsObjectValid(oGlovesOld))
|
||||
oMergeWeaponSource = oGlovesOld;
|
||||
}
|
||||
|
||||
// ---- Determine Armor Merge Source ----
|
||||
//:: Determine Armor Merge Source
|
||||
if (bArmor && GetIsObjectValid(oArmorNew))
|
||||
{
|
||||
if (!bMonkGloves)
|
||||
@@ -108,16 +108,16 @@ void LycanthropePoly(object oPC, int nPoly)
|
||||
DoDebug("LycanthropePoly: MergeA set, but oArmorNew invalid.");
|
||||
}
|
||||
|
||||
// ---- Apply Weapon Merge ----
|
||||
//:: Apply Weapon Merge
|
||||
if (GetIsObjectValid(oMergeWeaponSource) || bWeapon)
|
||||
{
|
||||
// Always attempt to merge weapon properties even if source is OBJECT_INVALID
|
||||
//:: Always attempt to merge weapon properties even if source is OBJECT_INVALID
|
||||
if (GetIsObjectValid(oWeaponNewLeft)) IPWildShapeCopyItemProperties(oMergeWeaponSource, oWeaponNewLeft, TRUE);
|
||||
if (GetIsObjectValid(oWeaponNewRight)) IPWildShapeCopyItemProperties(oMergeWeaponSource, oWeaponNewRight, TRUE);
|
||||
if (GetIsObjectValid(oWeaponNewBite)) IPWildShapeCopyItemProperties(oMergeWeaponSource, oWeaponNewBite, TRUE);
|
||||
}
|
||||
|
||||
// ---- Apply Armor Merge ----
|
||||
//:: Apply Armor Merge
|
||||
if (GetIsObjectValid(oMergeArmorSource))
|
||||
{
|
||||
if (GetIsObjectValid(oArmorNew)) IPWildShapeCopyItemProperties(oMergeArmorSource, oArmorNew);
|
||||
|
||||
@@ -188,7 +188,8 @@ void SetInspiration(object oPC)
|
||||
for(i = FEAT_FONT_INSPIRATION_1; i <= FEAT_FONT_INSPIRATION_10; i++)
|
||||
if(GetHasFeat(i, oPC)) nFont++;
|
||||
|
||||
nInspiration += nFont * (1 + nFont + 1) / 2;
|
||||
//nInspiration += nFont * (1 + nFont + 1) / 2;
|
||||
nInspiration += nFont * (nFont + 1) / 2;
|
||||
SetLocalInt(oPC, "InspirationPool", nInspiration);
|
||||
FloatingTextStringOnCreature("Encounter begins with "+IntToString(nInspiration)+" inspiration", oPC, FALSE);
|
||||
}
|
||||
@@ -201,6 +202,8 @@ void ClearInspiration(object oPC)
|
||||
|
||||
int ExpendInspiration(object oPC, int nCost)
|
||||
{
|
||||
if (nCost <= 0) return FALSE;
|
||||
|
||||
int nInspiration = GetLocalInt(oPC, "InspirationPool");
|
||||
if (nInspiration >= nCost)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//:: prc_inc_nat_hb
|
||||
|
||||
void DoNaturalWeaponHB(object oPC = OBJECT_SELF);
|
||||
|
||||
#include "prc_inc_combat"
|
||||
@@ -289,59 +291,72 @@ void DoOverflowOnhandAttack(int nAttackMod)
|
||||
);
|
||||
}
|
||||
|
||||
void DoNaturalWeaponHB(object oPC = OBJECT_SELF)
|
||||
/* void DoNaturalWeaponHB(object oPC = OBJECT_SELF)
|
||||
{
|
||||
//not in combat, abort
|
||||
if(!GetIsInCombat(oPC))
|
||||
return;
|
||||
|
||||
// if(DEBUG) DoDebug("entered DoNaturalWeaponHB");
|
||||
if(DEBUG) DoDebug("prc_inc_nat_hb: entered DoNaturalWeaponHB");
|
||||
|
||||
float fDelay = 0.1 + IntToFloat(Random(10))/100.0;
|
||||
|
||||
//no natural weapons, abort
|
||||
//in a different form, abort for now fix it later
|
||||
if(array_exists(oPC, ARRAY_NAT_SEC_WEAP_RESREF)
|
||||
&& !GetIsPolyMorphedOrShifted(oPC))
|
||||
if(array_exists(oPC, ARRAY_NAT_SEC_WEAP_RESREF)
|
||||
&& !GetIsPolyMorphedOrShifted(oPC))
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: creature has natural secondary weapons");
|
||||
UpdateSecondaryWeaponSizes(oPC);
|
||||
int i;
|
||||
while(i < array_get_size(oPC, ARRAY_NAT_SEC_WEAP_RESREF))
|
||||
{
|
||||
// DoDebug("DoNaturalWeaponHB: creature has natural secondary weapons");
|
||||
UpdateSecondaryWeaponSizes(oPC);
|
||||
int i;
|
||||
while(i < array_get_size(oPC, ARRAY_NAT_SEC_WEAP_RESREF))
|
||||
string sResRef = array_get_string(oPC, ARRAY_NAT_SEC_WEAP_RESREF, i);
|
||||
if(sResRef != "")
|
||||
{
|
||||
//get the resref to use
|
||||
string sResRef = array_get_string(oPC, ARRAY_NAT_SEC_WEAP_RESREF, i);
|
||||
//if null, move to next
|
||||
if(sResRef != "")
|
||||
// Get stored weapon object, or create if doesn't exist
|
||||
object oWeapon = GetLocalObject(oPC, "NAT_SEC_WEAP_" + sResRef);
|
||||
|
||||
if(!GetIsObjectValid(oWeapon))
|
||||
{
|
||||
//get the created item
|
||||
object oWeapon = GetObjectByTag(sResRef);
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: creating and storing creature weapon " + sResRef);
|
||||
oWeapon = CreateItemOnObject(sResRef, oPC);
|
||||
|
||||
if(!GetIsObjectValid(oWeapon))
|
||||
{
|
||||
object oLimbo = GetObjectByTag("HEARTOFCHAOS");
|
||||
location lLimbo = GetLocation(oLimbo);
|
||||
if(!GetIsObjectValid(oLimbo))
|
||||
lLimbo = GetStartingLocation();
|
||||
oWeapon = CreateObject(OBJECT_TYPE_ITEM, sResRef, lLimbo);
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: ERROR - CreateItemOnObject FAILED for " + sResRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: SUCCESS - weapon created, tag=" + GetTag(oWeapon) + ", name=" + GetName(oWeapon));
|
||||
SetIdentified(oWeapon, TRUE);
|
||||
SetLocalObject(oPC, "NAT_SEC_WEAP_" + sResRef, oWeapon);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: using stored creature weapon object");
|
||||
}
|
||||
|
||||
// DoDebug(COLOR_WHITE + "DoNaturalWeaponHB: scheduling a secondary natural attack with "+GetName(oWeapon)+" at delay "+FloatToString(fDelay));
|
||||
//do the attack within a delay
|
||||
/*
|
||||
// motu99: commented this out; AssignCommand ist not needed, because OBJECT_SELF is oPC - using AssignCommand will only degrade performance
|
||||
AssignCommand(oPC, DelayCommand(fDelay, DoNaturalAttack(oWeapon)));
|
||||
*/
|
||||
|
||||
// Double-check validity before scheduling
|
||||
if(GetIsObjectValid(oWeapon))
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: scheduling a secondary natural attack with "+GetName(oWeapon)+" at delay "+FloatToString(fDelay));
|
||||
DelayCommand(fDelay, DoNaturalAttack(oWeapon));
|
||||
|
||||
//calculate the delay to use next time
|
||||
fDelay += 2.05;
|
||||
if(fDelay > 6.0)
|
||||
fDelay -= 6.0;
|
||||
fDelay -= 6.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: ERROR - weapon object is INVALID, cannot schedule attack");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int iMod = 5; // motu99: added check for monk weapon
|
||||
if(GetHasMonkWeaponEquipped(oPC)) iMod = 3;
|
||||
@@ -357,10 +372,10 @@ void DoNaturalWeaponHB(object oPC = OBJECT_SELF)
|
||||
for(i = 0; i < nOverflowAttackCount; i++)
|
||||
{
|
||||
// DoDebug(COLOR_WHITE + "DoNaturalWeaponHB(): scheduling a scripted overflow attack with attack mod "+IntToString(nAttackPenalty)+" at delay "+FloatToString(fDelay));
|
||||
/*
|
||||
|
||||
// motu99: see comment above why this is commented out
|
||||
AssignCommand(oPC, DelayCommand(fDelay, DoOverflowOnhandAttack(nAttackPenalty)));
|
||||
*/
|
||||
//AssignCommand(oPC, DelayCommand(fDelay, DoOverflowOnhandAttack(nAttackPenalty)));
|
||||
|
||||
DelayCommand(fDelay, DoOverflowOnhandAttack(nAttackPenalty));
|
||||
|
||||
//calculate the delay to use
|
||||
@@ -399,6 +414,118 @@ void DoNaturalWeaponHB(object oPC = OBJECT_SELF)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void DoNaturalWeaponHB(object oPC = OBJECT_SELF)
|
||||
{
|
||||
//not in combat, abort
|
||||
if(!GetIsInCombat(oPC))
|
||||
return;
|
||||
|
||||
if(DEBUG) DoDebug("prc_inc_nat_hb: entered DoNaturalWeaponHB");
|
||||
|
||||
float fDelay = 0.1 + IntToFloat(Random(10))/100.0;
|
||||
|
||||
//no natural weapons, abort
|
||||
//in a different form, abort for now fix it later
|
||||
if(array_exists(oPC, ARRAY_NAT_SEC_WEAP_RESREF)
|
||||
&& !GetIsPolyMorphedOrShifted(oPC))
|
||||
{
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: creature has natural secondary weapons");
|
||||
UpdateSecondaryWeaponSizes(oPC);
|
||||
int i;
|
||||
while(i < array_get_size(oPC, ARRAY_NAT_SEC_WEAP_RESREF))
|
||||
{
|
||||
//get the resref to use
|
||||
string sResRef = array_get_string(oPC, ARRAY_NAT_SEC_WEAP_RESREF, i);
|
||||
//if null, move to next
|
||||
if(sResRef != "")
|
||||
{
|
||||
//get the created item
|
||||
object oWeapon = GetObjectByTag(sResRef);
|
||||
if(!GetIsObjectValid(oWeapon))
|
||||
{
|
||||
object oLimbo = GetObjectByTag("HEARTOFCHAOS");
|
||||
location lLimbo = GetLocation(oLimbo);
|
||||
if(!GetIsObjectValid(oLimbo))
|
||||
lLimbo = GetStartingLocation();
|
||||
oWeapon = CreateObject(OBJECT_TYPE_ITEM, sResRef, lLimbo);
|
||||
DoDebug(PRC_TEXT_WHITE + "prc_inc_nat_hb >> DoNaturalWeaponHB: creature weapon object found!!!");
|
||||
}
|
||||
|
||||
DoDebug("prc_inc_nat_hb >> DoNaturalWeaponHB: scheduling a secondary natural attack with "+GetName(oWeapon)+" at delay "+FloatToString(fDelay));
|
||||
//do the attack within a delay
|
||||
// motu99: commented this out; AssignCommand ist not needed, because OBJECT_SELF is oPC - using AssignCommand will only degrade performance
|
||||
//AssignCommand(oPC, DelayCommand(fDelay, DoNaturalAttack(oWeapon)));
|
||||
|
||||
DelayCommand(fDelay, DoNaturalAttack(oWeapon));
|
||||
|
||||
//calculate the delay to use next time
|
||||
fDelay += 2.05;
|
||||
if(fDelay > 6.0)
|
||||
fDelay -= 6.0;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
int iMod = 5; // motu99: added check for monk weapon
|
||||
if(GetHasMonkWeaponEquipped(oPC)) iMod = 3;
|
||||
|
||||
// check for overflow (main hand) attacks
|
||||
int nOverflowAttackCount = GetLocalInt(oPC, "OverflowBaseAttackCount");
|
||||
if(nOverflowAttackCount)
|
||||
{
|
||||
int i;
|
||||
// the first overflow attack would be the seventh main hand attack, at an AB of -30
|
||||
int nAttackPenalty = -6 * iMod; // -30 for normal bab, -18 for monks
|
||||
// DoDebug("DoNaturalWeaponHB(): number of scripted overflow attacks: "+IntToString(nOverflowAttackCount));
|
||||
for(i = 0; i < nOverflowAttackCount; i++)
|
||||
{
|
||||
// DoDebug(COLOR_WHITE + "DoNaturalWeaponHB(): scheduling a scripted overflow attack with attack mod "+IntToString(nAttackPenalty)+" at delay "+FloatToString(fDelay));
|
||||
|
||||
// motu99: see comment above why this is commented out
|
||||
// AssignCommand(oPC, DelayCommand(fDelay, DoOverflowOnhandAttack(nAttackPenalty)));
|
||||
|
||||
DelayCommand(fDelay, DoOverflowOnhandAttack(nAttackPenalty));
|
||||
|
||||
//calculate the delay to use
|
||||
fDelay += 2.05;
|
||||
if(fDelay > 6.0)
|
||||
fDelay -= 6.0;
|
||||
//calculate new attack penalty
|
||||
nAttackPenalty -= iMod; // motu99: usually -5, for monks -3 (unarmed or kama)
|
||||
}
|
||||
}
|
||||
|
||||
// motu99: this is only here for debugging in order to test PerformAttackRound()
|
||||
// must be deleted after debugging!!!
|
||||
//if (GetPRCSwitch(PRC_PNP_TRUESEEING)) DelayCommand(0.01, DoOffhandAttackRound());
|
||||
|
||||
|
||||
// check for overflow offhand attacks
|
||||
int nOffhandAttackCount = GetLocalInt(oPC, "OffhandOverflowAttackCount");
|
||||
// if (DEBUG) DoDebug("DoNaturalWeaponHB: number of scripted offhand attacks = "+IntToString(nOffhandAttackCount));
|
||||
if(nOffhandAttackCount)
|
||||
{
|
||||
int i;
|
||||
int nAttackPenalty = -2 * iMod; // offhand attacks always come at -5 per additional attack (but for monks we assume -3)
|
||||
for(i = 0; i < nOffhandAttackCount; i++)
|
||||
{
|
||||
// DoDebug(COLOR_WHITE + "DoNaturalWeaponHB(): scheduling a scripted offhand attack with attack mod "+IntToString(nAttackPenalty)+" at delay "+FloatToString(fDelay));
|
||||
|
||||
DelayCommand(fDelay, DoOffhandAttack(nAttackPenalty));
|
||||
|
||||
//calculate the delay to use
|
||||
fDelay += 2.05;
|
||||
if(fDelay > 6.0)
|
||||
fDelay -= 6.0;
|
||||
//calculate new attack penalty
|
||||
nAttackPenalty -= iMod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* motu99's test functions. Not actually used by PRC scripts
|
||||
|
||||
@@ -41,6 +41,8 @@ const int POWER_LIST_WARMIND = CLASS_TYPE_WARMIND;
|
||||
/* Function prototypes */
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
int IsHiddenTalent(object oPC = OBJECT_SELF);
|
||||
|
||||
/**
|
||||
* Attempts to use psionic focus. If the creature was focused, it
|
||||
* loses the focus. If it has Epic Psionic Focus feats, it will
|
||||
@@ -786,69 +788,12 @@ int GetIsPsionicCharacter(object oCreature)
|
||||
GetHasFeat(FEAT_KALASHTAR_PP, oCreature) ||
|
||||
GetHasFeat(FEAT_NATPSIONIC_1, oCreature) ||
|
||||
GetHasFeat(FEAT_NATPSIONIC_2, oCreature) ||
|
||||
GetHasFeat(FEAT_NATPSIONIC_3, oCreature)
|
||||
GetHasFeat(FEAT_NATPSIONIC_3, oCreature) ||
|
||||
IsHiddenTalent(oCreature)
|
||||
// Racial psionicity signifying feats go here
|
||||
);
|
||||
}
|
||||
|
||||
int IsHiddenTalent(object oPC = OBJECT_SELF)
|
||||
{
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CALL_WEAPONRY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CHAMELEON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CLAWS_BEAST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_COMPRESSION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CREATESOUND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CRYSTALSHARD, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DAZE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DECELERATION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DEFPRECOG, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DEMORALIZE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISABLE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISTRACT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_ELFSIGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EMPATHY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EMPTYMIND, oPC) ||
|
||||
//GetHasFeat(FEAT_HIDDEN_TALENT_ENERGYRAY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_ENTANGLE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EXPANSION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_FARHAND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_FORCESCREEN, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_GREASE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_HAMMER, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_INERTIALARMOUR, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MATTERAGITATION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MINDTHRUST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MYLIGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRECOG, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRESC, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_SKATE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_STOMP, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_SYNESTHETE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_TELEMPATHICPRO, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_THICKSKIN, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_VIGOR, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_GRIP_IRON, oPC))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LocalCleanExtraFists(object oCreature)
|
||||
{
|
||||
int iIsCWeap, iIsEquip;
|
||||
@@ -985,6 +930,48 @@ int PracticedManifesting(object oManifester, int iManifestingClass, int iManifes
|
||||
|
||||
int GetManifesterLevel(object oManifester, int nSpecificClass = CLASS_TYPE_INVALID, int nMaxPowerLevel = FALSE)
|
||||
{
|
||||
// Handle POWER_LIST_MISC (Hidden Talent) powers
|
||||
// Check if this is a power list call
|
||||
int nPowerType = GetLocalInt(oManifester, "PRC_UsePowerList");
|
||||
|
||||
if(nSpecificClass == CLASS_TYPE_INVALID && nPowerType == POWER_LIST_MISC)
|
||||
{
|
||||
if(DEBUG) DoDebug("psi_inc_core >> GetManifesterLevel: CLASS_TYPE_INVALID + POWER_LIST_MISC found!");
|
||||
// Check if character has psionic class levels
|
||||
int nPsionLevel = GetLevelByClass(CLASS_TYPE_PSION, oManifester);
|
||||
int nPsywarLevel = GetLevelByClass(CLASS_TYPE_PSYWAR, oManifester);
|
||||
int nWilderLevel = GetLevelByClass(CLASS_TYPE_WILDER, oManifester);
|
||||
int nWarmindLevel = GetLevelByClass(CLASS_TYPE_WARMIND, oManifester);
|
||||
int nFistOfZuokenLevel = GetLevelByClass(CLASS_TYPE_FIST_OF_ZUOKEN, oManifester);
|
||||
int nPsychicRogueLevel = GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oManifester);
|
||||
|
||||
// If no psionic levels, use Charisma-based calculation (treat as 1st level)
|
||||
if(nPsionLevel + nPsywarLevel + nWilderLevel + nWarmindLevel +
|
||||
nFistOfZuokenLevel + nPsychicRogueLevel == 0)
|
||||
{
|
||||
// Hidden Talent: considered 1st-level manifester, but must have CHA 11+
|
||||
if(DEBUG) DoDebug("psi_inc_core >> GetManifesterLevel: Hidden Talent found!");
|
||||
if(GetAbilityScore(oManifester, ABILITY_CHARISMA) >= 11)
|
||||
return 1;
|
||||
else
|
||||
return 0; // Cannot manifest without CHA 11+
|
||||
}
|
||||
|
||||
if(DEBUG) DoDebug("psi_inc_core >> GetManifesterLevel: nSpecificClass=" + IntToString(nSpecificClass) +
|
||||
", nPowerType=" + IntToString(nPowerType));
|
||||
|
||||
// Has psionic levels - return highest manifester level
|
||||
int nHighest = 0;
|
||||
if(nPsionLevel > 0) nHighest = GetManifesterLevel(oManifester, CLASS_TYPE_PSION);
|
||||
if(nPsywarLevel > 0) nHighest = PRCMax(nHighest, GetManifesterLevel(oManifester, CLASS_TYPE_PSYWAR));
|
||||
if(nWilderLevel > 0) nHighest = PRCMax(nHighest, GetManifesterLevel(oManifester, CLASS_TYPE_WILDER));
|
||||
if(nWarmindLevel > 0) nHighest = PRCMax(nHighest, GetManifesterLevel(oManifester, CLASS_TYPE_WARMIND));
|
||||
if(nFistOfZuokenLevel > 0) nHighest = PRCMax(nHighest, GetManifesterLevel(oManifester, CLASS_TYPE_FIST_OF_ZUOKEN));
|
||||
if(nPsychicRogueLevel > 0) nHighest = PRCMax(nHighest, GetManifesterLevel(oManifester, CLASS_TYPE_PSYCHIC_ROGUE));
|
||||
|
||||
return nHighest;
|
||||
}
|
||||
|
||||
int nLevel;
|
||||
int nAdjust = GetLocalInt(oManifester, PRC_CASTERLEVEL_ADJUSTMENT);
|
||||
nAdjust -= GetLocalInt(oManifester, "WoLManifPenalty");
|
||||
@@ -1049,17 +1036,27 @@ int GetManifesterLevel(object oManifester, int nSpecificClass = CLASS_TYPE_INVAL
|
||||
|
||||
DelayCommand(1.0, DeleteLocalInt(oManifester, PRC_CASTERLEVEL_OVERRIDE));
|
||||
nLevel = GetLocalInt(oManifester, PRC_CASTERLEVEL_OVERRIDE);
|
||||
}
|
||||
else if(GetManifestingClass(oManifester) != CLASS_TYPE_INVALID)
|
||||
{
|
||||
//Gets the manifesting class
|
||||
int nManifestingClass = GetManifestingClass(oManifester);
|
||||
if(DEBUG) DoDebug("Manifesting Class #2: " + IntToString(nManifestingClass), oManifester);
|
||||
nLevel = GetLevelByClass(nManifestingClass, oManifester);
|
||||
// Add levels from +ML PrCs only for the first manifesting class
|
||||
nLevel += GetPsionicPRCLevels(oManifester, nManifestingClass);
|
||||
//nLevel += nManifestingClass == GetPrimaryPsionicClass(oManifester) ? GetPsionicPRCLevels(oManifester) : 0;
|
||||
|
||||
}
|
||||
else if(GetManifestingClass(oManifester) != CLASS_TYPE_INVALID)
|
||||
{
|
||||
//Gets the manifesting class
|
||||
int nManifestingClass = GetManifestingClass(oManifester);
|
||||
if(DEBUG) DoDebug("Manifesting Class #2: " + IntToString(nManifestingClass), oManifester);
|
||||
|
||||
nLevel = GetLevelByClass(nManifestingClass, oManifester);
|
||||
// Add levels from +ML PrCs only for the first manifesting class
|
||||
nLevel += GetPsionicPRCLevels(oManifester, nManifestingClass);
|
||||
|
||||
// CHECK: If this is Hidden Talent and character has no levels, set to 1
|
||||
if(nLevel == 0 && GetLocalInt(oManifester, "PRC_UsePowerList") == TRUE &&
|
||||
GetLocalInt(oManifester, "PRC_PowerListType") == POWER_LIST_MISC)
|
||||
{
|
||||
if(GetAbilityScore(oManifester, ABILITY_CHARISMA) >= 11)
|
||||
{
|
||||
if(DEBUG) DoDebug("GetManifesterLevel: Hidden Talent with no psionic levels, returning 1");
|
||||
nLevel = 1;
|
||||
}
|
||||
}
|
||||
// Psionic vestiges are tucked in here to override things.
|
||||
// This assumes that there will never be a psion with this spell effect manifesting things
|
||||
if (nManifestingClass == CLASS_TYPE_PSION && GetHasSpellEffect(VESTIGE_ARETE, oManifester) && !nMaxPowerLevel)
|
||||
@@ -1085,7 +1082,37 @@ int GetManifesterLevel(object oManifester, int nSpecificClass = CLASS_TYPE_INVAL
|
||||
// if(DEBUG) DoDebug("Level gotten via GetLevelByClass: " + IntToString(nLevel), oManifester);
|
||||
}
|
||||
|
||||
// If you have a primary psionic class and no manifester level yet, get levels based on that
|
||||
// If you have a primary psionic class and no manifester level yet, get levels based on that
|
||||
if (GetPrimaryPsionicClass(oManifester) && nLevel == 0)
|
||||
{
|
||||
int nClass = GetPrimaryPsionicClass(oManifester);
|
||||
nLevel = GetLevelByClass(nClass, oManifester);
|
||||
nLevel += GetPsionicPRCLevels(oManifester, nClass);
|
||||
nLevel += PracticedManifesting(oManifester, nClass, nLevel);
|
||||
}
|
||||
|
||||
// If everything else fails, check for Hidden Talent before returning 0
|
||||
if(nLevel == 0)
|
||||
{
|
||||
// Check if this is a Hidden Talent power
|
||||
if(GetLocalInt(oManifester, "PRC_UsePowerList") == POWER_LIST_MISC)
|
||||
{
|
||||
// Hidden Talent: manifester level is 1 if they have CHA 11+
|
||||
if(GetAbilityScore(oManifester, ABILITY_CHARISMA) >= 11)
|
||||
{
|
||||
if(DEBUG) DoDebug("GetManifesterLevel: Hidden Talent character, returning level 1");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(DEBUG) DoDebug("Failed to get manifester level for creature " + DebugObject2Str(oManifester) + ", using first class slot");
|
||||
//else WriteTimestampedLogEntry("Failed to get manifester level for creature " + DebugObject2Str(oManifester) + ", using first class slot");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* // If you have a primary psionic class and no manifester level yet, get levels based on that
|
||||
if (GetPrimaryPsionicClass(oManifester) && nLevel == 0)
|
||||
{
|
||||
int nClass = GetPrimaryPsionicClass(oManifester);
|
||||
@@ -1102,7 +1129,7 @@ int GetManifesterLevel(object oManifester, int nSpecificClass = CLASS_TYPE_INVAL
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// The bonuses inside only apply to normal manifestation
|
||||
if(!GetLocalInt(oManifester, PRC_IS_PSILIKE))
|
||||
@@ -1665,4 +1692,172 @@ int GetMaxPowerLevel(object oManifester)
|
||||
int nMax = StringToInt(Get2DACache(sFile, "MaxPowerLevel", nLevel));
|
||||
if (DEBUG) DoDebug("GetMaxPowerLevel is "+IntToString(nMax));
|
||||
return nMax;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
/* START HIDDEN TALENT */
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
int IsHiddenTalent(object oPC = OBJECT_SELF)
|
||||
{
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CALL_WEAPONRY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CHAMELEON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CLAWS_BEAST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_COMPRESSION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CREATESOUND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_CRYSTALSHARD, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DAZE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DECELERATION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DEFPRECOG, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DEMORALIZE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISABLE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_DISTRACT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_ELFSIGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EMPATHY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EMPTYMIND, oPC) ||
|
||||
//GetHasFeat(FEAT_HIDDEN_TALENT_ENERGYRAY, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_ENTANGLE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_EXPANSION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_FARHAND, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_FORCESCREEN, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_GREASE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_HAMMER, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_INERTIALARMOUR, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MATTERAGITATION, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MINDTHRUST, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_MYLIGHT, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRECOG, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRESC, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_SKATE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_STOMP, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_SYNESTHETE, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_TELEMPATHICPRO, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_THICKSKIN, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_VIGOR, oPC) ||
|
||||
GetHasFeat(FEAT_HIDDEN_TALENT_GRIP_IRON, oPC))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int GetHiddenTalentCount(object oPC = OBJECT_SELF)
|
||||
{
|
||||
int nCount = 0;
|
||||
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CALL_WEAPONRY, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CHAMELEON, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CLAWS_BEAST, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_COMPRESSION, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CREATESOUND, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_CRYSTALSHARD, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DAZE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DECELERATION, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DEFPRECOG, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DEMORALIZE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DISABLE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_DISTRACT, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_ELFSIGHT, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_EMPATHY, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_EMPTYMIND, oPC)) nCount++;
|
||||
//if (GetHasFeat(FEAT_HIDDEN_TALENT_ENERGYRAY, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_ENTANGLE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_EXPANSION, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_FARHAND, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_FORCESCREEN, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_GREASE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_HAMMER, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_INERTIALARMOUR, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_MATTERAGITATION, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, oPC))nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_MINDTHRUST, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_MYLIGHT, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRECOG, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRESC, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_SKATE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_STOMP, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_SYNESTHETE, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_TELEMPATHICPRO, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_THICKSKIN, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_VIGOR, oPC)) nCount++;
|
||||
if (GetHasFeat(FEAT_HIDDEN_TALENT_GRIP_IRON, oPC)) nCount++;
|
||||
|
||||
return nCount;
|
||||
}
|
||||
|
||||
int GetIsHiddenTalentPower(object oPC, int nPower)
|
||||
{
|
||||
// Check each Hidden Talent feat to see if it grants this power
|
||||
if(nPower == POWER_BIOFEEDBACK && GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC)) return TRUE;
|
||||
if(nPower == POWER_BITE_WOLF && GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC)) return TRUE;
|
||||
if(nPower == POWER_BOLT && GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC)) return TRUE;
|
||||
if(nPower == POWER_BURST && GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC)) return TRUE;
|
||||
if(nPower == POWER_CALLTOMIND && GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC)) return TRUE;
|
||||
if(nPower == POWER_CALL_WEAPONRY && GetHasFeat(FEAT_HIDDEN_TALENT_CALL_WEAPONRY, oPC)) return TRUE;
|
||||
if(nPower == POWER_CHAMELEON && GetHasFeat(FEAT_HIDDEN_TALENT_CHAMELEON, oPC)) return TRUE;
|
||||
if(nPower == POWER_CLAWS_BEAST && GetHasFeat(FEAT_HIDDEN_TALENT_CLAWS_BEAST, oPC)) return TRUE;
|
||||
if(nPower == POWER_COMPRESSION && GetHasFeat(FEAT_HIDDEN_TALENT_COMPRESSION, oPC)) return TRUE;
|
||||
if(nPower == POWER_CONCEALTHOUGHT && GetHasFeat(FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, oPC)) return TRUE;
|
||||
if(nPower == POWER_CREATESOUND && GetHasFeat(FEAT_HIDDEN_TALENT_CREATESOUND, oPC)) return TRUE;
|
||||
if(nPower == POWER_CRYSTALSHARD && GetHasFeat(FEAT_HIDDEN_TALENT_CRYSTALSHARD, oPC)) return TRUE;
|
||||
if(nPower == POWER_DAZE && GetHasFeat(FEAT_HIDDEN_TALENT_DAZE, oPC)) return TRUE;
|
||||
if(nPower == POWER_DECELERATION && GetHasFeat(FEAT_HIDDEN_TALENT_DECELERATION, oPC)) return TRUE;
|
||||
if(nPower == POWER_DEFPRECOG && GetHasFeat(FEAT_HIDDEN_TALENT_DEFPRECOG, oPC)) return TRUE;
|
||||
if(nPower == POWER_DEMORALIZE && GetHasFeat(FEAT_HIDDEN_TALENT_DEMORALIZE, oPC)) return TRUE;
|
||||
if(nPower == POWER_DISABLE && GetHasFeat(FEAT_HIDDEN_TALENT_DISABLE, oPC)) return TRUE;
|
||||
if(nPower == POWER_DISSIPATINGTOUCH && GetHasFeat(FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, oPC)) return TRUE;
|
||||
if(nPower == POWER_DISTRACT && GetHasFeat(FEAT_HIDDEN_TALENT_DISTRACT, oPC)) return TRUE;
|
||||
if(nPower == POWER_ELFSIGHT && GetHasFeat(FEAT_HIDDEN_TALENT_ELFSIGHT, oPC)) return TRUE;
|
||||
if(nPower == POWER_EMPATHY && GetHasFeat(FEAT_HIDDEN_TALENT_EMPATHY, oPC)) return TRUE;
|
||||
if(nPower == POWER_EMPTYMIND && GetHasFeat(FEAT_HIDDEN_TALENT_EMPTYMIND, oPC)) return TRUE;
|
||||
//if(nPower == POWER_ENERGYRAY && GetHasFeat(FEAT_HIDDEN_TALENT_ENERGYRAY, oPC)) return TRUE;
|
||||
if(nPower == POWER_ENTANGLE && GetHasFeat(FEAT_HIDDEN_TALENT_ENTANGLE, oPC)) return TRUE;
|
||||
if(nPower == POWER_EXPANSION && GetHasFeat(FEAT_HIDDEN_TALENT_EXPANSION, oPC)) return TRUE;
|
||||
if(nPower == POWER_FARHAND && GetHasFeat(FEAT_HIDDEN_TALENT_FARHAND, oPC)) return TRUE;
|
||||
if(nPower == POWER_FORCESCREEN && GetHasFeat(FEAT_HIDDEN_TALENT_FORCESCREEN, oPC)) return TRUE;
|
||||
if(nPower == POWER_GREASE && GetHasFeat(FEAT_HIDDEN_TALENT_GREASE, oPC)) return TRUE;
|
||||
if(nPower == POWER_HAMMER && GetHasFeat(FEAT_HIDDEN_TALENT_HAMMER, oPC)) return TRUE;
|
||||
if(nPower == POWER_INERTIALARMOUR && GetHasFeat(FEAT_HIDDEN_TALENT_INERTIALARMOUR, oPC)) return TRUE;
|
||||
if(nPower == POWER_MATTERAGITATION && GetHasFeat(FEAT_HIDDEN_TALENT_MATTERAGITATION, oPC)) return TRUE;
|
||||
if(nPower == POWER_METAPHYSICAL_CLAW && GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, oPC)) return TRUE;
|
||||
if(nPower == POWER_METAPHYSICAL_WEAPON && GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, oPC)) return TRUE;
|
||||
if(nPower == POWER_MINDTHRUST && GetHasFeat(FEAT_HIDDEN_TALENT_MINDTHRUST, oPC)) return TRUE;
|
||||
if(nPower == POWER_MYLIGHT && GetHasFeat(FEAT_HIDDEN_TALENT_MYLIGHT, oPC)) return TRUE;
|
||||
if(nPower == POWER_OFFPRECOG && GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRECOG, oPC)) return TRUE;
|
||||
if(nPower == POWER_OFFPRESC && GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRESC, oPC)) return TRUE;
|
||||
if(nPower == POWER_PREVENOM && GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM, oPC)) return TRUE;
|
||||
if(nPower == POWER_PREVENOM_WEAPON && GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, oPC)) return TRUE;
|
||||
if(nPower == POWER_SKATE && GetHasFeat(FEAT_HIDDEN_TALENT_SKATE, oPC)) return TRUE;
|
||||
if(nPower == POWER_STOMP && GetHasFeat(FEAT_HIDDEN_TALENT_STOMP, oPC)) return TRUE;
|
||||
if(nPower == POWER_SYNESTHETE && GetHasFeat(FEAT_HIDDEN_TALENT_SYNESTHETE, oPC)) return TRUE;
|
||||
if(nPower == POWER_TELEMPATHICPRO && GetHasFeat(FEAT_HIDDEN_TALENT_TELEMPATHICPRO, oPC)) return TRUE;
|
||||
if(nPower == POWER_THICKSKIN && GetHasFeat(FEAT_HIDDEN_TALENT_THICKSKIN, oPC)) return TRUE;
|
||||
if(nPower == POWER_VIGOR && GetHasFeat(FEAT_HIDDEN_TALENT_VIGOR, oPC)) return TRUE;
|
||||
if(nPower == POWER_GRIP_IRON && GetHasFeat(FEAT_HIDDEN_TALENT_GRIP_IRON, oPC)) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -572,7 +572,11 @@ int GetMaxPowerCount(object oCreature, int nList)
|
||||
|
||||
int GetHasPower(int nPower, object oCreature = OBJECT_SELF)
|
||||
{
|
||||
if((GetLevelByClass(CLASS_TYPE_PSION, oCreature)
|
||||
// Check MISC list first (for Hidden Talent and similar feats)
|
||||
if(GetHasFeat(GetClassFeatFromPower(nPower, CLASS_TYPE_INVALID), oCreature))
|
||||
return TRUE;
|
||||
|
||||
if((GetLevelByClass(CLASS_TYPE_PSION, oCreature)
|
||||
&& GetHasFeat(GetClassFeatFromPower(nPower, CLASS_TYPE_PSION), oCreature)
|
||||
) ||
|
||||
(GetLevelByClass(CLASS_TYPE_PSYWAR, oCreature)
|
||||
|
||||
@@ -137,10 +137,14 @@ int _GetFeatBonusPP(object oChar)
|
||||
{
|
||||
int nBonusPP = 0;
|
||||
|
||||
//:: Wild Talent & Hidden Talents
|
||||
if(GetHasFeat(FEAT_WILD_TALENT, oChar) || IsHiddenTalent())
|
||||
//:: Wild Talent
|
||||
if(GetHasFeat(FEAT_WILD_TALENT, oChar))
|
||||
nBonusPP += 2;
|
||||
|
||||
//:: Hidden Talent
|
||||
if(IsHiddenTalent())
|
||||
nBonusPP += 2 * GetHiddenTalentCount(oChar);
|
||||
|
||||
//:: Psionic Feats
|
||||
int i;
|
||||
int nPsiTalents;
|
||||
|
||||
@@ -407,6 +407,8 @@ void _CleanManifestationVariables(object oManifester)
|
||||
DeleteLocalInt(oManifester, PRC_POWER_LEVEL);
|
||||
DeleteLocalInt(oManifester, PRC_IS_PSILIKE);
|
||||
DeleteLocalInt(oManifester, PRC_AUGMENT_OVERRIDE);
|
||||
DeleteLocalInt(oManifester, "PRC_UsePowerList");
|
||||
DeleteLocalInt(oManifester, "PRC_PowerListType");
|
||||
}
|
||||
|
||||
/** Internal function.
|
||||
@@ -692,10 +694,28 @@ void _UsePowerAux(object oManifester, object oMfToken, int nSpellId,
|
||||
|
||||
struct manifestation EvaluateManifestation(object oManifester, object oTarget, struct power_augment_profile pap, int nMetaPsiFlags)
|
||||
{
|
||||
/* Get some data */
|
||||
//:: Handle Hidden Talent
|
||||
int nSpellID = PRCGetSpellId();
|
||||
int bIsHiddenTalent = GetIsHiddenTalentPower(oManifester, nSpellID);
|
||||
if(bIsHiddenTalent)
|
||||
{
|
||||
SetLocalInt(oManifester, "PRC_UsePowerList", TRUE);
|
||||
SetLocalInt(oManifester, "PRC_PowerListType", POWER_LIST_MISC);
|
||||
}
|
||||
/* Get some data */
|
||||
int bIgnoreConstraints = (DEBUG) ? GetLocalInt(oManifester, PRC_DEBUG_IGNORE_CONSTRAINTS) : FALSE;
|
||||
|
||||
// Manifester-related stuff
|
||||
int nManifesterLevel = GetManifesterLevel(oManifester);
|
||||
//int nManifesterLevel = GetManifesterLevel(oManifester);
|
||||
int nManifesterLevel;
|
||||
if(bIsHiddenTalent)
|
||||
{
|
||||
nManifesterLevel = GetManifesterLevel(oManifester, CLASS_TYPE_INVALID);
|
||||
}
|
||||
else
|
||||
{
|
||||
nManifesterLevel = GetManifesterLevel(oManifester);
|
||||
}
|
||||
int nPowerLevel = GetPowerLevel(oManifester);
|
||||
int nClass = GetManifestingClass(oManifester);
|
||||
int nWildSurge = GetWildSurge(oManifester);
|
||||
@@ -714,6 +734,8 @@ struct manifestation EvaluateManifestation(object oManifester, object oTarget, s
|
||||
manif.nManifesterLevel = nManifesterLevel;
|
||||
manif.nSpellID = PRCGetSpellId();
|
||||
|
||||
|
||||
|
||||
// Run an ability score check to see if the manifester can manifest the power at all
|
||||
if (bIsPsiLike)
|
||||
{
|
||||
@@ -767,7 +789,9 @@ struct manifestation EvaluateManifestation(object oManifester, object oTarget, s
|
||||
//If the manifester does not have enough points before hostile modifiers, cancel power
|
||||
if(manif.nPPCost > nManifesterPP && !bIsPsiLike && !bIgnoreConstraints)
|
||||
{
|
||||
FloatingTextStrRefOnCreature(16826412, oManifester, FALSE); // "You do not have enough Power Points to manifest this power"
|
||||
// DEBUG: show why the cost over cap branch triggered
|
||||
FloatingTextStringOnCreature("DEBUG: manif.nManifesterLevel=" + IntToString(manif.nManifesterLevel) + " manif.nPPCost=" + IntToString(manif.nPPCost) +" PRC_UsePowerList=" + IntToString(GetLocalInt(manif.oManifester, "PRC_UsePowerList")), manif.oManifester, FALSE);
|
||||
FloatingTextStrRefOnCreature(16826412, oManifester, FALSE); // "You do not have enough Power Points to manifest this power"
|
||||
manif.bCanManifest = FALSE;
|
||||
}
|
||||
// The manifester has enough power points that they would be able to use the power, barring extra costs
|
||||
|
||||
Reference in New Issue
Block a user