PRC8_fork/nwn/nwnprc/trunk/smp/phs_s_overldflia.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

50 lines
1.7 KiB
Plaintext

/*:://////////////////////////////////////////////
//:: Spell Name Overland Flight - Fly
//:: Spell FileName PHS_S_OverldFliA
//:://////////////////////////////////////////////
//:: Spell Effects Applied / Notes
//:://////////////////////////////////////////////
As Fly, except a 40M range, and only targetable on self.
Fairly simple. Uses a similar "Fly" thing, but a seperate power on the
class item, as it is a longer range.
//:://////////////////////////////////////////////
//:: Created By: Jasperre
//::////////////////////////////////////////////*/
#include "PHS_INC_SPELLS"
void main()
{
// Declare major variables
object oCaster = OBJECT_SELF;
location lTarget = GetSpellTargetLocation();
location lCaster = GetLocation(oCaster);
object oArea = GetArea(oCaster);
// Duration takes 1 round, 6 seconds, plus Distance/10 to fly there.
float fDuration = 6.0 + GetDistanceBetweenLocations(lTarget, lCaster) / 10;
// Declare effects
effect eDur = EffectDisappearAppear(lTarget, 1);
// Must have the effects of any of the flying spells
if(!GetHasSpellEffect(PHS_SPELL_OVERLAND_FLIGHT, oCaster))
{
FloatingTextStringOnCreature("*You cannot fly using this without overland flight cast on you*", oCaster, FALSE);
return;
}
// Make sure we can teleport
if(!PHS_CannotTeleport(oCaster, lTarget))
{
// Must be outdoors not underground
if(GetIsAreaAboveGround(oArea) == AREA_ABOVEGROUND &&
GetIsAreaInterior(oArea) == FALSE)
{
// Jump to the target location with visual effects
PHS_ApplyDuration(oCaster, eDur, fDuration);
}
}
}