Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
59
trunk/spells/nw_s0_mordswrd.nss
Normal file
59
trunk/spells/nw_s0_mordswrd.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Mordenkainen's Sword
|
||||
//:: NW_S0_MordSwrd.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Summons a Helmed Horror to battle for the caster
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Oct 29, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION);
|
||||
/*
|
||||
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 nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDuration = PRCGetCasterLevel(OBJECT_SELF);
|
||||
effect eSummon = EffectSummonCreature("NW_S_HelmHorr");
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3);
|
||||
//Make metamagic check for extend
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Apply the VFX impact and summon effect
|
||||
MultisummonPreSummon();
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eVis, PRCGetSpellTargetLocation());
|
||||
float fDuration = RoundsToSeconds(nDuration);
|
||||
if(GetPRCSwitch(PRC_SUMMON_ROUND_PER_LEVEL))
|
||||
fDuration = RoundsToSeconds(nDuration*GetPRCSwitch(PRC_SUMMON_ROUND_PER_LEVEL));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, PRCGetSpellTargetLocation(), fDuration);
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
Reference in New Issue
Block a user