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:
70
_removed/x0_s0_shield.nss
Normal file
70
_removed/x0_s0_shield.nss
Normal file
@@ -0,0 +1,70 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: Shield
|
||||
//:: x0_s0_shield.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Immune to magic Missile
|
||||
+4 general AC
|
||||
DIFFERENCES: should be +7 against one opponent
|
||||
but this cannot be done.
|
||||
Duration: 1 turn/level
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent Knowles
|
||||
//:: Created On: July 15, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Update By: Andrew Nobbs May 01, 2003
|
||||
#include "NW_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())
|
||||
{
|
||||
// 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 = OBJECT_SELF;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
|
||||
effect eArmor = EffectACIncrease(4, AC_DEFLECTION_BONUS);
|
||||
effect eSpell = EffectSpellImmunity(SPELL_MAGIC_MISSILE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_GLOBE_MINOR);
|
||||
|
||||
effect eLink = EffectLinkEffects(eArmor, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eSpell);
|
||||
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF); // * Duration 1 turn
|
||||
if (nMetaMagic == METAMAGIC_EXTEND) //Duration is +100%
|
||||
{
|
||||
nDuration = nDuration * 2;
|
||||
}
|
||||
//Fire spell cast at event for target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, 417, FALSE));
|
||||
|
||||
RemoveEffectsFromSpell(OBJECT_SELF, GetSpellId());
|
||||
|
||||
//Apply VFX impact and bonus effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user