Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
42
_removed/nw_s1_bltstrdr.nss
Normal file
42
_removed/nw_s1_bltstrdr.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Strength Drain
|
||||
//:: NW_S1_BltStrDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 15 + (nHD);
|
||||
int nCount = (nHD /3);
|
||||
if (nCount == 0)
|
||||
{
|
||||
nCount = 1;
|
||||
}
|
||||
int nDamage = d6(nCount);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_ABILITY_DRAIN_STRENGTH));
|
||||
//Make a saving throw check
|
||||
if (!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE) && TouchAttackRanged(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_STRENGTH, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user