/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\items\leviathan artifacts\PirateGhost.cs
Lines of code: 65
***********************************************************/


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

namespace Server.Mobiles
{
	[CorpseName( "a skeletal corpse" )]
	public class PirateGhost : BaseCreature
	{
	
		public bool PirateSay = true;
		
		[Constructable]
		public PirateGhost() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4 )
		{
			this.Summoned = true; 
			ControlSlots = 0;
	
			Name = "a pirate ghost";
			Body = 50;
			BaseSoundID = 0x48D;

			SetHits( 60, 90 );
			
			Timer.DelayCall( TimeSpan.FromSeconds( 7.0 ), new TimerCallback( Delete ) );
		}
		
		public override bool CanBeDamaged()
		{
			return false;
		}
		
		public override void OnThink ()
		{
			if (PirateSay == true)
			{
				string[] toSay = new string[]
				{
					"Arrrrr Matey, let me slumber!!",
					"Arrrr me bones er' achein'",
					"All o' ya, I'll take all o' ya on!",
					"Do that again an I'll make yer walk the plank!",
					"Arrrrr not the sea serpents again!!!",
					"Land ho! The treasure's all mine, ARRR!!!",
					"We be out o' ale captn'",
					"Last thing I saw was a big white sea serpent"
				};

				this.Say( true, String.Format( toSay[Utility.Random( toSay.Length )], this.Name ) );
				PirateSay = false;
			}
		}

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

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