67 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
//::///////////////////////////////////////////////
 | 
						|
//:: One with the Land
 | 
						|
//:: x0_s0_oneland.nss
 | 
						|
//:: Copyright (c) 2002 Bioware Corp.
 | 
						|
//:://////////////////////////////////////////////
 | 
						|
/*
 | 
						|
 bonus +3: animal empathy, move silently, search, hide
 | 
						|
 Duration: 1 hour/level
 | 
						|
*/
 | 
						|
//:://////////////////////////////////////////////
 | 
						|
//:: Created By: Brent Knowles
 | 
						|
//:: Created On: July 19, 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 = GetSpellTargetObject();
 | 
						|
    effect eVis = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
 | 
						|
    effect eDam = EffectDamageReduction(5, DAMAGE_POWER_PLUS_EIGHTEEN);
 | 
						|
    effect eSpell = EffectSpellLevelAbsorption(1);
 | 
						|
    effect eConceal = EffectConcealment(20);
 | 
						|
    effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
 | 
						|
    effect eLink = EffectLinkEffects(eDam, eVis);
 | 
						|
    eLink = EffectLinkEffects(eLink, eSpell);
 | 
						|
    eLink = EffectLinkEffects(eLink, eConceal);
 | 
						|
    eLink = EffectLinkEffects(eLink, eDur);
 | 
						|
    int nMetaMagic = GetMetaMagicFeat();
 | 
						|
    int nDuration = GetCasterLevel(OBJECT_SELF);
 | 
						|
    //Fire cast spell at event for the specified target
 | 
						|
    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GHOSTLY_VISAGE, FALSE));
 | 
						|
 | 
						|
    //Enter Metamagic conditions
 | 
						|
    if (nMetaMagic == METAMAGIC_EXTEND)
 | 
						|
    {
 | 
						|
        nDuration = nDuration *2; //Duration is +100%
 | 
						|
    }
 | 
						|
    //Apply the VFX impact and effects
 | 
						|
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |