PoA_PRC8/_haks/poa_exp_abilities/x1_s2_deatharrow.nss
Jaysyn904 7dd83ad168 Spell & Ability Upgrade
Reorganized hak files & removed duplicates.  Added @rafhot's PRC spell & ability level scaling expansion.  Further script integration.  Full compile.
2023-08-19 21:08:35 -04:00

57 lines
1.9 KiB
Plaintext

//::///////////////////////////////////////////////
//:: x1_s2_deatharrow
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Seeker Arrow
- creates an arrow that automatically hits target.
- At level 4 the arrow does +2 magic damage
- at level 5 the arrow does +3 magic damage
- normal arrow damage, based on base item type
- Must have shortbow or longbow in hand.
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////
#include "X0_I0_SPELLS"
#include "x2_inc_itemprop"
void main()
{
int nBonus = nBonus = ArcaneArcherCalculateBonus();
object oTarget = GetSpellTargetObject();
if (GetIsObjectValid(oTarget) == TRUE)
{
// * Roll Touch Attack
int nTouch = TouchAttackRanged(oTarget, TRUE);
if (nTouch > 0)
{
int nDamage = ArcaneArcherDamageDoneByBow((nTouch ==2));
if (nDamage > 0)
{
effect ePhysical = EffectDamage(nDamage +10, DAMAGE_TYPE_PIERCING,IPGetDamagePowerConstantFromNumber(nBonus));
effect eMagic = EffectDamage(nBonus +10, DAMAGE_TYPE_MAGICAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, ePhysical, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eMagic, oTarget);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
// * if target fails a save DC30 they die
if (MySavingThrow(SAVING_THROW_FORT, oTarget, 30) == 0)
{
effect eSlay = EffectDeath();
eSlay = SupernaturalEffect(eSlay);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSlay, oTarget);
}
}
}
}
}