Initial Upload
Initial Upload
This commit is contained in:
BIN
_removed files/nw_s0_aid.ncs
Normal file
BIN
_removed files/nw_s0_aid.ncs
Normal file
Binary file not shown.
65
_removed files/nw_s0_aid.nss
Normal file
65
_removed files/nw_s0_aid.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Aid
|
||||
//:: NW_S0_Aid.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target creature gains +1 to attack rolls and
|
||||
saves vs fear. Also gain +1d8 temporary HP.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk Modified by Tab, Realms of Trinity
|
||||
//:: Created On: Sept 6, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
void RemoveEffectsFromSpell(object oTarget, int SpellID)
|
||||
{
|
||||
effect eLook = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eLook)) {
|
||||
if (GetEffectSpellId(eLook) == SpellID)
|
||||
RemoveEffect(oTarget, eLook);
|
||||
eLook = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nBonus = d8(1);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nBonus = 8;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nBonus = nBonus + (nBonus/2); //Damage/Healing is +50%
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
effect eAttack = EffectAttackIncrease(1);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
|
||||
|
||||
effect eHP = EffectTemporaryHitpoints(nBonus);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
object oTarget = GetSpellTargetObject();
|
||||
|
||||
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_AID, FALSE));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
RemoveEffectsFromSpell(OBJECT_SELF,SPELL_AID);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, TurnsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_bless.ncs
Normal file
BIN
_removed files/nw_s0_bless.ncs
Normal file
Binary file not shown.
101
_removed files/nw_s0_bless.nss
Normal file
101
_removed files/nw_s0_bless.nss
Normal file
@@ -0,0 +1,101 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bless
|
||||
//:: NW_S0_Bless.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All allies within 30ft of the caster gain a
|
||||
+1 attack bonus and a +1 save bonus vs fear
|
||||
effects
|
||||
|
||||
also can be cast on crossbow bolts to bless them
|
||||
in order to slay rakshasa
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 24, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Added Bless item ability: Georg Z, On: June 20, 2001
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = 1 + GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
// ---------------- TARGETED ON BOLT -------------------
|
||||
if(GetIsObjectValid(oTarget) && GetObjectType(oTarget) == OBJECT_TYPE_ITEM)
|
||||
{
|
||||
// special handling for blessing crossbow bolts that can slay rakshasa's
|
||||
if (GetBaseItemType(oTarget) == BASE_ITEM_BOLT)
|
||||
{
|
||||
SignalEvent(GetItemPossessor(oTarget), EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
|
||||
IPSafeAddItemProperty(oTarget, ItemPropertyOnHitCastSpell(123,1), RoundsToSeconds(nDuration), X2_IP_ADDPROP_POLICY_KEEP_EXISTING );
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, GetItemPossessor(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDur, GetItemPossessor(oTarget), TurnsToSeconds(nDuration));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||
effect eAttack = EffectAttackIncrease(1);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
|
||||
|
||||
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
float fDelay;
|
||||
//Metamagic duration check
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//Apply Impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
|
||||
//Get the first target in the radius around the caster
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.4, 1.1);
|
||||
//Fire spell cast at event for target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_BLESS, FALSE));
|
||||
//Apply VFX impact and bonus effects
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)));
|
||||
}
|
||||
//Get the next target in the specified area around the caster
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_divpower.ncs
Normal file
BIN
_removed files/nw_s0_divpower.ncs
Normal file
Binary file not shown.
117
_removed files/nw_s0_divpower.nss
Normal file
117
_removed files/nw_s0_divpower.nss
Normal file
@@ -0,0 +1,117 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Divine Power
|
||||
//:: NW_S0_DivPower.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Divine Power
|
||||
Evocation
|
||||
Level: Clr 4, War 4
|
||||
Components: V, S, DF
|
||||
Casting Time: 1 action
|
||||
Range: Personal
|
||||
Target: The character
|
||||
Duration: 1 round/level
|
||||
The character gains the base attack bonus of a fighter of the character's
|
||||
total character level, an enhancement bonus to Strength sufficient to raise
|
||||
the character's Strength score to 18 (if it is not already 18 or higher),
|
||||
and 1 temporary hit point per level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 21, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
bugfix by Kovi 2002.07.22
|
||||
- temporary hp was stacked
|
||||
- loosing temporary hp resulted in loosing the other bonuses
|
||||
- number of attacks was not increased (should have been a BAB increase)
|
||||
still problem:
|
||||
~ attacks are better still approximation (the additional attack is at full BAB)
|
||||
~ attack/ability bonuses count against the limits
|
||||
*/
|
||||
/*
|
||||
Fixed by StoneDK 2003.12.19
|
||||
to work better for epic levels and give right number of attacks.
|
||||
Still give extra attack at full ab.
|
||||
*/
|
||||
|
||||
#include "nw_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
void main()
|
||||
{
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
|
||||
//Stop stacking
|
||||
RemoveEffectsFromSpell(OBJECT_SELF, SPELL_DIVINE_POWER);
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nHP = nLevel;
|
||||
int nAttack = nLevel - ((nLevel*3)/4);
|
||||
int nExtraAttacks = 0;
|
||||
int nBAB =GetBaseAttackBonus(OBJECT_SELF);
|
||||
if(GetHitDice(OBJECT_SELF)>20)
|
||||
{
|
||||
//EAB = (lvl-21)/2+1; lvl 40 = 10, (40-21)/2+1= 10; lvl 21 = 1, (21-21)/2+1 = 1
|
||||
nBAB = nBAB - ((GetHitDice(OBJECT_SELF)-21)/2+1);
|
||||
if(nAttack>5)
|
||||
nAttack =5;
|
||||
if(nAttack> (20-nBAB))
|
||||
//Problem if 10 rogue (7BAB)/10 fighter (10BAB)/20 cleric (10EAB),
|
||||
//should get 0 AB bonus, gets 3
|
||||
nAttack =20-nBAB;
|
||||
}
|
||||
//returns the number of attacks that a cleric should have extra were he a fighter
|
||||
//Number of attacks = (BAB-1)/5+1
|
||||
if(nBAB <16) // If not already have 4 attacks calculate new number of attacks.
|
||||
nExtraAttacks = (nBAB+ nAttack -1 )/5 - (nBAB -1 )/5;
|
||||
int nStr = GetAbilityScore(oTarget, ABILITY_STRENGTH);
|
||||
int nStrength = (nStr - 18) * -1;
|
||||
if(nStrength < 0)
|
||||
{
|
||||
nStrength = 0;
|
||||
}
|
||||
effect eAttackMod;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
|
||||
effect eStrength = EffectAbilityIncrease(ABILITY_STRENGTH, nStrength);
|
||||
effect eHP = EffectTemporaryHitpoints(nHP);
|
||||
effect eAttack = EffectAttackIncrease(nAttack);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eAttack, eDur);
|
||||
if(nExtraAttacks >0)
|
||||
{
|
||||
eAttackMod = EffectModifyAttacks(nExtraAttacks);
|
||||
eLink = EffectLinkEffects(eLink, eAttackMod);
|
||||
}
|
||||
//Make sure that the strength modifier is a bonus
|
||||
if(nStrength > 0)
|
||||
{
|
||||
eLink = EffectLinkEffects(eLink, eStrength);
|
||||
}
|
||||
//Meta-Magic
|
||||
if(nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nLevel *= 2;
|
||||
}
|
||||
//RemoveTempHitPoints();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DIVINE_POWER, FALSE));
|
||||
//Apply Link and VFX effects to the target
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nLevel));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, RoundsToSeconds(nLevel));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_findtrap.ncs
Normal file
BIN
_removed files/nw_s0_findtrap.ncs
Normal file
Binary file not shown.
48
_removed files/nw_s0_findtrap.nss
Normal file
48
_removed files/nw_s0_findtrap.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Find Traps
|
||||
//:: NW_S0_FindTrap
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Finds and removes all traps within 30m.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
// Modified Feb 2003 by Zanshin
|
||||
// WHAT THE FUCK WAS BIOWARE THINKING?
|
||||
// NO checks for trap DC, no checks for detectable or
|
||||
// disarmable. Jesus fuck!
|
||||
// Anyway, I give the caster d20 + his DC for
|
||||
// the spell vs. Detect DC and Disarm DC seperately.
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
|
||||
int nCnt = 1;
|
||||
object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||
while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0)
|
||||
{
|
||||
if(GetIsTrapped(oTrap))
|
||||
{
|
||||
int iDisarmDC=GetTrapDisarmDC(oTrap);
|
||||
int iSaveDC=GetSpellSaveDC();
|
||||
int iDetectDC=GetTrapDetectDC(oTrap);
|
||||
if ((d20()+iSaveDC) > iDetectDC && GetTrapDetectable(oTrap))
|
||||
SetTrapDetectedBy(oTrap, OBJECT_SELF);
|
||||
|
||||
if ((d20()+iSaveDC) > iDisarmDC && GetTrapDisarmable(oTrap))
|
||||
{
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap));
|
||||
DelayCommand(2.0, SetTrapDisabled(oTrap));
|
||||
}
|
||||
else
|
||||
SendMessageToPC(OBJECT_SELF,"Failed to Disarm");
|
||||
}
|
||||
nCnt++;
|
||||
oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_gate.ncs
Normal file
BIN
_removed files/nw_s0_gate.ncs
Normal file
Binary file not shown.
73
_removed files/nw_s0_gate.nss
Normal file
73
_removed files/nw_s0_gate.nss
Normal file
@@ -0,0 +1,73 @@
|
||||
void CreateBalor()
|
||||
{
|
||||
CreateObject(OBJECT_TYPE_CREATURE, "balor_wild", GetSpellTargetLocation());
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
effect eSummon;
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_GATE);
|
||||
location lSpellTargetLOC = GetSpellTargetLocation();
|
||||
object oPC = GetLastSpellCaster();
|
||||
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
if(GetHasSpellEffect(SPELL_PROTECTION_FROM_EVIL) ||
|
||||
GetHasSpellEffect(SPELL_MAGIC_CIRCLE_AGAINST_EVIL) ||
|
||||
GetHasSpellEffect(SPELL_HOLY_AURA))
|
||||
{
|
||||
|
||||
|
||||
if(GetItemPossessedBy(oPC,"chokey2")!= OBJECT_INVALID)
|
||||
{
|
||||
eSummon = EffectSummonCreature("fho_dragon",VFX_FNF_SUMMONDRAGON,1.0);
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
||||
return;
|
||||
}
|
||||
|
||||
else if(GetItemPossessedBy(oPC,"OHSKEY")!= OBJECT_INVALID)
|
||||
{
|
||||
eSummon = EffectSummonCreature("ohs_avatar",VFX_FNF_MYSTICAL_EXPLOSION,1.0);
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
||||
return;
|
||||
}
|
||||
|
||||
else if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD && GetAlignmentLawChaos(oPC) == ALIGNMENT_LAWFUL)
|
||||
{
|
||||
eSummon = EffectSummonCreature("good_avatar",VFX_FNF_SUMMON_CELESTIAL,1.0);
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
||||
return;
|
||||
}
|
||||
|
||||
else if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL && GetAlignmentLawChaos(oPC) == ALIGNMENT_CHAOTIC)
|
||||
{
|
||||
eSummon = EffectSummonCreature("evil_avatar",VFX_FNF_SUMMON_UNDEAD,1.0);
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
eSummon = EffectSummonCreature("balor_tame",VFX_FNF_SUMMON_GATE,1.0);
|
||||
float fSeconds = RoundsToSeconds(nDuration);
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, lSpellTargetLOC, fSeconds));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lSpellTargetLOC);
|
||||
DelayCommand(1.0, CreateBalor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
BIN
_removed files/nw_s0_hammgods.ncs
Normal file
BIN
_removed files/nw_s0_hammgods.ncs
Normal file
Binary file not shown.
90
_removed files/nw_s0_hammgods.nss
Normal file
90
_removed files/nw_s0_hammgods.nss
Normal file
@@ -0,0 +1,90 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hammer of the Gods
|
||||
//:: [NW_S0_HammGods.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Does 1d8 damage to all enemies within the
|
||||
//:: spells 20m radius and dazes them if a
|
||||
//:: Will save is failed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 21, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eDam;
|
||||
effect eDaze = EffectDazed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
float fDelay;
|
||||
int nDamageDice = nCasterLvl;
|
||||
if(nDamageDice == 0)
|
||||
{
|
||||
nDamageDice = 1;
|
||||
}
|
||||
//Limit caster level
|
||||
//if (nDamageDice > 10)
|
||||
// {
|
||||
// nDamageDice = 5;
|
||||
//}
|
||||
int nDamage;
|
||||
//Apply the holy strike VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation());
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make faction checks
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS));
|
||||
//Make SR Check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.6, 1.3);
|
||||
//Roll damage
|
||||
nDamage = d8(nDamageDice);
|
||||
//Make metamagic checks
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 8 * nDamageDice;
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 );
|
||||
}
|
||||
//Make a will save for half damage and negation of daze effect
|
||||
if (MySavingThrow(SAVING_THROW_WILL, oTarget, 45, SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply daze effect
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6())));
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE );
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in shape
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_hammgodsn.ncs
Normal file
BIN
_removed files/nw_s0_hammgodsn.ncs
Normal file
Binary file not shown.
90
_removed files/nw_s0_hammgodsn.nss
Normal file
90
_removed files/nw_s0_hammgodsn.nss
Normal file
@@ -0,0 +1,90 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hammer of the Gods
|
||||
//:: [NW_S0_HammGods.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Does 1d8 damage to all enemies within the
|
||||
//:: spells 20m radius and dazes them if a
|
||||
//:: Will save is failed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 21, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eDam;
|
||||
effect eDaze = EffectDazed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
float fDelay;
|
||||
int nDamageDice = nCasterLvl;
|
||||
if(nDamageDice == 0)
|
||||
{
|
||||
nDamageDice = 1;
|
||||
}
|
||||
//Limit caster level
|
||||
//if (nDamageDice > 10)
|
||||
// {
|
||||
// nDamageDice = 5;
|
||||
//}
|
||||
int nDamage;
|
||||
//Apply the holy strike VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, GetSpellTargetLocation());
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make faction checks
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS));
|
||||
//Make SR Check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.6, 1.3);
|
||||
//Roll damage
|
||||
nDamage = d8(nDamageDice);
|
||||
//Make metamagic checks
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 8 * nDamageDice;
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 );
|
||||
}
|
||||
//Make a will save for half damage and negation of daze effect
|
||||
if (MySavingThrow(SAVING_THROW_WILL, oTarget, 45, SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply daze effect
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6())));
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_DIVINE );
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in shape
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_harm.ncs
Normal file
BIN
_removed files/nw_s0_harm.ncs
Normal file
Binary file not shown.
71
_removed files/nw_s0_harm.nss
Normal file
71
_removed files/nw_s0_harm.nss
Normal file
@@ -0,0 +1,71 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Harm]
|
||||
//:: [NW_S0_Harm.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Reduces target to 1d4 HP on successful touch
|
||||
//:: attack. If the target is undead it is healed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Jan 18, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDamage, nHeal;
|
||||
int nCasterHD = GetHitDice(OBJECT_SELF);
|
||||
int nHarmDC = ((nCasterHD - 9) + GetSpellSaveDC());
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nHalfHp = GetMaxHitPoints(oTarget)/2;
|
||||
int nTouch = TouchAttackMelee(oTarget);
|
||||
effect eVis = EffectVisualEffect(246);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_G);
|
||||
effect eHeal, eDam;
|
||||
//Check that the target is undead
|
||||
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Figure out the amount of damage to heal
|
||||
nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
|
||||
//Set the heal effect
|
||||
eHeal = EffectHeal(nHeal);
|
||||
//Apply heal effect and VFX impact
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM, FALSE));
|
||||
}
|
||||
else if (nTouch) //== TRUE) 1 or 2 are valid return numbers from TouchAttackMelee
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HARM));
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget)&& !/*Fort Save*/ MySavingThrow(SAVING_THROW_FORT, oTarget, nHarmDC, SAVING_THROW_TYPE_NEGATIVE))
|
||||
{
|
||||
if ((GetCurrentHitPoints(oTarget)) > nHalfHp)
|
||||
{
|
||||
nDamage = GetCurrentHitPoints(oTarget)- nHalfHp;
|
||||
}
|
||||
else {nDamage = d6(8);}
|
||||
//Check for metamagic
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
if ((GetCurrentHitPoints(oTarget)) > nHalfHp)
|
||||
{
|
||||
nDamage = GetCurrentHitPoints(oTarget)- nHalfHp;
|
||||
}
|
||||
else {nDamage = d6(nCasterHD/2);}
|
||||
}
|
||||
eDam = EffectDamage(nDamage,DAMAGE_TYPE_NEGATIVE);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
_removed files/nw_s0_imprinvis.ncs
Normal file
BIN
_removed files/nw_s0_imprinvis.ncs
Normal file
Binary file not shown.
72
_removed files/nw_s0_imprinvis.nss
Normal file
72
_removed files/nw_s0_imprinvis.nss
Normal file
@@ -0,0 +1,72 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Improved Invisibility
|
||||
//:: NW_S0_ImprInvis.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target creature can attack and cast spells while
|
||||
invisible
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Gazman
|
||||
//:: Modified on: Dec 25, 2003
|
||||
//:: Modified for Forgotten Worlds PW
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_MIND);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY);
|
||||
effect eInvis = EffectInvisibility(INVISIBILITY_TYPE_NORMAL);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eCover = EffectConcealment(50);
|
||||
effect eLink = EffectLinkEffects(eDur, eInvis);
|
||||
// Removed the Link between the effects that cancel with attack and the effects that
|
||||
// should remain for duration
|
||||
effect eLink2 = EffectLinkEffects(eVis, eDur);
|
||||
eLink2 = EffectLinkEffects(eLink2, eCover);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPROVED_INVISIBILITY, FALSE));
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and effects for Invisibility
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
|
||||
// Applying Concealment effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, oTarget, TurnsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_knock.ncs
Normal file
BIN
_removed files/nw_s0_knock.ncs
Normal file
Binary file not shown.
33
_removed files/nw_s0_knock.nss
Normal file
33
_removed files/nw_s0_knock.nss
Normal file
@@ -0,0 +1,33 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Knock
|
||||
//:: NW_S0_Knock
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Opens doors not locked by magical means.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
#include "nw_i0_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 15.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
float fDelay;
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.5, 2.5);
|
||||
if(!GetLocked(oTarget))
|
||||
{
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
AssignCommand(oTarget, ActionUnlockObject(oTarget));
|
||||
}
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 15.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
||||
BIN
_removed files/nw_s0_premo.ncs
Normal file
BIN
_removed files/nw_s0_premo.ncs
Normal file
Binary file not shown.
64
_removed files/nw_s0_premo.nss
Normal file
64
_removed files/nw_s0_premo.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Premonition
|
||||
//:: NW_S0_Premo
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the gives the creature touched 30/+5
|
||||
damage reduction. This lasts for 1 hour per
|
||||
caster level or until 10 * Caster Level
|
||||
is dealt to the person.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 16 , 2001
|
||||
//:://///////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
#include "nw_i0_spells"
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
object oTarget = GetSpellTargetObject();
|
||||
|
||||
//Declare major variables
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nLimit = nDuration * 10;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_FIVE, nLimit);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_PREMONITION);
|
||||
//Link the visual and the damage reduction effect
|
||||
effect eLink = EffectLinkEffects(eStone, eVis);
|
||||
//Enter Metamagic conditions
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PREMONITION, FALSE));
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
if(nDuration>21)
|
||||
{
|
||||
effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_SEVEN, nLimit/2);
|
||||
}
|
||||
RemoveEffectsFromSpell(oTarget, SPELL_PREMONITION);
|
||||
//Apply the linked effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration));
|
||||
}
|
||||
BIN
_removed files/nw_s0_prisspray.ncs
Normal file
BIN
_removed files/nw_s0_prisspray.ncs
Normal file
Binary file not shown.
186
_removed files/nw_s0_prisspray.nss
Normal file
186
_removed files/nw_s0_prisspray.nss
Normal file
@@ -0,0 +1,186 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Prismatic Spray
|
||||
//:: [NW_S0_PrisSpray.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Sends out a prismatic cone that has a random
|
||||
//:: effect for each target struck.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Dec 19, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: Last Updated By: Aidan Scanlan On: April 11, 2001
|
||||
//:: Last Updated By: Preston Watamaniuk, On: June 11, 2001
|
||||
|
||||
// Modified by Olblach to conform 3rd Ed. PHB October, 9, 2003
|
||||
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget);
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nRandom;
|
||||
int nHD;
|
||||
int nVisual;
|
||||
effect eVisual;
|
||||
int bTwoEffects;
|
||||
//Set the delay to apply to effects based on the distance to the target
|
||||
float fDelay = 0.5 + GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Get first target in the spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 11.0, GetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PRISMATIC_SPRAY));
|
||||
//Make an SR check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay) && (oTarget != OBJECT_SELF))
|
||||
{
|
||||
//Blind the target if they are less than 9 HD
|
||||
nHD = GetHitDice(oTarget);
|
||||
if (nHD <= 8)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectBlindness(), oTarget, RoundsToSeconds(d4()+d4()));
|
||||
}
|
||||
//Determine if 1 or 2 effects are going to be applied
|
||||
nRandom = d8();
|
||||
if(nRandom == 8)
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget);
|
||||
nVisual = ApplyPrismaticEffect(Random(7) + 1, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Get the visual effect
|
||||
nVisual = ApplyPrismaticEffect(nRandom, oTarget);
|
||||
}
|
||||
//Set the visual effect
|
||||
if(nVisual != 0)
|
||||
{
|
||||
eVisual = EffectVisualEffect(nVisual);
|
||||
//Apply the visual effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in the spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 11.0, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ApplyPrismaticEffect
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/* Given a reference integer and a target, this function will apply the effect
|
||||
of corresponding prismatic cone to the target. To have any effect the
|
||||
reference integer (nEffect) must be from 1 to 7.*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Created By: Aidan Scanlan On: April 11, 2001
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int ApplyPrismaticEffect(int nEffect, object oTarget)
|
||||
{
|
||||
int nDamage;
|
||||
effect ePrism;
|
||||
effect eVis;
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink;
|
||||
int nVis;
|
||||
float fDelay = 0.5 + GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
//Based on the random number passed in, apply the appropriate effect and set the visual to
|
||||
//the correct constant
|
||||
switch(nEffect)
|
||||
{
|
||||
case 1://fire
|
||||
nDamage = 20;
|
||||
nVis = VFX_IMP_FLAME_S;
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(),SAVING_THROW_TYPE_FIRE);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 2: //Acid
|
||||
nDamage = 40;
|
||||
nVis = VFX_IMP_ACID_L;
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(),SAVING_THROW_TYPE_ACID);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 3: //Electricity
|
||||
nDamage = 80;
|
||||
nVis = VFX_IMP_LIGHTNING_S;
|
||||
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(),SAVING_THROW_TYPE_ELECTRICITY);
|
||||
ePrism = EffectDamage(nDamage, DAMAGE_TYPE_ELECTRICAL);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
break;
|
||||
case 4: //Poison
|
||||
{
|
||||
if (MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_POISON) == 0)
|
||||
{
|
||||
if (GetIsImmune(oTarget, IMMUNITY_TYPE_POISON)) {
|
||||
ePrism = EffectPoison(POISON_BEBILITH_VENOM);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
}
|
||||
else {
|
||||
ePrism = EffectDeath();
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePrism, oTarget));
|
||||
}
|
||||
}
|
||||
else {
|
||||
nDamage = 20 ;
|
||||
effect ePoison = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL); //poison
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, ePoison, oTarget));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5: //Paralyze
|
||||
{
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
if (MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC()) == 0)
|
||||
{
|
||||
ePrism = EffectParalyze();
|
||||
eLink = EffectLinkEffects(eDur, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6: //Feeblemind
|
||||
{
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
ePrism = EffectConfused();
|
||||
eLink = EffectLinkEffects(eMind, ePrism);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nVis = VFX_IMP_CONFUSION_S;
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7: //Sent to outer plane
|
||||
{
|
||||
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//nVis = VFX_IMP_DEATH;
|
||||
nVis = VFX_IMP_UNSUMMON ;
|
||||
if (!GetIsPC(oTarget))
|
||||
DestroyObject(oTarget, fDelay+0.3) ;
|
||||
else {
|
||||
object oPlane = GetWaypointByTag("WP_PLANE") ;
|
||||
DelayCommand(fDelay, AssignCommand(oTarget, ActionJumpToObject(oPlane)));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return nVis;
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_raisdead.ncs
Normal file
BIN
_removed files/nw_s0_raisdead.ncs
Normal file
Binary file not shown.
51
_removed files/nw_s0_raisdead.nss
Normal file
51
_removed files/nw_s0_raisdead.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Raise Dead]
|
||||
//:: [NW_S0_RaisDead.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with 1 HP.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAISE_DEAD, FALSE));
|
||||
if(GetIsDead(oTarget))
|
||||
{
|
||||
//Apply raise dead effect and VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
DeleteLocalInt(oTarget,"PCDead");
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_resserec.ncs
Normal file
BIN
_removed files/nw_s0_resserec.ncs
Normal file
Binary file not shown.
79
_removed files/nw_s0_resserec.nss
Normal file
79
_removed files/nw_s0_resserec.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Ressurection]
|
||||
//:: [NW_S0_Ressurec.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Brings a character back to life with full
|
||||
//:: health.
|
||||
//:: When cast on placeables, you get a default error message.
|
||||
//:: * You can specify a different message in
|
||||
//:: X2_L_RESURRECT_SPELL_MSG_RESREF
|
||||
//:: * You can turn off the message by setting the variable
|
||||
//:: to -1
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg Z on 2003-07-31
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Get the spell target
|
||||
object oTarget = GetSpellTargetObject();
|
||||
//Check to make sure the target is dead first
|
||||
//Fire cast spell at event for the specified target
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE));
|
||||
if (GetIsDead(oTarget))
|
||||
{
|
||||
//Declare major variables
|
||||
int nHealed = GetMaxHitPoints(oTarget);
|
||||
effect eRaise = EffectResurrection();
|
||||
effect eHeal = EffectHeal(nHealed + 10);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_RAISE_DEAD);
|
||||
//Apply the heal, raise dead and VFX impact effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTarget));
|
||||
DeleteLocalInt(oTarget,"PCDead");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||
{
|
||||
int nStrRef = GetLocalInt(oTarget,"X2_L_RESURRECT_SPELL_MSG_RESREF");
|
||||
if (nStrRef == 0)
|
||||
{
|
||||
nStrRef = 83861;
|
||||
}
|
||||
if (nStrRef != -1)
|
||||
{
|
||||
FloatingTextStrRefOnCreature(nStrRef,OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_shadshld.ncs
Normal file
BIN
_removed files/nw_s0_shadshld.ncs
Normal file
Binary file not shown.
74
_removed files/nw_s0_shadshld.nss
Normal file
74
_removed files/nw_s0_shadshld.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Shadow Shield
|
||||
//:: NW_S0_ShadShld.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Grants the caster +5 AC and 10 / +3 Damage
|
||||
Reduction and immunity to death effects
|
||||
and negative energy damage for 3 Turns per level.
|
||||
Makes the caster immune Necromancy Spells
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "nw_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Do metamagic extend check
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration *= 2; //Duration is +100%
|
||||
}
|
||||
effect eStone = EffectDamageReduction(10, DAMAGE_POWER_PLUS_THREE);
|
||||
effect eAC = EffectACIncrease(5, AC_NATURAL_BONUS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH_WARD);
|
||||
effect eShadow = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
effect eSpell = EffectSpellLevelAbsorption(9, 0, SPELL_SCHOOL_NECROMANCY);
|
||||
effect eImmDeath = EffectImmunity(IMMUNITY_TYPE_DEATH);
|
||||
effect eImmNeg = EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE, 100);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Link major effects
|
||||
effect eLink = EffectLinkEffects(eStone, eAC);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eShadow);
|
||||
eLink = EffectLinkEffects(eLink, eImmDeath);
|
||||
eLink = EffectLinkEffects(eLink, eImmNeg);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eSpell);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SHADOW_SHIELD, FALSE));
|
||||
//Apply linked effect
|
||||
RemoveEffectsFromSpell(oTarget, SPELL_SHADOW_SHIELD);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_splresis.ncs
Normal file
BIN
_removed files/nw_s0_splresis.ncs
Normal file
Binary file not shown.
66
_removed files/nw_s0_splresis.nss
Normal file
66
_removed files/nw_s0_splresis.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Spell Resistance
|
||||
//:: NW_S0_SplResis
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target creature gains 12 + Caster Level SR.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 19, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF)/2;
|
||||
int nBonus = 12 + nLevel;
|
||||
effect eSR = EffectSpellResistanceIncrease(nBonus);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eDur2 = EffectVisualEffect(249);
|
||||
effect eLink = EffectLinkEffects(eSR, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE));
|
||||
//Check for metamagic extension
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nLevel = nLevel *2; //Duration is +100%
|
||||
}
|
||||
//Apply VFX impact and SR bonus effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nLevel));
|
||||
|
||||
///issacs stuff
|
||||
effect eSpell2 = EffectSpellImmunity(SPELL_ISAACS_LESSER_MISSILE_STORM);
|
||||
effect eSpell3 = EffectSpellImmunity(SPELL_ISAACS_GREATER_MISSILE_STORM);
|
||||
effect eLink2 = EffectLinkEffects(eSpell2, eSpell3);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, oTarget, TurnsToSeconds(nLevel));
|
||||
}
|
||||
BIN
_removed files/nw_s0_summon.ncs
Normal file
BIN
_removed files/nw_s0_summon.ncs
Normal file
Binary file not shown.
173
_removed files/nw_s0_summon.nss
Normal file
173
_removed files/nw_s0_summon.nss
Normal file
@@ -0,0 +1,173 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Summon Creature Series
|
||||
//:: NW_S0_Summon
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Carries out the summoning of the appropriate
|
||||
creature for the Summon Monster Series of spells
|
||||
1 to 9
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 8, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
effect SetSummonEffect(int nSpellID);
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nSpellID = GetSpellId();
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
nDuration = 24;
|
||||
if(nDuration == 1)
|
||||
{
|
||||
nDuration = 2;
|
||||
}
|
||||
effect eSummon = SetSummonEffect(nSpellID);
|
||||
|
||||
//Make metamagic check for extend
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
||||
effect SetSummonEffect(int nSpellID)
|
||||
{
|
||||
int nFNF_Effect;
|
||||
string sSummon;
|
||||
if(GetHasFeat(FEAT_ANIMAL_DOMAIN_POWER)) //WITH THE ANIMAL DOMAIN/////////////
|
||||
{
|
||||
if(nSpellID == SPELL_SUMMON_CREATURE_I)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_wolf";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_II)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_jaguar";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_III)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_ox";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IV)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "sum_falcon";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_V)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "sum_stag";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VI)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_nymph";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_giant";
|
||||
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VIII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_sickles";
|
||||
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IX)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_earthelemen";
|
||||
|
||||
}
|
||||
}
|
||||
else //WITHOUT THE ANIMAL DOMAIN///////////////////////////////////////////
|
||||
{
|
||||
if(nSpellID == SPELL_SUMMON_CREATURE_I)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_kobold";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_II)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_hobgoblin";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_III)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_1;
|
||||
sSummon = "sum_bugbear";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IV)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "sum_ogre";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_V)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "sum_dryad";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VI)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_2;
|
||||
sSummon = "sum_rakshasa";
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_amazon";
|
||||
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_VIII)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_blade";
|
||||
|
||||
}
|
||||
else if(nSpellID == SPELL_SUMMON_CREATURE_IX)
|
||||
{
|
||||
nFNF_Effect = VFX_FNF_SUMMON_MONSTER_3;
|
||||
sSummon = "sum_dracolich";
|
||||
|
||||
}
|
||||
}
|
||||
//effect eVis = EffectVisualEffect(nFNF_Effect);
|
||||
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
|
||||
effect eSummonedMonster = EffectSummonCreature(sSummon, nFNF_Effect);
|
||||
return eSummonedMonster;
|
||||
}
|
||||
|
||||
BIN
_removed files/nw_s0_tenstrans.ncs
Normal file
BIN
_removed files/nw_s0_tenstrans.ncs
Normal file
Binary file not shown.
220
_removed files/nw_s0_tenstrans.nss
Normal file
220
_removed files/nw_s0_tenstrans.nss
Normal file
@@ -0,0 +1,220 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Tensor's Transformation
|
||||
//:: NW_S0_TensTrans.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Gives the caster the following bonuses:
|
||||
+1 Attack per 2 levels
|
||||
+4 Natural AC
|
||||
20 STR and DEX and CON
|
||||
1d6 Bonus HP per level
|
||||
+5 on Fortitude Saves
|
||||
-10 Intelligence
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 26, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//: Sep2002: losing hit-points won't get rid of the rest of the bonuses
|
||||
|
||||
//:://///////////////////////////////////////////
|
||||
//:: Modified by C.R. Hain (AKA Lord Niah)
|
||||
//:: on: Feb 3, 2003
|
||||
/////////////////////////////////////////////////
|
||||
/*
|
||||
Spell no longer applies polymorph effect so that
|
||||
player can now use their own equipment
|
||||
|
||||
Also increases discipline skill
|
||||
*/
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
//#include "x2_inc_itemprop"
|
||||
//#include "x2_inc_shifter"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// GZ, Nov 3, 2003
|
||||
// There is a serious problems with creatures turning into unstoppable killer
|
||||
// machines when affected by tensors transformation. NPC AI can't handle that
|
||||
// spell anyway, so I added this code to disable the use of Tensors by any
|
||||
// NPC.
|
||||
//----------------------------------------------------------------------------
|
||||
if (!GetIsPC(OBJECT_SELF))
|
||||
{
|
||||
WriteTimestampedLogEntry(GetName(OBJECT_SELF) + "[" + GetTag (OBJECT_SELF) +"] tried to cast Tensors Transformation. Bad! Remove that spell from the creature");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nHP, nCnt, nDuration;
|
||||
nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
//Determine bonus HP
|
||||
for(nCnt; nCnt <= nLevel; nCnt++)
|
||||
{
|
||||
nHP += d6();
|
||||
}
|
||||
|
||||
int nMeta = GetMetaMagicFeat();
|
||||
//Metamagic
|
||||
if(nMeta == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nHP = nLevel * 6;
|
||||
}
|
||||
else if(nMeta == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nHP = nHP + (nHP/2);
|
||||
}
|
||||
else if(nMeta == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration *= 2;
|
||||
}
|
||||
|
||||
|
||||
//Set Discipline skill if lower than what it would be for a fighter of the
|
||||
//same level -- CRH
|
||||
int nDisc = GetSkillRank(SKILL_DISCIPLINE, OBJECT_SELF);
|
||||
|
||||
if(nDisc < (nLevel + 3))
|
||||
nDisc = (nLevel + 3) - nDisc;
|
||||
|
||||
//Declare effects
|
||||
effect eAttack = EffectAttackIncrease(nLevel/2);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_FORT, 5);
|
||||
effect eAC = EffectACIncrease(4, AC_NATURAL_BONUS);
|
||||
effect eStrength = EffectAbilityIncrease(ABILITY_STRENGTH, d4(2));
|
||||
effect eDexterity = EffectAbilityIncrease(ABILITY_DEXTERITY, d4(2));
|
||||
effect eSkill = EffectSkillIncrease(SKILL_DISCIPLINE, nDisc);
|
||||
effect eSpellFail = EffectSpellFailure(200);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
effect eGlow = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
|
||||
//effect ePoly = EffectPolymorph(28);
|
||||
effect eSwing = EffectModifyAttacks(3);
|
||||
|
||||
//Link effects
|
||||
//effect eLink = EffectLinkEffects(eAttack, ePoly);
|
||||
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
eLink = EffectLinkEffects(eLink, eStrength);
|
||||
eLink = EffectLinkEffects(eLink, eDexterity);
|
||||
eLink = EffectLinkEffects(eLink, eSkill);
|
||||
eLink = EffectLinkEffects(eLink, eSpellFail);
|
||||
eLink = EffectLinkEffects(eLink, eSwing);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eGlow);
|
||||
|
||||
effect eHP = EffectTemporaryHitpoints(nHP);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUPER_HEROISM);
|
||||
|
||||
//int nAppearance = GetAppearanceType(OBJECT_SELF);
|
||||
|
||||
/*
|
||||
//--------------------------------------------------------------------------
|
||||
// Store the old objects so we can access them after the character has
|
||||
// changed into his new form
|
||||
//--------------------------------------------------------------------------
|
||||
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_SMALLSHIELD)
|
||||
{
|
||||
oShield = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
// Here the actual polymorphing is done and effects applied
|
||||
//--------------------------------------------------------------------------
|
||||
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TENSERS_TRANSFORMATION, FALSE));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, OBJECT_SELF, RoundsToSeconds(nDuration));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDuration));
|
||||
//SetCreatureAppearanceType(OBJECT_SELF, APPEARANCE_TYPE_DOOM_KNIGHT);
|
||||
//DelayCommand(RoundsToSeconds(nDuration), SetCreatureAppearanceType(OBJECT_SELF, nAppearance));
|
||||
//DelayCommand(RoundsToSeconds(nDuration), ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POLYMORPH), OBJECT_SELF));
|
||||
/*
|
||||
//--------------------------------------------------------------------------
|
||||
// This code handles the merging of item properties
|
||||
//--------------------------------------------------------------------------
|
||||
object oWeaponNew = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,OBJECT_SELF);
|
||||
object oArmorNew = GetItemInSlot(INVENTORY_SLOT_CARMOUR,OBJECT_SELF);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ...Weapons
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// GZ: 2003-10-20
|
||||
// Sorry, but I was forced to take that out, it was confusing people
|
||||
// and there were problems with updating the stats sheet.
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Merge item properties...
|
||||
//------------------------------------------------------------------
|
||||
IPWildShapeCopyItemProperties(oWeaponOld,oWeaponNew, TRUE);
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ...Armor
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Merge item properties from armor and helmet...
|
||||
//----------------------------------------------------------------------
|
||||
IPWildShapeCopyItemProperties(oArmorOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oHelmetOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oShield,oArmorNew);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ...Magic Items
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Merge item properties from from rings, amulets, cloak, boots, belt
|
||||
//----------------------------------------------------------------------
|
||||
IPWildShapeCopyItemProperties(oRing1Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oRing2Old,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oAmuletOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oCloakOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBootsOld,oArmorNew);
|
||||
IPWildShapeCopyItemProperties(oBeltOld,oArmorNew);
|
||||
*/
|
||||
}
|
||||
BIN
_removed files/nw_s0_timestop.ncs
Normal file
BIN
_removed files/nw_s0_timestop.ncs
Normal file
Binary file not shown.
114
_removed files/nw_s0_timestop.nss
Normal file
114
_removed files/nw_s0_timestop.nss
Normal file
@@ -0,0 +1,114 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Time Stop
|
||||
//:: NW_S0_TimeStop.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All persons in the Area are frozen in time
|
||||
except the caster.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Grinning Fool
|
||||
//:: Modified On: April 4, 2004
|
||||
//::
|
||||
// Changes from standard:
|
||||
// - Limit to fSPELL_TIMESTOP_RADIUS radius
|
||||
// - use Cutscene paralyze/immobile to stop creaturtes/PCs from moving for
|
||||
// duration of spell. Testing so far has revealted no issues with this.
|
||||
// - Apply improved invisibility to caster for duration of spell, to simulate
|
||||
// the intended effect of the caster moving so quickly that s/he can't be seen
|
||||
// - Use standard 3rd ed 1d4 + 1 rounds duration.
|
||||
// - Maximize effects if non-possessed GM casting, and bSPELL_TIMESTOP_DMEXTRA
|
||||
// has been set to TRUE.
|
||||
// NOTES:
|
||||
// THe stop effects are simulated via custcene-paralyze, which cannot be resisted.
|
||||
// However, creatures immune to paralysis are not affected. To help
|
||||
// with that (not fix completely) the Cutscene immobilize effect is used;
|
||||
// this prevents leg movement, but may allow other actions; specifically,
|
||||
// may cause issues when used against spellcasting undead?
|
||||
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
// Radius in meters.
|
||||
const float fSPELL_TIMESTOP_RADIUS = 500.0;
|
||||
|
||||
// Applies to 500 meter radius for GM, and uses 36 second duration.
|
||||
// If DM is possessing a creature, this doesn't apply
|
||||
const int bSPELL_TIMESTOP_DMEXTRA = TRUE;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
location lTarget = GetSpellTargetLocation();
|
||||
object oGem = GetItemPossessedBy(OBJECT_SELF,"TimeGem");
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_TIME_STOP);
|
||||
|
||||
effect eParalyze = EffectCutsceneParalyze();
|
||||
effect eImmobile = EffectCutsceneImmobilize();
|
||||
|
||||
// Standard 3rd edition duration instead of 9 seconds.
|
||||
int nRounds = 1 + d4();
|
||||
|
||||
float fDuration = RoundsToSeconds(nRounds);
|
||||
float fRange = fSPELL_TIMESTOP_RADIUS;
|
||||
object oCaster = OBJECT_SELF;
|
||||
|
||||
string strAreaName = GetName(GetArea(oCaster));
|
||||
|
||||
if(oGem == OBJECT_INVALID)
|
||||
{
|
||||
SendMessageToPC(OBJECT_SELF,"You do not have any Time Gems!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Warn the DMs that a timestop has been cast.
|
||||
if (GetIsDM(oCaster) && !GetIsDMPossessed(oCaster) && bSPELL_TIMESTOP_DMEXTRA) {
|
||||
nRounds = 6;
|
||||
fDuration = RoundsToSeconds(nRounds);
|
||||
fRange = 500.0;
|
||||
SendMessageToAllDMs("Timestop Alert [" + strAreaName + "]: MAX Timestop cast by DM " + GetName(oCaster) + " and will last for " + FloatToString(fDuration) + " seconds.");
|
||||
} else {
|
||||
SendMessageToAllDMs("Timestop Alert [" + strAreaName + "]: Timestop cast by " + GetName(oCaster) + " and will last for " + FloatToString(fDuration) + " seconds.");
|
||||
}
|
||||
|
||||
// Notify the caster how long the spell will last.
|
||||
SendMessageToPC(oCaster, "This spell will last for " + IntToString(nRounds) + " rounds.");
|
||||
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE));
|
||||
|
||||
// Apply the VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lTarget);
|
||||
|
||||
// Force invisible on the caster ...simulate the 'moving too fast to be seen' effect that
|
||||
// is the intent of this spell. Note that I toyed w/ using Cutscene invisiblity,
|
||||
// but found that it hides caster PC from the player... too bad, because it would have worked
|
||||
// better. If caster is near a PC, they will still see you in 'shadowy' form, until you move
|
||||
// out of range.
|
||||
DelayCommand(0.75, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
|
||||
EffectInvisibility(INVISIBILITY_TYPE_IMPROVED), oCaster, fDuration));
|
||||
|
||||
// Begin loop to find all creatures within the fSPELL_TIMESTOP_RADIUS meter radius
|
||||
object oCreature = GetFirstObjectInShape(SHAPE_SPHERE, fRange, lTarget, FALSE, OBJECT_TYPE_CREATURE);
|
||||
while (GetIsObjectValid(oCreature)) {
|
||||
if (oCreature != oCaster) {
|
||||
if (GetIsPC(oCreature)) {
|
||||
SendMessageToAllDMs("Timestop Alert [" + strAreaName + "]: " + GetName(oCreature) + " has been timestopped.");
|
||||
SendMessageToPC(oCreature, "You have been caught in a timestop spell!");
|
||||
}
|
||||
|
||||
// Apply the timestop effects to the creature; apply the expiration, too
|
||||
DelayCommand(0.75, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eParalyze, oCreature, fDuration));
|
||||
DelayCommand(0.75, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmobile, oCreature, fDuration));
|
||||
}
|
||||
oCreature = GetNextObjectInShape(SHAPE_SPHERE, fSPELL_TIMESTOP_RADIUS, lTarget, FALSE, OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
BIN
_removed files/nw_s0_weird.ncs
Normal file
BIN
_removed files/nw_s0_weird.ncs
Normal file
Binary file not shown.
53
_removed files/nw_s0_weird.nss
Normal file
53
_removed files/nw_s0_weird.nss
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "NW_I0_SPELLS"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eWeird = EffectVisualEffect(VFX_FNF_WEIRD);
|
||||
effect eAbyss = EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10);
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
float fDelay = 0.0; // weird is instant
|
||||
|
||||
//Apply the FNF VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWeird, GetSpellTargetLocation());
|
||||
//Get the first target in the spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetSpellTargetLocation(), TRUE);
|
||||
|
||||
while (GetIsObjectValid(oTarget)) {
|
||||
// make a faction check
|
||||
if (!GetIsFriend(oTarget)) {
|
||||
// cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WEIRD));
|
||||
|
||||
// make an SR Check
|
||||
if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay)) {
|
||||
|
||||
if ((GetHitDice(oTarget) >= 4)
|
||||
&& MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay)) {
|
||||
// okay, we're not dead - now apply damage unless we fortsaved too
|
||||
if (!MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay)) {
|
||||
int nDamage = d6(3);
|
||||
// no need for metamagic checks since you can't meta a c9 spell
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
//Apply VFX Impact and damage effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
}
|
||||
} else {
|
||||
// apply VFX impact and death effect
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetSpellTargetLocation(), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
_removed files/nw_s2_turndead.ncs
Normal file
BIN
_removed files/nw_s2_turndead.ncs
Normal file
Binary file not shown.
360
_removed files/nw_s2_turndead.nss
Normal file
360
_removed files/nw_s2_turndead.nss
Normal file
@@ -0,0 +1,360 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Turn Undead
|
||||
//:: NW_S2_TurnDead
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Checks domain powers and class to determine
|
||||
the proper turning abilities of the casting
|
||||
character.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 2, 2001
|
||||
//:: Updated On: Jul 15, 2003 - Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
//:: MODIFIED MARCH 5 2003 for Blackguards
|
||||
//:: MODIFIED JULY 24 2003 for Planar Turning to include turn resistance hd
|
||||
//:: Modified November 29, 2003 for Evil Cleric Rebuke/Command by Wes Baran
|
||||
//:: Modified December 29, 2003 for 1.61 patch
|
||||
|
||||
// Checks to see if an evil cleric has control 'slots' to command
|
||||
// the specified undead
|
||||
// if TRUE, the cleric has enough levels of control to control the undead
|
||||
// if FALSE, the cleric will rebuke the undead instead
|
||||
|
||||
// Checks to see if an evil cleric has control 'slots' to command
|
||||
// the specified undead
|
||||
// if TRUE, the cleric has enough levels of control to control the undead
|
||||
// if FALSE, the cleric will rebuke the undead instead
|
||||
int CanCommand(int nClassLevel, int nTargetHD) {
|
||||
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||
int nNew = nSlots + nTargetHD;
|
||||
//FloatingTextStringOnCreature("The variable is " + IntToString(nSlots), OBJECT_SELF);
|
||||
if(nClassLevel >= nNew) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void AddCommand(int nTargetHD) {
|
||||
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||
SetLocalInt(OBJECT_SELF, "wb_clr_comm_slots", nSlots + nTargetHD);
|
||||
}
|
||||
|
||||
void SubCommand(int nTargetHD) {
|
||||
int nSlots = GetLocalInt(OBJECT_SELF, "wb_clr_comm_slots");
|
||||
SetLocalInt(OBJECT_SELF, "wb_clr_comm_slots", nSlots - nTargetHD);
|
||||
}
|
||||
|
||||
void RebukeUndead(int nTurnLevel, int nTurnHD, int nVermin, int nElemental, int nConstructs, int nOutsider, int nClassLevel, int nPlanar) {
|
||||
//Gets all creatures in a 20m radius around the caster and rebukes them or not. If the creatures
|
||||
//HD are 1/2 or less of the nClassLevel then the creature is commanded (dominated).
|
||||
int nCnt = 1;
|
||||
int nHD, nRacial, nHDCount, bValid, nDamage;
|
||||
nHDCount = 0;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
effect eVisTurn = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DOMINATED);
|
||||
effect eDamage;
|
||||
effect eTurned = EffectCutsceneParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eVisTurn, eTurned);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eDeath = SupernaturalEffect(EffectCutsceneDominated());
|
||||
effect eDomin = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDeathLink = EffectLinkEffects(eDeath, eDomin);
|
||||
|
||||
effect eImpactVis = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpactVis, GetLocation(OBJECT_SELF));
|
||||
|
||||
//Get nearest enemy within 20m (60ft)
|
||||
//Why are you using GetNearest instead of GetFirstObjectInShape
|
||||
// Because ability description says "gets closest first" :P
|
||||
object oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC , OBJECT_SELF, nCnt);
|
||||
while(GetIsObjectValid(oTarget) && nHDCount < nTurnHD && GetDistanceToObject(oTarget) <= 20.0)
|
||||
{
|
||||
if(!GetIsFriend(oTarget))
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||
nRacial = GetRacialType(oTarget);
|
||||
|
||||
if (nRacial == RACIAL_TYPE_OUTSIDER )
|
||||
{
|
||||
if (nPlanar)
|
||||
{
|
||||
//Planar turning decreases spell resistance against turning by 1/2
|
||||
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) /2) + GetTurnResistanceHD(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) + GetTurnResistanceHD(oTarget) );
|
||||
}
|
||||
}
|
||||
else //(full turn resistance)
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||
}
|
||||
|
||||
if(nHD <= nTurnLevel && nHD <= (nTurnHD - nHDCount))
|
||||
{
|
||||
//Check the various domain turning types
|
||||
if(nRacial == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_VERMIN && nVermin > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_ELEMENTAL && nElemental > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_CONSTRUCT && nConstructs > 0)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
nDamage = d3(nTurnLevel);
|
||||
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
|
||||
nHDCount += nHD;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_OUTSIDER && nOutsider > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
|
||||
//Apply results of the turn
|
||||
if( bValid == TRUE)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
//if(IntToFloat(nClassLevel)/2.0 >= IntToFloat(nHD))
|
||||
//{
|
||||
|
||||
if((nClassLevel/2) >= nHD && CanCommand(nClassLevel, nHD))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
//Destroy the target
|
||||
DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDeathLink, oTarget, RoundsToSeconds(nClassLevel + 5)));
|
||||
//AssignCommand(oTarget, ClearAllActions());
|
||||
//SetIsTemporaryFriend(oTarget, OBJECT_SELF, TRUE, RoundsToSeconds(nClassLevel + 5));
|
||||
AddCommand(nHD);
|
||||
DelayCommand(RoundsToSeconds(nClassLevel + 5), SubCommand(nHD));
|
||||
}
|
||||
else
|
||||
{
|
||||
//Turn the target
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
//AssignCommand(oTarget, ActionMoveAwayFromObject(OBJECT_SELF, TRUE));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nClassLevel + 5));
|
||||
}
|
||||
nHDCount = nHDCount + nHD;
|
||||
}
|
||||
}
|
||||
bValid = FALSE;
|
||||
}
|
||||
nCnt++;
|
||||
oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC, OBJECT_SELF, nCnt);
|
||||
}
|
||||
}
|
||||
|
||||
void TurnUndead(int nTurnLevel, int nTurnHD, int nVermin, int nElemental, int nConstructs, int nOutsider, int nClassLevel, int nPlanar) {
|
||||
//Gets all creatures in a 20m radius around the caster and turns them or not. If the creatures
|
||||
//HD are 1/2 or less of the nClassLevel then the creature is destroyed.
|
||||
int nCnt = 1;
|
||||
int nHD, nRacial, nHDCount, bValid, nDamage;
|
||||
nHDCount = 0;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eVisTurn = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_FEAR);
|
||||
effect eDamage;
|
||||
effect eTurned = EffectTurned();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eVisTurn, eTurned);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eDeath = SupernaturalEffect(EffectDeath(TRUE));
|
||||
|
||||
effect eImpactVis = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpactVis, GetLocation(OBJECT_SELF));
|
||||
|
||||
//Get nearest enemy within 20m (60ft)
|
||||
//Why are you using GetNearest instead of GetFirstObjectInShape
|
||||
// Because ability description says "gets closest first" :P
|
||||
object oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC , OBJECT_SELF, nCnt);
|
||||
while(GetIsObjectValid(oTarget) && nHDCount < nTurnHD && GetDistanceToObject(oTarget) <= 20.0)
|
||||
{
|
||||
if(!GetIsFriend(oTarget))
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||
nRacial = GetRacialType(oTarget);
|
||||
|
||||
if (nRacial == RACIAL_TYPE_OUTSIDER )
|
||||
{
|
||||
if (nPlanar)
|
||||
{
|
||||
//Planar turning decreases spell resistance against turning by 1/2
|
||||
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) /2) + GetTurnResistanceHD(oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + (GetSpellResistance(oTarget) + GetTurnResistanceHD(oTarget) );
|
||||
}
|
||||
}
|
||||
else //(full turn resistance)
|
||||
{
|
||||
nHD = GetHitDice(oTarget) + GetTurnResistanceHD(oTarget);
|
||||
}
|
||||
|
||||
if(nHD <= nTurnLevel && nHD <= (nTurnHD - nHDCount))
|
||||
{
|
||||
//Check the various domain turning types
|
||||
if(nRacial == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_VERMIN && nVermin > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_ELEMENTAL && nElemental > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_CONSTRUCT && nConstructs > 0)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
nDamage = d3(nTurnLevel);
|
||||
eDamage = EffectDamage(nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget);
|
||||
nHDCount += nHD;
|
||||
}
|
||||
else if (nRacial == RACIAL_TYPE_OUTSIDER && nOutsider > 0)
|
||||
{
|
||||
bValid = TRUE;
|
||||
}
|
||||
|
||||
//Apply results of the turn
|
||||
if( bValid == TRUE)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
//if(IntToFloat(nClassLevel)/2.0 >= IntToFloat(nHD))
|
||||
//{
|
||||
|
||||
if((nClassLevel/2) >= nHD)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
//Destroy the target
|
||||
DelayCommand(0.1f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
//Turn the target
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_TURN_UNDEAD));
|
||||
AssignCommand(oTarget, ActionMoveAwayFromObject(OBJECT_SELF, TRUE));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nClassLevel + 5));
|
||||
}
|
||||
nHDCount = nHDCount + nHD;
|
||||
}
|
||||
}
|
||||
bValid = FALSE;
|
||||
}
|
||||
nCnt++;
|
||||
oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_NOT_PC, OBJECT_SELF, nCnt);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int nClericLevel = GetLevelByClass(CLASS_TYPE_CLERIC);
|
||||
int nPaladinLevel = GetLevelByClass(CLASS_TYPE_PALADIN);
|
||||
int nBlackguardlevel = GetLevelByClass(CLASS_TYPE_BLACKGUARD);
|
||||
int nTotalLevel = GetHitDice(OBJECT_SELF);
|
||||
|
||||
int nTurnLevel = nClericLevel;
|
||||
int nClassLevel = nClericLevel;
|
||||
|
||||
// GZ: Since paladin levels stack when turning, blackguard levels should stack as well
|
||||
// GZ: but not with the paladin levels (thus else if).
|
||||
if((nBlackguardlevel - 2) > 0 && (nBlackguardlevel > nPaladinLevel))
|
||||
{
|
||||
nClassLevel += (nBlackguardlevel - 2);
|
||||
nTurnLevel += (nBlackguardlevel - 2);
|
||||
}
|
||||
else if((nPaladinLevel - 2) > 0)
|
||||
{
|
||||
nClassLevel += (nPaladinLevel -2);
|
||||
nTurnLevel += (nPaladinLevel - 2);
|
||||
}
|
||||
|
||||
//Flags for bonus turning types
|
||||
int nElemental = GetHasFeat(FEAT_AIR_DOMAIN_POWER) + GetHasFeat(FEAT_EARTH_DOMAIN_POWER) + GetHasFeat(FEAT_FIRE_DOMAIN_POWER) + GetHasFeat(FEAT_WATER_DOMAIN_POWER);
|
||||
int nVermin = GetHasFeat(FEAT_PLANT_DOMAIN_POWER) + GetHasFeat(FEAT_ANIMAL_COMPANION);
|
||||
int nConstructs = GetHasFeat(FEAT_DESTRUCTION_DOMAIN_POWER);
|
||||
int nOutsider = GetHasFeat(FEAT_GOOD_DOMAIN_POWER) + GetHasFeat(FEAT_EVIL_DOMAIN_POWER);
|
||||
int nPlanar = GetHasFeat(854);
|
||||
|
||||
//Flag for improved turning ability
|
||||
int nSun = GetHasFeat(FEAT_SUN_DOMAIN_POWER);
|
||||
|
||||
//Make a turning check roll, modify if have the Sun Domain
|
||||
int nChrMod = GetAbilityModifier(ABILITY_CHARISMA);
|
||||
int nTurnCheck = d20() + nChrMod; //The roll to apply to the max HD of undead that can be turned --> nTurnLevel
|
||||
int nTurnHD = d6(2) + nChrMod + nClassLevel; //The number of HD of undead that can be turned.
|
||||
|
||||
if(nSun == TRUE)
|
||||
{
|
||||
nTurnCheck += d4();
|
||||
nTurnHD += d6();
|
||||
}
|
||||
//Determine the maximum HD of the undead that can be turned.
|
||||
if(nTurnCheck <= 0)
|
||||
{
|
||||
nTurnLevel -= 4;
|
||||
}
|
||||
else if(nTurnCheck >= 1 && nTurnCheck <= 3)
|
||||
{
|
||||
nTurnLevel -= 3;
|
||||
}
|
||||
else if(nTurnCheck >= 4 && nTurnCheck <= 6)
|
||||
{
|
||||
nTurnLevel -= 2;
|
||||
}
|
||||
else if(nTurnCheck >= 7 && nTurnCheck <= 9)
|
||||
{
|
||||
nTurnLevel -= 1;
|
||||
}
|
||||
else if(nTurnCheck >= 10 && nTurnCheck <= 12)
|
||||
{
|
||||
//Stays the same
|
||||
}
|
||||
else if(nTurnCheck >= 13 && nTurnCheck <= 15)
|
||||
{
|
||||
nTurnLevel += 1;
|
||||
}
|
||||
else if(nTurnCheck >= 16 && nTurnCheck <= 18)
|
||||
{
|
||||
nTurnLevel += 2;
|
||||
}
|
||||
else if(nTurnCheck >= 19 && nTurnCheck <= 21)
|
||||
{
|
||||
nTurnLevel += 3;
|
||||
}
|
||||
else if(nTurnCheck >= 22)
|
||||
{
|
||||
nTurnLevel += 4;
|
||||
}
|
||||
|
||||
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
|
||||
if(nAlign == ALIGNMENT_EVIL) {
|
||||
RebukeUndead(nTurnLevel, nTurnHD, nVermin, nElemental, nConstructs, nOutsider, nClassLevel, nPlanar);
|
||||
}
|
||||
else {
|
||||
TurnUndead(nTurnLevel, nTurnHD, nVermin, nElemental, nConstructs, nOutsider, nClassLevel, nPlanar);
|
||||
}
|
||||
}
|
||||
1916
_removed files/x0_i0_spells.nss
Normal file
1916
_removed files/x0_i0_spells.nss
Normal file
File diff suppressed because it is too large
Load Diff
1124
_removed files/x0_inc_henai.nss
Normal file
1124
_removed files/x0_inc_henai.nss
Normal file
File diff suppressed because it is too large
Load Diff
BIN
_removed files/x0_s0_divfav.ncs
Normal file
BIN
_removed files/x0_s0_divfav.ncs
Normal file
Binary file not shown.
66
_removed files/x0_s0_divfav.nss
Normal file
66
_removed files/x0_s0_divfav.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Bless
|
||||
//:: x0_s0_divfav.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
+1 bonus to attack and damage for every three
|
||||
caster levels (+1 to max +5) \
|
||||
NOTE: Official rules say +6, we can only go to +5
|
||||
Duration: 1 turn
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent Knowles Modified by Tab, Realms of Trinity
|
||||
//:: Created On: July 15, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By:
|
||||
#include "NW_I0_SPELLS"
|
||||
void RemoveEffectsFromSpell1(object oTarget, int SpellID)
|
||||
{
|
||||
effect eLook = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eLook)) {
|
||||
if (GetEffectSpellId(eLook) == SpellID)
|
||||
RemoveEffect(oTarget, eLook);
|
||||
eLook = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
||||
|
||||
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||
|
||||
int nScale = (GetCasterLevel(OBJECT_SELF) / 3);
|
||||
// * must fall between +1 and +5
|
||||
if (nScale < 1)
|
||||
nScale = 1;
|
||||
else
|
||||
if (nScale > 5)
|
||||
nScale = 5;
|
||||
// * determine the damage bonus to apply
|
||||
effect eAttack = EffectAttackIncrease(nScale);
|
||||
effect eDamage = EffectDamageIncrease(nScale, DAMAGE_TYPE_MAGICAL);
|
||||
|
||||
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
int nDuration = 1; // * Duration 1 turn
|
||||
|
||||
//Apply Impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
oTarget = OBJECT_SELF;
|
||||
|
||||
//Fire spell cast at event for target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 414, FALSE));
|
||||
//Apply VFX impact and bonus effects
|
||||
RemoveEffectsFromSpell1(OBJECT_SELF,SPELL_DIVINE_FAVOR);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
|
||||
}
|
||||
|
||||
BIN
_removed files/x0_s0_firebrand.ncs
Normal file
BIN
_removed files/x0_s0_firebrand.ncs
Normal file
Binary file not shown.
51
_removed files/x0_s0_firebrand.nss
Normal file
51
_removed files/x0_s0_firebrand.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Firebrand
|
||||
//:: x0_x0_Firebrand
|
||||
//:: Copyright (c) 2002 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// * Fires a flame arrow to every target in a
|
||||
// * colossal area
|
||||
// * Each target explodes into a small fireball for
|
||||
// * 1d6 damage / level (max = 15 levels)
|
||||
// * Only nLevel targets can be affected
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: July 29 2002
|
||||
//:://///////////////////////////////////////////
|
||||
//:: Last Updated By:
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
int nDamage = GetCasterLevel(OBJECT_SELF);
|
||||
if (nDamage > 15)
|
||||
nDamage = 15;
|
||||
|
||||
DoMissileStorm(nDamage, 15, SPELL_FIREBRAND, VFX_IMP_MIRV_FLAME, VFX_IMP_FLAME_M, DAMAGE_TYPE_FIRE, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
_removed files/x0_s0_missstorm1.ncs
Normal file
BIN
_removed files/x0_s0_missstorm1.ncs
Normal file
Binary file not shown.
42
_removed files/x0_s0_missstorm1.nss
Normal file
42
_removed files/x0_s0_missstorm1.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Isaacs Lesser Missile Storm
|
||||
//:: x0_s0_MissStorm1
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Up to 10 missiles, each doing 1d6 damage to all
|
||||
targets in area.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: July 31, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By:
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
//SpawnScriptDebugger();
|
||||
DoMissileStorm(1, 20, SPELL_ISAACS_LESSER_MISSILE_STORM);
|
||||
}
|
||||
|
||||
|
||||
BIN
_removed files/x0_s0_missstorm2.ncs
Normal file
BIN
_removed files/x0_s0_missstorm2.ncs
Normal file
Binary file not shown.
43
_removed files/x0_s0_missstorm2.nss
Normal file
43
_removed files/x0_s0_missstorm2.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Isaacs Greater Missile Storm
|
||||
//:: x0_s0_MissStorm2
|
||||
//:: Copyright (c) 2002 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Up to 20 missiles, each doing 3d6 damage to each
|
||||
target in area.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: July 31, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By:
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
|
||||
DoMissileStorm(3, 40, SPELL_ISAACS_GREATER_MISSILE_STORM);
|
||||
}
|
||||
|
||||
|
||||
BIN
_removed files/x0_s0_udetfoe.ncs
Normal file
BIN
_removed files/x0_s0_udetfoe.ncs
Normal file
Binary file not shown.
106
_removed files/x0_s0_udetfoe.nss
Normal file
106
_removed files/x0_s0_udetfoe.nss
Normal file
@@ -0,0 +1,106 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Undeath's Eternal Foe
|
||||
//:: x0_s0_udetfoe.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Grants many protections against undead
|
||||
to allies in a small area
|
||||
of effect (everyone gets negative energy protection)
|
||||
immunity to poison and disease too
|
||||
+4 AC bonus to all creatures
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: July 31, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By:
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
void GrantProtection(object oTarget)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
|
||||
effect eNeg = EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE, 100);
|
||||
effect eLevel = EffectImmunity(IMMUNITY_TYPE_NEGATIVE_LEVEL);
|
||||
effect eAbil = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE);
|
||||
effect ePoison = EffectImmunity(IMMUNITY_TYPE_POISON);
|
||||
effect eDisease = EffectImmunity(IMMUNITY_TYPE_DISEASE);
|
||||
effect eAC = EffectACIncrease(4);
|
||||
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//Link Effects
|
||||
effect eLink = EffectLinkEffects(eNeg, eLevel);
|
||||
eLink = EffectLinkEffects(eLink, eAbil);
|
||||
eLink = EffectLinkEffects(eLink, eAC);
|
||||
eLink = EffectLinkEffects(eLink, ePoison);
|
||||
eLink = EffectLinkEffects(eLink, eDisease);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
RemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30);
|
||||
|
||||
|
||||
float fDelay;
|
||||
//Metamagic duration check
|
||||
|
||||
//Apply Impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
|
||||
|
||||
//Get the first target in the radius around the caster
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetIsReactionTypeFriendly(oTarget) || GetFactionEqual(oTarget))
|
||||
{
|
||||
fDelay = GetRandomDelay(0.4, 1.1);
|
||||
//Fire spell cast at event for target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 444, FALSE));
|
||||
GrantProtection(oTarget);
|
||||
}
|
||||
//Get the next target in the specified area around the caster
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, GetSpellTargetLocation());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
668
_removed files/x2_i0_spells.nss
Normal file
668
_removed files/x2_i0_spells.nss
Normal file
@@ -0,0 +1,668 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: x2_i0_spells
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Expansion 2 and above include file for spells
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Andrew Nobbs
|
||||
//:: Created On: Nov 2002
|
||||
//:: Updated On: 2003/09/10 - Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
#include "x2_inc_itemprop"
|
||||
#include "x0_i0_spells"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ: These constants are used with for the AOE behavior AI
|
||||
//------------------------------------------------------------------------------
|
||||
const int X2_SPELL_AOEBEHAVIOR_FLEE = 0;
|
||||
const int X2_SPELL_AOEBEHAVIOR_IGNORE = 1;
|
||||
const int X2_SPELL_AOEBEHAVIOR_GUST = 2;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_L = SPELL_LESSER_DISPEL;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_N = SPELL_DISPEL_MAGIC;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_G = SPELL_GREATER_DISPELLING;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_M = SPELL_MORDENKAINENS_DISJUNCTION;
|
||||
const int X2_SPELL_AOEBEHAVIOR_DISPEL_C = 727;
|
||||
|
||||
|
||||
// * Will pass back a linked effect for all of the bad tide of battle effects.
|
||||
effect CreateBadTideEffectsLink();
|
||||
// * Will pass back a linked effect for all of the good tide of battle effects.
|
||||
effect CreateGoodTideEffectsLink();
|
||||
// * Passes in the slashing weapon type
|
||||
int GetSlashingWeapon(object oItem);
|
||||
// * Passes in the melee weapon type
|
||||
int GetMeleeWeapon(object oItem);
|
||||
// * Passes in if the item is magical or not.
|
||||
int GetIsMagicalItem(object oItem);
|
||||
// * Passes back the stat bonus of the characters magical stat, if any.
|
||||
int GetIsMagicStatBonus(object oCaster);
|
||||
|
||||
// * Save DC against Epic Spells is the relevant ability score of the caster
|
||||
// * + 20. The hightest ability score of the casting relevants is 99.99% identical
|
||||
// * with the one that is used for casting, so we just take it.
|
||||
// * if used by a placeable, it is equal to the placeables WILL save field.
|
||||
int GetEpicSpellSaveDC(object oCaster);
|
||||
|
||||
// * Hub function for the epic barbarian feats that upgrade rage. Call from
|
||||
// * the end of the barbarian rage spellscript
|
||||
void CheckAndApplyEpicRageFeats(int nRounds);
|
||||
|
||||
// * Checks the character for the thundering rage feat and will apply temporary massive critical
|
||||
// * to the worn weapons
|
||||
// * called by CheckAndApplyEpicRageFeats(
|
||||
void CheckAndApplyThunderingRage(int nRounds);
|
||||
|
||||
// * Checks and runs Rerrifying Rage feat
|
||||
// * called by CheckAndApplyEpicRageFeats(
|
||||
void CheckAndApplyTerrifyingRage(int nRounds);
|
||||
|
||||
|
||||
// * Do a mind blast
|
||||
// nDC - DC of the Save to resist
|
||||
// nRounds - Rounds the stun effect holds
|
||||
// fRange - Range of the EffectCone
|
||||
void DoMindBlast(int nDC, int nDuration, float fRange);
|
||||
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: CreateBadTideEffectsLink
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates the linked bad effects for Battletide.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
effect CreateBadTideEffectsLink()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eSaves = EffectSavingThrowDecrease(SAVING_THROW_ALL, 2);
|
||||
effect eAttack = EffectAttackDecrease(2);
|
||||
effect eDamage = EffectDamageDecrease(2);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
//Link the effects
|
||||
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
eLink = EffectLinkEffects(eLink, eSaves);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
return eLink;
|
||||
}
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: CreateGoodTideEffectsLink
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates the linked good effects for Battletide.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
effect CreateGoodTideEffectsLink()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eSaves = EffectSavingThrowIncrease(SAVING_THROW_ALL, 2);
|
||||
effect eAttack = EffectAttackIncrease(2);
|
||||
effect eDamage = EffectDamageIncrease(2);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
//Link the effects
|
||||
effect eLink = EffectLinkEffects(eAttack, eDamage);
|
||||
eLink = EffectLinkEffects(eLink, eSaves);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
return eLink;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// AN, 2003
|
||||
// Returns TRUE if oItem is a slashing weapon
|
||||
//------------------------------------------------------------------------------
|
||||
int GetSlashingWeapon(object oItem)
|
||||
{
|
||||
//Declare major variables
|
||||
int nItem = GetBaseItemType(oItem);
|
||||
|
||||
if((nItem == BASE_ITEM_BASTARDSWORD) ||
|
||||
(nItem == BASE_ITEM_BATTLEAXE) ||
|
||||
(nItem == BASE_ITEM_DOUBLEAXE) ||
|
||||
(nItem == BASE_ITEM_GREATAXE) ||
|
||||
(nItem == BASE_ITEM_GREATSWORD) ||
|
||||
(nItem == BASE_ITEM_HALBERD) ||
|
||||
(nItem == BASE_ITEM_HANDAXE) ||
|
||||
(nItem == BASE_ITEM_KAMA) ||
|
||||
(nItem == BASE_ITEM_KATANA) ||
|
||||
(nItem == BASE_ITEM_KUKRI) ||
|
||||
(nItem == BASE_ITEM_LONGSWORD)||
|
||||
(nItem == BASE_ITEM_SCIMITAR)||
|
||||
(nItem == BASE_ITEM_SCYTHE)||
|
||||
(nItem == BASE_ITEM_SICKLE)||
|
||||
(nItem == BASE_ITEM_TWOBLADEDSWORD) ||
|
||||
(nItem == BASE_ITEM_DWARVENWARAXE) ||
|
||||
(nItem == BASE_ITEM_THROWINGAXE) ||
|
||||
(nItem == BASE_ITEM_WHIP)
|
||||
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// AN, 2003
|
||||
// Returns TRUE if oItem is a ranged weapon
|
||||
//------------------------------------------------------------------------------
|
||||
int GetIsRangedWeapon(object oItem)
|
||||
{
|
||||
// GZ: replaced if statement with engine function
|
||||
return GetWeaponRanged(oItem);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// AN, 2003
|
||||
// Returns TRUE, if oItem is a melee weapon
|
||||
//------------------------------------------------------------------------------
|
||||
int GetMeleeWeapon(object oItem)
|
||||
{
|
||||
//Declare major variables
|
||||
int nItem = GetBaseItemType(oItem);
|
||||
|
||||
if((nItem == BASE_ITEM_BASTARDSWORD) ||
|
||||
(nItem == BASE_ITEM_BATTLEAXE) ||
|
||||
(nItem == BASE_ITEM_DOUBLEAXE) ||
|
||||
(nItem == BASE_ITEM_GREATAXE) ||
|
||||
(nItem == BASE_ITEM_GREATSWORD) ||
|
||||
(nItem == BASE_ITEM_HALBERD) ||
|
||||
(nItem == BASE_ITEM_HANDAXE) ||
|
||||
(nItem == BASE_ITEM_KAMA) ||
|
||||
(nItem == BASE_ITEM_KATANA) ||
|
||||
(nItem == BASE_ITEM_KUKRI) ||
|
||||
(nItem == BASE_ITEM_LONGSWORD) ||
|
||||
(nItem == BASE_ITEM_SCIMITAR) ||
|
||||
(nItem == BASE_ITEM_SCYTHE) ||
|
||||
(nItem == BASE_ITEM_SICKLE) ||
|
||||
(nItem == BASE_ITEM_TWOBLADEDSWORD) ||
|
||||
(nItem == BASE_ITEM_CLUB) ||
|
||||
(nItem == BASE_ITEM_DAGGER) ||
|
||||
(nItem == BASE_ITEM_DIREMACE) ||
|
||||
(nItem == BASE_ITEM_HEAVYFLAIL) ||
|
||||
(nItem == BASE_ITEM_LIGHTFLAIL) ||
|
||||
(nItem == BASE_ITEM_LIGHTHAMMER) ||
|
||||
(nItem == BASE_ITEM_LIGHTMACE) ||
|
||||
(nItem == BASE_ITEM_MORNINGSTAR) ||
|
||||
(nItem == BASE_ITEM_QUARTERSTAFF) ||
|
||||
(nItem == BASE_ITEM_RAPIER) ||
|
||||
(nItem == BASE_ITEM_SHORTSPEAR) ||
|
||||
(nItem == BASE_ITEM_SHORTSWORD) ||
|
||||
(nItem == BASE_ITEM_WARHAMMER) ||
|
||||
(nItem == BASE_ITEM_WHIP) ||
|
||||
(nItem == BASE_ITEM_DWARVENWARAXE))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// AN, 2003
|
||||
// Returns TRUE if oItem has any item property that classifies it as magical item
|
||||
//------------------------------------------------------------------------------
|
||||
int GetIsMagicalItem(object oItem)
|
||||
{
|
||||
//Declare major variables
|
||||
int nProperty;
|
||||
|
||||
if((GetItemHasItemProperty(oItem, ITEM_PROPERTY_ABILITY_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_BASE_ITEM_WEIGHT_REDUCTION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_FEAT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_CAST_SPELL)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_DAMAGE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCED_CONTAINER_REDUCED_WEIGHT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNEMENT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_EXTRA_MELEE_DAMAGE_TYPE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_EXTRA_RANGED_DAMAGE_TYPE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_FREEDOM_OF_MOVEMENT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_HASTE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_HOLY_AVENGER)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_LIGHT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_MASSIVE_CRITICALS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_MIGHTY)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_MIND_BLANK)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_NO_DAMAGE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_HIT_PROPERTIES)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_MONSTER_HIT)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_POISON)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_SAVING_THROW_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_SKILL_BONUS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPELL_RESISTANCE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_THIEVES_TOOLS)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRUE_SEEING)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_TURN_RESISTANCE)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_UNLIMITED_AMMUNITION)) ||
|
||||
(GetItemHasItemProperty(oItem, ITEM_PROPERTY_ONHITCASTSPELL))
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//::///////////////////////////////////////////////
|
||||
//:: GetIsMagicStatBonus
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Returns the modifier from the ability
|
||||
score that matters for this caster
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
int GetIsMagicStatBonus(object oCaster)
|
||||
{
|
||||
//Declare major variables
|
||||
int nClass;
|
||||
int nAbility;
|
||||
|
||||
if(nClass = GetLevelByClass(CLASS_TYPE_WIZARD, oCaster))
|
||||
{
|
||||
if(nClass > 0)
|
||||
{
|
||||
nAbility = ABILITY_INTELLIGENCE;
|
||||
}
|
||||
}
|
||||
if(nClass = GetLevelByClass(CLASS_TYPE_BARD, oCaster) || GetLevelByClass(CLASS_TYPE_SORCERER, oCaster))
|
||||
{
|
||||
if(nClass > 0)
|
||||
{
|
||||
nAbility = ABILITY_CHARISMA;
|
||||
}
|
||||
}
|
||||
else if(nClass = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster) || GetLevelByClass(CLASS_TYPE_DRUID, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_PALADIN, oCaster) || GetLevelByClass(CLASS_TYPE_RANGER, oCaster))
|
||||
{
|
||||
if(nClass > 0)
|
||||
{
|
||||
nAbility = ABILITY_WISDOM;
|
||||
}
|
||||
}
|
||||
|
||||
return GetAbilityModifier(nAbility, oCaster);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ, 2003-07-09
|
||||
// Hub function for the epic barbarian feats that upgrade rage. Call from
|
||||
// the end of the barbarian rage spellscript
|
||||
//------------------------------------------------------------------------------
|
||||
void CheckAndApplyEpicRageFeats(int nRounds)
|
||||
{
|
||||
CheckAndApplyThunderingRage(nRounds);
|
||||
CheckAndApplyTerrifyingRage(nRounds);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ, 2003-07-09
|
||||
// If the character calling this function from a spellscript has the thundering
|
||||
// rage feat, his weapons are upgraded to deafen and cause 2d6 points of massive
|
||||
// criticals
|
||||
//------------------------------------------------------------------------------
|
||||
void CheckAndApplyThunderingRage(int nRounds)
|
||||
{
|
||||
if (GetHasFeat(988, OBJECT_SELF))
|
||||
{
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
|
||||
|
||||
if (GetIsObjectValid(oWeapon))
|
||||
{
|
||||
IPSafeAddItemProperty(oWeapon, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d6), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE,TRUE);
|
||||
IPSafeAddItemProperty(oWeapon, ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
|
||||
IPSafeAddItemProperty(oWeapon, ItemPropertyOnHitProps(IP_CONST_ONHIT_DEAFNESS,IP_CONST_ONHIT_SAVEDC_20,IP_CONST_ONHIT_DURATION_25_PERCENT_3_ROUNDS), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
|
||||
}
|
||||
|
||||
oWeapon = GetItemInSlot(INVENTORY_SLOT_LEFTHAND);
|
||||
|
||||
if (GetIsObjectValid(oWeapon) )
|
||||
{
|
||||
IPSafeAddItemProperty(oWeapon, ItemPropertyMassiveCritical(IP_CONST_DAMAGEBONUS_2d6), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE,TRUE);
|
||||
IPSafeAddItemProperty(oWeapon,ItemPropertyVisualEffect(ITEM_VISUAL_SONIC), RoundsToSeconds(nRounds), X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,FALSE,TRUE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ, 2003-07-09
|
||||
// If the character calling this function from a spellscript has the terrifying
|
||||
// rage feat, he gets an aura of fear for the specified duration
|
||||
// The saving throw against this fear is a check opposed to the character's
|
||||
// intimidation skill
|
||||
//------------------------------------------------------------------------------
|
||||
void CheckAndApplyTerrifyingRage(int nRounds)
|
||||
{
|
||||
if (GetHasFeat(989, OBJECT_SELF))
|
||||
{
|
||||
effect eAOE = EffectAreaOfEffect(AOE_MOB_FEAR,"x2_s2_terrage_A", "","");
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAOE,OBJECT_SELF,RoundsToSeconds(nRounds));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//Keith Warner
|
||||
// Do a mind blast
|
||||
// nHitDice - HitDice/Caster Level of the creator
|
||||
// nDC - DC of the Save to resist
|
||||
// nRounds - Rounds the stun effect holds
|
||||
// fRange - Range of the EffectCone
|
||||
//------------------------------------------------------------------------------
|
||||
void DoMindBlast(int nDC, int nDuration, float fRange)
|
||||
{
|
||||
int nStunTime;
|
||||
float fDelay;
|
||||
|
||||
location lTargetLocation = GetSpellTargetLocation();
|
||||
object oTarget;
|
||||
effect eCone;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE);
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
int nApp = GetAppearanceType(oTarget);
|
||||
int bImmune = FALSE;
|
||||
//----------------------------------------------------------------------
|
||||
// Hack to make mind flayers immune to their psionic attacks...
|
||||
//----------------------------------------------------------------------
|
||||
if (nApp == 413 ||nApp== 414 || nApp == 415)
|
||||
{
|
||||
bImmune = TRUE;
|
||||
}
|
||||
|
||||
if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF) && oTarget != OBJECT_SELF && !bImmune )
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
// already stunned
|
||||
if (GetHasSpellEffect(GetSpellId(),oTarget))
|
||||
{
|
||||
// only affects the targeted object
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_STUN), oTarget);
|
||||
int nDamage;
|
||||
if (GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)>0)
|
||||
{
|
||||
nDamage = d6(GetLevelByClass(CLASS_TYPE_SHIFTER,OBJECT_SELF)/3);
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage = d6(GetHitDice(OBJECT_SELF)/2);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamage), oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BIGBYS_FORCEFUL_HAND), oTarget);
|
||||
}
|
||||
else if (WillSave(oTarget, nDC) < 1)
|
||||
{
|
||||
//Calculate the length of the stun
|
||||
nStunTime = nDuration;
|
||||
//Set stunned effect
|
||||
eCone = EffectStunned();
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCone, oTarget, RoundsToSeconds(nStunTime)));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, fRange, lTargetLocation, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * Gelatinous Cube Paralyze attack
|
||||
int DoCubeParalyze(object oTarget, object oSource, int nSaveDC = 26)
|
||||
{
|
||||
if (GetIsImmune(oTarget,IMMUNITY_TYPE_PARALYSIS) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (FortitudeSave(oTarget,nSaveDC, SAVING_THROW_TYPE_POISON,oSource) == 0)
|
||||
{
|
||||
effect ePara = EffectParalyze();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
|
||||
ePara = EffectLinkEffects(eDur,ePara);
|
||||
ePara = EffectLinkEffects(EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION),ePara);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePara,oTarget,RoundsToSeconds(3+d3())); // not 3 d6, thats not fun
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
effect eSave = EffectVisualEffect(VFX_IMP_FORTITUDE_SAVING_THROW_USE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eSave,oTarget);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// GZ: Gel. Cube special abilities
|
||||
// --------------------------------------------------------------------------------
|
||||
void EngulfAndDamage(object oTarget, object oSource)
|
||||
{
|
||||
|
||||
if (ReflexSave(oTarget, 13 + GetHitDice(oSource) - 4, SAVING_THROW_TYPE_NONE,oSource) == 0)
|
||||
{
|
||||
|
||||
FloatingTextStrRefOnCreature(84610,oTarget); // * Engulfed
|
||||
int nDamage = d6(10);
|
||||
|
||||
effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
||||
if (!GetIsImmune(oTarget,IMMUNITY_TYPE_PARALYSIS) )
|
||||
{
|
||||
if (DoCubeParalyze(oTarget,oSource,16))
|
||||
{
|
||||
FloatingTextStrRefOnCreature(84609,oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
effect eSave = EffectVisualEffect(VFX_IMP_REFLEX_SAVE_THROW_USE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eSave,oTarget);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// --------------------------------------------------------------------------------
|
||||
// Georg Zoeller, 2003-09-19
|
||||
// Save DC against Epic Spells is the relevant ability score of the caster
|
||||
// + 20. The hightest ability score of the casting relevants is 99.99% identical
|
||||
// with the one that is used for casting, so we just take it.
|
||||
// if used by a placeable, it is equal to the placeables WILL save field.
|
||||
// --------------------------------------------------------------------------------
|
||||
int GetEpicSpellSaveDC(object oCaster)
|
||||
{
|
||||
|
||||
// * Placeables use their WILL Save field as caster level
|
||||
if (GetObjectType(oCaster) == OBJECT_TYPE_PLACEABLE)
|
||||
{
|
||||
return GetWillSavingThrow(oCaster);
|
||||
}
|
||||
|
||||
int nWis = GetAbilityModifier(ABILITY_WISDOM,oCaster);
|
||||
int nInt = GetAbilityModifier(ABILITY_INTELLIGENCE,oCaster);
|
||||
int nCha = GetAbilityModifier(ABILITY_CHARISMA,oCaster);
|
||||
|
||||
int nHigh = nWis;
|
||||
if (nHigh < nInt)
|
||||
{
|
||||
nHigh = nInt;
|
||||
}
|
||||
if (nHigh < nCha)
|
||||
{
|
||||
nHigh = nCha;
|
||||
}
|
||||
int nRet = 20 + nHigh;
|
||||
return nRet;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// GZ: Sept 2003
|
||||
// Determines the optimal behavior against AoESpell nSpellId for a NPC
|
||||
// use in OnSpellCastAt
|
||||
// --------------------------------------------------------------------------------
|
||||
int GetBestAOEBehavior(int nSpellID)
|
||||
{
|
||||
if (nSpellID == SPELL_GREASE)
|
||||
{
|
||||
if (spellsIsFlying(OBJECT_SELF))
|
||||
return X2_SPELL_AOEBEHAVIOR_IGNORE;
|
||||
}
|
||||
|
||||
if (GetHasSpell(SPELL_GUST_OF_WIND) == TRUE)
|
||||
return X2_SPELL_AOEBEHAVIOR_GUST;
|
||||
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_DISABLE_AI_DISPEL_AOE) == 0 )
|
||||
{
|
||||
if (d100() > GetLocalInt(GetModule(),MODULE_VAR_AI_NO_DISPEL_AOE_CHANCE))
|
||||
{
|
||||
if (GetHasSpell(SPELL_LESSER_DISPEL) == TRUE)
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_L;
|
||||
if (GetHasSpell(SPELL_DISPEL_MAGIC) == TRUE)
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_N;
|
||||
if (GetHasSpell(SPELL_GREATER_DISPELLING) == TRUE)
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_G;
|
||||
if (GetHasSpell(SPELL_MORDENKAINENS_DISJUNCTION) == TRUE)
|
||||
return X2_SPELL_AOEBEHAVIOR_DISPEL_M;
|
||||
}
|
||||
}
|
||||
|
||||
return X2_SPELL_AOEBEHAVIOR_FLEE;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-Oct-15
|
||||
// Removes all effects from nID without paying attention to the caster as
|
||||
// the spell can from only one caster anyway
|
||||
// By default, it will only cancel magical effects
|
||||
//--------------------------------------------------------------------------
|
||||
void GZRemoveSpellEffects(int nID,object oTarget, int bMagicalEffectsOnly = TRUE)
|
||||
{
|
||||
effect eEff = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEff))
|
||||
{
|
||||
if (GetEffectSpellId(eEff) == nID)
|
||||
{
|
||||
if (GetEffectSubType(eEff) != SUBTYPE_MAGICAL && bMagicalEffectsOnly)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveEffect(oTarget,eEff);
|
||||
}
|
||||
}
|
||||
eEff = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ: 2003-Oct-15
|
||||
// A different approach for timing these spells that has the positive side
|
||||
// effects of making the spell dispellable as well.
|
||||
// I am using the VFX applied by the spell to track the remaining duration
|
||||
// instead of adding the remaining runtime on the stack
|
||||
//
|
||||
// This function returns FALSE if a delayed Spell effect from nSpell_ID has
|
||||
// expired. See x2_s0_bigby4.nss for details
|
||||
//------------------------------------------------------------------------------
|
||||
int GZGetDelayedSpellEffectsExpired(int nSpell_ID, object oTarget, object oCaster)
|
||||
{
|
||||
|
||||
if (!GetHasSpellEffect(nSpell_ID,oTarget) )
|
||||
{
|
||||
DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (nSpell_ID));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ: 2003-Oct-15
|
||||
// If the caster is dead or no longer there, cancel the spell, as it is
|
||||
// directed
|
||||
//--------------------------------------------------------------------------
|
||||
if( !GetIsObjectValid(oCaster))
|
||||
{
|
||||
GZRemoveSpellEffects(nSpell_ID, oTarget);
|
||||
DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (nSpell_ID));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (GetIsDead(oCaster))
|
||||
{
|
||||
DeleteLocalInt(oTarget,"XP2_L_SPELL_SAVE_DC_" + IntToString (nSpell_ID));
|
||||
GZRemoveSpellEffects(nSpell_ID, oTarget);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
1458
_removed files/x2_inc_craft.nss
Normal file
1458
_removed files/x2_inc_craft.nss
Normal file
File diff suppressed because it is too large
Load Diff
600
_removed files/x2_inc_switches.nss
Normal file
600
_removed files/x2_inc_switches.nss
Normal file
@@ -0,0 +1,600 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// x2_inc_switches:: Interface for switching subsystem functionality
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file provides a basic interface for switching different Hordes of
|
||||
the Underdark subsystems on/off and allows centralized access to certain
|
||||
"expert" functionality like overriding AI or Spellscripts.
|
||||
|
||||
Changing any of these switches from their default position is considered
|
||||
unsupported and done at your own risk - please do NOT send any bug reports
|
||||
about problems caused by these switches.
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2003 Bioware Corp. * Created By: Georg Zoeller * On: 2003-07-16
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// M O D U L E
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Force Use Magic Device Skillchecks, Default = FALSE except for GAME_DIFFICULTY_CORE_RULES+
|
||||
// * If switched to TRUE, a rogue has to succeed in a UMD check against DC 25+SpellLevel
|
||||
// * in order to use a scroll. See x2_pc_umdcheck.nss for details
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_UMD_SCROLLS = "X2_SWITCH_ENABLE_UMD_SCROLLS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Toggle on/off the Item Creation Feats, Default = O
|
||||
// * Disable the Item Creation Feats that come with Hordes of the Underdark for the
|
||||
// * module.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS = "X2_SWITCH_DISABLE_ITEMCREATION_FEATS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Toggle Area of Effect Spell behaviour
|
||||
// * If set to TRUE, AOE Spells will hurt NPCS that are neutral to the caster if they are
|
||||
// * caught in the effect
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS = "X0_G_ALLOWSPELLSTOHURT";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * For balancing reasons the crafting system will create 50 charges on a new wand
|
||||
// * instead it will create 10 + casterlevel charges. if you want to be "hard core rules compliant"
|
||||
// * 50 charges, enable thiis switch
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES = "X2_SWITCH_ENABLE_50_WAND_CHARGES";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Some epic spells, namely Hellball, do damage to the caster. We found this too confusing
|
||||
// * in testing, so it was disabled. You can reactivate using this flag
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER = "X2_SWITCH_EPIC_SPELLS_HURT_CASTER";
|
||||
|
||||
//------------------------------------------------------------------------------// * Deathless master touch is not supposed to affect creatures of size > large
|
||||
// * but we do not check this condition by default to balance the fact that the slain
|
||||
// * creature is not raised under the command of the pale master.
|
||||
// * by setting this switch to TRUE, the ability will no longer effect creatures of
|
||||
// * huge+ size.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH = "X2_SWITCH_SPELL_CORERULE_DMTOUCH";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * By default, all characters can use the various poisons that can be found to poison their weapons if
|
||||
// * they win a Dex check. Activating this flag will restrict the use of poison to chars with the UsePoison
|
||||
// * feat only
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_RESTRICT_USE_POISON_TO_FEAT = "X2_SWITCH_RESTRICT_USE_POISON_FEAT";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Multiple Henchmen: By default, henchmen will never damage each other with AoE spells.
|
||||
// * By activating this switch, henchmen will be able to damage each other with AoE spells
|
||||
// * and potentially go on each other's throats.
|
||||
// * Warning: Activating this switch has the potential of introducing game breaking bugs. Do
|
||||
// * not use on the official SoU campaign. Use at your own risk. Really, its dangerous!
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_MULTI_HENCH_AOE_DAMAGE = "X2_SWITCH_MULTI_HENCH_AOE_MADNESS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Spell Targeting: Pre Hordes of the underdark, in hardcore mode, creatures would not hurt each other
|
||||
// * with their AOE spells if they were no PCs. Setting this switch to true, will activate the correct
|
||||
// * behaviour. Activating this on older modules can break things, unless you know what you are doing!
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_NPC_AOE_HURT_ALLIES = "X2_SWITCH_ENABLE_NPC_AOE_HURT_ALLIES";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * If set to TRUE, the Bebilith Ruin Armor ability is going to actually destroy
|
||||
// * the armor it hits. Would be very annoying for players...
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_BEBILITH_RUIN_ARMOR = "X2_SWITCH_BEBILITH_HARDCORE_RUIN_ARMOR";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this switch to TRUE will make the Glyph of warding symbol disappear after 6 seconds, but
|
||||
// * the glyph will stay active....
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING = "X2_SWITCH_GLYPH_OF_WARDING_INVISIBLE";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this switch to TRUE will enable the allow NPCs running between waypoints using the WalkWaypoints
|
||||
// * function to cross areas, like they did in the original NWN. This was changed in 1.30 to use only
|
||||
// * waypoints in one area.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS = "X2_SWITCH_CROSSAREA_WALKWAYPOINTS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this switch to TRUE will disable the glow of a newly found secret door
|
||||
// * used in some locations in XP2
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_DISABLE_SECRET_DOOR_FLASH = "X2_SWITCH_DISABLE_SECRET_DOOR_FLASH";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this switch to TRUE will disable execution of tagbased scripts that are enabled
|
||||
// * by default when using the standard module events (x2_mod_def_*)
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS = "X2_SWITCH_ENABLE_TAGBASED_SCRIPTS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting thsi switch to TRUE will enable the XP2 Wandering Monster System
|
||||
// * for this module (if you are using the default rest script and you have set
|
||||
// * up the correct variables for each area
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_USE_XP2_RESTSYSTEM = "X2_SWITCH_ENABLE_XP2_RESTSYSTEM";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * if this variable is set, the AI will not use Dispel Magic against harmfull AOE
|
||||
// * spells.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_DISABLE_AI_DISPEL_AOE = "X2_L_AI_NO_AOE_DISPEL";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this variable to TRUE on the module will disable the call to the
|
||||
// * random loot generation in most creatures' OnSpawn script.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_SWITCH_NO_RANDOM_MONSTER_LOOT = "X2_L_NOTREASURE";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// M I S C
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_VAR_OVERRIDE_SPELLSCRIPT ="X2_S_UD_SPELLSCRIPT";
|
||||
|
||||
const string MODULE_VAR_TAGBASED_SCRIPT_PREFIX ="X2_S_UD_SPELLSCRIPT";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Variable that holds the wandering monster 2da filename
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_VAR_WANDERING_MONSTER_2DA ="X2_WM_2DA_NAME";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * This variable allows to specify a % for NOT using dispel magic against AOEs
|
||||
// instead fleeing
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_VAR_AI_NO_DISPEL_AOE_CHANCE = "X2_L_AI_AOE_DISPEL_CHANCE";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this variable to TRUE will cause the Expertise/Improved Expertise
|
||||
// * modes to be disabled whenever a player is casting a spell.
|
||||
//------------------------------------------------------------------------------
|
||||
const string MODULE_VAR_AI_STOP_EXPERTISE_ABUSE = "X2_L_STOP_EXPERTISE_ABUSE";
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// C R E A T U R E S
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * see x2_ai_demo for details
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_CUSTOM_AISCRIPT = "X2_SPECIAL_COMBAT_AI_SCRIPT";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Setting this variable on a spellcaster creature will make its spelluse a
|
||||
// * bit more random, but their spell selection may not always be appropriate
|
||||
// * to the situation anymore.
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_RANDOMIZE_SPELLUSE = "X2_SPELL_RANDOM";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set to 1 to make the creature activate stealth mode after spawn
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_USE_SPAWN_STEALTH = "X2_L_SPAWN_USE_STEALTH";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set to 1 to make the creature activate detectmode after spawn
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_USE_SPAWN_SEARCH = "X2_L_SPAWN_USE_SEARCH";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set to 1 to make the creature play mobile ambient animations after spawn
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_USE_SPAWN_AMBIENT = "X2_L_SPAWN_USE_AMBIENT";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set to 1 to make the creature play immobile ambient animations after spawn
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE = "X2_L_SPAWN_USE_AMBIENT_IMMOBILE";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set to 1 to make the creature immune to dispel magic (used for statues)
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_IMMUNE_TO_DISPEL = "X1_L_IMMUNE_TO_DISPEL";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set this variable to 1 on a creature to make it walk through other creatures
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_IS_INCORPOREAL = "X2_L_IS_INCORPOREAL";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Set this variable to 1 - 6 to override the number of attacks a creature has based on its BAB
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_NUMBER_OF_ATTACKS = "X2_L_NUMBER_OF_ATTACKS";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * The value of this variable (int) is added to the chance that a creature
|
||||
// * will use magic in combat. Set to 100 for always, 0 for never
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_AI_MODIFIED_MAGIC_RATE = "X2_L_BEH_MAGIC";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * The higher value of this variable, the higher the chance that the creature
|
||||
// * will use offensive abilities in combat. Set to 0 to make them flee.
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_AI_MODIFIED_OFFENSE_RATE = "X2_L_BEH_OFFENSE";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * The higher value of this variable, the higher the chance that the creature
|
||||
// * will aid friendly creatures in combat. Not that helping usually degrades
|
||||
// * the overall difficulty of an encounter, but makes it more interesting.
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_AI_MODIFIED_COMPASSION_RATE = "X2_L_BEH_COMPASSION";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * This allows you to script items that enhance a palemaster's summoned creatures. You need
|
||||
// * to put the name of a script into this variable that will be run on any creature called by
|
||||
// * the pale master's summon undead ability. You can use this script to add effects to the creature.
|
||||
// * You can use the OnEquip/OnUnEquip event hooks set this variable.
|
||||
//------------------------------------------------------------------------------
|
||||
const string CREATURE_VAR_PALE_MASTER_SPECIAL_ITEM = "X2_S_PM_SPECIAL_ITEM";
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// These constants define item messages that are routed to script files with
|
||||
// the item tag's through the default XP2 module scripts.
|
||||
//------------------------------------------------------------------------------
|
||||
const int X2_ITEM_EVENT_ACTIVATE = 0;
|
||||
const int X2_ITEM_EVENT_EQUIP = 1;
|
||||
const int X2_ITEM_EVENT_UNEQUIP = 2;
|
||||
const int X2_ITEM_EVENT_ONHITCAST = 3;
|
||||
const int X2_ITEM_EVENT_ACQUIRE = 4;
|
||||
const int X2_ITEM_EVENT_UNACQUIRE = 5;
|
||||
const int X2_ITEM_EVENT_SPELLCAST_AT = 6;
|
||||
|
||||
const int X2_EXECUTE_SCRIPT_CONTINUE =0;
|
||||
const int X2_EXECUTE_SCRIPT_END =1;
|
||||
|
||||
// Set the active User Defined Item Event
|
||||
// X2_ITEM_EVENT_ACTIVATE
|
||||
// X2_ITEM_EVENT_EQUIP
|
||||
// X2_ITEM_EVENT_UNEQUIP
|
||||
// X2_ITEM_EVENT_ONHITCAST
|
||||
// X2_ITEM_EVENT_ACQUIRE
|
||||
// X2_ITEM_EVENT_UNACQUIRE
|
||||
// X2_ITEM_EVENT_SPELLCAST_AT
|
||||
int SetUserDefinedItemEventNumber(int nEvent);
|
||||
|
||||
// Get the active User Defined Item Event
|
||||
// X2_ITEM_EVENT_ACTIVATE
|
||||
// X2_ITEM_EVENT_EQUIP
|
||||
// X2_ITEM_EVENT_UNEQUIP
|
||||
// X2_ITEM_EVENT_ONHITCAST
|
||||
// X2_ITEM_EVENT_ACQUIRE
|
||||
// X2_ITEM_EVENT_UNACQUIRE
|
||||
// X2_ITEM_EVENT_SPELLCAST_AT
|
||||
int GetUserDefinedItemEventNumber();
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Used to switch between different rule implementations or to subsystems for the game
|
||||
// * see x2_inc_switches for more detailed information on these constants
|
||||
//------------------------------------------------------------------------------
|
||||
void SetModuleSwitch(string sModuleSwitchConstant,int bValue);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Returns the value of a module switch
|
||||
//------------------------------------------------------------------------------
|
||||
int GetModuleSwitchValue(string sModuleSwitchConstant);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// D O O R S
|
||||
//------------------------------------------------------------------------------
|
||||
const string DOOR_FLAG_RESIST_KNOCK = "X2_FLAG_DOOR_RESIST_KNOCK";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Used to toggle custom flags on a door
|
||||
// * oDoor - Door to set the switch on
|
||||
// * Valid values for sDoorFlagConstant:
|
||||
// * X2_FLAG_DOOR_RESIST_KNOCK -
|
||||
// * Set to 1 to prevent knock from working with feedback.
|
||||
// * Set to 2 to prevent knock from working without feedback
|
||||
//------------------------------------------------------------------------------
|
||||
void SetDoorFlag(object oDoor, string sDoorFlagConstant, int nValue);
|
||||
int GetDoorFlag(object oDoor, string sDoorFlagConstant);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// W A Y P O I N T S
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * By setting this variable to 1 on a waypoint, a creature using this
|
||||
// * waypoint as part of its WalkWaypoints routine will assume the facing
|
||||
// * of the waypoint upon reaching it.
|
||||
//------------------------------------------------------------------------------
|
||||
const string WAYPOINT_VAR_FORCE_SETFACING = "X2_L_WAYPOINT_SETFACING";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// I T E M S
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// NOTE: THIS NO LONGER WORKS. TO PREVENT MODIFICATION USE THE PLOT FLAG
|
||||
//------------------------------------------------------------------------------
|
||||
const string ITEM_FLAG_NO_CRAFT_MODIFICATION = "X2_FLAG_ITEM_CRAFT_DO_NOT_MODIFY";
|
||||
void SetItemFlag(object oItem, string sItemFlagConstant, int nValue);
|
||||
int GetItemFlag(object oItem, string sItemFlagConstant);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Execute sScript on oTarget returning an integer.
|
||||
// * Do not nest this function
|
||||
//------------------------------------------------------------------------------
|
||||
int ExecuteScriptAndReturnInt(string sScript, object oTarget);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Sets the return value for scripts called via ExecuteScriptAndReturnInt
|
||||
// * valid values are
|
||||
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed scriptis done
|
||||
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
|
||||
//------------------------------------------------------------------------------
|
||||
void SetExecutedScriptReturnValue(int nValue = X2_EXECUTE_SCRIPT_END);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * This is a security feature. If you are running a *local vault* server and you
|
||||
// * have tag based script execution enabled, people could bring items into your
|
||||
// * game that execute existing scripts. You can set a script prefix here to
|
||||
// * prevent that. Note that you have to add this prefix to your item scripts in
|
||||
// * the module to make them work.
|
||||
//------------------------------------------------------------------------------
|
||||
void SetUserDefinedItemEventPrefix(string sPrefix="");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// S P E L L S C R I P T S
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Allows the module creator to specify a script that will be run before any spellscript is run
|
||||
// You can call SetModuleOverrideSpellscript() at the end of the script specified by
|
||||
// sScriptName. If you call this function this will prevent the original spellscript
|
||||
// (and all craft item code) from being executed.
|
||||
// If you do not add this line, the original spellscript and/or crafting code will
|
||||
// run in addition to your script
|
||||
//------------------------------------------------------------------------------
|
||||
void SetModuleOverrideSpellscript(string sScriptName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// C R E A T U R E S
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void SetCreatureFlag(object oCreature, string sFlag, int nValue);
|
||||
int GetCreatureFlag(object oCreature, string sFlag);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Define a replacement script for DetermineCombatRound
|
||||
// * See x2_ai_demo for details
|
||||
//------------------------------------------------------------------------------
|
||||
void SetCreatureOverrideAIScript(object oCreature, string sScriptName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Call this at end of your custom override AI script set via CREATURE_VAR_CUSTOM_AISCRIPT
|
||||
// * See x2_ai_demo for details.
|
||||
//------------------------------------------------------------------------------
|
||||
void SetCreatureOverrideAIScriptFinished(object oCreature = OBJECT_SELF);
|
||||
void ClearCreatureOverrideAIScriptTarget(object oCreature = OBJECT_SELF);
|
||||
object GetCreatureOverrideAIScriptTarget(object oCreature = OBJECT_SELF);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// * Define the name of the 2da file which is used for the wandering monster
|
||||
// * system
|
||||
//------------------------------------------------------------------------------
|
||||
void SetWanderingMonster2DAFile(string s2DAName = "des_restsystem");
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Interface to switch on / off specific subsystems or behaviors
|
||||
// Check X2_INC_SWITCHES.NSS for details
|
||||
//----------------------------------------------------------------------------
|
||||
void SetModuleSwitch(string sModuleSwitchConstant,int bValue)
|
||||
{
|
||||
if (bValue == 0)
|
||||
{
|
||||
DeleteLocalInt (GetModule(),sModuleSwitchConstant);
|
||||
return;
|
||||
} else if ((sModuleSwitchConstant) == MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS && bValue == TRUE)
|
||||
{
|
||||
bValue = 10;
|
||||
}
|
||||
SetLocalInt (GetModule(),sModuleSwitchConstant, bValue);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Return the value of a module switch set by SetModuleSwitch
|
||||
// See X2_INC_SWITCHES for a list of all module switches
|
||||
//----------------------------------------------------------------------------
|
||||
int GetModuleSwitchValue(string sModuleSwitchConstant)
|
||||
{
|
||||
int nRet = GetLocalInt (GetModule(),sModuleSwitchConstant);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
void SetDoorFlag(object oDoor, string sDoorFlagConstant, int nValue)
|
||||
{
|
||||
if (nValue == 0)
|
||||
{
|
||||
DeleteLocalInt (oDoor,sDoorFlagConstant);
|
||||
return;
|
||||
}
|
||||
SetLocalInt (oDoor,sDoorFlagConstant, nValue);
|
||||
}
|
||||
|
||||
int GetDoorFlag(object oDoor, string sDoorFlagConstant)
|
||||
{
|
||||
int nRet = GetLocalInt (oDoor,sDoorFlagConstant);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
void SetItemFlag(object oItem, string sItemFlagConstant, int nValue)
|
||||
{
|
||||
if (nValue == 0)
|
||||
{
|
||||
DeleteLocalInt (oItem,sItemFlagConstant);
|
||||
return;
|
||||
}
|
||||
SetLocalInt (oItem,sItemFlagConstant, nValue);
|
||||
}
|
||||
|
||||
int GetItemFlag(object oItem, string sItemFlagConstant)
|
||||
{
|
||||
int nRet = GetLocalInt (oItem,sItemFlagConstant);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
void SetModuleOverrideSpellscript(string sScriptName)
|
||||
{
|
||||
SetLocalString(GetModule(),MODULE_VAR_OVERRIDE_SPELLSCRIPT,sScriptName);
|
||||
}
|
||||
|
||||
string GetModuleOverrideSpellscript()
|
||||
{
|
||||
string sScript = GetLocalString(GetModule(),"X2_S_UD_SPELLSCRIPT");
|
||||
return sScript;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// You can call this in our overridden spellscript. If you call this
|
||||
// this will prevent the original spellscript (and all craft item code)
|
||||
// from being executed. If you do not add this line, the original spellscript
|
||||
// and/or crafting code will run in addition to your script
|
||||
//------------------------------------------------------------------------------
|
||||
void SetModuleOverrideSpellScriptFinished()
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"X2_L_BLOCK_LAST_SPELL",TRUE);
|
||||
}
|
||||
|
||||
int GetModuleOverrideSpellScriptFinished()
|
||||
{
|
||||
int nRet = GetLocalInt(OBJECT_SELF,"X2_L_BLOCK_LAST_SPELL");
|
||||
DeleteLocalInt(OBJECT_SELF,"X2_L_BLOCK_LAST_SPELL");
|
||||
return nRet;
|
||||
}
|
||||
|
||||
void SetCreatureOverrideAIScript(object oCreature, string sScriptName)
|
||||
{
|
||||
SetLocalString(oCreature,CREATURE_VAR_CUSTOM_AISCRIPT,sScriptName);
|
||||
}
|
||||
|
||||
void SetCreatureOverrideAIScriptFinished(object oCreature = OBJECT_SELF)
|
||||
{
|
||||
// WriteTimestampedLogEntry("Custom AI Finished");
|
||||
SetLocalInt(oCreature,"X2_SPECIAL_COMBAT_AI_SCRIPT_OK",TRUE);
|
||||
}
|
||||
|
||||
object GetCreatureOverrideAIScriptTarget(object oCreature = OBJECT_SELF)
|
||||
{
|
||||
object oRet= GetLocalObject(oCreature,"X2_NW_I0_GENERIC_INTRUDER");
|
||||
return oRet;
|
||||
}
|
||||
|
||||
void ClearCreatureOverrideAIScriptTarget(object oCreature = OBJECT_SELF)
|
||||
{
|
||||
DeleteLocalObject(oCreature,"X2_NW_I0_GENERIC_INTRUDER");
|
||||
}
|
||||
|
||||
void SetCreatureFlag(object oCreature, string sFlag, int nValue)
|
||||
{
|
||||
if (sFlag == CREATURE_VAR_IMMUNE_TO_DISPEL)
|
||||
{
|
||||
if (nValue != 0)
|
||||
{
|
||||
nValue = 10;
|
||||
}
|
||||
}
|
||||
|
||||
SetLocalInt(oCreature,sFlag ,nValue);
|
||||
}
|
||||
|
||||
int GetCreatureFlag(object oCreature, string sFlag)
|
||||
{
|
||||
int nRet = GetLocalInt(oCreature,sFlag);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Get the current UserDefined Item Event Number
|
||||
// X2_ITEM_EVENT_ACTIVATE
|
||||
// X2_ITEM_EVENT_EQUIP
|
||||
// X2_ITEM_EVENT_UNEQUIP
|
||||
// X2_ITEM_EVENT_ONHITCAST
|
||||
// X2_ITEM_EVENT_ACQUIRE
|
||||
// X2_ITEM_EVENT_UNACQUIRE
|
||||
// X2_ITEM_EVENT_SPELLCAST_AT
|
||||
//----------------------------------------------------------------------------
|
||||
int GetUserDefinedItemEventNumber()
|
||||
{
|
||||
return GetLocalInt(OBJECT_SELF,"X2_L_LAST_ITEM_EVENT");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Set the current UserDefined Item Event Number
|
||||
// X2_ITEM_EVENT_ACTIVATE
|
||||
// X2_ITEM_EVENT_EQUIP
|
||||
// X2_ITEM_EVENT_UNEQUIP
|
||||
// X2_ITEM_EVENT_ONHITCAST
|
||||
// X2_ITEM_EVENT_ACQUIRE
|
||||
// X2_ITEM_EVENT_UNACQUIRE
|
||||
// X2_ITEM_EVENT_SPELLCAST_AT
|
||||
//----------------------------------------------------------------------------
|
||||
void SetUserDefinedItemEventNumber(int nEvent)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"X2_L_LAST_ITEM_EVENT",nEvent);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Returns the name for the User Defined Item Event script for oItem,
|
||||
// including possible prefixes configured by SetUserDefinedItemEventPrefix
|
||||
//----------------------------------------------------------------------------
|
||||
string GetUserDefinedItemEventScriptName(object oItem)
|
||||
{
|
||||
string sPrefix = GetLocalString(GetModule(),"MODULE_VAR_TAGBASED_SCRIPT_PREFIX");
|
||||
string sTag = sPrefix + GetTag(oItem);
|
||||
return sTag;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// You can define a prefix for any User Defined Item Event here, to prevent
|
||||
// people from executing scripts you do not like them to execute on your
|
||||
// local vault server
|
||||
//----------------------------------------------------------------------------
|
||||
void SetUserDefinedItemEventPrefix(string sPrefix="")
|
||||
{
|
||||
SetLocalString(GetModule(),"MODULE_VAR_TAGBASED_SCRIPT_PREFIX",sPrefix);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Wrapper for Execute Script to execute a script and get an integer
|
||||
// return value. Do not nest this function!
|
||||
//----------------------------------------------------------------------------
|
||||
int ExecuteScriptAndReturnInt(string sScript, object oTarget)
|
||||
{
|
||||
DeleteLocalInt(oTarget,"X2_L_LAST_RETVAR");
|
||||
ExecuteScript(sScript,oTarget);
|
||||
int nRet = GetLocalInt(oTarget,"X2_L_LAST_RETVAR");
|
||||
DeleteLocalInt(oTarget,"X2_L_LAST_RETVAR");
|
||||
return nRet;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Helper function for ExecuteScriptAndReturnInt
|
||||
//----------------------------------------------------------------------------
|
||||
void SetExecutedScriptReturnValue(int nValue = X2_EXECUTE_SCRIPT_CONTINUE)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"X2_L_LAST_RETVAR",nValue);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Define the name of the 2da file which is used for the wandering monster
|
||||
// system
|
||||
//----------------------------------------------------------------------------
|
||||
void SetWanderingMonster2DAFile(string s2DAName = "des_restsystem")
|
||||
{
|
||||
SetLocalString(OBJECT_SELF,MODULE_VAR_WANDERING_MONSTER_2DA,s2DAName);
|
||||
}
|
||||
BIN
_removed files/x2_s2_discbreath.ncs
Normal file
BIN
_removed files/x2_s2_discbreath.ncs
Normal file
Binary file not shown.
119
_removed files/x2_s2_discbreath.nss
Normal file
119
_removed files/x2_s2_discbreath.nss
Normal file
@@ -0,0 +1,119 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Breath Weapon for Dragon Disciple Class
|
||||
//:: x2_s2_discbreath
|
||||
//:: Copyright (c) 2003Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
Damage Type is Fire
|
||||
Save is Reflex
|
||||
Shape is cone, 30' == 10m
|
||||
|
||||
Level Damage Save
|
||||
---------------------------
|
||||
3 2d10 19
|
||||
7 4d10 19
|
||||
10 6d10 19
|
||||
|
||||
after 10:
|
||||
damage: 6d10 + 1d10 per 3 levels after 10
|
||||
savedc: increasing by 1 every 4 levels after 10
|
||||
|
||||
|
||||
|
||||
*/
|
||||
//:://///////////////////////////////////////////
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: June, 17, 2003
|
||||
//:://///////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
|
||||
int nType = GetSpellId();
|
||||
object oKey = GetItemPossessedBy(OBJECT_SELF,"wkdkey");
|
||||
int nDamageDice;
|
||||
int nSaveDC = 19;
|
||||
|
||||
int nLevel = GetLevelByClass(37,OBJECT_SELF);// 37 = red dragon disciple
|
||||
|
||||
if (nLevel <7)
|
||||
{
|
||||
nDamageDice = 2;
|
||||
}
|
||||
else if (nLevel <10)
|
||||
{
|
||||
nDamageDice = 4;
|
||||
}
|
||||
else if (nLevel ==10)
|
||||
{
|
||||
nDamageDice = 6;
|
||||
}
|
||||
else if(oKey != OBJECT_INVALID)
|
||||
{
|
||||
nDamageDice = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamageDice = 6+((nLevel -10)/3);
|
||||
nSaveDC = nSaveDC + ((nLevel -10)/4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int nDamage = d10(nDamageDice);
|
||||
|
||||
//Declare major variables
|
||||
float fDelay;
|
||||
object oTarget;
|
||||
effect eVis, eBreath;
|
||||
|
||||
int nPersonalDamage;
|
||||
|
||||
eVis = EffectVisualEffect(494);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,eVis,GetSpellTargetLocation());
|
||||
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation(), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
nPersonalDamage = nDamage;
|
||||
if(oTarget != OBJECT_SELF && !GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
|
||||
if(MySavingThrow(SAVING_THROW_REFLEX, oTarget, nSaveDC, SAVING_THROW_TYPE_FIRE))
|
||||
{
|
||||
nPersonalDamage = nPersonalDamage/2;
|
||||
if(GetHasFeat(FEAT_EVASION, oTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nPersonalDamage = 0;
|
||||
}
|
||||
}
|
||||
else if(GetHasFeat(FEAT_IMPROVED_EVASION, oTarget))
|
||||
{
|
||||
nPersonalDamage = nPersonalDamage/2;
|
||||
}
|
||||
if (nPersonalDamage > 0)
|
||||
{
|
||||
//Set Damage and VFX
|
||||
eBreath = EffectDamage(nPersonalDamage, DAMAGE_TYPE_FIRE);
|
||||
eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBreath, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPELLCONE, 10.0, GetSpellTargetLocation(), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
_removed files/x2_s2_hellball.ncs
Normal file
BIN
_removed files/x2_s2_hellball.ncs
Normal file
Binary file not shown.
148
_removed files/x2_s2_hellball.nss
Normal file
148
_removed files/x2_s2_hellball.nss
Normal file
@@ -0,0 +1,148 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hellball
|
||||
//:: X2_S2_HELLBALL
|
||||
//:: Copyright (c) 2003 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Long range area of effect spell
|
||||
10d6 sonic, acid, fire and lightning damage to all
|
||||
objects in the area
|
||||
|
||||
10d6 points of negative energy damage to caster
|
||||
if MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER switch
|
||||
was enabled on the module.
|
||||
|
||||
This spell is supposed to hurt the caster if he
|
||||
is stupid enough to stand in the area of effect
|
||||
when all hell breaks loose. It will hurt other
|
||||
players allied with the caster as well. These
|
||||
effects are dependent on your difficulty setting
|
||||
|
||||
Save is 20 + relevant ability score, or, when cast
|
||||
by a placeable, equal to the placeables WILL Save
|
||||
|
||||
There is no benefit from the evasion feats here
|
||||
as the are of the spell is too large to avoid it
|
||||
|
||||
|
||||
*/
|
||||
//:://///////////////////////////////////////////
|
||||
//:: Created By: Andrew Noobs, Georg Zoeller
|
||||
//:: Created On: 2003-08-20
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
#include "X0_I0_SPELLS"
|
||||
#include "x2_i0_spells"
|
||||
#include "x2_inc_spellhook"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nDamage1, nDamage2, nDamage3, nDamage4, nDamage6;
|
||||
float fDelay;
|
||||
effect eExplode = EffectVisualEffect(464);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_ACID_L);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
|
||||
int nSpellDC = GetEpicSpellSaveDC(OBJECT_SELF);
|
||||
|
||||
// if this option has been enabled, the caster will take damage for casting
|
||||
// epic spells, as descripbed in the ELHB
|
||||
if (GetModuleSwitchValue( MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER) == TRUE)
|
||||
{
|
||||
effect eCast = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
int nDamage5 = d6(10);
|
||||
effect eDam5 = EffectDamage(nDamage5, DAMAGE_TYPE_NEGATIVE);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eCast, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam5, OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
|
||||
effect eDam1, eDam2, eDam3, eDam4, eDam5, eDam6, eKnock;
|
||||
eKnock= EffectKnockdown();
|
||||
|
||||
location lTarget = GetSpellTargetLocation();
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 25.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
|
||||
int nTotalDamage;
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
|
||||
fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/25 + 0.5f;
|
||||
//Roll damage for each target
|
||||
nDamage1 = d8(20);
|
||||
nDamage2 = d8(20);
|
||||
nDamage3 = d8(20);
|
||||
nDamage4 = d8(20);
|
||||
nDamage6 = d10(30);
|
||||
// no we don't care about evasion. there is no evasion to hellball
|
||||
if (MySavingThrow(SAVING_THROW_REFLEX,oTarget,nSpellDC,SAVING_THROW_TYPE_SPELL,OBJECT_SELF,fDelay) >0)
|
||||
{
|
||||
nDamage1 /=2;
|
||||
nDamage2 /=2;
|
||||
nDamage3 /=2;
|
||||
nDamage4 /=2;
|
||||
nDamage6 /=2;
|
||||
}
|
||||
nTotalDamage = nDamage1+nDamage2+nDamage3+nDamage4;
|
||||
//Set the damage effect
|
||||
eDam1 = EffectDamage(nDamage1, DAMAGE_TYPE_ACID);
|
||||
eDam2 = EffectDamage(nDamage2, DAMAGE_TYPE_ELECTRICAL);
|
||||
eDam3 = EffectDamage(nDamage3, DAMAGE_TYPE_FIRE);
|
||||
eDam4 = EffectDamage(nDamage4, DAMAGE_TYPE_SONIC);
|
||||
eDam6 = EffectDamage(nDamage6, DAMAGE_TYPE_NEGATIVE);
|
||||
|
||||
if(nTotalDamage > 0)
|
||||
{
|
||||
if (nTotalDamage > 5)
|
||||
{
|
||||
DelayCommand(fDelay+0.3f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eKnock, oTarget,3.0f));
|
||||
}
|
||||
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam1, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam2, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam3, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam4, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam6, 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+0.2f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
DelayCommand(fDelay+0.5f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget));
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 25.0f, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user