/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Mar-09-2012 08:19:34pm
Filepath: scripts\Mobiles\custom mobiles - to sort\ML Named\Irk.cs
Lines of code: 103

Description: 

***********************************************************/


using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "a Irk's corpse" )]
	public class Irk :  Changeling
	{
		public override string OriginalName {get{ return "Irk";}}
		public override int OriginalHue {get{return 1161;}}		

	
		[Constructable]
		public Irk()
		{
			Name = "Irk";
			Body = 264;
			Hue = 1161;
			BaseSoundID = 0x451;
           
			SetStr( 23, 183 );
			SetDex( 259, 360 );
			SetInt( 374, 546 );

			SetHits( 1006, 1064 );
			SetStam( 259, 360);
			SetMana( 374, 546);

			SetDamage( 18, 29 );

			SetResistance( ResistanceType.Physical, 80, 90 );
			SetResistance( ResistanceType.Fire, 41, 49 );
			SetResistance( ResistanceType.Cold, 40, 50 );
			SetResistance( ResistanceType.Poison, 41, 50 );
			SetResistance( ResistanceType.Energy, 40, 49 );

			SetSkill( SkillName.MagicResist, 132.3, 165.8 );
			SetSkill( SkillName.Magery, 90, 95.0 );
			SetSkill( SkillName.Spellweaving, 108.9, 119.7 );
			SetSkill( SkillName.EvalInt, 108.4, 120.0 );
			SetSkill( SkillName.Meditation, 108.9, 119.1 );
			SetSkill( SkillName.Tactics, 120.1, 150.0 );
			SetSkill( SkillName.Wrestling, 120.1, 150.0 );

			Fame = 9500;
			Karma = -9500;
			
			

			VirtualArmor = 75;
            AddItem( new DarkSource() );
			

		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.UltraRich, 3 );
			AddLoot( LootPack.FilthyRich );
		}
		
		public override void ResetSkills(bool dobaseskills)
		{
		base.ResetSkills(false);
	
			SetSkill( SkillName.MagicResist, 132.3, 165.8 );
			SetSkill( SkillName.Spellweaving, 108.9, 119.7 );
			SetSkill( SkillName.Magery, 90, 95.0 );
			SetSkill( SkillName.EvalInt, 108.4, 120.0 );
			SetSkill( SkillName.Meditation, 108.9, 119.1 );
			SetSkill( SkillName.Tactics, 120.1, 150.0 );
			SetSkill( SkillName.Wrestling, 120.1, 150.0 );		
		}	
				
		public override void OnDamage( int amount, Mobile attacker, bool willKill ) 
		{
			if (attacker!=null && this.Hits == this.HitsMax && !attacker.InRange( this, 2 ))
			{
				this.Combatant = attacker;
				this.Location = attacker.Location; 
				this.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist );
				attacker.PlaySound( 0x1FE );
			}
			
			base.OnDamage(amount, attacker, willKill);	
		}	

		public override void OnDamagedBySpell( Mobile from )
		{
	
		base.OnDamagedBySpell( from );
		}

		public override bool IsMLBoss { get { return true;} }
		public override int TreasureMapLevel{ get{ return 6; } }
		public override double MLChestChance{ get{ return 0.5; } }
		
		public override bool AutoDispel{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override bool IsMLCreature { get { return true;} }

		public override void OnDeath( Container c )
		{
			if ( Utility.Random( 3 ) == 0 )
			{
				c.DropItem( new IrkBrain());
			}

			base.OnDeath( c );
		}



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