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


using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
	public class naturalrevenant : BaseCreature
	{
		private Mobile m_Target;
		private DateTime m_ExpireTime;

		public override void DisplayPaperdollTo( Mobile to )
		{
			// Do nothing
		}
		
		public override double DispelDifficulty{ get{ return 90; } }		
		
		public override bool IsDispellable { get { return true; } }		

		[Constructable]
		public naturalrevenant() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.18, 0.36 )
		{
			Name = "a revenant";
			Body = 400;
			Hue = 32314;
			// TODO: Sound values?



			SetStr( 200 );
			SetDex( 150 );
			SetInt( 150 );

			SetDamage( 16, 17 );

			// Bestiary says 50 phys 50 cold, animal lore says differently
			SetDamageType( ResistanceType.Physical, 100 );

			SetSkill( SkillName.MagicResist, 100.0,120 ); // magic resist is absolute value of spiritspeak
			SetSkill( SkillName.Tactics, 100.0 ); // always 100
			SetSkill( SkillName.Swords, 100.0 ); // not displayed in animal lore but tests clearly show this is influenced
			SetSkill( SkillName.DetectHidden, 75.0,100 );



			SetResistance( ResistanceType.Physical, 40 ,70  );
			SetResistance( ResistanceType.Cold,  40 ,70 );
			SetResistance( ResistanceType.Fire, 40 ,70 );
			SetResistance( ResistanceType.Poison, 100 );
			SetResistance( ResistanceType.Energy,  40 ,70  );

			Fame = 500;
			Karma = -500;


			VirtualArmor = 32;

			Item shroud = new DeathShroud();

			shroud.Hue = 32314;

			shroud.Movable = false;

			AddItem( shroud );

			Halberd weapon = new Halberd();

			weapon.Hue = 1;
			weapon.Movable = false;

			AddItem( weapon );
			
			PackNecroReg( 10, 30 );
		}
		
		
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich, 1 );

		}		

		public override bool AlwaysMurderer{ get{ return true; } }

		public override bool BleedImmune{ get{ return true; } }
		public override bool BardImmune{ get{ return true; } }
		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }

		

		public override bool OnBeforeDeath()
		{
			Effects.PlaySound( Location, Map, 0x10B );
			Effects.SendLocationParticles( EffectItem.Create( Location, Map, TimeSpan.FromSeconds( 10.0 ) ), 0x37CC, 1, 50, 2101, 7, 9909, 0 );

			Delete();
			return false;
		}

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

			Delete();
		}
	}
}