/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\mobiles\dreadsquirrel.cs
Lines of code: 89
***********************************************************/


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

namespace Server.Mobiles
{
	[CorpseName( "a dread squirrel corpse" )]
	[TypeAlias( "Server.Mobiles.dreadsquirrel" )]
	public class dreadsquirrel : BaseCreature
	{
	
		[Constructable]
		public dreadsquirrel() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.12, 0.19 )
		{
			Name = "a dread squirrel";
			Body = 278;
			BaseSoundID = 0x188;
			
			Hue = 2412;					

			SetStr( 32, 64 );
			SetDex( 146, 265 );
			SetInt( 196, 230 );

			SetHits( 16, 123 );
			SetMana( 300, 600 );

			SetDamage( 7, 9 );

			SetDamageType( ResistanceType.Physical, 100 );

			
			//caps
			Skills[SkillName.Necromancy].Cap=10+Utility.Random(90);
			Skills[SkillName.SpiritSpeak].Cap=10+Utility.Random(90);
			Skills[SkillName.Tactics].Cap=10+Utility.Random(40);

			
			
			//default resists
			SetResistance( ResistanceType.Physical, 30, 80 );
			SetResistance( ResistanceType.Fire, 0, 5 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 25, 70 );
			SetResistance( ResistanceType.Energy, 0, 45 );
			
			//default skills			
			SetSkill( SkillName.MagicResist, 85.1, 90.0 );
			SetSkill( SkillName.Tactics, 69.3, 94.0 );
			SetSkill( SkillName.Wrestling, 79.3, 94.0 );
			SetSkill( SkillName.Necromancy, 50, 150 );
			SetSkill( SkillName.SpiritSpeak,50, 100.0 );

			Fame = 11000;
			Karma = -1600;

			VirtualArmor = 18;
			
			switch ( Utility.Random( 10 ))
			{
				case 0: PackItem( new LeftArm() ); break;
				case 1: PackItem( new RightArm() ); break;
				case 2: PackItem( new Torso() ); break;
				case 3: PackItem( new Bone() ); break;
				case 4: PackItem( new RibCage() ); break;
				case 5: PackItem( new RibCage() ); break;
				case 6: PackItem( new BonePile() ); break;
				case 7: PackItem( new BonePile() ); break;
				case 8: PackItem( new BonePile() ); break;
				case 9: PackItem( new BonePile() ); break;
			}
		

			Tamable = true;
			ControlSlots = 2;
			MinTameSkill = 90;
		}
		
		public override int SuperAI_Intensity{ get{ return 240; } }

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average,1 );
			AddLoot( LootPack.Gems, 2 );
			
		}

		public override double GetControlChance( Mobile m )
		{
			if ( m.Skills.Necromancy.Value >= 80 )
				return 1.0;

			return base.GetControlChance( m );
		}	
		
		public override int Meat{ get{ return 2; } }
		public override int Hides{ get{ return 6; } }
		public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies | FoodType.Eggs; } }
		public override Poison PoisonImmune{ get{ return Poison.Greater; } }
		

		public dreadsquirrel(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();
			
			SkillsCap = 7000;
		}
	}
}