gargoyle flyspell

This commit is contained in:
Mark Sturgill 2013-11-05 12:15:29 -07:00
parent 1fdb2d9a1f
commit e319713571
2 changed files with 102 additions and 0 deletions

View file

@ -3157,6 +3157,7 @@
<Compile Include="Spells\Fourth\Lightning.cs" />
<Compile Include="Spells\Fourth\ManaDrain.cs" />
<Compile Include="Spells\Fourth\Recall.cs" />
<Compile Include="Spells\Gargoyle\SpellDefinitions\FlySpell.cs" />
<Compile Include="Spells\Initializer.cs" />
<Compile Include="Spells\Necromancy\AnimateDeadSpell.cs" />
<Compile Include="Spells\Necromancy\BloodOathSpell.cs" />

101
Scripts/Spells/FlySpell.cs Normal file
View file

@ -0,0 +1,101 @@
using System;
namespace Server.Spells
{
public class FlySpell : Spell
{
private static readonly SpellInfo m_Info = new SpellInfo("Gargoyle Flight", null, -1, 9002);
private bool m_Stop;
public FlySpell(Mobile caster)
: base(caster, null, m_Info)
{
}
public override bool ClearHandsOnCast
{
get
{
return false;
}
}
public override bool RevealOnCast
{
get
{
return false;
}
}
public override double CastDelayFastScalar
{
get
{
return 0;
}
}
public override TimeSpan CastDelayBase
{
get
{
return TimeSpan.FromSeconds(.25);
}
}
public override TimeSpan GetCastRecovery()
{
return TimeSpan.Zero;
}
public override int GetMana()
{
return 0;
}
public override bool ConsumeReagents()
{
return true;
}
public override bool CheckFizzle()
{
return true;
}
public void Stop()
{
this.m_Stop = true;
this.Disturb(DisturbType.Hurt, false, false);
}
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable)
{
if (type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/)
return false;
return true;
}
public override void DoHurtFizzle()
{
}
public override void DoFizzle()
{
}
public override void OnDisturb(DisturbType type, bool message)
{
if (message && !this.m_Stop)
this.Caster.SendLocalizedMessage(1113192); // You have been disrupted while attempting to fly!
}
public override void OnCast()
{
this.Caster.Flying = false;
BuffInfo.RemoveBuff(this.Caster, BuffIcon.Fly);
this.Caster.Animate(60, 10, 1, true, false, 0);
this.Caster.SendLocalizedMessage(1112567); // You are flying.
this.Caster.Flying = true;
BuffInfo.AddBuff(this.Caster, new BuffInfo(BuffIcon.Fly, 1112567));
this.FinishSequence();
}
}
}