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:
79
_module/nss/fr_s2_wildsh_org.nss
Normal file
79
_module/nss/fr_s2_wildsh_org.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wild Shape
|
||||
//:: NW_S2_WildShape
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Allows the Druid to change into animal forms.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 22, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nSpell = GetSpellId();
|
||||
object oTarget = GetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_POLYMORPH);
|
||||
effect ePoly;
|
||||
int nPoly;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nDuration = GetLevelByClass(CLASS_TYPE_DRUID);
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//Determine Polymorph subradial type
|
||||
if(nSpell == 401)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BROWN_BEAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BROWN_BEAR;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 402)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_PANTHER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_PANTHER;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 403)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_WOLF;
|
||||
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_WOLF;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 404)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BOAR;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BOAR;
|
||||
}
|
||||
}
|
||||
else if (nSpell == 405)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_BADGER;
|
||||
if (nDuration >= 12)
|
||||
{
|
||||
nPoly = POLYMORPH_TYPE_DIRE_BADGER;
|
||||
}
|
||||
}
|
||||
ePoly = EffectPolymorph(nPoly);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_WILD_SHAPE, FALSE));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePoly, OBJECT_SELF, HoursToSeconds(nDuration));
|
||||
}
|
||||
Reference in New Issue
Block a user