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:
101
_working/nw_s1_gazeevil.nss
Normal file
101
_working/nw_s1_gazeevil.nss
Normal file
@@ -0,0 +1,101 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Gaze: Deatroy Good
|
||||
//:: NW_S1_GazeEvil
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Cone shape that affects all within the AoE if they
|
||||
fail a Will Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 13, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
// do the petrify gaze instead
|
||||
void GazePetrify();
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (GetTag(OBJECT_SELF)=="jw_abyssal_soldier")
|
||||
{
|
||||
GazePetrify();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDuration = 1 + (nHD / 3);
|
||||
int nDC = 10 + (nHD/2);
|
||||
location lTargetLocation = GetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eGaze = EffectDeath();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(GetAlignmentGoodEvil(oTarget) == ALIGNMENT_GOOD)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_GAZE_DEATH));
|
||||
//Determine effect delay
|
||||
float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGaze, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GazePetrify()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDuration = 1 + (nHD / 3);
|
||||
int nDC = 10 + (nHD/2);
|
||||
location lTargetLocation = GetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eGaze = EffectPetrify();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_GAZE_DEATH));
|
||||
//Determine effect delay
|
||||
float fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eGaze, oTarget,60.0));
|
||||
}
|
||||
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user