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


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

namespace Server.Engines.Quests.Bods
{
		public abstract class RewardType
		{			
			protected int[] param = new int[5];
		
			
			public RewardType(int p1,int p2,int p3,int p4,int p5)
			{
				param[0]=p1;
				param[1]=p2;
				param[2]=p3;
				param[3]=p4;
				param[4]=p5;
			}
			
			public RewardType(int p1,int p2,int p3,int p4) : this(p1,p2,p3,p4,0)
			{
			}
			
			public RewardType(int p1,int p2,int p3) : this(p1,p2,p3,0,0)
			{
			}
			
			public RewardType(int p1,int p2) : this(p1,p2,0,0,0)
			{
			}
			
			public RewardType(int p1) : this(p1,0,0,0,0)
			{
			}
			
			public RewardType() : this(0,0,0,0,0)
			{
			}	
			
			
			public abstract Item Generate();

				
		}
		
		
		//declare new child classes to add new rewards:
		//---------------------------------------------
		
		public class GenericItemReward : RewardType
		{
			protected Type itemtype;			
			
			public GenericItemReward(Type pitemtype)
			{
				itemtype=pitemtype;
			}
			
			public override Item Generate()
			{
				if(itemtype==null)return null;
				
				Item i=null;
				
				try
				{
					i = Activator.CreateInstance( itemtype ) as Item;
				}
				catch
				{ }
				return i;
			}
		}
		
		

		
		public class RecipeReward : RewardType
		{
			
			public RecipeReward(int crafttype,int level) : base(crafttype,level)
			{
			}			
			
			public override Item Generate()
			{				
				return RandomRecipe.Peerless(param[0], param[1]);
			}		
		
		}		
		
		
		public class RunicHammerReward : RewardType
		{
			
			public RunicHammerReward(int restype,int charges) : base(restype,charges)
			{
			}			
			
			public override Item Generate()
			{
				RunicHammer hammer = new RunicHammer((CraftResource)param[0],param[1]);				
				
				return hammer;
			}		
		}
		
		public class RunicSewingKitReward : RewardType
		{
			
			public RunicSewingKitReward(int restype,int charges) : base(restype,charges)
			{
			}			
			
			public override Item Generate()
			{
				RunicSewingKit kit = new RunicSewingKit((CraftResource)param[0],param[1]);				
				
				return kit;
			}		
		}	

		public class RunicSawReward : RewardType
		{
			
			public RunicSawReward(int restype,int charges) : base(restype,charges)
			{
			}			
			
			public override Item Generate()
			{
				RunicSaw saw = new RunicSaw((CraftResource)param[0],param[1]);				
				
				return saw;
			}		
		}	

		public class RunicFletchingKitReward : RewardType
		{
			
			public RunicFletchingKitReward(int restype,int charges) : base(restype,charges)
			{
			}			
			
			public override Item Generate()
			{
				RunicFletchingKit saw = new RunicFletchingKit((CraftResource)param[0],param[1]);				
				
				return saw;
			}		
		}	

		public class RunicTinkerKitReward : RewardType
		{
			
			public RunicTinkerKitReward(int restype,int charges) : base(restype,charges)
			{
			}			
			
			public override Item Generate()
			{
				RunicTinkerKit saw = new RunicTinkerKit((CraftResource)param[0],param[1]);				
				
				return saw;
			}		
		}		
		
		public class AncientSmithyHammerReward : RewardType
		{
			
			public AncientSmithyHammerReward(int bonus,int charges) : base(bonus,charges)
			{
			}			
			
			public override Item Generate()
			{
				AncientSmithyHammer hammer = new AncientSmithyHammer(param[0],param[1]);			
				
				return hammer;
			}		
		
		}		
		
		public class PowerScrollReward : RewardType
		{
		
			public PowerScrollReward(int skillname,int amt) : base(skillname,amt)
			{
			}
			
			public override Item Generate()
			{
				return new PowerScroll((SkillName)param[0],param[1]);			
			}		
		}		
		
		
		public class PowderOfTemperamentReward : RewardType
		{
		
			public PowderOfTemperamentReward(int charges) : base(charges)
			{
			}
			
			public override Item Generate()
			{
				return new PowderOfTemperament(param[0]);			
			}		
		}
		
		
		public class SturdyShovelReward : RewardType
		{
		
			public SturdyShovelReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new SturdyShovel(param[0]);			
			}		
		}
		
		public class SturdyAxeReward : RewardType
		{
		
			public SturdyAxeReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new SturdyAxe(param[0]);			
			}		
		}		

		
		public class GargoylesPickaxeReward : RewardType
		{
		
			public GargoylesPickaxeReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new GargoylesPickaxe(param[0]);			
			}		
		}
		
		
		public class ReapersAxeReward : RewardType
		{
		
			public ReapersAxeReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new ReapersAxe(param[0]);			
			}		
		}
				
		

		public class LeatherGlovesOfMiningReward : RewardType
		{
		
			public LeatherGlovesOfMiningReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new LeatherGlovesOfMining(param[0]);			
			}		
		}			
		
		public class ProspectorsToolReward : RewardType
		{
		
			public ProspectorsToolReward(int uses) : base(uses)
			{
			}
			
			public override Item Generate()
			{
				return new  ProspectorsTool(param[0]);			
			}		
		}			
		
		public class ClothReward : RewardType
		{
		
			public ClothReward(int level) : base(level)
			{
			}
			
			public override Item Generate()
			{
				return TailorRewardCalculator.CreateCloth(param[0]);		
			}		
		}	

		public class SandalsReward : RewardType
		{
		
			public SandalsReward() : base()
			{
			}
			
			public override Item Generate()
			{
				return TailorRewardCalculator.CreateSandals(0);		
			}		
		}	

		public class AnvilReward : RewardType
		{
		
			public AnvilReward() : base()
			{
			}
			
			public override Item Generate()
			{
				Item togive=null;
				
				if(Utility.RandomBool())togive=new AnvilEastDeed();
				else togive = new AnvilSouthDeed();
				
				togive.Hue=CraftResources.GetHue( (CraftResource)Utility.RandomMinMax( (int)CraftResource.DullCopper, (int)CraftResource.Valorite ));
				
				return togive;			
			}		
		}			
		
		
}