Initial upload

Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
Jaysyn904
2024-03-11 23:44:08 -04:00
parent c4b5794c59
commit 7b9e44ebbb
11454 changed files with 10436475 additions and 0 deletions

125
_working/nw_s0_shadconj.nss Normal file
View File

@@ -0,0 +1,125 @@
///::///////////////////////////////////////////////
//:: Shadow Conjuration
//:: NW_S0_ShadConj.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
If the opponent is clicked on Shadow Bolt is cast.
If the caster clicks on himself he will cast
Mage Armor and Mirror Image. If they click on
the ground they will summon a Shadow.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 12, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 25, 2001
#include "x0_i0_spells"
#include "x2_inc_spellhook"
void ShadowBolt (object oTarget, int nMetaMagic);
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())
{
return;
}
// End of Spell Cast Hook
int nMetaMagic = GetMetaMagicFeat();
object oTarget = GetSpellTargetObject();
int nCast;
int nDuration = GetCasterLevel(OBJECT_SELF);
effect eVis;
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
if (GetIsObjectValid(oTarget))
{
if (oTarget == OBJECT_SELF)
{
nCast = 1;
eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
effect eAC = EffectACIncrease(4, AC_NATURAL_BONUS);
effect eMirror = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
effect eLink = EffectLinkEffects(eAC, eMirror);
eLink = EffectLinkEffects(eLink, eVis);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, RoundsToSeconds(nDuration*3));
}
else
{
nCast = 2;
if (!ResistSpell(OBJECT_SELF, oTarget))
{
ShadowBolt(oTarget, nMetaMagic);
}
}
}
else
{
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
// }
eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
effect eSummon = EffectSummonCreature("sbio_shadow");
if (nDuration<4)
{
nDuration=4;
}
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), RoundsToSeconds(nDuration));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
nCast = 3;
}
}
void ShadowBolt (object oTarget, int nMetaMagic)
{
int nDamage;
int nBolts = GetCasterLevel(OBJECT_SELF)/5;
int nCnt;
effect eVis2 = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eDam;
for (nCnt = 0; nCnt < nBolts; nCnt++)
{
int nDam = d6(2);
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_MAXIMIZE)
{
nDamage = 12;//Damage is at max
}
else if (nMetaMagic == METAMAGIC_EMPOWER)
{
nDamage = nDamage + nDamage/2; //Damage/Healing is +50%
}
if (ReflexSave(oTarget, GetSpellSaveDC()))
{
nDamage = nDamage/2;
}
eDam = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}
}