ModernUO/Scripts/Spells/Necromancy/NecromancerSpell.cs
eos 99b0ad9de5 - Fixed the Palace of Paroxysmus region bounds.
- Fixed a typo in the Huntsman's Forest region name.
- Added the Bravehorn's drinking pool and Huntsman's Forest quest regions to Felucca.
- Fixed CheckObjectTypes not sending invalid condition replies, because the commands are not always flushed after checking this.
- When using an item condition with [online or [ipaddress, the command will now correctly say it does not support items.
- The [Go menu now handles comments in the XML location files correctly.
- Added the Increased Karma Loss attribute.
- Renamed DummyTheif to DummyThief.
2012-05-20 02:35:53 +00:00

59 lines
No EOL
1.8 KiB
C#

using System;
using Server;
using Server.Items;
namespace Server.Spells.Necromancy
{
public abstract class NecromancerSpell : Spell
{
public abstract double RequiredSkill{ get; }
public abstract int RequiredMana{ get; }
public override SkillName CastSkill{ get{ return SkillName.Necromancy; } }
public override SkillName DamageSkill{ get{ return SkillName.SpiritSpeak; } }
//public override int CastDelayBase{ get{ return base.CastDelayBase; } } // Reference, 3
public override bool ClearHandsOnCast{ get{ return false; } }
public override double CastDelayFastScalar{ get{ return (Core.SE? base.CastDelayFastScalar : 0); } } // Necromancer spells are not affected by fast cast items, though they are by fast cast recovery
public NecromancerSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info )
{
}
public override int ComputeKarmaAward()
{
//TODO: Verify this formula being that Necro spells don't HAVE a circle.
//int karma = -(70 + (10 * (int)Circle));
int karma = -(40 + (int)(10 * (CastDelayBase.TotalSeconds / CastDelaySecondsPerTick)));
if ( Core.ML ) // Pub 36: "Added a new property called Increased Karma Loss which grants higher karma loss for casting necromancy spells."
karma += AOS.Scale( karma, AosAttributes.GetValue( Caster, AosAttribute.IncreasedKarmaLoss ) );
return karma;
}
public override void GetCastSkills( out double min, out double max )
{
min = RequiredSkill;
max = Scroll != null ? min : RequiredSkill + 40.0;
}
public override bool ConsumeReagents()
{
if( base.ConsumeReagents() )
return true;
if( ArcaneGem.ConsumeCharges( Caster, 1 ) )
return true;
return false;
}
public override int GetMana()
{
return RequiredMana;
}
}
}