/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\quests\bodquest\BodQuestTypes.cs
Lines of code: 415
***********************************************************/


using System;
using Server;
using Server.Items;
using Server.Engines.BulkOrders;
using System.Collections;
using System.Collections.Generic;

namespace Server.Engines.Quests.Bods
{

	public class BodQuestType
	{
		public string ResourceName="default";
		public string ResourceType="none";
		public int ResourceAmount=10;
		public int PrizeLevel=0;	
	
	/*
	from: the mobile getting the quest
	resourcename: name of the resource in plural
	resource type: class name of the resource
	resource amount: amount to bring
	prizelevel: higher the number, more chance of high price, 0-100 is base range, but can be higher
	*/
	public BodQuestType(string pResourceName,string pResourceType,int pResourceAmount,int pPrizeLevel)
	{
		ResourceName=pResourceName;
		ResourceType=pResourceType;
		ResourceAmount=pResourceAmount;
		PrizeLevel=pPrizeLevel;	
	}
	
	
	
		
		
		
		public static Item GetRewardFor(RewardEntry[] entry,int intensity,int amt)
		{			
			Debugger.Write("bodquest","Getting reward for intensity of {0} and amt of {1} ...",intensity,amt);
			
			List<RewardEntry> possible = new List<RewardEntry>();
			
			int tolerance=0;
			do
			{			
				if(tolerance>=1000)
				{
					Debugger.Write("bodquest","tolerance has hit {0}, bailing out with basic default reward",tolerance);
					BlueBook book = new BlueBook();
					book.Title="Error retrieving prize";
					return book;
				}
				
				Debugger.Write("bodquest","Checking for prizes with intensity tolerance of {0}",tolerance);
				for(int i=0;i<entry.Length;i++)
				{
					if(entry[i].ValidIntensity(intensity,tolerance))
					{
						Debugger.Write("bodquest","Adding entry[{0}] {1}-{2}",i,entry[i].IntensityMin,entry[i].IntensityMax);
						possible.Add(entry[i]);
					}			
				}
				
				tolerance+=((2*tolerance)+1);
				
			}while(possible.Count<=0);
			
			RewardEntry togive=possible[0];
			
			for(int i=Math.Max(1,amt/200);i>0;i--)
			{
				RewardEntry tmp = possible[Utility.Random(possible.Count)];
				
				Debugger.Write("bodquest","Second loop i={0} found item with intensity of {1}-{2}",i,tmp.IntensityMin,tmp.IntensityMax);
				
				if(tmp.IntensityMin>=togive.IntensityMin)
				{
					Debugger.Write("bodquest","Will replace current prize with one of intensity {0}-{1}",tmp.IntensityMin,tmp.IntensityMax);
					togive=tmp;			
				}
			}

			Debugger.Write("bodquest","giving reward: {0}-{1}",togive.IntensityMin,togive.IntensityMax);
			
			return togive.GenerateReward();
		}
	
	
	
	
	
	
	/*
	Insert randomizer functions for each vendor type here:
	*/
	
		public static BodQuestType RandomBlacksmithQuest()
		{
			//common resources
			switch(Utility.Random(Utility.Random(12)))
			{
				case 0: return new BodQuestType("Iron Ingots","IronIngot",300+(15*Utility.Random(31)),0);
				case 1: return new BodQuestType("Iron Ingots","IronIngot",300+(25*Utility.Random(31)),7);
				case 2: return new BodQuestType("Dull Copper Ingots","DullCopperIngot",300+(25*Utility.Random(31)),20);
				case 3: return new BodQuestType("Shadow Iron Ingots","ShadowIronIngot",300+(25*Utility.Random(31)),28);
				case 4: return new BodQuestType("Copper Ingots","CopperIngot",300+(25*Utility.Random(31)),35);
				case 5: return new BodQuestType("Bronze Ingots","BronzeIngot",300+(25*Utility.Random(31)),48);
				case 6: return new BodQuestType("Gold Ingots","GoldIngot",300+(25*Utility.Random(31)),65);
				case 7: return new BodQuestType("Agapite Ingots","AgapiteIngot",300+(25*Utility.Random(31)),73);
				case 8: return new BodQuestType("Verite Ingots","VeriteIngot",300+(25*Utility.Random(31)),88);
				case 9: return new BodQuestType("Valorite Ingots","ValoriteIngot",300+(25*Utility.Random(31)),95);		
			}
			
			//scales
			
			switch(Utility.Random(20))
			{
				case 0: return new BodQuestType("Red Scales","RedScales",5+5*Utility.Random(20),100);
				case 1: return new BodQuestType("Yellow Scales","YellowScales",2+5*Utility.Random(20),110);
				case 2: return new BodQuestType("Black Scales","BlackScales",2+5*Utility.Random(20),120);
				case 3: return new BodQuestType("Green Scales","GreenScales",2+5*Utility.Random(20),120);
				case 4: return new BodQuestType("White Scales","WhiteScales",2+5*Utility.Random(20),130);
				case 5: return new BodQuestType("Blue Scales","BlueScales",2+5*Utility.Random(20),140);
			}
			
			
			//rare resources
			switch(Utility.Random(6))
			{
				case 0: return new BodQuestType("Perfect Emeralds","PerfectEmerald",2+Utility.Random(9),120);
				case 1: return new BodQuestType("Dark Sapphires","DarkSapphire",2+Utility.Random(9),120);
				case 2: return new BodQuestType("Turquoises","Turquoise",2+Utility.Random(9),120);
				case 3: return new BodQuestType("Ecru Citrines","EcruCitrine",2+Utility.Random(9),120);
				case 4: return new BodQuestType("Fire Rubys","FireRuby",2+Utility.Random(9),120);
				case 5: return new BodQuestType("Blue Diamonds","BlueDiamond",2+Utility.Random(9),120);
			}
			
			
		 return new BodQuestType("Iron Ingots","IronIngot",5+(20*Utility.Random(20)),10);	
		}
		
		
		
		
		
		
		
		
		public static BodQuestType RandomTailorQuest()
		{
			//common resources
			switch(Utility.Random(Utility.Random(Utility.Random(10))))
			{
				case 0: return new BodQuestType("Cut leather","Leather",5+(25*Utility.Random(21)),0);
				case 1: return new BodQuestType("Cut spined leather","SpinedLeather",100+(25*Utility.Random(31)),10);
				case 2: return new BodQuestType("Cut horned leather","HornedLeather",100+(25*Utility.Random(31)),20);			
				case 3: return new BodQuestType("Cut barbed leather","BarbedLeather",100+(25*Utility.Random(31)),40);		
				case 4: return new BodQuestType("Cut leather","Leather",500+(25*Utility.Random(21)),50);
				case 5: return new BodQuestType("Cut spined leather","SpinedLeather",500+(25*Utility.Random(31)),70);
				case 6: return new BodQuestType("Cut horned leather","HornedLeather",500+(25*Utility.Random(31)),80);			
				case 7: return new BodQuestType("Cut barbed leather","BarbedLeather",500+(25*Utility.Random(31)),100);					
			}
			
			return new BodQuestType("Cut leather","Leather",5+(20*Utility.Random(20)),10);
		}
		
		
		

		
		
			
			
		public static BodQuestType RandomCarpenterQuest()
		{
			//common resources
			switch(Utility.Random(Utility.Random(8)))
			{
			case 0: return new BodQuestType("Regular boards","Board",300+(25*Utility.Random(31)),10);			
			case 1: return new BodQuestType("Oak boards","Oakboard",300+(25*Utility.Random(31)),30);
			case 2: return new BodQuestType("Ash Boards","AshBoard",300+(25*Utility.Random(31)),40);
			case 3: return new BodQuestType("Yew Boards","YewBoard",300+(25*Utility.Random(31)),50);
			case 4: return new BodQuestType("Bloodwood Boards","BloodwoodBoard",300+(25*Utility.Random(31)),65);	
			case 5: return new BodQuestType("Heartwood Board","HeartwoodBoard",300+(25*Utility.Random(31)),85);	
			case 6: return new BodQuestType("Frostwood Boards","FrostwoodBoard",300+(25*Utility.Random(31)),105);	
			}	

			//rare resources
			switch(Utility.Random(6))
			{
			case 0: return new BodQuestType("Bark Fragments","BarkFragment",2+Utility.Random(9),100);
			case 1: return new BodQuestType("Luminescent Fungus","Luminescent Fungi",2+Utility.Random(9),115);
			case 2: return new BodQuestType("Switches","Switch",2+Utility.Random(9),115);
			case 3: return new BodQuestType("Brilliant Ambers","BrilliantAmber",2+Utility.Random(9),115);
			}				
			
		 return new BodQuestType("Regular boards","Board",5+(20*Utility.Random(20)),10);
		}			
		
		
		
		
		
		
		
		
		

		
		
		//REWARDS
		//----------------------------------------------------------
		/*Note Adding rewards:
		
		add a line like this to appropriate array:
		
			new RewardEntry(new RunicHammerReward((int)CraftResource.DullCopper,20),20,30),
		
		Where 20 and 30 is the quest intensity range in which it will fall under,
		so a quest of intensity 4 would never give that reward, but a quest between 5 and 10 would.		
		
		The RunicHammerReward type is derrived from RewardType in RewardType.cs.  May need to add new entry for other rewards
		-------*/
		
		
		private static RewardEntry[] BlackSmithRewards = new RewardEntry[]
		{
			//lower end runics:
			new RewardEntry(new RunicHammerReward((int)CraftResource.DullCopper,10),20,30),
			new RewardEntry(new RunicHammerReward((int)CraftResource.ShadowIron,10),21,32),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Copper,10),22,35),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Bronze,10),23,37),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Gold,10),24,40),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Agapite,10),25,42),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Verite,10),26,45),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Valorite,10),27,50),
			
			//mid end runics:
			new RewardEntry(new RunicHammerReward((int)CraftResource.DullCopper,25),40,50),
			new RewardEntry(new RunicHammerReward((int)CraftResource.ShadowIron,25),41,52),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Copper,25),42,55),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Bronze,25),43,57),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Gold,25),44,50),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Agapite,25),45,52),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Verite,25),46,55),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Valorite,25),47,50),

			//high end runics:
			new RewardEntry(new RunicHammerReward((int)CraftResource.DullCopper,50),50,50),
			new RewardEntry(new RunicHammerReward((int)CraftResource.ShadowIron,50),55,70),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Copper,50),60,75),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Bronze,50),65,80),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Gold,50),70,85),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Agapite,50),80,90),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Verite,50),90,110),
			new RewardEntry(new RunicHammerReward((int)CraftResource.Valorite,50),100,120),		

			//low end ancient smithy hammer:
			new RewardEntry(new AncientSmithyHammerReward(5,10),5,30),			
			new RewardEntry(new AncientSmithyHammerReward(10,10),25,35),	
			new RewardEntry(new AncientSmithyHammerReward(15,10),30,40),	
			new RewardEntry(new AncientSmithyHammerReward(30,10),35,45),	
			new RewardEntry(new AncientSmithyHammerReward(60,10),40,50),
			
			//high end ancient smithy hammer:
			new RewardEntry(new AncientSmithyHammerReward(5,600),50,75),			
			new RewardEntry(new AncientSmithyHammerReward(10,600),60,80),	
			new RewardEntry(new AncientSmithyHammerReward(15,600),70,85),	
			new RewardEntry(new AncientSmithyHammerReward(30,600),80,95),	
			new RewardEntry(new AncientSmithyHammerReward(60,600),90,110),
			
			//Powder:
			new RewardEntry(new PowderOfTemperamentReward(1),0,30),
			new RewardEntry(new PowderOfTemperamentReward(3),20,50),
			new RewardEntry(new PowderOfTemperamentReward(10),40,80),
			new RewardEntry(new PowderOfTemperamentReward(25),60,90),
			new RewardEntry(new PowderOfTemperamentReward(100),105,120),
			
			//tools/equip:
			new RewardEntry(new SturdyShovelReward(150),0,30),
			new RewardEntry(new SturdyShovelReward(200),35,45),
			new RewardEntry(new SturdyShovelReward(300),40,65),
			new RewardEntry(new SturdyShovelReward(500),40,75),

			new RewardEntry(new GargoylesPickaxeReward(25),0,20),
			new RewardEntry(new GargoylesPickaxeReward(50),5,25),
			new RewardEntry(new GargoylesPickaxeReward(150),30,45),
			
			new RewardEntry(new LeatherGlovesOfMiningReward(5),20,45),
			new RewardEntry(new LeatherGlovesOfMiningReward(10),30,60),
			new RewardEntry(new LeatherGlovesOfMiningReward(15),50,90),
			new RewardEntry(new LeatherGlovesOfMiningReward(20),95,120),
			
			new RewardEntry(new ProspectorsToolReward(10),0,5),			
			new RewardEntry(new ProspectorsToolReward(25),0,7),			
			new RewardEntry(new ProspectorsToolReward(50),3,17),			
			new RewardEntry(new ProspectorsToolReward(100),20,35),			
			
			//power scrolls:
			
			new RewardEntry(new PowerScrollReward((int)SkillName.Blacksmith,105),25,50),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Blacksmith,110),40,70),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Blacksmith,115),65,100),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Blacksmith,120),80,105),	
			
			//recipes:
			
			new RewardEntry(new RecipeReward(1,1),70,60),
			new RewardEntry(new RecipeReward(2,1),80,110),
			new RewardEntry(new RecipeReward(3,1),110,150),


			//misc:
			new RewardEntry(new AnvilReward(),25,65),

		};
		
		
		
		public static Item RandomBlacksmithReward(BodQuestType type)
		{
			Bag bag = new Bag();
			bag.Hue=Utility.RandomBirdHue();			
			
			bag.DropItem(new BankCheck(200*Math.Max(1,type.PrizeLevel)*Math.Max(1,(type.ResourceAmount/100))));
			bag.DropItem(GetRewardFor(BlackSmithRewards,type.PrizeLevel,type.ResourceAmount));						
			
		
			for(int i=Utility.Random(type.PrizeLevel/10)+1;i>0;i--)
			{
				bag.DropItem(new SmallSmithBOD());
			}			
			if(0.1>Utility.RandomDouble())bag.DropItem(new LargeSmithBOD());
		
			return bag;
		}
		
		
		
		
		
		private static RewardEntry[] TailorRewards = new RewardEntry[]
		{
			//lower end runics:
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.SpinedLeather,10),17,20),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.HornedLeather,10),25,30),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.BarbedLeather,10),30,40),

			//mid end runics:
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.SpinedLeather,25),30,45),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.HornedLeather,25),50,65),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.BarbedLeather,25),60,80),		

			//higher end runics:
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.SpinedLeather,50),50,65),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.HornedLeather,50),55,85),
			new RewardEntry(new RunicSewingKitReward((int)CraftResource.BarbedLeather,50),65,100),	

			//cloth:
			new RewardEntry(new ClothReward(0),0,30),
			new RewardEntry(new ClothReward(1),5,60),
			new RewardEntry(new ClothReward(2),10,20),
			new RewardEntry(new ClothReward(3),15,30),
			new RewardEntry(new ClothReward(4),20,55),
			
			//power scrolls:			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tailoring,105),25,50),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tailoring,110),40,70),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tailoring,115),65,100),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tailoring,120),80,105),	
			
			//recipes:			
			new RewardEntry(new RecipeReward(1,2),70,60),
			new RewardEntry(new RecipeReward(2,2),80,110),
			new RewardEntry(new RecipeReward(3,2),110,150),
			
			
			//Powder:
			new RewardEntry(new PowderOfTemperamentReward(1),0,40),
			new RewardEntry(new PowderOfTemperamentReward(3),25,50),
			new RewardEntry(new PowderOfTemperamentReward(10),60,110),	
			
			
			//Deco:
			new RewardEntry(new GenericItemReward(typeof(LightFlowerTapestryEastDeed)),45,70),
			new RewardEntry(new GenericItemReward(typeof(LightFlowerTapestrySouthDeed)),45,70),
			new RewardEntry(new GenericItemReward(typeof(DarkFlowerTapestryEastDeed)),45,80),
			new RewardEntry(new GenericItemReward(typeof(DarkFlowerTapestrySouthDeed)),45,80),
			
			new RewardEntry(new GenericItemReward(typeof(SmallStretchedHideEastDeed)),23,36),
			new RewardEntry(new GenericItemReward(typeof(SmallStretchedHideSouthDeed)),23,36),
			new RewardEntry(new GenericItemReward(typeof(MediumStretchedHideEastDeed)),27,36),
			new RewardEntry(new GenericItemReward(typeof(MediumStretchedHideSouthDeed)),27,36),

			new RewardEntry(new GenericItemReward(typeof(BrownBearRugEastDeed)),50,85),
			new RewardEntry(new GenericItemReward(typeof(BrownBearRugSouthDeed)),50,85),
			new RewardEntry(new GenericItemReward(typeof(PolarBearRugEastDeed)),50,85),
			new RewardEntry(new GenericItemReward(typeof(PolarBearRugSouthDeed)),50,85),
			
			
			
			//misc:
			new RewardEntry(new GenericItemReward(typeof(ClothingBlessDeed)),75,100),
			new RewardEntry(new SandalsReward(),0,10),


			
			

		};

		public static Item RandomTailorReward(BodQuestType type)
		{
			Bag bag = new Bag();
			bag.Hue=Utility.RandomBirdHue();			
			
			bag.DropItem(new BankCheck(200*Math.Max(1,type.PrizeLevel)*Math.Max(1,(type.ResourceAmount/100))));			
			bag.DropItem(GetRewardFor(TailorRewards,type.PrizeLevel,type.ResourceAmount));		
			
						
		
			for(int i=Utility.Random(type.PrizeLevel/10)+1;i>0;i--)
			{
				bag.DropItem(new SmallTailorBOD());
			}
			
			if(0.1>Utility.RandomDouble())bag.DropItem(new LargeTailorBOD());

		
		return bag;
		}		
				
		
		
		
		
		private static RewardEntry[] CarpenterRewards = new RewardEntry[]
		{
			//lower end runics:
			new RewardEntry(new RunicSawReward((int)CraftResource.Oakwood,10),17,20),
			new RewardEntry(new RunicSawReward((int)CraftResource.Ashwood,10),24,30),
			new RewardEntry(new RunicSawReward((int)CraftResource.Yewwood,10),30,40),
			new RewardEntry(new RunicSawReward((int)CraftResource.Bloodwood,10),33,45),
			new RewardEntry(new RunicSawReward((int)CraftResource.Heartwood,10),35,50),
			new RewardEntry(new RunicSawReward((int)CraftResource.Frostwood,10),39,55),
			
			//mid end runics:
			new RewardEntry(new RunicSawReward((int)CraftResource.Oakwood,25),30,60),
			new RewardEntry(new RunicSawReward((int)CraftResource.Ashwood,25),35,65),
			new RewardEntry(new RunicSawReward((int)CraftResource.Yewwood,25),35,70),
			new RewardEntry(new RunicSawReward((int)CraftResource.Bloodwood,25),45,80),
			new RewardEntry(new RunicSawReward((int)CraftResource.Heartwood,25),45,80),
			new RewardEntry(new RunicSawReward((int)CraftResource.Frostwood,25),50,85),			
			
			//mid end runics:
			new RewardEntry(new RunicSawReward((int)CraftResource.Oakwood,50),50,60),
			new RewardEntry(new RunicSawReward((int)CraftResource.Ashwood,50),60,70),
			new RewardEntry(new RunicSawReward((int)CraftResource.Yewwood,50),70,80),
			new RewardEntry(new RunicSawReward((int)CraftResource.Bloodwood,50),75,85),
			new RewardEntry(new RunicSawReward((int)CraftResource.Heartwood,50),80,90),
			new RewardEntry(new RunicSawReward((int)CraftResource.Frostwood,50),85,120),	
			
			//power scrolls:			
			new RewardEntry(new PowerScrollReward((int)SkillName.Carpentry,105),25,50),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Carpentry,110),40,70),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Carpentry,115),65,100),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Carpentry,120),80,105),	

			//recipes:			
			new RewardEntry(new RecipeReward(1,5),70,60),
			new RewardEntry(new RecipeReward(2,5),80,110),
			new RewardEntry(new RecipeReward(3,5),110,150),			
			
			//Powder:
			new RewardEntry(new PowderOfTemperamentReward(1),0,30),
			new RewardEntry(new PowderOfTemperamentReward(5),20,40),		
			
			//tools
			new RewardEntry(new SturdyAxeReward(200),0,30),
			new RewardEntry(new SturdyAxeReward(500),20,60),
			new RewardEntry(new SturdyAxeReward(1000),75,90),
			new RewardEntry(new ReapersAxeReward(150),0,35),
			new RewardEntry(new ReapersAxeReward(250),20,50),
			new RewardEntry(new ReapersAxeReward(500),80,110),
			

			//misc item
			new RewardEntry(new GenericItemReward(typeof(ElectricChair)),0,20),
			
		};		
		
		public static Item RandomCarpenterReward(BodQuestType type)
		{
			Bag bag = new Bag();
			bag.Hue=Utility.RandomBirdHue();			
			
			bag.DropItem(new BankCheck(310*Math.Max(1,type.PrizeLevel)*Math.Max(1,(type.ResourceAmount/100))));			
			bag.DropItem(GetRewardFor(CarpenterRewards,type.PrizeLevel,type.ResourceAmount));

			return bag;
		}
		
		

		
		
		
		private static RewardEntry[] FletcherRewards = new RewardEntry[]
		{
			//lower end runics:
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Oakwood,10),17,20),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Ashwood,10),24,30),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Yewwood,10),30,40),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Bloodwood,10),33,45),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Heartwood,10),35,50),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Frostwood,10),39,55),
			
			//mid end runics:
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Oakwood,25),30,60),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Ashwood,25),35,65),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Yewwood,25),35,70),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Bloodwood,25),45,80),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Heartwood,25),45,80),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Frostwood,25),50,85),			
			
			//mid end runics:
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Oakwood,50),50,60),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Ashwood,50),60,70),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Yewwood,50),70,80),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Bloodwood,50),75,85),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Heartwood,50),80,90),
			new RewardEntry(new RunicFletchingKitReward((int)CraftResource.Frostwood,50),85,120),	
			
			//power scrolls:			
			new RewardEntry(new PowerScrollReward((int)SkillName.Fletching,105),25,50),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Fletching,110),40,70),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Fletching,115),65,100),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Fletching,120),80,105),	

			//recipes:			
			new RewardEntry(new RecipeReward(1,3),70,60),
			new RewardEntry(new RecipeReward(2,3),80,110),
			new RewardEntry(new RecipeReward(3,3),110,150),			
			
			//Powder:
			new RewardEntry(new PowderOfTemperamentReward(1),0,40),
			new RewardEntry(new PowderOfTemperamentReward(5),50,75),				
			
			//tools
			new RewardEntry(new SturdyAxeReward(200),0,30),
			new RewardEntry(new SturdyAxeReward(500),20,30),
			new RewardEntry(new SturdyAxeReward(1000),75,90),
			new RewardEntry(new ReapersAxeReward(150),0,35),
			new RewardEntry(new ReapersAxeReward(250),20,50),
			new RewardEntry(new ReapersAxeReward(500),80,110),
			

			//misc item
			new RewardEntry(new GenericItemReward(typeof(Quiver)),0,20),
			
		};			
		
		
		public static Item RandomFletcherReward(BodQuestType type)
		{
			Bag bag = new Bag();
			bag.Hue=Utility.RandomBirdHue();			
			
			bag.DropItem(new BankCheck(310*Math.Max(1,type.PrizeLevel)*Math.Max(1,(type.ResourceAmount/100))));			
			bag.DropItem(GetRewardFor(FletcherRewards,type.PrizeLevel,type.ResourceAmount));
		
			return bag;
		}		
		
		
		
		
		
		
		
		
		private static RewardEntry[] TinkerRewards = new RewardEntry[]
		{
			//lower end runics:
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.DullCopper,3),20,30),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.ShadowIron,3),21,32),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Copper,3),22,35),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Bronze,3),23,37),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Gold,3),24,40),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Agapite,3),25,42),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Verite,3),26,45),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Valorite,3),27,50),
			
			//mid end runics:
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.DullCopper,10),40,50),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.ShadowIron,10),41,52),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Copper,10),42,55),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Bronze,10),43,57),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Gold,10),44,50),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Agapite,10),45,52),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Verite,10),46,55),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Valorite,10),47,50),

			//high end runics:
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.DullCopper,25),50,50),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.ShadowIron,25),55,70),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Copper,25),60,75),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Bronze,25),65,80),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Gold,25),70,85),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Agapite,25),80,90),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Verite,25),90,110),
			new RewardEntry(new RunicTinkerKitReward((int)CraftResource.Valorite,25),100,120),		

			
			//Powder:
			new RewardEntry(new PowderOfTemperamentReward(1),0,30),
			new RewardEntry(new PowderOfTemperamentReward(3),20,50),
			new RewardEntry(new PowderOfTemperamentReward(10),40,80),

			
			//tools/equip:
			new RewardEntry(new SturdyShovelReward(150),0,30),
			new RewardEntry(new SturdyShovelReward(200),35,45),
			new RewardEntry(new SturdyShovelReward(300),40,65),
			new RewardEntry(new SturdyShovelReward(500),40,75),

			new RewardEntry(new GargoylesPickaxeReward(25),0,20),
			new RewardEntry(new GargoylesPickaxeReward(50),5,25),
			new RewardEntry(new GargoylesPickaxeReward(150),30,45),
			
			new RewardEntry(new LeatherGlovesOfMiningReward(5),0,45),
			new RewardEntry(new LeatherGlovesOfMiningReward(10),30,60),
			new RewardEntry(new LeatherGlovesOfMiningReward(15),50,90),
			new RewardEntry(new LeatherGlovesOfMiningReward(20),95,120),
			
			new RewardEntry(new ProspectorsToolReward(10),0,5),			
			new RewardEntry(new ProspectorsToolReward(25),0,7),			
			new RewardEntry(new ProspectorsToolReward(50),3,17),			
			new RewardEntry(new ProspectorsToolReward(100),20,35),			
			
			//power scrolls:
			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tinkering,105),25,50),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tinkering,110),40,70),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tinkering,115),65,100),			
			new RewardEntry(new PowerScrollReward((int)SkillName.Tinkering,120),80,105),	
			
			//recipes:
			
			new RewardEntry(new RecipeReward(1,4),70,60),
			new RewardEntry(new RecipeReward(2,4),80,110),
			new RewardEntry(new RecipeReward(3,4),110,150),


		};		
		
		public static Item RandomTinkerReward(BodQuestType type)
		{
			Bag bag = new Bag();
			bag.Hue=Utility.RandomBirdHue();			
			
			bag.DropItem(new BankCheck(270*Math.Max(1,type.PrizeLevel)*Math.Max(1,(type.ResourceAmount/100))));			
			bag.DropItem(GetRewardFor(TinkerRewards,type.PrizeLevel,type.ResourceAmount));
		
		return bag;
		}		
		
		


	}
}