/**********************************************************
RunUO AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Red Squirrel on Sep-24-2011 10:26:42pm
Filepath: scripts\Items\Artifacts\Artifacts of Assimilation\lesser\helmetofthelegendarycyclist.cs
Lines of code: 62

Description: 

***********************************************************/


//******************************************************************
//NOTE:  This artifact has been converted over to HorsemansHelm
//******************************************************************


using Server;
using System;

namespace Server.Items
{
	
	public class helmetofthelegendarycyclist : Helmet
	{
		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get { return 255; } }
		
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }		

		[Constructable]
		public helmetofthelegendarycyclist() : base()
		{
		Name="Helmet of the Legendary Cyclist";
		Hue=1365;


		ArmorAttributes.MageArmor= 1;
		ArmorAttributes.SelfRepair=3;
		Attributes.RegenStam = 2;

		
			if(Utility.Random(5)==3)
			{		
			ColdBonus = 5 + Utility.Random(16);
			EnergyBonus = 5 + Utility.Random(16);
			FireBonus = 5 + Utility.Random(16);
			PhysicalBonus = 5 + Utility.Random(16);
			PoisonBonus = 5 + Utility.Random(16);		
			}
		}
		

		

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

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

			writer.Write( (int) 2 );
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			if ( version <= 1 )
			{
				MaxHitPoints = 255;
				HitPoints = 255;
			}

			if( version == 0 )
				SkillBonuses.SetValues( 0, SkillName.AnimalLore, 5.0 );
		}
		
		
		public override void OnAfterLoad()
		{
			HorsemansHelm helm = new HorsemansHelm();
			
			helm.ColdBonus=ColdBonus;
			helm.EnergyBonus=EnergyBonus;
			helm.FireBonus=FireBonus;
			helm.PhysicalBonus=PhysicalBonus;
			helm.PoisonBonus=PoisonBonus;
			
			Misc.ObjectConverter.ConvertItem(this,helm);
		}			
	}
	
}