/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\events and scenarios\misc\Halloween Event\Halloween Items\Garmr.cs
Lines of code: 106
***********************************************************/


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

namespace Server.Mobiles
{
	[CorpseName( "a garm corpse" )]
	public class Garm : BaseCreature
	{
	
		public override bool DeleteCorpseOnDeath{ get{ return true; } }
		public override WeaponAbility GetWeaponAbility()
		{
			switch ( Utility.Random( 2 ) )
			{
				default:
				case 0: return WeaponAbility.BleedAttack;
				case 1: return WeaponAbility.ArmorIgnore;
			}
		}
	
		[Constructable]
		public Garm()
			: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "Garm";
			BaseSoundID = 0xE5;
			Body = 277;
            Hue = 1157;

			SetStr( 1200, 1225 );
			SetDex( 150, 170 );
			SetInt( 250, 285 );

			SetHits( 4000, 5000 );
			
			SetDamage( 10, 12 );

			SetDamageType( ResistanceType.Fire, 50 );
			SetDamageType( ResistanceType.Cold, 50 );			

			SetResistance( ResistanceType.Physical, 100, 120 );
			SetResistance( ResistanceType.Fire, 200, 244 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 200, 244 );
			SetResistance( ResistanceType.Energy, 30, 40 );

			SetSkill( SkillName.MagicResist, 30, 50 );
			SetSkill( SkillName.Tactics, 110, 120 );
			SetSkill( SkillName.Wrestling, 110, 120 );
            SetSkill( SkillName.Anatomy, 50, 100 );

			Fame = 22000;
			Karma = -22000;

			VirtualArmor = 75;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average );
			AddLoot( LootPack.Rich );
		}
		
		public override bool AutoDispel{ get{ return true; } }
		public override bool ReacquireOnMovement{ get{ return true; } }
		public override bool Unprovokable{ get{ return true; } }
		public override bool Uncalmable{ get{ return true; } }
		public override double AutoDispelChance{ get{ return 0.1; } }
		public override bool CanRummageCorpses{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override bool HasBreath{ get{ return true; } } // fire breath enabled
		public override double BreathDamageScalar{ get{ return 0.06; } }
		public override bool IsMLCreature { get { return true;} }
		public override bool IsMLBoss { get { return true;} }
		public override bool AlwaysMurderer{ get{ return true; } }

		public Garm( Serial serial )
			: base( serial )
		{
		}
		
		public override bool OnBeforeDeath()
		{

			Effects.PlaySound(this, Map, GetDeathSound());
			Effects.SendLocationEffect( Location, Map, 0x3709, 30, 10, 0x835, 0 );
		
		return base.OnBeforeDeath();
		}

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

		public override int GetAngerSound()
		{
			return 0x52D;
		}

		public override int GetIdleSound()
		{
			return 0x52C;
		}

		public override int GetAttackSound()
		{
			return 0x52B;
		}

		public override int GetHurtSound()
		{
			return 0x52E;
		}

		public override int GetDeathSound()
		{
			return 0x52A;
		}
	}
}