override public void Commit(AbstractQuest quest, StoryTeller storyTeller)
		{
			Story story = new Story();
			story.Add(storyTeller.NarratorVoice, _actor.ClassDescription + " is confused and doesn't know what to do.");
			storyTeller.StoryComplete += OnStoryComplete;
			storyTeller.TellStory(story);
		}
		override public void Commit(AbstractQuest map, StoryTeller storyTeller)
		{
			Story story = new Story();
			story.Add(storyTeller.NarratorVoice, _actor.ClassDescription + " is dead.");
			storyTeller.StoryComplete += OnStoryComplete;
			storyTeller.TellStory(story);
		}
		private void OnLoaded(object sender, EventArgs args)
		{
			Story story = new Story();
			story.Add(_storyTeller.NarratorVoice, "All of the Heroes have died.  Xargon wins!  Better luck next time, Heroes.");

			_storyTeller.StoryComplete += OnStoryComplete;
			_storyTeller.TellStory(story);
		}
Exemplo n.º 4
0
		public TheTrial(List<Hero> heroes):base(new Point(1, 14), heroes)
		{
			// Configure the story
			StoryTeller storyTeller = new StoryTeller();
			IntroductionStory = new Story();
			IntroductionStory.Add(storyTeller.NarratorVoice, "Quest one.  The Trial.");
			//IntroductionStory.Add(storyTeller.MentorVoice, "You have learned well, my friends.  Now has come the time of your first trial.  You must first enter the catacombs which contain Fellmarg's Tomb.  You must seek out and destroy Verag, a foul Gargoyle who hides in the catacombs.  This Quest is not easy and you must work together in order to survive.  This is your first step on the road to becoming true Heroes.  Tread carefully my friends.");

			// Prepare the map
			Map.SetBaseAreaWithTile(new Point(0, 0), 26, 1, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(12, 0), 2, 5, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(14, 1), 12, 5, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(17, 6), 9, 7, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(18, 13), 8, 5, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(14, 18), 12, 1, new FloorBlockedTile());
			Map.SetBaseAreaWithTile(new Point(5, 10), 4, 3, new FloorBlockedTile());

			Map.SetBaseTile(0, 1, new RockTile());
			Map.SetBaseTile(12, 5, new RockTile());
			Map.SetBaseTile(13, 5, new RockTile());
			Map.SetBaseTile(17, 9, new RockTile());
			Map.SetBaseTile(14, 18, new RockTile());

			List<TwoLinkedPoints> doorLocations = new List<TwoLinkedPoints>();
			doorLocations.Add(new TwoLinkedPoints(3, 4, 3, 3));
			doorLocations.Add(new TwoLinkedPoints(4, 2, 5, 2));
			doorLocations.Add(new TwoLinkedPoints(8, 2, 9, 2));
			doorLocations.Add(new TwoLinkedPoints(3, 8, 3, 9));
			doorLocations.Add(new TwoLinkedPoints(0, 11, 1, 11));
			doorLocations.Add(new TwoLinkedPoints(3, 18, 3, 17));
			doorLocations.Add(new TwoLinkedPoints(7, 17, 7, 18));
			doorLocations.Add(new TwoLinkedPoints(8, 15, 9, 15));
			doorLocations.Add(new TwoLinkedPoints(10, 12, 10, 13));
			doorLocations.Add(new TwoLinkedPoints(13, 15, 14, 15));
			doorLocations.Add(new TwoLinkedPoints(15, 9, 16, 9));

			//Map.RemoveBarriersBetween(1, 17, 1, 18); // Debug, chop a hole to test line of sight.

			foreach (TwoLinkedPoints linkedPoints in doorLocations)
			{ Map.RemoveBarriersBetween(linkedPoints.PointA, linkedPoints.PointB); }

			// Calculate nodes
			Map.CalculatePathfindingGraph();

			foreach (TwoLinkedPoints linkedPoints in doorLocations)
			{ Map.AddDoorBetween(linkedPoints.PointA, linkedPoints.PointB); }

			Map.AddTile(10, 5, new TreasureChestHorizontalTile());
			Map.AddTile(11, 7, new TreasureChestHorizontalTile());
			Map.AddTile(17, 16, new TreasureChestVerticalTile());

			//AddMonster(new Monster(new AvatarClassOrc()), new Point(7, 14));
			//AddMonster(new Monster(new AvatarClassOrc()), new Point(8, 15));
		}
		private void OnLoaded(object sender, EventArgs args)
		{
			Loaded -= OnLoaded;

			Story introduction = new Story();
			introduction.Add(_storyTeller.NarratorVoice, "The fire burns warmly, but casts little light into Mentor's study.  The flickering shadows only hint at the vast number of books and scrolls that fill the many shelves.  Slowly Mentor walks over to the fire.");
			introduction.Add(_storyTeller.MentorVoice, "Well, my friends, your training is complete.  You are not yet true Heroes, you have yet to prove yourselves.  But first, let me tell you of Zargon.");
			introduction.Add(_storyTeller.MentorVoice, "Many centuries ago, Zargon was my apprentice.  He worked hard and learned quickly.  But impatience devoured him.  He wanted to learn more powerful magic.  I told him of the dangers, and that he should be patient, for in time he would become a great sorcerer.  But Zargon could not wait;  each night he broke into my study and read my spell books.  The secrets that were held within them were great indeed.  Once he learned these secrets, Zargon fled.");
			introduction.Add(_storyTeller.MentorVoice, "When I caught up with him, I found him greatly changed.  He had pledged his allegiance to the Great Powers of Chaos.  Fool!  He saw magic only as a short-cut to power and paid no heed to the terrible price he would have to pay.  I tried to reason with him, but to no avail.  He laughed in my face and then unleashed a terrible spell which I was hard-pressed to counter.  For many days we battled, but Zargon had allies stronger even than I, and I could not defeat him.  In the end, as we both weakened, he fled and sought refuge in the Northern Chaos Wastes.  There he licked his wounds and honed his skills, conjuring ancient powers with which to overthrow the Empire.");
			introduction.Add(_storyTeller.MentorVoice, "I must watch Zargon and measure the strength of his magic.  The powers Zargon has called upon will destroy us all if I relax from this vigil.  Zargon's legions threatened us once before.  Then it was Rogar who aided me and defeated them.  Now they are on the march again; already they have assailed the Borderlands.  The Empire must again look for Heroes and to this end have I trained you.");
			introduction.Add(_storyTeller.MentorVoice, "Each of you must complete 14 quests.  If you do this, you will be acclaimed as Champions of the Realm and dubbed Imperial Knights.  Only then will you be on the road to becoming true Heroes.  I shall speak with you again on your return.  If you return.");

			_storyTeller.StoryComplete += OnStoryComplete;
			_storyTeller.TellStory(introduction);
		}
Exemplo n.º 6
0
		public void TellStory(Story story)
		{
			if (!story.HasNextLine)
			{ return; } // Do nothing

			_stories.Add(story);

			if (!CurrentlyPlaying)
			{
				_currentlyPlaying = true;
				_currentStory = story;

				StoryLine currentLine = _currentStory.NextLine();
				_synthesizer.SelectVoice(currentLine.Voice);
				_synthesizer.SpeakAsync(currentLine.Line);
			}
		}
Exemplo n.º 7
0
		private void OnSpeakCompleted(object sender, EventArgs args)
		{
			System.Diagnostics.Debug.WriteLine("OnSpeakCompleted(sender, args)");

			// Get the next line in the current story
			if (_currentStory.HasNextLine)
			{
				StoryLine currentLine = _currentStory.NextLine();
				_synthesizer.SelectVoice(currentLine.Voice);
				_synthesizer.SpeakAsync(currentLine.Line);
			}
			else
			{
				int storyIndex = _stories.IndexOf(_currentStory);
				_stories.RemoveAt(storyIndex);

				// Do we have another Story
				if (_stories.Count > 0)
				{
					_currentStory = _stories[_stories.Count - 1];

					StoryLine currentLine = _currentStory.NextLine();
					_synthesizer.SelectVoice(currentLine.Voice);
					_synthesizer.SpeakAsync(currentLine.Line);
				}
				else
				{
					_currentStory = null;
					_currentlyPlaying = false;

					if (StoryComplete != null)
					{ StoryComplete(this, new EventArgs()); }
				}
			}
		}