Added ACP v4.1
Added ACP v4.1. Full compile. Updated module name. Updated release archive.
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: [Endurance]
|
||||
//:: [NW_S0_Endurce.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Gives the target 1d4+1 Constitution.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 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();
|
||||
effect eCon;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
int nCasterLvl = GetCasterLevel(OBJECT_SELF);
|
||||
int nModify = d4() + 1;
|
||||
float fDuration = HoursToSeconds(nCasterLvl);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENDURANCE, FALSE));
|
||||
//Check for metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nModify = 5;
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nModify = FloatToInt( IntToFloat(nModify) * 1.5 );
|
||||
}
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
fDuration = fDuration * 2.0;
|
||||
}
|
||||
//Set the ability bonus effect
|
||||
eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION,nModify);
|
||||
effect eLink = EffectLinkEffects(eCon, eDur);
|
||||
|
||||
//Appyly the VFX impact and ability bonus effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
Reference in New Issue
Block a user