private bool HeartDialogue(DialogueConditions conditions, out IDialogueWrapper dialogue) { { for (var i = 14; i > 0; i--) { if (_conditionRepository.HeartDialogueDictionary.ContainsKey((i, true))) { foreach (var func in _conditionRepository.HeartDialogueDictionary[(i, true)]) { dialogue = _factory.CreateInstance <IDialogueWrapper>(func(conditions, i)); if (dialogue != null) { return(true); } } } if (conditions.Hearts >= i && CheckIfDialogueContainsKey(conditions.Npc, FluentDialogueBuilder.New(conditions).Season().DayOfWeek().Hearts(i).FirstOrSecondYear().Married().Build(_logger), out dialogue)) { return(true); } if (conditions.Hearts >= i && CheckIfDialogueContainsKey(conditions.Npc, FluentDialogueBuilder.New(conditions).Season().DayOfWeek().Hearts(i).Married().Build(_logger), out dialogue)) { return(true); } } dialogue = null; return(false); }
private bool LastPassDialogue(DialogueConditions conditions, out IDialogueWrapper dialogue) { if (conditions.Npc.Name.Equals("Caroline") && _gameWrapper.isLocationAccessible("CommunityCenter") && (conditions.Season == Season.Summer && conditions.DayOfWeek == DayOfWeek.Mon)) { dialogue = _factory.CreateInstance <IDialogueWrapper>( conditions.Npc.Dialogue["summer_Wed"], conditions.Npc); return(true); } if (CheckIfDialogueContainsKey(conditions.Npc, FluentDialogueBuilder.New(conditions).Season().DayOfWeek().FirstOrSecondYear().Married().Build(_logger), out dialogue)) { return(true); } if (CheckIfDialogueContainsKey(conditions.Npc, FluentDialogueBuilder.New(conditions).Season().DayOfWeek().Married().Build(_logger), out dialogue)) { return(true); } dialogue = null; return(false); }
private bool NullIfTruePass(DialogueConditions conditions) { if (!conditions.Npc.Dialogue.ContainsKey(FluentDialogueBuilder .New(conditions).Season().DayOfWeek().Married().Build(_logger))) { return(true); } return(false); }
private bool FirstPassDialogue(DialogueConditions conditions, out IDialogueWrapper dialogue) { if (conditions.Season == Season.Spring && conditions.DayOfMonth == 12) { Console.Write(string.Empty); } foreach (var useYear in new[] { false, true }) { if (CheckIfDialogueContainsKey(conditions.Npc, FluentDialogueBuilder.New(conditions).Season().DayOfMonth().Married().FirstOrSecondYear(useYear).Build(_logger), out dialogue, () => conditions.FirstOrSecondYear == 1)) { return(true); } } dialogue = null; return(false); }