/**********************************************************
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\Dreadhorn\Champion\Twaulo.cs
Lines of code: 100
***********************************************************/


using System;
using System.Collections;
using Server;
using Server.Items;
using System.Collections.Generic;
using Server.Targeting;
using Server.Engines.CannedEvil;

namespace Server.Mobiles
{

	[CorpseName( "the remains of Twaulo" )]
	public class Twaulo : BaseChampion
	{
		public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Enlightenment; } }
	
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 3 ) )
			{
				default:
				case 0: return WeaponAbility.MortalStrike;
				case 1: return WeaponAbility.ArmorIgnore;
				case 2: return WeaponAbility.MortalStrike;
			}
		}

		[Constructable]
		public Twaulo() : base( AIType.AI_Super)
		{
			Name = "Twaulo of the Glade";
			Body = 101;
			Hue = 2406; 
			BaseSoundID = 679;

			SetStr( 1761, 1946 );
			SetDex( 264, 406 );
			SetInt( 902, 925 );

			SetHits( 7500, 8000 );
			SetStam( 264, 406);
			SetDamage( 16, 20 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 66, 67 );
			SetResistance( ResistanceType.Fire, 46, 49 );
			SetResistance( ResistanceType.Cold, 51, 58 );
			SetResistance( ResistanceType.Poison, 52, 53 );
			SetResistance( ResistanceType.Energy, 50, 52 );

			SetSkill( SkillName.Anatomy, 102.8, 104.2 );
			SetSkill( SkillName.Discordance, 101.8, 124.2 );
			SetSkill( SkillName.Provocation, 101.8, 124.2 );
			SetSkill( SkillName.Musicianship, 106.8, 124.2 );
			SetSkill( SkillName.Archery, 110.0, 135.6 );
			SetSkill( SkillName.MagicResist, 101.6, 108.0 );
			SetSkill( SkillName.Tactics, 100.8, 113.6 );

			Fame = 22500;
			Karma = 22500;

			VirtualArmor = 50;
			AddItem( new Bow() );
			PackItem( new Arrow( Utility.RandomMinMax( 120, 145 ) ) ); 
			PackItem( new Tambourine() );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.UltraRich, 5 );
			AddLoot( LootPack.UltraRich, 5 );
			
			if(0.08>Utility.RandomDouble())
			{
				switch(Utility.Random(2))
				{
					case 0:PackItem(new Tempo());break; 
					case 1:PackItem(new SashOfTheTwistedGlade());break;			
				}
			}			
		}

		public override OppositionGroup OppositionGroup
		{
			get{ return OppositionGroup.FeyAndUndead; }
		}

		public override int Meat{ get{ return 7; } }
		public override int Hides{ get{ return 28; } }
		public override HideType HideType{ get{ return HideType.Spined; } }
		public override bool IsMLCreature { get { return true;} }
		public override bool IsMLBoss { get { return true;} }
		
		public override bool AutoDispel{ get{ return true; } }
        public override double AutoDispelChance{ get{ return 0.3; } }
		public override bool BardImmune{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }

		public Twaulo( 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 == 678 )
				BaseSoundID = 679;
		}
	}
}