Files
PRC8/nwn/nwnprc/trunk/psionics/psi_pow_keenedge.nss
Jaysyn904 279580e5b5 2025/12/28 Early update
Wemics have 5 RHD.
Fixed Whirling Blade.
Factotum now regenerates Inspiration after logging off and back on in he same server session.
Spellfire Wielder can't get extra spell levels from overcharging items.
Only one Chilling Fog at a time, casting a new one destroys the old one.
Heart of Fire now has a Chakra totem.
Pearl of Black doubt should be a bit more accurate.
Tweaked and tested psionic Keen Edge.
Fixed reversed sign for Echoblade validity in prc_equip.
Havoc Mage's Battlecast should clean up properly.
Updated readme.
2025-12-28 00:28:56 -05:00

83 lines
2.1 KiB
Plaintext

/*
----------------
Keen Edge, Psionic
psi_pow_keenedge
----------------
17/2/05 by Stratovarius
*/ /** @file
Keen Edge, Psionic
Metacreativity
Level: Psion/wilder 3, psychic warrior 3
Manifesting Time: 1 standard action
Range: Close (25 ft. + 5 ft./2 levels)
Targets: One weapon
Duration: 10 min./level
Saving Throw: None
Power Resistance: No
Power Points: 5
Metapsionics: Extend
You mentally sharpen the edge of your weapon, granting it the keen property.
This only works on piercing or slashing weapons.
*/
#include "psi_inc_psifunc"
#include "psi_inc_pwresist"
#include "psi_spellhook"
#include "prc_alterations"
void main()
{
/*
Spellcast Hook Code
Added 2004-11-02 by Stratovarius
If you want to make changes to all powers,
check psi_spellhook to find out more
*/
if (!PsiPrePowerCastCode())
{
// If code within the PrePowerCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
object oManifester = OBJECT_SELF;
object oItem = IPGetTargetedOrEquippedMeleeWeapon();
// Validity check
if(!GetIsObjectValid(oItem))
{
FloatingTextStrRefOnCreature(83615, oManifester); // Item must be weapon or creature holding a weapon
return;
}
struct manifestation manif =
EvaluateManifestation(oManifester, oItem,
PowerAugmentationProfile(),
METAPSIONIC_EXTEND
);
if(manif.bCanManifest)
{
int nDamageType = GetWeaponDamageType(oItem);
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
float fDuration = 600.0f * manif.nManifesterLevel;
if(manif.bExtend) fDuration *= 2;
if(nDamageType == DAMAGE_TYPE_PIERCING ||
nDamageType == DAMAGE_TYPE_SLASHING
)
{
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oItem));
IPSafeAddItemProperty(oItem, ItemPropertyKeen(), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
}
}
}