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

namespace Server.Mobiles
{
	[CorpseName( "a insect corpse" )]
	public class FlameCrawler : BaseCreature
	{
		[Constructable]
		public FlameCrawler() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a flame crawler";
			Body = 158;
			BaseSoundID = 397;

			SetStr( 103, 145 );
			SetDex( 76, 95 );
			SetInt( 16, 30 );

			SetHits( 80, 93 );
			SetMana( 0 );

			SetDamage( 9, 14 );

			SetSkill( SkillName.Poisoning, 80.1, 100.0 );
			SetSkill( SkillName.MagicResist, 30.1, 35.0 );
			SetSkill( SkillName.Tactics, 80.3, 95.0 );
			SetSkill( SkillName.HandToHand, 60.3, 98.0 );

			Fame = 4000;
			Karma = -4000;

			VirtualArmor = 48;

			PackItem( new DeadlyPoisonPotion() );
			AddItem( new LightSource() );
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average );
		}

		public override int Meat{ get{ return 1; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override Poison HitPoison{ get{ return (0.8 >= Utility.RandomDouble() ? Poison.Deadly : Poison.Lethal); } }

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