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:
60
_module/nss/x0_s3_gemspray.nss
Normal file
60
_module/nss/x0_s3_gemspray.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: x0_s3_gemspray
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
For Wand of Wonder
|
||||
This script fires when gem spray ability from wand is activated
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
// Gems go flying out in a cone. All targets in the area take d4() damage
|
||||
// for each of 1-5 gems, and end up with that number of gems in their
|
||||
// inventory. Reflex save halves damage.
|
||||
#include "x0_i0_spells"
|
||||
// Gems go flying out in a cone. All targets in the area take d4() damage
|
||||
// for each of 1-5 gems, and end up with that number of gems in their
|
||||
// inventory. Reflex save halves damage.
|
||||
void DoFlyingGems(object oCaster, location lTarget);
|
||||
|
||||
void DoFlyingGems(object oCaster, location lTarget)
|
||||
{
|
||||
vector vOrigin = GetPosition(oCaster);
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_CONE,
|
||||
30.0,
|
||||
lTarget,
|
||||
TRUE,
|
||||
OBJECT_TYPE_CREATURE,
|
||||
vOrigin);
|
||||
int nGems, nDamage, nRand, i;
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (!GetIsFriend(oTarget))
|
||||
{
|
||||
nDamage = d4(GetCasterLevel(OBJECT_SELF));
|
||||
|
||||
|
||||
// Make Reflex save to halve
|
||||
if ( MySavingThrow(SAVING_THROW_REFLEX, oTarget, 14)) {
|
||||
nDamage = nDamage/2;
|
||||
}
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,
|
||||
EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING),
|
||||
oTarget);
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_CONE,
|
||||
30.0,
|
||||
lTarget,
|
||||
TRUE,
|
||||
OBJECT_TYPE_CREATURE,
|
||||
vOrigin);
|
||||
}
|
||||
}
|
||||
|
||||
void main ()
|
||||
{
|
||||
DoFlyingGems(OBJECT_SELF, GetSpellTargetLocation());
|
||||
}
|
||||
Reference in New Issue
Block a user