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


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

namespace Server.Mobiles
{
	[CorpseName( "the remains of a black unicorn" )]
	public class BlackUnicorn : BaseMount
	{
		[Constructable]
		public BlackUnicorn() : this( "a black unicorn" )
		{
		}

		[Constructable]
		public BlackUnicorn( string name ) : base( name, 122, 0x3EB4, AIType.AI_Super, FightMode.Evil, 10, 1, 0.2, 0.4 )
		{
			BaseSoundID = 0x3C5;
			Hue = 1109;
			SetStr( 596, 525 );
			SetDex( 25, 85 );
			SetInt( 1186, 1225 );

			SetHits( 666, 666 );

			SetDamage( 15, 22 );

			SkillsCap = 1500;
			Skills[SkillName.EvalInt].Cap=150;
			Skills[SkillName.Magery].Cap=150;
			Skills[SkillName.MagicResist].Cap=150;

			SetDamageType( ResistanceType.Physical, 50 );
			SetDamageType( ResistanceType.Energy, 50 );

			SetResistance( ResistanceType.Physical, 15, 65 );
			SetResistance( ResistanceType.Fire, 55, 65 );
			SetResistance( ResistanceType.Cold, 55, 65 );
			SetResistance( ResistanceType.Poison, 55, 65 );
			SetResistance( ResistanceType.Energy, 55, 90 );

			SetSkill( SkillName.EvalInt, 80.1, 120.0 );
			SetSkill( SkillName.Magery, 60.4, 120.0 );
			SetSkill( SkillName.Meditation, 90.1, 120.0 );
			SetSkill( SkillName.MagicResist, 85.3, 120.0 );
			SetSkill( SkillName.Tactics, 20.1, 22.5 );
			SetSkill( SkillName.Wrestling, 70, 100 );

			Fame = 28000;
			Karma = 28000;

			Tamable = true;
			ControlSlots = 4;
			MinTameSkill = 108.1;
		}

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

			return base.GetControlChance( m );
		}
	
		public override void GenerateLoot()
		{
			AddLoot( LootPack.SuperBoss );
			AddLoot( LootPack.MedScrolls, 18 );
			AddLoot( LootPack.Potions, 5 );
		}

		public override bool AutoDispel{ get{ return !Controlled; } }
		public override bool StatLossAfterTame{ get{ return true; } }
		public override bool BardImmune{ get{ return !Core.SE; } }
		public override bool Unprovokable{ get{ return Core.SE; } }
		public override bool Uncalmable{ get{ return Core.SE; } }
		public override int SuperAI_DelayMax{ get{ return 0; } }
		public override int SuperAI_Intensity{ get{ return 150; } }		
		
		public override OppositionGroup OppositionGroup
		{
			get{ return OppositionGroup.FeyAndUndead; }
		}

		public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }

		public BlackUnicorn( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

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

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

			int version = reader.ReadInt();

			if ( version == 0 )
				AI = AIType.AI_Super;
		}
	}
}