/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\engines\ML Peerless + misc areas\labyrinth\mobiles\Mistal.cs
Lines of code: 84
***********************************************************/


using System;
using Server.Items;
using Server.Targeting;
using System.Collections;

namespace Server.Mobiles
{
	[CorpseName( "a mistal corpse" )] 
	public class Mistal : BaseCreature
	{		
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 2 ) )
			{
				default:
				case 0: return WeaponAbility.Bladeweave;
				case 1: return WeaponAbility.WhirlwindAttack;
			}
		}
	
		[Constructable]
		public Mistal() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Mistal";
			Body = 13;
			Hue = 2210;
			BaseSoundID = 655;

			SetStr( 149, 201 );
			SetDex( 226, 240 );
			SetInt( 130, 134 );

			SetHits( 386, 609 );
			SetStam( 226, 238 );
			SetMana( 126, 140 ); 

			SetDamage( 11, 22 );

			SetDamageType( ResistanceType.Physical, 40 );
			SetDamageType( ResistanceType.Cold, 40 );
			SetDamageType( ResistanceType.Energy, 20 );

			SetResistance( ResistanceType.Physical, 56, 57 );
			SetResistance( ResistanceType.Fire, 38, 44 );
			SetResistance( ResistanceType.Cold, 40, 45 );
			SetResistance( ResistanceType.Poison, 31, 37 );
			SetResistance( ResistanceType.Energy, 39, 41 );

			SetSkill( SkillName.MagicResist, 106.2, 112.8 );
			SetSkill( SkillName.Tactics, 110.1, 119.8 );
			SetSkill( SkillName.Meditation, 113.1, 119.8 );
			SetSkill( SkillName.Wrestling, 100.6, 106.4 );
			SetSkill( SkillName.Magery, 100.8, 113.8 );
			SetSkill( SkillName.EvalInt, 96.7, 98.5 );

			Fame = 6500;
			Karma = -6500;

			VirtualArmor = 32;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 3 );
			AddLoot( LootPack.UltraRich, 1 );
		}

		public override Poison PoisonImmune{ get{ return Poison.Greater; } }
		public override bool IsMLCreature { get { return true;} }
		public override bool IsMLBoss { get { return true;} }

		public Mistal( Serial serial ) : base( serial )
		{
		}
		
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
			if (attacker!=null && attacker.Alive &&  !attacker.InRange( this, 2 ) && this.InLOS( attacker ) )
			{
				this.Combatant = attacker;
				this.Location = attacker.Location; 
				this.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist );
				attacker.PlaySound( 0x1FE );
			}
			
			base.OnDamage(amount, attacker, willKill);	
		}

		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();
		}
	}
}ÿ