/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\items\Craftable artys\ml peerless\ResillientBracer.cs
Lines of code: 62
***********************************************************/


using System;

namespace Server.Items
{
	public class  ResilientBracerRecipe : BaseRecipe
	{
	
		[Constructable]
		public ResilientBracerRecipe()
		{		
		//InitRequirements();
		}
		
		
		//overrides:
		
		public override Type CraftedItem { get { return typeof(ResilientBracer); } }
		public override string artyname { get { return "Resilient Bracer"; } }
		
		
	
		public override void InitRequirements()
		{
		base.InitRequirements(); //MUST be first! 
		
		//add required skills:
		
		RequiredSkills.Add(new ReqSkill(SkillName.Tinkering,100));
		
		//add required resources		

		CommonResources.Add(new ReqRes("Ingot",typeof(IronIngot),2));		
		CommonResources.Add(new ReqRes("Diamond",typeof(Diamond),50));		
		
		RareResources.Add(new ReqRes("Captured Essence",typeof(CapturedEssence),1));		
		RareResources.Add(new ReqRes("Blue Diamond",typeof(BlueDiamond),5));				
		}	

			
	
		public ResilientBracerRecipe( 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();
		}	
		
	}
	
	
	public class ResilientBracer : GoldBracelet
	{
		public override int LabelNumber{ get{ return 1072933; } } // Resillient Bracer

		public override int PhysicalResistance{ get { return 20; } }

		[Constructable]
		public ResilientBracer()
		{
			Hue = 0x488;

			SkillBonuses.SetValues( 0, SkillName.MagicResist, 15.0 );

			Attributes.BonusHits = 5;
			Attributes.RegenHits = 2;
			Attributes.DefendChance = 10;
		}

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

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

			writer.WriteEncodedInt( 0 ); // version
		}

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

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