/**********************************************************
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\travesty\mobiles\BlackOrderGrandMage.cs
Lines of code: 107
***********************************************************/


using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;

namespace Server.Mobiles
{
	public class BlackOrderGrandMage : BaseCreature
	{

		[Constructable]
		public BlackOrderGrandMage() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Black Order Grand Mage of the Dragon Flame Sect";
			Hue = Utility.RandomSkinHue();

			if ( this.Female = Utility.RandomBool() )
			{
				Body = 0x191;
			}
			else
			{
				Body = 0x190;
			}
			
			Kasa kasa = new Kasa();
			kasa.Hue = 1175;
			
			Hakama hakama= new Hakama();
			hakama.Hue = 1175;
			
			FancyShirt fancyshirt = new FancyShirt();
			fancyshirt.Hue = 1175;
			
			Waraji waraji = new Waraji();
			waraji.Hue = 1175;
			
			AddItem(kasa);
			AddItem(hakama);
			AddItem(fancyshirt);
			AddItem(waraji);

			SetStr( 326, 375 );
			SetDex( 131, 145 );
			SetInt( 901, 1110 );

	        SetHits( 721, 850 );
			SetMana( 1001, 1110 );
			SetDamage( 11, 17 );

			SetResistance( ResistanceType.Physical, 55, 75 );
			SetResistance( ResistanceType.Fire, 60, 70 );
			SetResistance( ResistanceType.Cold, 35, 55 );
			SetResistance( ResistanceType.Poison, 55, 65 );
			SetResistance( ResistanceType.Energy, 35, 65 );

			SetSkill( SkillName.MagicResist, 80.0, 100.0 );
			SetSkill( SkillName.Tactics, 115.0, 130.0 );
			SetSkill( SkillName.Wrestling, 120.0, 135.0 );
			SetSkill( SkillName.Meditation, 140.1, 140.2 );
			SetSkill( SkillName.Poisoning, 106.1, 115.2 );
			SetSkill( SkillName.Focus, 100.1, 115.2 );
			SetSkill( SkillName.Magery, 140.2, 162.2 );
			SetSkill( SkillName.EvalInt, 135.1, 155.2 );
			
			Fame = 16000;
			Karma = -16000;

			Utility.AssignRandomHair( this );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 4 );
			AddLoot( LootPack.Rich, 2 );
			AddLoot( LootPack.Gems, 7 );
		}

		public override bool AlwaysMurderer{ get{ return true; } }

		public BlackOrderGrandMage( Serial serial ) : base( serial )
		{
		}
		
		public override void CheckReflect( Mobile caster, ref bool reflect )
		{
			if (0.4 >= Utility.RandomDouble())
			{
				caster.SendMessage( "Your spell is reflected back on to you!" );
				reflect = true; 
			}
		}
		
		public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
		public override bool IsMLCreature { get { return true;} }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
		public override bool ShowFameTitle{ get{ return false; } }
		
		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 4 ) == 0 )
			{
			Item item;

				switch ( Utility.Random( 1 ))
				{
					default:
					case 1: item = new DragonFlameKey(); break;
				}

			c.DropItem( item );
			}
			base.OnDeath( c );
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}