2026/01/22 Update 2
Mechanatrixes always fail saves vs elecricity. Incorporated most creature ability scripts into the PRC8 & updated them to use PRCEffect(), SPApplyEffectToObject(), etc. Updated prc_inc_breath to use PRCEffectDamage() Updated several spell scripts to use PRCEffectDamage().
This commit is contained in:
@@ -168,8 +168,8 @@ void ExhaleImmunity(object oDragon, int nDamageType, location lTargetArea)
|
||||
effect eLink = EffectLinkEffects(eImmune, eVis2);
|
||||
|
||||
//apply effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmune, oTarget, fDuration));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmune, oTarget, fDuration));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,15 +603,15 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC, SAVING_THROW_TYPE_NONE))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POISON_L), oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSickened(), oTarget, 12.0));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POISON_L), oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSickened(), oTarget, 12.0));
|
||||
}
|
||||
//1 round otherwise
|
||||
else
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POISON_L), oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSickened(), oTarget, 6.0));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POISON_L), oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSickened(), oTarget, 6.0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,16 +659,16 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC, SAVING_THROW_TYPE_NONE))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nSlowDuration)));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nSlowDuration)));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
}
|
||||
//Adept breath effect still lasts for one round if save is made
|
||||
else if(IsAdeptBreath())
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(1)));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(1)));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
}
|
||||
}
|
||||
@@ -685,10 +685,10 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
//Set Damage and VFX - Bioware Gold used VFX_IMP_REDUCE_ABILITY_SCORE originally
|
||||
eVis = EffectVisualEffect(VFX_IMP_POISON_L);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
//adept breath penalty only last 4 rounds on failure, gold breath has no duration
|
||||
if(IsAdeptBreath())
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_STRENGTH, BreathUsed.nDiceNumber), oTarget, 24.0));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_STRENGTH, BreathUsed.nDiceNumber), oTarget, 24.0));
|
||||
else
|
||||
DelayCommand(fDelay, ApplyAbilityDamage(oTarget, ABILITY_STRENGTH, BreathUsed.nDiceNumber, DURATION_TYPE_PERMANENT, TRUE));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
@@ -699,8 +699,8 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
//Set Damage and VFX - Bioware Gold used VFX_IMP_REDUCE_ABILITY_SCORE originally
|
||||
eVis = EffectVisualEffect(VFX_IMP_POISON_L);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_STRENGTH, BreathUsed.nDiceNumber), oTarget, 12.0));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_STRENGTH, BreathUsed.nDiceNumber), oTarget, 12.0));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
}
|
||||
bCanCling = TRUE;
|
||||
@@ -729,7 +729,7 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC, SAVING_THROW_TYPE_NONE))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nParalDuration)));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nParalDuration)));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
}
|
||||
}
|
||||
@@ -749,8 +749,8 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
eBreath = EffectNegativeLevel(nLevelDrain);
|
||||
eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
}
|
||||
}
|
||||
@@ -769,11 +769,11 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if (nAdjustedDamage > 0)
|
||||
{
|
||||
//Set Damage and VFX
|
||||
eBreath = EffectDamage(nAdjustedDamage, BreathUsed.nDamageType);
|
||||
eBreath = PRCEffectDamage(oTarget, nAdjustedDamage, BreathUsed.nDamageType);
|
||||
eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
bCanCling = TRUE;
|
||||
}
|
||||
@@ -830,8 +830,8 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if(GetLocalInt(oTarget, "DragonWard"))
|
||||
nAdjustedDamage -= 40;
|
||||
|
||||
effect eBreath1 = EffectDamage(nAdjustedDamage/2, DAMAGE_TYPE_FIRE);
|
||||
effect eBreath2 = EffectDamage(nAdjustedDamage/2, DAMAGE_TYPE_SONIC);
|
||||
effect eBreath1 = PRCEffectDamage(oTarget, nAdjustedDamage/2, DAMAGE_TYPE_FIRE);
|
||||
effect eBreath2 = PRCEffectDamage(oTarget, nAdjustedDamage/2, DAMAGE_TYPE_SONIC);
|
||||
eBreath = EffectLinkEffects(eBreath1, eBreath2);
|
||||
eVis = EffectVisualEffect(chVisual);
|
||||
}
|
||||
@@ -839,12 +839,12 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
{
|
||||
if(GetLocalInt(oTarget, "DragonWard"))
|
||||
nAdjustedDamage -= 20;
|
||||
eBreath = EffectDamage(nAdjustedDamage, BreathUsed.nDamageType);
|
||||
eBreath = PRCEffectDamage(oTarget, nAdjustedDamage, BreathUsed.nDamageType);
|
||||
eVis = EffectVisualEffect(nVisualType);
|
||||
}
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
SetLocalInt(oTarget, "AffectedByBreath", TRUE);
|
||||
bCanCling = TRUE;
|
||||
}
|
||||
@@ -859,7 +859,7 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nKnockdownDC, SAVING_THROW_TYPE_NONE))
|
||||
{
|
||||
effect eWindblown = EffectKnockdown();
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eWindblown, oTarget, 6.0));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eWindblown, oTarget, 6.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -879,10 +879,10 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
//Warforged are only healed for half
|
||||
if(GetIsWarforged(oTarget)) nHeal /= 2;
|
||||
|
||||
eBreath = EffectHeal(nHeal);
|
||||
eBreath = PRCEffectHeal(nHeal, oTarget);
|
||||
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_S);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget));
|
||||
}
|
||||
|
||||
//Entangling Exhalation
|
||||
@@ -896,22 +896,22 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
//only does damage if the original breath did damage
|
||||
if(BreathUsed.nDamageType > 0)
|
||||
{
|
||||
effect eDamage = EffectDamage(d6(), BreathUsed.nDamageType);
|
||||
effect eDamage = PRCEffectDamage(oTarget, d6(), BreathUsed.nDamageType);
|
||||
switch(nEntangleRounds)
|
||||
{
|
||||
case 4:
|
||||
DelayCommand(fDelay + RoundsToSeconds(4), ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
DelayCommand(fDelay + RoundsToSeconds(4), SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
case 3:
|
||||
DelayCommand(fDelay + RoundsToSeconds(3), ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
DelayCommand(fDelay + RoundsToSeconds(3), SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
case 2:
|
||||
DelayCommand(fDelay + RoundsToSeconds(2), ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
DelayCommand(fDelay + RoundsToSeconds(2), SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget));
|
||||
case 1:
|
||||
DelayCommand(fDelay + RoundsToSeconds(1), ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget)); break;
|
||||
DelayCommand(fDelay + RoundsToSeconds(1), SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget)); break;
|
||||
}
|
||||
}
|
||||
|
||||
//but always entangles if the breath affects the target
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEntangled, oTarget, RoundsToSeconds(nEntangleRounds)));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEntangled, oTarget, RoundsToSeconds(nEntangleRounds)));
|
||||
}
|
||||
|
||||
DeleteLocalInt(oTarget, "AffectedByBreath");
|
||||
@@ -937,18 +937,18 @@ void ApplyBreath(struct breath BreathUsed, location lTargetArea, int bLinger = F
|
||||
{
|
||||
if(nAdjustedDamage < 3) nCount = BreathUsed.nClinging;
|
||||
|
||||
effect eBreath1 = EffectDamage(nAdjustedDamage/2, DAMAGE_TYPE_FIRE);
|
||||
effect eBreath2 = EffectDamage(nAdjustedDamage/2, DAMAGE_TYPE_SONIC);
|
||||
effect eBreath1 = PRCEffectDamage(oTarget, nAdjustedDamage/2, DAMAGE_TYPE_FIRE);
|
||||
effect eBreath2 = PRCEffectDamage(oTarget, nAdjustedDamage/2, DAMAGE_TYPE_SONIC);
|
||||
effect eAfterBreath = EffectLinkEffects(eBreath1, eBreath2);
|
||||
DelayCommand(fNewDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAfterBreath, oTarget));
|
||||
DelayCommand(fNewDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eAfterBreath, oTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nAdjustedDamage < 2) nCount = BreathUsed.nClinging;
|
||||
effect eAfterBreath = EffectDamage(nAdjustedDamage, BreathUsed.nDamageType);
|
||||
DelayCommand(fNewDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eAfterBreath, oTarget));
|
||||
effect eAfterBreath = PRCEffectDamage(oTarget, nAdjustedDamage, BreathUsed.nDamageType);
|
||||
DelayCommand(fNewDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eAfterBreath, oTarget));
|
||||
}
|
||||
DelayCommand(fNewDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fNewDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -988,3 +988,5 @@ void PRCPlayDragonBattleCry()
|
||||
PlayVoiceChat(VOICE_CHAT_BATTLECRY2);
|
||||
}
|
||||
}
|
||||
|
||||
//:: void main() {}
|
||||
@@ -1072,6 +1072,10 @@ int PRCMySavingThrow(int nSavingThrow, object oTarget, int nDC, int nSaveType =
|
||||
nDC -= 1 + (GetHitDice(oTarget) / 5);
|
||||
else if(GetHasFeat(FEAT_HARD_ELEC, oTarget))
|
||||
nDC -= 2;
|
||||
|
||||
//:: Mechanatrix always fail saves vs electricity.
|
||||
if(GetRacialType(oTarget) == RACIAL_TYPE_MECHANATRIX)
|
||||
return 0;
|
||||
}
|
||||
else if(nSaveType == SAVING_THROW_TYPE_SONIC)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ void DoAOE(effect eVis, effect eExplode, int nSaveType, int nDamage, int nDamage
|
||||
|
||||
//Apply explosion visual if needed
|
||||
if (nShape == SHAPE_SPHERE) ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eExplode, lTarget, 1.0);
|
||||
else if (nShape == SHAPE_SPELLCYLINDER) ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eExplode, oBeamTarget, 1.0);
|
||||
else if (nShape == SHAPE_SPELLCYLINDER) SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eExplode, oBeamTarget, 1.0);
|
||||
|
||||
//Remove the created beam target object if it exists
|
||||
if (GetResRef(oBeamTarget) == "prc_invisobj") DestroyObject(oBeamTarget, 3.0);
|
||||
|
||||
@@ -32,7 +32,7 @@ void main()
|
||||
|
||||
eEffect = EffectDeaf();
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
eVisFail = EffectVisualEffect(VFX_IMP_STUN);
|
||||
|
||||
if (!GetLocalInt(oPC, "ClapOfThunderBonus"))
|
||||
|
||||
55
nwn/nwnprc/trunk/spells/nw_s1_bltacid.nss
Normal file
55
nwn/nwnprc/trunk/spells/nw_s1_bltacid.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Acid
|
||||
//:: NW_S1_BltAcid
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /2;
|
||||
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_ACID));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
//nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ACID);
|
||||
//Make a ranged touch attack
|
||||
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
44
nwn/nwnprc/trunk/spells/nw_s1_bltcharm.nss
Normal file
44
nwn/nwnprc/trunk/spells/nw_s1_bltcharm.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Charm
|
||||
//:: NW_S1_BltCharm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
|
||||
effect eBolt = EffectCharmed();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = PRCGetScaledDuration(nCount, oTarget);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_CHARM));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
45
nwn/nwnprc/trunk/spells/nw_s1_bltchrdr.nss
Normal file
45
nwn/nwnprc/trunk/spells/nw_s1_bltchrdr.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Charisma Drain
|
||||
//:: NW_S1_BltChrDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Fortitude save is
|
||||
needed to avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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_CHARISMA));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_CHARISMA, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
54
nwn/nwnprc/trunk/spells/nw_s1_bltcold.nss
Normal file
54
nwn/nwnprc/trunk/spells/nw_s1_bltcold.nss
Normal file
@@ -0,0 +1,54 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Cold
|
||||
//:: NW_S1_BltCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /2;
|
||||
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_COLD));
|
||||
//Make a ranged touch attack
|
||||
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_COLD);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
45
nwn/nwnprc/trunk/spells/nw_s1_bltcondr.nss
Normal file
45
nwn/nwnprc/trunk/spells/nw_s1_bltcondr.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Constitution Drain
|
||||
//:: NW_S1_BltConDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Fort save is
|
||||
needed to avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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_CONSTITUTION));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_CONSTITUTION, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
42
nwn/nwnprc/trunk/spells/nw_s1_bltconf.nss
Normal file
42
nwn/nwnprc/trunk/spells/nw_s1_bltconf.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Confuse
|
||||
//:: NW_S1_BltConf
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_CONFUSION_S);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eBolt = EffectConfused();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_CONFUSE));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
}
|
||||
}
|
||||
42
nwn/nwnprc/trunk/spells/nw_s1_bltdaze.nss
Normal file
42
nwn/nwnprc/trunk/spells/nw_s1_bltdaze.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Daze
|
||||
//:: NW_S1_BltDaze
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eBolt = EffectDazed();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = PRCGetScaledDuration(nCount, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DAZE));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
}
|
||||
}
|
||||
37
nwn/nwnprc/trunk/spells/nw_s1_bltdeath.nss
Normal file
37
nwn/nwnprc/trunk/spells/nw_s1_bltdeath.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Death
|
||||
//:: NW_S1_BltDeath
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eBolt = EffectDeath();
|
||||
int nDC = 10 + (nHD/2);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DEATH));
|
||||
//Make a saving throw check
|
||||
if(PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
44
nwn/nwnprc/trunk/spells/nw_s1_bltdexdr.nss
Normal file
44
nwn/nwnprc/trunk/spells/nw_s1_bltdexdr.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Dexterity Drain
|
||||
//:: NW_S1_BltDexDr
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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_DEXTERITY));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_DEXTERITY, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
68
nwn/nwnprc/trunk/spells/nw_s1_bltdisese.nss
Normal file
68
nwn/nwnprc/trunk/spells/nw_s1_bltdisese.nss
Normal file
@@ -0,0 +1,68 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Disease
|
||||
//:: NW_S1_BltDisease
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to infect
|
||||
the target with a disease. The disease used
|
||||
is chosen based upon the racial type of the
|
||||
caster.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nRacial = GetRacialType(OBJECT_SELF);
|
||||
int nDisease;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DISEASE));
|
||||
|
||||
//Here we use the racial type of the attacker to select an
|
||||
//appropriate disease.
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
nDisease = DISEASE_VERMIN_MADNESS;
|
||||
break;
|
||||
case RACIAL_TYPE_UNDEAD:
|
||||
nDisease = DISEASE_FILTH_FEVER;
|
||||
break;
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
if(GetTag(OBJECT_SELF) == "NW_SLAADRED")
|
||||
{
|
||||
nDisease = DISEASE_RED_SLAAD_EGGS;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDisease = DISEASE_DEMON_FEVER;
|
||||
}
|
||||
break;
|
||||
case RACIAL_TYPE_MAGICAL_BEAST:
|
||||
nDisease = DISEASE_SOLDIER_SHAKES;
|
||||
break;
|
||||
case RACIAL_TYPE_ABERRATION:
|
||||
nDisease = DISEASE_BLINDING_SICKNESS;
|
||||
break;
|
||||
default:
|
||||
nDisease = DISEASE_SOLDIER_SHAKES;
|
||||
break;
|
||||
}
|
||||
//Assign effect and chosen disease
|
||||
effect eBolt = EffectDisease(nDisease);
|
||||
//Make the ranged touch attack.
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
|
||||
}
|
||||
}
|
||||
45
nwn/nwnprc/trunk/spells/nw_s1_bltdomn.nss
Normal file
45
nwn/nwnprc/trunk/spells/nw_s1_bltdomn.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Dominated
|
||||
//:: NW_S1_BltDomn
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOMINATE_S);
|
||||
effect eBolt = EffectDominated();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis2);
|
||||
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = PRCGetScaledDuration(nCount, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_DOMINATE));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
56
nwn/nwnprc/trunk/spells/nw_s1_bltfire.nss
Normal file
56
nwn/nwnprc/trunk/spells/nw_s1_bltfire.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Fire
|
||||
//:: NW_S1_BoltFire
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /2;
|
||||
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_FIRE));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
//nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE);
|
||||
//Make a ranged touch attack
|
||||
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
44
nwn/nwnprc/trunk/spells/nw_s1_bltintdr.nss
Normal file
44
nwn/nwnprc/trunk/spells/nw_s1_bltintdr.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Intelligence Drain
|
||||
//:: NW_S1_BltIntDr
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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_INTELLIGENCE));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget, RoundsToSeconds(nHD));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
39
nwn/nwnprc/trunk/spells/nw_s1_bltknckd.nss
Normal file
39
nwn/nwnprc/trunk/spells/nw_s1_bltknckd.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Knockdown
|
||||
//:: NW_S1_BltKnckD
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target. Reflex or Will save is
|
||||
needed to halve damage or avoid effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
effect eBolt = EffectKnockdown();
|
||||
int nDC = 10 + (nHD/2);
|
||||
effect eDam = PRCEffectDamage(oTarget, d6(), DAMAGE_TYPE_BLUDGEONING);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_KNOCKDOWN));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBolt, oTarget, RoundsToSeconds(3));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
}
|
||||
56
nwn/nwnprc/trunk/spells/nw_s1_bltlightn.nss
Normal file
56
nwn/nwnprc/trunk/spells/nw_s1_bltlightn.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Lightning
|
||||
//:: NW_S1_BltLightn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Does 1d6 per level to a single target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 10, 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_HAND);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /2;
|
||||
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_LIGHTNING));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
//nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Make a ranged touch attack
|
||||
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
}
|
||||
}
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLightning, oTarget, 1.8);
|
||||
}
|
||||
45
nwn/nwnprc/trunk/spells/nw_s1_bltlvldr.nss
Normal file
45
nwn/nwnprc/trunk/spells/nw_s1_bltlvldr.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Level Drain
|
||||
//:: NW_S1_BltLvlDr
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt = EffectNegativeLevel(1);
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /5;
|
||||
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_LEVEL_DRAIN));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//eBolt = LEVEL DRAIN EFFECT
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
41
nwn/nwnprc/trunk/spells/nw_s1_bltparal.nss
Normal file
41
nwn/nwnprc/trunk/spells/nw_s1_bltparal.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Paralyze
|
||||
//:: NW_S1_BltParal
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
effect eBolt = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = PRCGetScaledDuration(nCount, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_PARALYZE));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
}
|
||||
}
|
||||
118
nwn/nwnprc/trunk/spells/nw_s1_bltpoison.nss
Normal file
118
nwn/nwnprc/trunk/spells/nw_s1_bltpoison.nss
Normal file
@@ -0,0 +1,118 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Poison
|
||||
//:: NW_S1_BltPoison.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Must make a ranged touch attack. If successful
|
||||
the target is struck down with poison that
|
||||
scales with level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
effect ePoison;
|
||||
int nPoison;
|
||||
int nRacial = MyPRCGetRacialType(OBJECT_SELF);
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_POISON));
|
||||
|
||||
//Determine the poison type based on the Racial Type and HD
|
||||
// June 3/04: Bugfix for some screwy if statements.
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
if (nHD <= 9)
|
||||
{
|
||||
nPoison = POISON_QUASIT_VENOM;
|
||||
}
|
||||
else if (nHD < 13)
|
||||
{
|
||||
nPoison = POISON_BEBILITH_VENOM;
|
||||
}
|
||||
else //if (nHD >= 13) //if statement not actually needed...
|
||||
{
|
||||
nPoison = POISON_PIT_FIEND_ICHOR;
|
||||
}
|
||||
break;
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_TINY_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_SMALL_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_MEDIUM_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_HUGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_GARGANTUAN_SPIDER_VENOM;
|
||||
}
|
||||
else //if (nHD >= 18)
|
||||
{
|
||||
nPoison = POISON_COLOSSAL_SPIDER_VENOM;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_NIGHTSHADE;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_BLADE_BANE;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_BLOODROOT;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_LICH_DUST;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_DARK_REAVER_POWDER;
|
||||
}
|
||||
else //if (nHD >= 18 )
|
||||
{
|
||||
nPoison = POISON_BLACK_LOTUS_EXTRACT;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
//Make a ranged touch attack
|
||||
if (PRCDoRangedTouchAttack (oTarget))
|
||||
{
|
||||
ePoison = EffectPoison(nPoison);
|
||||
//Apply effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
53
nwn/nwnprc/trunk/spells/nw_s1_bltshards.nss
Normal file
53
nwn/nwnprc/trunk/spells/nw_s1_bltshards.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Shards
|
||||
//:: NW_S1_BltShard
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = nHD /2;
|
||||
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_SHARDS));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
//nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC);
|
||||
//Make a ranged touch attack
|
||||
int nTouch = PRCDoRangedTouchAttack(oTarget);
|
||||
if(nTouch > 0)
|
||||
{
|
||||
if(nTouch == 2)
|
||||
{
|
||||
nDamage *= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eBolt = EffectDamage(nDamage, DAMAGE_TYPE_PIERCING, DAMAGE_POWER_PLUS_ONE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
40
nwn/nwnprc/trunk/spells/nw_s1_bltslow.nss
Normal file
40
nwn/nwnprc/trunk/spells/nw_s1_bltslow.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Slow
|
||||
//:: NW_S1_BltSlow
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature must make a ranged touch attack to hit
|
||||
the intended target.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: June 18 , 2001
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SLOW);
|
||||
effect eBolt = EffectSlow();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_SLOW));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
44
nwn/nwnprc/trunk/spells/nw_s1_bltstrdr.nss
Normal file
44
nwn/nwnprc/trunk/spells/nw_s1_bltstrdr.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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 (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_STRENGTH, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
41
nwn/nwnprc/trunk/spells/nw_s1_bltstun.nss
Normal file
41
nwn/nwnprc/trunk/spells/nw_s1_bltstun.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Stun
|
||||
//:: NW_S1_BltStun
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_STUN);
|
||||
effect eBolt = EffectStunned();
|
||||
eBolt = GetScaledEffect(eBolt, oTarget);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBolt, eDur);
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
nCount = PRCGetScaledDuration(nCount, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_STUN));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
42
nwn/nwnprc/trunk/spells/nw_s1_bltweb.nss
Normal file
42
nwn/nwnprc/trunk/spells/nw_s1_bltweb.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Web
|
||||
//:: NW_S1_BltWeb
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Glues a single target to the ground with
|
||||
sticky strands of webbing.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 28, 2002
|
||||
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_switches"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_WEB);
|
||||
effect eStick = EffectEntangle();
|
||||
effect eLink = EffectLinkEffects(eVis, eStick);
|
||||
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nCount = (nHD + 1) / 2;
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_WEB));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
if( !GetHasFeat(FEAT_WOODLAND_STRIDE, oTarget) && GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) != TRUE )
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
|
||||
}
|
||||
}
|
||||
}
|
||||
44
nwn/nwnprc/trunk/spells/nw_s1_bltwisdr.nss
Normal file
44
nwn/nwnprc/trunk/spells/nw_s1_bltwisdr.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bolt: Wisdom Drain
|
||||
//:: NW_S1_BltWisDr
|
||||
//:: 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 "prc_inc_spells"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eBolt;
|
||||
int nDC = 10 + (nHD/2);
|
||||
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_WISDOM));
|
||||
//Make a saving throw check
|
||||
if (PRCDoRangedTouchAttack(oTarget))
|
||||
{
|
||||
eBolt = EffectAbilityDecrease(ABILITY_WISDOM, nCount);
|
||||
eBolt = SupernaturalEffect(eBolt);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eBolt, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
66
nwn/nwnprc/trunk/spells/nw_s1_coneacid.nss
Normal file
66
nwn/nwnprc/trunk/spells/nw_s1_coneacid.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Acid
|
||||
//:: NW_S1_ConeAcid
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of damage eminated from the monster. Does
|
||||
a set amount of damage based upon the creatures HD
|
||||
and can be halved with a Reflex Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nLoop = nHD / 3;
|
||||
int nDC = 10 + (nHD/2);
|
||||
float fDelay;
|
||||
if(nLoop == 0)
|
||||
{
|
||||
nLoop = 1;
|
||||
}
|
||||
//Calculate the damage
|
||||
for (nLoop; nLoop > 0; nLoop--)
|
||||
{
|
||||
nDamage = nDamage + d6(2);
|
||||
}
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_ACID));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(),SAVING_THROW_TYPE_ACID);
|
||||
//Set damage effect
|
||||
eCone = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ACID);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
66
nwn/nwnprc/trunk/spells/nw_s1_conecold.nss
Normal file
66
nwn/nwnprc/trunk/spells/nw_s1_conecold.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Cold
|
||||
//:: NW_S1_ConeCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of damage eminated from the monster. Does
|
||||
a set amount of damage based upon the creatures HD
|
||||
and can be halved with a Reflex Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nDice = nHD / 3;
|
||||
int nDC = 10 + (nHD/2);
|
||||
float fDelay;
|
||||
|
||||
if(nDice == 0)
|
||||
{
|
||||
nDice = 1;
|
||||
}
|
||||
nDice *= 2;
|
||||
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_COLD));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = d6(nDice);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD);
|
||||
//Set damage effect
|
||||
eCone = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_COLD);
|
||||
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
89
nwn/nwnprc/trunk/spells/nw_s1_conedisea.nss
Normal file
89
nwn/nwnprc/trunk/spells/nw_s1_conedisea.nss
Normal file
@@ -0,0 +1,89 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Disease
|
||||
//:: NW_S1_ConeDisea
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature spits out a cone of disease that cannot
|
||||
be avoided unless a Reflex save is made.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nRacial = MyPRCGetRacialType(OBJECT_SELF);
|
||||
int nDisease;
|
||||
//Determine the disease type based on the Racial Type and HD
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
nDisease = DISEASE_DEMON_FEVER;
|
||||
break;
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
nDisease = DISEASE_VERMIN_MADNESS;
|
||||
break;
|
||||
case RACIAL_TYPE_UNDEAD:
|
||||
if(nHD <= 3)
|
||||
{
|
||||
nDisease = DISEASE_ZOMBIE_CREEP;
|
||||
}
|
||||
else if (nHD > 3 && nHD <= 10)
|
||||
{
|
||||
nDisease = DISEASE_GHOUL_ROT;
|
||||
}
|
||||
else if(nHD > 10)
|
||||
{
|
||||
nDisease = DISEASE_MUMMY_ROT;
|
||||
}
|
||||
default:
|
||||
if(nHD <= 3)
|
||||
{
|
||||
nDisease = DISEASE_MINDFIRE;
|
||||
}
|
||||
else if (nHD > 3 && nHD <= 10)
|
||||
{
|
||||
nDisease = DISEASE_RED_ACHE;
|
||||
}
|
||||
else if(nHD > 10)
|
||||
{
|
||||
nDisease = DISEASE_SHAKES;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
//Set disease effect
|
||||
effect eCone = EffectDisease(nDisease);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DISEASE_S);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_DISEASE));
|
||||
//Get the delay time
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
69
nwn/nwnprc/trunk/spells/nw_s1_coneelec.nss
Normal file
69
nwn/nwnprc/trunk/spells/nw_s1_coneelec.nss
Normal file
@@ -0,0 +1,69 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Lightning
|
||||
//:: NW_S1_ConeElec
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of damage eminates from the monster. Does
|
||||
a set amount of damage based upon the creatures HD
|
||||
and can be halved with a Reflex Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Updated Georg Z, 2003-09-02: fixed cone not visible if no damage is done
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nLoop = nHD / 3;
|
||||
int nDC = 10 + (nHD/2);
|
||||
float fDelay;
|
||||
if(nLoop == 0)
|
||||
{
|
||||
nLoop = 1;
|
||||
}
|
||||
//Calculate the damage
|
||||
for (nLoop; nLoop > 0; nLoop--)
|
||||
{
|
||||
nDamage = nDamage + d6(2);
|
||||
}
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_HAND);
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_LIGHTNING));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSpellSaveDC(), SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Set damage effect
|
||||
eCone = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
69
nwn/nwnprc/trunk/spells/nw_s1_conefire.nss
Normal file
69
nwn/nwnprc/trunk/spells/nw_s1_conefire.nss
Normal file
@@ -0,0 +1,69 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Fire
|
||||
//:: NW_S1_ConeFire
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of damage eminated from the monster. Does
|
||||
a set amount of damage based upon the creatures HD
|
||||
and can be halved with a Reflex Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Updated By: Andrew Nobbs
|
||||
//:: Updated On: FEb 26, 2003
|
||||
//:: Note: Changed the faction check to GetIsEnemy
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nLoop = nHD / 3;
|
||||
int nDC = 10 + (nHD/2);
|
||||
float fDelay;
|
||||
if(nLoop == 0)
|
||||
{
|
||||
nLoop = 1;
|
||||
}
|
||||
//Calculate the damage
|
||||
for (nLoop; nLoop > 0; nLoop--)
|
||||
{
|
||||
nDamage = nDamage + d6(2);
|
||||
}
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsEnemy(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_FIRE));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE);
|
||||
//Set damage effect
|
||||
eCone = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_FIRE);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
128
nwn/nwnprc/trunk/spells/nw_s1_conepois.nss
Normal file
128
nwn/nwnprc/trunk/spells/nw_s1_conepois.nss
Normal file
@@ -0,0 +1,128 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Poison
|
||||
//:: NW_S1_ConePois
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creature spits out a cone of poison that cannot
|
||||
be avoided unless a Reflex save is made. Creatures
|
||||
who fail there save are struck with Wyvern Poison
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + (nHD/2);
|
||||
int nRacial = MyPRCGetRacialType(OBJECT_SELF);
|
||||
int nPoison;
|
||||
//Determine the poison type based on the Racial Type and HD
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
if (nHD <= 9)
|
||||
{
|
||||
nPoison = POISON_QUASIT_VENOM;
|
||||
}
|
||||
else if (nHD < 13)
|
||||
{
|
||||
nPoison = POISON_BEBILITH_VENOM;
|
||||
}
|
||||
else //if (nHD >= 13)
|
||||
{
|
||||
nPoison = POISON_PIT_FIEND_ICHOR;
|
||||
}
|
||||
break;
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_TINY_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_SMALL_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_MEDIUM_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_HUGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_GARGANTUAN_SPIDER_VENOM;
|
||||
}
|
||||
else //if (nHD >= 18)
|
||||
{
|
||||
nPoison = POISON_COLOSSAL_SPIDER_VENOM;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_NIGHTSHADE;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_BLADE_BANE;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_BLOODROOT;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_LICH_DUST;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_DARK_REAVER_POWDER;
|
||||
}
|
||||
else //if (nHD >= 18 )
|
||||
{
|
||||
nPoison = POISON_BLACK_LOTUS_EXTRACT;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
effect eCone = EffectPoison(nPoison);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POISON_S);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget) ;
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_POISON));
|
||||
//Get the delay time
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eCone, oTarget));
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
66
nwn/nwnprc/trunk/spells/nw_s1_conesonic.nss
Normal file
66
nwn/nwnprc/trunk/spells/nw_s1_conesonic.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone: Sonic
|
||||
//:: NW_S1_ConeSonic
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of damage eminated from the monster. Does
|
||||
a set amount of damage based upon the creatures HD
|
||||
and can be halved with a Reflex Save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nLoop = nHD / 3;
|
||||
int nDC = 10 + (nHD/2);
|
||||
float fDelay;
|
||||
if(nLoop == 0)
|
||||
{
|
||||
nLoop = 1;
|
||||
}
|
||||
//Calculate the damage
|
||||
for (nLoop; nLoop > 0; nLoop--)
|
||||
{
|
||||
nDamage = nDamage + d6(2);
|
||||
}
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTargetLocation, TRUE);
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_CONE_SONIC));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSpellSaveDC(), DAMAGE_TYPE_SONIC);
|
||||
//Set damage effect
|
||||
eCone = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_SONIC);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCone, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
62
nwn/nwnprc/trunk/spells/nw_s1_pulschrdr.nss
Normal file
62
nwn/nwnprc/trunk/spells/nw_s1_pulschrdr.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Charisma Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_CHARISMA, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
58
nwn/nwnprc/trunk/spells/nw_s1_pulscold.nss
Normal file
58
nwn/nwnprc/trunk/spells/nw_s1_pulscold.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Cold
|
||||
//:: NW_S1_PulsCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eHowl;
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_COLD);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_COLD));
|
||||
//Roll the damage
|
||||
nDamage = d6(GetHitDice(OBJECT_SELF));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD);
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
eHowl = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_COLD);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
61
nwn/nwnprc/trunk/spells/nw_s1_pulscondr.nss
Normal file
61
nwn/nwnprc/trunk/spells/nw_s1_pulscondr.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Constitution Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_CONSTITUTION, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
53
nwn/nwnprc/trunk/spells/nw_s1_pulsdeath.nss
Normal file
53
nwn/nwnprc/trunk/spells/nw_s1_pulsdeath.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Death
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eHowl = EffectDeath();
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DEATH));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
//DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
62
nwn/nwnprc/trunk/spells/nw_s1_pulsdexdr.nss
Normal file
62
nwn/nwnprc/trunk/spells/nw_s1_pulsdexdr.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Dexterity Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_DEXTERITY, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
73
nwn/nwnprc/trunk/spells/nw_s1_pulsdis.nss
Normal file
73
nwn/nwnprc/trunk/spells/nw_s1_pulsdis.nss
Normal file
@@ -0,0 +1,73 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Disease
|
||||
//:: NW_S1_PulsDis
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of disease spreads out from the creature
|
||||
and infects all those within 10ft
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = d6(GetHitDice(OBJECT_SELF));
|
||||
int nRacial = MyPRCGetRacialType(OBJECT_SELF);
|
||||
int nDisease;
|
||||
float fDelay;
|
||||
effect eDisease;
|
||||
effect ePulse = EffectVisualEffect(266);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, ePulse, GetLocation(OBJECT_SELF));
|
||||
|
||||
//Determine the disease type based on the Racial Type
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
nDisease = DISEASE_VERMIN_MADNESS;
|
||||
break;
|
||||
case RACIAL_TYPE_UNDEAD:
|
||||
nDisease = DISEASE_FILTH_FEVER;
|
||||
break;
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
nDisease = DISEASE_DEMON_FEVER;
|
||||
break;
|
||||
case RACIAL_TYPE_MAGICAL_BEAST:
|
||||
nDisease = DISEASE_SOLDIER_SHAKES;
|
||||
break;
|
||||
case RACIAL_TYPE_ABERRATION:
|
||||
nDisease = DISEASE_BLINDING_SICKNESS;
|
||||
break;
|
||||
default:
|
||||
nDisease = DISEASE_MINDFIRE;
|
||||
break;
|
||||
}
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DISEASE));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
eDisease = EffectDisease(nDisease);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ void Drown(object oTarget)
|
||||
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 20) == FALSE)
|
||||
{
|
||||
//Apply the VFX impact and damage effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
//Set damage effect to kill the target
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ void Drown(object oTarget)
|
||||
void main ()
|
||||
{
|
||||
int nDamage = GetCurrentHitPoints() / 2;
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamage(nDamage), OBJECT_SELF);
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, PRCEffectDamage(OBJECT_SELF, nDamage), OBJECT_SELF);
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int bSave = FALSE;
|
||||
|
||||
58
nwn/nwnprc/trunk/spells/nw_s1_pulselec.nss
Normal file
58
nwn/nwnprc/trunk/spells/nw_s1_pulselec.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Lightning
|
||||
//:: NW_S0_CallLghtn.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All creatures within 10ft of the creature take
|
||||
1d6 per HD up to 10d6
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
effect eHowl = EffectVisualEffect(VFX_IMP_PULSE_COLD);
|
||||
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eHowl, GetLocation(OBJECT_SELF)));
|
||||
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_CHEST);
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_LIGHTNING));
|
||||
//Roll the damage
|
||||
nDamage = d6(nHD);
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
eHowl = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget, 0.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
58
nwn/nwnprc/trunk/spells/nw_s1_pulsfire.nss
Normal file
58
nwn/nwnprc/trunk/spells/nw_s1_pulsfire.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Fire
|
||||
//:: NW_S1_PulsFire
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
effect eHowl;
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_FIRE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_FIRE));
|
||||
//Roll the damage
|
||||
nDamage = d6(nHD);
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_FIRE);
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
eHowl = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
78
nwn/nwnprc/trunk/spells/nw_s1_pulsholy.nss
Normal file
78
nwn/nwnprc/trunk/spells/nw_s1_pulsholy.nss
Normal file
@@ -0,0 +1,78 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Holy
|
||||
//:: NW_S1_PulsHoly
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants. Undead are damaged, allies are healed.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eHowl;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_HOLY);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Roll the amount to heal or damage
|
||||
nDamage = d4(nHD);
|
||||
//If the target is not undead
|
||||
if (MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Make a faction check
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(GetIsFriend(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_HOLY, FALSE));
|
||||
//Set heal effect
|
||||
eHowl = EffectHeal(nDamage);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_DIVINE);
|
||||
//Set damage effect
|
||||
eHowl = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE) ;
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_HOLY));
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
62
nwn/nwnprc/trunk/spells/nw_s1_pulsintdr.nss
Normal file
62
nwn/nwnprc/trunk/spells/nw_s1_pulsintdr.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Intelligence Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
51
nwn/nwnprc/trunk/spells/nw_s1_pulslvldr.nss
Normal file
51
nwn/nwnprc/trunk/spells/nw_s1_pulslvldr.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Level Drain
|
||||
//:: NW_S1_PulsLvlDr
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(OBJECT_SELF));
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
fDelay = GetSpellEffectDelay(GetLocation(OBJECT_SELF), oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
eHowl = EffectNegativeLevel(1);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
76
nwn/nwnprc/trunk/spells/nw_s1_pulsneg.nss
Normal file
76
nwn/nwnprc/trunk/spells/nw_s1_pulsneg.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Negative
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants. Undead are healed.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Roll the amount to heal or damage
|
||||
nDamage = d4(nHD);
|
||||
//If the target is undead
|
||||
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Make a faction check
|
||||
if(GetIsFriend(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_HOLY, FALSE));
|
||||
//Set heal effect
|
||||
eHowl = EffectHeal(nDamage);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE);
|
||||
//Set damage effect
|
||||
eHowl = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_HOLY));
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
129
nwn/nwnprc/trunk/spells/nw_s1_pulspois.nss
Normal file
129
nwn/nwnprc/trunk/spells/nw_s1_pulspois.nss
Normal file
@@ -0,0 +1,129 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Poison
|
||||
//:: NW_S1_PulsPois
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. All who make a reflex save are not
|
||||
poisoned.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 23, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = d6(GetHitDice(OBJECT_SELF));
|
||||
int nRacial = GetRacialType(OBJECT_SELF);
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nPoison;
|
||||
float fDelay;
|
||||
effect ePoison;
|
||||
|
||||
//Determine the poison type based on the Racial Type and HD
|
||||
switch (nRacial)
|
||||
{
|
||||
case RACIAL_TYPE_OUTSIDER:
|
||||
if (nHD <= 9)
|
||||
{
|
||||
nPoison = POISON_QUASIT_VENOM;
|
||||
}
|
||||
else if (nHD < 13)
|
||||
{
|
||||
nPoison = POISON_BEBILITH_VENOM;
|
||||
}
|
||||
else //if (nHD >= 13)
|
||||
{
|
||||
nPoison = POISON_PIT_FIEND_ICHOR;
|
||||
}
|
||||
break;
|
||||
case RACIAL_TYPE_VERMIN:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_TINY_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_SMALL_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_MEDIUM_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_HUGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_GARGANTUAN_SPIDER_VENOM;
|
||||
}
|
||||
else// if (nHD >= 18)
|
||||
{
|
||||
nPoison = POISON_COLOSSAL_SPIDER_VENOM;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (nHD < 3)
|
||||
{
|
||||
nPoison = POISON_NIGHTSHADE;
|
||||
}
|
||||
else if (nHD < 6)
|
||||
{
|
||||
nPoison = POISON_BLADE_BANE;
|
||||
}
|
||||
else if (nHD < 9)
|
||||
{
|
||||
nPoison = POISON_BLOODROOT;
|
||||
}
|
||||
else if (nHD < 12)
|
||||
{
|
||||
nPoison = POISON_LARGE_SPIDER_VENOM;
|
||||
}
|
||||
else if (nHD < 15)
|
||||
{
|
||||
nPoison = POISON_LICH_DUST;
|
||||
}
|
||||
else if (nHD < 18)
|
||||
{
|
||||
nPoison = POISON_DARK_REAVER_POWDER;
|
||||
}
|
||||
else //if (nHD >= 18 )
|
||||
{
|
||||
nPoison = POISON_BLACK_LOTUS_EXTRACT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_POISON));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
ePoison = EffectPoison(nPoison);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoison, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
43
nwn/nwnprc/trunk/spells/nw_s1_pulsspore.nss
Normal file
43
nwn/nwnprc/trunk/spells/nw_s1_pulsspore.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Vrock Spores
|
||||
//:: NW_S1_PulsSpore
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of disease spreads out from the creature
|
||||
and infects all those within 10ft
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 8, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
float fDelay;
|
||||
effect eDisease;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NATURE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DISEASE));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
eDisease = EffectDisease(DISEASE_SOLDIER_SHAKES);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDisease, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
60
nwn/nwnprc/trunk/spells/nw_s1_pulsstrdr.nss
Normal file
60
nwn/nwnprc/trunk/spells/nw_s1_pulsstrdr.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Strength Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_STRENGTH, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
47
nwn/nwnprc/trunk/spells/nw_s1_pulswind.nss
Normal file
47
nwn/nwnprc/trunk/spells/nw_s1_pulswind.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse Whirlwind
|
||||
//:: NW_S1_PulsWind
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
All those that fail a save of DC 14 are knocked
|
||||
down by the elemental whirlwind.
|
||||
|
||||
* made this make the knockdown last 2 rounds instead of 1
|
||||
* it will now also do d3(hitdice/2) damage
|
||||
*/
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 8, 2002
|
||||
//::///////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eDown = EffectKnockdown();
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WIND);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
int nDamage = GetHitDice(OBJECT_SELF) /2;
|
||||
effect eDam;
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
eDam = PRCEffectDamage(oTarget, d3(nDamage), DAMAGE_TYPE_SLASHING);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Make a saving throw check
|
||||
if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, 14))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDown, oTarget, RoundsToSeconds(2));
|
||||
DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam,oTarget));
|
||||
}
|
||||
//Get next target in spell area
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
57
nwn/nwnprc/trunk/spells/nw_s1_pulswisdr.nss
Normal file
57
nwn/nwnprc/trunk/spells/nw_s1_pulswisdr.nss
Normal file
@@ -0,0 +1,57 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Wisdom Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDamage = GetHitDice(OBJECT_SELF)/5;
|
||||
if (nDamage == 0)
|
||||
{
|
||||
nDamage = 1;
|
||||
}
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + nHD;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_WISDOM, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ void main()
|
||||
nTargetRace = MyPRCGetRacialType(oTest);
|
||||
if(nTargetRace == RACIAL_TYPE_UNDEAD && nTurningMaxHD >= GetHitDiceForTurning(oTest, nTurnType, nTargetRace))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d8(GetEssentiaInvestedFeat(OBJECT_SELF, FEAT_AZURE_TURNING)), DAMAGE_TYPE_DIVINE), oTest);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTest, d8(GetEssentiaInvestedFeat(OBJECT_SELF, FEAT_AZURE_TURNING)), DAMAGE_TYPE_DIVINE), oTest);
|
||||
}
|
||||
|
||||
//move to next test
|
||||
@@ -287,7 +287,7 @@ void main()
|
||||
&& nTargetRace == RACIAL_TYPE_UNDEAD
|
||||
&& (GetHasFeat(FEAT_EXALTED_TURNING)) || GetPersistantLocalInt(OBJECT_SELF, "VoPFeat"+IntToString(FEAT_EXALTED_TURNING)))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d6(3), DAMAGE_TYPE_DIVINE), oTest);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTest, d6(3), DAMAGE_TYPE_DIVINE), oTest);
|
||||
}
|
||||
|
||||
//Check for Holy Fire
|
||||
@@ -295,7 +295,7 @@ void main()
|
||||
{
|
||||
int nFire = nTurningMaxHD / 2;
|
||||
int nHoly = nTurningMaxHD - nFire;
|
||||
effect eDam = EffectLinkEffects(EffectDamage(DAMAGE_TYPE_DIVINE, nHoly), EffectDamage(DAMAGE_TYPE_FIRE, nFire));
|
||||
effect eDam = EffectLinkEffects(PRCEffectDamage(oTest, DAMAGE_TYPE_DIVINE, nHoly), PRCEffectDamage(oTest, DAMAGE_TYPE_FIRE, nFire));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,23 +81,23 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
}
|
||||
|
||||
//Set damage effect
|
||||
effect eDam = EffectDamage(nDam, nDamageType);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, nDamageType);
|
||||
//Apply the MIRV and damage effect
|
||||
|
||||
// * only damage enemies
|
||||
if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) )
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) )
|
||||
{
|
||||
// * must be the correct racial type (only used with Holy Water)
|
||||
if ((nRacialType != RACIAL_TYPE_ALL) && (nRacialType == MyPRCGetRacialType(oTarget)))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
else
|
||||
if ((nRacialType == RACIAL_TYPE_ALL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
@@ -122,7 +122,7 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
lTarget = Location(oArea, vPos, fFace);
|
||||
missing code looks bad because it does not jive with visual
|
||||
*/
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fExplosionRadius, lTarget, TRUE, nObjectFilter);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
@@ -134,7 +134,7 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
nDamage = nSplashDamage;
|
||||
|
||||
//Set the damage effect
|
||||
effect eDam = EffectDamage(nDamage, nDamageType);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDamage, nDamageType);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
// * must be the correct racial type (only used with Holy Water)
|
||||
@@ -142,17 +142,17 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
{
|
||||
// Apply effects to the currently selected target.
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
//This visual effect is applied to the target object not the location as above. This visual effect
|
||||
//represents the flame that erupts on the target not on the ground.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
else
|
||||
if ((nRacialType == RACIAL_TYPE_ALL) )
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -196,8 +196,8 @@ void main()
|
||||
{
|
||||
// haaaack: store caster level on item for the on hit spell to work properly
|
||||
SetLocalInt(oMyWeapon,"X2_SPELL_CLEVEL_FLAMING_WEAPON",nCasterLvl);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
AddFlamingEffectToWeapon(oMyWeapon, RoundsToSeconds(nDuration));
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -76,7 +76,7 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
}
|
||||
|
||||
//Set damage effect
|
||||
effect eDam = EffectDamage(nDam, nDamageType);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, nDamageType);
|
||||
//Apply the MIRV and damage effect
|
||||
|
||||
// * only damage enemies
|
||||
@@ -85,14 +85,14 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
// * must be the correct racial type (only used with Holy Water)
|
||||
if ((nRacialType != RACIAL_TYPE_ALL) && (nRacialType == MyPRCGetRacialType(oTarget)))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
else
|
||||
if ((nRacialType == RACIAL_TYPE_ALL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
@@ -193,8 +193,8 @@ void main()
|
||||
// haaaack: store caster level on item for the on hit spell to work properly
|
||||
|
||||
SetLocalInt(oMyWeapon,"X2_SPELL_CLEVEL_FLAMING_WEAPON",nCasterLvl);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
AddFrostEffectToWeapon(oMyWeapon, RoundsToSeconds(nDuration));
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -78,7 +78,7 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
}
|
||||
|
||||
//Set damage effect
|
||||
effect eDam = EffectDamage(nDam, nDamageType);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, nDamageType);
|
||||
//Apply the MIRV and damage effect
|
||||
|
||||
// * only damage enemies
|
||||
@@ -87,14 +87,14 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
// * must be the correct racial type (only used with Holy Water)
|
||||
if ((nRacialType != RACIAL_TYPE_ALL) && (nRacialType == MyPRCGetRacialType(oTarget)))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
else
|
||||
if ((nRacialType == RACIAL_TYPE_ALL) )
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget); VISUALS outrace the grenade, looks bad
|
||||
}
|
||||
@@ -131,7 +131,7 @@ void PRCDoGrenade(int nDirectDamage, int nSplashDamage, int vSmallHit, int vRing
|
||||
nDamage = nSplashDamage;
|
||||
|
||||
//Set the damage effect
|
||||
effect eDam = EffectDamage(nDamage, nDamageType);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDamage, nDamageType);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
// * must be the correct racial type (only used with Holy Water)
|
||||
@@ -193,8 +193,8 @@ void main()
|
||||
{// haaaack: store caster level on item for the on hit spell to work properly
|
||||
|
||||
SetLocalInt(oMyWeapon,"X2_SPELL_CLEVEL_FLAMING_WEAPON",nCasterLvl);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oMyWeapon));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oMyWeapon), RoundsToSeconds(nDuration));
|
||||
AddSparkEffectToWeapon(oMyWeapon, RoundsToSeconds(nDuration));
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -54,9 +54,9 @@ void main()
|
||||
nDam += 1;
|
||||
|
||||
//Set damage effect
|
||||
effect eDam = EffectDamage(nDam, DAMAGE_TYPE_ACID);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_ACID);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, PRCGetSpellId()));
|
||||
|
||||
//Apply second round
|
||||
@@ -64,7 +64,7 @@ void main()
|
||||
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 17, SAVING_THROW_TYPE_ACID))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSick, oTarget, RoundsToSeconds(1));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSick, oTarget, RoundsToSeconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void main()
|
||||
{
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 13, SAVING_THROW_TYPE_ACID))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSick, oSplashTarget, RoundsToSeconds(1));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSick, oSplashTarget, RoundsToSeconds(1));
|
||||
}
|
||||
}
|
||||
oSplashTarget = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(10.0), lTarget, TRUE, OBJECT_TYPE_CREATURE);
|
||||
|
||||
@@ -52,7 +52,7 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
nDam *= 2;
|
||||
}
|
||||
// Set damage effect
|
||||
eDam = EffectDamage(nDam, nDamageType);
|
||||
eDam = PRCEffectDamage(oTarget, nDam, nDamageType);
|
||||
|
||||
// Check reaction type
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
@@ -67,8 +67,8 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
GetAlignmentGoodEvil(oTarget) == nAlignment))
|
||||
{
|
||||
// Apply damage and VFX
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
// Signal event spell cast at
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellId));
|
||||
}
|
||||
@@ -87,13 +87,14 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
// Apply AOE VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eAOE, lTarget);
|
||||
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nSplashDam, nDamageType);
|
||||
|
||||
|
||||
// Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fExplosionRadius, lTarget, TRUE, nObjectFilter);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Set the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nSplashDam, nDamageType);
|
||||
// Check PvP and make sure it isn't the target
|
||||
if(!GetIsReactionTypeFriendly(oTarget) &&
|
||||
oDoNotDam != oTarget)
|
||||
@@ -112,8 +113,8 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellId));
|
||||
|
||||
// Delay the damage and visual effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
// Get the next target within the spell shape.
|
||||
|
||||
@@ -62,8 +62,8 @@ void SendMissileBomb(object oCaster, object oTarget, float fDelay=0.0, float fTi
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
nDam += nDam/2;
|
||||
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_MAGICAL), oLoop));
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE, FALSE, 4.0f), oLoop));
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oLoop, nDam, DAMAGE_TYPE_MAGICAL), oLoop));
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE, FALSE, 4.0f), oLoop));
|
||||
}
|
||||
else if (!PRCDoResistSpell(oCaster, oLoop, nPenetr, fDelay))
|
||||
{
|
||||
@@ -73,8 +73,8 @@ void SendMissileBomb(object oCaster, object oTarget, float fDelay=0.0, float fTi
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
nDam += nDam/2;
|
||||
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_MAGICAL), oLoop));
|
||||
DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE), oLoop));
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oLoop, nDam, DAMAGE_TYPE_MAGICAL), oLoop));
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_MAGBLUE), oLoop));
|
||||
}
|
||||
|
||||
oLoop = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(5.0), lLoc, TRUE);
|
||||
|
||||
@@ -87,7 +87,7 @@ void main()
|
||||
if (!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC, SAVING_THROW_TYPE_SONIC, oCaster, fDelay))
|
||||
{
|
||||
int nDmg = d6(2);
|
||||
effect eSonicDmg = EffectDamage(nDmg, DAMAGE_TYPE_SONIC);
|
||||
effect eSonicDmg = PRCEffectDamage(oTarget, nDmg, DAMAGE_TYPE_SONIC);
|
||||
effect eSonicLink = EffectLinkEffects(eSonicVFX, eSonicDmg);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eSonicLink, oTarget));
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ void main()
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d3(1), DAMAGE_TYPE_BLUDGEONING), oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, d3(1), DAMAGE_TYPE_BLUDGEONING), oTarget);
|
||||
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, 500.0f, lLoc, FALSE, OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ void main()
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
nDam = d8(1);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, DAMAGE_TYPE_SONIC), oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_SONIC), oTarget);
|
||||
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 15, SAVING_THROW_TYPE_SONIC))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, TurnsToSeconds(1));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeaf, oTarget, TurnsToSeconds(1));
|
||||
}
|
||||
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 11.0, lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
|
||||
@@ -47,9 +47,9 @@ void main()
|
||||
nDam = PRCGetReflexAdjustedDamage(nDam, oTarget, nDC, nSaveType);
|
||||
if(nDam > 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDam, nDamType), oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nDam, nDamType), oTarget);
|
||||
// vfx on object
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, FeetToMeters(10.0), lLoc, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
|
||||
@@ -43,12 +43,12 @@ void PRCDoSpikeGrowthEffect(object oTarget,int nPenetr)
|
||||
int nDam = PRCMaximizeOrEmpower(4, 1, nMetaMagic);
|
||||
//nDam += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF);
|
||||
|
||||
effect eDam = EffectDamage(nDam, DAMAGE_TYPE_PIERCING);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_PIERCING);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
//effect eLink = eDam;
|
||||
//Apply damage and visuals
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam/*eLink*/, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam/*eLink*/, oTarget));
|
||||
|
||||
// * only apply a slow effect from this spell once
|
||||
if (GetHasSpellEffect(453, oTarget) == FALSE)
|
||||
@@ -57,7 +57,7 @@ void PRCDoSpikeGrowthEffect(object oTarget,int nPenetr)
|
||||
if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, PRCGetSaveDC(oTarget,GetAreaOfEffectCreator()), SAVING_THROW_ALL, GetAreaOfEffectCreator(), fDelay))
|
||||
{
|
||||
effect eSpeed = EffectMovementSpeedDecrease(30);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, oTarget, HoursToSeconds(24));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, oTarget, HoursToSeconds(24));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,12 @@ void PRCDoSpikeGrowthEffect(object oTarget,int nPenetr)
|
||||
int nDam = PRCMaximizeOrEmpower(4, 1, nMetaMagic);
|
||||
//nDam += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF);
|
||||
|
||||
effect eDam = EffectDamage(nDam, DAMAGE_TYPE_PIERCING);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_PIERCING);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
//effect eLink = eDam;
|
||||
//Apply damage and visuals
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam/*eLink*/, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam/*eLink*/, oTarget));
|
||||
|
||||
// * only apply a slow effect from this spell once
|
||||
if (GetHasSpellEffect(453, oTarget) == FALSE)
|
||||
@@ -57,7 +57,7 @@ void PRCDoSpikeGrowthEffect(object oTarget,int nPenetr)
|
||||
if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, PRCGetSaveDC(oTarget,GetAreaOfEffectCreator()), SAVING_THROW_ALL, GetAreaOfEffectCreator(), fDelay))
|
||||
{
|
||||
effect eSpeed = EffectMovementSpeedDecrease(30);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, oTarget, HoursToSeconds(24));
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, oTarget, HoursToSeconds(24));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
nDam *= 2;
|
||||
}
|
||||
// Set damage effect
|
||||
eDam = EffectDamage(nDam, nDamageType);
|
||||
eDam = PRCEffectDamage(oTarget, nDam, nDamageType);
|
||||
|
||||
// Check reaction type
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
@@ -67,8 +67,8 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
GetAlignmentGoodEvil(oTarget) == nAlignment))
|
||||
{
|
||||
// Apply damage and VFX
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
// Signal event spell cast at
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellId));
|
||||
}
|
||||
@@ -87,13 +87,13 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
// Apply AOE VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eAOE, lTarget);
|
||||
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nSplashDam, nDamageType);
|
||||
|
||||
// Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, fExplosionRadius, lTarget, TRUE, nObjectFilter);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Set the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nSplashDam, nDamageType);
|
||||
|
||||
// Check PvP and make sure it isn't the target
|
||||
if(!GetIsReactionTypeFriendly(oTarget) &&
|
||||
oDoNotDam != oTarget)
|
||||
@@ -112,8 +112,8 @@ void PRCDoGrenade(int nDirectDam, int nSplashDam, int nVisVFX, int nAOEVFX, int
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellId));
|
||||
|
||||
// Delay the damage and visual effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
// Get the next target within the spell shape.
|
||||
|
||||
@@ -130,7 +130,7 @@ void main()
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,e1,oTarget,RoundsToSeconds(6));
|
||||
break;
|
||||
|
||||
case 783: e1 = EffectDamage(d8(2)+10);
|
||||
case 783: e1 = PRCEffectDamage(oTarget, d8(2)+10);
|
||||
eVis = EffectVisualEffect(VFX_COM_BLOOD_REG_RED);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT,e1,oTarget);
|
||||
@@ -154,7 +154,7 @@ void main()
|
||||
{
|
||||
switch (nSpell)
|
||||
{
|
||||
case 776: e1 = EffectDamage(d6(3)+13);
|
||||
case 776: e1 = PRCEffectDamage(oTarget, d6(3)+13);
|
||||
eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
eLink = EffectLinkEffects(e1,eVis);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eLink,oTarget);
|
||||
|
||||
@@ -82,7 +82,7 @@ void main()
|
||||
|
||||
int nDmg = d4() + nLevel;
|
||||
|
||||
effect eDmg = PRCEffectDamage(oTarget, nDmg,nDamageType);
|
||||
effect eDmg = PRCEffectDamage(oTarget, nDmg, nDamageType);
|
||||
effect eVis;
|
||||
if (nDmg<10) // if we are doing below 10 point of damage, use small flame
|
||||
{
|
||||
|
||||
@@ -33,15 +33,16 @@ Material Component: 5 pounds of powdered iron and silver (worth 25 gp).
|
||||
//:: Created On: 6/10/2022
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
#include "prc_inc_sp_tch"
|
||||
|
||||
void main()
|
||||
{
|
||||
location lTarget = GetSpellTargetLocation();
|
||||
float fRadius = FeetToMeters(5);
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
float fRadius = FeetToMeters(5.0);
|
||||
int nTouch;
|
||||
int nDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
|
||||
@@ -63,7 +64,7 @@ void main()
|
||||
nDam += nDam;
|
||||
}
|
||||
|
||||
effect eDam = EffectDamage(nDam, DAMAGE_TYPE_DIVINE);
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_DIVINE);
|
||||
object oDoNotDam = oTarget;
|
||||
|
||||
//Outsider
|
||||
@@ -77,7 +78,7 @@ void main()
|
||||
}
|
||||
}
|
||||
|
||||
oTarget = MyGetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != oDoNotDam)
|
||||
@@ -93,7 +94,7 @@ void main()
|
||||
}
|
||||
}
|
||||
}
|
||||
MyGetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
||||
GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user