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


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

namespace Server.Mobiles
{
	[CorpseName( "a mimic corpse" )]
	public class Mimic : BaseCreature
	{
		public override WeaponAbility GetWeaponAbility()
		{
			return WeaponAbility.ParalyzingBlow;
		}
	
		[Constructable]
		public Mimic() : base( AIType.AI_Super, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a mimic";
			Body = 778;
			Hue = 2101;

			SetStr( 126, 150 );
			SetDex( 56, 75 );
			SetInt( 150 );

			SetHits( 100, 120 );
			SetMana( 150 );

			SetDamage( 24, 30 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 35, 45 );
			SetResistance( ResistanceType.Fire, 30, 45 );
			SetResistance( ResistanceType.Poison, 25, 35 );
			SetResistance( ResistanceType.Energy, 25, 35 );

			SetSkill( SkillName.MagicResist, 55.1, 70.0 );
			SetSkill( SkillName.Tactics, 80.1, 100.0 );
			SetSkill( SkillName.Wrestling, 100.1, 120.0 );
			SetSkill( SkillName.DetectHidden, 160.0, 180.0 );

			Fame = 4000;
			Karma = -4000;

			VirtualArmor = 40;

			Tamable = false;
		}
		
		public override int GetAngerSound()
		{
			return 1100;
		}

		public override int GetIdleSound()
		{
			return 1101;
		}

		public override int GetAttackSound()
		{
			return 1103;
		}

		public override int GetHurtSound()
		{
			return 1102;
		}

		public override int GetDeathSound()
		{
			return 1104;
		}	

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich );
			AddLoot( LootPack.Gems, 4 );
		}
		
		public override void OnThink()
		{
			if (this.Combatant != null)
			{
				Mobile target = this.Combatant; 
		
				if (this.InLOS( target ) && !target.InRange( this, 4 ) && 0.5 > Utility.RandomDouble())
				{	
					Effects.SendLocationParticles( EffectItem.Create( this.Location, this.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
					this.PlaySound( 0x512 );
					this.Location = target.Location;
					target = this.Combatant; 
				}
			}
		
			base.OnThink( );	
		}
		
		public override Poison HitPoison{ get{ return Poison.Deadly; } }
		public override double HitPoisonChance{ get{ return 0.1; } }

		public Mimic(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();
			this.Delete();
		}
	}
}ÿ