/**********************************************************
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\Lurg.cs
Lines of code: 104

Description: 

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


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

namespace Server.Mobiles
{
	[CorpseName( "a lurg corpse" )]
	public class Lurg : BaseCreature
	{
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.CrushingBlow;
		}		
	
		[Constructable]
		public Lurg() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Lurg";
			Body = 267;
			Hue = 2406;

			SetStr( 584, 625 );
			SetDex( 163, 176 );
			SetInt( 102, 106 );

			SetHits( 3034, 3189 );

			SetDamage( 42, 50 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 50, 53 );
			SetResistance( ResistanceType.Fire, 45, 47 );
			SetResistance( ResistanceType.Cold, 56, 57 );
			SetResistance( ResistanceType.Poison, 50, 60 );
			SetResistance( ResistanceType.Energy, 41, 54 );

			SetSkill( SkillName.MagicResist, 72.9, 87.6 );
			SetSkill( SkillName.Tactics, 40.0, 60.5 );
			SetSkill( SkillName.Wrestling, 122.7, 130.5 );
			SetSkill( SkillName.Healing, 93.6, 99.6 );
			SetSkill( SkillName.Anatomy, 110.5, 124.0 );
			
			Fame = 21000;
			Karma = -21000;

			VirtualArmor = 50;

			PackItem(new Bandage(Utility.RandomMinMax(13, 23)));
		}
		
		public override int GetAngerSound()
		{
			return 1440;
		}

		public override int GetIdleSound()
		{
			return 1439;
		}

		public override int GetAttackSound()
		{
			return 1438;
		}

		public override int GetHurtSound()
		{
			return 1441;
		}

		public override int GetDeathSound()
		{
			return 1437;
		}

		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.Regular; } }
		public override int Meat{ get{ return 5; } }
		public override int Hides{ get{ return 10; } }
		public override HideType HideType{ get{ return HideType.Spined; } }	
		public override bool IsMLCreature { get { return true;} } 
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }

		public Lurg( Serial serial ) : base( serial )
		{
		}
		
		public override void OnGotMeleeAttack( Mobile attacker )
		{
			base.OnGaveMeleeAttack( attacker );
			
			if (!attacker.InRange( this, 2 ))
			{ 
				foreach ( Mobile m in this.GetMobilesInRange( 30 ) )
				{
					if (m is Troglodyte)
					{
						m.Combatant = attacker;
					}
				}
			} 
		}

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