/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by Death on Apr-18-2011 09:34:36pm
Filepath: scripts\_custom\Revised Class Quests\Red Solen Matriarch\NewRedSolenMatriarchQuest.cs
Lines of code: 109
***********************************************************/


using System;
using Server;
using Server.Items;
using Server.Mobiles;

namespace Server.Engines.Quests
{
	public class NewRedSolenMatriarchQuestPart1 : BaseQuest
	{		
		public override QuestChain ChainID{ get{ return QuestChain.NewRedSolenMatriarchQuest; } }
		public override Type NextQuest{ get{ return typeof( NewRedSolenMatriarchQuestPart2 ); } }
		
		/* Red Solen Matriarch (Part 1) */
		public override object Title{ get{ return "Red Solen Matriarch (Part 1)"; } }
		
		/* <I>The Solen Matriarch smiles happily as you greet her.</I><BR><BR>
		* 
		* Hello again. It is always good to see a friend of our colony.<BR><BR>
		* 
		* Would you like me to process some zoogi fungus into powder of translocation
		* for you? I would be happy to do so if you will first undertake a couple
		* tasks for me.<BR><BR>
		* 
		* First, I would like for you to eliminate some infiltrators from the other
		* solen colony. They are spying on my colony, and I fear for the safety of my
		* people. They must be slain.<BR><BR>
		* 
		* After that, I must ask that you gather some water for me. Our water supplies
		* are inadequate, so we must try to supplement our reserve using water vats here
		* in our lair.<BR><BR>
		* 
		* Will you accept my offer?
		*/
		public override object Description{ get{ return 1054083; } }
		
		public override object Refuse{ get{ return "You refuse the quest"; } }
		
		/* <I>The Solen Matriarch looks pleased that you've accepted.</I><BR><BR>
		* 
		* Very good. Please start by hunting some infiltrators from the other solen
		* colony and eliminating them. Slay 7 of them and then return to me.<BR><BR>
		* 
		* Farewell for now and good hunting.
		*/
		public override object Uncomplete{ get{ return 1054084; } }
		
		public override object Complete{ get{ return "You return from killing the solen infiltrators."; } }
		
		public NewRedSolenMatriarchQuestPart1() : base()
		{							
			AddObjective( new SlayObjective( typeof( BlackSolenInfiltrator ), "Black Solen Infiltrators", 7 ) );					
			AddReward( new BaseReward( "Quest Continuation (Part 2)" ) );
		}
		
		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 NewRedSolenMatriarchQuestPart2 : BaseQuest
	{		
		public override QuestChain ChainID{ get{ return QuestChain.NewRedSolenMatriarchQuest; } }
		public override Type NextQuest{ get{ return typeof( NewRedSolenMatriarchQuestPart3 ); } } 
		
		/* Red Solen Matriarch (Part 2) */
		public override object Title{ get{ return "Red Solen Matriarch (Part 2)"; } }
		
		/* <I>The Solen Matriarch nods favorably as you approach her.</I><BR><BR>
		* 
		* Marvelous! I'm impressed at your ability to hunt and kill enemies for me.
		* My colony is thankful.<BR><BR>
		* 
		* Now I must ask that you gather some water for me. A standard pitcher of water
		* holds approximately one gallon. Please decant 8 gallons of fresh water
		* into our water vats.<BR><BR>
		* 
		* Farewell for now.
		*/
		public override object Description{ get{ return 1054091; } }
		
		public override object Refuse{ get{ return "You refuse the quest"; } }
		
		/* <I>The Solen Matriarch looks up as you approach.</I><BR><BR>
		* 
		* You're back, but you have not yet gathered 8 gallons of water. Return when
		* you have completed this task.<BR><BR>
		* 
		* Carry on. I'll be waiting for your return.
		*/
		public override object Uncomplete{ get{ return 1054094; } }
		
		public override object Complete{ get{ return "You return from gathering the pitchers of water."; } }
		
		public NewRedSolenMatriarchQuestPart2() : base()
		{													
			AddObjective( new InternalObjective() );		
			
			AddReward( new BaseReward( "Quest Continuation (Part 3)" ) );
			//AddReward( new BaseReward( "Red Solen Friendship" ) );
		}
		
		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();
		}
		
		private class InternalObjective : ObtainObjective
		{
			public InternalObjective() : base( typeof( Pitcher ), "Pitchers of Water", 8, 0x0FF9)
			{
			}
			
			public override bool IsObjective( Item item )
			{
				if ( base.IsObjective( item ) )
				{
					Pitcher pitcher = (Pitcher) item;
					
					if ( pitcher.Content == BeverageType.Water && !pitcher.IsEmpty )
						return true;
				}
				
				return false;
			}			
		
			public override void Serialize( GenericWriter writer )
			{
				base.Serialize( writer );
				
				writer.WriteEncodedInt( (int) 0 ); // version
			}
			
			public override void Deserialize( GenericReader reader )
			{
				base.Deserialize( reader );
				
				int version = reader.ReadEncodedInt();
			}	
		}
	}
	
	public class NewRedSolenMatriarchQuestPart3 : BaseQuest
	{		
		public override QuestChain ChainID{ get{ return QuestChain.NewRedSolenMatriarchQuest; } }
		public override Type NextQuest{ get{ return typeof( TheGoldenHornQuest ); } } //Needs this but never uses it. It's a blank placeholder essentially
		
		/* Red Solen Matriarch (Part 3) */
		public override object Title{ get{ return "Red Solen Matriarch (Part 3)"; } }
		
		/* <I>The Solen Matriarch listens as you report the completion of your
		* tasks to her.</I><BR><BR>
		* 
		* I give you my thanks for your help, and I will gladly process some zoogi
		* fungus into powder of translocation for you. Two of the zoogi fungi are
		* required for each measure of the powder. I will process up to 200 zoogi fungi
		* into 100 measures of powder of translocation.<BR><BR>
		* 
		* I will also give you some gold for assisting me and my colony, but first let's
		* take care of your zoogi fungus.
		*/
		public override object Description{ get{ return 1054097; } }
		
		public override object Refuse{ get{ return "You refuse the quest"; } }
		
		/* <I>The Solen Matriarch smiles as you greet her.</I><BR><BR>
		* 
		* I will gladly process some zoogi fungus into powder of translocation for you.
		* Two of the zoogi fungi are required for each measure of the powder.
		* I will process up to 200 zoogi fungi into 100 measures of powder of translocation.
		*/
		public override object Uncomplete{ get{ return 1054099; } }
		
		/* <I>The Solen Matriarch smiles as you greet her.</I><BR><BR>
		* 
		* Ah good, you've returned. I will conclude our business by giving you
		* gold I owe you for aiding me.
		*/
		public override object Complete{ get{ return 1054101; } }
		
		public NewRedSolenMatriarchQuestPart3() : base()
		{													
			AddObjective( new ObtainObjective( typeof( ZoogiFungus ), "Zoogi Fungus", 200, 0x26B7 ) );
										
			AddReward( new BaseReward( typeof( PowderOfTranslocation ), 100,  1029912 ) ); 
			AddReward( new BaseReward( typeof( Gold ), Utility.RandomMinMax( 250, 350 ), 1062577 ) ); 
		}
		
		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();
		}
	}
}