/**********************************************************
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\ScrappersCompendium.cs
Lines of code: 68
***********************************************************/


using System;
using Server;
using Server.Items;

	
namespace Server.Items
{

	public class  ScrappersCompendiumRecipe : BaseRecipe
	{
	
		[Constructable]
		public ScrappersCompendiumRecipe()
		{		
		//InitRequirements();
		}
		
		
		//overrides:
		
		public override Type CraftedItem { get { return typeof(ScrappersCompendium); } }
		public override string artyname { get { return "Scrapper's Compendium"; } }
		
		
	
		public override void InitRequirements()
		{
		base.InitRequirements(); //MUST be first! 
		
		//add required skills:
		
		RequiredSkills.Add(new ReqSkill(SkillName.Inscribe,85));
		
		//add required resources
		
		CommonResources.Add(new ReqRes("Blank Scrolls",typeof(BlankScroll),100));
		
		RareResources.Add(new ReqRes("Dread Horn Mane",typeof(DreadHornMane),1));		
		RareResources.Add(new ReqRes("Corruption",typeof(Corruption),10));		
		RareResources.Add(new ReqRes("Taint",typeof(Taint),10));		
		}	
		
		
		public override void OnAfterCraft(Mobile from,Item item)
		{
			BaseRunicTool.ApplyAttributesTo( (Spellbook)item, 1, 100,100);		
		}
			
	
		public ScrappersCompendiumRecipe( 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 ScrappersCompendium : Spellbook
	{
		public override int LabelNumber { get { return 1072940; } } //scrapper's compendium

		[Constructable]
		public ScrappersCompendium() : base()
		{
			LootType = LootType.Blessed;
			Hue = 1172;

			Attributes.CastSpeed = 1;
			Attributes.CastRecovery = 1;
			Attributes.LowerManaCost = 10;
			Attributes.SpellDamage = 25;		
		}

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