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

namespace Server.Mobiles
{
	[CorpseName( "a sphinx corpse" )]
	public class RoyalSphinx : BaseCreature
	{
		[Constructable]
		public RoyalSphinx () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a royal sphinx";
			Body = 173;
			BaseSoundID = 0x668;
			AnimationMod = 3;

			SetStr( 336, 385 );
			SetDex( 96, 105 );
			SetInt( 181, 205 );

			SetHits( 202, 251 );

			SetDamage( 10, 13 );

			SetSkill( SkillName.Concentration, 85.1, 100.0 );
			SetSkill( SkillName.Magery, 85.1, 100.0 );
			SetSkill( SkillName.MagicResist, 80.2, 110.0 );
			SetSkill( SkillName.Tactics, 60.1, 80.0 );
			SetSkill( SkillName.HandToHand, 40.1, 50.0 );

			Fame = 8500;
			Karma = -8500;

			VirtualArmor = 50;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich );
			AddLoot( LootPack.Average );
			AddLoot( LootPack.LowScrolls );
			AddLoot( LootPack.Gems );
			AddLoot( LootPack.MedPotions );
		}

		public override void OnGaveMeleeAttack( Mobile m )
		{
			base.OnGaveMeleeAttack( m );

			if ( 0.1 >= Utility.RandomDouble() )
				Sphinx.TurnStone( this );
		}

		public override void OnGotMeleeAttack( Mobile m )
		{
			base.OnGotMeleeAttack( m );

			if ( 0.1 >= Utility.RandomDouble() )
				Sphinx.TurnStone( this );
		}

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