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:
61
_working/nw_s0_premo.nss
Normal file
61
_working/nw_s0_premo.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: 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 "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())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
//Declare major variables
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nDamage=nDuration*10;
|
||||
if (nDamage>150)
|
||||
{
|
||||
nDamage=150;
|
||||
}
|
||||
int nLimit = nDuration * 10;
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
effect eStone = EffectDamageReduction(30, DAMAGE_POWER_PLUS_FIVE, nDamage);
|
||||
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(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_PREMONITION, FALSE));
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
RemoveEffectsFromSpell(OBJECT_SELF, SPELL_PREMONITION);
|
||||
|
||||
//Apply the linked effect
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, OBJECT_SELF, TurnsToSeconds(nDuration));
|
||||
}
|
||||
Reference in New Issue
Block a user