using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a liche's corpse" )]
	public class Demilich : BaseCreature
	{
		[Constructable]
		public Demilich() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = NameList.RandomName( "lich" );
			HiddenTitle = "the demilich";
			Body = 142;
			BaseSoundID = 0x3E9;
			AnimationMod = 3;
			Clan = Clan.Undead;

			SetStr( 541, 657 );
			SetDex( 190, 215 );
			SetInt( 735, 852 );

			SetHits( 325, 394 );

			SetDamage( 14, 17 );

			SetSkill( SkillName.Concentration, 117.1, 130.0 );
			SetSkill( SkillName.Magery, 117.1, 130.0 );
			SetSkill( SkillName.MagicResist, 150.5, 200.0 );
			SetSkill( SkillName.Tactics, 65.1, 91.0 );
			SetSkill( SkillName.HandToHand, 78.1, 104.0 );

			Fame = 20000;
			Karma = -20000;

			VirtualArmor = 55;
			PackReg( 22, 50 );
			PackItem( new Bone( Utility.RandomList(2,3,4,5) ) );
		}

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

		public override bool CanRummageCorpses{ get{ return true; } }
		public override bool BleedImmune{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }

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