generated from Jaysyn/ModuleTemplate
2025/12/24 Update
Hooked up new GUI module event. Updated PRC8 includes. Updated "_removed". Updated nasher.cfg
This commit is contained in:
86
src/_removed/original spells/nw_s0_rayfrost.nss
Normal file
86
src/_removed/original spells/nw_s0_rayfrost.nss
Normal file
@@ -0,0 +1,86 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Ray of Frost
|
||||
//:: [NW_S0_RayFrost.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
If the caster succeeds at a ranged touch attack
|
||||
the target takes 1d4 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: feb 4, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Bug Fix: Andrew Nobbs, April 17, 2003
|
||||
//:: Notes: Took out ranged attack roll.
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
#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 oPC = GetFirstPC();
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nInt=GetLocalInt(oPC, "Underwater");
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
|
||||
int nDam = d4(1) + 1;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
effect eRay = EffectBeam(VFX_BEAM_COLD, OBJECT_SELF, BODY_NODE_HAND);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RAY_OF_FROST));
|
||||
eRay = EffectBeam(VFX_BEAM_COLD, OBJECT_SELF, BODY_NODE_HAND);
|
||||
//Make SR Check
|
||||
if(!MyResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDam = 5 ;//Damage is at max
|
||||
}
|
||||
else if (nMetaMagic == METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDam = nDam + nDam/2; //Damage/Healing is +50%
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = EffectDamage(nDam, DAMAGE_TYPE_COLD);
|
||||
//Apply the VFX impact and damage effect (reflected upon PC)
|
||||
if (nInt == 1)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oCaster);
|
||||
FloatingTextStringOnCreature("The spell 'Ray of Frost' is reflected underwater!", oPC);
|
||||
}
|
||||
//Normal spell effects.
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7);
|
||||
}
|
||||
Reference in New Issue
Block a user