PRC8/nwn/nwnprc/trunk/scripts/prc_knght_shally.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

42 lines
1.6 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Knight - Shield Ally
//:: prc_knght_shally.nss
//:://////////////////////////////////////////////
//:: Share Pain for one round
//:://////////////////////////////////////////////
//:: Created By: Stratovarius
//:: Created On: July 1, 2007
//:://////////////////////////////////////////////
#include "prc_alterations"
void main()
{
//Declare main variables.
object oPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
object oArmor2 = GetItemInSlot(INVENTORY_SLOT_CHEST, oTarget);
// Once a round, fellas
if (GetLocalInt(oPC, "ShieldAlly")) return;
effect eDur = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_POSITIVE);
// Get the OnHitCast: Unique on the manifester's armor / hide
IPSafeAddItemProperty(oArmor2, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 6.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING);
// Hook eventscript
AddEventScript(oPC, EVENT_ONHIT, "psi_pow_shrpnaux", TRUE, FALSE);
DelayCommand(6.0, RemoveEventScript(oPC, EVENT_ONHIT, "psi_pow_shrpnaux", TRUE, FALSE));
// Store the target for use in the damage script
SetLocalObject(oTarget, "PRC_Power_SharePain_Target", oPC);
// Do VFX for the monitor to look for
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oTarget, 6.0, TRUE, PRCGetSpellId(), 1000);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, oPC, 6.0, TRUE, PRCGetSpellId(), 1000);
SetLocalInt(oPC, "ShieldAlly", TRUE);
DelayCommand(6.0, DeleteLocalInt(oPC, "ShieldAlly"));
}