Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
BIN
_content/prc8_battle_top/nw_s1_dragcold.ncs
Normal file
BIN
_content/prc8_battle_top/nw_s1_dragcold.ncs
Normal file
Binary file not shown.
170
_content/prc8_battle_top/nw_s1_dragcold.nss
Normal file
170
_content/prc8_battle_top/nw_s1_dragcold.nss
Normal file
@@ -0,0 +1,170 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dragon Breath Cold
|
||||
//:: NW_S1_DragCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Calculates the proper damage and DC Save for the
|
||||
breath weapon based on the HD of the dragon.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 9, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
const string DRAGBREATHLOCK = "DragonBreathLock";
|
||||
|
||||
//modified to use the breath include - Fox
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_inc_breath"
|
||||
#include "jw_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Check the dragon breath delay lock
|
||||
if(GetLocalInt(OBJECT_SELF, DRAGBREATHLOCK))
|
||||
{
|
||||
SendMessageToPC(OBJECT_SELF, "You cannot use your breath weapon again so soon");
|
||||
return;
|
||||
}
|
||||
//Declare major variables
|
||||
int nAge = GetHitDice(OBJECT_SELF);
|
||||
int nDCBoost = nAge / 2;
|
||||
int nDamageDice;
|
||||
struct breath ColdBreath;
|
||||
int nDamage, nDC, nDamStrike;
|
||||
float fDelay;
|
||||
object oTarget;
|
||||
effect eVis, eBreath;
|
||||
|
||||
//custom Xyrothon script begins here
|
||||
effect eVis2;
|
||||
effect eVis3;
|
||||
effect eVis4;
|
||||
|
||||
if (GetTag(OBJECT_SELF) == "frost_xyrothon") //Xyrothon
|
||||
{
|
||||
|
||||
nDamage = d6(14);
|
||||
nDC = 36;
|
||||
|
||||
PlayDragonBattleCry();
|
||||
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Reset the damage to full
|
||||
nDamStrike = nDamage;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_DRAGON_BREATH_COLD));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, nDC, SAVING_THROW_TYPE_COLD, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nDamStrike = nDamStrike/2;
|
||||
if(GetHasFeat(FEAT_EVASION, oTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nDamStrike = 0;
|
||||
}
|
||||
}
|
||||
else if(GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nDamStrike = nDamStrike/2;
|
||||
}
|
||||
if (nDamStrike > 0)
|
||||
{
|
||||
//Set Damage and VFX
|
||||
eBreath = EffectDamage(nDamStrike, DAMAGE_TYPE_COLD);
|
||||
eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
eVis2 = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
eVis3 = EffectCutsceneParalyze();
|
||||
eVis4 = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION);
|
||||
|
||||
//Determine effect delay
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
|
||||
//custom part
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis2, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis3, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis4, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 14.0, GetSpellTargetLocation(), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
//custom Xyrothon script ends here
|
||||
|
||||
//Use the HD of the creature to determine damage and save DC
|
||||
if (nAge <= 6) //Wyrmling
|
||||
{
|
||||
nDamageDice = 1;
|
||||
}
|
||||
else if (nAge >= 7 && nAge <= 9) //Very Young
|
||||
{
|
||||
nDamageDice = 2;
|
||||
}
|
||||
else if (nAge >= 10 && nAge <= 12) //Young
|
||||
{
|
||||
nDamageDice = 3;
|
||||
}
|
||||
else if (nAge >= 13 && nAge <= 15) //Juvenile
|
||||
{
|
||||
nDamageDice = 4;
|
||||
}
|
||||
else if (nAge >= 16 && nAge <= 18) //Young Adult
|
||||
{
|
||||
nDamageDice = 5;
|
||||
}
|
||||
else if (nAge >= 19 && nAge <= 21) //Adult
|
||||
{
|
||||
nDamageDice = 6;
|
||||
}
|
||||
else if (nAge >= 22 && nAge <= 24) //Mature Adult
|
||||
{
|
||||
nDamageDice = 7;
|
||||
}
|
||||
else if (nAge >= 25 && nAge <= 27) //Old
|
||||
{
|
||||
nDamageDice = 8;
|
||||
}
|
||||
else if (nAge >= 28 && nAge <= 30) //Very Old
|
||||
{
|
||||
nDamageDice = 9;
|
||||
}
|
||||
else if (nAge >= 31 && nAge <= 33) //Ancient
|
||||
{
|
||||
nDamageDice = 10;
|
||||
}
|
||||
else if (nAge >= 34 && nAge <= 37) //Wyrm
|
||||
{
|
||||
nDamageDice = 11;
|
||||
}
|
||||
else if (nAge > 37) //Great Wyrm
|
||||
{
|
||||
nDamageDice = 12;
|
||||
}
|
||||
//create the breath - 40' ~ 14m? - should set it based on size later
|
||||
ColdBreath = CreateBreath(OBJECT_SELF, FALSE, 40.0, DAMAGE_TYPE_COLD, 6, nDamageDice, ABILITY_CONSTITUTION, nDCBoost);
|
||||
|
||||
//Apply the breath
|
||||
PRCPlayDragonBattleCry();
|
||||
ApplyBreath(ColdBreath, PRCGetSpellTargetLocation());
|
||||
|
||||
//Apply the recharge lock
|
||||
SetLocalInt(OBJECT_SELF, DRAGBREATHLOCK, TRUE);
|
||||
|
||||
// Schedule opening the delay lock
|
||||
fDelay = RoundsToSeconds(ColdBreath.nRoundsUntilRecharge);
|
||||
SendMessageToPC(OBJECT_SELF, "Your breath weapon will be ready again in " + IntToString(ColdBreath.nRoundsUntilRecharge) + " rounds.");
|
||||
|
||||
DelayCommand(fDelay, DeleteLocalInt(OBJECT_SELF, DRAGBREATHLOCK));
|
||||
DelayCommand(fDelay, SendMessageToPC(OBJECT_SELF, "Your breath weapon is ready now"));
|
||||
}
|
||||
BIN
_content/prc8_battle_top/nw_s1_howlparal.ncs
Normal file
BIN
_content/prc8_battle_top/nw_s1_howlparal.ncs
Normal file
Binary file not shown.
102
_content/prc8_battle_top/nw_s1_howlparal.nss
Normal file
102
_content/prc8_battle_top/nw_s1_howlparal.nss
Normal file
@@ -0,0 +1,102 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Howl: Paralysis
|
||||
//:: NW_S1_HowlParal
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A howl emanates from the creature which affects
|
||||
all within 10ft unless they make a save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void snivhowl ()
|
||||
{
|
||||
|
||||
//Declare major variables
|
||||
effect eHowl = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_IMP_HEAD_COLD);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY_FEMALE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eHowl, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
float fDelay;
|
||||
int nHD = 10;
|
||||
int nDC = 14;
|
||||
int nDuration = 2;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = GetDistanceToObject(oTarget)/10;
|
||||
nDuration = GetScaledDuration(nDuration , oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS));
|
||||
|
||||
//Make a saving throw check
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
|
||||
FloatingTextStringOnCreature("Hit by a psionic blast",oTarget);
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (GetStringLeft(GetTag(OBJECT_SELF),7)=="jw_sniv")
|
||||
{
|
||||
snivhowl();
|
||||
return;
|
||||
}
|
||||
|
||||
//Declare major variables
|
||||
effect eHowl = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD);
|
||||
|
||||
effect eLink = EffectLinkEffects(eHowl, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
float fDelay;
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + (nHD/4);
|
||||
int nDuration = 1 + (nHD/4);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = GetDistanceToObject(oTarget)/10;
|
||||
nDuration = GetScaledDuration(nDuration , oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS));
|
||||
|
||||
//Make a saving throw check
|
||||
if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_content/prc8_battle_top/nw_s1_howlsonic.ncs
Normal file
BIN
_content/prc8_battle_top/nw_s1_howlsonic.ncs
Normal file
Binary file not shown.
160
_content/prc8_battle_top/nw_s1_howlsonic.nss
Normal file
160
_content/prc8_battle_top/nw_s1_howlsonic.nss
Normal file
@@ -0,0 +1,160 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Howl: Sonic
|
||||
//:: NW_S1_HowlSonic
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A howl emanates from the creature which affects
|
||||
all within 10ft unless they make a save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void khasthowl()
|
||||
|
||||
{
|
||||
|
||||
//ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2);
|
||||
effect eLink = EffectKnockdown();
|
||||
float fDelay;
|
||||
int nDC = 18;
|
||||
int nDuration = 2;
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
nDuration = GetScaledDuration(nDuration , oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
//SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS));
|
||||
fDelay = GetDistanceToObject(oTarget)/10;
|
||||
//Make a saving throw check
|
||||
if(FortitudeSave(oTarget,nDC,SAVING_THROW_TYPE_SONIC)==0)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
|
||||
if (d2()==1)
|
||||
{
|
||||
AssignCommand(oTarget,PlaySound("as_wt_thunderds1"));
|
||||
}
|
||||
else
|
||||
{
|
||||
AssignCommand(oTarget,PlaySound("as_wt_thunderds2"));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void snivhowl()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_MIND);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY);
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nAmount = 1;
|
||||
if(nAmount == 0)
|
||||
{
|
||||
nAmount = 1;
|
||||
}
|
||||
int nDC = 14;
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = GetDistanceToObject(oTarget)/20;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_SONIC));
|
||||
nDamage = d6(nAmount);
|
||||
//Make a saving throw check
|
||||
if(MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eHowl = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
FloatingTextStringOnCreature("Hit by a psionic blast",oTarget);
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (GetStringLeft(GetTag(OBJECT_SELF),7)=="jw_sniv")
|
||||
{
|
||||
snivhowl();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (GetTag(OBJECT_SELF)=="jw_khaasta")
|
||||
{
|
||||
khasthowl();
|
||||
return;
|
||||
}
|
||||
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY);
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nAmount = nHD/4;
|
||||
if(nAmount == 0)
|
||||
{
|
||||
nAmount = 1;
|
||||
}
|
||||
int nDC = 10 + nAmount;
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = GetDistanceToObject(oTarget)/20;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_SONIC));
|
||||
nDamage = d6(nAmount);
|
||||
//Make a saving throw check
|
||||
if(MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SONIC, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eHowl = EffectDamage(nDamage, DAMAGE_TYPE_SONIC);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(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_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
_content/prc8_battle_top/nw_s1_pulsdrwn.ncs
Normal file
BIN
_content/prc8_battle_top/nw_s1_pulsdrwn.ncs
Normal file
Binary file not shown.
189
_content/prc8_battle_top/nw_s1_pulsdrwn.nss
Normal file
189
_content/prc8_battle_top/nw_s1_pulsdrwn.nss
Normal file
@@ -0,0 +1,189 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse Drown
|
||||
//:: NW_S1_PulsDrwn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows a water elemental to fill an enemies
|
||||
lungs with water drowning them over the next
|
||||
several rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watmaniuk
|
||||
//:: Created On: April 15, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
void Drown(object oTarget)
|
||||
{
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
// * certain racial types are immune
|
||||
if ((GetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT)
|
||||
&&(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
&&(GetRacialType(oTarget) != RACIAL_TYPE_ELEMENTAL))
|
||||
{
|
||||
//Make a fortitude save
|
||||
if(MySavingThrow(SAVING_THROW_FORT, oTarget, 20) == FALSE)
|
||||
{
|
||||
//Apply the VFX impact and damage effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
//Set damage effect to kill the target
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
void main ()
|
||||
{
|
||||
int nDamage = GetCurrentHitPoints() / 2;
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamage(nDamage), OBJECT_SELF);
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int bSave = FALSE;
|
||||
int nIdx;
|
||||
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WATER);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget) == TRUE)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DROWN));
|
||||
//Drown(oTarget);
|
||||
ActionCastSpell(SPELL_DROWN, GetHitDice(OBJECT_SELF), 0, 20, METAMAGIC_NONE, CLASS_TYPE_INVALID, FALSE, TRUE, oTarget);
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//:: Add all this back in later, maybe - Jaysyn
|
||||
/* #include "NW_I0_SPELLS"
|
||||
void RunDrownImpact(int nSecondsRemaining, object oTarget);
|
||||
void spritepulse();
|
||||
void spriteimpact(int nSecondsRemaining, object oTarget);
|
||||
|
||||
void main ()
|
||||
{
|
||||
if (GetTag(OBJECT_SELF)=="jw_water_sprite")
|
||||
{
|
||||
spritepulse();
|
||||
return;
|
||||
}
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int bSave = FALSE;
|
||||
int nCnt = GetHitDice(OBJECT_SELF)/4;
|
||||
int nIdx;
|
||||
//Make a touch attack
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WATER);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget) && nIdx <= nCnt)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DROWN));
|
||||
nCnt = nCnt * 6;
|
||||
DelayCommand(6.0, RunDrownImpact(nCnt, oTarget));
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
void RunDrownImpact(int nSecondsRemaining, object oTarget)
|
||||
{
|
||||
int nCount = GetHitDice(OBJECT_SELF) + 10;
|
||||
int nDice = nCount/4;
|
||||
if (GetIsDead(oTarget) == FALSE)
|
||||
{
|
||||
if (nSecondsRemaining % 6 == 0)
|
||||
{
|
||||
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nCount))
|
||||
{
|
||||
//Roll damage
|
||||
int nDamage = d4(nDice);
|
||||
//check for metamagic
|
||||
effect eDam = EffectDamage(nDamage);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POISON_S);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
nSecondsRemaining = 0;
|
||||
}
|
||||
}
|
||||
--nSecondsRemaining;
|
||||
if (nSecondsRemaining > 0)
|
||||
{
|
||||
DelayCommand(1.0f,RunDrownImpact(nSecondsRemaining,oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void spritepulse ()
|
||||
{
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int bSave = FALSE;
|
||||
int nCnt = 2;
|
||||
int nIdx;
|
||||
//Make a touch attack
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_WATER);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget) && nIdx <= nCnt)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DROWN));
|
||||
nCnt = nCnt * 6;
|
||||
DelayCommand(6.0, spriteimpact(6, oTarget));
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
void spriteimpact(int nSecondsRemaining, object oTarget)
|
||||
{
|
||||
int nCount = 4;
|
||||
int nDice = 2;
|
||||
if (GetIsDead(oTarget) == FALSE)
|
||||
{
|
||||
if (nSecondsRemaining % 6 == 0)
|
||||
{
|
||||
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, 15))
|
||||
{
|
||||
//Roll damage
|
||||
int nDamage = d3();
|
||||
//check for metamagic
|
||||
effect eDam = EffectDamage(nDamage);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POISON_S);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
nSecondsRemaining = 0;
|
||||
}
|
||||
}
|
||||
--nSecondsRemaining;
|
||||
if (nSecondsRemaining > 0)
|
||||
{
|
||||
DelayCommand(1.0f,RunDrownImpact(nSecondsRemaining,oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
550
_content/prc8_battle_top/nw_s2_bardsong.nss
Normal file
550
_content/prc8_battle_top/nw_s2_bardsong.nss
Normal file
@@ -0,0 +1,550 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bard Song
|
||||
//:: NW_S2_BardSong
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This spells applies bonuses to all of the
|
||||
bard's allies within 30ft for a set duration of
|
||||
10 rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Feb 25, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg Zoeller Oct 1, 2003
|
||||
/*
|
||||
bugfix by Kovi 2002.07.30
|
||||
- loosing temporary hp resulted in loosing the other bonuses
|
||||
*/
|
||||
|
||||
#include "prc_inc_clsfunc"
|
||||
#include "prc_inc_combat" //for Dragonfire type getting
|
||||
|
||||
void ApplyDragonfire(int nAmount, int nDuration, object oPC, object oCaster)
|
||||
{
|
||||
int nAppearanceType;
|
||||
int nDamageType = GetDragonfireDamageType(oPC);
|
||||
//find primary weapon to add to
|
||||
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
|
||||
switch(nDamageType)
|
||||
{
|
||||
case DAMAGE_TYPE_ACID: nAppearanceType = ITEM_VISUAL_ACID; break;
|
||||
case DAMAGE_TYPE_COLD: nAppearanceType = ITEM_VISUAL_COLD; break;
|
||||
case DAMAGE_TYPE_ELECTRICAL: nAppearanceType = ITEM_VISUAL_ELECTRICAL; break;
|
||||
case DAMAGE_TYPE_SONIC: nAppearanceType = ITEM_VISUAL_SONIC; break;
|
||||
case DAMAGE_TYPE_FIRE: nAppearanceType = ITEM_VISUAL_FIRE; break;
|
||||
}
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyVisualEffect(nAppearanceType), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
|
||||
|
||||
//add to gloves and claws too
|
||||
oItem = GetItemInSlot(INVENTORY_SLOT_ARMS, oPC);
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oPC);
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
|
||||
//do ammo for ranged attacks
|
||||
object oAmmo = GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
|
||||
oAmmo = GetItemInSlot(INVENTORY_SLOT_BULLETS, oPC);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
|
||||
oAmmo = GetItemInSlot(INVENTORY_SLOT_ARROWS, oPC);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oAmmo, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oAmmo, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
|
||||
//now check offhand and bite
|
||||
oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B, oPC);
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
|
||||
if(!GetIsShield(oItem) && oItem != OBJECT_INVALID)
|
||||
{
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyVisualEffect(nAppearanceType), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
|
||||
}
|
||||
oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L, oPC);
|
||||
SetLocalInt(oItem, "Insp_Dam_Type", nDamageType);
|
||||
SetLocalInt(oItem, "Insp_Dam_Dice", nAmount);
|
||||
IPSafeAddItemProperty(oItem, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_DRAGONFIRE, nAmount), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (PRCGetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
|
||||
return;
|
||||
}
|
||||
string sTag = GetTag(OBJECT_SELF);
|
||||
|
||||
//RemoveOldSongEffects(OBJECT_SELF,GetSpellId());
|
||||
|
||||
if (sTag == "x0_hen_dee" || sTag == "x2_hen_deekin")
|
||||
{
|
||||
// * Deekin has a chance of singing a doom song
|
||||
// * same effect, better tune
|
||||
if (Random(5) == 2)
|
||||
{
|
||||
// the Xp2 Deekin knows more than one doom song
|
||||
if (d3() == 1 && sTag == "x2_hen_deekin")
|
||||
{
|
||||
DelayCommand(0.0, PlaySound("vs_nx2deekM_050"));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(0.0, PlaySound("vs_nx0deekM_074"));
|
||||
DelayCommand(5.0, PlaySound("vs_nx0deekM_074"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nLevel = GetLevelByClass(CLASS_TYPE_BARD) +
|
||||
GetLevelByClass(CLASS_TYPE_DIRGESINGER) +
|
||||
GetLevelByClass(CLASS_TYPE_FOCHLUCAN_LYRIST) +
|
||||
GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD) +
|
||||
GetLevelByClass(CLASS_TYPE_VIRTUOSO);
|
||||
if (GetHasFeat(FEAT_SONG_WHITE_RAVEN, OBJECT_SELF))
|
||||
nLevel += GetLevelByClass(CLASS_TYPE_CRUSADER) + GetLevelByClass(CLASS_TYPE_WARBLADE);
|
||||
|
||||
int nRanks = GetSkillRank(SKILL_PERFORM);
|
||||
if (GetHasFeat(FEAT_DRAGONSONG, OBJECT_SELF)) nRanks+= 2;
|
||||
int nChr = GetAbilityModifier(ABILITY_CHARISMA);
|
||||
int nPerform = nRanks;
|
||||
int nDuration = 10; //+ nChr;
|
||||
|
||||
|
||||
effect eAttack;
|
||||
effect eDamage;
|
||||
effect eWill;
|
||||
effect eFort;
|
||||
effect eReflex;
|
||||
effect eHP;
|
||||
effect eAC;
|
||||
effect eSkill;
|
||||
|
||||
int nAttack;
|
||||
int nDamage;
|
||||
int nWill;
|
||||
int nFort;
|
||||
int nReflex;
|
||||
int nHP;
|
||||
int nAC;
|
||||
int nSkill;
|
||||
|
||||
// lingering song
|
||||
if(GetHasFeat(FEAT_LINGERING_SONG))
|
||||
{
|
||||
nDuration += 5;
|
||||
}
|
||||
|
||||
//Check to see if the caster has Lasting Impression and increase duration.
|
||||
if(GetHasFeat(FEAT_EPIC_LASTING_INSPIRATION))
|
||||
{
|
||||
nDuration *= 10;
|
||||
}
|
||||
|
||||
//SpeakString("Level: " + IntToString(nLevel) + " Ranks: " + IntToString(nRanks));
|
||||
|
||||
if(nPerform >= 100 && nLevel >= 30)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 48;
|
||||
nAC = 7;
|
||||
nSkill = 19;
|
||||
}
|
||||
else if(nPerform >= 95 && nLevel >= 29)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 46;
|
||||
nAC = 6;
|
||||
nSkill = 18;
|
||||
}
|
||||
else if(nPerform >= 90 && nLevel >= 28)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 44;
|
||||
nAC = 6;
|
||||
nSkill = 17;
|
||||
}
|
||||
else if(nPerform >= 85 && nLevel >= 27)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 42;
|
||||
nAC = 6;
|
||||
nSkill = 16;
|
||||
}
|
||||
else if(nPerform >= 80 && nLevel >= 26)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 40;
|
||||
nAC = 6;
|
||||
nSkill = 15;
|
||||
}
|
||||
else if(nPerform >= 75 && nLevel >= 25)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 38;
|
||||
nAC = 6;
|
||||
nSkill = 14;
|
||||
}
|
||||
else if(nPerform >= 70 && nLevel >= 24)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 36;
|
||||
nAC = 5;
|
||||
nSkill = 13;
|
||||
}
|
||||
else if(nPerform >= 65 && nLevel >= 23)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 34;
|
||||
nAC = 5;
|
||||
nSkill = 12;
|
||||
}
|
||||
else if(nPerform >= 60 && nLevel >= 22)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 32;
|
||||
nAC = 5;
|
||||
nSkill = 11;
|
||||
}
|
||||
else if(nPerform >= 55 && nLevel >= 21)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 30;
|
||||
nAC = 5;
|
||||
nSkill = 9;
|
||||
}
|
||||
else if(nPerform >= 50 && nLevel >= 20)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 28;
|
||||
nAC = 5;
|
||||
nSkill = 8;
|
||||
}
|
||||
else if(nPerform >= 45 && nLevel >= 19)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 26;
|
||||
nAC = 5;
|
||||
nSkill = 7;
|
||||
}
|
||||
else if(nPerform >= 40 && nLevel >= 18)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 24;
|
||||
nAC = 5;
|
||||
nSkill = 6;
|
||||
}
|
||||
else if(nPerform >= 35 && nLevel >= 17)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 22;
|
||||
nAC = 5;
|
||||
nSkill = 5;
|
||||
}
|
||||
else if(nPerform >= 30 && nLevel >= 16)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 20;
|
||||
nAC = 5;
|
||||
nSkill = 4;
|
||||
}
|
||||
else if(nPerform >= 24 && nLevel >= 15)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 2;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 16;
|
||||
nAC = 4;
|
||||
nSkill = 3;
|
||||
}
|
||||
else if(nPerform >= 21 && nLevel >= 14)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 16;
|
||||
nAC = 3;
|
||||
nSkill = 2;
|
||||
}
|
||||
else if(nPerform >= 18 && nLevel >= 11)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 8;
|
||||
nAC = 2;
|
||||
nSkill = 2;
|
||||
}
|
||||
else if(nPerform >= 15 && nLevel >= 8)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 8;
|
||||
nAC = 0;
|
||||
nSkill = 1;
|
||||
}
|
||||
else if(nPerform >= 12 && nLevel >= 6)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 1;
|
||||
}
|
||||
else if(nPerform >= 9 && nLevel >= 3)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
else if(nPerform >= 6 && nLevel >= 2)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 1;
|
||||
nWill = 1;
|
||||
nFort = 0;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
else if(nPerform >= 3 && nLevel >= 1)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 1;
|
||||
nWill = 0;
|
||||
nFort = 0;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BARD_SONG);
|
||||
effect eLink;
|
||||
|
||||
eAttack = EffectAttackIncrease(nAttack);
|
||||
eDamage = EffectDamageIncrease(nDamage, DAMAGE_TYPE_BLUDGEONING);
|
||||
|
||||
|
||||
if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn"))
|
||||
{
|
||||
eLink = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
}
|
||||
|
||||
if(nWill > 0)
|
||||
{
|
||||
eWill = EffectSavingThrowIncrease(SAVING_THROW_WILL, nWill);
|
||||
eLink = EffectLinkEffects(eLink, eWill);
|
||||
}
|
||||
if(nFort > 0)
|
||||
{
|
||||
eFort = EffectSavingThrowIncrease(SAVING_THROW_FORT, nFort);
|
||||
eLink = EffectLinkEffects(eLink, eFort);
|
||||
}
|
||||
if(nReflex > 0)
|
||||
{
|
||||
eReflex = EffectSavingThrowIncrease(SAVING_THROW_REFLEX, nReflex);
|
||||
eLink = EffectLinkEffects(eLink, eReflex);
|
||||
}
|
||||
if(nHP > 0)
|
||||
{
|
||||
//SpeakString("HP Bonus " + IntToString(nHP));
|
||||
eHP = EffectTemporaryHitpoints(nHP);
|
||||
// eLink = EffectLinkEffects(eLink, eHP);
|
||||
}
|
||||
if(nAC > 0)
|
||||
{
|
||||
eAC = EffectACIncrease(nAC, AC_DODGE_BONUS);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
}
|
||||
if(nSkill > 0)
|
||||
{
|
||||
eSkill = EffectSkillIncrease(SKILL_ALL_SKILLS, nSkill);
|
||||
eLink = EffectLinkEffects(eLink, eSkill);
|
||||
}
|
||||
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
|
||||
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF));
|
||||
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
|
||||
eHP = ExtraordinaryEffect(eHP);
|
||||
eLink = ExtraordinaryEffect(eLink);
|
||||
|
||||
int nRace;
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
// * GZ Oct 2003: If we are silenced, we can not benefit from bard song
|
||||
if (!PRCGetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !PRCGetHasEffect(EFFECT_TYPE_DEAF,oTarget))
|
||||
{
|
||||
RemoveSongEffects(GetSpellId(),OBJECT_SELF,oTarget);
|
||||
nRace = MyPRCGetRacialType(oTarget);
|
||||
|
||||
// Undead and Constructs are immune to mind effecting abilities.
|
||||
// A bard with requiem can effect undead
|
||||
if ((nRace == RACIAL_TYPE_UNDEAD && GetHasFeat(FEAT_REQUIEM, OBJECT_SELF)) || (nRace != RACIAL_TYPE_UNDEAD && nRace != RACIAL_TYPE_CONSTRUCT) || GetIsWarforged(oTarget))
|
||||
{
|
||||
// Even with requiem, they have half duration
|
||||
if (nRace == RACIAL_TYPE_UNDEAD) nDuration /= 2;
|
||||
|
||||
if(oTarget == OBJECT_SELF)
|
||||
{
|
||||
effect eLinkBard = EffectLinkEffects(eLink, eVis);
|
||||
eLinkBard = ExtraordinaryEffect(eLinkBard);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLinkBard, oTarget, RoundsToSeconds(nDuration));
|
||||
//StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration);
|
||||
if (nHP > 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn"))
|
||||
{
|
||||
ApplyDragonfire(nAttack, nDuration, OBJECT_SELF, OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
else if(GetIsFriend(oTarget))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
//StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration);
|
||||
if (nHP > 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
if(GetLocalInt(OBJECT_SELF, "DragonFireInspOn"))
|
||||
{
|
||||
ApplyDragonfire(nAttack, nDuration, oTarget, OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
|
||||
//:: Crystal Echoblade
|
||||
effect eEffect = GetFirstEffect(OBJECT_SELF);
|
||||
|
||||
//:: Prevent stacking
|
||||
while(GetIsEffectValid(eEffect))
|
||||
{
|
||||
if(GetEffectTag(eEffect) == "Echoblade")
|
||||
RemoveEffect(OBJECT_SELF, eEffect);
|
||||
eEffect = GetNextEffect(OBJECT_SELF);
|
||||
}
|
||||
|
||||
if(IPGetHasItemPropertyByConst(ITEM_PROPERTY_ECHOBLADE, GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF)) || //:: 104/*ITEM_PROPERTY_ECHOBLADE*/
|
||||
(IPGetHasItemPropertyByConst(ITEM_PROPERTY_ECHOBLADE, GetItemInSlot(INVENTORY_SLOT_LEFTHAND, OBJECT_SELF))))
|
||||
{
|
||||
int nSonic = IPGetDamageBonusConstantFromNumber(nLevel / 2);
|
||||
effect eEchoblade = EffectDamageIncrease(nSonic, DAMAGE_TYPE_SONIC);
|
||||
eEchoblade = ExtraordinaryEffect(eEchoblade);
|
||||
eEchoblade = TagEffect(eEchoblade, "Echoblade");
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEchoblade, OBJECT_SELF, RoundsToSeconds(nDuration));
|
||||
}
|
||||
}
|
||||
BIN
_content/prc8_battle_top/nw_s2_wildshape.ncs
Normal file
BIN
_content/prc8_battle_top/nw_s2_wildshape.ncs
Normal file
Binary file not shown.
235
_content/prc8_battle_top/nw_s2_wildshape.nss
Normal file
235
_content/prc8_battle_top/nw_s2_wildshape.nss
Normal file
@@ -0,0 +1,235 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
|
||||
Updated: Sept 30 2003, Georg Z.
|
||||
* Made Armor merge with druid to make forms
|
||||
more useful.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 15th-16th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Modified to insure no shapeshifting spells are castable upon
|
||||
mounted targets. This prevents problems that can occur due
|
||||
to dismounting after shape shifting, or other issues that can
|
||||
occur due to preserved appearances getting out of synch.
|
||||
|
||||
This can additional check can be disabled by setting the variable
|
||||
X3_NO_SHAPESHIFT_SPELL_CHECK to 1 on the module object. If this
|
||||
variable is set then this script will function as it did prior to
|
||||
this modification.
|
||||
|
||||
*/
|
||||
|
||||
//#include "x3_inc_horse"
|
||||
#include "prc_alterations"
|
||||
#include "pnp_shft_poly"
|
||||
|
||||
void wild_shape_shift(object oPC, int nShape)
|
||||
{
|
||||
string sResRef = Get2DACache("prc_polymorph", "ResRef", nShape);
|
||||
StoreCurrentAppearanceAsTrueAppearance(oPC, TRUE);
|
||||
ShiftIntoResRef(oPC, SHIFTER_TYPE_DRUID, sResRef);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
object oPC = OBJECT_SELF;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
+ GetLevelByClass(CLASS_TYPE_ARCANE_HIEROPHANT, oPC);
|
||||
if (!GetLocalInt(GetModule(),"X3_NO_SHAPESHIFT_SPELL_CHECK"))
|
||||
{ // check to see if abort due to being mounted
|
||||
if (PRCHorseGetIsMounted(oTarget))
|
||||
{ // abort
|
||||
if (GetIsPC(oTarget)) FloatingTextStrRefOnCreature(111982,oTarget,FALSE);
|
||||
return;
|
||||
} // abort
|
||||
} // check to see if abort due to being mounted
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//this command will make shore that polymorph plays nice with the shifter
|
||||
ShifterCheck(OBJECT_SELF);
|
||||
|
||||
int nShape = GetPersistantLocalInt(oPC, PRC_PNP_SHIFTING + IntToString(nSpell));
|
||||
if(nShape > 0)
|
||||
{
|
||||
wild_shape_shift(oPC, nShape);
|
||||
return;
|
||||
}
|
||||
|
||||
// Extra stuff using those rings Vic put in
|
||||
|
||||
string leftring = GetTag(GetItemInSlot(INVENTORY_SLOT_LEFTRING));
|
||||
string rightring = GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTRING));
|
||||
|
||||
|
||||
// checks that the ring which has been detected is one of the druid rings, if it is not the below checks will be skipped
|
||||
if(TestStringAgainstPattern("fr_wilds_**", leftring) || (TestStringAgainstPattern("fr_wilds_**", rightring)))
|
||||
{
|
||||
if((leftring == "fr_wilds_wolf") || (rightring == "fr_wilds_wolf"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_WOLF;
|
||||
}
|
||||
else if((leftring == "fr_wilds_badger") || (rightring == "fr_wilds_badger"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BADGER;
|
||||
}
|
||||
else if((leftring == "fr_wilds_boar") || (rightring == "fr_wilds_boar"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BOAR;
|
||||
}
|
||||
else if((leftring == "fr_wilds_brbear") || (rightring == "fr_wilds_brbear"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
|
||||
}
|
||||
else if((leftring == "fr_wilds_chicken") || (rightring == "fr_wilds_chicken"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_CHICKEN;
|
||||
}
|
||||
else if((leftring == "fr_wilds_cow") || (rightring == "fr_wilds_cow"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_COW;
|
||||
}
|
||||
else if((leftring == "fr_not_in_use") || (rightring == "fr_not_in_use"))
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_PENGUIN;
|
||||
}
|
||||
}
|
||||
else
|
||||
// end of extra stuff, we don't have a ring so it's "else" into the normal script
|
||||
|
||||
int nShape = GetPersistantLocalInt(oPC, PRC_PNP_SHIFTING + IntToString(nSpell));
|
||||
if(nShape > 0)
|
||||
{
|
||||
wild_shape_shift(oPC, nShape);
|
||||
return;
|
||||
}
|
||||
|
||||
//Determine Polymorph subradial type
|
||||
if(nSpell == 401)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 402)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_PANTHER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 403)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_WOLF;
|
||||
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_WOLF;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 404)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BOAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BOAR;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 405)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BADGER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BADGER;
|
||||
}
|
||||
}
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
ePoly = ExtraordinaryEffect(ePoly);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
int bWeapon = StringToInt(Get2DACache("polymorph","MergeW",nPoly)) == 1;
|
||||
int bArmor = StringToInt(Get2DACache("polymorph","MergeA",nPoly)) == 1;
|
||||
int bItems = StringToInt(Get2DACache("polymorph","MergeI",nPoly)) == 1;
|
||||
|
||||
object oWeaponOld = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorOld = GetItemInSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
|
||||
object oRing1Old = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
|
||||
object oRing2Old = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,OBJECT_SELF);
|
||||
object oAmuletOld = GetItemInSlot(INVENTORY_SLOT_NECK,OBJECT_SELF);
|
||||
object oCloakOld = GetItemInSlot(INVENTORY_SLOT_CLOAK,OBJECT_SELF);
|
||||
object oBootsOld = GetItemInSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
|
||||
object oBeltOld = GetItemInSlot(INVENTORY_SLOT_BELT,OBJECT_SELF);
|
||||
object oHelmetOld = GetItemInSlot(INVENTORY_SLOT_HEAD,OBJECT_SELF);
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,OBJECT_SELF);
|
||||
if (GetIsObjectValid(oShield))
|
||||
{
|
||||
if (GetBaseItemType(oShield) !=BASE_ITEM_LARGESHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_SMALLSHIELD &&
|
||||
GetBaseItemType(oShield) !=BASE_ITEM_TOWERSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
ClearAllActions(); // prevents an exploit
|
||||
|
||||
|
||||
if (GetEssentiaInvestedFeat(OBJECT_SELF, FEAT_AZURE_WILD_SHAPE))
|
||||
ePoly = EffectLinkEffects(ePoly, EffectDamageIncrease(IPGetDamageBonusConstantFromNumber(GetEssentiaInvestedFeat(OBJECT_SELF, FEAT_AZURE_WILD_SHAPE)), DAMAGE_TYPE_BASE_WEAPON));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
|
||||
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
if (bWeapon)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
}
|
||||
if (bArmor)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
}
|
||||
if (bItems)
|
||||
{
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
}
|
||||
|
||||
DelayCommand(1.5,ActionCastSpellOnSelf(SPELL_SHAPE_INCREASE_DAMAGE));
|
||||
}
|
||||
BIN
_content/prc8_battle_top/x2_s2_cursesong.ncs
Normal file
BIN
_content/prc8_battle_top/x2_s2_cursesong.ncs
Normal file
Binary file not shown.
444
_content/prc8_battle_top/x2_s2_cursesong.nss
Normal file
444
_content/prc8_battle_top/x2_s2_cursesong.nss
Normal file
@@ -0,0 +1,444 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Curse Song
|
||||
//:: X2_S2_CurseSong
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
This spells applies penalties to all of the
|
||||
bard's enemies within 30ft for a set duration of
|
||||
10 rounds.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Andrew Nobbs
|
||||
//:: Created On: May 16, 2003
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Andrew Nobbs May 20, 2003
|
||||
|
||||
#include "prc_inc_clsfunc"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (!GetHasFeat(FEAT_BARD_SONGS, OBJECT_SELF))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(85587,OBJECT_SELF); // no more bardsong uses left
|
||||
return;
|
||||
}
|
||||
|
||||
if (PRCGetHasEffect(EFFECT_TYPE_SILENCE,OBJECT_SELF))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(85764,OBJECT_SELF); // not useable when silenced
|
||||
return;
|
||||
}
|
||||
|
||||
string sTag = GetTag(OBJECT_SELF);
|
||||
|
||||
// Songbird sings wooo!
|
||||
object oSongbird=GetLocalObject(OBJECT_SELF,"oSongbird");
|
||||
if (GetIsObjectValid(oSongbird)&&!GetIsDead(oSongbird)&&(GetArea(oSongbird)==GetArea(OBJECT_SELF)))
|
||||
{
|
||||
effect FeySong = EffectVisualEffect(VFX_DUR_BARD_SONG);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, FeySong, oSongbird,6.0);
|
||||
|
||||
AssignCommand(oSongbird,PlaySound("sce_neutral"));
|
||||
|
||||
}
|
||||
//RemoveOldSongEffects(OBJECT_SELF,GetSpellId());
|
||||
|
||||
//Declare major variables
|
||||
int nLevel = GetLevelByClass(CLASS_TYPE_BARD) +
|
||||
GetLevelByClass(CLASS_TYPE_MINSTREL_EDGE)/2 +
|
||||
GetLevelByClass(CLASS_TYPE_DIRGESINGER) +
|
||||
+GetLevelByClass(CLASS_TYPE_HARPER);
|
||||
GetLevelByClass(CLASS_TYPE_VIRTUOSO);
|
||||
|
||||
int nRanks = GetSkillRank(SKILL_PERFORM);
|
||||
if (GetHasFeat(FEAT_DRAGONSONG, OBJECT_SELF)) nRanks+= 2;
|
||||
int nPerform = nRanks;
|
||||
int nDuration = 10; //+ nChr;
|
||||
|
||||
effect eAttack;
|
||||
effect eDamage;
|
||||
effect eWill;
|
||||
effect eFort;
|
||||
effect eReflex;
|
||||
effect eHP;
|
||||
effect eAC;
|
||||
effect eSkill;
|
||||
|
||||
int nAttack;
|
||||
int nDamage;
|
||||
int nWill;
|
||||
int nFort;
|
||||
int nReflex;
|
||||
int nHP;
|
||||
int nAC;
|
||||
int nSkill;
|
||||
//Check to see if the caster has Lasting Impression and increase duration.
|
||||
if(GetHasFeat(870))
|
||||
{
|
||||
nDuration *= 10;
|
||||
}
|
||||
|
||||
if(GetHasFeat(424)) // lingering song
|
||||
{
|
||||
nDuration += 5;
|
||||
}
|
||||
|
||||
|
||||
// bardy gloves Palmer made
|
||||
if (GetTag(GetItemInSlot(INVENTORY_SLOT_ARMS))=="jw_newitem2")
|
||||
{
|
||||
SendMessageToPC(OBJECT_SELF,"The elven gloves of the bard boost the power of your song.");
|
||||
nPerform=nPerform+6;
|
||||
nLevel=nLevel+3;
|
||||
}
|
||||
|
||||
|
||||
if(nPerform >= 100 && nLevel >= 30)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 48;
|
||||
nAC = 7;
|
||||
nSkill = 18;
|
||||
}
|
||||
else if(nPerform >= 95 && nLevel >= 29)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 46;
|
||||
nAC = 6;
|
||||
nSkill = 17;
|
||||
}
|
||||
else if(nPerform >= 90 && nLevel >= 28)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 44;
|
||||
nAC = 6;
|
||||
nSkill = 16;
|
||||
}
|
||||
else if(nPerform >= 85 && nLevel >= 27)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 42;
|
||||
nAC = 6;
|
||||
nSkill = 15;
|
||||
}
|
||||
else if(nPerform >= 80 && nLevel >= 26)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 40;
|
||||
nAC = 6;
|
||||
nSkill = 14;
|
||||
}
|
||||
else if(nPerform >= 75 && nLevel >= 25)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 38;
|
||||
nAC = 6;
|
||||
nSkill = 13;
|
||||
}
|
||||
else if(nPerform >= 70 && nLevel >= 24)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 36;
|
||||
nAC = 5;
|
||||
nSkill = 12;
|
||||
}
|
||||
else if(nPerform >= 65 && nLevel >= 23)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 34;
|
||||
nAC = 5;
|
||||
nSkill = 11;
|
||||
}
|
||||
else if(nPerform >= 60 && nLevel >= 22)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 32;
|
||||
nAC = 5;
|
||||
nSkill = 10;
|
||||
}
|
||||
else if(nPerform >= 55 && nLevel >= 21)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 30;
|
||||
nAC = 5;
|
||||
nSkill = 9;
|
||||
}
|
||||
else if(nPerform >= 50 && nLevel >= 20)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 28;
|
||||
nAC = 5;
|
||||
nSkill = 8;
|
||||
}
|
||||
else if(nPerform >= 45 && nLevel >= 19)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 26;
|
||||
nAC = 5;
|
||||
nSkill = 7;
|
||||
}
|
||||
else if(nPerform >= 40 && nLevel >= 18)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 24;
|
||||
nAC = 5;
|
||||
nSkill = 6;
|
||||
}
|
||||
else if(nPerform >= 35 && nLevel >= 17)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 22;
|
||||
nAC = 5;
|
||||
nSkill = 5;
|
||||
}
|
||||
else if(nPerform >= 30 && nLevel >= 16)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 3;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 20;
|
||||
nAC = 5;
|
||||
nSkill = 4;
|
||||
}
|
||||
else if(nPerform >= 24 && nLevel >= 15)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 2;
|
||||
nFort = 2;
|
||||
nReflex = 2;
|
||||
nHP = 16;
|
||||
nAC = 4;
|
||||
nSkill = 3;
|
||||
}
|
||||
else if(nPerform >= 21 && nLevel >= 14)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 3;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 16;
|
||||
nAC = 3;
|
||||
nSkill = 2;
|
||||
}
|
||||
else if(nPerform >= 18 && nLevel >= 11)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 8;
|
||||
nAC = 2;
|
||||
nSkill = 2;
|
||||
}
|
||||
else if(nPerform >= 15 && nLevel >= 8)
|
||||
{
|
||||
nAttack = 2;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 8;
|
||||
nAC = 0;
|
||||
nSkill = 1;
|
||||
}
|
||||
else if(nPerform >= 12 && nLevel >= 6)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 1;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 1;
|
||||
}
|
||||
else if(nPerform >= 9 && nLevel >= 3)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 2;
|
||||
nWill = 1;
|
||||
nFort = 1;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
else if(nPerform >= 6 && nLevel >= 2)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 1;
|
||||
nWill = 1;
|
||||
nFort = 0;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
else if(nPerform >= 3 && nLevel >= 1)
|
||||
{
|
||||
nAttack = 1;
|
||||
nDamage = 1;
|
||||
nWill = 0;
|
||||
nFort = 0;
|
||||
nReflex = 0;
|
||||
nHP = 0;
|
||||
nAC = 0;
|
||||
nSkill = 0;
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
||||
|
||||
eAttack = EffectAttackDecrease(nAttack);
|
||||
eDamage = EffectDamageDecrease(nDamage, DAMAGE_TYPE_BLUDGEONING|DAMAGE_TYPE_PIERCING|DAMAGE_TYPE_SLASHING);
|
||||
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
|
||||
if(nWill > 0)
|
||||
{
|
||||
eWill = EffectSavingThrowDecrease(SAVING_THROW_WILL, nWill);
|
||||
eLink = EffectLinkEffects(eLink, eWill);
|
||||
}
|
||||
if(nFort > 0)
|
||||
{
|
||||
eFort = EffectSavingThrowDecrease(SAVING_THROW_FORT, nFort);
|
||||
eLink = EffectLinkEffects(eLink, eFort);
|
||||
}
|
||||
if(nReflex > 0)
|
||||
{
|
||||
eReflex = EffectSavingThrowDecrease(SAVING_THROW_REFLEX, nReflex);
|
||||
eLink = EffectLinkEffects(eLink, eReflex);
|
||||
}
|
||||
if(nAC > 0)
|
||||
{
|
||||
eAC = EffectACDecrease(nAC, AC_DODGE_BONUS);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
}
|
||||
if(nSkill > 0)
|
||||
{
|
||||
eSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nSkill);
|
||||
eLink = EffectLinkEffects(eLink, eSkill);
|
||||
}
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eDur2 = EffectVisualEffect(507);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_SONIC);
|
||||
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, GetLocation(OBJECT_SELF));
|
||||
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
|
||||
eHP = ExtraordinaryEffect(eHP);
|
||||
eLink = ExtraordinaryEffect(eLink);
|
||||
|
||||
string sCurseSongHP = "CURSE_SONG_HP_" + ObjectToString(OBJECT_SELF);
|
||||
|
||||
RemoveSongEffects(GetSpellId(),OBJECT_SELF,OBJECT_SELF);
|
||||
|
||||
float fDelay;
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
// * GZ Oct 2003: If we are deaf, we do not have negative effects from curse song
|
||||
if (!PRCGetHasEffect(EFFECT_TYPE_SILENCE,oTarget) && !PRCGetHasEffect(EFFECT_TYPE_DEAF,oTarget))
|
||||
{
|
||||
RemoveSongEffects(GetSpellId(),OBJECT_SELF,oTarget);
|
||||
int nRace = MyPRCGetRacialType(oTarget);
|
||||
|
||||
// Undead and Constructs are immune to mind effecting abilities.
|
||||
// A bard with requiem can effect undead
|
||||
if ((nRace == RACIAL_TYPE_UNDEAD && GetHasFeat(FEAT_REQUIEM, OBJECT_SELF)) || nRace != RACIAL_TYPE_UNDEAD && nRace != RACIAL_TYPE_CONSTRUCT || GetIsWarforged(oTarget))
|
||||
{
|
||||
// Even with requiem, they have half duration
|
||||
if (nRace == RACIAL_TYPE_UNDEAD) nDuration /= 2;
|
||||
|
||||
if (nHP > 0 && !GetLocalInt(oTarget, sCurseSongHP))
|
||||
{
|
||||
eHP = PRCEffectDamage(oTarget, nHP, DAMAGE_TYPE_SONIC, DAMAGE_POWER_NORMAL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SONIC), oTarget);
|
||||
DelayCommand(0.01, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHP, oTarget));
|
||||
SetLocalInt(oTarget, sCurseSongHP, TRUE);
|
||||
DelayCommand(RoundsToSeconds(nDuration),DeleteLocalInt(oTarget, sCurseSongHP));
|
||||
}
|
||||
|
||||
if (!GetIsDead(oTarget))
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
DelayCommand(PRCGetRandomDelay(0.1,0.5), ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
//StoreSongRecipient(oTarget, OBJECT_SELF, GetSpellId(), nDuration);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
DecrementRemainingFeatUses(OBJECT_SELF, FEAT_BARD_SONGS);
|
||||
}
|
||||
Reference in New Issue
Block a user