/**********************************************************
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\demitel\MirageDesert\DesertHunter.cs
Lines of code: 113
***********************************************************/


using System;
using Server;
using Server.Misc;
using Server.Items;

namespace Server.Mobiles
{
	public class DesertHunter : BaseCreature
	{
		public int MaxSpawns = 0;
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 2 ) )
			{
				default:
				case 0: return WeaponAbility.Dismount;
				case 1: return WeaponAbility.Dismount;
				case 2: return WeaponAbility.ArmorIgnore;

			}
		}
		[Constructable]
		public DesertHunter() : base( AIType.AI_Archer, FightMode.Closest, 10, 1, 0.15, 0.4 )
		{
			switch (Utility.Random(4))
			{
			case 0: Name = "Samant";break;
			case 1: Name = "Seika";break;
			case 2: Name = "Seil";break;
			case 3: Name = "Ank'Theb";break;
			case 4: Name = "Ank'Terebb";break;
			}
			Body = 400;
			Hue = 33770;

			ActiveSpeed = 0.11;
			CurrentSpeed = 0.11;
			PassiveSpeed = 0.11;

			SetStr( 151, 170 );
			SetDex( 800, 800 );
			SetInt( 51, 65 );

			SetHits( 200 );

			SetDamage( 29, 34 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 50, 60 );
			SetResistance( ResistanceType.Fire, 90 );
			SetResistance( ResistanceType.Cold, 50, 60 );
			SetResistance( ResistanceType.Poison, 20, 40 );
			SetResistance( ResistanceType.Energy, 40, 60 );

			SetSkill( SkillName.Healing, 60.3, 90.0 );
			SetSkill( SkillName.Macing, 72.5, 95.0 );
			SetSkill( SkillName.Poisoning, 90.0, 115.5 );
			SetSkill( SkillName.MagicResist, 72.5, 95.0 );
			SetSkill( SkillName.Archery, 120.0 );
			SetSkill( SkillName.Tactics, 72.5, 120.0 );

			Fame = 1000;
			Karma = -1000;

			if ( 1.0 > Utility.RandomDouble() )
			{
				this.Hidden = true;
				this.AllowedStealthSteps = 2000;
			}

			PackItem( new Bandage( Utility.RandomMinMax( 1, 15 ) ) );

			HornedTribalMask helm = new HornedTribalMask();
			helm.Hue = 2413;
			AddItem( helm );

			Robe robe = new Robe();
			robe.Hue = 2413;
			AddItem( robe );

			LeatherGloves gloves = new LeatherGloves();
			gloves.Hue = 2413;
			AddItem( gloves );

			switch ( Utility.Random( 2 ))
			{
				case 0: AddItem( new Bow()); break;
				case 1: AddItem( new CompositeBow() ); break;
				case 2: AddItem( new Bow() ); break;
			}
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 2 );
		}

		public override bool AlwaysMurderer{ get{ return true; } }
		public override bool BardImmune{ get{ return !Core.AOS; } }
		public override bool ShowFameTitle{ get{ return false; } }

		public override void OnGaveMeleeAttack(Mobile defender)
 		{
			if ( 0.4 > Utility.RandomDouble() && Hits < (HitsMax / 4) )
			{
				this.Hidden = true;
				this.AllowedStealthSteps = 200;
				this.Stam = 600;
			}
			base.OnGaveMeleeAttack(defender);
		}


		public override void AddNameProperties( ObjectPropertyList list )
		{
			base.AddNameProperties( list );

			list.Add("The Cobra Tribe");
		}

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