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); }
override public void Commit(AbstractQuest quest, StoryTeller storyTeller) { //Story story = new Story(); //story.Add(storyTeller.NarratorVoice, _avatar.ClassDescription + " moves"); //storyTeller.StoryComplete += OnStoryComplete; //storyTeller.TellStory(story); // Look up the avatars tile MapTile avatarTile = quest.GetAvatarMapTile(_avatar); Point avatarCurrentLocation = quest.GetAvatarLocation(_avatar); // Update the avatars vector Point moveToPoint = _stepsToLocation[0]; _stepsToLocation.RemoveAt(0); HasMoreTurns = (_stepsToLocation.Count > 0) ? true : false; // If there are more steps, then we can be used in subsequent turns! AcceptsAvatarFocus = HasMoreTurns; _avatar.movementVector.X = moveToPoint.X - avatarCurrentLocation.X; _avatar.movementVector.Y = moveToPoint.Y - avatarCurrentLocation.Y; _avatar.TurnState.MovementPointsLeft--; // Move the tile quest.Map.MoveMapTile(avatarTile, moveToPoint); quest.Map.SetFactionWalkedOn(_avatar.Faction, moveToPoint); DoComplete(); }
public QuestView(AbstractQuest quest, ChanceProvider chanceProvider, StoryTeller storyTeller) { InitializeComponent(); _quest = quest; _chanceProvider = chanceProvider; _storyTeller = storyTeller; _turnTakers = new List<Avatar>(); _currentTurnTaker = null; _currentTurnTakerIndex = -1; _turnTimer = new DispatcherTimer(); _turnTimer.Interval = TimeSpan.FromMilliseconds(500); _turnTimer.Tick += OnTurnTimerTick; Loaded += OnLoaded; }
override public void Commit(AbstractQuest quest, StoryTeller storyTeller) { if (_tileAction is IRequiresModifiableMap) { ((IRequiresModifiableMap)_tileAction).SetModifiableMap(quest.Map); } if (_tileAction is IRequiresAvatar) { ((IRequiresAvatar)_tileAction).SetAvatar(_avatar); } if (_tileAction is IRequiresQuest) { ((IRequiresQuest)_tileAction).SetQuest(quest); } if (_tileAction.ConsumesTurnAction) { RequiresAction = true; _avatar.TurnState.HasTakenAction = true; if (_avatar.TurnState.TotalMovementPointsForTurn != _avatar.TurnState.MovementPointsLeft) { _avatar.TurnState.MovementPointsLeft = 0; } } _tileAction.Execute(); DoComplete(); }
public void SetQuest(AbstractQuest quest) { _quest = quest; }
public virtual void Commit(AbstractQuest map, StoryTeller storyTeller) { } // Override with subclasses
public QuestAnalyzer(AbstractQuest quest):base() { _quest = quest; }