Finished PRC8 integration. Moved creature abilities to top hak. Setup tooling. Created release archive
61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: 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 "prc_inc_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(PRCGetCasterLevel(OBJECT_SELF));
|
|
|
|
|
|
// Make Reflex save to halve
|
|
if ( PRCMySavingThrow(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, PRCGetSpellTargetLocation());
|
|
}
|