public override GameFrameStory Interact() { if (Flags.PrincessKidnapped) { if (GaveFish) { GameStory = base.Interact(); } else { GameStory = ReadStory("master_pre_fishes.ink"); var fishCount = Flags.FishCount; GameStory.ChoosePathString("dialog"); GameStory.SetVariableState("fish_count", fishCount); } } else { GameStory = ReadStory("master_pre_kidnapping.ink"); } return(GameStory); }
public override GameFrameStory Interact() { var scriptName = Flags.LearnedFight ? "north_guard_post_fight.ink" : "north_guard_pre_fight.ink"; GameStory = ReadStory(scriptName); if (Flags.LearnedFight) { GameStory.ChoosePathString("dialog"); CompleteEvent completeEvent = victory => { if (victory) { var collision = _collision.Invoke(Position.ToPoint(), EndPosition.ToPoint()); var endPoint = collision ? _alternativeEndPoint : EndPosition; MoveDelegate?.Invoke(this, endPoint.ToPoint()); GameFlags.SetVariable(FlagName, true); AlreadyMoved = true; } }; ReadStory(GameStory, completeEvent); } return(GameStory); }
public override GameFrameStory Interact() { GameStory = ReadStory(ScriptName); GameStory.ChoosePathString("dialog"); CompleteEvent completeEvent = win => { if (win) { var collision = _collision.Invoke(Position.ToPoint(), EndPosition.ToPoint()); var endPoint = collision ? _alternativeEndPoint : EndPosition; MoveDelegate?.Invoke(this, endPoint.ToPoint()); GameFlags.SetVariable(FlagName, true); AlreadyMoved = true; } var dialog = win ? "victory.ink" : "defeat.ink"; var storyScript = StoryImporter.ReadStory(dialog); var newStory = new GameFrameStory(storyScript); newStory.Continue(); _say.Invoke(newStory); }; ReadStory(GameStory, completeEvent); return(GameStory); }