/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Mar-09-2012 08:19:35pm
Filepath: scripts\Mobiles\custom mobiles - to sort\ML Named\Malefic.cs
Lines of code: 87

Description: 

***********************************************************/


using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a malefic corpse" )]
	public class Malefic : BaseCreature
	{
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 6 ) )
			{
				default:
				case 0: return WeaponAbility.MortalStrike;
				case 1: return WeaponAbility.Dismount;
				case 2: return WeaponAbility.BleedAttack;
				case 3: return WeaponAbility.Dismount;
				case 4: return WeaponAbility.Dismount;
				case 5: return WeaponAbility.MortalStrike;
			}
		}
		
		[Constructable]
		public Malefic () : base( AIType.AI_Mage, FightMode.Closest, 18, 1, 0.2, 0.4  )
		{
			Name = "Malefic";
			Body = 11;
			Hue = 2406;
			BaseSoundID = 1170;

			SetStr( 210, 221 );
			SetDex( 140, 178 );
			SetInt( 310, 367 );

			SetHits( 655, 785 );
			SetStam( 655, 785 );

			SetDamage( 20, 25 );
			
			ActiveSpeed = 0.05;
			CurrentSpeed = 0.05;
			PassiveSpeed = 0.05;

			SetDamageType( ResistanceType.Physical, 20 );
			SetDamageType( ResistanceType.Poison, 80 );

			SetResistance( ResistanceType.Physical, 60, 70 );
			SetResistance( ResistanceType.Fire, 43, 50 );
			SetResistance( ResistanceType.Cold, 46, 52 );
			SetResistance( ResistanceType.Poison, 100 );
			SetResistance( ResistanceType.Energy, 47, 54 );

			SetSkill( SkillName.Anatomy, 88.3, 88.3 );
			SetSkill( SkillName.EvalInt, 97.3, 106.2 );
			SetSkill( SkillName.Magery, 107.8, 112.9 );
			SetSkill( SkillName.Poisoning, 120 );
			SetSkill( SkillName.Meditation, 65.1, 80.0 );
			SetSkill( SkillName.MagicResist, 88.6, 90.3 );
			SetSkill( SkillName.Tactics, 99.8, 106.2 );
			SetSkill( SkillName.Wrestling, 103.5, 114.0 );

			Fame = 13000;
			Karma = -13000;

			VirtualArmor = 36;
			


		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.UltraRich, 3 );
			AddLoot( LootPack.FilthyRich );
		}
		
		public override bool IsMLBoss { get { return true;} }
		public override int TreasureMapLevel{ get{ return 6; } }
		public override double MLChestChance{ get{ return 0.05; } }
		
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override Poison HitPoison{ get{ return Poison.Lethal; } }
		public override bool BardImmune{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
		public override bool IsMLCreature { get { return true;} }
 
		public Malefic( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			writer.Write( (int) 0 );
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();

			if ( BaseSoundID == 263 )
				BaseSoundID = 1170;
		}
	}
}