/**********************************************************
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\christmas\SantaElf.cs
Lines of code: 134
***********************************************************/


using System;
using Server.Items;

namespace Server.Mobiles
{
	[CorpseName( "an elf corpse" )]
	public class SantaElf : BaseCreature
	{
		public override bool ClickTitle{ get{ return false; } }

		[Constructable]
		public SantaElf() : base( AIType.AI_Super, FightMode.Aggressor, 10, 1, 0.1, 0.2 )
		{
			SpeechHue = Utility.RandomDyedHue();
			Hue = Utility.RandomSkinHue();
			Name = "a santa elf";
			Race=Race.Elf;
			Body = (( this.Female = Utility.RandomBool() ) ? Body = 0x191 : Body = 0x190);
			
			Hue = 2406;

			SetStr( 326, 375 );
			SetDex( 313, 453 );
			SetInt( 401, 610 );

	        SetHits( 401, 700 );
			SetMana( 501, 1100 );

			SetDamage( 15, 18 );

			SetDamageType( ResistanceType.Cold, 100 );

			SetResistance( ResistanceType.Physical, 35, 65 );
			SetResistance( ResistanceType.Fire, 40, 60 );
			SetResistance( ResistanceType.Cold, 75, 120 );
			SetResistance( ResistanceType.Poison, 40, 60 );
			SetResistance( ResistanceType.Energy, 45, 55 );

			SetSkill( SkillName.Macing, 115.1, 130.0 );
			SetSkill( SkillName.Tactics, 115.1, 130.0 );
			SetSkill( SkillName.Anatomy, 110.1, 125.0 );
			SetSkill( SkillName.Bushido, 120.1, 140.0 );
			SetSkill( SkillName.Magery, 100.1, 120.0 );
			SetSkill( SkillName.EvalInt, 110.1, 160.0 );
			SetSkill( SkillName.Meditation,120);
			SetSkill( SkillName.Focus,120);
			
			
			Fame = 9500;
			Karma = 9500;

			JesterHat hat = new JesterHat();
			hat.Hue=62;
			AddItem(hat);
			
			JinBaori overtunic = new JinBaori();
			overtunic.Hue=32;
			AddItem(overtunic);
			
			FancyShirt tunic = new FancyShirt();
			tunic.Hue=62;
			AddItem(tunic);
			
			LongPants pants = new LongPants();
			pants.Hue=32;
			AddItem(pants);
			
			Sandals shoes = new Sandals();
			shoes.Hue=62;
			AddItem(shoes);			
			
			Hammer wep = new Hammer();
			wep.Hue=1150;
			wep.Movable=false;
			wep.Name="Magical Christmas Crafting Hammer";
			AddItem(wep);			

			HairItemID=0;
		}
		
		
		

		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich );
		}

		public override bool BardImmune{ get{ return true; } }
		public override int SuperAI_DelayMax{ get{ return 0; } }
		public override int SuperAI_Intensity{ get{ return 220; } }		

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

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

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

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

			int version = reader.ReadInt();
		}
	}
	
	
	
	
	[CorpseName( "an elf corpse" )]
	public class SantaElfQNPC : SantaElf
	{
		public override bool ClickTitle{ get{ return false; } }

		[Constructable]
		public SantaElfQNPC() 
		{	
		}
	
		private DateTime lastsay;
		
		public override void OnMovement( Mobile m, Point3D oldLocation )
		{

		
		
		
			if( m.Alive && m is PlayerMobile )
			{
			PlayerMobile pm = (PlayerMobile)m;

				int range = 6;

				if( m.Alive && Math.Abs( Z - m.Z ) < 16 && InRange( m, range ) && !InRange( oldLocation, range ) )
				{
				if((lastsay+TimeSpan.FromSeconds(10))>DateTime.Now)return;
				
					switch(Utility.Random(4))
					{
					case 0:				
					Say( "Help! Dark elves have taken over the north pole!  Quick, step in the gate and come help save Christmas!" );
					break;
					case 1:				
					Say(  "Help! Dark elves have taken over our toy factory and making toys out of coal!  The children will be sick!" );
					break;
					case 2:				
					Say(  "Help! Our factory's production has been outsourced to an evil company, they use coal to save money, and don't care about quality!");
					break;
					case 3:				
					Say( "Help! We're all going to die, attack all dark elves!" );
					break;			
					}
				lastsay=DateTime.Now;	
				}				
			}
		}			
		
		
		public SantaElfQNPC( Serial serial ) : base( serial )
		{
		}

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

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

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

			int version = reader.ReadInt();
		}
		
		
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
}
