Exalted update

Updated Vow of Poverty. Added Sanctify Ki Strike, Holy Strike, Fist of Heavens, Vow of Abstinence, Vow of Chastity & Gift of Faith.  (@fenac).  Turned off the Taunt & Parry skills.  Re-disabled AC & save bonuses from Tumble & Spellcraft.   Updated min() & max() to PRCmin() & PRCmax() to not conflict with similarly named NUI adjacent functions.  Set Point Blank Shot to 30' per PnP.  Added icon for Chosen of Evil.  Started work on Hidden Talent.  Created Psionics function cheatsheet.  Updated release archive.
This commit is contained in:
Jaysyn904
2025-01-29 22:46:38 -05:00
parent 370b29e917
commit e641b42f84
209 changed files with 1893 additions and 926 deletions

View File

@@ -0,0 +1,529 @@
//::///////////////////////////////////////////////
//:: Hidden Talent
//:: psi_hiddentalent.nss
//:://////////////////////////////////////////////
/*
Your latent power of psionics flares to life, conferring upon you
the designation of a psionic character. As a psionic character,
you gain a reserve of 2 power points, and you can take psionic
feats, metapsionic feats, and psionic item creation feats. If you
have or take a class that grants power points, the power points
gained from Hidden Talent are added to your total power point
reserve.
When you take this feat, choose one 1st-level power from any
psionic class list. You know this power (it becomes one of your
powers known). You can manifest this power with the power points
provided by this feat if you have a Charisma score of 11 or higher.
If you have no psionic class levels, you are considered a
1st-level manifester when manifesting this power. If you have
psionic class levels, you can manifest the power at the highest
manifester level you have attained. (This is not a manifester
level, and it does not add to any manifester levels gained by
taking psionic classes.) If you have no psionic class levels,
use Charisma to determine how powerful a power you can manifest
and how hard those powers are to resist.
*/
//:://////////////////////////////////////////////
//:: Created By: Jaysyn
//:: Created On: 2025-01-29 09:52:24
//:://////////////////////////////////////////////
#include "prc_feat_const"
#include "psi_inc_core"
#include "psi_inc_powknown"
int GetPowerRowID(int nClass, int nPower)
{
string sPowerFile = GetAMSDefinitionFileName(nClass);
int nCheck = -1;
int i;
for(i = 0; i < GetPRCSwitch(FILE_END_CLASS_POWER); i++)
{
nCheck = StringToInt(Get2DACache(sPowerFile, "RealSpellID", i));
// Find the row ID of the power we need and return it
if(nCheck == nPower)
{
return i;
}
}
// this should never trigger
return -1;
}
void GrantHiddenTalent(object oPC, int nClass, int nFeat, int nPower, string sTag)
{
if (GetHasFeat(nFeat, oPC) && !GetPersistantLocalInt(oPC, sTag))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding power ID " + IntToString(nPower));
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, nPower), TRUE, 1);
SetKnownPowersModifier(oPC, nClass, GetKnownPowersModifier(oPC, nClass) + 1);
SetPersistantLocalInt(oPC, sTag, TRUE);
}
}
void main()
{
object oPC = OBJECT_SELF;
//int nClass = GetPrimaryPsionicClass(oPC);
int nClass = POWER_LIST_PSION;
int nPowerTotal = GetKnownPowersModifier(oPC, nClass);
// Determine why this script is running
if(GetRunningEvent() != EVENT_ONPLAYERLEVELDOWN)
{
GrantHiddenTalent(oPC, POWER_LIST_PSYWAR, FEAT_HIDDEN_TALENT_BIOFEEDBACK, POWER_BIOFEEDBACK, "PRC_HT_BiofeedbackGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_BITE_WOLF, POWER_BITE_WOLF, "PRC_HT_BiteOfTheWolfGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_BOLT, POWER_BOLT, "PRC_HT_BoltGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_BURST, POWER_BURST, "PRC_HT_BurstGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CALLTOMIND, POWER_CALLTOMIND, "PRC_HT_CallToMindGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CALL_WEAPONRY, POWER_CALL_WEAPONRY, "PRC_HT_CallWeaponryGained");
GrantHiddenTalent(oPC, POWER_LIST_PSYWAR, FEAT_HIDDEN_TALENT_CHAMELEON, POWER_CHAMELEON, "PRC_HT_ChameleonGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CLAWS_BEAST, POWER_CLAWS_BEAST, "PRC_HT_ClawsOfTheBeastGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_COMPRESSION, POWER_COMPRESSION, "PRC_HT_CompressionGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, POWER_CONCEALTHOUGHT, "PRC_HT_ConcealThoughtsGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CREATESOUND, POWER_CREATESOUND, "PRC_HT_CreateSoundGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_CRYSTALSHARD, POWER_CRYSTALSHARD, "PRC_HT_CrystalShardGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DAZE, POWER_DAZE, "PRC_HT_DazeGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DECELERATION, POWER_DECELERATION, "PRC_HT_DecelerationGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DEFPRECOG, POWER_DEFPRECOG, "PRC_HT_DefensivePrecognitionGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DEMORALIZE, POWER_DEMORALIZE, "PRC_HT_DemoralizeGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DISABLE, POWER_DISABLE, "PRC_HT_DisableGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, POWER_DISSIPATINGTOUCH, "PRC_HT_DissipatingTouchGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_DISTRACT, POWER_DISTRACT, "PRC_HT_DistractGained");
GrantHiddenTalent(oPC, POWER_LIST_PSYWAR, FEAT_HIDDEN_TALENT_ELFSIGHT, POWER_ELFSIGHT, "PRC_HT_ElfSightGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_EMPATHY, POWER_EMPATHY, "PRC_HT_EmpathyGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_EMPTYMIND, POWER_EMPTYMIND, "PRC_HT_EmptyMindGained");
//GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_ENERGYRAY, POWER_ENERGYRAY, "PRC_HT_EnergyRayGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_ENTANGLE, POWER_ENTANGLE, "PRC_HT_EntangleGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_EXPANSION, POWER_EXPANSION, "PRC_HT_ExpansionGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_FARHAND, POWER_FARHAND, "PRC_HT_FarHandGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_FORCESCREEN, POWER_FORCESCREEN, "PRC_HT_ForceScreenGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_GREASE, POWER_GREASE, "PRC_HT_GreaseGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_GRIP_IRON, POWER_GRIP_IRON, "PRC_HT_GripIronGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_HAMMER, POWER_HAMMER, "PRC_HT_HammerGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_INERTIALARMOUR, POWER_INERTIALARMOUR, "PRC_HT_InertialArmourGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_MATTERAGITATION, POWER_MATTERAGITATION, "PRC_HT_MatterAgitationGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, POWER_METAPHYSICAL_CLAW, "PRC_HT_MetaClawGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, POWER_METAPHYSICAL_WEAPON, "PRC_HT_MetaWeaponGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_MINDTHRUST, POWER_MINDTHRUST, "PRC_HT_MindThrustGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_MYLIGHT, POWER_MYLIGHT, "PRC_HT_MyLightGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_OFFPRECOG, POWER_OFFPRECOG, "PRC_HT_OffPrecogGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_OFFPRESC, POWER_OFFPRESC, "PRC_HT_OffPrescGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_PREVENOM, POWER_PREVENOM, "PRC_HT_PrevenomGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, POWER_PREVENOM_WEAPON, "PRC_HT_PrevenomWeaponGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_SKATE, POWER_SKATE, "PRC_HT_SkateGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_STOMP, POWER_STOMP, "PRC_HT_StompGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_SYNESTHETE, POWER_SYNESTHETE, "PRC_HT_SynestheteGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_TELEMPATHICPRO, POWER_TELEMPATHICPRO, "PRC_HT_TeleProjGained");
GrantHiddenTalent(oPC, POWER_LIST_PSYWAR, FEAT_HIDDEN_TALENT_THICKSKIN, POWER_THICKSKIN, "PRC_HT_ThickSkinGained");
GrantHiddenTalent(oPC, nClass, FEAT_HIDDEN_TALENT_VIGOR, POWER_VIGOR, "PRC_HT_VigorGained");
}
else if(GetRunningEvent() == EVENT_ONPLAYERLEVELDOWN)
{
// Has lost Biofeedback, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Bite of the Wolf, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Bolt, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BoltGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BoltGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Burst, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BurstGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BurstGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Call to Mind, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_CallToMindGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_CallToMindGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Call Weaponry, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_CallWeaponryGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CALL_WEAPONRY, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_CallWeaponryGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Chameleon, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ChameleonGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CHAMELEON, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ChameleonGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Claws of the Beast, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ClawsOfTheBeastGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CLAWS_BEAST, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ClawsOfTheBeastGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Compression, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_CompressionGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_COMPRESSION, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_CompressionGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Conceal Thought, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ConcealThoughtGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CONCEALTHOUGHT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ConcealThoughtGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Create Sound, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_CreateSoundGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CREATESOUND, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_CreateSoundGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Crystal Shard, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_CrystalShardGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_CRYSTALSHARD, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_CrystalShardGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Daze, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DazeGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DAZE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DazeGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Deceleration, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DecelerationGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DECELERATION, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DecelerationGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Deflection Precognition, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DeflectionPrecognitionGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DEFPRECOG, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DeflectionPrecognitionGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Demoralize, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DemoralizeGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DEMORALIZE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DemoralizeGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Disable, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DisableGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DISABLE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DisableGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Dissipating Touch, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DissipatingTouchGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DissipatingTouchGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Distract, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_DistractGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_DISTRACT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_DistractGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Elf Sight, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ElfSightGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_ELFSIGHT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ElfSightGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Empathy, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_EmpathyGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_EMPATHY, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_EmpathyGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Empty Mind, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_EmptyMindGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_EMPTYMIND, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_EmptyMindGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Energy Ray, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_EnergyRayGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_ENERGYRAY, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_EnergyRayGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Entangling Ectoplasm, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_EntangleEctoGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_ENTANGLE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_EntangleEctoGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Expansion, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ExpansionGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_EXPANSION, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ExpansionGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Far Hand, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_FarHandGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_FARHAND, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_FarHandGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Force Screen, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ForceScreenGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_FORCESCREEN, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ForceScreenGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Grease, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_GreaseGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_GREASE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_GreaseGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Hammer, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_HammerGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_HAMMER, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_HammerGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Inertial Armour, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_InertialArmourGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_INERTIALARMOUR, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_InertialArmourGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Matter Agitation, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_MatterAgitationGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_MATTERAGITATION, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_MatterAgitationGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Metaphysical Claw, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_MetaClawGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_MetaClawGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Metaphysical Weapon, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_MetaWeaponGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_MetaWeaponGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Mind Thrust, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_MindThrustGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_MINDTHRUST, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_MindThrustGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost My Light, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_MyLightGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_MYLIGHT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_MyLightGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Precognition, Offensive, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_OffPrecogGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRECOG, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_OffPrecogGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Prescience, Offensive, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_OffPrescGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_OFFPRESC, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_OffPrescGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Prevenom, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_PrevenomGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_PrevenomGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Prevenom Weapon, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_PrevenomWeaponGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_PREVENOM_WEAPON, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_PrevenomWeaponGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Skate, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_SkateGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_SKATE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_SkateGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Stomp, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_StompGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_STOMP, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_StompGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Synesthete, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_SynestheteGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_SYNESTHETE, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_SynestheteGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Telempathic Projection, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_TeleProjGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_TELEMPATHICPRO, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_TeleProjGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Thicken Skin, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_ThickSkinGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_THICKSKIN, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_ThickSkinGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Vigor, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_VigorGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_VIGOR, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_VigorGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Grip of Iron, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_GripIronGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_GRIP_IRON, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_GripIronGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
//:: Remove eventhook if the character no longer has any Hidden Talent feats
if(!IsHiddenTalent())
RemoveEventScript(oPC, EVENT_ONPLAYERLEVELDOWN, "psi_hiddentalent", TRUE, FALSE);
}
}
/* #include "psi_inc_core"
#include "psi_inc_powknown"
int GetPowerRowID(int nClass, int nPower)
{
string sPowerFile = GetAMSDefinitionFileName(nClass);
int nCheck = -1;
int i;
for(i = 0; i < GetPRCSwitch(FILE_END_CLASS_POWER) ; i++)
{
nCheck = StringToInt(Get2DACache(sPowerFile, "RealSpellID", i));
// Find the row ID of the power we need and return it
if(nCheck == nPower)
{
return i;
}
}
// this should never trigger
return -1;
}
void main()
{
object oPC = OBJECT_SELF;
int nClass = GetPrimaryPsionicClass(oPC);
int nPowerTotal = GetKnownPowersModifier(oPC, nClass);
// Determine why this script is running
if(GetRunningEvent() == EVENT_ONPLAYERLEVELUP)
{
if (GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC) && !GetPersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained"))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding Biofeedback");
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, POWER_BIOFEEDBACK), TRUE, GetHitDice(oPC));
SetKnownPowersModifier(oPC, nClass, ++nPowerTotal);
SetPersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained", TRUE);
}
if (GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC) && !GetPersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained"))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding Bite of the Wolf");
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, POWER_BITEWOLF), TRUE, GetHitDice(oPC));
SetKnownPowersModifier(oPC, nClass, ++nPowerTotal);
SetPersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained", TRUE);
}
if (GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC) && !GetPersistantLocalInt(oPC, "PRC_HT_BoltGained"))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding Bolt");
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, POWER_BOLT), TRUE, GetHitDice(oPC));
SetKnownPowersModifier(oPC, nClass, ++nPowerTotal);
SetPersistantLocalInt(oPC, "PRC_HT_BoltGained", TRUE);
}
if (GetHasFeat(FEAT_HIDDEN_TALENT_BURST, oPC) && !GetPersistantLocalInt(oPC, "PRC_HT_BurstGained"))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding Burst");
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, POWER_BURST), TRUE, GetHitDice(oPC));
SetKnownPowersModifier(oPC, nClass, ++nPowerTotal);
SetPersistantLocalInt(oPC, "PRC_HT_BurstGained", TRUE);
}
if (GetHasFeat(FEAT_HIDDEN_TALENT_CALLTOMIND, oPC) && !GetPersistantLocalInt(oPC, "PRC_HT_CallToMindGained"))
{
if(DEBUG) DoDebug("psi_hiddentalent: Adding Call To Mind");
AddPowerKnown(oPC, nClass, GetPowerRowID(nClass, POWER_CALLTOMIND), TRUE, GetHitDice(oPC));
SetKnownPowersModifier(oPC, nClass, ++nPowerTotal);
SetPersistantLocalInt(oPC, "PRC_HT_CallToMindGained", TRUE);
}
// Hook to OnLevelDown to remove the power slots granted here
AddEventScript(oPC, EVENT_ONPLAYERLEVELDOWN, "psi_hiddentalent", TRUE, FALSE);
}
else if(GetRunningEvent() == EVENT_ONPLAYERLEVELDOWN)
{
// Has lost Biofeedback, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BIOFEEDBACK, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BiofeedbackGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Bolt, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BITE_WOLF, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BiteOfTheWolfGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Has lost Bolt, but the slot is still present
if(GetPersistantLocalInt(oPC, "PRC_HT_BoltGained") && !GetHasFeat(FEAT_HIDDEN_TALENT_BOLT, oPC))
{
DeletePersistantLocalInt(oPC, "PRC_HT_BoltGained");
SetKnownPowersModifier(oPC, nClass, --nPowerTotal);
}
// Remove eventhook if the character no longer has any Hidden Talent feats
if(!IsHiddenTalent)
RemoveEventScript(oPC, EVENT_ONPLAYERLEVELDOWN, "psi_hiddentalent", TRUE, FALSE);
}
} */

View File

@@ -90,7 +90,7 @@ void main()
}
/* int nTargetManifesterLevel = max(max(GetClassByPosition(1, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(1, oTarget)) : 0,
/* int nTargetManifesterLevel = PRCMax(PRCMax(GetClassByPosition(1, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(1, oTarget)) : 0,
GetClassByPosition(2, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(2, oTarget)) : 0
),
GetClassByPosition(3, oTarget) != CLASS_TYPE_INVALID ? GetManifesterLevel(oTarget, GetClassByPosition(3, oTarget)) : 0
@@ -98,7 +98,7 @@ void main()
int nPPGiven = 2 + 2 * manif.nTimesAugOptUsed_1;
// Can't give more than the target has manifester levels
nPPGiven = min(nPPGiven, nTargetManifesterLevel);
nPPGiven = PRCMin(nPPGiven, nTargetManifesterLevel);
// Let the AI know the power was used on it
PRCSignalSpellEvent(oTarget, FALSE, manif.nSpellID, oManifester);

View File

@@ -102,7 +102,7 @@ void main()
if(manif.bCanManifest)
{
// {0, 1, 2}, depending on the size of the creature
int nEffectiveSize = max(min(PRCGetCreatureSize(oTarget), CREATURE_SIZE_LARGE), CREATURE_SIZE_SMALL) - CREATURE_SIZE_SMALL;
int nEffectiveSize = PRCMax(PRCMin(PRCGetCreatureSize(oTarget), CREATURE_SIZE_LARGE), CREATURE_SIZE_SMALL) - CREATURE_SIZE_SMALL;
int nClawSize = nEffectiveSize + manif.nTimesAugOptUsed_1 + manif.nTimesAugOptUsed_2;
int nBaseDamage;
effect eVis = EffectVisualEffect(VFX_IMP_PULSE_FIRE);

View File

@@ -66,7 +66,7 @@ void main()
if(manif.bCanManifest)
{
int bIsBioDispel = GetLocalInt(GetModule(),"BIODispel");
int nMLCap = min(10 + (2 * manif.nTimesAugOptUsed_1), manif.nManifesterLevel);
int nMLCap = PRCMin(10 + (2 * manif.nTimesAugOptUsed_1), manif.nManifesterLevel);
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL);
location lTarget = PRCGetSpellTargetLocation();

View File

@@ -97,7 +97,7 @@ void main()
// Will save for half and not being dazed
if(PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS))
{
nDamage = max(nDamage / 2, 1); // Minimum 1 damage
nDamage = PRCMax(nDamage / 2, 1); // Minimum 1 damage
}
else if (GetHasMettle(oTarget, SAVING_THROW_WILL))
{

View File

@@ -101,7 +101,7 @@ void main()
{
int nMaxDamage = GetLocalInt(oManifester, EMPATHIC_FEEDBACK_VARNAME);
int nDamageTaken = GetTotalDamageDealt();
int nDamage = min(nMaxDamage, nDamageTaken);
int nDamage = PRCMin(nMaxDamage, nDamageTaken);
// Use positive damage, it's unlikelier to be resisted than magic damage
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);

View File

@@ -84,7 +84,7 @@ int DoPower(object oManifester, object oTarget, struct manifestation manif)
{
int nDC = GetManifesterDC(oManifester);
int nPen = GetPsiPenetration(oManifester);
int nMaxTran = min(50 + (10 * manif.nTimesAugOptUsed_1), // Maximum transferrable is 50 + 10* augmentation
int nMaxTran = PRCMin(50 + (10 * manif.nTimesAugOptUsed_1), // Maximum transferrable is 50 + 10* augmentation
GetMaxHitPoints(oManifester) - GetCurrentHitPoints(oManifester) // Limited to the amount of damage the manifester has actually suffered
);
if (DEBUG) DoDebug("Transfer Cap: " + IntToString(nMaxTran));

View File

@@ -72,7 +72,7 @@ void main()
PRCSignalSpellEvent(oTarget, TRUE, manif.nSpellID, manif.oManifester);
// Roll damage
nDamage = MetaPsionicsDamage(manif, nDieSize, nNumberOfDice, min(manif.nManifesterLevel, 20), enAdj.nBonusPerDie, TRUE, FALSE);
nDamage = MetaPsionicsDamage(manif, nDieSize, nNumberOfDice, PRCMin(manif.nManifesterLevel, 20), enAdj.nBonusPerDie, TRUE, FALSE);
// Target-specific stuff
nDamage = GetTargetSpecificChangesToDamage(oTarget, manif.oManifester, nDamage, TRUE, TRUE);

View File

@@ -139,7 +139,7 @@ void main()
PRCSignalSpellEvent(oTarget, TRUE, manif.nSpellID, oManifester);
// Test HP limits
nTestHP = max(0, GetCurrentHitPoints(oTarget));
nTestHP = PRCMax(0, GetCurrentHitPoints(oTarget));
if(GetCurrentHitPoints(oTarget) <= 30 &&
GetCurrentHitPoints(oTarget) <= nHPAffectable
)

View File

@@ -59,7 +59,7 @@ void main()
if(manif.bCanManifest)
{
int nBonus = max(manif.nManifesterLevel, 25);
int nBonus = PRCMax(manif.nManifesterLevel, 25);
effect eLink = EffectVisualEffect(VFX_DUR_GLOBE_MINOR);
float fDuration = 6.0f;
if(manif.bExtend) fDuration *= 2;

View File

@@ -84,7 +84,7 @@ void main()
int nLevels = 1 + manif.nTimesAugOptUsed_1;
int nOrigXP = GetXP(oTarget);
int nOrigHD = GetHitDice(oTarget);
int nTargetHD = max(1, nOrigHD - nLevels);
int nTargetHD = PRCMax(1, nOrigHD - nLevels);
int nXPCost = nLevels *
(GetPRCSwitch(PRC_PSI_PSYCHIC_REFORMATION_NERF) == 2 ?
25 : // If nerf is set, the XP cost may also be reduced to 25 per level

View File

@@ -64,7 +64,7 @@ void main()
{
int nDC = GetManifesterDC(oManifester);
int nPen = GetPsiPenetration(oManifester);
int nDispelLevel = max(manif.nManifesterLevel, 20);
int nDispelLevel = PRCMax(manif.nManifesterLevel, 20);
int nEffectSID, nRemoveDC;
effect eVisLink = EffectVisualEffect(VFX_IMP_BREACH);
eVisLink = EffectLinkEffects(eVisLink, EffectVisualEffect(VFX_FNF_DISPEL));

View File

@@ -171,7 +171,7 @@ void main()
ApplyAbilityDamage(oTarget, ABILITY_STRENGTH, 1, DURATION_TYPE_TEMPORARY, TRUE, -1.0f);
// Keep track of how many times we've drained the person, which is one more than previous
nGainedFromCurrent = min(nGainedFromCurrent + 1, nMaxBonus); // Do not allow the value to exceed the max bonus. It probably doesn't matter, but it's ugly :P
nGainedFromCurrent = PRCMin(nGainedFromCurrent + 1, nMaxBonus); // Do not allow the value to exceed the max bonus. It probably doesn't matter, but it's ugly :P
SetLocalInt(oManifester, "PRC_Power_SomE_STRGainedFrom_" + ObjectToString(oTarget), nGainedFromCurrent);
// Check ff the amount gained from current target is greater than the current bonus, but not higher than the maximum

View File

@@ -22,7 +22,7 @@ void main()
int nDam = (nDamageType == DAMAGE_TYPE_SONIC) ? d4(nLevel) : d6(nLevel); //reduced damage dice
if((nDamageType == DAMAGE_TYPE_COLD) || (nDamageType == DAMAGE_TYPE_ELECTRICAL) || (nDamageType == DAMAGE_TYPE_ACID))
nDam = max(nLevel, nDam - nLevel); //minimum of 1 per die
nDam = PRCMax(nLevel, nDam - nLevel); //minimum of 1 per die
if(!GetIsReactionTypeFriendly(oTarget))
{

View File

@@ -44,7 +44,7 @@ void main()
int nDam = (nDamageType == DAMAGE_TYPE_SONIC) ? d4(nDice) : d6(nDice); //reduced damage dice
if((nDamageType == DAMAGE_TYPE_COLD) || (nDamageType == DAMAGE_TYPE_ELECTRICAL) || (nDamageType == DAMAGE_TYPE_ACID))
nDam = max(nDice, nDam - nDice); //minimum of 1 per die
nDam = PRCMax(nDice, nDam - nDice); //minimum of 1 per die
// Damage damage type is the simple case, just get the total damage
// of the spell's type, apply metamagic and roll the save.

View File

@@ -48,7 +48,7 @@ void main()
{
int nDam = (nDamageType == DAMAGE_TYPE_SONIC) ? d6(nDice) : d8(nDice); //reduced damage dice
if((nDamageType == DAMAGE_TYPE_COLD) || (nDamageType == DAMAGE_TYPE_ELECTRICAL) || (nDamageType == DAMAGE_TYPE_ACID))
nDam = max(nDice, nDam - nDice); //minimum of 1 per die
nDam = PRCMax(nDice, nDam - nDice); //minimum of 1 per die
//Apply damage effect and VFX impact
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, nDamageType), oTarget);

View File

@@ -27,7 +27,7 @@ void main()
int nDam = (nDamageType == DAMAGE_TYPE_SONIC) ? d4(nDice) : d6(nDice); //reduced damage dice
if((nDamageType == DAMAGE_TYPE_COLD) || (nDamageType == DAMAGE_TYPE_ELECTRICAL) || (nDamageType == DAMAGE_TYPE_ACID))
nDam = max(nDice, nDam - nDice); //minimum of 1 per die
nDam = PRCMax(nDice, nDam - nDice); //minimum of 1 per die
if(!GetIsReactionTypeFriendly(oTarget))
{

View File

@@ -52,7 +52,7 @@ void BastardSword2hHandler(object oPC)
{
if(LOCAL_DEBUG) DoDebug("Applying +0.5x STR for a bastard sword being wielded 2-h");
if(LOCAL_DEBUG) DoDebug("Bonus was already applied according to local variable: " + (GetLocalInt(oRightH, "PRC_SK_BastardSword_2h_Fudge") ? "Yes":"No"));
int nDamBon = min((GetAbilityModifier(ABILITY_STRENGTH, oPC) / 2) // Round down
int nDamBon = PRCMin((GetAbilityModifier(ABILITY_STRENGTH, oPC) / 2) // Round down
+ GetLocalInt(oRightH, "PRC_SK_BSwd_EnhBonus") // Add in the enhancement bonus, since they don't stack
, 20); // And limit to 20
// No increased damage penalty for negative STR mod