diff --git a/Notes/PRC8 Psionics Cheatsheet.txt b/Notes/PRC8 Psionics Cheatsheet.txt new file mode 100644 index 00000000..d23bd6ce --- /dev/null +++ b/Notes/PRC8 Psionics Cheatsheet.txt @@ -0,0 +1,110 @@ +Here is a list of all the identified psionic functions along with a brief synopsis of their parameters and what they represent: +From psi_inc_core.txt + +- GetPowerLevel(object oManifester) + - oManifester: The creature object manifesting power. This function retrieves the psionic power level of the creature. + + +From psi_inc_psifunc.txt + +- EvaluateManifestation(object oManifester, object oTarget, struct power_augment_profile pap, int nMetaPsiFlags) + - oManifester: The creature that is attempting to manifest the power. + - oTarget: The target of the power. + - pap: A structure containing parameters outlining how the power may be augmented. + - nMetaPsiFlags: Bit flags indicating which metapsionic powers might apply during this manifestation. + +- UsePower(int nPower, int nClass, int bIsPsiLike = FALSE, int nLevelOverride = 0) + - nPower: Identifier of the psionic power to use. + - nClass: Class identifier from which the power is being used. + - bIsPsiLike: Boolean flag specifying whether the power being used should be treated as a psi-like ability. + - nLevelOverride: Optional parameter to override the default power level. + +- DebugManifestation2Str(struct manifestation manif) + - manif: Struct containing data about the current psionic manifestation—used to generate a string for debugging purposes. + +- SetLocalManifestation(object oObject, string sName, struct manifestation manif) + - oObject, sName: Target object and the string name under which this data is stored. + - manif: Data about the current psionic manifestation to store. + +- GetLocalManifestation(object oObject, string sName) + - oObject and sName: Retrieve stored manifestation data from the object using the given name. + +- DebugIgnoreConstraints(object oManifester) + - oManifester: Creature to ignore psionic constraints for debugging. + +- EvaluateDiaDragChannel(object oManifester, object oTarget, struct power_augment_profile pap, int nPowerLevel) + - Similar to EvaluateManifestation but tailored for specific channeling functionality in psionics. + + +From psi_inc_metapsi.txt + +- EvaluateMetapsionics(struct manifestation manif, int nMetaPsiFlags) + - Describes how metapsionic modifications affect the current psionic power manifestation. + +- PayMetapsionicsFocuses(struct manifestation manif) + - Calculates costs in terms of psionic focuses for using metapsionic modifications. + +- MetaPsionicsDamage(struct manifestation manif, int nDieSize, int nNumberOfDice, int nBonus = 0, int nBonusPerDie = 0, int bDoesHPDamage = FALSE, int bIsRayOrRangedTouch = FALSE) + - Calculates how metapsionics affect the damage output of a psionic power. + +- EvaluateWidenPower(struct manifestation manif, float fBase) + - Determines the effect of the "Widen Power" metapsionic on the area of effect size. + +- EvaluateChainPower(struct manifestation manif, object oPrimaryTarget, int bAutoDelete = TRUE) + - Builds a list of secondary targets for chained psionic powers. + +- GetSplitPsionicRayTarget(struct manifestation manif, object oPrimaryTarget) + - Identifies an additional target for the "Split Psionic Ray" metapsionic. + + +From psi_inc_augment.txt + +- PowerAugmentationProfile(...) + - Sets up a profile detailing how a psionic power can be augmented. + +- GetUserAugmentationProfile(object oUser, int nIndex, int bQuickSelection = FALSE) + - Retrieves a user-defined configuration of how they want their psionic power augmented. + +- GetCurrentUserAugmentationProfile(object oUser) + - Retrieves the current, active augmentation profile for a user. + +- StoreUserAugmentationProfile(object oUser, int nIndex, struct user_augment_profile uap, int bQuickSelection = FALSE) + - Stores or updates a psionic augmentation configuration. + +- UserAugmentationProfileToString(struct user_augment_profile uap) + - Converts an augmentation profile to a human-readable string. + +- EvaluateAugmentation(struct manifestation manif, struct power_augment_profile pap) + - Applies user-defined augmentations to a psionic power manifestation to adjust its effects. + +- SetAugmentationOverride(object oCreature, struct user_augment_profile uap) + - Allows overriding the current augmentation settings forcibly. + + +From psi_inc_ppoints.txt + +- GetCurrentPowerPoints(object oChar) + - Retrieves the current power points of a character. + +- GetMaximumPowerPoints(object oChar) + - Calculates the maximum power points a character can have. + +- GetPowerPointsAsString(object oChar) + - Gets a string representation of both current and maximum power points. + +- TellCharacterPowerPointStatus(object oChar) + - Displays a character’s power points. + +- ResetPowerPoints(object oChar) + - Resets a character’s power points to maximum. + +- GainPowerPoints(object oChar, int nGain, int bCanExceedMax = FALSE, int bInform = TRUE) + - Increases a character’s power points, possibly beyond the maximum. + +- LosePowerPoints(object oChar, int nLoss, int bInform = TRUE) + - Deducts from a character’s power points without going below zero. + +- LoseAllPowerPoints(object oChar, int bInform = TRUE) + - Sets a character’s power points to zero, including notification. + +These functions manage various aspects of psionic powers in the game, including their initialization, application, augmentation, power points management, and interactions with metapsionic abilities. \ No newline at end of file diff --git a/Notes/removed_old_prc_funcs.nss b/Notes/removed_old_prc_funcs.nss deleted file mode 100644 index a1b2f4a3..00000000 --- a/Notes/removed_old_prc_funcs.nss +++ /dev/null @@ -1,209 +0,0 @@ -int GetArcanePRCLevels(object oCaster, int nCastingClass = CLASS_TYPE_INVALID) -{ - int nArcane; - int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster); - int nUM = GetLevelByClass(CLASS_TYPE_ULTIMATE_MAGUS, oCaster); - - int nFirstClass = GetClassByPosition(1, oCaster); - int nSecondClass = GetClassByPosition(2, oCaster); - int nThirdClass = GetClassByPosition(3, oCaster); - int nFourthClass = GetClassByPosition(4, oCaster); - int nFifthClass = GetClassByPosition(5, oCaster); - int nSixthClass = GetClassByPosition(6, oCaster); - int nSeventhClass = GetClassByPosition(7, oCaster); - int nEighthClass = GetClassByPosition(8, oCaster); - - if (GetFirstArcaneClassPosition(oCaster)) nArcane += GetLevelByClass(CLASS_TYPE_SOULCASTER, oCaster); - - nArcane += GetLevelByClass(CLASS_TYPE_ABJURANT_CHAMPION, oCaster) - + GetLevelByClass(CLASS_TYPE_ALIENIST, oCaster) - + GetLevelByClass(CLASS_TYPE_ANIMA_MAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oCaster) - + GetLevelByClass(CLASS_TYPE_ARCHMAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_ARCTRICK, oCaster) - + GetLevelByClass(CLASS_TYPE_CEREBREMANCER, oCaster) - + GetLevelByClass(CLASS_TYPE_DIABOLIST, oCaster) - + GetLevelByClass(CLASS_TYPE_DRAGONHEART_MAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_ELDRITCH_KNIGHT, oCaster) - + GetLevelByClass(CLASS_TYPE_ELDRITCH_THEURGE, oCaster) - + GetLevelByClass(CLASS_TYPE_ELEMENTAL_SAVANT,oCaster) - + GetLevelByClass(CLASS_TYPE_FMM, oCaster) - + GetLevelByClass(CLASS_TYPE_FROST_MAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_HARPERMAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_JADE_PHOENIX_MAGE, oCaster) - + GetLevelByClass(CLASS_TYPE_MAGEKILLER, oCaster) - + GetLevelByClass(CLASS_TYPE_MASTER_ALCHEMIST, oCaster) - + GetLevelByClass(CLASS_TYPE_MASTER_HARPER, oCaster) - + GetLevelByClass(CLASS_TYPE_MYSTIC_THEURGE, oCaster) - + GetLevelByClass(CLASS_TYPE_NOCTUMANCER, oCaster) - + GetLevelByClass(CLASS_TYPE_SPELLDANCER, oCaster) - + GetLevelByClass(CLASS_TYPE_TRUENECRO, oCaster) - + GetLevelByClass(CLASS_TYPE_RED_WIZARD, oCaster) - + GetLevelByClass(CLASS_TYPE_SHADOW_ADEPT, oCaster) - + GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oCaster) - + GetLevelByClass(CLASS_TYPE_UNSEEN_SEER, oCaster) - + GetLevelByClass(CLASS_TYPE_VIRTUOSO, oCaster) - + GetLevelByClass(CLASS_TYPE_WAR_WIZARD_OF_CORMYR, oCaster) - - + (GetLevelByClass(CLASS_TYPE_BLADESINGER, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_BONDED_SUMMONNER, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_PALEMASTER, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_HATHRAN, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_HAVOC_MAGE, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_SPELLSWORD, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_THRALL_OF_GRAZZT_A, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_TALON_OF_TIAMAT, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_RAGE_MAGE, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_WAYFARER_GUIDE, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_JUDICATOR, oCaster) + 1) / 3; - - int nClass = GetLevelByClass(CLASS_TYPE_WILD_MAGE, oCaster); - if (nClass) - nArcane += nClass - 3 + d6(); - - //The following changes are to prevent a mage/invoker from gaining bonus caster levels in both base classes. - - if(GetLocalInt(oCaster, "INV_Caster") == 1 || - (!GetLevelByClass(CLASS_TYPE_WARLOCK, oCaster) && !GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT, oCaster))) - nArcane += (GetLevelByClass(CLASS_TYPE_ACOLYTE, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_DISCIPLE_OF_ASMODEUS, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_TALON_OF_TIAMAT, oCaster) + 1) / 2 - + GetLevelByClass(CLASS_TYPE_ENLIGHTENEDFIST, oCaster) - + GetLevelByClass(CLASS_TYPE_MAESTER, oCaster); - - - /* oozemaster levels count towards arcane caster level if: - * - * first class slot is arcane OR - * first class slot is NOT divine AND second class slot is arcane OR - * first AND second class slot is NOT divine AND 3rd class slot is arcane - */ - if (nOozeMLevel) //:: [PRC .35] This needs marker feats. - { - if (GetIsArcaneClass(nFirstClass, oCaster) - || (!GetIsDivineClass(nFirstClass, oCaster) - && GetIsArcaneClass(nSecondClass, oCaster)) - || (!GetIsDivineClass(nFirstClass, oCaster) - && !GetIsDivineClass(nSecondClass, oCaster) - && GetIsArcaneClass(nThirdClass, oCaster))) - nArcane += nOozeMLevel / 2; - } - - if (nUM) - { - int nBoost = nUM - 1; //Prep caster always loses a level on first level of the class - if (nUM >= 4) nBoost = nUM - 2; - if (nUM >= 7) nBoost = nUM - 3; - nArcane += nBoost; - - if (nCastingClass == CLASS_TYPE_SORCERER) - { - int nBoost = 1; //Sorcerer gets the lost levels back - if (nUM >= 4) nBoost = 2; - if (nUM >= 7) nBoost = 3; - nArcane += nBoost; - } - } - if(GetLevelByClass(CLASS_TYPE_SORCERER, oCaster)) - { - int nRace = GetRacialType(oCaster); - - //includes RHD HD as sorc - //if they have sorcerer levels, then it counts as a prestige class - //otherwise its used instead of sorc levels - if(nRace == RACIAL_TYPE_ARANEA) - nArcane += GetLevelByClass(CLASS_TYPE_SHAPECHANGER); - if(nRace == RACIAL_TYPE_RAKSHASA) - nArcane += GetLevelByClass(CLASS_TYPE_OUTSIDER); - if(nRace == RACIAL_TYPE_DRIDER) - nArcane += GetLevelByClass(CLASS_TYPE_ABERRATION); - if(nRace == RACIAL_TYPE_ARKAMOI) - nArcane += GetLevelByClass(CLASS_TYPE_MONSTROUS); - if(nRace == RACIAL_TYPE_REDSPAWN_ARCANISS) - nArcane += GetLevelByClass(CLASS_TYPE_MONSTROUS)*3/4; - if(nRace == RACIAL_TYPE_MARRUTACT) - nArcane += (GetLevelByClass(CLASS_TYPE_MONSTROUS)*6/7)-1; - } - - if(GetLevelByClass(CLASS_TYPE_BARD, oCaster)) - { - int nRace = GetRacialType(oCaster); - - //includes RHD HD as bard - //if they have bard levels, then it counts as a prestige class - //otherwise its used instead of bard levels - if(nRace == RACIAL_TYPE_GLOURA) - nArcane += GetLevelByClass(CLASS_TYPE_FEY); - } - - return nArcane; -} - -int GetDivinePRCLevels(object oCaster) -{ - int nDivine; - int nOozeMLevel = GetLevelByClass(CLASS_TYPE_OOZEMASTER, oCaster); - - int nFirstClass = GetClassByPosition(1, oCaster); - int nSecondClass = GetClassByPosition(2, oCaster); - int nThirdClass = GetClassByPosition(3, oCaster); - int nFourthClass = GetClassByPosition(4, oCaster); - int nFifthClass = GetClassByPosition(5, oCaster); - int nSixthClass = GetClassByPosition(6, oCaster); - int nSeventhClass = GetClassByPosition(7, oCaster); - int nEighthClass = GetClassByPosition(8, oCaster); - - // This section accounts for full progression classes - nDivine += GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oCaster) - + GetLevelByClass(CLASS_TYPE_BLIGHTLORD, oCaster) - + GetLevelByClass(CLASS_TYPE_COMBAT_MEDIC, oCaster) - + GetLevelByClass(CLASS_TYPE_CONTEMPLATIVE, oCaster) - + GetLevelByClass(CLASS_TYPE_ELDRITCH_DISCIPLE, oCaster) - + GetLevelByClass(CLASS_TYPE_FORESTMASTER, oCaster) - + GetLevelByClass(CLASS_TYPE_FISTRAZIEL, oCaster) - + GetLevelByClass(CLASS_TYPE_HEARTWARDER, oCaster) - + GetLevelByClass(CLASS_TYPE_HIEROPHANT, oCaster) - + GetLevelByClass(CLASS_TYPE_HOSPITALER, oCaster) - + GetLevelByClass(CLASS_TYPE_MASTER_OF_SHROUDS, oCaster) - + GetLevelByClass(CLASS_TYPE_MORNINGLORD, oCaster) - + GetLevelByClass(CLASS_TYPE_MYSTIC_THEURGE, oCaster) - + GetLevelByClass(CLASS_TYPE_PSYCHIC_THEURGE, oCaster) - + GetLevelByClass(CLASS_TYPE_RUBY_VINDICATOR, oCaster) - + GetLevelByClass(CLASS_TYPE_RUNECASTER, oCaster) - + GetLevelByClass(CLASS_TYPE_SACREDPURIFIER, oCaster) - + GetLevelByClass(CLASS_TYPE_SAPPHIRE_HIERARCH, oCaster) - + GetLevelByClass(CLASS_TYPE_SHADOWBANE_STALKER,oCaster) - + GetLevelByClass(CLASS_TYPE_STORMLORD, oCaster) - + GetLevelByClass(CLASS_TYPE_SWIFT_WING, oCaster) - + GetLevelByClass(CLASS_TYPE_TENEBROUS_APOSTATE, oCaster) - - + (GetLevelByClass(CLASS_TYPE_BFZ, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_BRIMSTONE_SPEAKER, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_HATHRAN, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_MIGHTY_CONTENDER_KORD, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_OLLAM, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_ORCUS, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_SHINING_BLADE, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_TEMPUS, oCaster) + 1) / 2 - + (GetLevelByClass(CLASS_TYPE_WARPRIEST, oCaster) + 1) / 2 - - + (GetLevelByClass(CLASS_TYPE_JUDICATOR, oCaster) + 1) / 3; - - if (!GetHasFeat(FEAT_SF_CODE, oCaster)) - { - nDivine += GetLevelByClass(CLASS_TYPE_SACREDFIST, oCaster); - } - - if (nOozeMLevel) //:: [PRC .35] This needs marker feats. - { - if (GetIsDivineClass(nFirstClass, oCaster) - || (!GetIsArcaneClass(nFirstClass, oCaster) - && GetIsDivineClass(nSecondClass, oCaster)) - || (!GetIsArcaneClass(nFirstClass, oCaster) - && !GetIsArcaneClass(nSecondClass, oCaster) - && GetIsDivineClass(nThirdClass, oCaster))) - nDivine += nOozeMLevel / 2; - } - - return nDivine; -} diff --git a/Release/PRC8_20250129.7z b/Release/PRC8_20250129.7z new file mode 100644 index 00000000..6e4dbd74 Binary files /dev/null and b/Release/PRC8_20250129.7z differ diff --git a/Release/PRC8_20250121.7z b/_backup/PRC8_20250121.7z similarity index 100% rename from Release/PRC8_20250121.7z rename to _backup/PRC8_20250121.7z diff --git a/_backup/PRC8_20250128.7z b/_backup/PRC8_20250128.7z new file mode 100644 index 00000000..f9e6c9c6 Binary files /dev/null and b/_backup/PRC8_20250128.7z differ diff --git a/nwn/nwnprc/trunk/2das/cls_feat_fight.2da b/nwn/nwnprc/trunk/2das/cls_feat_fight.2da index 024f61ea..1d321cb2 100644 --- a/nwn/nwnprc/trunk/2das/cls_feat_fight.2da +++ b/nwn/nwnprc/trunk/2das/cls_feat_fight.2da @@ -220,8 +220,8 @@ 216 WP_Light_Pick 7940 3 1 0 217 WP_Falchion 7943 3 1 0 218 WP_Maul 7947 3 1 0 -219 FEAT_CHARMING_THE_ARROW 25997 3 1 0 -220 FEAT_MARTIAL_STALKER 25998 3 1 0 +219 FEAT_CHARMING_THE_ARROW 25997 1 -1 0 +220 FEAT_MARTIAL_STALKER 25998 1 -1 0 221 Expertise 389 1 -1 0 222 ImpExpertise 390 1 -1 0 223 GreatCleave 391 1 -1 0 diff --git a/nwn/nwnprc/trunk/2das/des_crft_spells.2da b/nwn/nwnprc/trunk/2das/des_crft_spells.2da index e1d3e0fc..bbd7df6d 100644 --- a/nwn/nwnprc/trunk/2das/des_crft_spells.2da +++ b/nwn/nwnprc/trunk/2das/des_crft_spells.2da @@ -14267,7 +14267,7 @@ 14263 Prevenom **** 1 1 1 1 0 14264 PrevenomWeapon **** 1 1 1 1 1 14265 GripOfIron **** 1 1 1 1 0 -14266 PsionicLionsCharge **** 1 1 1 1 0 +14266 PsionicLionsCharge **** 1 1 1 2 0 14267 **Level_6_Powers** **** 1 1 1 **** 0 14268 **Level_6_Powers** **** 1 1 1 **** 0 14269 **Level_6_Powers** **** 1 1 1 **** 0 diff --git a/nwn/nwnprc/trunk/2das/feat.2da b/nwn/nwnprc/trunk/2das/feat.2da index 9d4d03ec..89921f95 100644 --- a/nwn/nwnprc/trunk/2das/feat.2da +++ b/nwn/nwnprc/trunk/2das/feat.2da @@ -5361,7 +5361,7 @@ 5357 Factotum_Cunning_Knowledge 16824532 16826316 fot_oracle **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3903 **** 1 -1 **** 1 **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 0 5358 Factotum_Opportunistic_Piety_Heal 16826317 16826318 fot_regenerate **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3904 **** 1 10 **** **** **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 1 5359 Factotum_Opportunistic_Piety_Turn 16826319 16826320 fot_contundead **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3905 **** 1 10 **** 1 **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 1 -5360 Vow_Purity 16826325 16826326 ife_sacredvow **** **** **** **** **** **** **** **** 3388 **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOW_OBED 6 **** **** **** **** **** 0 1 +5360 FEAT_VOW_PURITY 16826325 16826326 ife_sacredvow **** **** **** **** **** **** **** **** 3388 **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOW_PURITY 6 **** **** **** **** **** 0 1 5361 Sharess_Fascinate 16826327 16826934 ife_X1SDaze **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3907 **** 1 10 **** 1 **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 1 5362 Sharess_Confuse 16826935 16826936 ife_X1HTym **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3908 **** 1 10 **** **** **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 1 5363 Sharess_Dominate 16826937 16826938 ife_X1HLHrt **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 3909 **** 1 10 **** **** **** **** **** **** **** **** **** **** **** **** 4 **** **** **** **** **** 0 1 @@ -24039,7 +24039,7 @@ 24035 MastersWill 16847381 16847382 ife_mast_will **** **** **** **** **** **** **** **** **** **** **** **** 1 **** **** 3844 **** **** **** **** **** **** **** **** **** **** **** **** **** **** FEAT_MASTERS_WILL **** 0 **** **** **** **** **** 1 24036 DeformityMadness 16847383 16847384 ife_dfrm_mad **** **** **** **** **** **** **** **** 4408 **** 0 0 1 **** **** 3841 **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_DEFORM_MADNESS **** 0 **** **** **** **** 0 1 24037 ReflexivePsychosis 16847385 16847386 ife_rflx_psych **** **** **** **** **** **** **** **** 24036 **** **** **** 1 **** **** 3842 **** **** **** **** **** **** **** **** **** **** **** **** **** **** FEAT_REFLEXIVE_PSYCHOSIS **** 0 **** **** **** **** **** 1 -24038 ChosenOfEvil 16847387 16847388 ife_X2SelfConc1 **** **** **** **** **** 13 **** **** **** **** **** **** 1 **** **** 3843 **** **** **** **** **** **** **** **** **** **** **** **** **** **** FEAT_CHOSEN_OF_EVIL **** 0 **** **** **** **** **** 1 +24038 ChosenOfEvil 16847387 16847388 ife_chosen_evil **** **** **** **** **** 13 **** **** **** **** **** **** 1 **** **** 3843 **** **** **** **** **** **** **** **** **** **** **** **** **** **** FEAT_CHOSEN_OF_EVIL **** 0 **** **** **** **** **** 1 24039 FrozenBerserker 16847329 16847330 ife_X1ResCol **** **** **** **** **** **** **** **** 293 **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** FEAT_MAGICAL_ARTISAN_CRAFT_SKULL_TALISMAN **** 0 **** **** **** **** **** 1 24040 SpellFocusCold 16847325 16847326 ife_foc_spel **** **** **** **** **** **** **** **** **** **** 0 0 1 **** **** **** 24041 1 **** 3 **** **** **** **** **** **** **** **** **** **** FEAT_SPELL_FOCUS_COLD 4 **** **** **** **** **** 0 1 24041 GrSpellFocusCold 16847327 16847328 ife_X1GSFAbj **** **** **** **** **** **** **** **** 24040 **** 0 0 1 **** **** **** **** 0.5 **** 6 **** **** **** **** **** **** **** **** **** **** FEAT_GREATER_SPELL_FOCUS_COLD 4 **** **** **** **** **** 0 1 @@ -25901,53 +25901,53 @@ 25897 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25898 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25899 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25900 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25901 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25902 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25903 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25904 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25905 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25906 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25907 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25908 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25909 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25910 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25911 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25912 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25913 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25914 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25915 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25916 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25917 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25918 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25919 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25920 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25921 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25922 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25923 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25924 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25925 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25926 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25927 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25928 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25929 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25930 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25931 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25932 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25933 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25934 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25935 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25936 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25937 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25938 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25939 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25940 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25941 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25942 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25943 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25944 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25945 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25946 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +25900 "## START PRC8 HIDDEN TALENT FEATS ##" **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +25901 FEAT_HIDDEN_TALENT_BIOFEEDBACK 16990419 16823714 fot_protmagweap **** **** **** **** **** **** 11 **** **** **** 0 0 1 12 **** 14479 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_BIOFEEDBACK 6 0 **** **** 1 **** 0 0 +25902 FEAT_HIDDEN_TALENT_BITE_WOLF 16990420 16824105 fot_bitewolf **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14421 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_BITE_WOLF 6 0 **** **** 1 **** 0 0 +25903 FEAT_HIDDEN_TALENT_BOLT 16990421 16823684 fot_minorseq **** **** **** **** **** **** 11 **** **** **** 0 0 1 12 **** 14422 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_BOLT 6 0 **** **** 1 **** 0 0 +25904 FEAT_HIDDEN_TALENT_BURST 16990422 16823921 fot_exped **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14423 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_BURST 6 0 **** **** 1 **** 0 0 +25905 FEAT_HIDDEN_TALENT_CALLTOMIND 16990423 16823630 fot_knowalign **** **** **** **** **** **** 11 **** **** **** 0 0 1 **** **** 14424 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CALLTOMIND 6 0 **** **** 1 **** 0 0 +25906 FEAT_HIDDEN_TALENT_CALL_WEAPONRY 16990424 16824111 fot_seeksword **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14425 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CALL_WEAPONRY 6 0 **** **** 1 **** 0 0 +25907 FEAT_HIDDEN_TALENT_CHAMELEON 16990425 16823642 fot_chameleon **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14482 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CHAMELEON 6 0 **** **** 1 **** 0 0 +25908 FEAT_HIDDEN_TALENT_CLAWS_BEAST 16990426 16824107 fot_clawbeast **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14427 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CLAWS_BEAST 6 0 **** **** 1 **** 0 0 +25909 FEAT_HIDDEN_TALENT_COMPRESSION 16990427 16824120 fot_compress **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14428 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_COMPRESSION 6 0 **** **** 1 **** 0 0 +25910 FEAT_HIDDEN_TALENT_CONCEALTHOUGHT 16990428 16823759 fot_nondetect **** **** **** **** **** **** 11 **** **** **** 0 0 1 7 **** 14429 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CONCEALTHOUGHT 6 0 **** **** 1 **** 0 0 +25911 FEAT_HIDDEN_TALENT_CREATESOUND 16990429 16823869 fot_vocal **** **** **** **** **** **** 11 **** **** **** 0 0 1 11 **** 14431 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CREATESOUND 6 1 **** **** 1 **** 0 0 +25912 FEAT_HIDDEN_TALENT_CRYSTALSHARD 16990430 16823632 fot_icestorm **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14432 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_CRYSTALSHARD 6 1 **** **** 1 **** 0 0 +25913 FEAT_HIDDEN_TALENT_DAZE 16990431 16823650 fot_invisstalk **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14433 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DAZE 6 1 **** **** 1 **** 0 0 +25914 FEAT_HIDDEN_TALENT_DECELERATION 16990432 16823652 fot_Slow **** **** **** **** **** **** 11 **** **** **** 0 0 1 1 **** 14434 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DECELERATION 6 1 **** **** 1 **** 0 0 +25915 FEAT_HIDDEN_TALENT_DEFPRECOG 16990433 16823708 fot_shield **** **** **** **** **** **** 11 **** **** **** 0 0 1 13 **** 14435 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DEFPRECOG 6 0 **** **** 1 **** 0 0 +25916 FEAT_HIDDEN_TALENT_DEMORALIZE 16990434 16823686 fot_lowerres **** **** **** **** **** **** 11 **** **** **** 0 0 1 8 **** 14436 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DEMORALIZE 6 0 **** **** 1 **** 0 0 +25917 FEAT_HIDDEN_TALENT_DISABLE 16990435 16823688 fot_enfeeble **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14438 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DISABLE 6 1 **** **** 1 **** 0 0 +25918 FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH 16990436 16823656 fot_chilltouch **** **** **** **** **** **** 11 **** **** **** 0 0 1 3 **** 14439 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH 6 1 **** **** 1 **** 0 0 +25919 FEAT_HIDDEN_TALENT_DISTRACT 16990437 16823690 fot_powerblind **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14440 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_DISTRACT 6 1 **** **** 1 **** 0 0 +25920 FEAT_HIDDEN_TALENT_ELF_SIGHT 16990438 16823720 fot_infravis **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14370 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_ELF_SIGHT 6 0 **** **** 1 **** 0 0 +25921 FEAT_HIDDEN_TALENT_EMPATHY 16990439 16823761 fot_friends **** **** **** **** **** **** 11 **** **** **** 0 0 1 **** **** 14441 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_EMPATHY 6 0 **** **** 1 **** 0 0 +25922 FEAT_HIDDEN_TALENT_EMPTYMIND 16990440 16823692 fot_detillusion **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14442 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_EMPTYMIND 6 0 **** **** 1 **** 0 0 +25923 FEAT_HIDDEN_TALENT_ENERGYRAY 16990441 16823694 fot_flamearrow **** **** **** **** **** **** 11 **** **** **** 0 0 1 **** **** 14443 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_ENERGYRAY 6 1 **** **** 1 **** 0 0 +25924 FEAT_HIDDEN_TALENT_ENTANGLE 16990442 16823700 fot_entangle **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14448 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_ENTANGLE 6 1 **** **** 1 **** 0 0 +25925 FEAT_HIDDEN_TALENT_EXPANSION 16990443 16824128 fot_strength **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14449 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_EXPANSION 6 0 **** **** 1 **** 0 0 +25926 FEAT_HIDDEN_TALENT_FARHAND 16990444 16823763 fot_magicshort **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14450 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_FARHAND 6 0 **** **** 1 **** 0 0 +25927 FEAT_HIDDEN_TALENT_FORCESCREEN 16990445 16823658 fot_polyself **** **** **** **** **** **** 11 **** **** **** 0 0 1 13 **** 14451 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_FORCESCREEN 6 0 **** **** 1 **** 0 0 +25928 FEAT_HIDDEN_TALENT_GREASE 16990446 16823702 fot_Grease **** **** **** **** **** **** 11 **** **** **** 0 0 1 11 **** 14452 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_GREASE 6 1 **** **** 1 **** 0 0 +25929 FEAT_HIDDEN_TALENT_HAMMER 16990447 16823704 fot_hammer **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14453 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_HAMMER 6 1 **** **** 1 **** 0 0 +25930 FEAT_HIDDEN_TALENT_INERTIALARMOUR 16990448 16823660 fot_armor **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14454 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_INERTIALARMOUR 6 0 **** **** 1 **** 0 0 +25931 FEAT_HIDDEN_TALENT_MATTERAGITATION 16990449 16823765 fot_elementfire **** **** **** **** **** **** 11 **** **** **** 0 0 1 3 **** 14455 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_MATTERAGITATION 6 1 **** **** 1 **** 0 0 +25932 FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW 16990450 16824134 fot_metaclaw **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14456 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW 6 0 **** **** 1 **** 0 0 +25933 FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON 16990451 16824136 fot_protnormal **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14457 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON 6 0 **** **** 1 **** 0 0 +25934 FEAT_HIDDEN_TALENT_MINDTHRUST 16990452 16823615 fot_skulltrap **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14458 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_MINDTHRUST 6 1 **** **** 1 **** 0 0 +25935 FEAT_HIDDEN_TALENT_MYLIGHT 16990453 16823706 fot_dawn **** **** **** **** **** **** 11 **** **** **** 0 0 1 **** **** 14459 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_MYLIGHT 6 0 **** **** 1 **** 0 0 +25936 FEAT_HIDDEN_TALENT_OFFPRECOG 16990454 16823710 fot_snare **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14460 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_OFFPRECOG 6 0 **** **** 1 **** 0 0 +25937 FEAT_HIDDEN_TALENT_OFFPRESC 16990455 16823712 fot_sols **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14461 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_OFFPRESC 6 0 **** **** 1 **** 0 0 +25938 FEAT_HIDDEN_TALENT_PREVENOM 16990456 16824142 fot_grmalison **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14468 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_PREVENOM 6 0 **** **** 1 **** 0 0 +25939 FEAT_HIDDEN_TALENT_PREVENOM_WEAPON 16990457 16824144 fot_prevnmw **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14469 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_PREVENOM_WEAPON 6 0 **** **** 1 **** 0 0 +25940 FEAT_HIDDEN_TALENT_SKATE 16990458 16823767 fot_haste **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 14470 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_SKATE 6 0 **** **** 1 **** 0 0 +25941 FEAT_HIDDEN_TALENT_STOMP 16990459 16823682 fot_stomp **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14471 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_STOMP 6 1 **** **** 1 **** 0 0 +25942 FEAT_HIDDEN_TALENT_SYNESTHETE 16990460 16823755 fot_physmirror **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14472 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_SYNESTHETE 6 0 **** **** 1 **** 0 0 +25943 FEAT_HIDDEN_TALENT_TELEMPATHICPRO 16990461 16823769 fot_charmanim **** **** **** **** **** **** 11 **** **** **** 0 0 1 2 **** 14473 **** **** **** 120 0 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_TELEMPATHICPRO 6 0 **** **** 1 **** 0 0 +25944 FEAT_HIDDEN_TALENT_THICKSKIN 16990462 16823670 fot_barkskin **** **** **** **** **** **** 11 **** **** **** 0 0 1 13 **** 14474 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_THICKSKIN 6 0 **** **** 1 **** 0 0 +25945 FEAT_HIDDEN_TALENT_VIGOR 16990463 16823672 fot_horror **** **** **** **** **** **** 11 **** **** **** 0 0 1 9 **** 14475 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_VIGOR 6 0 **** **** 1 **** 0 0 +25946 FEAT_HIDDEN_TALENT_GRIP_IRON 16990464 16790301 fot_metaclaw **** **** **** **** **** **** 11 **** **** **** 0 0 1 10 **** 15686 **** **** **** 120 1 **** **** **** **** **** **** **** **** **** FEAT_HIDDEN_TALENT_GRIP_IRON 6 0 **** **** 1 **** 0 0 25947 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25948 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25949 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** @@ -25998,8 +25998,15 @@ 25994 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25995 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 25996 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -25997 FEAT_CHARMING_THE_ARROW 16990312 16990313 if_charm_arrow **** **** **** **** **** **** **** **** **** **** 0 0 1 **** **** **** **** 1 **** **** **** 3239 4718 **** **** **** **** **** **** **** FEAT_CHARMING_THE_ARROW 6 0 **** **** **** **** 0 0 -25998 FEAT_MARTIAL_STALKER 16990314 16990315 IR_NINJA **** **** **** **** **** **** **** **** 2488 45 0 0 1 **** **** **** **** 0.5 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_MARTIAL_STALKER 5 0 **** **** **** **** 0 0 -25999 "#BEGIN PRC8 WOL RESERVE#" **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -26000 Bullybasher_GiantBearing 16977316 16977317 is_giantbearing **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 16553 **** 0.5 **** **** 1 **** **** **** **** **** **** **** **** **** WOL_BULLY_GIANT 6 0 **** **** **** **** 0 0 -26001 FEAT_VOWOFPOVERTY 16977318 16977319 ife_sacredvow **** **** **** **** **** **** **** **** **** **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOWOFPOVERTY 6 **** **** **** **** **** 0 0 +25997 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +25998 FEAT_CHARMING_THE_ARROW 16990312 16990313 if_charm_arrow **** **** **** **** **** **** **** **** **** **** 0 0 1 **** **** **** **** 1 **** **** **** 3239 4718 **** **** **** **** **** **** **** FEAT_CHARMING_THE_ARROW 6 0 **** **** **** **** 0 0 +25999 FEAT_MARTIAL_STALKER 16990314 16990315 IR_NINJA **** **** **** **** **** **** **** **** 2488 45 0 0 1 **** **** **** **** 0.5 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_MARTIAL_STALKER 5 0 **** **** **** **** 0 0 +26000 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +26001 Bullybasher_GiantBearing 16977316 16977317 is_giantbearing **** **** **** **** **** **** **** **** **** **** 0 0 0 **** **** 16553 **** 0.5 **** **** 1 **** **** **** **** **** **** **** **** **** WOL_BULLY_GIANT 6 0 **** **** **** **** 0 0 +26002 FEAT_VOWOFPOVERTY 16977318 16977319 ife_sacredvow **** **** **** **** **** **** **** **** 3388 **** 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOWOFPOVERTY 6 **** **** **** **** **** 0 0 +26003 FEAT_SANCTIFYKISTRIKE 16990535 16990536 ife_kistrike **** **** **** **** **** **** 15 **** 21 213 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_SANCTIFYKISTRIKE 6 **** **** **** **** **** 0 0 +26004 FEAT_HOLYKISTRIKE 16990537 16990538 ife_kistrike **** **** **** **** **** **** 15 **** 21 26002 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_HOLYKISTRIKE 6 **** **** **** **** **** 0 0 +26005 FEAT_FISTOFHEAVENS 16990539 16990540 ife_kistrike **** **** **** **** 15 **** **** **** 21 26002 0 0 1 **** **** **** **** 1 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_FISTOFHEAVENS 6 **** **** **** **** **** 0 0 +26006 FEAT_VOWABSTINENCE 16990541 16990542 ife_sacredvow **** **** **** **** **** **** **** **** 3388 **** 0 0 1 **** **** **** **** 0.5 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOWABSTINENCE 6 **** **** **** **** **** 0 0 +26007 FEAT_VOWCHASTITY 16990543 16990544 ife_sacredvow **** **** **** **** **** **** **** **** 3388 **** 0 0 1 **** **** **** **** 0.5 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_VOWCHASTITY 6 **** **** **** **** **** 0 0 +26008 FEAT_GIFTOFFAITH 16990545 16990546 ife_sacredvow **** **** **** **** 13 **** **** **** **** **** 0 0 1 **** **** **** **** 0.5 **** **** **** **** **** **** **** **** **** **** **** **** FEAT_GIFTOFFAITH 6 **** **** **** **** **** 0 0 diff --git a/nwn/nwnprc/trunk/2das/iprp_feats.2DA b/nwn/nwnprc/trunk/2das/iprp_feats.2DA index a5e62688..0b09ec2a 100644 --- a/nwn/nwnprc/trunk/2das/iprp_feats.2DA +++ b/nwn/nwnprc/trunk/2das/iprp_feats.2DA @@ -585,11 +585,11 @@ 581 16828014 DaylightAdaptation 0.01 4592 582 16835930 ACP_HEAVY_FEAT 0.01 3480 583 16835931 ACP_UNARMED_FEAT 0.01 3481 -584 **** ReservedForISCAndESS **** **** -585 **** ReservedForISCAndESS **** **** -586 **** ReservedForISCAndESS **** **** -587 **** ReservedForISCAndESS **** **** -588 **** ReservedForISCAndESS **** **** +584 16823582 FEAT_AUGMENT_PSIONICS_QUICKSELECTS 0.01 3550 +585 16823584 FEAT_AUGMENT_PSIONICS_DIGITS_0_4 0.01 3551 +586 16823585 FEAT_AUGMENT_PSIONICS_DIGITS_5_9 0.01 3552 +587 16823586 FEAT_AUGMENT_PSIONICS_TENS 0.01 3553 +588 16823582 FEAT_AUGMENT_QUICKSELECTS_2 0.01 3563 589 **** ReservedForISCAndESS **** **** 590 **** ReservedForISCAndESS **** **** 591 **** ReservedForISCAndESS **** **** diff --git a/nwn/nwnprc/trunk/2das/masterfeats.2da b/nwn/nwnprc/trunk/2das/masterfeats.2da index 803271ec..a17f17a7 100644 --- a/nwn/nwnprc/trunk/2das/masterfeats.2da +++ b/nwn/nwnprc/trunk/2das/masterfeats.2da @@ -1,118 +1,129 @@ 2DA V2.0 - LABEL STRREF DESCRIPTION ICON -0 ImprovedCritical 6489 228 ife_impcrit -1 WeaponFocus 6490 436 ife_wepfoc -2 WeaponSpecialization 6491 444 ife_wepspec -3 SpellFocus 6492 426 ife_magic -4 SkillFocus 6493 424 ife_skfoc -5 FavoredEnemy 6566 6079 ife_racehate -6 GreaterSpellFocus 2838 2791 ife_magic -7 ArcaneDefense 2839 2823 ife_magic -8 ResistEnergy 2840 2835 ife_magic -9 WeaponOfChoice 83313 8728 ife_X2WpCh -10 EpicWeaponFocus 83475 8415 ife_X2EWpFo -11 EpicWeaponSpec 83481 8456 ife_X2WpSpec -12 OverwhelmingCritical 83480 8524 ife_X2OvCrit -13 DevastatingCrit 83482 3909 ife_X2DevCrit -14 EpicSpell 83483 83484 ife_X2ESpell -15 EpicSkillFocus 83485 4063 ife_X2skfoc -16 EpicSpellFocus 83486 4084 ife_X2magic -17 EpicEnergyResistance 83487 83488 ife_X2EResi -18 **** **** **** **** -19 **** **** **** **** -20 **** **** **** **** -21 **** **** **** **** -22 **** **** **** **** -23 **** **** **** **** -24 **** **** **** **** -25 **** **** **** **** -26 **** **** **** **** -27 **** **** **** **** -28 **** **** **** **** -29 **** **** **** **** -30 **** **** **** **** -31 **** **** **** **** -32 **** **** **** **** -33 **** **** **** **** -34 **** **** **** **** -35 **** **** **** **** -36 **** **** **** **** -37 **** **** **** **** -38 **** **** **** **** -39 **** **** **** **** -40 **** **** **** **** -41 **** **** **** **** -42 **** **** **** **** -43 **** **** **** **** -44 **** **** **** **** -45 **** **** **** **** -46 **** **** **** **** -47 **** **** **** **** -48 **** **** **** **** -49 **** **** **** **** -50 SpellLikeAbility 16822760 16822761 ife_X2ESpell -51 **** **** **** **** -52 BindingFeats 16835231 16835232 fot_oracle -53 IncarnumFeats 16838110 16838111 ife_psi_focus -54 ShadowcastingFeats 16836244 16836245 ife_X1SDaze -55 HatedFoe 16824268 16824269 ife_racehate -56 Gather_Horde 16824322 16824323 ife_unseenwander -57 Gather_Horde 16824324 16824325 ife_unseenwander -58 Summon_Demon 16824528 16824529 ife_alertness -59 DragonHeritage 16832504 16832505 ife_drag_group -60 DraconicFeats 16832502 16832503 ife_drag_group -61 Psionic_Breath 16832466 16832467 ife_X2DDBreath -62 Dragonwrought 16832408 16832409 ife_drag_group -63 DragonBlood 16832131 16832132 ife_DDHDincrease -64 Minor_Aura 16828301 16828302 ife_lliiraaura -65 Major_Aura 16828303 16828304 ife_lliiraaura -66 Dragon_Affinity 16832585 16832586 ife_drag_group -67 Draconic_Surge_Phys 16832587 16832588 ife_drag_group -68 Draconic_Surge_Mental 16832589 16832590 ife_drag_group -69 ToT_Immunities 16832661 16832662 dradis_immune -70 TattooFocus 16822436 16822437 rw_scribetatoo -71 Dragon_Shaman_Auras 16832707 16832708 ife_lliiraaura -72 Totem_Dragons 16832709 16832710 dradis_gen -73 Bonus_Draconic_Auras 16832802 16832832 ife_lliiraaura -74 Major_Aura_Draconic 16832818 16832819 ife_lliiraaura -75 MetabreathFeats 16832867 16832868 ife_X2DDBreath -76 BreathChanneling 16832869 16832870 ife_DDHDincrease -77 BreathEffects 16832922 16832923 ife_X2DDBreath -78 BladeMeditation 16827008 16827009 ife_X2EpWM -79 WarforgedArmor 16828215 16828216 ife_armor_h -80 PsionicFeats 16822911 16822912 ife_psifeats -81 MetaPsionicFeats 16822913 16822914 ife_metapsifeat -82 AntiPsionicFeats 16826474 16826475 ife_antipsifeats -83 DragonAugment 16832444 16832445 dradis_gen -84 ShifterFeats 16828112 16828113 ife_X2OutShape -85 PnP_Weapon_Prof_Simp 16834217 16834260 ife_weppro_sim -86 PnP_Weapon_Prof_Mart 16834218 16834261 ife_weppro_mar -87 PnP_Weapon_Prof_Exot 16834219 16834262 ife_weppro_ex -88 UFavoredEnemy 16825439 6079 ife_racehate -89 VileMartial 16825479 16825480 ife_combat -90 FocusedSpellPenetr 16825325 16825324 ife_magic -91 BondedSummoner 16826038 16826039 ife_mastelem -92 ElementalConflag 16823300 16823301 ife_mastelem -93 SanctifyMartial 16823244 16823245 ife_combat -94 WeaponChoiceTempus 16822944 16822945 ife_X2WpCh -95 Evilbrand 16822849 16822850 ife_X2BoneSk1 -96 Aberrant 16790214 16790215 ife_dfrm_gaunt -97 **** **** **** **** -98 **** **** **** **** -99 **** **** **** **** -100 **** **** **** **** -101 MinorOozyTouch 16825040 16825041 is_ghoultch -102 MajorOozyTouch 16825050 16825051 is_ghoultch -103 ToBFeats 16836033 16836034 im_MithTornado -104 BaneMagic 16793665 16793666 ife_banemagic -105 MinstrelSongTier1 16823496 16823497 ife_minstrel -106 FavoredDivSong1 16823500 16823505 ife_fom -107 FavoredDivSong2 16823501 16823505 ife_fom -108 FavoredDivSong3 16823502 16823505 ife_fom -109 FavoredDivSong4 16823503 16823505 ife_fom -110 FavoredDivSong5 16823504 16823505 ife_fom -111 BonusDomains 16827845 16827846 rw_specialistdef -112 FocusedLexicon 16827469 16827468 ife_racehate -113 UtteranceFocus 16827483 16827482 ife_foc_spel -114 ReserveFeats 16852238 16852239 ife_foc_spel + LABEL STRREF DESCRIPTION ICON +0 ImprovedCritical 6489 228 ife_impcrit +1 WeaponFocus 6490 436 ife_wepfoc +2 WeaponSpecialization 6491 444 ife_wepspec +3 SpellFocus 6492 426 ife_magic +4 SkillFocus 6493 424 ife_skfoc +5 FavoredEnemy 6566 6079 ife_racehate +6 GreaterSpellFocus 2838 2791 ife_magic +7 ArcaneDefense 2839 2823 ife_magic +8 ResistEnergy 2840 2835 ife_magic +9 WeaponOfChoice 83313 8728 ife_X2WpCh +10 EpicWeaponFocus 83475 8415 ife_X2EWpFo +11 EpicWeaponSpec 83481 8456 ife_X2WpSpec +12 OverwhelmingCritical 83480 8524 ife_X2OvCrit +13 DevastatingCrit 83482 3909 ife_X2DevCrit +14 EpicSpell 83483 83484 ife_X2ESpell +15 EpicSkillFocus 83485 4063 ife_X2skfoc +16 EpicSpellFocus 83486 4084 ife_X2magic +17 EpicEnergyResistance 83487 83488 ife_X2EResi +18 **** **** **** **** +19 **** **** **** **** +20 **** **** **** **** +21 **** **** **** **** +22 **** **** **** **** +23 **** **** **** **** +24 **** **** **** **** +25 **** **** **** **** +26 **** **** **** **** +27 **** **** **** **** +28 **** **** **** **** +29 **** **** **** **** +30 **** **** **** **** +31 **** **** **** **** +32 **** **** **** **** +33 **** **** **** **** +34 **** **** **** **** +35 **** **** **** **** +36 **** **** **** **** +37 **** **** **** **** +38 **** **** **** **** +39 **** **** **** **** +40 **** **** **** **** +41 **** **** **** **** +42 **** **** **** **** +43 **** **** **** **** +44 **** **** **** **** +45 **** **** **** **** +46 **** **** **** **** +47 **** **** **** **** +48 **** **** **** **** +49 **** **** **** **** +50 SpellLikeAbility 16822760 16822761 ife_X2ESpell +51 **** **** **** **** +52 BindingFeats 16835231 16835232 fot_oracle +53 IncarnumFeats 16838110 16838111 ife_psi_focus +54 ShadowcastingFeats 16836244 16836245 ife_X1SDaze +55 HatedFoe 16824268 16824269 ife_racehate +56 Gather_Horde 16824322 16824323 ife_unseenwander +57 Gather_Horde 16824324 16824325 ife_unseenwander +58 Summon_Demon 16824528 16824529 ife_alertness +59 DragonHeritage 16832504 16832505 ife_drag_group +60 DraconicFeats 16832502 16832503 ife_drag_group +61 Psionic_Breath 16832466 16832467 ife_X2DDBreath +62 Dragonwrought 16832408 16832409 ife_drag_group +63 DragonBlood 16832131 16832132 ife_DDHDincrease +64 Minor_Aura 16828301 16828302 ife_lliiraaura +65 Major_Aura 16828303 16828304 ife_lliiraaura +66 Dragon_Affinity 16832585 16832586 ife_drag_group +67 Draconic_Surge_Phys 16832587 16832588 ife_drag_group +68 Draconic_Surge_Mental 16832589 16832590 ife_drag_group +69 ToT_Immunities 16832661 16832662 dradis_immune +70 TattooFocus 16822436 16822437 rw_scribetatoo +71 Dragon_Shaman_Auras 16832707 16832708 ife_lliiraaura +72 Totem_Dragons 16832709 16832710 dradis_gen +73 Bonus_Draconic_Auras 16832802 16832832 ife_lliiraaura +74 Major_Aura_Draconic 16832818 16832819 ife_lliiraaura +75 MetabreathFeats 16832867 16832868 ife_X2DDBreath +76 BreathChanneling 16832869 16832870 ife_DDHDincrease +77 BreathEffects 16832922 16832923 ife_X2DDBreath +78 BladeMeditation 16827008 16827009 ife_X2EpWM +79 WarforgedArmor 16828215 16828216 ife_armor_h +80 PsionicFeats 16822911 16822912 ife_psifeats +81 MetaPsionicFeats 16822913 16822914 ife_metapsifeat +82 AntiPsionicFeats 16826474 16826475 ife_antipsifeats +83 DragonAugment 16832444 16832445 dradis_gen +84 ShifterFeats 16828112 16828113 ife_X2OutShape +85 PnP_Weapon_Prof_Simp 16834217 16834260 ife_weppro_sim +86 PnP_Weapon_Prof_Mart 16834218 16834261 ife_weppro_mar +87 PnP_Weapon_Prof_Exot 16834219 16834262 ife_weppro_ex +88 UFavoredEnemy 16825439 6079 ife_racehate +89 VileMartial 16825479 16825480 ife_combat +90 FocusedSpellPenetr 16825325 16825324 ife_magic +91 BondedSummoner 16826038 16826039 ife_mastelem +92 ElementalConflag 16823300 16823301 ife_mastelem +93 SanctifyMartial 16823244 16823245 ife_combat +94 WeaponChoiceTempus 16822944 16822945 ife_X2WpCh +95 Evilbrand 16822849 16822850 ife_X2BoneSk1 +96 Aberrant 16790214 16790215 ife_dfrm_gaunt +97 **** **** **** **** +98 **** **** **** **** +99 **** **** **** **** +100 **** **** **** **** +101 MinorOozyTouch 16825040 16825041 is_ghoultch +102 MajorOozyTouch 16825050 16825051 is_ghoultch +103 ToBFeats 16836033 16836034 im_MithTornado +104 BaneMagic 16793665 16793666 ife_banemagic +105 MinstrelSongTier1 16823496 16823497 ife_minstrel +106 FavoredDivSong1 16823500 16823505 ife_fom +107 FavoredDivSong2 16823501 16823505 ife_fom +108 FavoredDivSong3 16823502 16823505 ife_fom +109 FavoredDivSong4 16823503 16823505 ife_fom +110 FavoredDivSong5 16823504 16823505 ife_fom +111 BonusDomains 16827845 16827846 rw_specialistdef +112 FocusedLexicon 16827469 16827468 ife_racehate +113 UtteranceFocus 16827483 16827482 ife_foc_spel +114 ReserveFeats 16852238 16852239 ife_foc_spel +115 **** **** **** **** +116 **** **** **** **** +117 **** **** **** **** +118 **** **** **** **** +119 **** **** **** **** +120 **** **** **** **** +121 **** **** **** **** +122 **** **** **** **** +123 **** **** **** **** +124 **** **** **** **** +125 **** **** **** **** diff --git a/nwn/nwnprc/trunk/2das/prc_vop_feats.2da b/nwn/nwnprc/trunk/2das/prc_vop_feats.2da new file mode 100644 index 00000000..65f9fa3f --- /dev/null +++ b/nwn/nwnprc/trunk/2das/prc_vop_feats.2da @@ -0,0 +1,30 @@ +2DA V2.0 + + Label Name FeatIndex PreReq1 PreReq2 Con Wis Cha BAB Law +0 FEAT_EXALTED_COMPANION "Exalted Companion" 4199 199 **** **** **** **** **** **** +1 FEAT_EXALTED_TURNING "Exalted Turning" 3168 294 **** **** **** **** **** **** +2 FEAT_FISTOFHEAVENS "Fist of Heavens" 26004 213 26002 **** 15 **** **** **** +3 FEAT_GIFTOFFAITH "Gift of Faith" 26007 **** **** **** 13 **** **** **** +4 FEAT_HOLYKISTRIKE "Holy Ki Strike" 26003 213 26002 **** **** 15 **** **** +5 FEAT_HOLYRADIANCE "Holy Radiance" 3164 3165 **** **** **** 15 **** **** +6 FEAT_INTUITIVE_ATTACK "Intuitive Attack" 3166 **** **** **** **** **** 1 **** +7 FEAT_NIMBUSLIGHT "Nimbus of Light" 3165 **** **** **** **** **** 1 **** +8 FEAT_SANCTIFYKISTRIKE "Sanctify Ki Strike" 26002 213 **** **** **** 15 **** **** +9 FEAT_SANCTIFY_MARTIAL_CLUB "Sanctify Martial Strike (Club)" 3194 43 **** **** **** 15 **** **** +10 FEAT_SANCTIFY_MARTIAL_DAGGER "Sanctify Martial Strike (Dagger)" 3195 90 **** **** **** 15 **** **** +11 FEAT_SANCTIFY_MARTIAL_DART "Sanctify Martial Strike (Dard)" 3227 91 **** **** **** 15 **** **** +12 FEAT_SANCTIFY_MARTIAL_HEAVYCROSSBOW "Sanctify Martial Strike (Heavy Crossbow)" 3221 92 **** **** **** 15 **** **** +13 FEAT_SANCTIFY_MARTIAL_LIGHTCROSSBOW "Sanctify Martial Strike (Light Crossbow)" 3222 93 **** **** **** 15 **** **** +14 FEAT_SANCTIFY_MARTIAL_LIGHTMACE "Sanctify Martial Strike (Light Mace)" 3196 94 **** **** **** 15 **** **** +15 FEAT_SANCTIFY_MARTIAL_MORNINGSTAR "Sanctify Martial Strike (Moningstar)" 3197 95 **** **** **** 15 **** **** +16 FEAT_SANCTIFY_MARTIAL_QUARTERSTAFF "Sanctify Martial Strike (Quarterstaff)" 3198 96 **** **** **** 15 **** **** +17 FEAT_SANCTIFY_MARTIAL_SICKLE "Sanctify Martial Strike (Sickle)" 3169 98 **** **** **** 15 **** **** +18 FEAT_SANCTIFY_MARTIAL_SLING "Sanctify Martial Strike (Sling)" 3223 99 **** **** **** 15 **** **** +19 FEAT_SANCTIFY_MARTIAL_SHORTSPEAR "Sanctify Martial Strike (Spear)" 3199 97 **** **** **** 15 **** **** +20 FEAT_SERVHEAVEN "Servant of the Heavens" 3355 **** **** **** **** **** **** **** +21 FEAT_STIGMATA Stigmata 3163 3165 **** **** **** **** **** **** +22 FEAT_RAVAGEGOLDENICE "Touch of Golden Ice" 3162 **** **** 13 **** **** **** **** +23 FEAT_VOWABSTINENCE "Vow of Abstinence" 26005 **** **** **** **** **** **** **** +24 FEAT_VOWCHASTITY "Vow of Chastity" 26006 **** **** **** **** **** **** **** +25 FEAT_VOW_OBED "Vow of Obedience" 3389 **** **** **** **** **** **** 1 +26 FEAT_VOW_PURITY "Vow of Purity" 5360 **** **** **** **** **** **** **** diff --git a/nwn/nwnprc/trunk/2das/ruleset.2da b/nwn/nwnprc/trunk/2das/ruleset.2da index 57865888..1b6be16f 100644 --- a/nwn/nwnprc/trunk/2das/ruleset.2da +++ b/nwn/nwnprc/trunk/2das/ruleset.2da @@ -29,7 +29,7 @@ 25 STUNNING_FIST_BASE_SAVE_DC 10 26 CRIPPLING_STRIKE_STRENGTH_MODIFIER 2 27 **** **** -28 PARRY_RIPOSTE_DIFFERENCE 99 +28 PARRY_RIPOSTE_DIFFERENCE 99 29 TAUNT_EFFECT_DURATION 30.0f 30 TAUNT_ARCANE_SPELL_FAILURE 30 31 TAUNT_MAX_MODIFIER 6 @@ -145,7 +145,7 @@ 141 STILL_MIND_COMPETANCE_BONUS 2 142 FEARLESS_MORALE_BONUS 2 143 RANGED_ATTACK_IN_MELEE_RANGE 4 -144 POINT_BLANK_SHOT_MAX_RANGE 5.0f +144 POINT_BLANK_SHOT_MAX_RANGE 9.144f 145 POINT_BLANK_SHOT_ATTACK_BONUS 1 146 POINT_BLANK_SHOT_DAMAGE_BONUS 1 147 MOBILITY_DODGE_BONUS 4 @@ -193,14 +193,14 @@ 189 RESIST_DISEASE_BONUS 4 190 FIRING_INTO_MELEE_MODIFIER -4 191 RESISTANCE_TO_ENERGY 5 -192 TUMBLE_NUM_RANKS_PER_AC_BONUS 5 +192 TUMBLE_NUM_RANKS_PER_AC_BONUS 0 193 DIRTY_FIGHTING_NUM_ATTACKS_PER_ROUND 1 194 DENEIRS_EYE_SAVE_BONUS 2 195 LLIIRAS_HEART_SAVE_BONUS 2 196 EXTRA_SMITING_BONUS_USES 2 -197 SPELLCRAFT_NUM_RANKS_PER_SAVE_BONUS 5 +197 SPELLCRAFT_NUM_RANKS_PER_SAVE_BONUS 0 198 **** **** -199 MAX_AC_DODGE_MOD 20 +199 MAX_AC_DODGE_MOD 30 200 **** **** 201 PRESTIGE_ENCHANT_ARROW_1_BONUS 1 202 PRESTIGE_ENCHANT_ARROW_2_BONUS 2 diff --git a/nwn/nwnprc/trunk/2das/skills.2da b/nwn/nwnprc/trunk/2das/skills.2da index ebd924bb..d03fa30c 100644 --- a/nwn/nwnprc/trunk/2das/skills.2da +++ b/nwn/nwnprc/trunk/2das/skills.2da @@ -1,42 +1,42 @@ 2DA V2.0 - Label Name Description Icon Untrained KeyAbility ArmorCheckPenalty AllClassesCanUse Category MaxCR Constant HostileSkill -0 AnimalEmpathy 269 344 isk_aniemp 0 CHA 0 0 **** 1 SKILL_ANIMAL_EMPATHY 1 -1 Concentration 270 345 isk_concen 1 CON 0 1 **** **** SKILL_CONCENTRATION 0 -2 DisableTrap 271 346 isk_distrap 0 INT 0 1 **** **** SKILL_DISABLE_TRAP 0 -3 Discipline 343 347 isk_discipline 1 STR 0 1 **** **** SKILL_DISCIPLINE 0 -4 Heal 273 349 isk_heal 1 WIS 0 1 **** 1 SKILL_HEAL 0 -5 Hide 274 350 isk_hide 1 DEX 1 1 **** **** SKILL_HIDE 0 -6 Listen 275 351 isk_listen 1 WIS 0 1 **** **** SKILL_LISTEN 0 -7 Lore 276 352 isk_lore 1 INT 0 1 **** **** SKILL_LORE 0 -8 MoveSilently 277 353 isk_movsilent 1 DEX 1 1 **** **** SKILL_MOVE_SILENTLY 0 -9 OpenLock 278 354 isk_olock 0 DEX 0 1 **** **** SKILL_OPEN_LOCK 0 -10 Parry 279 355 isk_parry 0 DEX 1 0 **** 1 SKILL_PARRY 0 -11 Perform 280 356 isk_perform 1 CHA 0 1 **** **** SKILL_PERFORM 0 -12 Persuade 281 357 isk_persuade 1 CHA 0 1 **** **** SKILL_PERSUADE 0 -13 PickPocket 282 358 isk_pocket 0 DEX 1 1 **** **** SKILL_PICK_POCKET 1 -14 Search 284 360 isk_search 1 INT 0 1 **** **** SKILL_SEARCH 0 -15 SetTrap 285 361 isk_settrap 0 DEX 1 1 **** **** SKILL_SET_TRAP 0 -16 Spellcraft 286 362 isk_spellcraft 0 INT 0 1 **** **** SKILL_SPELLCRAFT 0 -17 Spot 287 364 isk_spot 1 WIS 0 1 **** **** SKILL_SPOT 0 -18 Taunt 342 366 isk_taunt 0 CHA 0 0 **** 1 SKILL_TAUNT 1 -19 UseMagicDevice 288 367 isk_magicdev 0 CHA 0 1 **** **** SKILL_USE_MAGIC_DEVICE 0 -20 Appraise 2693 2694 ife_X1App 1 INT 0 1 **** **** SKILL_APPRAISE 0 -21 Tumble 2695 2696 ife_X1Tum 0 DEX 1 1 **** **** SKILL_TUMBLE 0 -22 CraftTrap 2697 2698 ife_X1CrTrap 1 INT 0 1 **** **** SKILL_CRAFT_TRAP 0 -23 Bluff 8746 8757 isk_X2bluff 1 CHA 0 1 **** **** SKILL_BLUFF 0 -24 Intimidate 8756 8786 isk_X2Inti 1 CHA 0 1 **** **** SKILL_INTIMIDATE 0 -25 CraftArmor 8787 8788 isk_X2CArm 1 INT 0 1 **** **** SKILL_CRAFT_ARMOR 0 -26 CraftWeapon 8789 8790 isk_X2CWeap 1 INT 0 1 **** **** SKILL_CRAFT_WEAPON 0 -27 Ride 111889 111890 isk_x3_ride 1 DEX 0 1 **** **** SKILL_RIDE 0 -28 Jump 16826011 16826012 isk_jump 1 STR 1 1 **** **** SKILL_JUMP 0 -29 Truespeak 16828470 16828471 isk_truespeak 0 INT 0 1 **** **** SKILL_TRUESPEAK 0 -30 Sense_Motive 16829311 16829312 isk_sensemtv 1 WIS 0 1 **** **** SKILL_SENSE_MOTIVE 0 -31 Martial_Lore 16829313 16829314 isk_martlore 0 INT 0 0 **** **** SKILL_MARTIAL_LORE 0 -32 Balance 16829376 16829377 isk_balance 1 DEX 1 1 **** **** SKILL_BALANCE 0 -33 IaijutsuFocus 16826112 16826113 isk_iaijutsu 0 CHA 0 1 **** **** SKILL_IAIJUTSU_FOCUS 0 -34 CraftAlchemy 16847237 16847238 isk_alchemy 1 INT 0 1 **** **** SKILL_CRAFT_ALCHEMY 0 -35 CraftPoison 16832401 16832402 isk_poison 1 INT 0 1 **** **** SKILL_CRAFT_POISON 0 -36 Psicraft 16832210 16832211 isk_spellcraft 0 INT 0 0 **** **** SKILL_PSICRAFT 0 -37 Climb 16847418 16847419 isk_climb 1 STR 1 1 **** **** SKILL_CLIMB 0 -38 CraftGeneral 16832369 16832370 isk_X2CArm 1 INT 0 1 **** **** SKILL_CRAFT_GENERAL 0 + Label Name Description Icon Untrained KeyAbility ArmorCheckPenalty AllClassesCanUse Category MaxCR Constant HostileSkill HideFromLevelUp +0 AnimalEmpathy 269 344 isk_aniemp 0 CHA 0 0 **** 1 SKILL_ANIMAL_EMPATHY 1 0 +1 Concentration 270 345 isk_concen 1 CON 0 1 **** **** SKILL_CONCENTRATION 0 0 +2 DisableTrap 271 346 isk_distrap 0 INT 0 1 **** **** SKILL_DISABLE_TRAP 0 0 +3 Discipline 343 347 isk_discipline 1 STR 0 1 **** **** SKILL_DISCIPLINE 0 0 +4 Heal 273 349 isk_heal 1 WIS 0 1 **** 1 SKILL_HEAL 0 0 +5 Hide 274 350 isk_hide 1 DEX 1 1 **** **** SKILL_HIDE 0 0 +6 Listen 275 351 isk_listen 1 WIS 0 1 **** **** SKILL_LISTEN 0 0 +7 Lore 276 352 isk_lore 1 INT 0 1 **** **** SKILL_LORE 0 0 +8 MoveSilently 277 353 isk_movsilent 1 DEX 1 1 **** **** SKILL_MOVE_SILENTLY 0 0 +9 OpenLock 278 354 isk_olock 0 DEX 0 1 **** **** SKILL_OPEN_LOCK 0 0 +10 Parry 279 355 isk_parry 0 DEX 1 0 **** 1 SKILL_PARRY 0 1 +11 Perform 280 356 isk_perform 1 CHA 0 1 **** **** SKILL_PERFORM 0 0 +12 Persuade 281 357 isk_persuade 1 CHA 0 1 **** **** SKILL_PERSUADE 0 0 +13 PickPocket 282 358 isk_pocket 0 DEX 1 1 **** **** SKILL_PICK_POCKET 1 0 +14 Search 284 360 isk_search 1 INT 0 1 **** **** SKILL_SEARCH 0 0 +15 SetTrap 285 361 isk_settrap 0 DEX 1 1 **** **** SKILL_SET_TRAP 0 0 +16 Spellcraft 286 362 isk_spellcraft 0 INT 0 1 **** **** SKILL_SPELLCRAFT 0 0 +17 Spot 287 364 isk_spot 1 WIS 0 1 **** **** SKILL_SPOT 0 0 +18 Taunt 342 366 isk_taunt 0 CHA 0 0 **** 1 SKILL_TAUNT 1 1 +19 UseMagicDevice 288 367 isk_magicdev 0 CHA 0 1 **** **** SKILL_USE_MAGIC_DEVICE 0 0 +20 Appraise 2693 2694 ife_X1App 1 INT 0 1 **** **** SKILL_APPRAISE 0 0 +21 Tumble 2695 2696 ife_X1Tum 0 DEX 1 1 **** **** SKILL_TUMBLE 0 0 +22 CraftTrap 2697 2698 ife_X1CrTrap 1 INT 0 1 **** **** SKILL_CRAFT_TRAP 0 0 +23 Bluff 8746 8757 isk_X2bluff 1 CHA 0 1 **** **** SKILL_BLUFF 0 0 +24 Intimidate 8756 8786 isk_X2Inti 1 CHA 0 1 **** **** SKILL_INTIMIDATE 0 0 +25 CraftArmor 8787 8788 isk_X2CArm 1 INT 0 1 **** **** SKILL_CRAFT_ARMOR 0 0 +26 CraftWeapon 8789 8790 isk_X2CWeap 1 INT 0 1 **** **** SKILL_CRAFT_WEAPON 0 0 +27 Ride 111889 111890 isk_x3_ride 1 DEX 0 1 **** **** SKILL_RIDE 0 0 +28 Jump 16826011 16826012 isk_jump 1 STR 1 1 **** **** SKILL_JUMP 0 0 +29 Truespeak 16828470 16828471 isk_truespeak 0 INT 0 1 **** **** SKILL_TRUESPEAK 0 0 +30 Sense_Motive 16829311 16829312 isk_sensemtv 1 WIS 0 1 **** **** SKILL_SENSE_MOTIVE 0 0 +31 Martial_Lore 16829313 16829314 isk_martlore 0 INT 0 0 **** **** SKILL_MARTIAL_LORE 0 0 +32 Balance 16829376 16829377 isk_balance 1 DEX 1 1 **** **** SKILL_BALANCE 0 0 +33 IaijutsuFocus 16826112 16826113 isk_iaijutsu 0 CHA 0 1 **** **** SKILL_IAIJUTSU_FOCUS 0 0 +34 CraftAlchemy 16847237 16847238 isk_alchemy 1 INT 0 1 **** **** SKILL_CRAFT_ALCHEMY 0 0 +35 CraftPoison 16832401 16832402 isk_poison 1 INT 0 1 **** **** SKILL_CRAFT_POISON 0 0 +36 Psicraft 16832210 16832211 isk_spellcraft 0 INT 0 0 **** **** SKILL_PSICRAFT 0 0 +37 Climb 16847418 16847419 isk_climb 1 STR 1 1 **** **** SKILL_CLIMB 0 0 +38 CraftGeneral 16832369 16832370 isk_X2CArm 1 INT 0 1 **** **** SKILL_CRAFT_GENERAL 0 0 diff --git a/nwn/nwnprc/trunk/2das/spells.2da b/nwn/nwnprc/trunk/2das/spells.2da index 9fb16461..f8b4290d 100644 --- a/nwn/nwnprc/trunk/2das/spells.2da +++ b/nwn/nwnprc/trunk/2das/spells.2da @@ -14267,7 +14267,7 @@ 14263 Prevenom 16824141 fot_grmalison T P 0 **** 0x09 psi_pow_prevnm **** **** **** **** **** **** 1 1500 hand **** vco_smhanevil01 **** sco_mehanevil01 **** **** out 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 2 **** 1 16824142 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 14264 PrevenomWeapon 16824143 fot_prevnmw T P 0 **** 0x09 psi_pow_prevnmwp **** **** **** **** **** **** 1 1500 hand **** vco_smhanevil01 **** sco_mehanevil01 **** **** out 1000 **** **** **** **** 0 **** **** **** **** **** **** 0 **** **** **** **** **** 2 **** 1 16824144 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 14265 GripOfIron 16790300 fot_metaclaw T P 0 **** 0x10 psi_pow_gripiron **** **** **** **** **** **** 1 1500 hand **** **** **** **** vs_chant_evoc_hm vs_chant_evoc_hf attack 1000 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** 10 **** 1 16790301 1 0 **** 0 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** -14266 PsionicLionsCharge 16790308 fot_imprhaste T L 0 **** 0x10 psi_pow_charge **** **** **** **** **** **** 1 1500 hand **** **** **** **** vs_chant_evoc_hm vs_chant_evoc_hf attack 1000 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** 10 **** 1 16790309 1 0 **** 1 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** +14266 PsionicLionsCharge 16790308 fot_imprhaste T L 0 **** 0x10 psi_pow_charge **** **** **** **** **** **** 2 1500 hand **** **** **** **** vs_chant_evoc_hm vs_chant_evoc_hf attack 1000 **** **** **** **** 0 **** **** **** **** **** **** 1 **** **** **** **** **** 10 **** 1 16790309 1 0 **** 1 **** **** **** 0 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 14267 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 14268 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 14269 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** diff --git a/nwn/nwnprc/trunk/gfx/ife_chosen_evil.tga b/nwn/nwnprc/trunk/gfx/ife_chosen_evil.tga new file mode 100644 index 00000000..98a0872e Binary files /dev/null and b/nwn/nwnprc/trunk/gfx/ife_chosen_evil.tga differ diff --git a/nwn/nwnprc/trunk/include/inc_dispel.nss b/nwn/nwnprc/trunk/include/inc_dispel.nss index 2258a110..01886d43 100644 --- a/nwn/nwnprc/trunk/include/inc_dispel.nss +++ b/nwn/nwnprc/trunk/include/inc_dispel.nss @@ -334,7 +334,7 @@ void DispelMagicBestMod(object oTarget, int nCasterLevel) { int nExist = GetLocalInt(OBJECT_SELF, "CaptureMagic"); int nSpellLevel = StringToInt(Get2DACache("spells", "Innate", nEffectSpellID)); - SetLocalInt(OBJECT_SELF, "CaptureMagic", max(nExist, nSpellLevel/2)); + SetLocalInt(OBJECT_SELF, "CaptureMagic", PRCMax(nExist, nSpellLevel/2)); if (GetLevelByClass(CLASS_TYPE_NOCTUMANCER) >= 10) ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSpellImmunity(nEffectSpellID)), OBJECT_SELF, 60.0); } @@ -589,7 +589,7 @@ void DispelMagicAllMod(object oTarget, int nCasterLevel) { int nExist = GetLocalInt(OBJECT_SELF, "CaptureMagic"); int nSpellLevel = StringToInt(Get2DACache("spells", "Innate", nEffectSpellID)); - SetLocalInt(OBJECT_SELF, "CaptureMagic", max(nExist, nSpellLevel/2)); + SetLocalInt(OBJECT_SELF, "CaptureMagic", PRCMax(nExist, nSpellLevel/2)); if (GetLevelByClass(CLASS_TYPE_NOCTUMANCER) >= 10) ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSpellImmunity(nEffectSpellID)), OBJECT_SELF, 60.0); } diff --git a/nwn/nwnprc/trunk/include/inc_spirit_weapn.nss b/nwn/nwnprc/trunk/include/inc_spirit_weapn.nss index 21c38ea7..a0f726a4 100644 --- a/nwn/nwnprc/trunk/include/inc_spirit_weapn.nss +++ b/nwn/nwnprc/trunk/include/inc_spirit_weapn.nss @@ -453,7 +453,7 @@ void CreateSpiritualWeapon(object oCaster, float fDuration, int nClass) int iCasterLvL = PRCGetCasterLevel(oCaster); int nBAB = GetBaseAttackBonus(oCaster); int nAttNumber = 1+(nBAB / 4); - int nDamBonus = min(5, iCasterLvL / 3); + int nDamBonus = PRCMin(5, iCasterLvL / 3); int nPenetr = iCasterLvL + SPGetPenetr(); int nStat = nClass == CLASS_TYPE_INVALID ? GetAbilityModifier(ABILITY_CHARISMA, oCaster) ://:: if cast from items use charisma by default @@ -804,7 +804,7 @@ void HandleSpiritualWeaponUnequipEvent() int nCasterLevel = PRCGetCasterLevel(oCaster); int nDuration = nCasterLevel; int nPenetr = nCasterLevel + SPGetPenetr(); - int nDamBonus = min(5, nCasterLevel / 3); + int nDamBonus = PRCMin(5, nCasterLevel / 3); float fDuration = IntToFloat(nDuration); // Log the event for debugging diff --git a/nwn/nwnprc/trunk/include/inc_utility.nss b/nwn/nwnprc/trunk/include/inc_utility.nss index 69bd16af..aabfe70c 100644 --- a/nwn/nwnprc/trunk/include/inc_utility.nss +++ b/nwn/nwnprc/trunk/include/inc_utility.nss @@ -32,7 +32,7 @@ const int ACTION_USE_ITEM_TMI_LIMIT = 1500; * @param b Another integer * @return a iff a is greater than b, otherwise b */ -int max(int a, int b); +int PRCMax(int a, int b); /** * Returns the lesser of the two values passed to it. @@ -41,7 +41,7 @@ int max(int a, int b); * @param b Another integer * @return a iff a is lesser than b, otherwise b */ -int min(int a, int b); +int PRCMin(int a, int b); /** * Returns the greater of the two values passed to it. @@ -50,7 +50,7 @@ int min(int a, int b); * @param b Another float * @return a iff a is greater than b, otherwise b */ -float fmax(float a, float b); +float PRCFmax(float a, float b); /** * Returns the lesser of the two values passed to it. @@ -59,7 +59,7 @@ float fmax(float a, float b); * @param b Another float * @return a iff a is lesser than b, otherwise b */ -float fmin(float a, float b); +float PRCFmin(float a, float b); /** * Takes a string in the standard hex number format (0x####) and converts it @@ -172,29 +172,29 @@ location AddLocationToLocation(location lMaster, location lAdd); * simple function to use the name of a item holding escape sequences that, though they will not compile, * they can be interpreted at run time and produce rbg scales between 32 and 255 in increments. * -- allows 3375 colors to be made. - * for example SendMessageToPC(pc,GetRGB(15,15,1)+ "Help, I'm on fire!") will produce yellow text. + * for example SendMessageToPC(pc,PRCGetRGB(15,15,1)+ "Help, I'm on fire!") will produce yellow text. * more examples: * - * GetRGB() := WHITE // no parameters, default is white - * GetRGB(15,15,1):= YELLOW - * GetRGB(15,5,1) := ORANGE - * GetRGB(15,1,1) := RED - * GetRGB(7,7,15) := BLUE - * GetRGB(1,15,1) := NEON GREEN - * GetRGB(1,11,1) := GREEN - * GetRGB(9,6,1) := BROWN - * GetRGB(11,9,11):= LIGHT PURPLE - * GetRGB(12,10,7):= TAN - * GetRGB(8,1,8) := PURPLE - * GetRGB(13,9,13):= PLUM - * GetRGB(1,7,7) := TEAL - * GetRGB(1,15,15):= CYAN - * GetRGB(1,1,15) := BRIGHT BLUE + * PRCGetRGB() := WHITE // no parameters, default is white + * PRCGetRGB(15,15,1):= YELLOW + * PRCGetRGB(15,5,1) := ORANGE + * PRCGetRGB(15,1,1) := RED + * PRCGetRGB(7,7,15) := BLUE + * PRCGetRGB(1,15,1) := NEON GREEN + * PRCGetRGB(1,11,1) := GREEN + * PRCGetRGB(9,6,1) := BROWN + * PRCGetRGB(11,9,11):= LIGHT PURPLE + * PRCGetRGB(12,10,7):= TAN + * PRCGetRGB(8,1,8) := PURPLE + * PRCGetRGB(13,9,13):= PLUM + * PRCGetRGB(1,7,7) := TEAL + * PRCGetRGB(1,15,15):= CYAN + * PRCGetRGB(1,1,15) := BRIGHT BLUE * * issues? contact genji@thegenji.com * special thanks to ADAL-Miko and Rich Dersheimer in the bio forums. */ -string GetRGB(int red = 15,int green = 15,int blue = 15); +string PRCGetRGB(int red = 15,int green = 15,int blue = 15); /** * Checks if any PCs (or optionally their NPC party members) are in the @@ -362,7 +362,7 @@ string BooleanToString(int bool, int bTLK = FALSE); * * @param s The string to trim. */ -string TrimString(string s); +string PRCTrimString(string s); /** * Compares the given two strings lexicographically. @@ -584,13 +584,13 @@ const int ERROR_CODE_5_ONCE_MORE5 = -1; * Function Definitions * \**********************/ -int max(int a, int b) {return (a > b ? a : b);} +int PRCMax(int a, int b) {return (a > b ? a : b);} -int min(int a, int b) {return (a < b ? a : b);} +int PRCMin(int a, int b) {return (a < b ? a : b);} -float fmax(float a, float b) {return (a > b ? a : b);} +float PRCFmax(float a, float b) {return (a > b ? a : b);} -float fmin(float a, float b) {return (a < b ? a : b);} +float PRCFmin(float a, float b) {return (a < b ? a : b);} int HexToInt_old(string sHex) { @@ -721,7 +721,7 @@ location AddLocationToLocation(location lMaster, location lAdd) -string GetRGB(int red = 15,int green = 15,int blue = 15) +string PRCGetRGB(int red = 15,int green = 15,int blue = 15) { object coloringBook = GetObjectByTag("ColoringBook"); if (coloringBook == OBJECT_INVALID) @@ -953,7 +953,7 @@ void ForceEquip(object oPC, object oItem, int nSlot, int nThCall = 0) AssignCommand(oPC, ActionEquipItem(oItem, nSlot)); } // Use a lenghtening delay in order to attempt handling lag and possible other interference. From 0.1s to 1s - fDelay = min(nThCall, 10) / 10.0f; + fDelay = PRCMin(nThCall, 10) / 10.0f; } // Loop @@ -995,7 +995,7 @@ void ForceUnequip(object oPC, object oItem, int nSlot, int nThCall = 0) AssignCommand(oPC, ActionUnequipItem(oItem)); // Ramp up the delay if the action is not getting through. Might let whatever is intefering finish - fDelay = min(nThCall, 10) / 10.0f; + fDelay = PRCMin(nThCall, 10) / 10.0f; } // The item has already been unequipped else @@ -1051,7 +1051,7 @@ string BooleanToString(int bool, int bTLK = FALSE) (bool ? "True" : "False"); } -string TrimString(string s) +string PRCTrimString(string s) { int nCrop = 0; string temp; @@ -1105,7 +1105,7 @@ int StringCompare(string s1, string s2) // Start comparing int nT, i = 0, - nMax = min(GetStringLength(s1), GetStringLength(s2)); + nMax = PRCMin(GetStringLength(s1), GetStringLength(s2)); while(i < nMax) { // Get the difference between the values of i:th characters @@ -1726,7 +1726,7 @@ void ForcePutDown(object oPC, object oItem, int nSlot, int nThCall = 0) AssignCommand(oPC, ActionPutDownItem(oItem)); // Ramp up the delay if the action is not getting through. Might let whatever is intefering finish - fDelay = min(nThCall, 10) / 10.0f; + fDelay = PRCMin(nThCall, 10) / 10.0f; } // The item has already been unequipped else diff --git a/nwn/nwnprc/trunk/include/inv_inc_invfunc.nss b/nwn/nwnprc/trunk/include/inv_inc_invfunc.nss index c4799d46..6b2d5b99 100644 --- a/nwn/nwnprc/trunk/include/inv_inc_invfunc.nss +++ b/nwn/nwnprc/trunk/include/inv_inc_invfunc.nss @@ -204,7 +204,7 @@ int GetInvokerLevel(object oInvoker = OBJECT_SELF, int nSpecificClass = CLASS_TY return 0; if(nSpecificClass == CLASS_TYPE_DRAGON_SHAMAN) - nLevel = max(GetLevelByClass(nSpecificClass, oInvoker) - 4, 1); // Can't go below 1 + nLevel = PRCMax(GetLevelByClass(nSpecificClass, oInvoker) - 4, 1); // Can't go below 1 else nLevel = GetLevelByClass(nSpecificClass, oInvoker); if(DEBUG) DoDebug("Invoker Class Level is: " + IntToString(nLevel)); @@ -256,7 +256,7 @@ int GetHighestInvokerLevel(object oCreature) /* int GetHighestInvokerLevel(object oCreature) { - return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, + return PRCMax(PRCMax(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 ), GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInvokerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 diff --git a/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss b/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss index 2651f055..d48a4412 100644 --- a/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss +++ b/nwn/nwnprc/trunk/include/moi_inc_moifunc.nss @@ -204,7 +204,7 @@ int GetIncarnumLevelForClass(int nSpecificClass, object oMeldshaper) int GetHighestMeldshaperLevel(object oMeldshaper) { - /**return max(max(GetClassByPosition(1, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(1, oMeldshaper), -1) : 0, + /**return PRCMax(PRCMax(GetClassByPosition(1, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(1, oMeldshaper), -1) : 0, GetClassByPosition(2, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(2, oMeldshaper), -1) : 0 ), GetClassByPosition(3, oMeldshaper) != CLASS_TYPE_INVALID ? GetMeldshaperLevel(oMeldshaper, GetClassByPosition(3, oMeldshaper), -1) : 0 @@ -354,7 +354,7 @@ int GetMaxShapeSoulmeldCount(object oMeldshaper, int nClass) int nCon = GetAbilityScore(oMeldshaper, ABILITY_CONSTITUTION, TRUE)-10; if (GetHasFeat(FEAT_UNDEAD_MELDSHAPER, oMeldshaper)) nCon = GetAbilityScore(oMeldshaper, ABILITY_WISDOM, TRUE)-10; //Limited to Con score - 10 or class limit, whichever is less - nMax = min(nMax, nCon); + nMax = PRCMin(nMax, nCon); //if (DEBUG) DoDebug("GetMaxShapeSoulmeldCount is "+IntToString(nMax)); return nMax; @@ -856,7 +856,7 @@ void InvestEssentia(object oMeldshaper, int nMeld, int nEssentia) } int nClass = GetMeldShapedClass(oMeldshaper, nMeld); // Special capacity of 1/2 class level - if (nMeld == MELD_SPINE_ENHANCEMENT) nEssentia = min(nEssentia, (GetLevelByClass(CLASS_TYPE_SPINEMELD_WARRIOR, oMeldshaper)/2)); + if (nMeld == MELD_SPINE_ENHANCEMENT) nEssentia = PRCMin(nEssentia, (GetLevelByClass(CLASS_TYPE_SPINEMELD_WARRIOR, oMeldshaper)/2)); else if (nEssentia > GetMaxEssentiaCapacity(oMeldshaper, nClass, nMeld)) nEssentia = GetMaxEssentiaCapacity(oMeldshaper, nClass, nMeld); // Can't invest more than you have if (nEssentia > GetTotalUsableEssentia(oMeldshaper)) nEssentia = GetTotalUsableEssentia(oMeldshaper); @@ -1176,7 +1176,7 @@ int GetMaxEssentiaCapacityFeat(object oMeldshaper) else if (nHD >= 6) nMax = 2; if (GetLocalInt(oMeldshaper, "DivineSoultouch")) nMax += 1; - if (GetLocalInt(oMeldshaper, "IncandescentOverload")) nMax += max(GetAbilityModifier(ABILITY_CHARISMA, oMeldshaper), 1); + if (GetLocalInt(oMeldshaper, "IncandescentOverload")) nMax += PRCMax(GetAbilityModifier(ABILITY_CHARISMA, oMeldshaper), 1); if (GetHasFeat(FEAT_IMPROVED_ESSENTIA_CAPACITY, oMeldshaper)) nMax += 1; // Don't allow more than they have diff --git a/nwn/nwnprc/trunk/include/prc_craft_inc.nss b/nwn/nwnprc/trunk/include/prc_craft_inc.nss index ff950cc3..c0043dbb 100644 --- a/nwn/nwnprc/trunk/include/prc_craft_inc.nss +++ b/nwn/nwnprc/trunk/include/prc_craft_inc.nss @@ -188,15 +188,15 @@ int GetArmourCheckPenaltyReduction(object oItem) int nACPenalty = GetItemArmourCheckPenalty(oItem); if(nMaterial & PRC_CRAFT_FLAG_MASTERWORK) { - nBonus = min(1, nACPenalty); + nBonus = PRCMin(1, nACPenalty); } if(nMaterial & PRC_CRAFT_FLAG_DARKWOOD) { - nBonus = min(2, nACPenalty); + nBonus = PRCMin(2, nACPenalty); } if(nMaterial & PRC_CRAFT_FLAG_MITHRAL) { - nBonus = min(3, nACPenalty); + nBonus = PRCMin(3, nACPenalty); } } return nBonus; @@ -986,7 +986,7 @@ int CheckGolemPrereq(object oPC, int nLine, int bEpic) int nLevel; int j = 0; //replace the arti level check later when PrCs are added - int nCasterLevel = max(max(max(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)), GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC) + 2), GetLocalInt(oPC, "InvokerLevel")); + int nCasterLevel = PRCMax(PRCMax(PRCMax(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)), GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC) + 2), GetLocalInt(oPC, "InvokerLevel")); int nManifesterLevel = GetManifesterLevel(oPC); int nTemp, nLength, nPosition; int bArtificer = (GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC) > 0); @@ -999,7 +999,7 @@ int CheckGolemPrereq(object oPC, int nLine, int bEpic) else if(sPropertyType == "P") nLevel = nManifesterLevel; else - nLevel = max(nCasterLevel, nManifesterLevel); + nLevel = PRCMax(nCasterLevel, nManifesterLevel); if(!bEpic && Get2DACache(sFile, "Epic", nLine) == "1") return FALSE; else if(nLevel < StringToInt(Get2DACache(sFile, "Level", nLine))) @@ -1051,7 +1051,7 @@ int CheckPrereq(object oPC, int nLine, int bEpic, string sFile, struct itemvars int nLevel; int j = 0; //replace the arti level check later when PrCs are added - int nCasterLevel = max(max(max(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)), GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC) + 2), GetLocalInt(oPC, "InvokerLevel")); + int nCasterLevel = PRCMax(PRCMax(PRCMax(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)), GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC) + 2), GetLocalInt(oPC, "InvokerLevel")); nCasterLevel += GetLevelByClass(CLASS_TYPE_BATTLESMITH) * 3; nCasterLevel += GetLevelByClass(CLASS_TYPE_IRONSOUL_FORGEMASTER) * 3; int nManifesterLevel = GetManifesterLevel(oPC); @@ -1064,7 +1064,7 @@ int CheckPrereq(object oPC, int nLine, int bEpic, string sFile, struct itemvars else if(sPropertyType == "P") nLevel = nManifesterLevel; else - nLevel = max(nCasterLevel, nManifesterLevel); + nLevel = PRCMax(nCasterLevel, nManifesterLevel); if (DEBUG) DoDebug("CheckPrereq: "+GetName(oPC)+" nLevel "+IntToString(nLevel)+" PropType "+sPropertyType+" Epic "+IntToString(bEpic)+" sFile "+sFile); @@ -1187,7 +1187,7 @@ struct itemvars GetItemVars(object oPC, object oItem, string sFile, int bEpic = int nEnhancement; int nSpellPattern; int nSpell1, nSpell2, nSpell3, nSpellOR1, nSpellOR2; - int nCasterLevel = max(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)); + int nCasterLevel = PRCMax(GetLevelByTypeArcane(oPC), GetLevelByTypeDivine(oPC)); int nManifesterLevel = GetManifesterLevel(oPC); int nLevel; int nFileEnd = PRCGetFileEnd(sFile); diff --git a/nwn/nwnprc/trunk/include/prc_feat_const.nss b/nwn/nwnprc/trunk/include/prc_feat_const.nss index b3f1e5c4..a455282b 100644 --- a/nwn/nwnprc/trunk/include/prc_feat_const.nss +++ b/nwn/nwnprc/trunk/include/prc_feat_const.nss @@ -1560,6 +1560,12 @@ const int FEAT_SANCTIFY_MARTIAL_SICKLE = 3169; const int FEAT_SANCTIFY_MARTIAL_MINDBLADE = 3623; const int FEAT_SANCTIFY_MARTIAL_WHIP = 3596; const int FEAT_SANCTIFY_MARTIAL_TRIDENT = 3597; +const int FEAT_SANCTIFYKISTRIKE = 26002; +const int FEAT_HOLYKISTRIKE = 26003; +const int FEAT_FISTOFHEAVENS = 26004; +const int FEAT_VOWABSTINENCE = 26005; +const int FEAT_VOWCHASTITY = 26006; +const int FEAT_GIFTOFFAITH = 26007; //heartwarder const int FEAT_CHARISMA_INC1 = 3230; @@ -2493,7 +2499,13 @@ const int FEAT_WEAPON_OF_CHOICE_MINDBLADE = 3622; const int FEAT_MIND_CLEAVE = 24414; -//Psionic Feats +//:: Psionic Feats +const int FEAT_AUGMENT_PSIONICS_QUICKSELECTS = 3550; +const int FEAT_AUGMENT_QUICKSELECTS_2 = 3563; +const int FEAT_AUGMENT_PSIONICS_DIGITS_0_4 = 3551; +const int FEAT_AUGMENT_PSIONICS_DIGITS_5_9 = 3552; +const int FEAT_AUGMENT_PSIONICS_TENS = 3553; + const int FEAT_MENTAL_RESISTANCE = 4812; const int FEAT_HOSTILE_MIND = 4813; const int FEAT_FORCE_OF_WILL = 4814; @@ -5862,10 +5874,60 @@ const int FEAT_SWIFT_WING_SPELLCASTING_VASSAL = 19588; const int FEAT_WARPRIEST_SPELLCASTING_VASSAL = 19589; //:: No spellcasting or invoking marker feats -const int FEAT_ASMODEUS_SPELLCASTING_NONE = 19590; -const int FEAT_TIAMAT_SPELLCASTING_NONE = 19591; -const int FEAT_DSONG_SPELLCASTING_NONE = 19592; -const int FEAT_OLLAM_SPELLCASTING_NONE = 19593; +const int FEAT_ASMODEUS_SPELLCASTING_NONE = 19590; +const int FEAT_TIAMAT_SPELLCASTING_NONE = 19591; +const int FEAT_DSONG_SPELLCASTING_NONE = 19592; +const int FEAT_OLLAM_SPELLCASTING_NONE = 19593; + +//:: PRC8 Hidden Talent Feats +const int FEAT_HIDDEN_TALENT_BIOFEEDBACK = 25901; +const int FEAT_HIDDEN_TALENT_BITE_WOLF = 25902; +const int FEAT_HIDDEN_TALENT_BOLT = 25903; +const int FEAT_HIDDEN_TALENT_BURST = 25904; +const int FEAT_HIDDEN_TALENT_CALLTOMIND = 25905; +const int FEAT_HIDDEN_TALENT_CALL_WEAPONRY = 25906; +const int FEAT_HIDDEN_TALENT_CHAMELEON = 25907; +const int FEAT_HIDDEN_TALENT_CLAWS_BEAST = 25908; +const int FEAT_HIDDEN_TALENT_COMPRESSION = 25909; +const int FEAT_HIDDEN_TALENT_CONCEALTHOUGHT = 25910; +const int FEAT_HIDDEN_TALENT_CREATESOUND = 25911; +const int FEAT_HIDDEN_TALENT_CRYSTALSHARD = 25912; +const int FEAT_HIDDEN_TALENT_DAZE = 25913; +const int FEAT_HIDDEN_TALENT_DECELERATION = 25914; +const int FEAT_HIDDEN_TALENT_DEFPRECOG = 25915; +const int FEAT_HIDDEN_TALENT_DEMORALIZE = 25916; +const int FEAT_HIDDEN_TALENT_DISABLE = 25917; +const int FEAT_HIDDEN_TALENT_DISSIPATINGTOUCH = 25918; +const int FEAT_HIDDEN_TALENT_DISTRACT = 25919; +const int FEAT_HIDDEN_TALENT_ELFSIGHT = 25920; +const int FEAT_HIDDEN_TALENT_EMPATHY = 25921; +const int FEAT_HIDDEN_TALENT_EMPTYMIND = 25922; +const int FEAT_HIDDEN_TALENT_ENERGYRAY = 25923; +const int FEAT_HIDDEN_TALENT_ENTANGLE = 25924; +const int FEAT_HIDDEN_TALENT_EXPANSION = 25925; +const int FEAT_HIDDEN_TALENT_FARHAND = 25926; +const int FEAT_HIDDEN_TALENT_FORCESCREEN = 25927; +const int FEAT_HIDDEN_TALENT_GREASE = 25928; +const int FEAT_HIDDEN_TALENT_HAMMER = 25929; +const int FEAT_HIDDEN_TALENT_INERTIALARMOUR = 25930; +const int FEAT_HIDDEN_TALENT_MATTERAGITATION = 25931; +const int FEAT_HIDDEN_TALENT_METAPHYSICAL_CLAW = 25932; +const int FEAT_HIDDEN_TALENT_METAPHYSICAL_WEAPON = 25933; +const int FEAT_HIDDEN_TALENT_MINDTHRUST = 25934; +const int FEAT_HIDDEN_TALENT_MYLIGHT = 25935; +const int FEAT_HIDDEN_TALENT_OFFPRECOG = 25936; +const int FEAT_HIDDEN_TALENT_OFFPRESC = 25937; +const int FEAT_HIDDEN_TALENT_PREVENOM = 25938; +const int FEAT_HIDDEN_TALENT_PREVENOM_WEAPON = 25939; +const int FEAT_HIDDEN_TALENT_SKATE = 25940; +const int FEAT_HIDDEN_TALENT_STOMP = 25941; +const int FEAT_HIDDEN_TALENT_SYNESTHETE = 25942; +const int FEAT_HIDDEN_TALENT_TELEMPATHICPRO = 25943; +const int FEAT_HIDDEN_TALENT_THICKSKIN = 25944; +const int FEAT_HIDDEN_TALENT_VIGOR = 25945; +const int FEAT_HIDDEN_TALENT_GRIP_IRON = 25946; + + //:: Test void diff --git a/nwn/nwnprc/trunk/include/prc_inc_breath.nss b/nwn/nwnprc/trunk/include/prc_inc_breath.nss index 2ac42e61..0d439f91 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_breath.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_breath.nss @@ -418,7 +418,7 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F if (BreathUsed.nDCStat >= 10) nSaveDC = BreathUsed.nDCStat; else - nSaveDC = 10 + max(GetAbilityModifier(BreathUsed.nDCStat), 0) + BreathUsed.nOtherDCMod; + nSaveDC = 10 + PRCMax(GetAbilityModifier(BreathUsed.nDCStat), 0) + BreathUsed.nOtherDCMod; //Set up variables that depend on damage type switch (BreathUsed.nDamageType) diff --git a/nwn/nwnprc/trunk/include/prc_inc_combat.nss b/nwn/nwnprc/trunk/include/prc_inc_combat.nss index 212e6511..cfff20f6 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_combat.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_combat.nss @@ -981,7 +981,7 @@ int GetAttacks(int iBAB, int iHD) // this is the Bioware implementation, which includes BAB from other classes and caps at 6 int GetMonkAttacks(int iBAB, int iHD) { - return ((iHD > 20) ? min(6,((iBAB - (iHD-17)/2)/3 +1)) : min(6,((iBAB-1) / 3 +1))); + return ((iHD > 20) ? PRCMin(6,((iBAB - (iHD-17)/2)/3 +1)) : PRCMin(6,((iBAB-1) / 3 +1))); } int GetPnPMonkAttacks(int iMonkLevel) @@ -3038,7 +3038,7 @@ int GetDefenderAC(object oDefender, object oAttacker, int bIsTouchAttack = FALSE // Wilders get to add cha bonus to touch attacks only, but cannot exceed normal AC that way if(GetHasFeat(FEAT_WILDER_ELUDE_TOUCH, oDefender)) - iAC = min(iAC + GetAbilityModifier(ABILITY_CHARISMA, oDefender), nNormalAC); + iAC = PRCMin(iAC + GetAbilityModifier(ABILITY_CHARISMA, oDefender), nNormalAC); } //if (DEBUG) DoDebug("GetDefenderAC: End Section #5"); return iAC; @@ -4880,7 +4880,7 @@ DoDebug("GetWeaponBonusDamage() found onhitcastspell with Spell type: " + IntToS iDamage = iDamageDarkfire + iDamageFlameWeapon; else // otherwise we take the maximum - iDamage = max(iDamageDarkfire, iDamageFlameWeapon); + iDamage = PRCMax(iDamageDarkfire, iDamageFlameWeapon); if(iDamage) { // now either (if stacking) add the spell's fire damage to any other fire damage that is already on the weapon, @@ -4888,7 +4888,7 @@ DoDebug("GetWeaponBonusDamage() found onhitcastspell with Spell type: " + IntToS if(bStack) iDamage += GetDamageByConstant(weapBonusDam.dam_Fire, TRUE); else - iDamage = max(GetDamageByConstant(weapBonusDam.dam_Fire, TRUE), iDamage); + iDamage = PRCMax(GetDamageByConstant(weapBonusDam.dam_Fire, TRUE), iDamage); if(iDamage > 20) iDamage = 20; // make sure that the damage does not exceed 20 // convert integer damage back to DamageBonusConstant diff --git a/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss b/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss index 41dbc2f3..156f530c 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_itmrstr.nss @@ -73,7 +73,7 @@ void CheckForPnPHolyAvenger(object oItem); void _prc_inc_itmrstr_ApplySpeedIncrease(object oPC) { // Get target speed modification value. Limit to 99, since that's the effect constructor maximum value - int nSpeedMod = min(99, GetLocalInt(oPC, PLAYER_SPEED_INCREASE)); + int nSpeedMod = PRCMin(99, GetLocalInt(oPC, PLAYER_SPEED_INCREASE)); object oSkin = GetPCSkin(oPC); AssignCommand(oSkin, _prc_inc_itmrstr_ApplySpeedModification(oPC, EFFECT_TYPE_MOVEMENT_SPEED_INCREASE, nSpeedMod)); diff --git a/nwn/nwnprc/trunk/include/prc_inc_s_det.nss b/nwn/nwnprc/trunk/include/prc_inc_s_det.nss index 78a20e51..907154e8 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_s_det.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_s_det.nss @@ -193,7 +193,7 @@ void DetectAlignmentRound(int nRound, location lLoc, int nGoodEvil, int nLawChao { //presence/absence //ApplyEffectDetectAuraOnObject(AURA_STRENGTH_MODERATE, oCaster, nBeamVFX); - FloatingTextStringOnCreature(GetRGB(15,5,5) + GetStringByStrRef(16832001)// "You detect the presense of" + FloatingTextStringOnCreature(PRCGetRGB(15,5,5) + GetStringByStrRef(16832001)// "You detect the presense of" + " " + (nLawChaos != -1 ? // "good" and "evil" work as both substantives and adjectives, but not so for "lawful" and "chaotic" (nLawChaos == ALIGNMENT_LAWFUL ? GetStringByStrRef(4957) // "law" @@ -253,7 +253,7 @@ void DetectAlignmentRound(int nRound, location lLoc, int nGoodEvil, int nLawChao else if(nRound >= 3) { if(nRound == 3) - ActionDoCommand(FloatingTextStringOnCreature(GetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " " + GetStringByStrRef(16832044)/*"feels"*/ + " "+GetNounForStrength(nStrength)+" "+sAura+".", oCaster, FALSE)); + ActionDoCommand(FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " " + GetStringByStrRef(16832044)/*"feels"*/ + " "+GetNounForStrength(nStrength)+" "+sAura+".", oCaster, FALSE)); //strength & location ActionDoCommand(ApplyEffectDetectAuraOnObject(nStrength, oTest, nBeamVFX)); } @@ -264,7 +264,7 @@ void DetectAlignmentRound(int nRound, location lLoc, int nGoodEvil, int nLawChao { //reporting //ApplyEffectDetectAuraOnObject(nStrongestAura, oCaster, nBeamVFX); - FloatingTextStringOnCreature(GetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " " + sAura + " " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); + FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " " + sAura + " " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); } //ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 6.0); @@ -371,7 +371,7 @@ void DetectMagicAura(int nRound, location lLoc, int nBeamVFX, float fDist) else if(nRound >= 3) { if(nRound == 3) - ActionDoCommand(FloatingTextStringOnCreature(GetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " feels affected by "+GetNounForStrength(nStrength)+" magic.", oCaster, FALSE)); + ActionDoCommand(FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " feels affected by "+GetNounForStrength(nStrength)+" magic.", oCaster, FALSE)); //strength & location ActionDoCommand(ApplyEffectDetectAuraOnObject(nStrength, oTest, nBeamVFX)); } @@ -382,7 +382,7 @@ void DetectMagicAura(int nRound, location lLoc, int nBeamVFX, float fDist) { //reporting //ApplyEffectDetectAuraOnObject(nStrongestAura, oCaster, nBeamVFX); - FloatingTextStringOnCreature(GetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " magical " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); + FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " magical " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); } //ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 6.0); @@ -475,7 +475,7 @@ void DetectRaceAura(int nRound, int nRace, location lLoc, int nBeamVFX, float fD else if(nRound >= 3) { if(nRound == 3) - ActionDoCommand(FloatingTextStringOnCreature(GetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " finds the greatest aura is "+GetNounForStrength(nStrength)+".", oCaster, FALSE)); + ActionDoCommand(FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrength*3),16-(nStrength*3)) + GetName(oTest) + " finds the greatest aura is "+GetNounForStrength(nStrength)+".", oCaster, FALSE)); //strength & location ActionDoCommand(ApplyEffectDetectAuraOnObject(nStrength, oTest, nBeamVFX)); } @@ -486,7 +486,7 @@ void DetectRaceAura(int nRound, int nRace, location lLoc, int nBeamVFX, float fD { //reporting //ApplyEffectDetectAuraOnObject(nStrongestAura, oCaster, nBeamVFX); - FloatingTextStringOnCreature(GetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " racial " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); + FloatingTextStringOnCreature(PRCGetRGB(15,16-(nStrongestAura*3),16-(nStrongestAura*3)) + GetStringByStrRef(16832045)/*"You detected"*/ + " " + IntToString(nAuraCount) + " " + GetNounForStrength(nStrongestAura) + " racial " + GetStringByStrRef(16832046)/*"auras"*/ + ".", oCaster, FALSE); } //ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 6.0); diff --git a/nwn/nwnprc/trunk/include/prc_inc_scry.nss b/nwn/nwnprc/trunk/include/prc_inc_scry.nss index a2cf5a07..0178f0a3 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_scry.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_scry.nss @@ -174,7 +174,7 @@ void ScryMain(object oPC, object oTarget) { // Caster level check or the Divination fails. // Max of 10 - if(max(10, GetManifesterLevel(oTarget)) + 13 > nCasterLevel + d20()) + if(PRCMax(10, GetManifesterLevel(oTarget)) + 13 > nCasterLevel + d20()) { FloatingTextStringOnCreature(GetName(oTarget) + " has Escape Detection active.", oPC, FALSE); return; diff --git a/nwn/nwnprc/trunk/include/prc_inc_shifting.nss b/nwn/nwnprc/trunk/include/prc_inc_shifting.nss index 71dd52ef..7cac1edf 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_shifting.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_shifting.nss @@ -1980,7 +1980,7 @@ void UpdateStoredTemplateInfo(object oShifter, int nShifterType, int nStart = 0) int nArraySize = GetNumberOfStoredTemplates(oShifter, nShifterType); if(nStart < nArraySize) { - int nEnd = min(nStart + CHUNK_SIZE, nArraySize); + int nEnd = PRCMin(nStart + CHUNK_SIZE, nArraySize); _UpdateStoredTemplateInfo(oShifter, nShifterType, nStart, nEnd); if(nEnd < nArraySize) DelayCommand(0.0f, UpdateStoredTemplateInfo(oShifter, nShifterType, nEnd)); diff --git a/nwn/nwnprc/trunk/include/prc_inc_skin.nss b/nwn/nwnprc/trunk/include/prc_inc_skin.nss index 5b2b3884..d227d607 100644 --- a/nwn/nwnprc/trunk/include/prc_inc_skin.nss +++ b/nwn/nwnprc/trunk/include/prc_inc_skin.nss @@ -85,7 +85,7 @@ void _ForceEquipSkin(object oPC, object oSkin, int nThCall = 0) } } // Use a lenghtening delay in order to attempt handling lag and possible other interference. From 0.1s to 1s - fDelay = (nThCall < 10 ? nThCall : 10) / 10.0f; // yes this is the same as min(nThCall, 10) + fDelay = (nThCall < 10 ? nThCall : 10) / 10.0f; // yes this is the same as PRCMin(nThCall, 10) } // Loop diff --git a/nwn/nwnprc/trunk/include/prc_ipfeat_const.nss b/nwn/nwnprc/trunk/include/prc_ipfeat_const.nss index f5f1d8a5..48564834 100644 --- a/nwn/nwnprc/trunk/include/prc_ipfeat_const.nss +++ b/nwn/nwnprc/trunk/include/prc_ipfeat_const.nss @@ -197,17 +197,25 @@ const int IP_CONST_FEAT_SPRINGATTACK = 258; const int IP_CONST_FEAT_EVASION = 386; const int IP_CONST_FEAT_IMPEVASION = 387; const int IP_CONST_FEAT_GREAT_CLEAVE = 260; -const int IP_CONST_FEAT_PSIONIC_FOCUS = 259; const int IP_CONST_FEAT_IMPROVED_INIT = 261; const int IP_CONST_FEAT_BLOODED = 270; -const int IP_CONST_FEAT_POWER_ATTACK_SINGLE_RADIAL = 252; -const int IP_CONST_FEAT_POWER_ATTACK_FIVES_RADIAL = 253; -const int IP_CONST_FEAT_PRC_POWER_ATTACK_QUICKS_RADIAL = 262; +const int IP_CONST_FEAT_POWER_ATTACK_SINGLE_RADIAL = 252; +const int IP_CONST_FEAT_POWER_ATTACK_FIVES_RADIAL = 253; +const int IP_CONST_FEAT_PRC_POWER_ATTACK_QUICKS_RADIAL = 262; -const int IP_CONST_FEAT_TELEPORT_MANAGEMENT_RADIAL = 263; +const int IP_CONST_FEAT_TELEPORT_MANAGEMENT_RADIAL = 263; + +const int IP_CONST_FEAT_EPIC_REST = 399; + +//:: Psionic System Feats +const int IP_CONST_FEAT_PSIONIC_FOCUS = 259; +const int IP_CONST_FEAT_AUGMENT_PSIONICS_QUICKSELECTS = 584; +const int IP_CONST_FEAT_AUGMENT_PSIONICS_DIGITS_0_4 = 585; +const int IP_CONST_FEAT_AUGMENT_PSIONICS_DIGITS_5_9 = 586; +const int IP_CONST_FEAT_AUGMENT_PSIONICS_TENS = 587; +const int IP_CONST_FEAT_AUGMENT_QUICKSELECTS_2 = 586; -const int IP_CONST_FEAT_EPIC_REST = 399; //:: PnP Weapon Feats const int IP_CONST_FEAT_WEAPON_PROFICIENCY_SHORTSWORD = 4601; diff --git a/nwn/nwnprc/trunk/include/prc_shifter_info.nss b/nwn/nwnprc/trunk/include/prc_shifter_info.nss index abdb6a6e..2a9ed78c 100644 --- a/nwn/nwnprc/trunk/include/prc_shifter_info.nss +++ b/nwn/nwnprc/trunk/include/prc_shifter_info.nss @@ -183,7 +183,7 @@ int _prc_inc_GetItemACBonus(object oItem) while(GetIsItemPropertyValid(iProp)) { if(GetItemPropertyType(iProp) == ITEM_PROPERTY_AC_BONUS && GetItemPropertyDurationType(iProp) == DURATION_TYPE_PERMANENT) - nArmorBonus = max(nArmorBonus, GetItemPropertyCostTableValue(iProp)); //TODO: pick the biggest? the first? stack them? + nArmorBonus = PRCMax(nArmorBonus, GetItemPropertyCostTableValue(iProp)); //TODO: pick the biggest? the first? stack them? iProp = GetNextItemProperty(oItem); } return nArmorBonus; @@ -238,18 +238,18 @@ struct _prc_inc_ac_info_struct _prc_inc_ACInfo(object oTemplate) ac_info.nNaturalBonus = GetItemACValue(GetItemInSlot(INVENTORY_SLOT_NECK, oTemplate)); ac_info.nDeflectionBonus = GetItemACValue(GetItemInSlot(INVENTORY_SLOT_HEAD, oTemplate)); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CLOAK, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BELT, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_ARROWS, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BULLETS, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BOLTS, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oTemplate))); - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CARMOUR, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CLOAK, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BELT, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_ARROWS, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BULLETS, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_BOLTS, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oTemplate))); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CARMOUR, oTemplate))); object oOffHandItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTemplate); ac_info.nShieldBase = 0; @@ -269,7 +269,7 @@ struct _prc_inc_ac_info_struct _prc_inc_ACInfo(object oTemplate) ac_info.nShieldBonus = GetItemACValue(oOffHandItem) - ac_info.nShieldBase; break; default: //A weapon - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(oOffHandItem)); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(oOffHandItem)); break; } @@ -277,11 +277,11 @@ struct _prc_inc_ac_info_struct _prc_inc_ACInfo(object oTemplate) switch (GetBaseItemType(oArmsItem)) { case BASE_ITEM_BRACER: - ac_info.nShieldBonus = max(ac_info.nShieldBonus, GetItemACValue(oArmsItem)); + ac_info.nShieldBonus = PRCMax(ac_info.nShieldBonus, GetItemACValue(oArmsItem)); break; case BASE_ITEM_GLOVES: default: - ac_info.nDeflectionBonus = max(ac_info.nDeflectionBonus, GetItemACValue(oArmsItem)); + ac_info.nDeflectionBonus = PRCMax(ac_info.nDeflectionBonus, GetItemACValue(oArmsItem)); break; } @@ -296,7 +296,7 @@ struct _prc_inc_ac_info_struct _prc_inc_ACInfo(object oTemplate) if (ac_info.nShieldBonus > 20) ac_info.nShieldBonus = 20; - ac_info.nDEXBonus = min(GetAbilityModifier(ABILITY_DEXTERITY, oTemplate), _prc_inc_GetArmorMaxDEXBonus(oArmorItem)); + ac_info.nDEXBonus = PRCMin(GetAbilityModifier(ABILITY_DEXTERITY, oTemplate), _prc_inc_GetArmorMaxDEXBonus(oArmorItem)); //TODO: make sure this isn't < 0? return ac_info; @@ -416,43 +416,43 @@ int _prc_inc_shifting_ShifterLevelRequirement(object oTemplate) // Size tests if(nSize >= CREATURE_SIZE_HUGE) - nLevelRequired = max(nLevelRequired, 7); + nLevelRequired = PRCMax(nLevelRequired, 7); if(nSize == CREATURE_SIZE_LARGE) - nLevelRequired = max(nLevelRequired, 3); + nLevelRequired = PRCMax(nLevelRequired, 3); if(nSize == CREATURE_SIZE_MEDIUM) - nLevelRequired = max(nLevelRequired, 1); + nLevelRequired = PRCMax(nLevelRequired, 1); if(nSize == CREATURE_SIZE_SMALL) - nLevelRequired = max(nLevelRequired, 1); + nLevelRequired = PRCMax(nLevelRequired, 1); if(nSize <= CREATURE_SIZE_TINY) - nLevelRequired = max(nLevelRequired, 3); + nLevelRequired = PRCMax(nLevelRequired, 3); // Type tests if(nRacialType == RACIAL_TYPE_OUTSIDER) - nLevelRequired = max(nLevelRequired, 9); + nLevelRequired = PRCMax(nLevelRequired, 9); if(nRacialType == RACIAL_TYPE_ELEMENTAL) - nLevelRequired = max(nLevelRequired, 9); + nLevelRequired = PRCMax(nLevelRequired, 9); if(nRacialType == RACIAL_TYPE_CONSTRUCT) - nLevelRequired = max(nLevelRequired, 8); + nLevelRequired = PRCMax(nLevelRequired, 8); if(nRacialType == RACIAL_TYPE_UNDEAD) - nLevelRequired = max(nLevelRequired, 8); + nLevelRequired = PRCMax(nLevelRequired, 8); if(nRacialType == RACIAL_TYPE_DRAGON) - nLevelRequired = max(nLevelRequired, 7); + nLevelRequired = PRCMax(nLevelRequired, 7); if(nRacialType == RACIAL_TYPE_ABERRATION) - nLevelRequired = max(nLevelRequired, 6); + nLevelRequired = PRCMax(nLevelRequired, 6); if(nRacialType == RACIAL_TYPE_OOZE) - nLevelRequired = max(nLevelRequired, 6); + nLevelRequired = PRCMax(nLevelRequired, 6); if(nRacialType == RACIAL_TYPE_MAGICAL_BEAST) - nLevelRequired = max(nLevelRequired, 5); + nLevelRequired = PRCMax(nLevelRequired, 5); if(nRacialType == RACIAL_TYPE_GIANT) - nLevelRequired = max(nLevelRequired, 4); + nLevelRequired = PRCMax(nLevelRequired, 4); if(nRacialType == RACIAL_TYPE_VERMIN) - nLevelRequired = max(nLevelRequired, 4); + nLevelRequired = PRCMax(nLevelRequired, 4); if(nRacialType == RACIAL_TYPE_BEAST) - nLevelRequired = max(nLevelRequired, 3); + nLevelRequired = PRCMax(nLevelRequired, 3); if(nRacialType == RACIAL_TYPE_ANIMAL) - nLevelRequired = max(nLevelRequired, 2); + nLevelRequired = PRCMax(nLevelRequired, 2); if(nRacialType == RACIAL_TYPE_HUMANOID_MONSTROUS) - nLevelRequired = max(nLevelRequired, 2); + nLevelRequired = PRCMax(nLevelRequired, 2); if(nRacialType == RACIAL_TYPE_DWARF || nRacialType == RACIAL_TYPE_ELF || nRacialType == RACIAL_TYPE_GNOME || @@ -463,7 +463,7 @@ int _prc_inc_shifting_ShifterLevelRequirement(object oTemplate) nRacialType == RACIAL_TYPE_HUMANOID_ORC || nRacialType == RACIAL_TYPE_HUMANOID_REPTILIAN ) - nLevelRequired = max(nLevelRequired, 1); + nLevelRequired = PRCMax(nLevelRequired, 1); return nLevelRequired; } diff --git a/nwn/nwnprc/trunk/include/prc_spellf_inc.nss b/nwn/nwnprc/trunk/include/prc_spellf_inc.nss index c09dce6c..753680fc 100644 --- a/nwn/nwnprc/trunk/include/prc_spellf_inc.nss +++ b/nwn/nwnprc/trunk/include/prc_spellf_inc.nss @@ -264,7 +264,7 @@ int SpellfireDrainItem(object oPC, object oItem, int bCharged = TRUE, int bSingl int nCharges = GetItemCharges(oItem); if(nCharges) //charged item { - nExpend = min(min(nCharges, nCap), nExpend); //capped by charges and capacity + nExpend = PRCMin(PRCMin(nCharges, nCap), nExpend); //capped by charges and capacity SetItemCharges(oItem, nCharges - nExpend); //will destroy item if all charges drained AddSpellfireLevels(oPC, nExpend); //adds 1 level/charge return TRUE; @@ -307,7 +307,7 @@ int SpellfireDrainItem(object oPC, object oItem, int bCharged = TRUE, int bSingl (nBase == BASE_ITEM_ENCHANTED_SCROLL) ) { - nExpend = min(min(nStack, nCap), nExpend); //capped by charges and capacity + nExpend = PRCMin(PRCMin(nStack, nCap), nExpend); //capped by charges and capacity if(nExpend == nStack) DestroyObject(oItem); else diff --git a/nwn/nwnprc/trunk/include/prc_x2_craft.nss b/nwn/nwnprc/trunk/include/prc_x2_craft.nss index 3934039e..ddf458fd 100644 --- a/nwn/nwnprc/trunk/include/prc_x2_craft.nss +++ b/nwn/nwnprc/trunk/include/prc_x2_craft.nss @@ -2898,11 +2898,11 @@ int GetAlternativeCasterLevel(object oPC, int nLevel) nLevel += GetLevelByClass(CLASS_TYPE_IRONSOUL_FORGEMASTER) * 3; if(GetLocalInt(oPC, "UsingImbueItem")) { - nLevel = max(GetLocalInt(oPC, "InvokerLevel"), nLevel); + nLevel = PRCMax(GetLocalInt(oPC, "InvokerLevel"), nLevel); } if(GetLocalInt(oPC, "ArtificerCrafting")) { - nLevel = max(GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC), nLevel); + nLevel = PRCMax(GetLevelByClass(CLASS_TYPE_ARTIFICER, oPC), nLevel); } return nLevel; } diff --git a/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss b/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss index 7ded28e7..424ed0e6 100644 --- a/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss +++ b/nwn/nwnprc/trunk/include/prc_x2_itemprop.nss @@ -1145,9 +1145,57 @@ object IPGetTargetedOrEquippedMeleeWeapon() } - - object IPGetTargetedOrEquippedArmor(int bAllowShields = FALSE) +{ + object oTarget = PRCGetSpellTargetObject(); + + // If the target is a valid item + if (GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM) + { + // Check if the item is armor + if (GetBaseItemType(oTarget) == BASE_ITEM_ARMOR) + { + return oTarget; + } + // Check if the item is a shield and shields are allowed + if (bAllowShields && (GetBaseItemType(oTarget) == BASE_ITEM_LARGESHIELD || + GetBaseItemType(oTarget) == BASE_ITEM_SMALLSHIELD || + GetBaseItemType(oTarget) == BASE_ITEM_TOWERSHIELD)) + { + return oTarget; + } + return OBJECT_INVALID; + } + + // If the target is a creature + if (GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_CREATURE) + { + // Check the equipped armor + object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget); + if (GetIsObjectValid(oArmor) && GetBaseItemType(oArmor) == BASE_ITEM_ARMOR) + { + return oArmor; + } + + // Check the equipped shield if shields are allowed + if (bAllowShields) + { + oArmor = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oTarget); + if (GetIsObjectValid(oArmor) && (GetBaseItemType(oArmor) == BASE_ITEM_LARGESHIELD || + GetBaseItemType(oArmor) == BASE_ITEM_SMALLSHIELD || + GetBaseItemType(oArmor) == BASE_ITEM_TOWERSHIELD)) + { + return oArmor; + } + } + } + + // Return invalid object if no valid armor or shield is found + return OBJECT_INVALID; +} + + +/* object IPGetTargetedOrEquippedArmor(int bAllowShields = FALSE) { object oTarget = PRCGetSpellTargetObject(); if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM) @@ -1193,7 +1241,7 @@ object IPGetTargetedOrEquippedArmor(int bAllowShields = FALSE) return OBJECT_INVALID; } - + */ // ---------------------------------------------------------------------------- // Returns FALSE it the item has no sequencer property // Returns number of spells that can be stored in any other case @@ -1578,7 +1626,7 @@ int IPGetWeaponEnhancementBonus(object oWeapon, int nEnhancementBonusType = ITEM if(GetItemPropertyDurationType(ip) == DURATION_TYPE_PERMANENT || !bIgnoreTemporary) { nTemp = GetItemPropertyCostTableValue(ip); - nFound = max(nFound, nTemp); + nFound = PRCMax(nFound, nTemp); } } ip = GetNextItemProperty(oWeapon); diff --git a/nwn/nwnprc/trunk/include/psi_inc_augment.nss b/nwn/nwnprc/trunk/include/psi_inc_augment.nss index d3320ff9..d2cfb0e6 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_augment.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_augment.nss @@ -592,7 +592,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow // Determine how many times it can be used and how much it costs nTimesAugd = nTimesCanAug == PRC_UNLIMITED_AUGMENTATION ? nToAutodistribute / pap.nAugCost_1 : - min(nToAutodistribute / pap.nAugCost_1, nTimesCanAug); + PRCMin(nToAutodistribute / pap.nAugCost_1, nTimesCanAug); nToAutodistribute -= nTimesAugd * pap.nAugCost_1; manif.nTimesAugOptUsed_1 += nTimesAugd; @@ -611,7 +611,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow // Determine how many times it can be used and how much it costs nTimesAugd = nTimesCanAug == PRC_UNLIMITED_AUGMENTATION ? nToAutodistribute / pap.nAugCost_2 : - min(nToAutodistribute / pap.nAugCost_2, nTimesCanAug); + PRCMin(nToAutodistribute / pap.nAugCost_2, nTimesCanAug); nToAutodistribute -= nTimesAugd * pap.nAugCost_2; manif.nTimesAugOptUsed_2 += nTimesAugd; @@ -630,7 +630,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow // Determine how many times it can be used and how much it costs nTimesAugd = nTimesCanAug == PRC_UNLIMITED_AUGMENTATION ? nToAutodistribute / pap.nAugCost_3 : - min(nToAutodistribute / pap.nAugCost_3, nTimesCanAug); + PRCMin(nToAutodistribute / pap.nAugCost_3, nTimesCanAug); nToAutodistribute -= nTimesAugd * pap.nAugCost_3; manif.nTimesAugOptUsed_3 += nTimesAugd; @@ -649,7 +649,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow // Determine how many times it can be used and how much it costs nTimesAugd = nTimesCanAug == PRC_UNLIMITED_AUGMENTATION ? nToAutodistribute / pap.nAugCost_4 : - min(nToAutodistribute / pap.nAugCost_4, nTimesCanAug); + PRCMin(nToAutodistribute / pap.nAugCost_4, nTimesCanAug); nToAutodistribute -= nTimesAugd * pap.nAugCost_4; manif.nTimesAugOptUsed_4 += nTimesAugd; @@ -668,7 +668,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow // Determine how many times it can be used and how much it costs nTimesAugd = nTimesCanAug == PRC_UNLIMITED_AUGMENTATION ? nToAutodistribute / pap.nAugCost_5 : - min(nToAutodistribute / pap.nAugCost_5, nTimesCanAug); + PRCMin(nToAutodistribute / pap.nAugCost_5, nTimesCanAug); nToAutodistribute -= nTimesAugd * pap.nAugCost_5; manif.nTimesAugOptUsed_5 += nTimesAugd; @@ -687,7 +687,7 @@ struct manifestation EvaluateAugmentation(struct manifestation manif, struct pow } // Add in cost reduction - nAugPPCost = max(0, nAugPPCost - nAugPPCostReductions); + nAugPPCost = PRCMax(0, nAugPPCost - nAugPPCostReductions); // Store the PP cost increase manif.nPPCost += nAugPPCost; diff --git a/nwn/nwnprc/trunk/include/psi_inc_core.nss b/nwn/nwnprc/trunk/include/psi_inc_core.nss index b77aae0f..972b5256 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_core.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_core.nss @@ -791,6 +791,64 @@ int GetIsPsionicCharacter(object oCreature) ); } +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; @@ -1092,7 +1150,7 @@ int GetHighestManifesterLevel(object oCreature) /* int GetHighestManifesterLevel(object oCreature) { - return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, + return PRCMax(PRCMax(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 ), GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetManifesterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 diff --git a/nwn/nwnprc/trunk/include/psi_inc_metapsi.nss b/nwn/nwnprc/trunk/include/psi_inc_metapsi.nss index b3710ebd..c005f0c1 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_metapsi.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_metapsi.nss @@ -127,7 +127,7 @@ int _GetMetaPsiPPCost(int nCost, int nIMPsiRed, int bUseSum) nCost : bUseSum ? nCost : // When calculating Improved Metapsionics separately, it cannot make the cost of a single metapsionic use go below 1 - max(nCost - nIMPsiRed, 1); + PRCMax(nCost - nIMPsiRed, 1); } /** Internal function. @@ -477,7 +477,7 @@ void EvaluateChainPower(struct manifestation manif, object oPrimaryTarget, int b if(manif.bChain) { // It is, determine amount of secondary targets and range to look for the over - int nMaxTargets = min(manif.nManifesterLevel, 20); // Chain Power maxes out at 20 secondary targets + int nMaxTargets = PRCMin(manif.nManifesterLevel, 20); // Chain Power maxes out at 20 secondary targets float fRange = FeetToMeters(30.0f); location lTarget = GetLocation(oPrimaryTarget); object oSecondaryTarget; diff --git a/nwn/nwnprc/trunk/include/psi_inc_ppoints.nss b/nwn/nwnprc/trunk/include/psi_inc_ppoints.nss index 08e3b2d4..a98f0fbb 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_ppoints.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_ppoints.nss @@ -134,20 +134,23 @@ void LoseAllPowerPoints(object oChar, int bInform = TRUE); * @param oChar Character whose feats to evaluate * @return The amount of Power Points gained from Feats */ -int _GetFeatBonusPP(object oChar){ +int _GetFeatBonusPP(object oChar) +{ int nBonusPP = 0; - // Normal feats - if(GetHasFeat(FEAT_WILD_TALENT, oChar)) +//:: Wild Talent & Hidden Talents + if(GetHasFeat(FEAT_WILD_TALENT, oChar) || IsHiddenTalent()) nBonusPP += 2; - int i, nPsiTalents; +//:: Psionic Feats + int i; + int nPsiTalents; for(i = FEAT_PSIONIC_TALENT_1; i <= FEAT_PSIONIC_TALENT_10; i++) if(GetHasFeat(i, oChar)) nPsiTalents++; nBonusPP += nPsiTalents * (2 + nPsiTalents + 1) / 2; - // Epic feats +//:: Epic feats int nImpManifestations; for(i = FEAT_IMPROVED_MANIFESTATION_1; i <= FEAT_IMPROVED_MANIFESTATION_10; i++) if(GetHasFeat(i, oChar)) nImpManifestations++; diff --git a/nwn/nwnprc/trunk/include/psi_inc_psifunc.nss b/nwn/nwnprc/trunk/include/psi_inc_psifunc.nss index 8abece82..5e96a403 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_psifunc.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_psifunc.nss @@ -254,7 +254,7 @@ int _PsionicHole(object oTarget) if(GetHasFeat(FEAT_PSIONIC_HOLE, oTarget)) // Psionic Hole will never decrease power cost, even if the target is lacking in wisdom bonus - nCost = max(GetAbilityModifier(ABILITY_WISDOM, oTarget), 0); + nCost = PRCMax(GetAbilityModifier(ABILITY_WISDOM, oTarget), 0); return nCost; } diff --git a/nwn/nwnprc/trunk/include/psi_inc_pwresist.nss b/nwn/nwnprc/trunk/include/psi_inc_pwresist.nss index cf45f07c..e1c5a96f 100644 --- a/nwn/nwnprc/trunk/include/psi_inc_pwresist.nss +++ b/nwn/nwnprc/trunk/include/psi_inc_pwresist.nss @@ -79,7 +79,7 @@ PRCGetPowerResistance(object oTarget, object oCaster) ) { // Only use the PR given by the power if it's higher than the previous - iPowerRes = max(iPowerRes, GetLocalInt(oTarget, "PRC_Power_ThoughtShield_PR")); + iPowerRes = PRCMax(iPowerRes, GetLocalInt(oTarget, "PRC_Power_ThoughtShield_PR")); } // Tower of Iron Will, 19 + augment vs Mind-Affecting if(GetLocalInt(oTarget, "PRC_Power_TowerOfIronWill_PR") && @@ -87,7 +87,7 @@ PRCGetPowerResistance(object oTarget, object oCaster) ) { // Only use the PR given by the power if it's higher than the previous - iPowerRes = max(iPowerRes, GetLocalInt(oTarget, "PRC_Power_TowerOfIronWill_PR")); + iPowerRes = PRCMax(iPowerRes, GetLocalInt(oTarget, "PRC_Power_TowerOfIronWill_PR")); } // Foe Hunter SR stacks with normal SR diff --git a/nwn/nwnprc/trunk/include/shd_inc_shdfunc.nss b/nwn/nwnprc/trunk/include/shd_inc_shdfunc.nss index cca43698..63eb943d 100644 --- a/nwn/nwnprc/trunk/include/shd_inc_shdfunc.nss +++ b/nwn/nwnprc/trunk/include/shd_inc_shdfunc.nss @@ -323,7 +323,7 @@ int GetHighestShadowcasterLevel(object oCreature) /* int GetHighestShadowcasterLevel(object oCreature) { - return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, + return PRCMax(PRCMax(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 ), GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetShadowcasterLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 diff --git a/nwn/nwnprc/trunk/include/spinc_maze.nss b/nwn/nwnprc/trunk/include/spinc_maze.nss index 1c61249b..8e6a8520 100644 --- a/nwn/nwnprc/trunk/include/spinc_maze.nss +++ b/nwn/nwnprc/trunk/include/spinc_maze.nss @@ -140,8 +140,8 @@ void MazeEscapeHB(object oCreature, int nCountLeft) int bResult = (nD20 + nIntMod) >= MAZE_ESCAPE_DC; // Inform the creature of the result - SendMessageToPC(oCreature, GetRGB(7,7,15) + GetName(oCreature) + "" + // "Int check" "success" "failure" - GetRGB(1,1,15) + " : " + GetStringByStrRef(16825701) + " : *" + (bResult ? GetStringByStrRef(5352) : GetStringByStrRef(5353)) + "* : (" + IntToString(nD20) + " + " + IntToString(nIntMod) + " = " + IntToString(nD20 + nIntMod) + " vs. DC: " + IntToString(MAZE_ESCAPE_DC) + ")"); + SendMessageToPC(oCreature, PRCGetRGB(7,7,15) + GetName(oCreature) + "" + // "Int check" "success" "failure" + PRCGetRGB(1,1,15) + " : " + GetStringByStrRef(16825701) + " : *" + (bResult ? GetStringByStrRef(5352) : GetStringByStrRef(5353)) + "* : (" + IntToString(nD20) + " + " + IntToString(nIntMod) + " = " + IntToString(nD20 + nIntMod) + " vs. DC: " + IntToString(MAZE_ESCAPE_DC) + ")"); // Return from the maze if the check was successfull if(bResult) diff --git a/nwn/nwnprc/trunk/include/tob_inc_tobfunc.nss b/nwn/nwnprc/trunk/include/tob_inc_tobfunc.nss index 04230160..f0e22ce4 100644 --- a/nwn/nwnprc/trunk/include/tob_inc_tobfunc.nss +++ b/nwn/nwnprc/trunk/include/tob_inc_tobfunc.nss @@ -518,7 +518,7 @@ int GetInitiatorLevel(object oInitiator = OBJECT_SELF, int nSpecificClass = CLAS // A character with no initiator levels has an init level of 1/2 HD (min 1) if(!nLevel) - nLevel = max(1, nTotalHD/2); + nLevel = PRCMax(1, nTotalHD/2); // This spam is technically no longer necessary once the Initiator level getting mechanism has been confirmed to work // if(DEBUG) FloatingTextStringOnCreature("Initiator Level: " + IntToString(nLevel), oInitiator, FALSE); @@ -557,7 +557,7 @@ int GetHighestInitiatorLevel(object oCreature) /* int GetHighestInitiatorLevel(object oCreature) { - return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, + return PRCMax(PRCMax(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 ), GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetInitiatorLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 diff --git a/nwn/nwnprc/trunk/include/true_inc_trufunc.nss b/nwn/nwnprc/trunk/include/true_inc_trufunc.nss index f60ee313..355783a8 100644 --- a/nwn/nwnprc/trunk/include/true_inc_trufunc.nss +++ b/nwn/nwnprc/trunk/include/true_inc_trufunc.nss @@ -368,7 +368,7 @@ int GetHighestTrueSpeakerLevel(object oCreature) /* int GetHighestTrueSpeakerLevel(object oCreature) { - return max(max(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, + return PRCMax(PRCMax(GetClassByPosition(1, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(1, oCreature)) : 0, GetClassByPosition(2, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(2, oCreature)) : 0 ), GetClassByPosition(3, oCreature) != CLASS_TYPE_INVALID ? GetTruespeakerLevel(oCreature, GetClassByPosition(3, oCreature)) : 0 diff --git a/nwn/nwnprc/trunk/include/x2_inc_spellhook.nss b/nwn/nwnprc/trunk/include/x2_inc_spellhook.nss index 428ce1fd..71aaa5b8 100644 --- a/nwn/nwnprc/trunk/include/x2_inc_spellhook.nss +++ b/nwn/nwnprc/trunk/include/x2_inc_spellhook.nss @@ -2307,7 +2307,7 @@ int InnateCounterspell(object oCaster, int nSpellId, int nSpellLevel) // Set a marker on the Noctumancer at the right level if (GetLevelByClass(CLASS_TYPE_NOCTUMANCER) >= 7) { - int nStore = min(1, nSpellLevel/2); + int nStore = PRCMin(1, nSpellLevel/2); SetLocalInt(oShadow, "InnateCounterSuccess", nStore); FloatingTextStringOnCreature("You have one free mystery of "+IntToString(nStore)+" level", oShadow, FALSE); } diff --git a/nwn/nwnprc/trunk/makefile.temp b/nwn/nwnprc/trunk/makefile.temp index 45a12393..1c7fe9cf 100644 --- a/nwn/nwnprc/trunk/makefile.temp +++ b/nwn/nwnprc/trunk/makefile.temp @@ -573,6 +573,7 @@ scripts\ft_spontsummon.nss \ scripts\ft_tears_ever.nss \ scripts\ft_vowofpoverty.nss \ scripts\ft_vowpoverty_ab.nss \ +scripts\ft_vowpoverty_ft.nss \ scripts\gen_sptouchice.nss \ scripts\gensp_holyrad.nss \ scripts\gensp_holyrada.nss \ @@ -2664,7 +2665,7 @@ spells\sp_right_smt.nss \ spells\sp_rightmt.nss \ spells\sp_ring_blds.nss \ spells\sp_ring_bldsa.nss \ -spells\sp_ring_bldsc.nss \ +spells\sp_ring_bldsC.nss \ spells\sp_rotcurse_urf.nss \ spells\sp_rouse.nss \ spells\sp_sannish.nss \ @@ -3186,6 +3187,7 @@ objs\ft_spontsummon.ncs \ objs\ft_tears_ever.ncs \ objs\ft_vowofpoverty.ncs \ objs\ft_vowpoverty_ab.ncs \ +objs\ft_vowpoverty_ft.ncs \ objs\gen_sptouchice.ncs \ objs\gensp_holyrad.ncs \ objs\gensp_holyrada.ncs \ @@ -5276,7 +5278,7 @@ spellobjs\sp_right_smt.ncs \ spellobjs\sp_rightmt.ncs \ spellobjs\sp_ring_blds.ncs \ spellobjs\sp_ring_bldsa.ncs \ -spellobjs\sp_ring_bldsc.ncs \ +spellobjs\sp_ring_bldsC.ncs \ spellobjs\sp_rotcurse_urf.ncs \ spellobjs\sp_rouse.ncs \ spellobjs\sp_sannish.ncs \ @@ -6824,7 +6826,7 @@ epicspellobjs\wander_unseen.ncs 2das\iprp_damagetype.2da \ 2das\iprp_decvalue1.2da \ 2das\iprp_decvalue2.2da \ -2das\iprp_feats.2da \ +2das\iprp_feats.2DA \ 2das\iprp_incvalue1.2da \ 2das\iprp_incvalue2.2da \ 2das\iprp_matcost.2da \ @@ -6886,6 +6888,7 @@ epicspellobjs\wander_unseen.ncs 2das\prc_polymorph.2da \ 2das\prc_rune_craft.2da \ 2das\prc_spells.2da \ +2das\prc_vop_feats.2da \ 2das\prc_weap_items.2da \ 2das\ruleset.2da \ 2das\shft_packages.2da \ @@ -7695,6 +7698,7 @@ gfx\ife_cfrenzy.tga \ gfx\ife_championsval.tga \ gfx\ife_chilltouch.tga \ gfx\ife_chmonray.tga \ +gfx\ife_chosen_evil.tga \ gfx\ife_chperray.tga \ gfx\ife_climb.tga \ gfx\ife_closedmind.tga \ @@ -24457,6 +24461,7 @@ psionics\psi_g_psi_weapon.nss \ psionics\psi_g_stroftwo.nss \ psionics\psi_gen_enter.nss \ psionics\psi_gen_exit.nss \ +psionics\psi_hiddentalent.nss \ psionics\psi_imnd_armmnd.nss \ psionics\psi_imnd_lndrslv.nss \ psionics\psi_imnd_mindbod.nss \ @@ -25066,6 +25071,7 @@ psionicsobjs\psi_g_psi_weapon.ncs \ psionicsobjs\psi_g_stroftwo.ncs \ psionicsobjs\psi_gen_enter.ncs \ psionicsobjs\psi_gen_exit.ncs \ +psionicsobjs\psi_hiddentalent.ncs \ psionicsobjs\psi_imnd_armmnd.ncs \ psionicsobjs\psi_imnd_lndrslv.ncs \ psionicsobjs\psi_imnd_mindbod.ncs \ @@ -28514,7 +28520,7 @@ objs\ft_pinpointaccu.ncs: scripts\ft_pinpointaccu.nss include\prc_inc_combat.nss objs\ft_poweratk.ncs: scripts\ft_poweratk.nss include\prc_inc_combat.nss include\inc_addragebonus.nss include\prc_inc_unarmed.nss include\prc_inc_onhit.nss include\prc_misc_const.nss include\prc_inc_fork.nss include\prc_inc_natweap.nss include\inc_utility.nss include\prc_inc_spells.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\inc_abil_damage.nss -objs\ft_sanctmartial.ncs: scripts\ft_sanctmartial.nss include\prc_inc_clsfunc.nss include\psi_inc_soulkn.nss include\prc_inc_spells.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\inc_2dacache.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_array.nss include\prc_class_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_alterations.nss include\inc_abil_damage.nss +objs\ft_sanctmartial.ncs: scripts\ft_sanctmartial.nss include\prc_inc_clsfunc.nss include\psi_inc_soulkn.nss include\prc_inc_combat.nss include\prc_inc_spells.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\inc_2dacache.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_array.nss include\prc_class_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_alterations.nss include\inc_abil_damage.nss include\prc_inc_unarmed.nss include\prc_inc_onhit.nss include\prc_inc_fork.nss include\prc_inc_natweap.nss objs\ft_servheaven.ncs: scripts\ft_servheaven.nss include\prc_inc_skin.nss include\prc_feat_const.nss include\inc_debug.nss include\prc_inc_switch.nss @@ -28530,6 +28536,8 @@ objs\ft_vowofpoverty.ncs: scripts\ft_vowofpoverty.nss include\prc_inc_combat.nss objs\ft_vowpoverty_ab.ncs: scripts\ft_vowpoverty_ab.nss include\inc_dynconv.nss include\prc_inc_function.nss include\inc_persist_loca.nss include\prc_inc_array.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_util.nss include\prc_inc_spells.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss include\prc_alterations.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss +objs\ft_vowpoverty_ft.ncs: scripts\ft_vowpoverty_ft.nss include\inc_dynconv.nss include\prc_inc_function.nss include\inc_persist_loca.nss include\prc_inc_array.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_util.nss include\prc_inc_spells.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss include\prc_alterations.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss + objs\gen_sptouchice.ncs: scripts\gen_sptouchice.nss include\prc_alterations.nss include\prc_inc_spells.nss include\inc_poison.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss objs\gensp_holyrad.ncs: scripts\gensp_holyrad.nss include\prc_class_const.nss include\x2_inc_spellhook.nss include\prc_alterations.nss include\prc_spell_const.nss include\prc_x2_craft.nss include\prc_inc_spells.nss include\prc_inc_combat.nss include\prc_inc_itmrstr.nss include\prc_inc_burn.nss include\pnp_shft_main.nss include\inc_dynconv.nss include\inc_npc.nss include\prc_inc_newip.nss include\prc_add_spell_dc.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_descrptr.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_inc_unarmed.nss include\prc_inc_onhit.nss include\prc_inc_fork.nss include\prc_inc_natweap.nss include\inc_abil_damage.nss include\prc_getbest_inc.nss include\prc_inc_function.nss include\prc_inc_util.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss @@ -29540,7 +29548,7 @@ objs\prc_fb_auto_fre.ncs: scripts\prc_fb_auto_fre.nss include\prc_spell_const.ns objs\prc_fb_deathless.ncs: scripts\prc_fb_deathless.nss -objs\prc_feats.ncs: scripts\prc_feats.nss include\moi_inc_moifunc.nss include\prc_inc_clsfunc.nss include\inc_persist_loca.nss include\prc_inc_natweap.nss include\prc_inc_function.nss include\inc_utility.nss include\prc_inc_spells.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_inc_util.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss include\prc_alterations.nss include\inc_abil_damage.nss +objs\prc_feats.ncs: scripts\prc_feats.nss include\moi_inc_moifunc.nss include\prc_inc_clsfunc.nss include\psi_inc_core.nss include\inc_persist_loca.nss include\prc_inc_natweap.nss include\prc_inc_function.nss include\inc_utility.nss include\prc_inc_spells.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss include\prc_inc_util.nss include\prc_inc_stunfist.nss include\inc_nwnx_funcs.nss include\prc_template_con.nss include\prc_alterations.nss include\inc_abil_damage.nss include\psi_inc_const.nss include\prc_inc_unarmed.nss objs\prc_fh_da.ncs: scripts\prc_fh_da.nss include\prc_alterations.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss @@ -29836,7 +29844,7 @@ objs\prc_initdraconic.ncs: scripts\prc_initdraconic.nss include\prc_inc_clsfunc. objs\prc_insfre.ncs: scripts\prc_insfre.nss include\prc_alterations.nss include\prc_feat_const.nss include\prc_class_const.nss include\prc_spell_const.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss -objs\prc_intuiatk.ncs: scripts\prc_intuiatk.nss include\prc_alterations.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss +objs\prc_intuiatk.ncs: scripts\prc_intuiatk.nss include\prc_alterations.nss include\prc_inc_unarmed.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\prc_inc_natweap.nss include\prc_inc_spells.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss objs\prc_is_ethereal.ncs: scripts\prc_is_ethereal.nss @@ -34134,6 +34142,8 @@ psionicsobjs\psi_gen_enter.ncs: psionics\psi_gen_enter.nss include\psi_inc_psifu psionicsobjs\psi_gen_exit.ncs: psionics\psi_gen_exit.nss +psionicsobjs\psi_hiddentalent.ncs: psionics\psi_hiddentalent.nss include\prc_feat_const.nss include\psi_inc_core.nss include\psi_inc_powknown.nss include\prc_class_const.nss include\psi_inc_const.nss include\prc_inc_unarmed.nss include\prc_inc_natweap.nss include\inc_utility.nss include\prc_inc_spells.nss include\prc_inc_nwscript.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\inc_item_props.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_damage.nss include\prc_inc_sb_const.nss include\prc_effect_inc.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_prc_npc.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss + psionicsobjs\psi_imnd_armmnd.ncs: psionics\psi_imnd_armmnd.nss include\prc_alterations.nss include\psi_inc_psifunc.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\psi_inc_metapsi.nss include\psi_inc_ppoints.nss include\psi_inc_augment.nss include\psi_inc_psicraft.nss include\psi_inc_powknown.nss include\psi_inc_core.nss include\psi_inc_const.nss include\prc_inc_unarmed.nss include\prc_inc_natweap.nss include\prc_inc_spells.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss psionicsobjs\psi_imnd_lndrslv.ncs: psionics\psi_imnd_lndrslv.nss include\prc_alterations.nss include\psi_inc_psifunc.nss include\inc_abil_damage.nss include\prc_inc_damage.nss include\prc_effect_inc.nss include\inc_item_props.nss include\prc_inc_castlvl.nss include\prc_inc_newip.nss include\prc_inc_descrptr.nss include\prc_x2_itemprop.nss include\prc_ipfeat_const.nss include\inc_utility.nss include\prc_inc_nwscript.nss include\prc_class_const.nss include\inc_target_list.nss include\inc_logmessage.nss include\inc_threads.nss include\prc_inc_actions.nss include\inc_time.nss include\inc_draw_prc.nss include\inc_eventhook.nss include\inc_metalocation.nss include\inc_array_sort.nss include\inc_uniqueid.nss include\inc_set.nss include\prc_misc_const.nss include\prc_spell_const.nss include\inv_invoc_const.nss include\psi_power_const.nss include\prc_inc_racial.nss include\prc_inc_array.nss include\moi_meld_const.nss include\bnd_vestig_const.nss include\inc_2dacache.nss include\prc_feat_const.nss include\prc_racial_const.nss include\inc_debug.nss include\prc_inc_switch.nss include\inc_persist_loca.nss include\prc_inc_skin.nss include\inc_persistsql.nss include\inc_draw.nss include\inc_draw_tools.nss include\inc_pers_array.nss include\inc_area.nss include\inc_heap.nss include\inc_prc_npc.nss include\psi_inc_metapsi.nss include\psi_inc_ppoints.nss include\psi_inc_augment.nss include\psi_inc_psicraft.nss include\psi_inc_powknown.nss include\psi_inc_core.nss include\psi_inc_const.nss include\prc_inc_unarmed.nss include\prc_inc_natweap.nss include\prc_inc_spells.nss include\inc_newspellbook.nss include\inc_vfx_const.nss include\spinc_necro_cyst.nss include\true_utter_const.nss include\prc_inc_sneak.nss include\prcsp_engine.nss include\prc_inc_core.nss include\inc_sp_gain_mem.nss include\lookup_2da_spell.nss include\inc_lookups.nss include\prc_inc_sb_const.nss include\tob_move_const.nss include\prcsp_archmaginc.nss include\prc_add_spl_pen.nss include\prcsp_reputation.nss diff --git a/nwn/nwnprc/trunk/newspellbook/bnd_events.nss b/nwn/nwnprc/trunk/newspellbook/bnd_events.nss index b014aacb..ae3acfa4 100644 --- a/nwn/nwnprc/trunk/newspellbook/bnd_events.nss +++ b/nwn/nwnprc/trunk/newspellbook/bnd_events.nss @@ -123,7 +123,7 @@ void EurynomePoisonBloodDelay(object oBinder, object oTarget, int nDC) { if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_POISON)) { - int nDice = min(5, GetBinderLevel(oBinder, VESTIGE_EURYNOME)/3); + int nDice = PRCMin(5, GetBinderLevel(oBinder, VESTIGE_EURYNOME)/3); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_ACID_S), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d6(nDice), DAMAGE_TYPE_ACID), oTarget); } diff --git a/nwn/nwnprc/trunk/newspellbook/bnd_kss_prot.nss b/nwn/nwnprc/trunk/newspellbook/bnd_kss_prot.nss index eb9941ac..de43f1a6 100644 --- a/nwn/nwnprc/trunk/newspellbook/bnd_kss_prot.nss +++ b/nwn/nwnprc/trunk/newspellbook/bnd_kss_prot.nss @@ -15,7 +15,7 @@ void main() { object oBinder = OBJECT_SELF; int nKSSLvl = GetLevelByClass(CLASS_TYPE_KNIGHT_SACRED_SEAL, oBinder); - int nCHAmod = max(1, GetAbilityModifier(ABILITY_CHARISMA, oBinder)); + int nCHAmod = PRCMax(1, GetAbilityModifier(ABILITY_CHARISMA, oBinder)); int nSpellID = PRCGetSpellId(); if(GetIsPatronVestigeBound(oBinder)) diff --git a/nwn/nwnprc/trunk/newspellbook/bnd_vest_buerhl.nss b/nwn/nwnprc/trunk/newspellbook/bnd_vest_buerhl.nss index a3fa3fad..c44f8c2e 100644 --- a/nwn/nwnprc/trunk/newspellbook/bnd_vest_buerhl.nss +++ b/nwn/nwnprc/trunk/newspellbook/bnd_vest_buerhl.nss @@ -29,7 +29,7 @@ void main() if(!BindAbilCooldown(oBinder, GetSpellId(), VESTIGE_BUER)) return; object oTarget = PRCGetSpellTargetObject(); int nBinderLevel = GetBinderLevel(oBinder, VESTIGE_BUER); - int nHeal = d8() + min(nBinderLevel, 10); + int nHeal = d8() + PRCMin(nBinderLevel, 10); if(PRCGetIsAliveCreature(oTarget)) { diff --git a/nwn/nwnprc/trunk/newspellbook/inv_dra_beglinf.nss b/nwn/nwnprc/trunk/newspellbook/inv_dra_beglinf.nss index 09512b7e..d6cc33d0 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_dra_beglinf.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_dra_beglinf.nss @@ -25,7 +25,7 @@ void main() object oCaster = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); int CasterLvl = GetInvokerLevel(oCaster, GetInvokingClass()); - int nSkillBonus = GetHasFeat(FEAT_MORPHEME_SAVANT) ? max(GetAbilityModifier(ABILITY_CHARISMA, oCaster) * 2, 6) : 6; + int nSkillBonus = GetHasFeat(FEAT_MORPHEME_SAVANT) ? PRCMax(GetAbilityModifier(ABILITY_CHARISMA, oCaster) * 2, 6) : 6; effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); effect eSkill = EffectSkillIncrease(SKILL_BLUFF, nSkillBonus); diff --git a/nwn/nwnprc/trunk/newspellbook/inv_ed_gift.nss b/nwn/nwnprc/trunk/newspellbook/inv_ed_gift.nss index 76093c04..49cee174 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_ed_gift.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_ed_gift.nss @@ -40,14 +40,14 @@ void main() } if(nSpell == INVOKE_DAMAGE_REDUCTION) { - int nDur = max(3 + nCha, 1); - int nRedAmt = ((nWarlockLvl + 1) / 4) + (max(nDiscLvl / 2, 1)); + int nDur = PRCMax(3 + nCha, 1); + int nRedAmt = ((nWarlockLvl + 1) / 4) + (PRCMax(nDiscLvl / 2, 1)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDamageReduction(nRedAmt, DAMAGE_POWER_PLUS_THREE), oPC, RoundsToSeconds(nDur)); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SUPER_HEROISM), oPC); } if(nSpell == INVOKE_FIENDISH_RESISTANCE) { - int nDur = max(3 + nCha, 1); + int nDur = PRCMax(3 + nCha, 1); if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD) { FloatingTextStringOnCreature("Your deity must be evil!", oPC, FALSE); @@ -63,7 +63,7 @@ void main() } if(nSpell == INVOKE_PROTECTIVE_AURA) { - int nDur = max(3 + nCha, 1); + int nDur = PRCMax(3 + nCha, 1); if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL) { FloatingTextStringOnCreature("Your deity must be good!", oPC, FALSE); @@ -79,15 +79,15 @@ void main() } if(nSpell == INVOKE_STRENGTH_OF_WILL) { - int nDur = max(3 + nCha, 1); - int nBonus = max(nDiscLvl / 2, 1); + int nDur = PRCMax(3 + nCha, 1); + int nBonus = PRCMax(nDiscLvl / 2, 1); eGift = EffectLinkEffects(EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE), EffectSavingThrowIncrease(SAVING_THROW_WILL, nBonus, SAVING_THROW_TYPE_MIND_SPELLS)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eGift, oPC, RoundsToSeconds(nDur)); } if(nSpell == INVOKE_WILD_FRENZY) { - int nDur = max(3 + nCha, 1); + int nDur = PRCMax(3 + nCha, 1); int nTempHP = 2 * nDiscLvl; if(GetAlignmentLawChaos(oPC) == ALIGNMENT_LAWFUL) { diff --git a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_blast.nss b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_blast.nss index 508fd306..e68340ec 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_blast.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_blast.nss @@ -41,8 +41,8 @@ void main() //calculate DC for essence effects int nInvLevel = GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK); - int nBlastLvl = min((nInvLevel + 1) / 2, 9); - nBlastLvl = max(max(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); + int nBlastLvl = PRCMin((nInvLevel + 1) / 2, 9); + nBlastLvl = PRCMax(PRCMax(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); int nDC = 10 + nBlastLvl + GetAbilityModifier(ABILITY_CHARISMA); if(GetHasFeat(FEAT_LORD_OF_ALL_ESSENCES)) nDC += 2; diff --git a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_chain.nss b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_chain.nss index 75a4b8ba..b456ba9e 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_chain.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_chain.nss @@ -36,8 +36,8 @@ void main() //calculate DC for essence effects int nInvLevel = GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK); - int nBlastLvl = min((nInvLevel + 1) / 2, 9); - nBlastLvl = max(4, max(max(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl)); + int nBlastLvl = PRCMin((nInvLevel + 1) / 2, 9); + nBlastLvl = PRCMax(4, PRCMax(PRCMax(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl)); int nDC = 10 + nBlastLvl + GetAbilityModifier(ABILITY_CHARISMA); if(GetHasFeat(FEAT_LORD_OF_ALL_ESSENCES)) nDC += 2; diff --git a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_shape.nss b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_shape.nss index 7c85eafd..daba2cd7 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_eldtch_shape.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_eldtch_shape.nss @@ -71,8 +71,8 @@ void main() //calculate DC for essence effects int nInvLevel = GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK); - int nBlastLvl = min((nInvLevel + 1) / 2, 9); - nBlastLvl = max(nShapeLevel, max(max(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl)); + int nBlastLvl = PRCMin((nInvLevel + 1) / 2, 9); + nBlastLvl = PRCMax(nShapeLevel, PRCMax(PRCMax(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl)); int nDC = 10 + nBlastLvl + GetAbilityModifier(ABILITY_CHARISMA); if(GetHasFeat(FEAT_LORD_OF_ALL_ESSENCES)) nDC += 2; int nDmgDice = GetBlastDamageDices(oPC, nInvLevel); diff --git a/nwn/nwnprc/trunk/newspellbook/inv_eldtchglv_ht.nss b/nwn/nwnprc/trunk/newspellbook/inv_eldtchglv_ht.nss index 62fd9819..b6747ef4 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_eldtchglv_ht.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_eldtchglv_ht.nss @@ -32,8 +32,8 @@ void main() //calculate DC for essence effects int nInvLevel = GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK); - int nBlastLvl = min((nInvLevel + 1) / 2, 9); - nBlastLvl = max(max(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); + int nBlastLvl = PRCMin((nInvLevel + 1) / 2, 9); + nBlastLvl = PRCMax(PRCMax(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); int nDC = 10 + nBlastLvl + GetAbilityModifier(ABILITY_CHARISMA); if(GetHasFeat(FEAT_LORD_OF_ALL_ESSENCES)) nDC += 2; diff --git a/nwn/nwnprc/trunk/newspellbook/inv_hideous_blow.nss b/nwn/nwnprc/trunk/newspellbook/inv_hideous_blow.nss index 3d52e759..bd7d95c0 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_hideous_blow.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_hideous_blow.nss @@ -36,8 +36,8 @@ void main() //calculate DC for essence effects int nInvLevel = GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK); - int nBlastLvl = min((nInvLevel + 1) / 2, 9); - nBlastLvl = max(max(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); + int nBlastLvl = PRCMin((nInvLevel + 1) / 2, 9); + nBlastLvl = PRCMax(PRCMax(nEssenceData & 0xF, nEssenceData2 & 0xF), nBlastLvl); int nDC = 10 + nBlastLvl + GetAbilityModifier(ABILITY_CHARISMA); if(GetHasFeat(FEAT_LORD_OF_ALL_ESSENCES)) nDC += 2; diff --git a/nwn/nwnprc/trunk/newspellbook/inv_imbueitemcon.nss b/nwn/nwnprc/trunk/newspellbook/inv_imbueitemcon.nss index 2d249fd9..db578c6e 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_imbueitemcon.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_imbueitemcon.nss @@ -79,7 +79,7 @@ void main() { int nClass = GetLocalInt(oPC, "SpellType"); int nSpellbookMinLevel = 0; - int nSpellbookMaxLevel = min((GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK) + 1) / 2, 9); + int nSpellbookMaxLevel = PRCMin((GetInvokerLevel(oPC, CLASS_TYPE_WARLOCK) + 1) / 2, 9); if(DEBUG) DoDebug("inv_imbueitemcon: Spellbook max level: " + IntToString(nSpellbookMaxLevel)); string sFile = GetFileForClass(nClass); int i; diff --git a/nwn/nwnprc/trunk/newspellbook/inv_wallperlflma.nss b/nwn/nwnprc/trunk/newspellbook/inv_wallperlflma.nss index b05e6813..396d541c 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_wallperlflma.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_wallperlflma.nss @@ -30,7 +30,7 @@ void main() effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); //cap the extra damage - nCasterLvl = min(nCasterLvl, 20); + nCasterLvl = PRCMin(nCasterLvl, 20); object oTarget = GetEnteringObject(); if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster)) diff --git a/nwn/nwnprc/trunk/newspellbook/inv_wallperlflmc.nss b/nwn/nwnprc/trunk/newspellbook/inv_wallperlflmc.nss index 1cfae41c..4f3ab3b3 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_wallperlflmc.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_wallperlflmc.nss @@ -42,7 +42,7 @@ void main() effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); //cap the extra damage - nCasterLvl = min(nCasterLvl, 20); + nCasterLvl = PRCMin(nCasterLvl, 20); object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); //Declare the spell shape, size and the location. diff --git a/nwn/nwnprc/trunk/newspellbook/inv_warlock.nss b/nwn/nwnprc/trunk/newspellbook/inv_warlock.nss index 027ae189..48d2414f 100644 --- a/nwn/nwnprc/trunk/newspellbook/inv_warlock.nss +++ b/nwn/nwnprc/trunk/newspellbook/inv_warlock.nss @@ -63,7 +63,7 @@ void main() if(GetHasFeat(FEAT_PARAGON_VISIONARY)) { - int nSkillBonus = max(2 * GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF), 6); + int nSkillBonus = PRCMax(2 * GetAbilityModifier(ABILITY_WISDOM, OBJECT_SELF), 6); effect eLink = EffectLinkEffects(EffectUltravision(), EffectSeeInvisible()); eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_SPOT, nSkillBonus)); eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_LISTEN, nSkillBonus)); diff --git a/nwn/nwnprc/trunk/newspellbook/moi_essentiacnv.nss b/nwn/nwnprc/trunk/newspellbook/moi_essentiacnv.nss index a3f0a59b..6025ab40 100644 --- a/nwn/nwnprc/trunk/newspellbook/moi_essentiacnv.nss +++ b/nwn/nwnprc/trunk/newspellbook/moi_essentiacnv.nss @@ -392,7 +392,7 @@ void main() SetHeader("How much do you want to invest into "+GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nMeld)))+"?"); int i; - for(i = 1; i <= min(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacity(oMeldshaper, nClass, nMeld)); i++) + for(i = 1; i <= PRCMin(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacity(oMeldshaper, nClass, nMeld)); i++) { AddChoice(IntToString(i), i, oMeldshaper); } @@ -409,7 +409,7 @@ void main() int nMeld = GetLocalInt(oMeldshaper, "nMeld"); SetHeader("How much do you want to invest into "+GetStringByStrRef(StringToInt(Get2DACache("feat", "FEAT", nMeld)))+"?"); int i; - for(i = 1; i <= min(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacityFeat(oMeldshaper)); i++) + for(i = 1; i <= PRCMin(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacityFeat(oMeldshaper)); i++) { AddChoice(IntToString(i), i, oMeldshaper); } @@ -420,7 +420,7 @@ void main() // Build the confirmation query int nMeld = GetLocalInt(oMeldshaper, "nMeld"); SetHeader("How much do you want to invest into "+GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nMeld)))+"?"); - int nMax = min(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacityFeat(oMeldshaper)); + int nMax = PRCMin(GetTotalEssentia(oMeldshaper)-GetTotalEssentiaInvested(oMeldshaper), GetMaxEssentiaCapacityFeat(oMeldshaper)); if (nMeld == MELD_SPINE_ENHANCEMENT) nMax = GetLevelByClass(CLASS_TYPE_SPINEMELD_WARRIOR, oMeldshaper)/2; int i; for(i = 1; i <= nMax; i++) diff --git a/nwn/nwnprc/trunk/newspellbook/moi_incan_incorp.nss b/nwn/nwnprc/trunk/newspellbook/moi_incan_incorp.nss index 537df62b..dfc0318b 100644 --- a/nwn/nwnprc/trunk/newspellbook/moi_incan_incorp.nss +++ b/nwn/nwnprc/trunk/newspellbook/moi_incan_incorp.nss @@ -11,5 +11,5 @@ void main() { object oMeldshaper = PRCGetSpellTargetObject(); - SetIncorporeal(oMeldshaper, RoundsToSeconds(max(GetAbilityModifier(ABILITY_CHARISMA, oMeldshaper),1)), 1); + SetIncorporeal(oMeldshaper, RoundsToSeconds(PRCMax(GetAbilityModifier(ABILITY_CHARISMA, oMeldshaper),1)), 1); } \ No newline at end of file diff --git a/nwn/nwnprc/trunk/newspellbook/moi_midnightcnv.nss b/nwn/nwnprc/trunk/newspellbook/moi_midnightcnv.nss index ddca24a1..47743cc3 100644 --- a/nwn/nwnprc/trunk/newspellbook/moi_midnightcnv.nss +++ b/nwn/nwnprc/trunk/newspellbook/moi_midnightcnv.nss @@ -189,7 +189,7 @@ void main() int nPower = GetLocalInt(oMeldshaper, "nPower"); SetHeader("How much do you want to invest into "+GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nPower)))+"?"); int i; - int nMin = min(GetMaxEssentiaCapacityFeat(oMeldshaper), StringToInt(Get2DACache("spells", "Innate", nPower))); + int nMin = PRCMin(GetMaxEssentiaCapacityFeat(oMeldshaper), StringToInt(Get2DACache("spells", "Innate", nPower))); for(i = 1; i <= nMin; i++) { AddChoice(IntToString(i), i, oMeldshaper); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_fund_caulshd.nss b/nwn/nwnprc/trunk/newspellbook/shd_fund_caulshd.nss index cabe56dc..8893d08c 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_fund_caulshd.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_fund_caulshd.nss @@ -29,7 +29,7 @@ void main() if(myst.bCanMyst) { - int nAC = min(4, 1 + myst.nShadowcasterLevel/6); + int nAC = PRCMin(4, 1 + myst.nShadowcasterLevel/6); myst.eLink = SupernaturalEffect(EffectLinkEffects(EffectACIncrease(nAC, AC_DEFLECTION_BONUS), EffectVisualEffect(VFX_DUR_ENTROPIC_SHIELD))); myst.fDur = 60.0 * myst.nShadowcasterLevel; diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_afrddrk.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_afrddrk.nss index 012196a0..32a54b1a 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_afrddrk.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_afrddrk.nss @@ -40,7 +40,7 @@ void main() // Check Spell Resistance if(!PRCDoResistSpell(oShadow, oTarget, myst.nPen) || myst.bIgnoreSR) { - int nDam = MetashadowsDamage(myst, 6, 1, min(5, myst.nShadowcasterLevel/4)); + int nDam = MetashadowsDamage(myst, 6, 1, PRCMin(5, myst.nShadowcasterLevel/4)); if (PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetShadowcasterDC(oShadow), SAVING_THROW_TYPE_MIND_SPELLS)) nDam/2; diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_aurashd.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_aurashd.nss index dc7a8eb2..67521833 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_aurashd.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_aurashd.nss @@ -27,7 +27,7 @@ void main() if(myst.bCanMyst) { - int nAmount = min(120, myst.nShadowcasterLevel * 10); + int nAmount = PRCMin(120, myst.nShadowcasterLevel * 10); myst.eLink = EffectLinkEffects(EffectDamageResistance(DAMAGE_TYPE_COLD, nAmount, nAmount), EffectVisualEffect(VFX_DUR_PROTECTION_ENERGY_COLD)); myst.eLink = EffectLinkEffects(myst.eLink, EffectDamageIncrease(DAMAGE_BONUS_1d6, DAMAGE_TYPE_COLD)); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_bolster.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_bolster.nss index 9c933568..a206042e 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_bolster.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_bolster.nss @@ -27,7 +27,7 @@ void main() if(myst.bCanMyst) { - int nAmount = min(75, GetHitDice(oTarget) * 5); + int nAmount = PRCMin(75, GetHitDice(oTarget) * 5); myst.eLink = EffectLinkEffects(EffectTemporaryHitpoints(nAmount), EffectVisualEffect(VFX_DUR_CHAOS_CLOAK)); myst.fDur = 600.0 * myst.nShadowcasterLevel; diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshda.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshda.nss index 3327f0b7..e6affeac 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshda.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshda.nss @@ -24,7 +24,7 @@ void main() object oShadow = GetAreaOfEffectCreator(); object oAoE = GetAreaOfEffectObject(GetLocalLocation(oShadow, "BlackFire_Loc"), "VFX_PER_CURTAIN_SHADOWS"); struct mystery myst = GetLocalMystery(oShadow, MYST_HOLD_MYST+"3"); - int nDice = min(15, myst.nShadowcasterLevel); + int nDice = PRCMin(15, myst.nShadowcasterLevel); //Capture the first target object in the shape. object oTarget = GetEnteringObject(); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshdc.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshdc.nss index 58752472..450287b6 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshdc.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_crtshdc.nss @@ -31,7 +31,7 @@ void main() int nDamage; object oAoE = GetAreaOfEffectObject(GetLocalLocation(oShadow, "BlackFire_Loc"), "VFX_PER_CURTAIN_SHADOWS"); struct mystery myst = GetLocalMystery(oShadow, MYST_HOLD_MYST+"3"); - int nDice = min(15, myst.nShadowcasterLevel); + int nDice = PRCMin(15, myst.nShadowcasterLevel); //Capture the first target object in the shape. object oTarget = GetFirstInPersistentObject(OBJECT_SELF, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_flckrft.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_flckrft.nss index fd11eb23..e6dba9f5 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_flckrft.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_flckrft.nss @@ -23,7 +23,7 @@ void main() if (!GetLocalInt(oShadow, "FlickerMyst")) { - int nLevel = max(GetShadowcasterLevel(oShadow), GetLocalInt(oShadow, "TenebrousFlicker")); + int nLevel = PRCMax(GetShadowcasterLevel(oShadow), GetLocalInt(oShadow, "TenebrousFlicker")); DimensionDoor(oShadow, nLevel); SetLocalInt(oShadow, "FlickerMyst", TRUE); DelayCommand(5.5, DeleteLocalInt(oShadow, "FlickerMyst")); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_grlffds.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_grlffds.nss index 0a1ce12b..dbf13976 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_grlffds.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_grlffds.nss @@ -30,7 +30,7 @@ void main() if(myst.bCanMyst) { - int nDie = min(myst.nShadowcasterLevel, 20); + int nDie = PRCMin(myst.nShadowcasterLevel, 20); location lTargetLocation = PRCGetSpellTargetLocation(); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_VAMPIRIC_DRAIN_PRC), lTargetLocation); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_kllgshd.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_kllgshd.nss index c0d03e57..9ead8fc7 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_kllgshd.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_kllgshd.nss @@ -30,7 +30,7 @@ void main() if(myst.bCanMyst) { - int nDie = min(myst.nShadowcasterLevel, 10); + int nDie = PRCMin(myst.nShadowcasterLevel, 10); //Declare the spell shape, size and the location. Capture the first target object in the shape. object oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, FeetToMeters(30.0), lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_lifefds.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_lifefds.nss index d8412f72..ae85136b 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_lifefds.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_lifefds.nss @@ -30,7 +30,7 @@ void main() if(myst.bCanMyst) { - int nDie = min(myst.nShadowcasterLevel, 5); + int nDie = PRCMin(myst.nShadowcasterLevel, 5); myst.fDur = RoundsToSeconds(myst.nShadowcasterLevel); if(myst.bExtend) myst.fDur *= 2; myst.nPen = ShadowSRPen(oShadow, myst.nShadowcasterLevel); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_shdfd.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_shdfd.nss index 7c307079..da67a72f 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_shdfd.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_shdfd.nss @@ -37,9 +37,9 @@ void main() //-------------------------------------------------------------------------- // Dispel Magic is capped at caster level 10 //-------------------------------------------------------------------------- - int nCasterLevel = min(myst.nShadowcasterLevel, 10); + int nCasterLevel = PRCMin(myst.nShadowcasterLevel, 10); if (myst.nMystId == MYST_SHADOWS_FADE_GREATER) - nCasterLevel = min(myst.nShadowcasterLevel, 20); + nCasterLevel = PRCMin(myst.nShadowcasterLevel, 20); if (GetIsObjectValid(oTarget)) { diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_shdstrm.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_shdstrm.nss index 56cda543..9aaab848 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_shdstrm.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_shdstrm.nss @@ -33,7 +33,7 @@ void main() if(myst.bCanMyst) { - int nDie = min(myst.nShadowcasterLevel, 20); + int nDie = PRCMin(myst.nShadowcasterLevel, 20); myst.nPen = ShadowSRPen(oShadow, myst.nShadowcasterLevel); myst.nSaveDC = GetShadowcasterDC(oShadow); effect eCold = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_COLD); diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_shrpshd.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_shrpshd.nss index e013e393..2928e9a6 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_shrpshd.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_shrpshd.nss @@ -62,7 +62,7 @@ void main() int nDam = d6(); if (GetLocalInt(oShadow, "SharpShadMax")) nDam = 6; if (GetLocalInt(oShadow, "SharpShadEmp")) nDam += nDam/2; - nDam += min(15, GetShadowcasterLevel(oShadow, CLASS_TYPE_SHADOWCASTER)); + nDam += PRCMin(15, GetShadowcasterLevel(oShadow, CLASS_TYPE_SHADOWCASTER)); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGMAG), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_PIERCING), oTarget); } diff --git a/nwn/nwnprc/trunk/newspellbook/shd_myst_umbrlft.nss b/nwn/nwnprc/trunk/newspellbook/shd_myst_umbrlft.nss index ca6c7d76..e8f8121a 100644 --- a/nwn/nwnprc/trunk/newspellbook/shd_myst_umbrlft.nss +++ b/nwn/nwnprc/trunk/newspellbook/shd_myst_umbrlft.nss @@ -33,7 +33,7 @@ void main() if (oTarget == oPC) return; // No hitting yourself if (GetLocalInt(oPC, "CombatLoopProtection")) return; // Stop the damn loop - int nAbi = max(GetAbilityModifier(ABILITY_INTELLIGENCE, oPC), GetAbilityModifier(ABILITY_CHARISMA, oPC)); + int nAbi = PRCMax(GetAbilityModifier(ABILITY_INTELLIGENCE, oPC), GetAbilityModifier(ABILITY_CHARISMA, oPC)); SetLocalInt(oPC, "BABOverride", GetShadowcasterLevel(oPC)); DelayCommand(1.0, DeleteLocalInt(oPC, "BABOverride")); diff --git a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_crustrk.nss b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_crustrk.nss index 51624e46..3ace0aaa 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_crustrk.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_crustrk.nss @@ -38,7 +38,7 @@ void TOBAttack(object oTarget, object oInitiator, struct maneuver move) if(GetAlignmentGoodEvil(oInitiator) != GetAlignmentGoodEvil(oTarget) || GetAlignmentLawChaos(oInitiator) != GetAlignmentLawChaos(oTarget)) { - int nHeal = d6() + min(move.nInitiatorLevel, 5); + int nHeal = d6() + PRCMin(move.nInitiatorLevel, 5); object oHeal = GetCrusaderHealTarget(oInitiator, FeetToMeters(10.0)); SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), oHeal); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_L_LAW), oHeal); diff --git a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_revstrk.nss b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_revstrk.nss index 1c3bf868..92cc3bb2 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_revstrk.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_revstrk.nss @@ -39,7 +39,7 @@ void TOBAttack(object oTarget, object oInitiator, struct maneuver move) if(GetAlignmentGoodEvil(oInitiator) != GetAlignmentGoodEvil(oTarget) || GetAlignmentLawChaos(oInitiator) != GetAlignmentLawChaos(oTarget)) { - int nHeal = d6(3) + min(move.nInitiatorLevel, 10); + int nHeal = d6(3) + PRCMin(move.nInitiatorLevel, 10); object oHeal = GetCrusaderHealTarget(oInitiator, FeetToMeters(10.0)); SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), oHeal); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_L_LAW), oHeal); diff --git a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_rlystrk.nss b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_rlystrk.nss index 28eb9e23..4418599b 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_dvsp_rlystrk.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_dvsp_rlystrk.nss @@ -46,7 +46,7 @@ void TOBAttack(object oTarget, object oInitiator, struct maneuver move) if(GetIsFriend(oTarget, oInitiator)) { SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId())); - int nHeal = d6(3) + min(move.nInitiatorLevel, 50); + int nHeal = d6(3) + PRCMin(move.nInitiatorLevel, 50); SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHeal), oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_L_LAW), oTarget); } diff --git a/nwn/nwnprc/trunk/newspellbook/tob_etbl_conv.nss b/nwn/nwnprc/trunk/newspellbook/tob_etbl_conv.nss index 115fb250..3b55cf27 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_etbl_conv.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_etbl_conv.nss @@ -203,7 +203,7 @@ void main() // Determine maximum maneuver level // Initiators get new maneuvers at the same levels as wizards // See ToB p39, table 3-1 - int nMaxLevel = min(9, (GetInitiatorLevel(oInitiator, nClass) + 1)/2); + int nMaxLevel = PRCMin(9, (GetInitiatorLevel(oInitiator, nClass) + 1)/2); // Set the tokens int i; diff --git a/nwn/nwnprc/trunk/newspellbook/tob_moveconv.nss b/nwn/nwnprc/trunk/newspellbook/tob_moveconv.nss index 758137fe..43efa281 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_moveconv.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_moveconv.nss @@ -234,7 +234,7 @@ void main() // Determine maximum maneuver level // Initiators get new maneuvers at the same levels as wizards // See ToB p39, table 3-1 - int nMaxLevel = min(9, (GetInitiatorLevel(oInitiator, nClass) + 1)/2); + int nMaxLevel = PRCMin(9, (GetInitiatorLevel(oInitiator, nClass) + 1)/2); // Set the tokens int i; diff --git a/nwn/nwnprc/trunk/newspellbook/tob_moverdy.nss b/nwn/nwnprc/trunk/newspellbook/tob_moverdy.nss index 93b46126..46c604f3 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_moverdy.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_moverdy.nss @@ -76,7 +76,7 @@ void main() // Determine maximum maneuver level // Initiators get new maneuvers at the same levels as wizards // See ToB p39, table 3-1 - int nMaxLevel = min(9, (GetInitiatorLevel(oPC, nClass) + 1)/2); + int nMaxLevel = PRCMin(9, (GetInitiatorLevel(oPC, nClass) + 1)/2); // Set the tokens int i; diff --git a/nwn/nwnprc/trunk/newspellbook/tob_ssn_flamess.nss b/nwn/nwnprc/trunk/newspellbook/tob_ssn_flamess.nss index d355347a..c7db48ec 100644 --- a/nwn/nwnprc/trunk/newspellbook/tob_ssn_flamess.nss +++ b/nwn/nwnprc/trunk/newspellbook/tob_ssn_flamess.nss @@ -71,7 +71,7 @@ void main() oItem = GetSpellCastItem(); if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { - int nCold = min(10, GetDamageDealtByType(DAMAGE_TYPE_COLD)); + int nCold = PRCMin(10, GetDamageDealtByType(DAMAGE_TYPE_COLD)); if(nCold > 0) { effect eHeal = EffectHeal(nCold); diff --git a/nwn/nwnprc/trunk/newspellbook/true_utr_archeye.nss b/nwn/nwnprc/trunk/newspellbook/true_utr_archeye.nss index d5a419a2..5c59e4d7 100644 --- a/nwn/nwnprc/trunk/newspellbook/true_utr_archeye.nss +++ b/nwn/nwnprc/trunk/newspellbook/true_utr_archeye.nss @@ -76,7 +76,7 @@ void main() else /* Effects of UTTER_ARCHERS_EYE_R would be here */ { // Damage Resistance 10 piercing, max of 100 total - utter.eLink = EffectLinkEffects(EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10, min((10 * utter.nTruespeakerLevel), 100)), EffectVisualEffect(VFX_DUR_PROTECTION_ARROWS)); + utter.eLink = EffectLinkEffects(EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10, PRCMin((10 * utter.nTruespeakerLevel), 100)), EffectVisualEffect(VFX_DUR_PROTECTION_ARROWS)); } // If either of these ApplyEffect isn't needed, delete it. // Duration Effects diff --git a/nwn/nwnprc/trunk/psionics/psi_hiddentalent.nss b/nwn/nwnprc/trunk/psionics/psi_hiddentalent.nss new file mode 100644 index 00000000..d0d170d6 --- /dev/null +++ b/nwn/nwnprc/trunk/psionics/psi_hiddentalent.nss @@ -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); + } +} */ \ No newline at end of file diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_bstpwr.nss b/nwn/nwnprc/trunk/psionics/psi_pow_bstpwr.nss index f909d020..f836a387 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_bstpwr.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_bstpwr.nss @@ -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); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_clwbeast.nss b/nwn/nwnprc/trunk/psionics/psi_pow_clwbeast.nss index 1ca3d90a..3a4fd2f1 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_clwbeast.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_clwbeast.nss @@ -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); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_dispel.nss b/nwn/nwnprc/trunk/psionics/psi_pow_dispel.nss index 5455e4ef..4a683b4e 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_dispel.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_dispel.nss @@ -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(); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_egowhip.nss b/nwn/nwnprc/trunk/psionics/psi_pow_egowhip.nss index cad754f8..900dd4ed 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_egowhip.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_egowhip.nss @@ -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)) { diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_empfeed.nss b/nwn/nwnprc/trunk/psionics/psi_pow_empfeed.nss index ff4a276b..07fa8974 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_empfeed.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_empfeed.nss @@ -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); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_emptrnh.nss b/nwn/nwnprc/trunk/psionics/psi_pow_emptrnh.nss index d46f4caf..bdf122ee 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_emptrnh.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_emptrnh.nss @@ -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)); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_enwall2.nss b/nwn/nwnprc/trunk/psionics/psi_pow_enwall2.nss index 98374d8f..84eaf06e 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_enwall2.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_enwall2.nss @@ -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); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_microcos.nss b/nwn/nwnprc/trunk/psionics/psi_pow_microcos.nss index abdafbe8..b62b53fe 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_microcos.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_microcos.nss @@ -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 ) diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_mmntpre.nss b/nwn/nwnprc/trunk/psionics/psi_pow_mmntpre.nss index 93716a20..1312d621 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_mmntpre.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_mmntpre.nss @@ -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; diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_psyref.nss b/nwn/nwnprc/trunk/psionics/psi_pow_psyref.nss index 2308bef7..4f89727b 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_psyref.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_psyref.nss @@ -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 diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_shttrmb.nss b/nwn/nwnprc/trunk/psionics/psi_pow_shttrmb.nss index c0ddff4f..58c15d30 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_shttrmb.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_shttrmb.nss @@ -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)); diff --git a/nwn/nwnprc/trunk/psionics/psi_pow_strnmy.nss b/nwn/nwnprc/trunk/psionics/psi_pow_strnmy.nss index a19c01af..ab982295 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pow_strnmy.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pow_strnmy.nss @@ -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 diff --git a/nwn/nwnprc/trunk/psionics/psi_pyro_bolt.nss b/nwn/nwnprc/trunk/psionics/psi_pyro_bolt.nss index a0cb181c..03a3b901 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pyro_bolt.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pyro_bolt.nss @@ -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)) { diff --git a/nwn/nwnprc/trunk/psionics/psi_pyro_conf.nss b/nwn/nwnprc/trunk/psionics/psi_pyro_conf.nss index a2b3b95c..6d2b6d3b 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pyro_conf.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pyro_conf.nss @@ -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. diff --git a/nwn/nwnprc/trunk/psionics/psi_pyro_death.nss b/nwn/nwnprc/trunk/psionics/psi_pyro_death.nss index b92049e0..ff69ac26 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pyro_death.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pyro_death.nss @@ -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); diff --git a/nwn/nwnprc/trunk/psionics/psi_pyro_touch.nss b/nwn/nwnprc/trunk/psionics/psi_pyro_touch.nss index ac89963f..1992f1c6 100644 --- a/nwn/nwnprc/trunk/psionics/psi_pyro_touch.nss +++ b/nwn/nwnprc/trunk/psionics/psi_pyro_touch.nss @@ -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)) { diff --git a/nwn/nwnprc/trunk/psionics/psi_sk_event.nss b/nwn/nwnprc/trunk/psionics/psi_sk_event.nss index f68744c3..abb44b9f 100644 --- a/nwn/nwnprc/trunk/psionics/psi_sk_event.nss +++ b/nwn/nwnprc/trunk/psionics/psi_sk_event.nss @@ -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 diff --git a/nwn/nwnprc/trunk/scripts/fdisk_onspellc.nss b/nwn/nwnprc/trunk/scripts/fdisk_onspellc.nss index 4c21f037..0bd51aad 100644 --- a/nwn/nwnprc/trunk/scripts/fdisk_onspellc.nss +++ b/nwn/nwnprc/trunk/scripts/fdisk_onspellc.nss @@ -20,15 +20,15 @@ int nTest; switch(nSpell) { - case SPELL_LESSER_DISPEL : nTest = d20(1) + min(5, nSCLevel); break; - case SPELL_DISPEL_MAGIC : nTest = d20(1) + min(10, nSCLevel); break; - case SPELL_DISPELLING_TOUCH : nTest = d20(1) + min(10, nSCLevel); break; - case SPELL_SLASHING_DISPEL : nTest = d20(1) + min(10, nSCLevel); break; - case POWER_DISPELPSIONICS : nTest = d20(1) + min(15, GetManifesterLevel(oSCaster)); break; - case SPELL_GREATER_DISPELLING : nTest = d20(1) + min(20, nSCLevel); break; - case SPELL_GREAT_WALL_OF_DISPEL : nTest = d20(1) + min(20, nSCLevel); break; - case SPELL_MORDENKAINENS_DISJUNCTION: nTest = d20(1) + min(40, nSCLevel); break; - case 4061 : nTest = d20(1) + min(40, nSCLevel); break;//Superb Dispelling + case SPELL_LESSER_DISPEL : nTest = d20(1) + PRCMin(5, nSCLevel); break; + case SPELL_DISPEL_MAGIC : nTest = d20(1) + PRCMin(10, nSCLevel); break; + case SPELL_DISPELLING_TOUCH : nTest = d20(1) + PRCMin(10, nSCLevel); break; + case SPELL_SLASHING_DISPEL : nTest = d20(1) + PRCMin(10, nSCLevel); break; + case POWER_DISPELPSIONICS : nTest = d20(1) + PRCMin(15, GetManifesterLevel(oSCaster)); break; + case SPELL_GREATER_DISPELLING : nTest = d20(1) + PRCMin(20, nSCLevel); break; + case SPELL_GREAT_WALL_OF_DISPEL : nTest = d20(1) + PRCMin(20, nSCLevel); break; + case SPELL_MORDENKAINENS_DISJUNCTION: nTest = d20(1) + PRCMin(40, nSCLevel); break; + case 4061 : nTest = d20(1) + PRCMin(40, nSCLevel); break;//Superb Dispelling default : nTest = 0; break; } if (nTest >= 11 + nMasterCLevel) diff --git a/nwn/nwnprc/trunk/scripts/ft_sanctmartial.nss b/nwn/nwnprc/trunk/scripts/ft_sanctmartial.nss index 03819f22..b5817770 100644 --- a/nwn/nwnprc/trunk/scripts/ft_sanctmartial.nss +++ b/nwn/nwnprc/trunk/scripts/ft_sanctmartial.nss @@ -1,5 +1,6 @@ #include "prc_inc_clsfunc" #include "psi_inc_soulkn" +#include "prc_inc_combat" // Sanctify_Feat(iType); @@ -467,7 +468,6 @@ void main() //Vile(); UnholyStrike(); } - } else if (GetAlignmentGoodEvil(oPC)!= ALIGNMENT_EVIL) { @@ -532,7 +532,63 @@ void main() Sanctify(); MartialStrike(); } - + + if(GetIsUnarmed(oPC)) + { + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_SANCTIFYKISTRIKE)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_SANCTIFYKISTRIKE),1); + if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_HOLYKISTRIKE)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_HOLYKISTRIKE),1); + eCheckEffect = GetNextEffect(oPC); + } + // Sanctify Strike + if (GetHasFeat(FEAT_SANCTIFYKISTRIKE, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_SANCTIFYKISTRIKE))) + { + effect eEffect1 = VersusAlignmentEffect(EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_POSITIVE),ALIGNMENT_ALL,ALIGNMENT_EVIL); + effect eEffect2 = VersusRacialTypeEffect(EffectDamageIncrease(DAMAGE_BONUS_1d4,DAMAGE_TYPE_POSITIVE),RACIAL_TYPE_OUTSIDER); + effect eLink = EffectLinkEffects(eEffect1,eEffect2); + eLink = TagEffect(eLink,"SanctifyKiStrike"); + + //Remove any prior bonus to avoid duplication + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "SanctifyKiStrike") RemoveEffect(oPC, eCheckEffect); + eCheckEffect = GetNextEffect(oPC); + } + + //Give player the bonus + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC); + } + + // Holy Ki Strike + if (GetHasFeat(FEAT_HOLYKISTRIKE, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_HOLYKISTRIKE))) + { + effect eEffect1 = VersusAlignmentEffect(EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_POSITIVE),ALIGNMENT_ALL,ALIGNMENT_EVIL); + eEffect1 = TagEffect(eEffect1,"HolyKiStrike"); + + //Remove any prior bonus to avoid duplication and remove Sanctify Ki Strike + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "SanctifyKiStrike" || GetEffectTag(eCheckEffect) == "HolyKiStrike") RemoveEffect(oPC, eCheckEffect); + eCheckEffect = GetNextEffect(oPC); + } + + //Give player the bonus + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect1, oPC); + } + } + else + { + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "SanctifyKiStrike" || GetEffectTag(eCheckEffect) == "HolyKiStrike") RemoveEffect(oPC, eCheckEffect); + eCheckEffect = GetNextEffect(oPC); + } + } } Vile(); diff --git a/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss b/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss index c589e9ff..bd508e10 100644 --- a/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss +++ b/nwn/nwnprc/trunk/scripts/ft_vowofpoverty.nss @@ -145,23 +145,6 @@ void main() //Give player the bonus, regardless of the weapon ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC); - //Apply Golden Ice effect if unarmed and has feat - if(GetIsUnarmed(oPC) && (GetHasFeat(FEAT_RAVAGEGOLDENICE, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_RAVAGEGOLDENICE)))) - { - itemproperty ip1 = ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE,2); - ip1 = TagItemProperty(ip1,"GoldenIce"); - IPSafeAddItemProperty(oPC,ip1,0.0,X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,FALSE); - } - else - { - itemproperty eCheckIPL = GetFirstItemProperty(oPC); - while (GetIsItemPropertyValid(eCheckIPL)) - { - if(GetItemPropertyTag(eCheckIPL) == "GoldenIce") RemoveItemProperty(oPC,ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE,2)); - eCheckIPL = GetNextItemProperty(oPC); - } - } - // For some reason, EVENT_ONPLAYEREQUIPITEM just works with weapons, so it is better to check all other items for magic elsewhere for (nSlot=0; nSlot < 13; nSlot++) //All but creatures slots { diff --git a/nwn/nwnprc/trunk/scripts/ft_vowpoverty_ft.nss b/nwn/nwnprc/trunk/scripts/ft_vowpoverty_ft.nss new file mode 100644 index 00000000..f13cfa03 --- /dev/null +++ b/nwn/nwnprc/trunk/scripts/ft_vowpoverty_ft.nss @@ -0,0 +1,145 @@ +//::////////////////////////////////////////////// +//:: Vow of Poverty Extra Feat +//:: ft_vowpoverty_ft +//::////////////////////////////////////////////// +/** @file + This allows you to choose the extra feat each even level. + + @original author Fencas + @date Created - 2025-01-12 +*/ +//::////////////////////////////////////////////// +//::////////////////////////////////////////////// + +#include "inc_dynconv" +#include "prc_inc_function" +#include "NW_I0_GENERIC" +#include "inc_persist_loca" + +////////////////////////////////////////////////// +/* Constant defintions */ +////////////////////////////////////////////////// + +const int STAGE_SELECT_ABIL = 0; + +////////////////////////////////////////////////// +/* Function defintions */ +////////////////////////////////////////////////// + +void main() +{ + object oPC = GetPCSpeaker(); + object oSkin = GetPCSkin(oPC); + int i, j, nTest, nRow; + int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE); + int nStage = GetStage(oPC); + int nLevel = GetPersistantLocalInt(oPC, "VoPFeatCheck"); + + // Check which of the conversation scripts called the scripts + if(nValue == 0) // All of them set the DynConv_Var to non-zero value, so something is wrong -> abort + { + if(DEBUG) DoDebug("ft_vowpoverty_ft: Aborting due to error."); + return; + } + + if(nValue == DYNCONV_SETUP_STAGE) + { + // Check if this stage is marked as already set up + // This stops list duplication when scrolling + if(!GetIsStageSetUp(nStage, oPC)) + { + // Maneuver selection stage + if(nStage == STAGE_SELECT_ABIL) + { + //Check which Feats have been added by this ability + int nTotalRows = Get2DARowCount("prc_vop_feats"); + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + for(nRow=0; nRow <= nTotalRows; nRow++) + { + string nFeat = Get2DAString("prc_vop_feats","FeatIndex",nRow); + if(GetEffectTag(eCheckEffect) == "VoPFeat"+nFeat) SetLocalInt(oPC,"VoPFeat"+nFeat,1); + } + eCheckEffect = GetNextEffect(oPC); + } + + SetHeader("Choose an Exalted Feat for this new level under a Vow of Poverty:"); + //Add new option depending if it was not selected and char has all prereqs + for(nRow=0; nRow <= nTotalRows; nRow++) + { + //Get prereqs from 2DA + string sName = Get2DAString("prc_vop_feats","Name",nRow); + int nFeat = StringToInt(Get2DAString("prc_vop_feats","FeatIndex",nRow)); + int nPreReq1 = StringToInt(Get2DAString("prc_vop_feats","PreReq1",nRow)); + int nPreReq2 = StringToInt(Get2DAString("prc_vop_feats","PreReq2",nRow)); + int nCon = StringToInt(Get2DAString("prc_vop_feats","Con",nRow)); + int nWis = StringToInt(Get2DAString("prc_vop_feats","Wis",nRow)); + int nCha = StringToInt(Get2DAString("prc_vop_feats","Cha",nRow)); + int nBAB = StringToInt(Get2DAString("prc_vop_feats","BAB",nRow)); + int nLaw = StringToInt(Get2DAString("prc_vop_feats","Law",nRow)); + + int nAllPreReq = 1; + + //Check if prereqs exist and, if so, if they are met - if not, set bol to 0 + if(nPreReq1>0 && !GetHasFeat(nPreReq1, oPC)) nAllPreReq = 0; + if(nPreReq1==213 && GetLevelByClass(CLASS_TYPE_MONK, oPC) >= 1) nAllPreReq = 1; //for Ki Strike and monks + if(nPreReq2>0 && !GetHasFeat(nPreReq2, oPC)) nAllPreReq = 0; + if(nCon>0 && !GetAbilityScore(oPC,ABILITY_CONSTITUTION) >= nCon) nAllPreReq = 0; + if(nWis>0 && !GetAbilityScore(oPC,ABILITY_CONSTITUTION) >= nWis) nAllPreReq = 0; + if(nCha>0 && !GetAbilityScore(oPC,ABILITY_CONSTITUTION) >= nCha) nAllPreReq = 0; + if(nBAB>0 && !GetBaseAttackBonus(oPC) >= nBAB) nAllPreReq = 0; + if(nLaw>0 && !GetAlignmentLawChaos(oPC) == ALIGNMENT_LAWFUL) nAllPreReq = 0; + + if (!GetHasFeat(nFeat, oPC) && !GetLocalInt(oPC, "VoPFeat"+IntToString(nFeat)) && nAllPreReq == 1) AddChoice(sName, nFeat, oPC); + } + + AddChoice("Cancel (you will get no Exalted Feats this level)", 0, oPC); + SetDefaultTokens(); //If there are more than 10 options, add Next + MarkStageSetUp(STAGE_SELECT_ABIL, oPC); + } + } + + // Do token setup + SetupTokens(); + } + else if(nValue == DYNCONV_EXITED) + { + if(DEBUG) DoDebug("ft_vowpoverty_ft: Running exit handler"); + } + else if(nValue == DYNCONV_ABORTED) + { + // This section should never be run, since aborting this conversation should + // always be forbidden and as such, any attempts to abort the conversation + // should be handled transparently by the system + if(DEBUG) DoDebug("ft_vowpoverty_ft: ERROR: Conversation abort section run"); + } + // Handle PC response + else + { + int nChoice = GetChoice(oPC); + if(nStage == STAGE_SELECT_ABIL) + { + SetPersistantLocalInt(oPC, "VoPFeat"+IntToString(nLevel),1); //Register the choice was made + + //If it was not cancelled, give chosen feat to PC (as EffectBonusFeat) + if(nChoice > 0) + { + effect eBonusFeat = EffectBonusFeat(nChoice); + eBonusFeat = UnyieldingEffect(eBonusFeat); + eBonusFeat = TagEffect(eBonusFeat, "VoPFeat"+IntToString(nChoice)); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBonusFeat, oPC); + } + + // And we're all done + DeletePersistantLocalInt(oPC,"VoPFeatCheck"); + AllowExit(DYNCONV_EXIT_FORCE_EXIT); + } + + if(DEBUG) DoDebug("ft_vowpoverty_ft: New stage: " + IntToString(nStage)); + + // Store the stage value. If it has been changed, this clears out the choices + SetStage(nStage, oPC); + } +} + diff --git a/nwn/nwnprc/trunk/scripts/prc_bab_caller.nss b/nwn/nwnprc/trunk/scripts/prc_bab_caller.nss index b9784fc5..ec71401f 100644 --- a/nwn/nwnprc/trunk/scripts/prc_bab_caller.nss +++ b/nwn/nwnprc/trunk/scripts/prc_bab_caller.nss @@ -41,7 +41,7 @@ void main() } else if(GetLocalInt(oPC, "HadrimoiPerfectSymmetry")) { - nAttackCount = max(nBAB, 3); + nAttackCount = PRCMax(nBAB, 3); if (DEBUG) DoDebug("prc_bab_caller: Using hadrimoi perfect symmetry, # attacks = " + IntToString(nAttackCount)); } else @@ -77,7 +77,7 @@ void main() if (DEBUG) DoDebug("prc_bab_caller: detected Spell Tensers Transformation, # attacks = " + IntToString(nTTAttackCount)); } - int nMax = max(nDPAttackCount, nTTAttackCount); + int nMax = PRCMax(nDPAttackCount, nTTAttackCount); // we only consider any changes in # attacks, if Tenser's or DP *increases* our "normal" attack count! // this makes sure, that we won't call SetBaseAttackBonus needlessly @@ -142,7 +142,7 @@ void main() // the aurora engine can also handle up to two offhand attacks //calculate the number of main hand attacks the aurora engine can at most handle, including the up to 2 offhand attacks - int nCap = 12 - min(nOffhand,2); + int nCap = 12 - PRCMin(nOffhand,2); // apply the cap and calculate the number of overflow (main hand) attacks, that aurora engine can't handle (usually this will never happen) if(nAttackCount > nCap) { diff --git a/nwn/nwnprc/trunk/scripts/prc_bladesinger.nss b/nwn/nwnprc/trunk/scripts/prc_bladesinger.nss index f413879f..d9894b78 100644 --- a/nwn/nwnprc/trunk/scripts/prc_bladesinger.nss +++ b/nwn/nwnprc/trunk/scripts/prc_bladesinger.nss @@ -48,7 +48,7 @@ void OnEquip(object oPC,object oSkin) // Bonus Lvl BladeSinger Max Bonus Int - int BladeLv = min(GetLevelByClass(CLASS_TYPE_BLADESINGER, oPC), GetAbilityModifier(ABILITY_INTELLIGENCE,oPC)); + int BladeLv = PRCMin(GetLevelByClass(CLASS_TYPE_BLADESINGER, oPC), GetAbilityModifier(ABILITY_INTELLIGENCE,oPC)); SetCompositeBonus(oSkin, "BladesAC", BladeLv, ITEM_PROPERTY_AC_BONUS); diff --git a/nwn/nwnprc/trunk/scripts/prc_craft.nss b/nwn/nwnprc/trunk/scripts/prc_craft.nss index f0eb3c11..37a0dcad 100644 --- a/nwn/nwnprc/trunk/scripts/prc_craft.nss +++ b/nwn/nwnprc/trunk/scripts/prc_craft.nss @@ -799,7 +799,7 @@ void CraftingHB(object oPC, object oItem, itemproperty ip, int nCost, int nXP, s FloatingTextStringOnCreature("Crafting Failed!", oPC); DeleteLocalInt(oPC, PRC_CRAFT_HB); TakeGoldFromCreature(nCost, oPC, TRUE); - SetXP(oPC, max(GetXP(oPC) - nXP, GetHitDice(oPC) * (GetHitDice(oPC) - 1) * 500)); //can't delevel + SetXP(oPC, PRCMax(GetXP(oPC) - nXP, GetHitDice(oPC) * (GetHitDice(oPC) - 1) * 500)); //can't delevel return; } } diff --git a/nwn/nwnprc/trunk/scripts/prc_cwsm_msstare.nss b/nwn/nwnprc/trunk/scripts/prc_cwsm_msstare.nss index 9932ebd4..b7c01c50 100644 --- a/nwn/nwnprc/trunk/scripts/prc_cwsm_msstare.nss +++ b/nwn/nwnprc/trunk/scripts/prc_cwsm_msstare.nss @@ -62,7 +62,7 @@ void main() // Determine DC for this target nDC = d20() // Die roll + GetHitDice(oTarget) // Hit dice - + max(0, GetAbilityModifier(ABILITY_WISDOM, oTarget)) // Wisdom bonus, no wisdom penalty + + PRCMax(0, GetAbilityModifier(ABILITY_WISDOM, oTarget)) // Wisdom bonus, no wisdom penalty + (4 * (PRCGetCreatureSize(oTarget) - nPCSize)) // Adjust by 4 in favor of the bigger creature for each size category it is bigger than the smaller one ; diff --git a/nwn/nwnprc/trunk/scripts/prc_cwsm_stare.nss b/nwn/nwnprc/trunk/scripts/prc_cwsm_stare.nss index abdd9461..e89b0ce7 100644 --- a/nwn/nwnprc/trunk/scripts/prc_cwsm_stare.nss +++ b/nwn/nwnprc/trunk/scripts/prc_cwsm_stare.nss @@ -42,7 +42,7 @@ void main() // Intimidate DC calculation int nDC = d20() // Die roll + GetHitDice(oTarget) // Hit dice - + max(0, GetAbilityModifier(ABILITY_WISDOM, oTarget)) // Wisdom bonus, no wisdom penalty + + PRCMax(0, GetAbilityModifier(ABILITY_WISDOM, oTarget)) // Wisdom bonus, no wisdom penalty + (4 * (PRCGetCreatureSize(oTarget) - PRCGetCreatureSize(oPC))) // Adjust by 4 in favor of the bigger creature for each size category it is bigger than the smaller one ; // Construct Intimidate effect diff --git a/nwn/nwnprc/trunk/scripts/prc_detectevil.nss b/nwn/nwnprc/trunk/scripts/prc_detectevil.nss index 179a431d..a455d5be 100644 --- a/nwn/nwnprc/trunk/scripts/prc_detectevil.nss +++ b/nwn/nwnprc/trunk/scripts/prc_detectevil.nss @@ -20,6 +20,6 @@ void main() int nStk = GetLevelByClass(CLASS_TYPE_SHADOWBANE_STALKER); int nPal = GetLevelByClass(CLASS_TYPE_PALADIN); - int nLevel = max(nPal, max(nStk, nSlayer)); + int nLevel = PRCMax(nPal, PRCMax(nStk, nSlayer)); DoRacialSLA(SPELL_DETECT_EVIL, nLevel); } \ No newline at end of file diff --git a/nwn/nwnprc/trunk/scripts/prc_doprecache.nss b/nwn/nwnprc/trunk/scripts/prc_doprecache.nss index b5c01ae7..c27ea021 100644 --- a/nwn/nwnprc/trunk/scripts/prc_doprecache.nss +++ b/nwn/nwnprc/trunk/scripts/prc_doprecache.nss @@ -212,7 +212,7 @@ void handleCraftProperties2da(string s2da, int row = 0) void handleCraftItems2da(int row = 0) { int max; - for(max = min(row + 25, PRCGetFileEnd("prc_craft_gen_it")); row < max; row++) + for(max = PRCMin(row + 25, PRCGetFileEnd("prc_craft_gen_it")); row < max; row++) { DoDebug("Handling prc_craft_gen_it row " + IntToString(row)); diff --git a/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss b/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss index 1c8b150d..1d3bb174 100644 --- a/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss +++ b/nwn/nwnprc/trunk/scripts/prc_enforce_feat.nss @@ -329,7 +329,7 @@ int FavouredSoul() + GetHasFeat(FEAT_FAVOURED_SOUL_FIRE) + GetHasFeat(FEAT_FAVOURED_SOUL_SONIC); - if(nEnergy != min(3, nFS / 5)) + if(nEnergy != PRCMin(3, nFS / 5)) { FloatingTextStringOnCreature("You must select an Energy Resistance Feat. Please reselect your feats.", OBJECT_SELF, FALSE); return TRUE; @@ -769,11 +769,11 @@ int SkillRequirements() int CraftingFeats() { - int nCasterLvl = max(GetCasterLvl(TYPE_ARCANE), GetCasterLvl(TYPE_DIVINE)), + int nCasterLvl = PRCMax(GetCasterLvl(TYPE_ARCANE), GetCasterLvl(TYPE_DIVINE)), nManifesterLvl = GetManifesterLevel(OBJECT_SELF, GetPrimaryPsionicClass()), nInvokerLvl = GetInvokerLevel(OBJECT_SELF, GetPrimaryInvocationClass()), - nCasterMax = max(nCasterLvl, nInvokerLvl), - nMax = max(nCasterMax, nManifesterLvl), + nCasterMax = PRCMax(nCasterLvl, nInvokerLvl), + nMax = PRCMax(nCasterMax, nManifesterLvl), nArti = GetLevelByClass(CLASS_TYPE_ARTIFICER), nBattle = GetLevelByClass(CLASS_TYPE_BATTLESMITH), nIron = GetLevelByClass(CLASS_TYPE_IRONSOUL_FORGEMASTER); @@ -1546,7 +1546,7 @@ int Shaman() + GetHasFeat(FEAT_BLIND_FIGHT) + GetHasFeat(FEAT_DEFLECT_ARROWS); - if(nIS < min(5, (nClass/4))) + if(nIS < PRCMin(5, (nClass/4))) { FloatingTextStringOnCreature("You do not have the correct amount of bonus feats. Please reselect your feats.", OBJECT_SELF, FALSE); return TRUE; diff --git a/nwn/nwnprc/trunk/scripts/prc_evnt_arrbone.nss b/nwn/nwnprc/trunk/scripts/prc_evnt_arrbone.nss index 43ee9ae0..f520d068 100644 --- a/nwn/nwnprc/trunk/scripts/prc_evnt_arrbone.nss +++ b/nwn/nwnprc/trunk/scripts/prc_evnt_arrbone.nss @@ -58,7 +58,7 @@ void main() //Save if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC, SAVING_THROW_TYPE_DEATH)) { - int nDam = d6(3) + min(20, nCasterLvl); + int nDam = d6(3) + PRCMin(20, nCasterLvl); } else diff --git a/nwn/nwnprc/trunk/scripts/prc_evnt_spirwep.nss b/nwn/nwnprc/trunk/scripts/prc_evnt_spirwep.nss index 11df316c..f668e452 100644 --- a/nwn/nwnprc/trunk/scripts/prc_evnt_spirwep.nss +++ b/nwn/nwnprc/trunk/scripts/prc_evnt_spirwep.nss @@ -223,7 +223,7 @@ void main() if(DEBUG) DoDebug("prc_evnt_spirwep: SR check already performed for this target. Skipping SR check."); } - int nDamBonus = min(5, nCasterLevel / 3); + int nDamBonus = PRCMin(5, nCasterLevel / 3); effect eDamage = EffectDamage(nDamBonus, DAMAGE_TYPE_DIVINE); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); if(DEBUG) DoDebug("prc_evnt_spirwep: "+IntToString(nDamBonus)+" magical damage applied to the target."); diff --git a/nwn/nwnprc/trunk/scripts/prc_feats.nss b/nwn/nwnprc/trunk/scripts/prc_feats.nss index ad4c323f..5bb83b91 100644 --- a/nwn/nwnprc/trunk/scripts/prc_feats.nss +++ b/nwn/nwnprc/trunk/scripts/prc_feats.nss @@ -13,6 +13,7 @@ #include "moi_inc_moifunc" #include "prc_inc_clsfunc" +#include "psi_inc_core" void DisablePowerAttack(object oPC); void PRCFeat_AddMagicalBonuses(object oPC, object oSkin); @@ -253,7 +254,22 @@ void main() if(iEquip) PRCFeat_Equip(oPC, oSkin, iEquip); + //Checking VoP feats + int nTotalRows = Get2DARowCount("prc_vop_feats"); + int nRow; + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + for(nRow=0; nRow <= nTotalRows; nRow++) + { + string nFeat = Get2DAString("prc_vop_feats","FeatIndex",nRow); + if(GetEffectTag(eCheckEffect) == "VoPFeat"+nFeat) SetLocalInt(oPC,"VoPFeat"+nFeat,1); + } + eCheckEffect = GetNextEffect(oPC); + } + // Feats are checked here + //if(GetHasFeat(FEAT_SAC_VOW, oPC)) ExecuteScript("prc_vows", oPC); //if(GetHasFeat(FEAT_LICHLOVED, oPC)) ExecuteScript("prc_lichloved", oPC); if(GetHasFeat(FEAT_EB_HAND, oPC) || @@ -296,10 +312,8 @@ void main() //if(GetHasFeat(FEAT_LINGERING_DAMAGE, oPC)) ExecuteScript("ft_lingdmg", oPC); //if(GetHasFeat(FEAT_MAGICAL_APTITUDE, oPC)) ExecuteScript("prc_magaptitude", oPC); if(GetHasFeat(FEAT_ETERNAL_FREEDOM, oPC)) ExecuteScript("etern_free", oPC); - if(GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK))) - { - ExecuteScript("prc_intuiatk", oPC); - } + + if(GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK))) ExecuteScript("prc_intuiatk", oPC); //if(GetPersistantLocalInt(oPC, "EpicSpell_TransVital")) ExecuteScript("trans_vital", oPC); //if(GetHasFeat(FEAT_COMBAT_MANIFESTATION, oPC)) ExecuteScript("psi_combat_manif", oPC); //if(GetHasFeat(FEAT_WILD_TALENT, oPC)) ExecuteScript("psi_wild_talent", oPC); @@ -599,6 +613,16 @@ void PRCFeat_AddBonusFeats(object oPC, object oSkin) if(GetHasFeat(FEAT_WILD_TALENT, oPC)) AddSkinFeat(FEAT_PSIONIC_FOCUS, IP_CONST_FEAT_PSIONIC_FOCUS, oSkin, oPC); + + if(IsHiddenTalent()) + { + AddSkinFeat(FEAT_PSIONIC_FOCUS, IP_CONST_FEAT_PSIONIC_FOCUS, oSkin, oPC); + AddSkinFeat(FEAT_AUGMENT_PSIONICS_QUICKSELECTS, IP_CONST_FEAT_AUGMENT_PSIONICS_QUICKSELECTS, oSkin, oPC); + AddSkinFeat(FEAT_AUGMENT_PSIONICS_DIGITS_0_4, IP_CONST_FEAT_AUGMENT_PSIONICS_DIGITS_0_4, oSkin, oPC); + AddSkinFeat(FEAT_AUGMENT_PSIONICS_DIGITS_5_9, IP_CONST_FEAT_AUGMENT_PSIONICS_DIGITS_5_9, oSkin, oPC); + AddSkinFeat(FEAT_AUGMENT_PSIONICS_TENS, IP_CONST_FEAT_AUGMENT_PSIONICS_TENS, oSkin, oPC); + AddSkinFeat(FEAT_AUGMENT_QUICKSELECTS_2, IP_CONST_FEAT_AUGMENT_QUICKSELECTS_2, oSkin, oPC); + } if (GetTotalEssentia(oPC)) AddSkinFeat(FEAT_INVEST_ESSENTIA_CONV, IP_CONST_FEAT_INVEST_ESSENTIA_CONV, oSkin, oPC); @@ -727,7 +751,12 @@ void PRCFeat_AddCompositeBonuses(object oPC, object oSkin) if(GetSkillRank(SKILL_JUMP, oPC) > 4) SetCompositeBonus(oSkin, "SkillJTum", 2, ITEM_PROPERTY_SKILL_BONUS, SKILL_TUMBLE); - + + if(GetHasFeat(FEAT_GIFTOFFAITH, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_GIFTOFFAITH))) + { + SetCompositeBonus(oSkin, "GiftOfFaith", 2, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEVS_FEAR); + } + if(nAlignmentGoodEvil == ALIGNMENT_GOOD) { if(GetHasFeat(FEAT_SAC_VOW, oPC)) @@ -741,14 +770,22 @@ void PRCFeat_AddCompositeBonuses(object oPC, object oSkin) if(nAlignmentLawChaos == ALIGNMENT_LAWFUL) { - if(GetHasFeat(FEAT_VOW_OBED, oPC)) + if(GetHasFeat(FEAT_VOW_OBED, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_VOW_OBED))) SetCompositeBonus(oSkin, "VowObed", 4, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEBASETYPE_WILL); } - if(GetHasFeat(FEAT_VOW_PURITY, oPC)) + if(GetHasFeat(FEAT_VOW_PURITY, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_VOW_PURITY))) { SetCompositeBonus(oSkin, "VowPurity_De", 1, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEVS_DEATH); SetCompositeBonus(oSkin, "VowPurity_Di", 1, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEVS_DISEASE); - } + } + if(GetHasFeat(FEAT_VOWABSTINENCE, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_VOWABSTINENCE))) + { + SetCompositeBonus(oSkin, "VowAbstinence", 4, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEVS_POISON); + } + if(GetHasFeat(FEAT_VOWCHASTITY, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_VOWCHASTITY))) + { + SetCompositeBonus(oSkin, "VowChastity", 4, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC, IP_CONST_SAVEVS_MINDAFFECTING); + } } else if(nAlignmentGoodEvil == ALIGNMENT_EVIL) { diff --git a/nwn/nwnprc/trunk/scripts/prc_intuiatk.nss b/nwn/nwnprc/trunk/scripts/prc_intuiatk.nss index b7b25073..7c1bd830 100644 --- a/nwn/nwnprc/trunk/scripts/prc_intuiatk.nss +++ b/nwn/nwnprc/trunk/scripts/prc_intuiatk.nss @@ -1,4 +1,5 @@ #include "prc_alterations" +#include "prc_inc_unarmed" int isSimple(object oItem) { @@ -54,55 +55,39 @@ int isLight(object oItem) void main() { - if(DEBUG) DoDebug("prc_intuiatk: Running main()"); - //object oPC = PRCGetSpellTargetObject(); - object oPC = OBJECT_SELF; // This should only be called via ExecuteScript on the target, so... - object oSkin = GetPCSkin(oPC); + if(DEBUG) DoDebug("prc_intuiatk: Running main()"); + //object oPC = PRCGetSpellTargetObject(); + object oPC = OBJECT_SELF; // This should only be called via ExecuteScript on the target, so... + object oSkin = GetPCSkin(oPC); + + //Check VoP feats + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_RAVAGEGOLDENICE)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_RAVAGEGOLDENICE),1); + if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK),1); + eCheckEffect = GetNextEffect(oPC); + } + + // Check for Golden Ice + if (GetHasFeat(FEAT_RAVAGEGOLDENICE, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_RAVAGEGOLDENICE))) + { + if(DEBUG) DoDebug("prc_intuiatk: PC has Ravage: Golden Ice"); + + if (GetLocalInt(oSkin,"IniGoldenIce")) return; + object oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC); - if (GetHasFeat(FEAT_RAVAGEGOLDENICE, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_RAVAGEGOLDENICE))) - { - if(DEBUG) DoDebug("prc_intuiatk: PC has Ravage: Golden Ice"); - int iEquip = GetLocalInt(oPC,"ONEQUIP") ; - object oItem; + // fixed to work with new unarmed inc + if(GetIsPRCCreatureWeapon(oItem) && GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD) + { + RemoveSpecificProperty(oItem,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); + AddItemProperty(DURATION_TYPE_PERMANENT,ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE,2),oItem); + SetLocalInt(oSkin,"IniGoldenIce",1); + } + else RemoveSpecificProperty(oItem,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); + } - if (iEquip == 1) - oItem = GetItemLastUnequipped(); - else - oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC); - - - if (iEquip == 1||GetAlignmentGoodEvil(oPC)!= ALIGNMENT_GOOD) - { - if (GetBaseItemType(oItem)==BASE_ITEM_GLOVES) - RemoveSpecificProperty(oItem,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); - } - else - { - oItem = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC); - RemoveSpecificProperty(oItem,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); - AddItemProperty(DURATION_TYPE_PERMANENT,ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE,2),oItem); - } - - object oCweapB = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,oPC); - object oCweapL = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC); - object oCweapR = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,oPC); - RemoveSpecificProperty(oCweapB,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); - RemoveSpecificProperty(oCweapL,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); - RemoveSpecificProperty(oCweapR,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE); - - if (GetAlignmentGoodEvil(oPC)== ALIGNMENT_GOOD) - { - itemproperty ip1 = ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_RAVAGEGOLDENICE,2); - ip1 = TagItemProperty(ip1,"GoldenIce"); - AddItemProperty(DURATION_TYPE_PERMANENT,ip1,oCweapB); - AddItemProperty(DURATION_TYPE_TEMPORARY,ip1,oCweapL); - AddItemProperty(DURATION_TYPE_TEMPORARY,ip1,oCweapR); - } - - - } - - if(GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetHasFeat(FEAT_WEAPON_FINESSE, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK))) + if(GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetHasFeat(FEAT_WEAPON_FINESSE, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK))) { if(DEBUG) DoDebug("prc_intuiatk: PC has Intuitive Attack or WepFinesse"); @@ -114,7 +99,7 @@ void main() int iWis = GetAbilityModifier(ABILITY_WISDOM,oPC); int iIABonus = 0; int iWFBonus = 0; - int bHasIA = GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK)); + int bHasIA = GetHasFeat(FEAT_INTUITIVE_ATTACK, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_INTUITIVE_ATTACK)); int bHasWF = GetHasFeat(FEAT_WEAPON_FINESSE, oPC); int bUseIA = FALSE; int bUseWF = FALSE; diff --git a/nwn/nwnprc/trunk/scripts/prc_knight.nss b/nwn/nwnprc/trunk/scripts/prc_knight.nss index 4f16b0f4..d09282a3 100644 --- a/nwn/nwnprc/trunk/scripts/prc_knight.nss +++ b/nwn/nwnprc/trunk/scripts/prc_knight.nss @@ -22,7 +22,7 @@ void main() object oAmmo; int nClass = GetLevelByClass(CLASS_TYPE_KNIGHT, oPC); int nCha = GetAbilityModifier(ABILITY_CHARISMA, oPC); - int nBonus = max(1, (nClass/2) + nCha); + int nBonus = PRCMax(1, (nClass/2) + nCha); // We aren't being called from any event, instead from EvalPRCFeats diff --git a/nwn/nwnprc/trunk/scripts/prc_mithral.nss b/nwn/nwnprc/trunk/scripts/prc_mithral.nss index a628be7d..20a15f7b 100644 --- a/nwn/nwnprc/trunk/scripts/prc_mithral.nss +++ b/nwn/nwnprc/trunk/scripts/prc_mithral.nss @@ -83,7 +83,7 @@ void main() if(nDexBonus > nMaxDexBonus) { - nBonus = min(nDexBonus - nMaxDexBonus, nCapIncrease); + nBonus = PRCMin(nDexBonus - nMaxDexBonus, nCapIncrease); } //SendMessageToPC(GetFirstPC(), "DEBUG: prc_mithral -> nBonus is "+ IntToString(nBonus)+"."); diff --git a/nwn/nwnprc/trunk/scripts/prc_npc_death.nss b/nwn/nwnprc/trunk/scripts/prc_npc_death.nss index 5f60836a..39b84fd0 100644 --- a/nwn/nwnprc/trunk/scripts/prc_npc_death.nss +++ b/nwn/nwnprc/trunk/scripts/prc_npc_death.nss @@ -80,7 +80,7 @@ void main() if(DEBUG) DoDebug("Destruction Retribution firing. Dead creature = " + DebugObject2Str(oDead)); int nDamage; - int nDice = max(1, GetHitDice(oDead) / 2); // (hd / 2)d6, min 1d6 + int nDice = PRCMax(1, GetHitDice(oDead) / 2); // (hd / 2)d6, min 1d6 float fDelay; effect eExplode = EffectVisualEffect(VFX_FNF_LOS_EVIL_10); //Replace with Negative Pulse effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); diff --git a/nwn/nwnprc/trunk/scripts/prc_onaquire.nss b/nwn/nwnprc/trunk/scripts/prc_onaquire.nss index 30073291..71514c68 100644 --- a/nwn/nwnprc/trunk/scripts/prc_onaquire.nss +++ b/nwn/nwnprc/trunk/scripts/prc_onaquire.nss @@ -234,7 +234,7 @@ void main() if(!GetIdentified(oItem)) { // No negative numbers, please - int nLore = max(0, GetSkillRank(SKILL_LORE, oCreature)); + int nLore = PRCMax(0, GetSkillRank(SKILL_LORE, oCreature)); int nMax = StringToInt(Get2DACache("SkillVsItemCost", "DeviceCostMax", nLore)); if(nMax == 0) nMax = 120000000; diff --git a/nwn/nwnprc/trunk/scripts/prc_onhitcast.nss b/nwn/nwnprc/trunk/scripts/prc_onhitcast.nss index a55d21c9..8d42fc45 100644 --- a/nwn/nwnprc/trunk/scripts/prc_onhitcast.nss +++ b/nwn/nwnprc/trunk/scripts/prc_onhitcast.nss @@ -299,7 +299,7 @@ void main() nDice = 2; nDam = (iElement == DAMAGE_TYPE_SONIC) ? d4(nDice) : d6(nDice); //reduced damage dice if((iElement == DAMAGE_TYPE_COLD) || (iElement == DAMAGE_TYPE_ELECTRICAL) || (iElement == DAMAGE_TYPE_ACID)) - nDam = max(nDice, nDam - nDice); //minimum of 1 per die + nDam = PRCMax(nDice, nDam - nDice); //minimum of 1 per die } } else @@ -309,13 +309,13 @@ void main() nDice = (GetLevelByClass(CLASS_TYPE_PYROKINETICIST, oSpellOrigin) >= 8) ? 4 : 2; nDam1 = (iElement == DAMAGE_TYPE_SONIC) ? d4(nDice) : d6(nDice); //reduced damage dice if((iElement == DAMAGE_TYPE_COLD) || (iElement == DAMAGE_TYPE_ELECTRICAL) || (iElement == DAMAGE_TYPE_ACID)) - nDam1 = max(nDice, nDam1 - nDice); //minimum of 1 per die + nDam1 = PRCMax(nDice, nDam1 - nDice); //minimum of 1 per die } if(GetTag(oItem) == "PRC_PYRO_LASH_WHIP") { //Extra damage from whip nDam2 += (iElement == DAMAGE_TYPE_SONIC) ? d6(1) : d8(1); //reduced damage dice if((iElement == DAMAGE_TYPE_COLD) || (iElement == DAMAGE_TYPE_ELECTRICAL) || (iElement == DAMAGE_TYPE_ACID)) - nDam2 = max(1, nDam2 - 1); //minimum of 1 + nDam2 = PRCMax(1, nDam2 - 1); //minimum of 1 } nDam = nDam1 + nDam2; } diff --git a/nwn/nwnprc/trunk/scripts/prc_prereq.nss b/nwn/nwnprc/trunk/scripts/prc_prereq.nss index 1bfe99f1..6a2c25a4 100644 --- a/nwn/nwnprc/trunk/scripts/prc_prereq.nss +++ b/nwn/nwnprc/trunk/scripts/prc_prereq.nss @@ -1680,7 +1680,7 @@ void main() string sPsiFile = GetAMSKnownFileName(nClass); int nMaxLevel = StringToInt(Get2DACache(sPsiFile, "MaxPowerLevel", nLevel)); - int nPsiHighest = min(nMaxLevel, nAbility - 10); + int nPsiHighest = PRCMin(nMaxLevel, nAbility - 10); for(nSpellLevel = 1; nSpellLevel <= nPsiHighest; nSpellLevel++) { @@ -1700,8 +1700,8 @@ void main() int nAbility = GetAbilityScoreForClass(nClass, oPC); string sShdFile = GetAMSKnownFileName(nClass); - int nShdHighest = max(GetMaxMysteryLevelLearnable(oPC, nClass, 1), GetMaxMysteryLevelLearnable(oPC, nClass, 2)); - nShdHighest = max(nShdHighest, GetMaxMysteryLevelLearnable(oPC, nClass, 3)); + int nShdHighest = PRCMax(GetMaxMysteryLevelLearnable(oPC, nClass, 1), GetMaxMysteryLevelLearnable(oPC, nClass, 2)); + nShdHighest = PRCMax(nShdHighest, GetMaxMysteryLevelLearnable(oPC, nClass, 3)); for(nSpellLevel = 1; nSpellLevel <= nShdHighest; nSpellLevel++) { diff --git a/nwn/nwnprc/trunk/scripts/prc_shaman_ancp.nss b/nwn/nwnprc/trunk/scripts/prc_shaman_ancp.nss index f8c243da..6c2c6e42 100644 --- a/nwn/nwnprc/trunk/scripts/prc_shaman_ancp.nss +++ b/nwn/nwnprc/trunk/scripts/prc_shaman_ancp.nss @@ -24,9 +24,15 @@ void main() SetNaturalWeaponDamage(oComp); object oCompSkin = GetPCSkin(oComp); - + + effect eCheckEffect = GetFirstEffect(oPC); + while (GetIsEffectValid(eCheckEffect)) + { + if(GetEffectTag(eCheckEffect) == "VoPFeat"+IntToString(FEAT_EXALTED_COMPANION)) SetLocalInt(oPC,"VoPFeat"+IntToString(FEAT_EXALTED_COMPANION),1); + eCheckEffect = GetNextEffect(oPC); + } //Exalted Companion - if((GetHasFeat(FEAT_EXALTED_COMPANION, oPC) || GetPersistantLocalInt(oPC, "VoPFeat"+IntToString(FEAT_EXALTED_COMPANION))) + if((GetHasFeat(FEAT_EXALTED_COMPANION, oPC) || GetLocalInt(oPC, "VoPFeat"+IntToString(FEAT_EXALTED_COMPANION))) && GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD) ApplyExaltedCompanion(oComp, oCompSkin); diff --git a/nwn/nwnprc/trunk/scripts/prc_sleat_edrain.nss b/nwn/nwnprc/trunk/scripts/prc_sleat_edrain.nss index dc92d036..5f42110c 100644 --- a/nwn/nwnprc/trunk/scripts/prc_sleat_edrain.nss +++ b/nwn/nwnprc/trunk/scripts/prc_sleat_edrain.nss @@ -229,7 +229,7 @@ void DoDeathDependent(object oEater, object oTarget, string sResRef, string sNam object oSlave = CreateObject(OBJECT_TYPE_CREATURE, "soul_wight_test", lSpawn); if(GetIsObjectValid(oSlave)) { - SetMaxHenchmen(max(nMaxHenchmen, i)); // Temporarily set the number of max henchmen high enough that we can add another + SetMaxHenchmen(PRCMax(nMaxHenchmen, i)); // Temporarily set the number of max henchmen high enough that we can add another AddHenchman(oEater, oSlave); SetMaxHenchmen(nMaxHenchmen); diff --git a/nwn/nwnprc/trunk/scripts/prc_speed.nss b/nwn/nwnprc/trunk/scripts/prc_speed.nss index 91bdfef1..b17e09d8 100644 --- a/nwn/nwnprc/trunk/scripts/prc_speed.nss +++ b/nwn/nwnprc/trunk/scripts/prc_speed.nss @@ -148,14 +148,14 @@ void main() // Speed increase if(fSpeedChange > 0.0) { - int nChange = min(99, max(0, FloatToInt(fSpeedChange * 100.0))); + int nChange = PRCMin(99, PRCMax(0, FloatToInt(fSpeedChange * 100.0))); if(DEBUG) DoDebug("prc_speed: Applying an increase in speed: " + IntToString(nChange)); AssignCommand(oWP, ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectMovementSpeedIncrease(nChange)), oPC))); } // Speed decrease else if(fSpeedChange < 0.0) { - int nChange = min(99, max(0, FloatToInt(-fSpeedChange * 100.0))); + int nChange = PRCMin(99, PRCMax(0, FloatToInt(-fSpeedChange * 100.0))); if(DEBUG) DoDebug("prc_speed: Applying an decrease in speed: " + IntToString(nChange)); AssignCommand(oWP, ActionDoCommand(ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(EffectMovementSpeedDecrease(nChange)), oPC))); //ApplyEffectToObject(DURATION_TYPE_PERMANENT, ExtraordinaryEffect(EffectMovementSpeedDecrease(nChange)), oPC) diff --git a/nwn/nwnprc/trunk/scripts/prc_tw_rend.nss b/nwn/nwnprc/trunk/scripts/prc_tw_rend.nss index f0ecdc89..0d8cfefb 100644 --- a/nwn/nwnprc/trunk/scripts/prc_tw_rend.nss +++ b/nwn/nwnprc/trunk/scripts/prc_tw_rend.nss @@ -103,7 +103,7 @@ void main() { // Get the highest enhancement bonus property on the item if(GetItemPropertyType(ipTest) == ITEM_PROPERTY_ENHANCEMENT_BONUS) - nBonus = max(nBonus, GetItemPropertyCostTableValue(ipTest)); + nBonus = PRCMax(nBonus, GetItemPropertyCostTableValue(ipTest)); ipTest = GetNextItemProperty(oSmaller); } diff --git a/nwn/nwnprc/trunk/scripts/prc_wallbreatha.nss b/nwn/nwnprc/trunk/scripts/prc_wallbreatha.nss index af974509..0c1e6930 100644 --- a/nwn/nwnprc/trunk/scripts/prc_wallbreatha.nss +++ b/nwn/nwnprc/trunk/scripts/prc_wallbreatha.nss @@ -28,7 +28,7 @@ void main() int nDamageType = GetLocalInt(oDragon, "BarrierDamageType"); int nDiceType = GetLocalInt(oDragon, "BarrierDiceType"); int nDiceNumber = GetLocalInt(oDragon, "BarrierDiceNumber"); - int nSaveDC = 10 + GetHitDice(oDragon) / 2 + max(GetAbilityModifier(ABILITY_CONSTITUTION, oDragon), 0); + int nSaveDC = 10 + GetHitDice(oDragon) / 2 + PRCMax(GetAbilityModifier(ABILITY_CONSTITUTION, oDragon), 0); //Declare and assign personal impact visual effect. switch(nDamageType) { diff --git a/nwn/nwnprc/trunk/scripts/prc_wallbreathc.nss b/nwn/nwnprc/trunk/scripts/prc_wallbreathc.nss index 6234e601..a06d9af8 100644 --- a/nwn/nwnprc/trunk/scripts/prc_wallbreathc.nss +++ b/nwn/nwnprc/trunk/scripts/prc_wallbreathc.nss @@ -38,7 +38,7 @@ void main() int nDamageType = GetLocalInt(oDragon, "BarrierDamageType"); int nDiceType = GetLocalInt(oDragon, "BarrierDiceType"); int nDiceNumber = GetLocalInt(oDragon, "BarrierDiceNumber"); - int nSaveDC = 10 + GetHitDice(oDragon) / 2 + max(GetAbilityModifier(ABILITY_CONSTITUTION, oDragon), 0); + int nSaveDC = 10 + GetHitDice(oDragon) / 2 + PRCMax(GetAbilityModifier(ABILITY_CONSTITUTION, oDragon), 0); //Declare and assign personal impact visual effect. switch (nDamageType) { diff --git a/nwn/nwnprc/trunk/scripts/rs_regen_wounds.nss b/nwn/nwnprc/trunk/scripts/rs_regen_wounds.nss index 99cdd07b..e7170af3 100644 --- a/nwn/nwnprc/trunk/scripts/rs_regen_wounds.nss +++ b/nwn/nwnprc/trunk/scripts/rs_regen_wounds.nss @@ -54,7 +54,7 @@ void ControlledRegeneration(object oTarget, int nRegenRate) if (nCurrentHP < nInitialHP) { - int nHealAmount = min(nRegenRate, nInitialHP - nCurrentHP); // Ensure not to heal beyond the initial hit points + int nHealAmount = PRCMin(nRegenRate, nInitialHP - nCurrentHP); // Ensure not to heal beyond the initial hit points if(DEBUG) DoDebug( "rs_regen_wounds > ControlledRegeneration: Healing " + IntToString(nHealAmount) + " HP."); effect eFakeRegen = EffectHeal(nHealAmount); ApplyEffectToObject(DURATION_TYPE_INSTANT, eFakeRegen, oTarget); diff --git a/nwn/nwnprc/trunk/scripts/wol_sla_bully.nss b/nwn/nwnprc/trunk/scripts/wol_sla_bully.nss index 277ad0e8..5653aa85 100644 --- a/nwn/nwnprc/trunk/scripts/wol_sla_bully.nss +++ b/nwn/nwnprc/trunk/scripts/wol_sla_bully.nss @@ -84,7 +84,7 @@ void main() if (GetLocalInt(oTarget, "PRCCombat_StruckByAttack")) { //ActionCastSpell(SPELL_TOUCH_OF_IDIOCY, 5, 0, 0, METAMAGIC_NONE, CLASS_TYPE_INVALID, FALSE, TRUE, oTarget); - DoRacialSLA(SPELL_CHAIN_LIGHTNING, 15, max(19, 16 + GetAbilityModifier(ABILITY_CHARISMA, oPC)), TRUE); + DoRacialSLA(SPELL_CHAIN_LIGHTNING, 15, PRCMax(19, 16 + GetAbilityModifier(ABILITY_CHARISMA, oPC)), TRUE); SetLegacyUses(oPC, nSLA); } } diff --git a/nwn/nwnprc/trunk/scripts/wol_sla_kamate.nss b/nwn/nwnprc/trunk/scripts/wol_sla_kamate.nss index d5c72a01..769c1c6b 100644 --- a/nwn/nwnprc/trunk/scripts/wol_sla_kamate.nss +++ b/nwn/nwnprc/trunk/scripts/wol_sla_kamate.nss @@ -40,7 +40,7 @@ void main() nCasterLevel = 10; nSpell = SPELL_LIGHTNING_BOLT; nUses = 3; - nDC = max(14, 13 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(14, 13 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_KAMATE_CHAIN: @@ -48,7 +48,7 @@ void main() nCasterLevel = 15; nSpell = SPELL_CHAIN_LIGHTNING; nUses = 1; - nDC = max(16, 14 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(16, 14 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_KAMATE_TRUE_STRIKE: diff --git a/nwn/nwnprc/trunk/scripts/wol_sla_ravenknd.nss b/nwn/nwnprc/trunk/scripts/wol_sla_ravenknd.nss index a7128e44..ab3cb1e1 100644 --- a/nwn/nwnprc/trunk/scripts/wol_sla_ravenknd.nss +++ b/nwn/nwnprc/trunk/scripts/wol_sla_ravenknd.nss @@ -40,7 +40,7 @@ void main() nCasterLevel = 5; nSpell = SPELL_FLARE; nUses = 999; - nDC = max(10, 10 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(10, 10 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_RAVENKIND_DETECT_UNDEAD: @@ -55,7 +55,7 @@ void main() nCasterLevel = 10; nSpell = SPELL_HALT_UNDEAD; nUses = 2; - nDC = max(14, 13 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(14, 13 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_RAVENKIND_CURE: @@ -63,7 +63,7 @@ void main() nCasterLevel = 5; nSpell = SPELL_CURE_LIGHT_WOUNDS; nUses = 3; - nDC = max(11, 11 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(11, 11 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_RAVENKIND_DAYLIGHT: @@ -92,7 +92,7 @@ void main() nCasterLevel = 20; nSpell = SPELL_MASS_HEAL; nUses = 3; - nDC = max(23, 19 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(23, 19 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } } diff --git a/nwn/nwnprc/trunk/scripts/wol_sla_thaas.nss b/nwn/nwnprc/trunk/scripts/wol_sla_thaas.nss index 752458e0..393188a5 100644 --- a/nwn/nwnprc/trunk/scripts/wol_sla_thaas.nss +++ b/nwn/nwnprc/trunk/scripts/wol_sla_thaas.nss @@ -64,7 +64,7 @@ void main() nCasterLevel = 15; nSpell = SPELL_BANISHMENT; nUses = 1; - nDC = max(20, 17 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); + nDC = PRCMax(20, 17 + GetAbilityModifier(ABILITY_CHARISMA, oPC)); break; } case WOL_THAAS_TELEPORT: diff --git a/nwn/nwnprc/trunk/spells/nw_s0_burnhand.nss b/nwn/nwnprc/trunk/spells/nw_s0_burnhand.nss index 5563b5cd..5267e796 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_burnhand.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_burnhand.nss @@ -48,7 +48,7 @@ void main() int nMetaMagic = PRCGetMetaMagicFeat(); int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE); int nSaveType = ChangedSaveType(EleDmg); - int nDice = min(5, nCasterLevel); + int nDice = PRCMin(5, nCasterLevel); int nDamage; float fDist; diff --git a/nwn/nwnprc/trunk/spells/nw_s0_calllghtn.nss b/nwn/nwnprc/trunk/spells/nw_s0_calllghtn.nss index a11665b1..3b09827a 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_calllghtn.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_calllghtn.nss @@ -64,7 +64,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oCaster); int nPenetr = nCasterLvl + SPGetPenetr(); int nMetaMagic = PRCGetMetaMagicFeat(); - int nDice = min(10, nCasterLvl); + int nDice = PRCMin(10, nCasterLvl); int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_ELECTRICAL); int nSaveType = ChangedSaveType(EleDmg); diff --git a/nwn/nwnprc/trunk/spells/nw_s0_curinflict.nss b/nwn/nwnprc/trunk/spells/nw_s0_curinflict.nss index 1a50334e..e9fd5715 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_curinflict.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_curinflict.nss @@ -49,7 +49,7 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nSpellID, int } // Extra points based on spell level, capped to caster level - int nExtraDamage = min(nSpellLevel * 5, nCasterLevel); + int nExtraDamage = PRCMin(nSpellLevel * 5, nCasterLevel); // Healing is more effective for players on low or normal difficulty int nDifficultyCondition = (GetIsPC(oTarget) && (GetGameDifficulty() < GAME_DIFFICULTY_CORE_RULES)) && bIsCure; diff --git a/nwn/nwnprc/trunk/spells/nw_s0_darkness.nss b/nwn/nwnprc/trunk/spells/nw_s0_darkness.nss index 428e5553..af496ea5 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_darkness.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_darkness.nss @@ -39,7 +39,7 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel) if(nMetaMagic & METAMAGIC_EXTEND) fDuration *= 2; - int nShadow = max(GetLocalInt(oCaster, "ShadowMantle_Shoulder"), GetLocalInt(oTarget, "ShadowMantle_Shoulder")); + int nShadow = PRCMax(GetLocalInt(oCaster, "ShadowMantle_Shoulder"), GetLocalInt(oTarget, "ShadowMantle_Shoulder")); if (nShadow) nPnP = FALSE; if (DEBUG) DoDebug("nw_s0_darkness: oCaster "+GetName(oCaster)+" oTarget "+GetName(oTarget)+" nSwitch "+IntToString(nPnP)); diff --git a/nwn/nwnprc/trunk/spells/nw_s0_fireball.nss b/nwn/nwnprc/trunk/spells/nw_s0_fireball.nss index cbf92fe9..af2c6430 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_fireball.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_fireball.nss @@ -43,7 +43,7 @@ void main() effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); effect eDam; //Limit Caster level for the purposes of damage - int nDice = min(10, nCasterLvl); + int nDice = PRCMin(10, nCasterLvl); nCasterLvl += SPGetPenetr(); diff --git a/nwn/nwnprc/trunk/spells/nw_s0_flmstrike.nss b/nwn/nwnprc/trunk/spells/nw_s0_flmstrike.nss index 9b9e15ab..92a60112 100644 --- a/nwn/nwnprc/trunk/spells/nw_s0_flmstrike.nss +++ b/nwn/nwnprc/trunk/spells/nw_s0_flmstrike.nss @@ -36,7 +36,7 @@ void main() int nMetaMagic = PRCGetMetaMagicFeat(); int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE); int nSaveType = ChangedSaveType(EleDmg); - int nDice = min(15, nCasterLvl); + int nDice = PRCMin(15, nCasterLvl); int nDamage, nDamage2; effect eStrike = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE); diff --git a/nwn/nwnprc/trunk/spells/nw_s1_barbrage.nss b/nwn/nwnprc/trunk/spells/nw_s1_barbrage.nss index 48e2ef71..8f70acf6 100644 --- a/nwn/nwnprc/trunk/spells/nw_s1_barbrage.nss +++ b/nwn/nwnprc/trunk/spells/nw_s1_barbrage.nss @@ -143,7 +143,7 @@ void main() if (nTotem) { int nTotemRage = GetMaxEssentiaCapacityFeat(oPC) - nEssentia; - int nExtraEss = max(nTotem/2, 1); + int nExtraEss = PRCMax(nTotem/2, 1); int nBoost; if (nExtraEss >= nTotemRage) { diff --git a/nwn/nwnprc/trunk/spells/nw_s2_familiar.nss b/nwn/nwnprc/trunk/spells/nw_s2_familiar.nss index 6b3dac98..42ffecb4 100644 --- a/nwn/nwnprc/trunk/spells/nw_s2_familiar.nss +++ b/nwn/nwnprc/trunk/spells/nw_s2_familiar.nss @@ -275,9 +275,9 @@ void SummonPRCFamiliar(object oPC) nFamiliarType--; int nFamLevel = GetLevelByClass(CLASS_TYPE_WIZARD); - nFamLevel = max(nFamLevel, GetLevelByClass(CLASS_TYPE_SORCERER)); - nFamLevel = max(nFamLevel, GetLevelByClass(CLASS_TYPE_WITCH)); - nFamLevel = max(nFamLevel, GetLevelByClass(CLASS_TYPE_HEXBLADE)); + nFamLevel = PRCMax(nFamLevel, GetLevelByClass(CLASS_TYPE_SORCERER)); + nFamLevel = PRCMax(nFamLevel, GetLevelByClass(CLASS_TYPE_WITCH)); + nFamLevel = PRCMax(nFamLevel, GetLevelByClass(CLASS_TYPE_HEXBLADE)); nFamLevel += GetLevelByClass(CLASS_TYPE_ALIENIST); if (GetHasFeat(FEAT_SHADOW_FAMILIAR, oPC)) nFamLevel = GetLevelByTypeArcane(oPC) + GetShadowcasterLevel(oPC); // For the purpose of determining familiar abilities that depend on your arcane caster level, your levels in all classes that allow you to cast mysteries or arcane spells stack diff --git a/nwn/nwnprc/trunk/spells/sp_amber_sarc.nss b/nwn/nwnprc/trunk/spells/sp_amber_sarc.nss index b6222180..c7ef640c 100644 --- a/nwn/nwnprc/trunk/spells/sp_amber_sarc.nss +++ b/nwn/nwnprc/trunk/spells/sp_amber_sarc.nss @@ -82,7 +82,7 @@ void main() int nNormHP = GetCurrentHitPoints(oTarget); //Apply effects - effect eSarc = EffectLinkEffects(EffectTemporaryHitpoints(10 * min(20, nCasterLvl)), EffectCutsceneParalyze()); + effect eSarc = EffectLinkEffects(EffectTemporaryHitpoints(10 * PRCMin(20, nCasterLvl)), EffectCutsceneParalyze()); eSarc = EffectLinkEffects(eSarc, EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MAJOR)); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSarc, oTarget, fDur, TRUE, PRCGetSpellId(), nCasterLvl); diff --git a/nwn/nwnprc/trunk/spells/sp_ayailla_rb.nss b/nwn/nwnprc/trunk/spells/sp_ayailla_rb.nss index a11d71f3..1581744e 100644 --- a/nwn/nwnprc/trunk/spells/sp_ayailla_rb.nss +++ b/nwn/nwnprc/trunk/spells/sp_ayailla_rb.nss @@ -72,12 +72,12 @@ void main() } //evil take damage, separate saving throw - nDam = d6(min(5, nCasterLvl/2)); + nDam = d6(PRCMin(5, nCasterLvl/2)); //maximize if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(5, nCasterLvl/2)); + nDam = 6 * (PRCMin(5, nCasterLvl/2)); } //empower @@ -85,7 +85,7 @@ void main() { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(5, nCasterLvl/2)); + nDam += SpellDamagePerDice(oPC, PRCMin(5, nCasterLvl/2)); if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC)) nDam = (nDam/2); //Apply damage diff --git a/nwn/nwnprc/trunk/spells/sp_bestow_wnd.nss b/nwn/nwnprc/trunk/spells/sp_bestow_wnd.nss index 3db7cd1a..1c4f068a 100644 --- a/nwn/nwnprc/trunk/spells/sp_bestow_wnd.nss +++ b/nwn/nwnprc/trunk/spells/sp_bestow_wnd.nss @@ -45,7 +45,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oPC); int nCasterMaxHP = GetMaxHitPoints(oPC); int nCasterCurrentHP = GetCurrentHitPoints(oPC); - int nDam = min((nCasterMaxHP - nCasterCurrentHP), nCasterLvl); + int nDam = PRCMin((nCasterMaxHP - nCasterCurrentHP), nCasterLvl); int nDC = PRCGetSaveDC(oTarget, oPC); PRCSignalSpellEvent(oTarget, TRUE, SPELL_BESTOW_WOUND, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_bigby_sf.nss b/nwn/nwnprc/trunk/spells/sp_bigby_sf.nss index 6b1cf095..23102d7c 100644 --- a/nwn/nwnprc/trunk/spells/sp_bigby_sf.nss +++ b/nwn/nwnprc/trunk/spells/sp_bigby_sf.nss @@ -60,18 +60,18 @@ void main() if (iAttackRoll > 0) { - int nDam = d6(min(5, (nCasterLevel/2))); + int nDam = d6(PRCMin(5, (nCasterLevel/2))); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(5, (nCasterLevel/2))); + nDam = 6 * (PRCMin(5, (nCasterLevel/2))); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(5, nCasterLevel/2)); + nDam += SpellDamagePerDice(oPC, PRCMin(5, nCasterLevel/2)); //save if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, PRCGetSaveDC(oTarget, oPC), SAVING_THROW_TYPE_SPELL)) { diff --git a/nwn/nwnprc/trunk/spells/sp_bigby_trip.nss b/nwn/nwnprc/trunk/spells/sp_bigby_trip.nss index 2d863fe0..767db81e 100644 --- a/nwn/nwnprc/trunk/spells/sp_bigby_trip.nss +++ b/nwn/nwnprc/trunk/spells/sp_bigby_trip.nss @@ -56,7 +56,7 @@ void main() int nAbilityScore = GetAbilityScoreForClass(nClassType, oPC); int nAttackBonus = (2 + nCasterLvl + (nAbilityScore - 10)/2 ); - int nTripBonus = min(5,(nCasterLvl/3)); + int nTripBonus = PRCMin(5,(nCasterLvl/3)); int iAttackRoll = GetAttackRoll(oTarget, OBJECT_INVALID, OBJECT_INVALID, 0, nAttackBonus,0,nDisplayFeedback, 0.0, TOUCH_ATTACK_MELEE_SPELL); if (iAttackRoll > 0) @@ -67,7 +67,7 @@ void main() //save if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, PRCGetSaveDC(oTarget, oPC), SAVING_THROW_TYPE_SPELL)) { - int nOpposing = d20() + (max(GetAbilityModifier(ABILITY_STRENGTH, oTarget), GetAbilityModifier(ABILITY_DEXTERITY, oTarget))) + EvalSizeBonus(oTarget); + int nOpposing = d20() + (PRCMax(GetAbilityModifier(ABILITY_STRENGTH, oTarget), GetAbilityModifier(ABILITY_DEXTERITY, oTarget))) + EvalSizeBonus(oTarget); int nCheck = d20() + 2 + nTripBonus; if(nCheck > nOpposing) diff --git a/nwn/nwnprc/trunk/spells/sp_blastfrc.nss b/nwn/nwnprc/trunk/spells/sp_blastfrc.nss index 931c8fa5..8f147be9 100644 --- a/nwn/nwnprc/trunk/spells/sp_blastfrc.nss +++ b/nwn/nwnprc/trunk/spells/sp_blastfrc.nss @@ -49,7 +49,7 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) { if (!PRCDoResistSpell(oCaster, oTarget, nPenetr)) { - int nDice= min(nCasterLevel/2, 5); + int nDice= PRCMin(nCasterLevel/2, 5); int nDam = d6(nDice); if(nMetaMagic & METAMAGIC_MAXIMIZE) nDam = 6 * nDice; if(nMetaMagic & METAMAGIC_EMPOWER) nDam += (nDam/2); diff --git a/nwn/nwnprc/trunk/spells/sp_bolt_glory.nss b/nwn/nwnprc/trunk/spells/sp_bolt_glory.nss index e50788b3..158113ac 100644 --- a/nwn/nwnprc/trunk/spells/sp_bolt_glory.nss +++ b/nwn/nwnprc/trunk/spells/sp_bolt_glory.nss @@ -70,17 +70,17 @@ void main() { if((nRace == RACIAL_TYPE_UNDEAD) || (nRace == RACIAL_TYPE_OUTSIDER && nAlign == ALIGNMENT_EVIL)) { - nDam = d6(min(nCasterLevel, 15)); + nDam = d6(PRCMin(nCasterLevel, 15)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * min(nCasterLevel, 15); + nDam = 6 * PRCMin(nCasterLevel, 15); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(nCasterLevel,15)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLevel,15)); } if((nRace == RACIAL_TYPE_ELEMENTAL) || @@ -89,17 +89,17 @@ void main() //Material native and living (nRace != RACIAL_TYPE_OUTSIDER && nRace != RACIAL_TYPE_UNDEAD && nRace != RACIAL_TYPE_CONSTRUCT)) { - nDam = d6(min(nCasterLevel/2, 7)); + nDam = d6(PRCMin(nCasterLevel/2, 7)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * min(nCasterLevel/2, 7); + nDam = 6 * PRCMin(nCasterLevel/2, 7); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(nCasterLevel/2, 7)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLevel/2, 7)); } SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_DIVINE), oTarget); diff --git a/nwn/nwnprc/trunk/spells/sp_chaavs_lgh.nss b/nwn/nwnprc/trunk/spells/sp_chaavs_lgh.nss index 3941d0fb..53331b1a 100644 --- a/nwn/nwnprc/trunk/spells/sp_chaavs_lgh.nss +++ b/nwn/nwnprc/trunk/spells/sp_chaavs_lgh.nss @@ -70,7 +70,7 @@ void main() effect eVilLink = EffectLinkEffects(EffectAttackDecrease(nModify, ATTACK_BONUS_MISC), EffectSavingThrowDecrease(SAVING_THROW_ALL, nModify, SAVING_THROW_TYPE_FEAR)); effect eGoodLink = EffectLinkEffects(EffectAttackIncrease(nModify, ATTACK_BONUS_MISC), EffectSavingThrowIncrease(SAVING_THROW_ALL, nModify, SAVING_THROW_TYPE_FEAR)); - eGoodLink = EffectLinkEffects(eGoodLink, EffectTemporaryHitpoints(d8(1) + min(20, nCasterLvl))); + eGoodLink = EffectLinkEffects(eGoodLink, EffectTemporaryHitpoints(d8(1) + PRCMin(20, nCasterLvl))); while(GetIsObjectValid(oTarget)) { diff --git a/nwn/nwnprc/trunk/spells/sp_chan_pyrob.nss b/nwn/nwnprc/trunk/spells/sp_chan_pyrob.nss index 706abf37..877d01ab 100644 --- a/nwn/nwnprc/trunk/spells/sp_chan_pyrob.nss +++ b/nwn/nwnprc/trunk/spells/sp_chan_pyrob.nss @@ -74,47 +74,47 @@ void main() return; } - nDam = d4(min((nCasterLvl/2), 10)); + nDam = d4(PRCMin((nCasterLvl/2), 10)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 4 * (min((nCasterLvl/2), 10)); + nDam = 4 * (PRCMin((nCasterLvl/2), 10)); } } //standard else if(nSpell == SPELL_CHANNELED_PYROBURST_2) { - nDam = d6(min(10, nCasterLvl)); + nDam = d6(PRCMin(10, nCasterLvl)); fRadius = 3.048f; if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(10, nCasterLvl)); + nDam = 6 * (PRCMin(10, nCasterLvl)); } } //full round else if(nSpell == SPELL_CHANNELED_PYROBURST_3) { - nDam = d8(min(10, nCasterLvl)); + nDam = d8(PRCMin(10, nCasterLvl)); fRadius = 4.57f; if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 8 * (min(10, nCasterLvl)); + nDam = 8 * (PRCMin(10, nCasterLvl)); } } //two rounds else if(nSpell == SPELL_CHANNELED_PYROBURST_4) { - nDam = d10(min(10, nCasterLvl)); + nDam = d10(PRCMin(10, nCasterLvl)); fRadius = 6.10f; if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 10 * (min(10, nCasterLvl)); + nDam = 10 * (PRCMin(10, nCasterLvl)); } } @@ -129,7 +129,7 @@ void main() { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(10, nCasterLvl)); + nDam += SpellDamagePerDice(oPC, PRCMin(10, nCasterLvl)); if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_FIRE)) { diff --git a/nwn/nwnprc/trunk/spells/sp_dancg_web.nss b/nwn/nwnprc/trunk/spells/sp_dancg_web.nss index e86dbd9b..98f087d3 100644 --- a/nwn/nwnprc/trunk/spells/sp_dancg_web.nss +++ b/nwn/nwnprc/trunk/spells/sp_dancg_web.nss @@ -46,7 +46,7 @@ void main() float fDur; int nMetaMagic = PRCGetMetaMagicFeat(); int nCasterLvl = PRCGetCasterLevel(oPC); - int nMin = min(10, nCasterLvl); + int nMin = PRCMin(10, nCasterLvl); int nDam; int nDC = PRCGetSaveDC(oTarget, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_deflect.nss b/nwn/nwnprc/trunk/spells/sp_deflect.nss index 122804df..21414922 100644 --- a/nwn/nwnprc/trunk/spells/sp_deflect.nss +++ b/nwn/nwnprc/trunk/spells/sp_deflect.nss @@ -54,7 +54,7 @@ void main() int nMetaMagic = PRCGetMetaMagicFeat(); int nSpell = PRCGetSpellId(); int nBonus = nSpell == SPELL_DEFLECT ? nCasterLvl/2: - min(5, (nCasterLvl/3)); + PRCMin(5, (nCasterLvl/3)); PRCSignalSpellEvent(oPC, FALSE, nSpell, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_dmnd_spray.nss b/nwn/nwnprc/trunk/spells/sp_dmnd_spray.nss index f9d32fea..bba88cc1 100644 --- a/nwn/nwnprc/trunk/spells/sp_dmnd_spray.nss +++ b/nwn/nwnprc/trunk/spells/sp_dmnd_spray.nss @@ -57,11 +57,11 @@ void main() { if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr())) { - int nDam = d6(min(nCasterLvl,10)); + int nDam = d6(PRCMin(nCasterLvl,10)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(nCasterLvl, 10)); + nDam = 6 * (PRCMin(nCasterLvl, 10)); } if(nMetaMagic & METAMAGIC_EMPOWER) { @@ -71,7 +71,7 @@ void main() { fDur += fDur; } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl, 10)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl, 10)); if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_EVIL) { nDC = PRCGetSaveDC(oTarget, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_doom_scarab.nss b/nwn/nwnprc/trunk/spells/sp_doom_scarab.nss index 7f35610f..5a5585cc 100644 --- a/nwn/nwnprc/trunk/spells/sp_doom_scarab.nss +++ b/nwn/nwnprc/trunk/spells/sp_doom_scarab.nss @@ -63,19 +63,19 @@ void main() while(GetIsObjectValid(oTarget)) { - nDam = d6(min(nCasterLvl/2, 10)); + nDam = d6(PRCMin(nCasterLvl/2, 10)); nDC = PRCGetSaveDC(oTarget, oPC); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(nCasterLvl/2, 10)); + nDam = 6 * (PRCMin(nCasterLvl/2, 10)); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl/2, 10)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl/2, 10)); if(PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_SPELL)) { nDam = (nDam/2); diff --git a/nwn/nwnprc/trunk/spells/sp_drac_might.nss b/nwn/nwnprc/trunk/spells/sp_drac_might.nss index 3e11482a..4a86bfdb 100644 --- a/nwn/nwnprc/trunk/spells/sp_drac_might.nss +++ b/nwn/nwnprc/trunk/spells/sp_drac_might.nss @@ -54,7 +54,7 @@ void main() if(GetLevelByClass(CLASS_TYPE_SORCERER, oPC)) { //not sure whether we can have 40+ caster levels now... - nCasterLvl = min(nCasterLvl + 1, 40); + nCasterLvl = PRCMin(nCasterLvl + 1, 40); } float fDur = (60.0 * nCasterLvl); diff --git a/nwn/nwnprc/trunk/spells/sp_ecto_enhnc.nss b/nwn/nwnprc/trunk/spells/sp_ecto_enhnc.nss index 147dcd0b..2002fd37 100644 --- a/nwn/nwnprc/trunk/spells/sp_ecto_enhnc.nss +++ b/nwn/nwnprc/trunk/spells/sp_ecto_enhnc.nss @@ -37,7 +37,7 @@ void main() object oPC = OBJECT_SELF; location lLoc = PRCGetSpellTargetLocation(); int nCasterLvl = PRCGetCasterLevel(oPC); - int nBonus = max((nCasterLvl/3), 1); + int nBonus = PRCMax((nCasterLvl/3), 1); int nRace; //Spellhook diff --git a/nwn/nwnprc/trunk/spells/sp_elemstrike.nss b/nwn/nwnprc/trunk/spells/sp_elemstrike.nss index bc93acc9..14c81509 100644 --- a/nwn/nwnprc/trunk/spells/sp_elemstrike.nss +++ b/nwn/nwnprc/trunk/spells/sp_elemstrike.nss @@ -59,7 +59,7 @@ void main() location lTarget = PRCGetSpellTargetLocation(); int nSpellID = PRCGetSpellId(); int nCasterLvl = PRCGetCasterLevel(oCaster); - int nDice = min(15, nCasterLvl); + int nDice = PRCMin(15, nCasterLvl); int nPenter = nCasterLvl + SPGetPenetr(); int nMetaMagic = PRCGetMetaMagicFeat(); int nDamageType, nImpVfx, nDamage, nDamage2; diff --git a/nwn/nwnprc/trunk/spells/sp_energz_ptn.nss b/nwn/nwnprc/trunk/spells/sp_energz_ptn.nss index 99eea4f2..c51e3da3 100644 --- a/nwn/nwnprc/trunk/spells/sp_energz_ptn.nss +++ b/nwn/nwnprc/trunk/spells/sp_energz_ptn.nss @@ -120,7 +120,7 @@ void main() SetLocalInt(oGrenade, "PRC_EnergizedPotionSave", SAVING_THROW_TYPE_SONIC); sDamageType = "Sonic"; } - nLevel = min(3, nLevel); + nLevel = PRCMin(3, nLevel); SetLocalInt(oGrenade, "PRC_GrenadeLevel", nLevel); SetLocalInt(oGrenade, "PRC_EnPotSaveDC", nDC); diff --git a/nwn/nwnprc/trunk/spells/sp_exaltd_raim.nss b/nwn/nwnprc/trunk/spells/sp_exaltd_raim.nss index 28be08b1..ac478f58 100644 --- a/nwn/nwnprc/trunk/spells/sp_exaltd_raim.nss +++ b/nwn/nwnprc/trunk/spells/sp_exaltd_raim.nss @@ -44,7 +44,7 @@ Created: 6/28/06 int GetERSpellResistance(int nCasterLvl) { - int nSRBonus = min(nCasterLvl, 20); + int nSRBonus = PRCMin(nCasterLvl, 20); int nIPConst; switch(nSRBonus) @@ -81,7 +81,7 @@ void main() object oMyArmor = IPGetTargetedOrEquippedArmor(FALSE); int nCasterLvl = PRCGetCasterLevel(oPC); int nSR = GetERSpellResistance(nCasterLvl); - int nArmor = min(nCasterLvl / 5, 4); + int nArmor = PRCMin(nCasterLvl / 5, 4); float fDur = (60.0f * nCasterLvl); int nMetaMagic = PRCGetMetaMagicFeat(); diff --git a/nwn/nwnprc/trunk/spells/sp_extr_wtrele.nss b/nwn/nwnprc/trunk/spells/sp_extr_wtrele.nss index feb56810..2c1d9420 100644 --- a/nwn/nwnprc/trunk/spells/sp_extr_wtrele.nss +++ b/nwn/nwnprc/trunk/spells/sp_extr_wtrele.nss @@ -48,7 +48,7 @@ void main() object oTarget = PRCGetSpellTargetObject(); int nCasterLvl = PRCGetCasterLevel(oPC); int nMetaMagic = PRCGetMetaMagicFeat(); - int nDam = d6(min(nCasterLvl, 20)); + int nDam = d6(PRCMin(nCasterLvl, 20)); int nSaveDC = PRCGetSaveDC(oTarget, oPC); int nType = MyPRCGetRacialType(oTarget); @@ -62,14 +62,14 @@ void main() if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6*(min(nCasterLvl, 20)); + nDam = 6*(PRCMin(nCasterLvl, 20)); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl, 20)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl, 20)); //SR check if(!PRCDoResistSpell(oPC, oTarget, (nCasterLvl + SPGetPenetr()))) { diff --git a/nwn/nwnprc/trunk/spells/sp_false_life.nss b/nwn/nwnprc/trunk/spells/sp_false_life.nss index 1cfa654f..a5d1947e 100644 --- a/nwn/nwnprc/trunk/spells/sp_false_life.nss +++ b/nwn/nwnprc/trunk/spells/sp_false_life.nss @@ -39,9 +39,9 @@ void main() if(nMetaMagic & METAMAGIC_EXTEND) fDur *= 2; - int nBonus = d10(1) + (min(10, nCasterLvl)); + int nBonus = d10(1) + (PRCMin(10, nCasterLvl)); if(nMetaMagic & METAMAGIC_MAXIMIZE) - nBonus = 10 + (min(10, nCasterLvl)); + nBonus = 10 + (PRCMin(10, nCasterLvl)); if(nMetaMagic & METAMAGIC_EMPOWER) nBonus += (nBonus/2); diff --git a/nwn/nwnprc/trunk/spells/sp_flesh_armor.nss b/nwn/nwnprc/trunk/spells/sp_flesh_armor.nss index 9f780284..bbea977d 100644 --- a/nwn/nwnprc/trunk/spells/sp_flesh_armor.nss +++ b/nwn/nwnprc/trunk/spells/sp_flesh_armor.nss @@ -43,7 +43,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oPC); float fDur= (600.0f * nCasterLvl); int nMetaMagic = PRCGetMetaMagicFeat(); - int nAmount = min(50, (5 * nCasterLvl)); + int nAmount = PRCMin(50, (5 * nCasterLvl)); effect eDR = EffectDamageReduction(10, DAMAGE_POWER_PLUS_ONE, nAmount); //placeholder VFX diff --git a/nwn/nwnprc/trunk/spells/sp_flesh_rip.nss b/nwn/nwnprc/trunk/spells/sp_flesh_rip.nss index e5b53ab6..6145cf07 100644 --- a/nwn/nwnprc/trunk/spells/sp_flesh_rip.nss +++ b/nwn/nwnprc/trunk/spells/sp_flesh_rip.nss @@ -42,7 +42,7 @@ void main() int nMetaMagic = PRCGetMetaMagicFeat(); int nType = MyPRCGetRacialType(oPC); int nType2 = MyPRCGetRacialType(oTarget); - int nDice = min(10, nCasterLvl); + int nDice = PRCMin(10, nCasterLvl); PRCSignalSpellEvent(oTarget,TRUE, SPELL_FLESH_RIPPER, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_hound_doom.nss b/nwn/nwnprc/trunk/spells/sp_hound_doom.nss index ef7912be..66c5ab1d 100644 --- a/nwn/nwnprc/trunk/spells/sp_hound_doom.nss +++ b/nwn/nwnprc/trunk/spells/sp_hound_doom.nss @@ -56,7 +56,7 @@ void HoundBuff(object oPC) oHound = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC, i); } - int nHP = max(0, GetMaxHitPoints(oPC) - GetCurrentHitPoints(oHound)); + int nHP = PRCMax(0, GetMaxHitPoints(oPC) - GetCurrentHitPoints(oHound)); effect eHP = EffectTemporaryHitpoints(nHP); int nABBonus = GetBaseAttackBonus(oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_mass_frshld.nss b/nwn/nwnprc/trunk/spells/sp_mass_frshld.nss index 67c10223..f912a99e 100644 --- a/nwn/nwnprc/trunk/spells/sp_mass_frshld.nss +++ b/nwn/nwnprc/trunk/spells/sp_mass_frshld.nss @@ -36,7 +36,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oPC); location lLoc = PRCGetSpellTargetLocation(); int nMetaMagic = PRCGetMetaMagicFeat(); - int nDam = min(15,nCasterLvl); + int nDam = PRCMin(15,nCasterLvl); float fDur = RoundsToSeconds(nCasterLvl); effect eVis, eShield, eReduce; int nSpell = GetSpellId(); diff --git a/nwn/nwnprc/trunk/spells/sp_nec_bloat.nss b/nwn/nwnprc/trunk/spells/sp_nec_bloat.nss index fc6e9077..72f6ce8a 100644 --- a/nwn/nwnprc/trunk/spells/sp_nec_bloat.nss +++ b/nwn/nwnprc/trunk/spells/sp_nec_bloat.nss @@ -52,7 +52,7 @@ void main() object oPC = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); - int nLevel = min(PRCGetCasterLevel(oPC), 10); + int nLevel = PRCMin(PRCGetCasterLevel(oPC), 10); int nMetaMagic = PRCGetMetaMagicFeat(); PRCSignalSpellEvent(oTarget, TRUE, SPELL_NECROTIC_BLOAT, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_nec_burst.nss b/nwn/nwnprc/trunk/spells/sp_nec_burst.nss index 57e1f14f..ce701a32 100644 --- a/nwn/nwnprc/trunk/spells/sp_nec_burst.nss +++ b/nwn/nwnprc/trunk/spells/sp_nec_burst.nss @@ -51,7 +51,7 @@ void main() object oPC = OBJECT_SELF; - int nLevel = min(PRCGetCasterLevel(oPC), 15); + int nLevel = PRCMin(PRCGetCasterLevel(oPC), 15); int nMetaMagic = PRCGetMetaMagicFeat(); object oTarget = PRCGetSpellTargetObject(); diff --git a/nwn/nwnprc/trunk/spells/sp_nec_erupt.nss b/nwn/nwnprc/trunk/spells/sp_nec_erupt.nss index 4444ea2d..0c916163 100644 --- a/nwn/nwnprc/trunk/spells/sp_nec_erupt.nss +++ b/nwn/nwnprc/trunk/spells/sp_nec_erupt.nss @@ -53,7 +53,7 @@ void main() object oPC = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); - int nLevel = min(PRCGetCasterLevel(oPC), 15); + int nLevel = PRCMin(PRCGetCasterLevel(oPC), 15); int nMetaMagic = PRCGetMetaMagicFeat(); PRCSignalSpellEvent(oTarget, TRUE, SPELL_NECROTIC_ERUPTION, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_nec_term.nss b/nwn/nwnprc/trunk/spells/sp_nec_term.nss index 780aed2b..20fc11d5 100644 --- a/nwn/nwnprc/trunk/spells/sp_nec_term.nss +++ b/nwn/nwnprc/trunk/spells/sp_nec_term.nss @@ -54,7 +54,7 @@ void main() object oPC = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); - int nLevel = min(PRCGetCasterLevel(oPC), 25); + int nLevel = PRCMin(PRCGetCasterLevel(oPC), 25); int nMetaMagic = PRCGetMetaMagicFeat(); PRCSignalSpellEvent(oTarget, TRUE, SPELL_NECROTIC_TERMINATION, oPC); diff --git a/nwn/nwnprc/trunk/spells/sp_orb_force.nss b/nwn/nwnprc/trunk/spells/sp_orb_force.nss index f07c1bc8..67ff8e8b 100644 --- a/nwn/nwnprc/trunk/spells/sp_orb_force.nss +++ b/nwn/nwnprc/trunk/spells/sp_orb_force.nss @@ -37,7 +37,7 @@ void main() object oPC = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); int nCasterLvl = PRCGetCasterLevel(oPC); - int nDice = min(10, nCasterLvl); + int nDice = PRCMin(10, nCasterLvl); int nDam = d6(nDice); int nTouch = PRCDoRangedTouchAttack(oTarget); int nMetaMagic = PRCGetMetaMagicFeat(); diff --git a/nwn/nwnprc/trunk/spells/sp_ot_frz_sphere.nss b/nwn/nwnprc/trunk/spells/sp_ot_frz_sphere.nss index 373f45e8..5730f8f7 100644 --- a/nwn/nwnprc/trunk/spells/sp_ot_frz_sphere.nss +++ b/nwn/nwnprc/trunk/spells/sp_ot_frz_sphere.nss @@ -52,7 +52,7 @@ void main() object oTarget; location lTarget = PRCGetSpellTargetLocation(); int nCasterLvl = PRCGetCasterLevel(oPC); - int nDice = min(15, nCasterLvl); + int nDice = PRCMin(15, nCasterLvl); int nMetaMagic = PRCGetMetaMagicFeat(); int eDamageType = ChangedElementalDamage(oPC, DAMAGE_TYPE_COLD); int nDC, bIsElemental, nDam; diff --git a/nwn/nwnprc/trunk/spells/sp_phoenix_fire.nss b/nwn/nwnprc/trunk/spells/sp_phoenix_fire.nss index 92bea21b..ba94c07f 100644 --- a/nwn/nwnprc/trunk/spells/sp_phoenix_fire.nss +++ b/nwn/nwnprc/trunk/spells/sp_phoenix_fire.nss @@ -95,18 +95,18 @@ void main() if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_EVIL) { //Damage = 2d6/level - nDam = d6(min(40, (2 * nCasterLvl))); + nDam = d6(PRCMin(40, (2 * nCasterLvl))); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(40, (2 * nCasterLvl))); + nDam = 6 * (PRCMin(40, (2 * nCasterLvl))); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(40, (2 * nCasterLvl))); + nDam += SpellDamagePerDice(oPC, PRCMin(40, (2 * nCasterLvl))); //Reflex save for 1/2 damage if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_GOOD)) { @@ -126,18 +126,18 @@ void main() else if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_NEUTRAL) { //Half damage for neutrality, Damage = 1d6 - nDam = d6(min(20,nCasterLvl)); + nDam = d6(PRCMin(20,nCasterLvl)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(20,nCasterLvl)); + nDam = 6 * (PRCMin(20,nCasterLvl)); } if(nMetaMagic & METAMAGIC_EMPOWER) { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(20, nCasterLvl)); + nDam += SpellDamagePerDice(oPC, PRCMin(20, nCasterLvl)); //Reflex for further 1/2 if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_GOOD)) { diff --git a/nwn/nwnprc/trunk/spells/sp_pnp_frshld.nss b/nwn/nwnprc/trunk/spells/sp_pnp_frshld.nss index b19fee61..afb4c528 100644 --- a/nwn/nwnprc/trunk/spells/sp_pnp_frshld.nss +++ b/nwn/nwnprc/trunk/spells/sp_pnp_frshld.nss @@ -62,7 +62,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oPC); int nSpell = GetSpellId(); int nMetaMagic = PRCGetMetaMagicFeat(); - int nDam = min(15,nCasterLvl); + int nDam = PRCMin(15,nCasterLvl); float fDur = RoundsToSeconds(nCasterLvl); effect eShield; effect eVis; diff --git a/nwn/nwnprc/trunk/spells/sp_prot_arrows.nss b/nwn/nwnprc/trunk/spells/sp_prot_arrows.nss index 135cd747..a9a3cb18 100644 --- a/nwn/nwnprc/trunk/spells/sp_prot_arrows.nss +++ b/nwn/nwnprc/trunk/spells/sp_prot_arrows.nss @@ -53,7 +53,7 @@ void main() PRCSignalSpellEvent(oTarget,FALSE, SPELL_PROTECTION_FROM_ARROWS, oPC); // Damage Resistance 10 piercing, max of 100 total - effect eBuff = EffectLinkEffects(EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10, min((10 * nCasterLvl), 100)), EffectVisualEffect(VFX_DUR_PROTECTION_ARROWS)); + effect eBuff = EffectLinkEffects(EffectDamageResistance(DAMAGE_TYPE_PIERCING, 10, PRCMin((10 * nCasterLvl), 100)), EffectVisualEffect(VFX_DUR_PROTECTION_ARROWS)); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBuff, oTarget, fDur); diff --git a/nwn/nwnprc/trunk/spells/sp_right_smt.nss b/nwn/nwnprc/trunk/spells/sp_right_smt.nss index 32aa128b..bff5bc47 100644 --- a/nwn/nwnprc/trunk/spells/sp_right_smt.nss +++ b/nwn/nwnprc/trunk/spells/sp_right_smt.nss @@ -63,21 +63,21 @@ void main() if((MyPRCGetRacialType(oTarget) == RACIAL_TYPE_OUTSIDER) && (nAlign == ALIGNMENT_EVIL)) { - nDam = d8(min(nCasterLvl, 20)); + nDam = d8(PRCMin(nCasterLvl, 20)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 8 * (min(nCasterLvl, 20)); + nDam = 8 * (PRCMin(nCasterLvl, 20)); } } else { - nDam = d6(min(nCasterLvl, 20)); + nDam = d6(PRCMin(nCasterLvl, 20)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 * (min(nCasterLvl, 20)); + nDam = 6 * (PRCMin(nCasterLvl, 20)); } } @@ -85,7 +85,7 @@ void main() { nDam += (nDam/2); } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl, 20)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl, 20)); //Save for 1/2 if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_EVIL)) { diff --git a/nwn/nwnprc/trunk/spells/sp_ring_bldsC.nss b/nwn/nwnprc/trunk/spells/sp_ring_bldsC.nss index c6961753..ca9dce09 100644 --- a/nwn/nwnprc/trunk/spells/sp_ring_bldsC.nss +++ b/nwn/nwnprc/trunk/spells/sp_ring_bldsC.nss @@ -60,7 +60,7 @@ void main() { if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oShadow)) { - int nDamage = d6() + min(10, nCasterLvl); + int nDamage = d6() + PRCMin(10, nCasterLvl); nDamage += SpellDamagePerDice(oShadow, 1); ApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, DAMAGE_TYPE_SLASHING, nDamage), oTarget); } diff --git a/nwn/nwnprc/trunk/spells/sp_scint_pattrn.nss b/nwn/nwnprc/trunk/spells/sp_scint_pattrn.nss index 99f808c6..4d4bff70 100644 --- a/nwn/nwnprc/trunk/spells/sp_scint_pattrn.nss +++ b/nwn/nwnprc/trunk/spells/sp_scint_pattrn.nss @@ -80,7 +80,7 @@ void main() effect eImpact = EffectVisualEffect(VFX_FNF_SCINTILLATING_PATTERN); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lTarget, 0.0f); - int nHD = min(nCasterLvl, 20); + int nHD = PRCMin(nCasterLvl, 20); float fDistance; int bContinueLoop, nCurrentHD, nLow; object oLowest; diff --git a/nwn/nwnprc/trunk/spells/sp_serp_arrow.nss b/nwn/nwnprc/trunk/spells/sp_serp_arrow.nss index 71e89eeb..ecf9d16a 100644 --- a/nwn/nwnprc/trunk/spells/sp_serp_arrow.nss +++ b/nwn/nwnprc/trunk/spells/sp_serp_arrow.nss @@ -44,7 +44,7 @@ void main() object oPC = OBJECT_SELF; object oTarget = PRCGetSpellTargetObject(); int nStack = GetItemStackSize(oTarget); - int nCreate = min(8, nStack); + int nCreate = PRCMin(8, nStack); SetItemStackSize(oTarget, (nStack - nCreate)); string sSerp; diff --git a/nwn/nwnprc/trunk/spells/sp_shock_grasp.nss b/nwn/nwnprc/trunk/spells/sp_shock_grasp.nss index e10c075e..d99673f3 100644 --- a/nwn/nwnprc/trunk/spells/sp_shock_grasp.nss +++ b/nwn/nwnprc/trunk/spells/sp_shock_grasp.nss @@ -50,7 +50,7 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) { int nMetaMagic = PRCGetMetaMagicFeat(); int nPenetr = nCasterLevel + SPGetPenetr(); - int nDie = min(nCasterLevel, 5); + int nDie = PRCMin(nCasterLevel, 5); object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget); effect eVis = EffectVisualEffect(VFX_DUR_BIGBYS_BIGBLUE_HAND2); diff --git a/nwn/nwnprc/trunk/spells/sp_shriveling.nss b/nwn/nwnprc/trunk/spells/sp_shriveling.nss index 1bbe7613..5149c605 100644 --- a/nwn/nwnprc/trunk/spells/sp_shriveling.nss +++ b/nwn/nwnprc/trunk/spells/sp_shriveling.nss @@ -55,12 +55,12 @@ void main() //SR if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()) && PRCGetIsAliveCreature(oTarget)) { - int nDam = d4(min(nCasterLvl, 10)); + int nDam = d4(PRCMin(nCasterLvl, 10)); //eval metamagic if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 4 * (min(nCasterLvl, 10)); + nDam = 4 * (PRCMin(nCasterLvl, 10)); } if(nMetaMagic & METAMAGIC_EMPOWER) @@ -73,7 +73,7 @@ void main() { nDam = nDam/2; } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl, 10)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl, 10)); effect eVis = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_GREASE); //Apply damage & visual diff --git a/nwn/nwnprc/trunk/spells/sp_strm_shard.nss b/nwn/nwnprc/trunk/spells/sp_strm_shard.nss index e903a265..0e5a66ee 100644 --- a/nwn/nwnprc/trunk/spells/sp_strm_shard.nss +++ b/nwn/nwnprc/trunk/spells/sp_strm_shard.nss @@ -62,11 +62,11 @@ void main() SPApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectBlindness(), oTarget); } - int nDam = d6(min(nCasterLvl, 20)); + int nDam = d6(PRCMin(nCasterLvl, 20)); if(nMetaMagic & METAMAGIC_MAXIMIZE) { - nDam = 6 *(min(nCasterLvl, 20)); + nDam = 6 *(PRCMin(nCasterLvl, 20)); } if(nMetaMagic & METAMAGIC_EMPOWER) @@ -78,7 +78,7 @@ void main() { nDam = nDam/2; } - nDam += SpellDamagePerDice(oPC, min(nCasterLvl, 20)); + nDam += SpellDamagePerDice(oPC, PRCMin(nCasterLvl, 20)); SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_DIVINE), oTarget); } } diff --git a/nwn/nwnprc/trunk/spells/sp_tch_idiocy.nss b/nwn/nwnprc/trunk/spells/sp_tch_idiocy.nss index fc526c44..7d3adedf 100644 --- a/nwn/nwnprc/trunk/spells/sp_tch_idiocy.nss +++ b/nwn/nwnprc/trunk/spells/sp_tch_idiocy.nss @@ -80,9 +80,9 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) fDur += fDur; } - int nDamInt = min(nDam, (GetAbilityScore(oTarget, ABILITY_INTELLIGENCE) - 1)); - int nDamWis = min(nDam, (GetAbilityScore(oTarget, ABILITY_WISDOM) - 1)); - int nDamCha = min(nDam, (GetAbilityScore(oTarget, ABILITY_CHARISMA) - 1)); + int nDamInt = PRCMin(nDam, (GetAbilityScore(oTarget, ABILITY_INTELLIGENCE) - 1)); + int nDamWis = PRCMin(nDam, (GetAbilityScore(oTarget, ABILITY_WISDOM) - 1)); + int nDamCha = PRCMin(nDam, (GetAbilityScore(oTarget, ABILITY_CHARISMA) - 1)); ApplyAbilityDamage(oTarget, ABILITY_INTELLIGENCE, nDamInt, DURATION_TYPE_TEMPORARY, TRUE, fDur, TRUE, oCaster); ApplyAbilityDamage(oTarget, ABILITY_WISDOM, nDamWis, DURATION_TYPE_TEMPORARY, TRUE, fDur, TRUE, oCaster); diff --git a/nwn/nwnprc/trunk/spells/sp_touch_fatigue.nss b/nwn/nwnprc/trunk/spells/sp_touch_fatigue.nss index 49874dd1..c58b27b0 100644 --- a/nwn/nwnprc/trunk/spells/sp_touch_fatigue.nss +++ b/nwn/nwnprc/trunk/spells/sp_touch_fatigue.nss @@ -37,7 +37,7 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent) { int nMetaMagic = PRCGetMetaMagicFeat(); int nPenetr = nCasterLevel + SPGetPenetr(); - int nDie = min(nCasterLevel, 5); + int nDie = PRCMin(nCasterLevel, 5); object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget); effect eVis = EffectVisualEffect(VFX_DUR_BIGBYS_BIGBLUE_HAND2); diff --git a/nwn/nwnprc/trunk/spells/sp_unliv_weap.nss b/nwn/nwnprc/trunk/spells/sp_unliv_weap.nss index 95a7fbea..7f172010 100644 --- a/nwn/nwnprc/trunk/spells/sp_unliv_weap.nss +++ b/nwn/nwnprc/trunk/spells/sp_unliv_weap.nss @@ -82,7 +82,7 @@ void HiImABomb(object oTarget, int nCounter, int nHP, int nCasterLvl, int nMetaM // eSplode = SupernaturalEffect(eSplode); location lLoc = GetLocation(oTarget); - int nDice = min((nCasterLvl/2), 10); + int nDice = PRCMin((nCasterLvl/2), 10); SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_BLINDDEAF), oTarget); diff --git a/nwn/nwnprc/trunk/spells/sp_vigor.nss b/nwn/nwnprc/trunk/spells/sp_vigor.nss index da0e5e38..d97bd859 100644 --- a/nwn/nwnprc/trunk/spells/sp_vigor.nss +++ b/nwn/nwnprc/trunk/spells/sp_vigor.nss @@ -127,9 +127,9 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel) int nRegen, nDur; switch(nSpellID) { - case SPELL_LESSER_VIGOR: nRegen = 1; nDur = min(15, 10 + nCasterLevel); break; - case SPELL_VIGOR: nRegen = 2; nDur = min(25, 10 + nCasterLevel); break; - case SPELL_MONSTROUS_REGENERATION: nRegen = 4; nDur = min(35, 10 + nCasterLevel); break; + case SPELL_LESSER_VIGOR: nRegen = 1; nDur = PRCMin(15, 10 + nCasterLevel); break; + case SPELL_VIGOR: nRegen = 2; nDur = PRCMin(25, 10 + nCasterLevel); break; + case SPELL_MONSTROUS_REGENERATION: nRegen = 4; nDur = PRCMin(35, 10 + nCasterLevel); break; } if(PRCGetMetaMagicFeat() & METAMAGIC_EXTEND) diff --git a/nwn/nwnprc/trunk/spells/sp_vigor_mass.nss b/nwn/nwnprc/trunk/spells/sp_vigor_mass.nss index 347cc163..de14e851 100644 --- a/nwn/nwnprc/trunk/spells/sp_vigor_mass.nss +++ b/nwn/nwnprc/trunk/spells/sp_vigor_mass.nss @@ -82,8 +82,8 @@ void main() switch(nSpellID) { - case SPELL_MASS_LESSER_VIGOR: nRegen = 1; nDur = min(25, 10 + nCasterLevel); break; - case SPELL_VIGOROUS_CIRCLE: nRegen = 3; nDur = min(40, 10 + nCasterLevel); break; + case SPELL_MASS_LESSER_VIGOR: nRegen = 1; nDur = PRCMin(25, 10 + nCasterLevel); break; + case SPELL_VIGOROUS_CIRCLE: nRegen = 3; nDur = PRCMin(40, 10 + nCasterLevel); break; } if(PRCGetMetaMagicFeat() & METAMAGIC_EXTEND) diff --git a/nwn/nwnprc/trunk/spells/sp_wrtch_blght.nss b/nwn/nwnprc/trunk/spells/sp_wrtch_blght.nss index 3c83c9ae..4c2545c4 100644 --- a/nwn/nwnprc/trunk/spells/sp_wrtch_blght.nss +++ b/nwn/nwnprc/trunk/spells/sp_wrtch_blght.nss @@ -47,7 +47,7 @@ void main() location lLoc = PRCGetSpellTargetLocation(); int nCasterLvl = PRCGetCasterLevel(oPC); int nMetaMagic = PRCGetMetaMagicFeat(); - int nDice = min(nCasterLvl, 15); + int nDice = PRCMin(nCasterLvl, 15); int nAlign; int nDam; int nDC; diff --git a/nwn/nwnprc/trunk/spells/x0_s0_divfav.nss b/nwn/nwnprc/trunk/spells/x0_s0_divfav.nss index 4a84ae13..ba2a71c9 100644 --- a/nwn/nwnprc/trunk/spells/x0_s0_divfav.nss +++ b/nwn/nwnprc/trunk/spells/x0_s0_divfav.nss @@ -44,7 +44,7 @@ void main() float fDuration = TurnsToSeconds(1); // * Duration 1 turn if(nMetaMagic & METAMAGIC_EXTEND) fDuration *= 2; - int nScale = min(5, max(1, CasterLvl / 3)); + int nScale = PRCMin(5, PRCMax(1, CasterLvl / 3)); effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY); diff --git a/nwn/nwnprc/trunk/spells/x2_o0_glyphspell.nss b/nwn/nwnprc/trunk/spells/x2_o0_glyphspell.nss index 2b393337..11b7d363 100644 --- a/nwn/nwnprc/trunk/spells/x2_o0_glyphspell.nss +++ b/nwn/nwnprc/trunk/spells/x2_o0_glyphspell.nss @@ -10,15 +10,15 @@ void main() switch(nSpell) { - case SPELL_LESSER_DISPEL : nTest = d20(1) + min(5, nVsLevel); break; - case SPELL_DISPEL_MAGIC : nTest = d20(1) + min(10, nVsLevel); break; - case SPELL_DISPELLING_TOUCH : nTest = d20(1) + min(10, nVsLevel); break; - case SPELL_SLASHING_DISPEL : nTest = d20(1) + min(10, nVsLevel); break; - case POWER_DISPELPSIONICS : nTest = d20(1) + min(15, GetManifesterLevel(GetLastSpellCaster())); break; - case SPELL_GREATER_DISPELLING : nTest = d20(1) + min(20, nVsLevel); break; - case SPELL_GREAT_WALL_OF_DISPEL : nTest = d20(1) + min(20, nVsLevel); break; - case SPELL_MORDENKAINENS_DISJUNCTION: nTest = d20(1) + min(40, nVsLevel); break; - case 4061 : nTest = d20(1) + min(40, nVsLevel); break;//Superb Dispelling + case SPELL_LESSER_DISPEL : nTest = d20(1) + PRCMin(5, nVsLevel); break; + case SPELL_DISPEL_MAGIC : nTest = d20(1) + PRCMin(10, nVsLevel); break; + case SPELL_DISPELLING_TOUCH : nTest = d20(1) + PRCMin(10, nVsLevel); break; + case SPELL_SLASHING_DISPEL : nTest = d20(1) + PRCMin(10, nVsLevel); break; + case POWER_DISPELPSIONICS : nTest = d20(1) + PRCMin(15, GetManifesterLevel(GetLastSpellCaster())); break; + case SPELL_GREATER_DISPELLING : nTest = d20(1) + PRCMin(20, nVsLevel); break; + case SPELL_GREAT_WALL_OF_DISPEL : nTest = d20(1) + PRCMin(20, nVsLevel); break; + case SPELL_MORDENKAINENS_DISJUNCTION: nTest = d20(1) + PRCMin(40, nVsLevel); break; + case 4061 : nTest = d20(1) + PRCMin(40, nVsLevel); break;//Superb Dispelling default : nTest = 0; break; } if (nTest >= 11 + nMyLevel) diff --git a/nwn/nwnprc/trunk/spells/x2_s0_acidshth.nss b/nwn/nwnprc/trunk/spells/x2_s0_acidshth.nss index ba94a704..2a3fbbc8 100644 --- a/nwn/nwnprc/trunk/spells/x2_s0_acidshth.nss +++ b/nwn/nwnprc/trunk/spells/x2_s0_acidshth.nss @@ -46,7 +46,7 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION); //Declare major variables effect eVis = EffectVisualEffect(448); int nDuration = PRCGetCasterLevel(OBJECT_SELF); - int nDamage = min(nDuration * 2, 30); + int nDamage = PRCMin(nDuration * 2, 30); int nMetaMagic = PRCGetMetaMagicFeat(); object oTarget = OBJECT_SELF; effect eShield = EffectDamageShield(nDamage, 0, ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_ACID)); diff --git a/nwn/nwnprc/trunk/spells/x2_s0_glphwardx.nss b/nwn/nwnprc/trunk/spells/x2_s0_glphwardx.nss index 877e89b4..1387f610 100644 --- a/nwn/nwnprc/trunk/spells/x2_s0_glphwardx.nss +++ b/nwn/nwnprc/trunk/spells/x2_s0_glphwardx.nss @@ -75,21 +75,21 @@ SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); switch (nSpellID) { - case SPELL_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = min((nCasterLevel /2), 5); nVfx = VFX_FNF_EXPLOSION_ACID; break; - case SPELL_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = min((nCasterLevel /2), 5); nVfx = VFX_FNF_EXPLOSION_COLD; break; - case SPELL_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = min((nCasterLevel /2), 5); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; - case SPELL_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = min((nCasterLevel /2), 5); nVfx = VFX_FNF_FIREBALL; break; - case SPELL_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = min((nCasterLevel /2), 5); nVfx = VFX_FNF_SOUND_BURST; break; - case SPELL_GREATER_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = min((nCasterLevel /2), 10); nVfx = VFX_FNF_EXPLOSION_ACID; break; - case SPELL_GREATER_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = min((nCasterLevel /2), 10); nVfx = VFX_FNF_EXPLOSION_COLD; break; - case SPELL_GREATER_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = min((nCasterLevel /2), 10); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; - case SPELL_GREATER_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = min((nCasterLevel /2), 10); nVfx = VFX_FNF_FIREBALL; break; - case SPELL_GREATER_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = min((nCasterLevel /2), 10); nVfx = VFX_FNF_SOUND_BURST; break; - case SPELL_ELDER_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = min(nCasterLevel, 30); nVfx = VFX_FNF_EXPLOSION_ACID; break; - case SPELL_ELDER_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = min(nCasterLevel, 30); nVfx = VFX_FNF_EXPLOSION_COLD; break; - case SPELL_ELDER_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = min(nCasterLevel, 30); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; - case SPELL_ELDER_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = min(nCasterLevel, 30); nVfx = VFX_FNF_FIREBALL; break; - case SPELL_ELDER_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = min(nCasterLevel, 30); nVfx = VFX_FNF_SOUND_BURST; break; + case SPELL_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = PRCMin((nCasterLevel /2), 5); nVfx = VFX_FNF_EXPLOSION_ACID; break; + case SPELL_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = PRCMin((nCasterLevel /2), 5); nVfx = VFX_FNF_EXPLOSION_COLD; break; + case SPELL_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = PRCMin((nCasterLevel /2), 5); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; + case SPELL_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = PRCMin((nCasterLevel /2), 5); nVfx = VFX_FNF_FIREBALL; break; + case SPELL_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = PRCMin((nCasterLevel /2), 5); nVfx = VFX_FNF_SOUND_BURST; break; + case SPELL_GREATER_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = PRCMin((nCasterLevel /2), 10); nVfx = VFX_FNF_EXPLOSION_ACID; break; + case SPELL_GREATER_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = PRCMin((nCasterLevel /2), 10); nVfx = VFX_FNF_EXPLOSION_COLD; break; + case SPELL_GREATER_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = PRCMin((nCasterLevel /2), 10); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; + case SPELL_GREATER_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = PRCMin((nCasterLevel /2), 10); nVfx = VFX_FNF_FIREBALL; break; + case SPELL_GREATER_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = PRCMin((nCasterLevel /2), 10); nVfx = VFX_FNF_SOUND_BURST; break; + case SPELL_ELDER_GLYPH_OF_WARDING_ACID: nDamageType = DAMAGE_TYPE_ACID; nSaveType = SAVING_THROW_TYPE_ACID; nDice = PRCMin(nCasterLevel, 30); nVfx = VFX_FNF_EXPLOSION_ACID; break; + case SPELL_ELDER_GLYPH_OF_WARDING_COLD: nDamageType = DAMAGE_TYPE_COLD; nSaveType = SAVING_THROW_TYPE_COLD; nDice = PRCMin(nCasterLevel, 30); nVfx = VFX_FNF_EXPLOSION_COLD; break; + case SPELL_ELDER_GLYPH_OF_WARDING_ELECTRICITY: nDamageType = DAMAGE_TYPE_ELECTRICAL; nSaveType = SAVING_THROW_TYPE_ELECTRICITY; nDice = PRCMin(nCasterLevel, 30); nVfx = VFX_FNF_ELECTRIC_EXPLOSION; break; + case SPELL_ELDER_GLYPH_OF_WARDING_FIRE: nDamageType = DAMAGE_TYPE_FIRE; nSaveType = SAVING_THROW_TYPE_FIRE; nDice = PRCMin(nCasterLevel, 30); nVfx = VFX_FNF_FIREBALL; break; + case SPELL_ELDER_GLYPH_OF_WARDING_SONIC: nDamageType = DAMAGE_TYPE_SONIC; nSaveType = SAVING_THROW_TYPE_SONIC; nDice = PRCMin(nCasterLevel, 30); nVfx = VFX_FNF_SOUND_BURST; break; } nDice = nDice < 1 ? 1 : nDice; diff --git a/nwn/nwnprc/trunk/spells/x2_s0_icedagg.nss b/nwn/nwnprc/trunk/spells/x2_s0_icedagg.nss index cc089431..7e877b50 100644 --- a/nwn/nwnprc/trunk/spells/x2_s0_icedagg.nss +++ b/nwn/nwnprc/trunk/spells/x2_s0_icedagg.nss @@ -29,7 +29,7 @@ void main() location lTarget = PRCGetSpellTargetLocation(); int nCasterLvl = PRCGetCasterLevel(oCaster); int nPenetr = nCasterLvl + SPGetPenetr(); - int nDice = min(nCasterLvl, 5); + int nDice = PRCMin(nCasterLvl, 5); int nMetaMagic = PRCGetMetaMagicFeat(); int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_COLD); int nSaveType = ChangedSaveType(EleDmg); diff --git a/nwn/nwnprc/trunk/spells/x2_s2_discbreath.nss b/nwn/nwnprc/trunk/spells/x2_s2_discbreath.nss index 1462fc63..d97276b8 100644 --- a/nwn/nwnprc/trunk/spells/x2_s2_discbreath.nss +++ b/nwn/nwnprc/trunk/spells/x2_s2_discbreath.nss @@ -149,7 +149,7 @@ void main() //Sets the save DC for Dragon Breath attacks. This is a reflex save to halve the damage. //Save is 10+CON+1/2 DD level. Gains +1 at level 13, and every 3 levels after. - int nSaveDCBonus = ((nLevel)/2) + max((nLevel - 10) / 3, 0); + int nSaveDCBonus = ((nLevel)/2) + PRCMax((nLevel - 10) / 3, 0); //Sets damage levels for Dragon Breath attacks. 2d10 at level 3, //4d10 at level 7, and then an additional 2d10 every 3 levels (10, 13, 16, ect) diff --git a/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk b/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk index 62756b71..f10371ec 100644 Binary files a/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk and b/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk differ diff --git a/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk.xml b/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk.xml index 4aa94fb3..880d4658 100644 --- a/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk.xml +++ b/nwn/nwnprc/trunk/tlk/prc8_consortium.tlk.xml @@ -58696,8 +58696,7 @@ Use: Selected Incarnum Blades incarnum blade (PRESTIGE CLASS) -Using a secret passed down through the generations, the incarnum blade shapes soul energy drawn from the greatest warriors of the past into a special soulmeld that is incorporated into his melee weapon of choice. By itself, -this blademeld grants him amazing combat prowess. When bound to his chakras, it also enhances his personal combat abilities, infusing them with the power of incarnum. When he dies, the incarnum blade merges with the soul energy that powers his weapon, becoming part of the soul legacy upon which future heroes can draw. +Using a secret passed down through the generations, the incarnum blade shapes soul energy drawn from the greatest warriors of the past into a special soulmeld that is incorporated into his melee weapon of choice. By itself, this blademeld grants him amazing combat prowess. When bound to his chakras, it also enhances his personal combat abilities, infusing them with the power of incarnum. When he dies, the incarnum blade merges with the soul energy that powers his weapon, becoming part of the soul legacy upon which future heroes can draw. - Hit Die: d10 - Proficiencies: Incarnum Blades gain no new proficiencies @@ -73200,42 +73199,49 @@ FEAT FEATURES: Level 1: AC Armor +4 +2: Exalted Feat 3: AC Armor +5 4: Weapon enhancement +1 + Exalted Feat 6: AC Armor +6 AC Deflection +1 + Exalted Feat 7: All saving throws +1 Ability score enhancement +2 8: AC Natural +1 + Exalted Feat 9: AC Armor +7 10: Weapon enhancement +2 DR 5/- + Exalted Feat 11: Ability score enhancement +4/+2 12: AC Armor +8 AC Deflection +2 + Exalted Feat 13: All saving throws +2 Energy (fire/cold/electric/sonic/acid) resistance 5 14: Weapon enhancement +3 Freedom of Movement + Exalted Feat 15: AC Armor +9 Ability score enhancement +6/+4/+2 16: AC Natural +2 + Exalted Feat 17: Weapon enhancement +4 All saving throws +3 Regeneration 1 18: AC Armor +10 AC Deflection +3 True Seeing + Exalted Feat 19: Ability score enhancement +8/+6/+4/+2 DR 10/- 20: Weapon enhancement +5 Energy resistance 15 + Exalted Feat *This is based on Vow of Poverty 3.0, with the following variations: -- Can only be selected at Level 1 -- No Bonus exalted feat every 2 levels (we just have other 2, wouldn't make sense) - No Endure elements, Sustenance, Mind shielding (would have little impact on NWN gameplay) -- No Sacred Vow as requirement (so a Level 1 from any race can get it and to partially offset the lack of Bonus exalted feat) - The level progression continues the same during the Epic Levels Daring Warrior @@ -73256,6 +73262,63 @@ Prerequisite: Ki Power, Proficiency with all martial weapons Specifics: Your fighter and ninja levels stack for the purpose of determining the size of your ki pool, as well as your AC bonus. For example, a 5th-level fighter/1st-level ninja with this feat could use his ki powers a number of times equal to 3 (one-half his ninja and fighter levels) + his Wisdom bonus (if any), and would have a +1 bonus to AC (as if he were a 6th-level ninja). Use: Automatic Special: A fighter can select Martial Stalker as one of his fighter bonus feats + ## Hidden Talent Reserve ## + Hidden Talent + Type of Feat: General + +Prerequsites: +CHA 11+, This feat can only be taken at 1st level. + +Benefit: +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. + Hidden Talent (Biofeedback) + Hidden Talent (Bite of the Wolf) + Hidden Talent (Bolt) + Hidden Talent (Burst) + Hidden Talent (Call To Mind) + Hidden Talent (Call Weaponry) + Hidden Talent (Chameleon) + Hidden Talent (Claws of the Beast) + Hidden Talent (Compression) + Hidden Talent (Conceal Thoughts) + Hidden Talent (Create Sound) + Hidden Talent (Crystal Shard) + Hidden Talent (Daze) + Hidden Talent (Deceleration) + Hidden Talent (Precognance, Defensive) + Hidden Talent (Demoralize) + Hidden Talent (Disable) + Hidden Talent (Dissipating Touch) + Hidden Talent (Distract) + Hidden Talent (Elf Sight) + Hidden Talent (Empathy) + Hidden Talent (Empty Mind) + Hidden Talent (Energy Ray) + Hidden Talent (Entangling Ectoplasm) + Hidden Talent (Expansion) + Hidden Talent (Far Hand) + Hidden Talent (Force Screen) + Hidden Talent (Grease) + Hidden Talent (Hammer) + Hidden Talent (Inertial Armour) + Hidden Talent (Matter Agitation) + Hidden Talent (Metaphysical Claw) + Hidden Talent (Metaphysical Weapon) + Hidden Talent (Mind Thrust) + Hidden Talent (My Light) + Hidden Talent (Precognance, Offensive) + Hidden Talent (Prescience, Offensive) + Hidden Talent (Prevenom) + Hidden Talent (Prevenom Weapon) + Hidden Talent (Skate) + Hidden Talent (Stomp) + Hidden Talent (Synesthete) + Hidden Talent (Telempathic Projection) + Hidden Talent (Thicken Skin) + Hidden Talent (Vigor) + Hidden Talent (Grip Of Iron) Force Missiles Evocation [Force] Level: Sorcerer 4, Wizard 4, @@ -73444,4 +73507,29 @@ Tortoise shell slows a creature's movement as if it were wearing heavy armor. An Tortoise Shell (12) Tortoise Shell (15) Tortoise Shell (18) + Sanctify Ki Strike + Type of Feat: Exalted +Prerequisite: Improved Unarmed Strike, CHA 15, Ki strike +Specifics: A Your unarmed strikes deal 1 extra point of damage to evil creatures, or 1d4 points to evil outsiders and evil undead. In addition, they are considered good-aligned for purposes of overcoming damage reduction. + Holy Ki Strike + Type of Feat: Exalted +Prerequisite: Improved Unarmed Strike, CHA 15, Ki strike, Sanctify Ki Strike +Specifics: Your unarmed strike deals 2d6 points of extra holy damage to evil creatures. In addition, it is considered holy, which means that it can bypass the damage reduction of some evil outsiders. This does not stack with the extra damage from the Sanctify Ki Strike feat. + Fist of the Heavens + Type of Feat: Exalted +Prerequisite: Improved Unarmed Strike, WIS 15, Sanctify Ki Strike +Specifics: The saving throw DC of your Stunning Fist increases by 2 when you use it against an evil creature. If the stunning attack succeeds, the creature is staggered for 1 round following the round it is stunned. + Vow of Abstinence + Type of Feat: Exalted +Prerequisite: Sacred Vow +Specifics: You gain a +4 perfection bonus on Fortitude saving throws against poisons and drugs (as long as you are subjected to a drug unwillingly). +Special: You cannot consume intoxicating, stimulating, depressant, or hallucinogenic substances, including alcohol, caffeine, and other drugs. + Vow of Chastity + Type of Feat: Exalted +Prerequisite: Sacred Vow +Specifics: You gain a +4 perfection bonus on Will saving throws against charm and phantasm spells and effects. + Gift of Faith + Type of Feat: Exalted +Prerequisite: Wis 13+ +Specifics: You gain a +2 bonus on saving throws to resist any fear effect, despair effect (such as the crushing despair spell), or similar mind-affecting condition, but not charms or compulsions (such as the charm person and dominate person spells) diff --git a/nwn/nwnprc/trunk/tlk/prc_consortium.tlk b/nwn/nwnprc/trunk/tlk/prc_consortium.tlk index b4196847..f10371ec 100644 Binary files a/nwn/nwnprc/trunk/tlk/prc_consortium.tlk and b/nwn/nwnprc/trunk/tlk/prc_consortium.tlk differ diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/prc_rightaura.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/prc_rightaura.nss index 9adb7a8a..4044fdf1 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/prc_rightaura.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/prc_rightaura.nss @@ -16,7 +16,7 @@ void main() { object oPC = OBJECT_SELF; - int nDice = min(20, PRCGetCasterLevel(oPC) * 2); + int nDice = PRCMin(20, PRCGetCasterLevel(oPC) * 2); location lLoc = GetLocation(oPC); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), lLoc); object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, FeetToMeters(20), lLoc, FALSE, OBJECT_TYPE_CREATURE); diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_algnaurdisc.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_algnaurdisc.nss index 3554afad..2ed4958b 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_algnaurdisc.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_algnaurdisc.nss @@ -67,7 +67,7 @@ void main() } //GetEffectDurationRemaining returns seconds, need rounds int nDice = nEffectDurationRemaining / 6; - int nDam = d4(min(15, nDice)); + int nDam = d4(PRCMin(15, nDice)); //Do the AoE object oTarget = MyFirstObjectInShape(SHAPE_SPHERE,FeetToMeters(60.0), lLoc); diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_castigate.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_castigate.nss index 68478a63..6ae6d071 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_castigate.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_castigate.nss @@ -49,7 +49,7 @@ void main() int nTargetAlignGE; int nTargetAlignLC; int nDam; - int nLevels = min(10, nCasterLvl); + int nLevels = PRCMin(10, nCasterLvl); float fRadius = FeetToMeters(10); SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY), oPC); diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_checkmlt.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_checkmlt.nss index ad18be92..7a9e3c07 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_checkmlt.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_checkmlt.nss @@ -48,7 +48,7 @@ void main() if (GetIsObjectValid(oWeapon)) { - int nBonus = min(nCasterLvl, 15)/3; + int nBonus = PRCMin(nCasterLvl, 15)/3; //Simulating lawful as +3, so give +3 enhancement and penalty to damage and hit to offset if(nBonus == 1) diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cloakbraveA.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cloakbraveA.nss index 0780ef25..04f1a6c4 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cloakbraveA.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cloakbraveA.nss @@ -38,7 +38,7 @@ void main() int nCasterLvl = PRCGetCasterLevel(oCreator); float fDur = HoursToSeconds(nCasterLvl)/6; object oTarget = GetEnteringObject(); - int nBonus = min(10, nCasterLvl); + int nBonus = PRCMin(10, nCasterLvl); if(GetFactionEqual(oCreator)) { diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cursebrute.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cursebrute.nss index 0dd63d37..7a299d0d 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cursebrute.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_cursebrute.nss @@ -50,8 +50,8 @@ void main() if (nSpell == SPELL_CURSE_BRUTE_CON) nAbilBuff = ABILITY_CONSTITUTION; //Get maximum bonus without lowering either stat below 3 - int nBonus = min(GetAbilityScore(oTarget, ABILITY_CHARISMA), GetAbilityScore(oTarget, ABILITY_INTELLIGENCE)) - 3; - nBonus = min(nCasterLvl, nBonus); + int nBonus = PRCMin(GetAbilityScore(oTarget, ABILITY_CHARISMA), GetAbilityScore(oTarget, ABILITY_INTELLIGENCE)) - 3; + nBonus = PRCMin(nCasterLvl, nBonus); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityIncrease(nAbilBuff, nBonus), oTarget, fDur); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_INTELLIGENCE, nBonus), oTarget, fDur); diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_estanasstew.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_estanasstew.nss index 9cee2263..aa7c588d 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_estanasstew.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_estanasstew.nss @@ -47,7 +47,7 @@ void main() if (nSpell == SPELL_ESTANAS_STEW) { object oItem = CreateItemOnObject("prc_estanasstew", oPC, 1); - int nServings = min(5, (nCasterLvl/2)); + int nServings = PRCMin(5, (nCasterLvl/2)); SetItemCharges(oItem, nServings); } diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_rightfury.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_rightfury.nss index 9b5ac212..2c8cea81 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_rightfury.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_rightfury.nss @@ -36,7 +36,7 @@ void main() float fDur = 60*(nCasterLvl); int nMetaMagic = PRCGetMetaMagicFeat(); if(nMetaMagic & METAMAGIC_EXTEND) fDur += fDur; - int nHP = min(50, nCasterLvl * 5); + int nHP = PRCMin(50, nCasterLvl * 5); effect eBuff = EffectAbilityIncrease(ABILITY_STRENGTH, 4); effect eHP = EffectTemporaryHitpoints(nHP); diff --git a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_soldsanc.nss b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_soldsanc.nss index ce82ef80..f68f9cd8 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/spells/sp_soldsanc.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/spells/sp_soldsanc.nss @@ -60,7 +60,7 @@ void main() float fDur = 60.0f * (nCasterLvl); int nMetaMagic = PRCGetMetaMagicFeat(); if(nMetaMagic & METAMAGIC_EXTEND) fDur += fDur; - int nTargets = min(6, nCasterLvl/2); + int nTargets = PRCMin(6, nCasterLvl/2); AllyCheck(oPC, fDur); diff --git a/nwn/nwnprc/trunk/users/Tenjac/x2_inc_spellhook.nss b/nwn/nwnprc/trunk/users/Tenjac/x2_inc_spellhook.nss index ff55e726..d5467ead 100644 --- a/nwn/nwnprc/trunk/users/Tenjac/x2_inc_spellhook.nss +++ b/nwn/nwnprc/trunk/users/Tenjac/x2_inc_spellhook.nss @@ -2263,7 +2263,7 @@ int InnateCounterspell(object oCaster, int nSpellId, int nSpellLevel) // Set a marker on the Noctumancer at the right level if (GetLevelByClass(CLASS_TYPE_NOCTUMANCER) >= 7) { - int nStore = min(1, nSpellLevel/2); + int nStore = PRCMin(1, nSpellLevel/2); SetLocalInt(oShadow, "InnateCounterSuccess", nStore); FloatingTextStringOnCreature("You have one free mystery of "+IntToString(nStore)+" level", oShadow, FALSE); }