public DialogFlow GetCaughtByGuardsDialogFlow(Hero victim, bool canBribe, Action onFightStart, Action onGuardsBribed)
        {
            var bribeAmount = AssassinationCaughtByGuardsLogic.GuardsBribeAmount;

            var startFightOption = new TextObject("{=aaC7DDfK}I am here to put an end to {VICTIM_NAME}. Move aside or die!");

            startFightOption.SetTextVariable("VICTIM_NAME", victim.FirstName);

            var bribeGuardsOption = new TextObject("{=3N7FUr35}Perhaps we can come to some sort of agreement... (Bribe {BRIBE_AMOUNT} gold)");

            bribeGuardsOption.SetTextVariable("BRIBE_AMOUNT", string.Format("{0:n0}", bribeAmount));

            var dialogFlow = DialogFlow
                             .CreateDialogFlow("start", int.MaxValue)
                             .NpcLine(new TextObject("{=cIL4bcTL}Halt! Who are you? It is forbidden to bring weapons into the keep."))
                             .BeginPlayerOptions()
                             .PlayerOption(startFightOption)
                             .Consequence(() => onFightStart())
                             .CloseDialog()
                             .PlayerOption(bribeGuardsOption)
                             .Condition(() => canBribe)
                             .ClickableCondition((out TextObject explanation) => BribeGuardsClickableCondition(out explanation, bribeAmount))
                             .NpcLine(new TextObject("{=a1tXDKmk}That's more like it. Make it quick, before I change my mind."))
                             .CloseDialog()
                             .Consequence(() => onGuardsBribed())
                             .EndPlayerOptions();

            return(dialogFlow);
        }
Пример #2
0
        protected override void SetDialogs()
        {
            // Dialog to discuss the quest?

            OfferDialogFlow = DialogFlow.CreateDialogFlow(QuestManager.QuestOfferToken, 100)
                              .NpcLine(new TextObject("We have run into a problem with certain units"))
                              .NpcLine(new TextObject("Do you want to help us get rid of them"))
                              .BeginPlayerOptions()
                              .PlayerOption(new TextObject("Yes"))
                              .PlayerOption(new TextObject("No") /*, new ConversationSentence.OnMultipleConversationConsequenceDelegate((x) => { StartQuest();return true; })*/)
                              .EndPlayerOptions()
                              .CloseDialog();

            DiscussDialogFlow = DialogFlow.CreateDialogFlow(QuestManager.QuestDiscussToken, 100)
                                .NpcLine(new TextObject("You have more units to kill"))
                                .CloseDialog();



            QuestCharacterDialogFlow = DialogFlow.CreateDialogFlow(QuestManager.CharacterTalkToken)
                                       .NpcLine(new TextObject("idk"))
                                       .CloseDialog();

            Campaign.Current.ConversationManager.AddDialogFlow(OfferDialogFlow, this);
            Campaign.Current.ConversationManager.AddDialogFlow(DiscussDialogFlow, this);
            Campaign.Current.ConversationManager.AddDialogFlow(QuestCharacterDialogFlow, this);
        }
        public DialogFlow GetCapturedDialogFlow(Hero player, Hero assassinationTarget)
        {
            var dialogFlow = DialogFlow
                             .CreateDialogFlow("start", int.MaxValue)
                             .NpcLine(new TextObject("{=h1HEeHEk}You filthy rat. Did you really think you would get away with it? Everyone shall know of your cowardice and failure."));

            return(dialogFlow);
        }
        public DialogFlow GetAssassinationDialogFlow(Hero player, Hero victim, Action onFightStart, Action onLeave)
        {
            var dialogFlow = DialogFlow
                             .CreateDialogFlow("start", int.MaxValue)
                             .NpcLine(GetIntroText(player, victim))
                             .BeginPlayerOptions()
                             .PlayerOption(new TextObject("{=UlByid6B}I am here to kill you!"))
                             .Consequence(() => onFightStart())
                             .CloseDialog()
                             .PlayerOption(new TextObject("{=urBkJcfs}I must apologise, I have gotten lost. I'll be on my way. (Leave)"))
                             .NpcLine(new TextObject("{=d6Y8pYjf}Hmm, very well then. I shall be having a word with my guards about their attentiveness."))
                             .CloseDialog()
                             .Consequence(() => onLeave())
                             .EndPlayerOptions();

            return(dialogFlow);
        }
Пример #5
0
        private void SetMerchantDialog()
        {
            string questOptionsToken;
            var    dialogFlowStart = DialogFlow.CreateDialogFlow(DialogTokenShortcuts.mainOptions)
                                     .PlayerLine(QuestDialogs.PlayerAsksMerchantForQuest.message)
                                     .Condition(() => Hero.OneToOneConversationHero != null && Hero.OneToOneConversationHero == QuestGiver && !_metMerchant)
                                     .Consequence(() => _metMerchant = true)
                                     .NpcLine(QuestDialogs.MerchantInitialResponse1.message)
                                     .NpcLine(QuestDialogs.MerchantInitialResponse2.message)
                                     .GetOutputToken(out questOptionsToken)
                                     .BeginPlayerOptions()
                                     .PlayerOption(QuestDialogs.PlayerQuestInformationOption1.message)
                                     .NpcLine(QuestDialogs.MerchantQuestInformationOption1Response.message)
                                     .GotoDialogState(questOptionsToken)
                                     .PlayerOption(QuestDialogs.PlayerQuestInformationOption2.message)
                                     .NpcLine(QuestDialogs.MerchantQuestInformationOption2Response1.message)
                                     .NpcLine(QuestDialogs.MerchantQuestInformationOption2Response2.message)
                                     .GotoDialogState(questOptionsToken)
                                     .PlayerOption(QuestDialogs.PlayerAcceptQuest.message)
                                     .Consequence(MerchantDialogConsequence)
                                     .EndPlayerOptions()
                                     .CloseDialog();

            var dialogFlowEnd = DialogFlow.CreateDialogFlow(DialogTokenShortcuts.mainOptions)
                                .PlayerLine(QuestDialogs.PlayerReturnsToMerchant.message)
                                .Condition(() => Hero.OneToOneConversationHero != null && Hero.OneToOneConversationHero == QuestGiver && _metMerchant)
                                .NpcLine(QuestDialogs.MerchantQueryOnCompletion.message)
                                .PlayerLine(QuestDialogs.PlayerNotCompletedResponse.message)
                                .Condition(() => !hasJawwalPrisonersCondition())
                                .CloseDialog()
                                .PlayerLine(QuestDialogs.PlayerReadyToSideWithMerchant.message)
                                .Condition(() => hasJawwalPrisonersCondition())
                                .NpcLine(QuestDialogs.MerchantInitialOffer.message)
                                .BeginPlayerOptions()
                                .PlayerOption("You'll have to do better than that - ADD PERSUASION FLOW HERE.")
                                .ClickableCondition(ClickableConditionTest)
                                .PlayerOption(QuestDialogs.PlayerAcceptedOffer.message)
                                .Consequence(EndQuestBySidingWithMerchantConsequence)
                                .CloseDialog()
                                .EndPlayerOptions();

            Campaign.Current.ConversationManager.AddDialogFlow(dialogFlowStart, this);
            Campaign.Current.ConversationManager.AddDialogFlow(dialogFlowEnd, this);
        }
Пример #6
0
        private void SetJawwalDialog()
        {
            QuestDialogs.PlayerMeetsJawwal.message.SetTextVariable("SettlementName", QuestGiver.CurrentSettlement.Name);
            QuestDialogs.JawwalMeetingResponse.message.SetTextVariable("QuestGiverName", QuestGiver.Name);

            var dialogFlowStart = DialogFlow.CreateDialogFlow(DialogTokenShortcuts.mainOptions)
                                  .PlayerLine(QuestDialogs.PlayerMeetsJawwal.message)
                                  .Condition(() => Hero.OneToOneConversationHero != null && _merchantQuestAccepted && !_metJawwal && GetAllJawwalHeroes().Contains(Hero.OneToOneConversationHero.CharacterObject))
                                  .Consequence(() => _metJawwal = true)
                                  .NpcLine(QuestDialogs.JawwalMeetingResponse.message)
                                  .BeginPlayerOptions()
                                  .PlayerOption(QuestDialogs.PlayerAttacksJawwal.message)
                                  .CloseDialog()
                                  .EndPlayerOptions();

            var dialogFlowEnd = DialogFlow.CreateDialogFlow(DialogTokenShortcuts.mainOptions);

            Campaign.Current.ConversationManager.AddDialogFlow(dialogFlowStart, this);
            Campaign.Current.ConversationManager.AddDialogFlow(dialogFlowEnd, this);
        }
Пример #7
0
            protected override void SetDialogs()
            {
                OfferDialogFlow = DialogFlow.CreateDialogFlow("issue_classic_quest_start").NpcLine("{=CEEVENTS1080}I am serious.").Condition(() => Hero.OneToOneConversationHero == QuestGiver).Consequence(OnQuestAccepted).CloseDialog();

                DiscussDialogFlow = DialogFlow.CreateDialogFlow("quest_discuss").NpcLine(new TextObject("{=CEEVENTS1079}Have you come here to claim your equipment?")).Condition(() => CharacterObject.OneToOneConversationCharacter == QuestGiver.CharacterObject).BeginPlayerOptions().PlayerOption(new TextObject("{=CEEVENTS1077}Yes, I came for my things.")).NpcLine(new TextObject("{=CEEVENTS1078}Here you go {?PLAYER.GENDER}milady{?}sir{\\?}.")).Consequence(CompleteQuestWithSuccess).CloseDialog();
            }