public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, currentDialogue)
        {
            gaveRose = new Reaction();
            gavePendant = new Reaction();
            gaveSeashell = new Reaction();
            randomMessage = new Reaction();

            gaveRose.AddAction(new NPCCallbackAction(SetSeashell));  // DELETE
            gaveRose.AddAction(new NPCCallbackAction(SetPendant)); // DELETE

            gaveRose.AddAction(new NPCTakeItemAction(toControl));
            gaveRose.AddAction(new NPCCallbackAction(SetRose));
            //gaveRose.AddAction(new UpdateDefaultTextAction(toControl, "new default"));
            gaveRose.AddAction(new UpdateCurrentTextAction(toControl, "My bedroom window when I was little had this bed of peach colored roses, they made my room smell wonderful in the summers."));
            _allItemReactions.Add(StringsItem.Apple,  new DispositionDependentReaction(gaveRose)); // change item to rose

            gavePendant.AddAction(new NPCTakeItemAction(toControl));
            gavePendant.AddAction(new NPCCallbackAction(SetPendant));
            gavePendant.AddAction(new UpdateCurrentTextAction(toControl, "I know this seems just like a silly necklace but your father worked for weeks when we were young to buy this for me. It still makes me smile."));
            _allItemReactions.Add("pendant",  new DispositionDependentReaction(gaveRose));

            gaveSeashell.AddAction(new NPCTakeItemAction(toControl));
            gaveSeashell.AddAction(new NPCCallbackAction(SetSeashell));
            gaveSeashell.AddAction(new UpdateCurrentTextAction(toControl, "Your father and I would spend afternoons looking for shells. He loved to find the shiniest ones he could for me."));
            _allItemReactions.Add("seashell",  new DispositionDependentReaction(gaveRose));

            randomMessage.AddAction(new NPCCallbackAction(RandomMessage));

            SetOnOpenInteractionReaction(new DispositionDependentReaction(randomMessage));

            TempFarmerReturnReaction.AddAction(new UpdateCurrentTextAction(toControl, "Blah"));
            TempFarmerReturnReaction.AddAction(new NPCCallbackAction(TempResponse));
            _allChoiceReactions.Add(TempFarmerReturnChoice,new DispositionDependentReaction(TempFarmerReturnReaction));
        }
示例#2
0
    protected override void SetFlagReactions()
    {
        Reaction neutralTowardsPlayer = new Reaction();
        neutralTowardsPlayer.AddAction(new NPCEmotionUpdateAction(this, new NeturalTowardsPlayer(this, "Hi, it has been a long time since we last talked.")));
        neutralTowardsPlayer.AddAction(new NPCCallbackAction(MoveToOriginalLoc));
        neutralTowardsPlayer.AddAction(new NPCCallbackAction(UpdateMoodToNeutral));
        flagReactions.Add(FlagStrings.MusicianFriendsWithPlayer, neutralTowardsPlayer);

        Reaction becomesHappyBecauseSonNotCrazy = new Reaction();
        becomesHappyBecauseSonNotCrazy.AddAction(new NPCEmotionUpdateAction(this,
            new DispleasedWithSon(this, "I am very disapointed by my son's actions, would you be a dear and make sure he stays out of trouble?")));
        flagReactions.Add(FlagStrings.CSONAndCastleFriends, becomesHappyBecauseSonNotCrazy);
        flagReactions.Add(FlagStrings.PlayerAndCastleFriends, becomesHappyBecauseSonNotCrazy);
        flagReactions.Add(FlagStrings.BeachAfterConvoGood, becomesHappyBecauseSonNotCrazy);

        Reaction runAwayFromPlayer = new Reaction();
        runAwayFromPlayer.AddAction(new NPCAddScheduleAction(this, runAway));
        flagReactions.Add("Scared By Player", runAwayFromPlayer);

        Reaction makePlayerGoAway = new Reaction();
        ShowMultipartChatAction multiChat = new ShowMultipartChatAction(this);
        multiChat.AddChat("Leave me alone.", 0.2f);
        multiChat.AddChat("Don't you have any friends? Go Away.", 0.5f);
        makePlayerGoAway.AddAction(multiChat);
        flagReactions.Add(FlagStrings.MusicianYellAtPlayer, makePlayerGoAway);
    }
示例#3
0
    protected override void SetFlagReactions()
    {
        #region Fishing rod stolen
        fishingRodStolenReaction.AddAction(new NPCEmotionUpdateAction(this, new InitialEmotionState(this, "Don't forget to bring my fishing rod back.")));
        fishingRodStolenReaction.AddAction(new ShowOneOffChatAction(this, "Make sure to bring that back in one piece", 2f));
        flagReactions.Add(FlagStrings.StolenFishingRod, fishingRodStolenReaction);
        #endregion

        treasureHuntBeginsReaction.AddAction(new NPCAddScheduleAction(this, treasureHuntSched));
        treasureHuntBeginsReaction.AddAction(new NPCEmotionUpdateAction(this, new InitialEmotionState(this, "Alas! All has been for naught. Well, I guess I shall leave with haste as soon as I can go!")));
        flagReactions.Add(FlagStrings.TreasureHuntBegin, treasureHuntBeginsReaction);

        talkToFortuenTellerFirstReaction.AddAction(new NPCAddScheduleAction(this, returnToDockSchedOne));
        talkToFortuenTellerFirstReaction.AddAction(new NPCAddScheduleAction(this, talkToFortuneTellerFirstSched));
        AddTimeReaction(1000, talkToFortuenTellerFirstReaction);

        talkToFortuenTellerSecondReaction.AddAction(new NPCAddScheduleAction(this, returnToDockSchedTwo));
        talkToFortuenTellerSecondReaction.AddAction(new NPCAddScheduleAction(this, talkToFortuneTellerSecondSched));
        AddTimeReaction(1500, talkToFortuenTellerSecondReaction);

        Reaction rebuildShip = new Reaction();
        rebuildShip.AddAction(new NPCAddScheduleAction(this, TalktoCarpenterSon));
        rebuildShip.AddAction(new NPCAddScheduleAction(this, AfterTalkToCarpenterSon));
        flagReactions.Add(FlagStrings.StartConversationWithSeaCaptainAboutBuildingShip, rebuildShip);
    }
    protected override void SetFlagReactions()
    {
        Reaction gaveItems = new Reaction();
        //gaveItems.AddAction(new UpdateCurrentTextAction(this, "Unlocked new secret love story!!"));
        //flagReactions.Add(FlagStrings.GiveItems, gaveItems);

        Reaction motherYoungSeeds = new Reaction();
        motherYoungSeeds.AddAction(new UpdateCurrentTextAction(this, "Unlocked new secret love story!!"));
        motherYoungSeeds.AddAction(new NPCCallbackAction(SendText));
        flagReactions.Add(FlagStrings.GiveItems, motherYoungSeeds);
    }
示例#5
0
    protected override void SetFlagReactions()
    {
        /*Reaction enterHappy = new Reaction();
        enterHappy.AddAction(new ShowOneOffChatAction(this, "I think there's a good spot over here!"));
        enterHappy.AddAction(new NPCAddScheduleAction(this, moveMotherHappyState));
        flagReactions.Add (FlagStrings.EnterHappyState, enterHappy);*/

        /*Reaction moveHome = new Reaction();
        moveHome.AddAction(new ShowOneOffChatAction(this, "Let's go back to the house.", 3f));
        moveHome.AddAction(new NPCAddScheduleAction(this, moveHomeSchedule));
        flagReactions.Add (FlagStrings.MoveHome, moveHome);
        */
        //Add states for apple
        Reaction gaveApple = new Reaction();
        gaveApple.AddAction(new NPCAddScheduleAction(this, gaveAppleSchedule));
        flagReactions.Add(FlagStrings.GaveAppleToMother, gaveApple);
        /*
        Reaction giveSeeds = new Reaction();
        giveSeeds.AddAction(new ShowOneOffChatAction(this, "Here are the leftover seeds.",4f));
        giveSeeds.AddAction(new NPCAddScheduleAction(this, giveSeedsSchedule));
        giveSeeds.AddAction(new NPCEmotionUpdateAction(this, new AskToGardenState(this, "You're such a great help! Do you have more time to help me?")));
        flagReactions.Add (FlagStrings.GiveSeeds, giveSeeds);
        */
        Reaction postRace = new Reaction();
        postRace.AddAction(new ShowOneOffChatAction(this, "Get over here you two!!"));
        postRace.AddAction(new NPCAddScheduleAction(this, postRaceSchedule));
        //postRace.AddAction(new NPCEmotionUpdateAction(this, new DummyState(this)));
        flagReactions.Add (FlagStrings.PostSiblingExplore, postRace);

        Reaction enterMadMother = new Reaction();
        enterMadMother.AddAction(new ShowOneOffChatAction(this, "I can't believe you.", 2f));
        enterMadMother.AddAction(new NPCAddScheduleAction(this, enterMadSchedule));
        flagReactions.Add (FlagStrings.EnterMadState, enterMadMother);

        Reaction exitMadMother = new Reaction();
        exitMadMother.AddAction(new ShowOneOffChatAction(this, "I can't believe you.", 2f));
        exitMadMother.AddAction(new NPCAddScheduleAction(this, exitMadSchedule));
        flagReactions.Add (FlagStrings.ExitMadState, exitMadMother);

        Reaction moveToMusicianReaction = new Reaction();
        moveToMusicianReaction.AddAction(new ShowOneOffChatAction(this, "Finished! Now why don't we take it up to our new neighbors on the cliff!"));
        moveToMusicianReaction.AddAction(new NPCGiveItemAction(this, StringsItem.ApplePie));
        moveToMusicianReaction.AddAction(new NPCGiveItemAction(this, StringsItem.Apple));
        NPCConvoSchedule momToMusician = new NPCConvoSchedule(this, NPCManager.instance.getNPC(StringsNPC.MusicianYoung), new MotherToMusicianYoung(),Schedule.priorityEnum.DoNow);
        momToMusician.SetCanNotInteractWithPlayer();
        moveToMusicianReaction.AddAction(new NPCAddScheduleAction(this, moveToMusicianSchedule));

        moveToMusicianReaction.AddAction(new NPCAddScheduleAction(this, momToMusician));
        flagReactions.Add(FlagStrings.MoveToMusician, moveToMusicianReaction);
    }
示例#6
0
    protected override void SetFlagReactions()
    {
        conversationWithSonDone = new Reaction();
        conversationWithSonDone.AddAction(new NPCAddScheduleAction(this, WalkSitWhittle));
        conversationWithSonDone.AddAction(new NPCEmotionUpdateAction(this, new ToolboxNotFoundEmotionState(this, "Sorry, my son is busy today.  Hopefully he won't spend the whole day searching for his tools and can practice some carpentry.")));

        flagReactions.Add(FlagStrings.carpenterSonYoungConvoWithDadFinished, conversationWithSonDone);

        /*toolboxGotten = new Reaction();
        toolboxGotten.AddAction(new NPCCallbackAction(PlayerHoldingToolbox));
        toolboxGotten.AddAction(new NPCEmotionUpdateAction(this, new ToolboxFoundEmotionState(this, "Oh? You found my son's toolbox. Go along and give it to him so he can get started.")));
        flagReactions.Add(FlagStrings.ToolboxFoundButNotGiven, toolboxGotten);*/

        toolboxGivenToSonDone = new Reaction();
        toolboxGivenToSonDone.AddAction(new NPCEmotionUpdateAction(this, new ToolboxGivenToSonEmotionState(this, "Thanks for finding my son his toolbox... again.")));
        flagReactions.Add(FlagStrings.carpenterSonYoungGottenTools, toolboxGivenToSonDone);
    }
示例#7
0
        public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, currentDialogue)
        {
            gaveRose = new Reaction();
            gavePendant = new Reaction();

            gaveRose.AddAction(new UpdateCurrentTextAction(toControl, "My bedroom window when I was little had this bed of peach colored roses, they made my room smell wonderful in the summers."));
            _allItemReactions.Add("apple",  new DispositionDependentReaction(gaveRose)); // change item to rose
        }
示例#8
0
    protected override void SetFlagReactions()
    {
        Reaction NewDialogueReaction = new Reaction();
        NewDialogueReaction.AddAction (new NPCCallbackAction(UpdateConversation));
        flagReactions.Add(FlagStrings.ConversationInMiddleFather, NewDialogueReaction);

        Reaction FarmerBecomesLazy = new Reaction();
        FarmerBecomesLazy.AddAction(new NPCAddScheduleAction(this, beALazyFarmer));
        flagReactions.Add(FlagStrings.FarmAfterDialogue, FarmerBecomesLazy);
    }
示例#9
0
    /*
     * THE PLAN
     * CASTLEMAN EMOTION STATES
     * 1. CRAZY STATE - also initial emotion state
     * 	says crazy things
     *
     * 2. ANGRY STATE - time for the rage machine
     *  flagReactions.Add(FlagStrings.PostDatingCarpenter, datingThyEnemy);
     *
     * 3. MARRIED STATE - hoo yeeeeaaaahahhahahahah
     *  flagReactions.Add(FlagStrings.CastleMarriage, castleMarriage);
     *
     * 4. SAD STATE - not married full of regret
     * 	(also totally optional depending on the flags)
     *  flagReactions.Add(FlagStrings.StartTalkingToLighthouse, TalkWithLighthouseFirstTime);   OR FlagStrings.FinishedInitialConversationWithCSONFriend
     *
     * 5. RAN OFF STATE - ran off to get married (optional)
     * 	is no where to be found, as is Lighthouse Girl
     * 	flagReactions.Add(FlagStrings.PostCastleDate, gotTheGirl); but NOT flagReactions.Add(FlagStrings.CastleMarriage, castleMarriage);
     *
    */
    protected override void SetFlagReactions()
    {
        Reaction castleMarriage = new Reaction();
        castleMarriage.AddAction(new NPCCallbackSetStringAction(MoveForMarriage, this, "castle"));
        castleMarriage.AddAction(new NPCEmotionUpdateAction(this, new MarriedEmotionState(this, "Today is a good day.")));
        castleMarriage.AddAction(new NPCChangePortraitAction(this, StringsNPC.Happy));
        flagReactions.Add(FlagStrings.CastleMarriage, castleMarriage);

        Reaction castleSad = new Reaction();
        castleSad.AddAction(new NPCEmotionUpdateAction(this, new SadEmotionState(this, "I missed my chance...")));
        castleSad.AddAction(new NPCChangePortraitAction(this, StringsNPC.Sad));
        flagReactions.Add(FlagStrings.StartTalkingToLighthouse, castleSad);
        flagReactions.Add(FlagStrings.FinishedInitialConversationWithCSONFriend, castleSad);

        Reaction castleAngry = new Reaction();
        castleAngry.AddAction(new NPCChangePortraitAction(this, StringsNPC.Angry));
        castleAngry.AddAction(new NPCEmotionUpdateAction(this, new AngryEmotionState(this, "What are YOU doing here?")));
        flagReactions.Add(FlagStrings.PostDatingCarpenter, castleAngry);
    }
示例#10
0
    protected override void SetFlagReactions()
    {
        Reaction castleMarriage = new Reaction();
        castleMarriage.AddAction(new NPCCallbackSetStringAction(MoveForMarriage, this, "castle"));
        //flagReactions.Add(FlagStrings.CastleMarriage, castleMarriage);
        flagReactions.Add(FlagStrings.MarryingCarpenter, castleMarriage);

        Reaction carpenterMarriage = new Reaction();
        carpenterMarriage.AddAction(new NPCCallbackSetStringAction(MoveForMarriage, this, "carpenter"));
        flagReactions.Add(FlagStrings.CastleMarriage, carpenterMarriage);
    }
示例#11
0
    protected override void SetFlagReactions()
    {
        Choice MuteResponseChoice = new Choice("Is your son mute?", "Oh no! He's just very shy!");
        Reaction MuteResponseReaction = new Reaction();
        MuteResponseReaction.AddAction(new NPCRemoveChoiceAction(this, MuteResponseChoice));
        MuteResponseReaction.AddAction(new UpdateCurrentTextAction(this, "Oh no! He's just very shy!"));
        Reaction IsHeMuteReaction = new Reaction();
        IsHeMuteReaction.AddAction(new NPCAddChoiceAction(this, MuteResponseChoice, new DispositionDependentReaction(MuteResponseReaction)));
        flagReactions.Add(FlagStrings.MusicianCommentOnSon, IsHeMuteReaction);

        Reaction RespondToCMANAndYouFriends = new Reaction();
        RespondToCMANAndYouFriends.AddAction(new NPCAddScheduleAction(this, FinishedTalkingFriends));
        RespondToCMANAndYouFriends.AddAction(new NPCAddScheduleAction(this, TellSonToGoAroundIslandFriends));
        flagReactions.Add(FlagStrings.PlayerAndCastleFriends, RespondToCMANAndYouFriends);

        Reaction RespondToCMANAndYouNOTFriends = new Reaction();
        RespondToCMANAndYouNOTFriends.AddAction(new NPCAddScheduleAction(this, FinishedTalkingNOTFriends));
        RespondToCMANAndYouNOTFriends.AddAction(new NPCAddScheduleAction(this, TellSonToGoAroundIslandNOTFriends));
        flagReactions.Add(FlagStrings.PlayerAndCastleNOTFriends, RespondToCMANAndYouNOTFriends);
    }
示例#12
0
    protected override void SetFlagReactions()
    {
        Reaction TellOnLighthouseReaction = new Reaction();
        TellOnLighthouseReaction.AddAction(new ShowOneOffChatAction(this, "Git over here girl.", 2f));
        TellOnLighthouseReaction.AddAction(new NPCAddScheduleAction(this, tellOnLighthouseConversationSchedule));
        flagReactions.Add(FlagStrings.TellOnLighthouseConversation, TellOnLighthouseReaction);

        #region Castle man
        Reaction ReactToCastleMan = new Reaction();
        ReactToCastleMan.AddAction(new NPCAddScheduleAction(this, TalkWithCastleman));
        flagReactions.Add(FlagStrings.PlayerAndCastleFriends , ReactToCastleMan);

        Reaction ReactToCastleManNotFriends = new Reaction();
        ReactToCastleManNotFriends.AddAction(new NPCAddScheduleAction(this, TalkWithCastleman));
        flagReactions.Add(FlagStrings.PlayerAndCastleNOTFriends , ReactToCastleManNotFriends);
        #endregion

        Reaction CounterTellOn = new Reaction();
        CounterTellOn.AddAction(new NPCEmotionUpdateAction(this, new EmptyEmotion(this, "Leave me! My dad said he would get you in trouble if you didn't go!")));
        CounterTellOn.AddAction(new NPCAddScheduleAction(this, AttemptToTellOnLighthouse));
        flagReactions.Add(FlagStrings.CounterTellOn, CounterTellOn);

        Reaction ReadyToGoToBeach = new Reaction();
        ReadyToGoToBeach.AddAction(new NPCAddScheduleAction(this, WalkToBeach));
        ReadyToGoToBeach.AddAction(new NPCAddScheduleAction(this, LighthouseGoingToBeach));
        ReadyToGoToBeach.AddAction(new NPCEmotionUpdateAction(this, new EmptyEmotion(this, "Don't bother me I'm off to build sand castles to protect the island!")));
        flagReactions.Add(FlagStrings.GoDownToBeach, ReadyToGoToBeach);

        Reaction MakingApplePieFromApple = new Reaction();
        MakingApplePieFromApple.AddAction(new NPCAddScheduleAction(this, GaveApple));
        flagReactions.Add(FlagStrings.MakePieFromApple, MakingApplePieFromApple);

        Reaction MakingApplePieFromScratch = new Reaction();
        MakingApplePieFromScratch.AddAction(new NPCEmotionUpdateAction(this, new EmptyEmotion(this, "Leave peasant! I have work to attend to!")));
        MakingApplePieFromScratch.AddAction(new NPCAddScheduleAction(this, GaveNothingSchedule));
        flagReactions.Add(FlagStrings.MakePieFromScratch, MakingApplePieFromScratch);

        Reaction RemoveConvoWithCastleman = new Reaction();
        RemoveConvoWithCastleman.AddAction(new NPCCallbackAction(DoRemoveConvoWithCastleman));
        flagReactions.Add(FlagStrings.StartTalkingToLighthouse, RemoveConvoWithCastleman);
    }
示例#13
0
    private string className; // For debuging only so you know the current emotion state's name

    #endregion Fields

    #region Constructors

    public EmotionState(NPC npcInState)
    {
        className = this.GetType().FullName;
        _npcInState = npcInState;
        _defaultTextToSay = null;
        _allChoiceReactions = new Dictionary<Choice, DispositionDependentReaction>();
        _allItemReactions = new Dictionary<string, DispositionDependentReaction>();
        Reaction defaultItemReact = new Reaction();
        defaultItemReact.AddAction(new UpdateCurrentTextAction(npcInState, "No thank you."));
        defaultItemReaction = new DispositionDependentReaction(defaultItemReact);
        interactionOpeningReaction = null;
    }
示例#14
0
    protected override void SetFlagReactions()
    {
        Reaction NewDialogueReaction = new Reaction();
        NewDialogueReaction.AddAction (new NPCCallbackAction(UpdateConversationInMiddleFarmerMother));
        flagReactions.Add(FlagStrings.ConversationInMiddleFarmerMother, NewDialogueReaction);

        Reaction TellOnReaction = new Reaction();
        TellOnReaction.AddAction (new NPCCallbackAction(UpdateTellOnLighthouse));
        flagReactions.Add(FlagStrings.TellOnLighthouse, TellOnReaction);

        Reaction OpeningConversation = new Reaction();
        OpeningConversation.AddAction(new NPCAddScheduleAction(this, InitialConversation));
        flagReactions.Add(FlagStrings.OpeningConversationFarmerMotherToFarmerFather, OpeningConversation);

        Reaction StartHoeing = new Reaction();
        StartHoeing.AddAction(new NPCAddScheduleAction(this, postOpenningSchedule));
        flagReactions.Add(FlagStrings.FarmAfterDialogue, StartHoeing);
    }
示例#15
0
    protected override void SetFlagReactions()
    {
        Reaction ReactToCastleMan = new Reaction();
        ReactToCastleMan.AddAction(new NPCAddScheduleAction(this, TalkWithCastleman));
        flagReactions.Add(FlagStrings.PlayerAndCastleFriends , ReactToCastleMan);

        Reaction ReactToCastleManNotFriends = new Reaction();
        ReactToCastleManNotFriends.AddAction(new NPCAddScheduleAction(this, TalkWithCastlemanNotFriend));
        flagReactions.Add(FlagStrings.PlayerAndCastleNOTFriends , ReactToCastleManNotFriends);

        CreatedFishingRod = new Reaction();
        //flagReactions.Add(FlagStrings.carpenterSonMakesFishingRod, CreatedFishingRod);
        //CreatedFishingRod.Add

        Reaction ReactToMeetingCSON = new Reaction();
        //ReactToMeetingCSON.AddAction(new NPCCallbackAction(UpdateReactToMeetingCSON));
        flagReactions.Add(FlagStrings.InitialConversationWithCSONNOTFriend, ReactToMeetingCSON);

        Reaction CarpenterSonCompleteWhittle = new Reaction();
    }
示例#16
0
        public TalkWithCarpenterSonNotAsFriendRoundTwo(NPC toControl, string currentDialogue)
            : base(toControl, "See it didn't work!")
        {
            StopBeingParanoidChoice = new Choice ("Stop being paranoid!", "What you said didn't work though!");
            StopBeingParanoidReaction = new Reaction();
            StopBeingParanoidReaction.AddAction(new NPCCallbackAction(UpdateStopBeingParanoid));
            StopBeingParanoidReaction.AddAction(new UpdateCurrentTextAction(toControl, "What you said didn't work though!"));
            _allChoiceReactions.Add(StopBeingParanoidChoice, new DispositionDependentReaction(StopBeingParanoidReaction));

            YupPrettyMuchChoice =  new Choice ("Yup! Pretty much.", "I hate all of you!");
            YupPrettyMuchReaction =  new Reaction();
            YupPrettyMuchReaction.AddAction(new NPCCallbackAction(UpdateYupPrettyMuch));
            YupPrettyMuchReaction.AddAction(new ShowOneOffChatAction(toControl, "I hate all of you!"));
            _allChoiceReactions.Add(YupPrettyMuchChoice, new DispositionDependentReaction(YupPrettyMuchReaction));

            LookJustActNaturalChoice =  new Choice("Look, just act natural", "What does that mean?");
            LookJustActNaturalReaction =  new Reaction();
            LookJustActNaturalReaction.AddAction(new NPCCallbackAction(UpdateLookJustActNatural));
            LookJustActNaturalReaction.AddAction(new UpdateCurrentTextAction(toControl, "What does that mean?"));

            JustTryBeingYourselfChoice =  new Choice("Just try being youself.", "But everybody hates who I am!");
            JustTryBeingYourselfReaction =  new Reaction();
            JustTryBeingYourselfReaction.AddAction(new NPCCallbackAction(UpdateJustTryBeingYourself));
            JustTryBeingYourselfReaction.AddAction(new UpdateCurrentTextAction(toControl, "But everybody hates who I am!"));

            HeWontTrustMeAlreadyChoice = new Choice("He won't! Trust me already!", "All right I'll try...");
            HeWontTrustMeAlreadyReaction = new Reaction();
            HeWontTrustMeAlreadyReaction.AddAction(new NPCCallbackAction(UpdateHeWontTrustMeAlready));
            HeWontTrustMeAlreadyReaction.AddAction(new ShowOneOffChatAction(toControl, "All right I'll try..."));

            FairEnoughChoice = new Choice("Fair enough.", "Hmmpphh...Let's go!");
            FairEnoughReaction = new Reaction();
            FairEnoughReaction.AddAction(new NPCCallbackAction(UpdateFairEnough));
            FairEnoughReaction.AddAction(new ShowOneOffChatAction(toControl, "Hmmpphh...Let's go!"));

            BeYourselfChoice = new Choice("Be yourself.", "I guess it won't hurt things anymore...");
            BeYourselfReaction = new Reaction();
            BeYourselfReaction.AddAction(new NPCCallbackAction(UpdateBeYourself));
            BeYourselfReaction.AddAction(new ShowOneOffChatAction(toControl, "I guess it won't hurt things anymore..."));

            IveHadEnoughChoice =  new Choice ("I've had enough!", "This is stupid, let's go!");
            IveHadEnoughReaction = new Reaction();
            IveHadEnoughReaction.AddAction(new NPCCallbackAction(IveHadEnough));
            IveHadEnoughReaction.AddAction(new ShowOneOffChatAction(toControl, "This is stupid, let's go!"));
        }
示例#17
0
        public CrazyTalkEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, currentDialogue)
        {
            randomMessage = new Reaction();

            randomMessage.AddAction(new NPCCallbackAction(RandomMessage));
            SetOnOpenInteractionReaction(new DispositionDependentReaction(randomMessage));

            stringList[0] = "...";
            stringList[1] = "...I want you not";
            stringList[2] = "Hey... Want to be friends...?";
            stringList[3] = "I need no one...no...one...";
            stringCounter = 4;
        }
示例#18
0
        public CarpenterFight(NPC toControl, string currentDialogue)
            : base(toControl, "I've thought very hard about this and I must say, all of this has to be the fault of the carpenter's son. He stole my fair princess from me!")
        {
            WillDo = new Choice ("What will you do?", "I will get my revenge!");
            WhatWillDo = new Reaction();

            WhatWillDo.AddAction(new NPCCallbackAction(Revenge));

            _allChoiceReactions.Add(WillDo, new DispositionDependentReaction(WhatWillDo));
        }
示例#19
0
        public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, currentDialogue)
        {
            Choice seen = new Choice("Last Seen", "Twas at a beach!  When my castle was swallowed by the cavernous waves!");
            Choice look = new Choice("What does it look like?", "It was glowing with great light, and lined with many flags and alabaster walls. It was the most beautiful thing in the world....Please find it for me.");

            //Code for the choices for interacting with the castleman
            lastSeen = new Reaction();
            lookLike = new Reaction();
            //****************************************************************************************************************
            lastSeen.AddAction(new NPCCallbackAction(LastSeenResponse));
            //lastSeen.AddAction(new NPCEmotionUpdateAction(toControl, new CarpenterFight(toControl, "MUHAHAHA")));//Remove this later
            //****************************************************************************************************************
            lastSeen.AddAction(new UpdateCurrentTextAction(toControl, "Twas at a beach!  When my castle was swallowed by the cavernous waves!"));
            lookLike.AddAction(new UpdateCurrentTextAction(toControl, "It was glowing with great light, and lined with many flags and alabaster walls.  It was the most beautiful thing in the world....Please find it for me."));

            //Code for giving the seashell
            Reaction gaveShell = new Reaction();
            gaveShell.AddAction(new NPCTakeItemAction(toControl));
            gaveShell.AddAction(new NPCCallbackAction(SetSeaShell));
            gaveShell.AddAction(new UpdateCurrentTextAction(toControl, "A piece of the my castle! Perhaps there is hope for an end to my suffering!"));
            _allItemReactions.Add(StringsItem.Seashell,  new DispositionDependentReaction(gaveShell)); // change item to shell

            //Code for the giving rose interaction.
            gaveRose = new Reaction();
            gaveRose.AddAction(new NPCTakeItemAction(toControl));
            gaveRose.AddAction(new NPCCallbackAction(SetRose));
            gaveRose.AddAction(new UpdateCurrentTextAction(toControl, "A piece of the jungle of thorns! If you can brave that perhaps...perhaps you are the one who can truly find my castle."));
            _allItemReactions.Add(StringsItem.Rose,  new DispositionDependentReaction(gaveRose)); // change item to rose

            _allChoiceReactions.Add(seen, new DispositionDependentReaction(lastSeen));
            _allChoiceReactions.Add(look, new DispositionDependentReaction(lookLike));

            //Sets up the random dialogue for the castleman.
            randomMessage = new Reaction();
            randomMessage.AddAction(new NPCCallbackAction(RandomMessage));
            SetOnOpenInteractionReaction(new DispositionDependentReaction(randomMessage));
        }
示例#20
0
        public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, "My mom is a slave driver! Help me defeat her evil plan and I will reward you noble knight!")
        {
            control = toControl;
            TakePieReaction = new Reaction();
            TakePieReaction.AddAction(new NPCTakeItemAction(toControl));
            TakePieReaction.AddAction(new NPCCallbackAction(UpdateTakeApplePie));
            TakePieReaction.AddAction(new NPCRemoveScheduleAction(toControl, FlagStrings.UselessFlag));
            _allItemReactions.Add(StringsItem.ApplePie, new DispositionDependentReaction(TakePieReaction));

            TakeAppleReaction = new Reaction();
            TakeAppleReaction.AddAction(new NPCTakeItemAction(toControl));
            TakeAppleReaction.AddAction(new NPCCallbackAction(UpdateTakeApple));
            TakeAppleReaction.AddAction(new NPCRemoveScheduleAction(toControl, FlagStrings.UselessFlag));
            TakeAppleReaction.AddAction(new ShowOneOffChatAction(toControl, "*Sigh* Time to bake I guess..."));

            DenyAppleReaction = new Reaction();
            DenyAppleReaction.AddAction(new NPCCallbackAction(UpdateDenyApple));
            DenyAppleReaction.AddAction(new NPCRemoveScheduleAction(toControl, FlagStrings.UselessFlag));
            _allItemReactions.Add(StringsItem.Apple, new DispositionDependentReaction(DenyAppleReaction));

            EvilPlanChoice = new Choice ("What evil plan?", "She wants to drain my strength through constant chores! But I'm a great warrior and can see through her cunning schemes to make me cook!");
            EvilPlanReaction = new Reaction ();
            EvilPlanReaction.AddAction(new NPCCallbackAction(UpdateEvilPlan));
            EvilPlanReaction.AddAction(new NPCRemoveScheduleAction(toControl, FlagStrings.UselessFlag));
            EvilPlanReaction.AddAction(new UpdateCurrentTextAction(toControl, "She wants to drain my strength through constant chores! But I'm a great warrior and can see through her cunning schemes to make me cook!"));
            _allChoiceReactions.Add(EvilPlanChoice, new DispositionDependentReaction(EvilPlanReaction));

                StopBeingLazyChoice = new Choice ("Stop being lazy!", "I'm not lazy! I just have better things to do, like build sand castles on the beach. Someone needs to prepare for an invasion of the island!");
                StopBeingLazyReaction = new Reaction ();
                StopBeingLazyReaction.AddAction(new NPCCallbackAction(UpdateStopBeingLazy));
                StopBeingLazyReaction.AddAction(new UpdateCurrentTextAction(toControl, "I'm not lazy! I just have better things to do, like build sand castles on the beach. Someone needs to prepare for an invasion of the island!"));

                    ImTellingChoice = new Choice ("I'm telling!", "NO! Please don't! I promise I'll be good! Just don't tell on me!");
                    ImTellingReaction = new Reaction ();
                    ImTellingReaction.AddAction(new NPCCallbackAction(UpdateImTelling));
                    ImTellingReaction.AddAction(new UpdateCurrentTextAction(toControl, "NO! Please don't! I promise I'll be good! Just don't tell on me!"));

                        OkayIGuessChoice = new Choice ("That's okay, I guess...", "Yay! So about that apple pie? No? Okay fine...");
                        OkayIGuessReaction = new Reaction();
                        OkayIGuessReaction.AddAction(new NPCCallbackAction(UpdateOkayIGuess));
                        OkayIGuessReaction.AddAction(new ShowOneOffChatAction(toControl, "Yay! So about that apple pie? No? Okay fine..."));

                        NoImTellingChoice = new Choice ("No, I'm telling!", "Fine...DAD! HELP! I'M BEING BULLIED!");
                        NoImTellingReaction = new Reaction();
                        NoImTellingReaction.AddAction(new NPCCallbackAction(UpdateNoImTelling));

                    ThisIsSilllyChoice = new Choice("This is silly.", "Hmmph! I don't need you! On your way peasant!");
                    ThisIsSillyReaction = new Reaction();
                    ThisIsSillyReaction.AddAction(new NPCCallbackAction(UpdateThisIsSilly));
                    ThisIsSillyReaction.AddAction(new ShowOneOffChatAction(toControl, "Hmmph! I don't need you! On your way peasant!"));

                    WarriorsCookChoice = new Choice ("Warrior's cook!", "What?!? That's not true! Warriors get food by saving the village and having a banquet in their honor!");
                    WarriorsCookReaction = new Reaction();
                    WarriorsCookReaction.AddAction(new NPCCallbackAction(UpdateWarriorsCook));
                    WarriorsCookReaction.AddAction(new UpdateCurrentTextAction(toControl, "What?!? That's not true! Warriors get food by saving the village and having a banquet in their honor!"));

                        WhatIfYouTravelChoice = new Choice ("What if you travel?", "Well...I guess I would need to know how to cook if I got lost in a mountain chasing a villain...");
                        WhatIfYouTravelReaction = new Reaction();
                        WhatIfYouTravelReaction.AddAction(new NPCCallbackAction(UpdateWhatIfYouTravel));
                        WhatIfYouTravelReaction.AddAction(new ShowOneOffChatAction(toControl, "Well...I guess I would need to know how to cook if I got lost in a mountain chasing a villain...I guess I'll do it."));

                        FairEnoughChoice = new Choice ("Fair Enough", "Good to see you agree! Now aquire apple pie for me!");
                        FairEnoughReaction = new Reaction();
                        FairEnoughReaction.AddAction(new NPCCallbackAction(UpdateFairEnough));
                        FairEnoughReaction.AddAction(new ShowOneOffChatAction(toControl, "Good to see you agree! Now aquire apple pie for me!"));

                HowDoWeStopHerChoice = new Choice ("How do we stop her?", "Get me some apple pie...so that I don't have to cook it myself!");
                HowDoWeStopHerReaction = new Reaction();
                HowDoWeStopHerReaction.AddAction(new NPCCallbackAction(UpdateStopHer));
                HowDoWeStopHerReaction.AddAction(new UpdateCurrentTextAction(toControl, "Get me some apple pie...preferrably poisoned...so that I don't have to cook it myself!"));

                    NoDoYourChoresChoice = new Choice("No do your chores.", "Please, just help me out this one time! I want to play on the beach, and I can't do that if I have to bake!");
                    NoDoYourChoresReaction = new Reaction();
                    NoDoYourChoresReaction.AddAction(new NPCCallbackAction(UpdateDoYourOwnChores));
                    NoDoYourChoresReaction.AddAction(new UpdateCurrentTextAction(toControl, "Please, just help me out this one time! I want to play on the beach, and I can't do that if I have to bake!"));

                        NoChoice = new Choice("No!", "Okay...fine no apple pie. Just get me an apple. Pllleeeaaassee!");
                        NoReaction = new Reaction();
                        NoReaction.AddAction(new NPCCallbackAction(UpdateNo));
                        NoReaction.AddAction(new UpdateCurrentTextAction(toControl, "Okay...fine no apple pie. Just get me an apple. Pllleeeaaassee!"));

                            NoMeansNoChoice = new Choice("No means no!", "Hmmph! I don't need you! On your way peasant!");
                            NoMeansNoReaction = new Reaction();
                            NoMeansNoReaction.AddAction(new NPCCallbackAction(UpdateNoMeansNo));
                            NoMeansNoReaction.AddAction(new ShowOneOffChatAction(toControl, "Hmmph! I don't need you! On your way peasant!"));

                            OkayOneAppleChoice = new Choice("Okay. One Apple.", "Then go forth on your noble quest!");
                            OkayOneAppleReaction = new Reaction();
                            OkayOneAppleReaction.AddAction(new NPCCallbackAction(UpdateOkayOneMoreApple));
                            OkayOneAppleReaction.AddAction(new ShowOneOffChatAction(toControl, "Then go on your noble quest!"));

                            ImTellingOnYouChoice = new Choice ("I'm telling on you!", "No! I'd be grounded for weeks! Please, Please, Please don't do it!");
                            ImTellingOnYouReaction = new Reaction();
                            ImTellingOnYouReaction.AddAction(new NPCCallbackAction(UpdateTellingOnYou));
                            ImTellingOnYouReaction.AddAction(new UpdateCurrentTextAction(toControl, "No! I'd be grounded for weeks! Please, Please, Please don't do it!"));

                                ThisOneTimeChoice = new Choice ("This one time...", "Thank you thank you! So about that apple?");
                                ThisOneTimeReaction = new Reaction();
                                ThisOneTimeReaction.AddAction(new NPCCallbackAction(UpdateThisOneTime));
                                ThisOneTimeReaction.AddAction(new UpdateCurrentTextAction(toControl, "Thank you thank you! So about that apple?"));

                                    SighYouWinChoice = new Choice ("*Sigh* You win.", "Yes! Now Sir Knight, go out and findeth the apple!");
                                    SighYouWinReaction = new Reaction();
                                    SighYouWinReaction.AddAction(new NPCCallbackAction(UpdateSighYouWin));
                                    SighYouWinReaction.AddAction(new ShowOneOffChatAction(toControl, "Yes! Now Sir Knight, go out and findeth the apple!"));

                                    NOOChoice = new Choice ("NO!", "Okay fine. Be that way, see if I care!");
                                    NOOReaction = new Reaction();
                                    NOOReaction.AddAction(new NPCCallbackAction(UpdateNOO));
                                    NOOReaction.AddAction(new ShowOneOffChatAction(toControl, "Okay fine. Be that way, see if I care!"));

                                ImGonnaTellNowChoice = new Choice("I'm telling now!", "Fine...DAD! HELP! I'M BEING BULLIED!");
                                ImGonnaTellNowReaction = new Reaction();
                                ImGonnaTellNowReaction.AddAction(new NPCCallbackAction(UpdateImTellingNow));

                        OkayFineChoice = new Choice("Okay..Fine", "Then onwards! For apple pie!");
                        OkayFineReaction = new Reaction();
                        OkayFineReaction.AddAction(new NPCCallbackAction(UpdateOkayFine));
                        OkayFineReaction.AddAction(new ShowOneOffChatAction(toControl, "Then onwards! For apple pie!"));

                    OnItChoice = new Choice("On it!", "Hurry, with the pie I can stop her evil scheme!");
                    OnItReaction = new Reaction();
                    OnItReaction.AddAction(new NPCCallbackAction(UpdateOnIt));
                    OnItReaction.AddAction(new ShowOneOffChatAction(toControl, "Hurry, with the pie I can stop here evil scheme!"));
        }
示例#21
0
    protected override void SetFlagReactions()
    {
        Reaction speakWithSiblingReactionPartOne = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartOne = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartOne.AddChat("Patience.", 2f);
        speakWithSiblingReactionPartOne.AddAction(speakWithSiblingChatPartOne);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartOne, speakWithSiblingReactionPartOne);

        Reaction speakWithSiblingReactionPartTwo = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartTwo = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartTwo.AddChat("I said patience!!", 2f);
        speakWithSiblingReactionPartTwo.AddAction(speakWithSiblingChatPartTwo);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartTwo, speakWithSiblingReactionPartTwo);

        Reaction speakWithSiblingReactionPartThree = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartThree = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartThree.AddChat(".", .12f);
        speakWithSiblingChatPartThree.AddChat("..", .12f);
        speakWithSiblingChatPartThree.AddChat("...", .12f);
        speakWithSiblingChatPartThree.AddChat("...!", .12f);
        speakWithSiblingChatPartThree.AddChat("...!!", 1.5f);
        speakWithSiblingChatPartThree.AddChat("...!", .75f);
        speakWithSiblingChatPartThree.AddChat("...", .5f);
        speakWithSiblingChatPartThree.AddChat("..", .33f);
        speakWithSiblingChatPartThree.AddChat(".. F", .33f);
        speakWithSiblingChatPartThree.AddChat(".. Fi", .5f);
        speakWithSiblingChatPartThree.AddChat(".. Fin", .5f);
        speakWithSiblingChatPartThree.AddChat(".. Fine", 1f);
        speakWithSiblingChatPartThree.AddChat(".. Fine.", 1f);
        speakWithSiblingChatPartThree.AddChat("Let's get this over with.", 2f);
        speakWithSiblingChatPartThree.AddChat("What is it that you seek?", 2f);
        speakWithSiblingReactionPartThree.AddAction(speakWithSiblingChatPartThree);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartThree, speakWithSiblingReactionPartThree);

        Reaction speakWithSiblingReactionPartFour = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartFour = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartFour.AddChat(".",.2f);
        speakWithSiblingChatPartFour.AddChat("..",.2f);
        speakWithSiblingChatPartFour.AddChat("...", 2f);
        speakWithSiblingChatPartFour.AddChat("Seeking a fortune with no goal in mind?", 1.5f);
        speakWithSiblingReactionPartFour.AddAction(speakWithSiblingChatPartFour);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartFour, speakWithSiblingReactionPartFour);

        Reaction speakWithSiblingReactionPartFive = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartFive = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartFive.AddChat("I see...",1.5f);
        speakWithSiblingChatPartFive.AddChat("You are off your path.",3f);
        speakWithSiblingChatPartFive.AddChat("You should visit the sacred tree.", 3f);
        speakWithSiblingChatPartFive.AddChat("That is your fortune.", 1.5f);
        speakWithSiblingReactionPartFive.AddAction(speakWithSiblingChatPartFive);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartFive, speakWithSiblingReactionPartFive);

        Reaction speakWithSiblingReactionPartSix = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartSix = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartSix.AddChat("Have a nice day.", 3f);
        speakWithSiblingReactionPartSix.AddAction(speakWithSiblingChatPartSix);
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartSix, speakWithSiblingReactionPartSix);

        Reaction speakWithSiblingReactionPartSeven = new Reaction();
        ShowMultipartChatAction speakWithSiblingChatPartSeven = new ShowMultipartChatAction(this);
        speakWithSiblingChatPartSeven.AddChat("Such a loud one she is...", 3f);
        speakWithSiblingChatPartSeven.AddChat("Ohh.", 1.25f);
        speakWithSiblingChatPartSeven.AddChat("Hello there quiet one.", 2f);
        //speakWithSiblingChatPartSeven.AddChat("Care for your fortune?", 1.25f);
        speakWithSiblingReactionPartSeven.AddAction(speakWithSiblingChatPartSeven);
        speakWithSiblingReactionPartSeven.AddAction(new NPCEmotionUpdateAction(this, new EnterFortuneState(this, "Decided to learn your fate?")));
        speakWithSiblingReactionPartSeven.AddAction(new NPCAddScheduleAction(this, fortunetellerFortuneWithPlayer));
        flagReactions.Add(FlagStrings.FortunetellerTalkToSiblingOldPartSeven, speakWithSiblingReactionPartSeven);

        //Reaction changeScheduleAfterSiblingFortune = new Reaction();
        //changeScheduleAfterSiblingFortune.AddAction(speakWithSiblingChatPartSeven);
        //changeScheduleAfterSiblingFortune.AddAction(new NPCAddScheduleAction(this, fortunetellerFortuneWithPlayer));
        //changeScheduleAfterSiblingFortune.AddAction(new NPCEmotionUpdateAction(this, new InitialEmotionState(this, "Line 72")));
        //flagReactions.Add(FlagStrings.FortunetellerOldChangeSchedule, changeScheduleAfterSiblingFortune);
    }
示例#22
0
        public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, "...")
        {
            toControl.SetCharacterPortrait(StringsNPC.Sad);
            AppleReaction = new Reaction();
            AppleReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Apple, new DispositionDependentReaction(AppleReaction));

            FishingRodReaction = new Reaction();
            FishingRodReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.FishingRod, new DispositionDependentReaction(FishingRodReaction));

            PlushieReaction = new Reaction();
            PlushieReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.TimeWhale, new DispositionDependentReaction(PlushieReaction));

            ToolBoxReaction = new Reaction();
            ToolBoxReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Toolbox, new DispositionDependentReaction(ToolBoxReaction));

            SeaShellReaction = new Reaction();
            SeaShellReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Seashell, new DispositionDependentReaction(SeaShellReaction));

            RoseReaction = new Reaction();
            RoseReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Rose, new DispositionDependentReaction(RoseReaction));

            CaptainsLogReaction = new Reaction();
            CaptainsLogReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.CaptainLog, new DispositionDependentReaction(CaptainsLogReaction));

            ToySwordReaction = new Reaction();
            ToySwordReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.ToySword, new DispositionDependentReaction(ToySwordReaction));

            RopeReaction = new Reaction();
            RopeReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Rope, new DispositionDependentReaction(RopeReaction));

            VegetableReaction = new Reaction();
            VegetableReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Vegetable, new DispositionDependentReaction(VegetableReaction));

            ToyPuzzleReaction = new Reaction();
            ToyPuzzleReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.ToyPuzzle, new DispositionDependentReaction(ToyPuzzleReaction));

            ToyBoatReaction = new Reaction();
            ToyBoatReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.ToyBoat, new DispositionDependentReaction(ToyBoatReaction));

            FluteReaction = new Reaction();
            FluteReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Flute, new DispositionDependentReaction(FluteReaction));

            ShovelReaction = new Reaction();
            ShovelReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Shovel, new DispositionDependentReaction(ShovelReaction));

            ApplePieReaction = new Reaction();
            ApplePieReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.ApplePie, new DispositionDependentReaction(ApplePieReaction));

            LillySeedsReaction = new Reaction();
            LillySeedsReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.LilySeeds, new DispositionDependentReaction(LillySeedsReaction));

            TulipSeedsReaction = new Reaction();
            TulipSeedsReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.TulipSeeds, new DispositionDependentReaction(TulipSeedsReaction));

            SunflowerSeedsReaction = new Reaction();
            SunflowerSeedsReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.SunflowerSeeds, new DispositionDependentReaction(SunflowerSeedsReaction));

            PendantReaction = new Reaction();
            PendantReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Pendant, new DispositionDependentReaction(PendantReaction));

            NoteReaction = new Reaction();
            NoteReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Note, new DispositionDependentReaction(NoteReaction));

            HarpReaction = new Reaction();
            HarpReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allItemReactions.Add(StringsItem.Harp, new DispositionDependentReaction(HarpReaction));

            WhatsYourNameChoice = new Choice("What's your name?", "......");
            WhatsYourNameReaction = new Reaction();
            WhatsYourNameReaction.AddAction(new NPCCallbackAction(UpdateWhatsYourName));
            WhatsYourNameReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allChoiceReactions.Add(WhatsYourNameChoice, new DispositionDependentReaction(WhatsYourNameReaction));

            AreYouNewChoice = new Choice("Are you new?", "......");
            AreYouNewReaction = new Reaction();
            AreYouNewReaction.AddAction(new NPCCallbackAction(UpdateAreYouNew));
            AreYouNewReaction.AddAction(new UpdateCurrentTextAction(toControl, "......"));
            _allChoiceReactions.Add(AreYouNewChoice, new DispositionDependentReaction(AreYouNewReaction));

            FineHaveItYourWayChoice = new Choice("Fine! Have it your way!", "..................");
            FineHaveItYourWayReaction = new Reaction();
            FineHaveItYourWayReaction.AddAction(new NPCCallbackAction(UpdateFineHaveItYourWay));
            FineHaveItYourWayReaction.AddAction(new UpdateCurrentTextAction(toControl, "................."));

            DontYouSpeakChoice = new Choice("Don't you speak?", ".............");
            DontYouSpeakReaction = new Reaction();
            DontYouSpeakReaction.AddAction(new NPCCallbackAction(UpdateDontYouSpeak));
            DontYouSpeakReaction.AddAction(new UpdateCurrentTextAction(toControl, "............."));

            WellTellMeChoice = new Choice("Well tell me when you want to talk.", "....................");
            WellTellMeReaction = new Reaction();
            WellTellMeReaction.AddAction(new NPCCallbackAction(UpdateWellTellMe));
            WellTellMeReaction.AddAction(new UpdateCurrentTextAction(toControl, "...................."));
        }
示例#23
0
        public MeetFamily(NPC toControl, string currentDialogue)
            : base(toControl, "Hey...")
        {
            WhatDoYouLikeToDoChoice = new Choice("What do you like to do?", "I dunno...stuff.");
            WhatDoYouLikeToDoReaction = new Reaction();
            WhatDoYouLikeToDoReaction.AddAction(new NPCCallbackAction(UpdateWhatDoYouLikeToDo));
            WhatDoYouLikeToDoReaction.AddAction(new UpdateCurrentTextAction(toControl, "I dunno...stuff."));
            _allChoiceReactions.Add(WhatDoYouLikeToDoChoice, new DispositionDependentReaction(WhatDoYouLikeToDoReaction));

            WhereDidYouUseToLiveChoice = new Choice("Where did you use to live?", "Nowhere.");
            WhereDidYouUseToLiveReaction = new Reaction();
            WhereDidYouUseToLiveReaction.AddAction(new NPCCallbackAction(UpdateWhereDidYouUseToLive));
            WhereDidYouUseToLiveReaction.AddAction(new UpdateCurrentTextAction(toControl, "Nowhere"));
            _allChoiceReactions.Add(WhereDidYouUseToLiveChoice, new DispositionDependentReaction(WhereDidYouUseToLiveReaction));

            YouCantHaveLivedNowhereChoice = new Choice("You can't have lived nowhere!", "It was a horrible place...everyone hated me...");
            YouCantHaveLivedNowhereReaction = new Reaction();
            YouCantHaveLivedNowhereReaction.AddAction(new NPCCallbackAction(UpdateYouCantHaveLivedNowhere));
            YouCantHaveLivedNowhereReaction.AddAction(new UpdateCurrentTextAction(toControl, "It was a horrible place...everyone hated me..."));

            WellIDontHateYouChoice = new Choice("Well I don't hate you.", "People here don't know me that well yet...");
            WellIDontHateYouReaction = new Reaction();
            WellIDontHateYouReaction.AddAction(new NPCCallbackAction(UpdateWellIDontHateYou));
            WellIDontHateYouReaction.AddAction(new UpdateCurrentTextAction(toControl, "People here don't know me that well yet..."));

            PeopleAreNicerHereChoice = new Choice("People are nicer here.", "People here don't know me that well yet...");
            PeopleAreNicerHereReaction = new Reaction();
            PeopleAreNicerHereReaction.AddAction(new NPCCallbackAction(UpdatePeopleAreNicerHere));
            PeopleAreNicerHereReaction.AddAction(new UpdateCurrentTextAction(toControl, "People here don't know me that well yet..."));

            PeopleHereAreMeanChoice = new Choice("People are mean here.", "I'm sure...everyone I meet hates me...");
            PeopleHereAreMeanReaction = new Reaction();
            PeopleHereAreMeanReaction.AddAction(new NPCCallbackAction(UpdatePeopleHereAreMean));
            PeopleHereAreMeanReaction.AddAction(new UpdateCurrentTextAction(toControl, "I'm sure...everyone I meet hates me..."));

            YouHaveToDoSomethingChoice = new Choice("You have to do something...", "...I'll only tell you if you won't laugh. Promise not to laugh kay?");
            YouHaveToDoSomethingReaction = new Reaction();
            YouHaveToDoSomethingReaction.AddAction(new NPCCallbackAction(UpdateYouHaveToDoSomething));
            YouHaveToDoSomethingReaction.AddAction(new UpdateCurrentTextAction(toControl, "...I'll only tell you if you won't laugh. Promise not to laugh kay?"));

            OkayChoice = new Choice("Okay", "All right...I...\nI like poetry!");
            OkayReaction = new Reaction();
            OkayReaction.AddAction(new NPCCallbackAction(UpdateOkay));
            OkayReaction.AddAction(new UpdateCurrentTextAction(toControl, "All right...I...\nI like poetry!"));

            NoChoice = new Choice("No", "You're mean! Just like the people back home!");
            NoReaction = new Reaction();
            NoReaction.AddAction(new NPCCallbackAction(UpdateNo));
            NoReaction.AddAction(new UpdateCurrentTextAction(toControl, "You're mean! Just like the people back home!"));

            PoetryIsSillyChoice = new Choice("Poetry is silly.", "You're mean! Just like the people back home!");
            PoetryIsSillyReaction = new Reaction();
            PoetryIsSillyReaction.AddAction(new NPCCallbackAction(UpdatePoetryIsSilly));
            PoetryIsSillyReaction.AddAction(new UpdateCurrentTextAction(toControl, "You're mean! Just like the people back home!"));

            ThatSoundsCoolChoice = new Choice("That sounds cool!", "It is! My dad used to read it to me before... Never mind..I think I hear my mom calling me.");
            ThatSoundsCoolReaction = new Reaction();
            ThatSoundsCoolReaction.AddAction(new NPCCallbackAction(UpdateThatSoundsCool));
            ThatSoundsCoolReaction.AddAction(new UpdateCurrentTextAction(toControl, "It is! My dad used to read it to me before... Never mind..I think I hear my mom calling me."));

            ILikePoetryChoice = new Choice("I like poetry!", "Yeah Poetry is awesome! Maybe this new village isn't that bad...");
            ILikePoetryReaction = new Reaction();
            ILikePoetryReaction.AddAction(new NPCCallbackAction(UpdateILikePoetry));
            ILikePoetryReaction.AddAction(new UpdateCurrentTextAction(toControl, "Yeah Poetry is awesome! Maybe this new village isn't that bad..."));

            //Choices for Making Fun of or apologizing to the Castleman.
            ImSorryChoice = new Choice ("I'm Sorry...", "Are you really sorry?/nYou don't sound sorry...");
            ImSorryReaction = new Reaction();
            ImSorryReaction.AddAction(new NPCCallbackAction(UpdateImSorry));
            ImSorryReaction.AddAction(new UpdateCurrentTextAction(toControl, "Are you really sorry?/nYou don't sound sorry..."));

            ItsBecauseYourStupidChoice = new Choice ("It's because you're stupid.","I trusted you...I'm not going to make that mistake again...");
            ItsBecauseYourStupidReaction = new Reaction();
            ItsBecauseYourStupidReaction.AddAction(new NPCCallbackAction(UpdateItsBecauseYourStupid));
            ItsBecauseYourStupidReaction.AddAction(new UpdateCurrentTextAction(toControl, "I trusted you...I'm not going to make that mistake again..."));

            ImReallyReallySorryChoice = new Choice ("I'm really really sorry.", "");
            ImReallyReallySorryReaction = new Reaction();
            ImReallyReallySorryReaction.AddAction(new NPCCallbackAction(UpdateImReallyReallySorry));
            ImReallyReallySorryReaction.AddAction(new UpdateCurrentTextAction(toControl, ""));

            YouGotMeIWasLyingChoice = new Choice ("You got me!\nI was lying.", "I trusted you...I'm not going to make that mistake again...");
            YouGotMeIWasLyingReaction = new Reaction();
            YouGotMeIWasLyingReaction.AddAction(new NPCCallbackAction(UpdateYouGotMeIWasLying));
            YouGotMeIWasLyingReaction.AddAction(new UpdateCurrentTextAction(toControl, "I trusted you...I'm not going to make that mistake again..."));
        }
示例#24
0
        public WaitingAtBeachFriend(NPC toControl, string currentDialogue)
            : base(toControl, "I don't know what to do around the farmer's daughter. She makes me nervous!")
        {
            //toControl.SetCharacterPortrait(StringsNPC.Embarrassed);
            YouDontNeedToKnowChoice = new Choice("You don't need to know.", "But its scary to talk with her. What if I mess up?");
            YouDontNeedToKnowReaction = new Reaction();
            YouDontNeedToKnowReaction.AddAction(new NPCCallbackAction(UpdateYouDontNeedToKnow));
            YouDontNeedToKnowReaction.AddAction(new UpdateCurrentTextAction(toControl, "But its scary to talk with her. What if I mess up?"));
            _allChoiceReactions.Add(YouDontNeedToKnowChoice, new DispositionDependentReaction(YouDontNeedToKnowReaction));

            DoYouWantToBeFriendsChoice = new Choice("Do you want to be friends?", "Yeah...I want to be friends with her...");
            DoYouWantToBeFriendsReaction = new Reaction();
            DoYouWantToBeFriendsReaction.AddAction(new NPCCallbackAction(UpdateDoYouWantToBeFriends));
            DoYouWantToBeFriendsReaction.AddAction(new UpdateCurrentTextAction(toControl, "Yeah...I want to be friends with her..."));

            ThenStopWorryingChoice = new Choice("Then stop worrying.", "But...but...All right...I'll try to remain calm.");
            ThenStopWorryingReaction = new Reaction();
            ThenStopWorryingReaction.AddAction(new NPCCallbackAction(UpdateThenStopWorrying));
            ThenStopWorryingReaction.AddAction(new ShowOneOffChatAction(toControl, "But...but...All right...I'll try to remain calm."));

            ToughLuckChoice = new Choice("Tough luck.", "*sigh* I've got no chance here do I...");
            ToughLuckReaction = new Reaction();
            ToughLuckReaction.AddAction(new NPCCallbackAction(UpdateToughLuck));
            ToughLuckReaction.AddAction(new ShowOneOffChatAction(toControl, "*sigh* I've got no chance here do I..."));

            OfCourseItIsChoice = new Choice("Of course it is!", "But how do I overcome it?");
            OfCourseItIsReaction = new Reaction();
            OfCourseItIsReaction.AddAction(new NPCCallbackAction(UpdateOfCourseItIs));
            OfCourseItIsReaction.AddAction(new UpdateCurrentTextAction(toControl, "But how do I overcome it?"));

            NoChanceChoice = new Choice("You have no chance", "You're right, I can't overcome my fears.");
            NoChanceReaction = new Reaction();
            NoChanceReaction.AddAction(new NPCCallbackAction(UpdateNoChance));
            NoChanceReaction.AddAction(new ShowOneOffChatAction(toControl, "You're right, I can't overcome my fears."));

            NewThingsAreAlwaysScaryChoice = new Choice("New things are always scary.", "So how do I deal with my fear?");
            NewThingsAreAlwaysScareReaction = new Reaction();
            NewThingsAreAlwaysScareReaction.AddAction(new NPCCallbackAction(UpdateNewThingsAreAlwaysScary));
            NewThingsAreAlwaysScareReaction.AddAction(new UpdateCurrentTextAction(toControl, "So how do I deal with my fear?"));

            JustActNaturallyChoice = new Choice("Just act naturally.", "I...I'll give it my best shot.");
            JustActNaturallyReaction = new Reaction();
            JustActNaturallyReaction.AddAction(new NPCCallbackAction(UpdateJustActNaturally));
            JustActNaturallyReaction.AddAction(new ShowOneOffChatAction(toControl, "I...I'll give it my best shot."));

            GiveUpChoice = new Choice("Give up.", "I've got no chance do I.");
            GiveUpReaction = new Reaction();
            GiveUpReaction.AddAction(new NPCCallbackAction(UpdateGiveUp));
            GiveUpReaction.AddAction(new ShowOneOffChatAction(toControl, "I've got no chance do I."));
        }
示例#25
0
        public WaitingAtBeachNotAsFriend(NPC toControl, string currentDialogue)
            : base(toControl, "What do you want?  Go away!")
        {
            HaveAFunTimeChoice = new Choice("Have a fun time?", "Sorta...Especially with the Farmer's Daughter.\nShe's the most amazing girl I've met!");
            HaveAFunTimeReaction = new Reaction();
            HaveAFunTimeReaction.AddAction(new NPCCallbackAction(UpdateHaveAFunTime));
            HaveAFunTimeReaction.AddAction(new UpdateCurrentTextAction(toControl, "Sorta...Especially with the Farmer's Daughter.\nShe's the most amazing girl I've met!"));
            _allChoiceReactions.Add(HaveAFunTimeChoice, new DispositionDependentReaction(HaveAFunTimeReaction));

            IHearWeddingBellsChoice = new Choice("I hear wedding bells!", "Oh shut up!  Stop BEING MEAN!");
            IHearWeddingBellsReaction = new Reaction();
            IHearWeddingBellsReaction.AddAction(new NPCCallbackAction(UpdateIHearWeddingBells));
            IHearWeddingBellsReaction.AddAction(new ShowOneOffChatAction(toControl, "Oh shut up!  Stop BEING MEAN!"));

            MaybeYouShouldBeFriendsChoice = new Choice("Maybe you should be friends?", "But I don't know what to say to her.  I get nervous around her...");
            MaybeYouShouldBeFriendsReaction = new Reaction();
            MaybeYouShouldBeFriendsReaction.AddAction(new NPCCallbackAction(UpdateMaybeYouShouldBeFriends));
            MaybeYouShouldBeFriendsReaction.AddAction(new UpdateCurrentTextAction(toControl, "But I don't know what to say to her.  I get nervous around her..."));

            YouDontNeedToKnowChoice = new Choice("You don't need to know.", "But its scary to talk with her.  What if I mess up?");
            YouDontNeedToKnowReaction = new Reaction();
            YouDontNeedToKnowReaction.AddAction(new NPCCallbackAction(UpdateYouDontNeedToKnow));
            YouDontNeedToKnowReaction.AddAction(new UpdateCurrentTextAction(toControl, "But its scary to talk with her.  What if I mess up?"));

            DoYouWantToBeFriendsChoice = new Choice("Do you want to be friends?", "Yeah...I want to be friends with her...");
            DoYouWantToBeFriendsReaction = new Reaction();
            DoYouWantToBeFriendsReaction.AddAction(new NPCCallbackAction(UpdateDoYouWantToBeFriends));
            DoYouWantToBeFriendsReaction.AddAction(new UpdateCurrentTextAction(toControl, "Yeah...I want to be friends with her..."));

            ThenStopWorryingChoice = new Choice("Then stop worrying.", "But...but...all right...I'll try to remain calm.");
            ThenStopWorryingReaction = new Reaction();
            ThenStopWorryingReaction.AddAction(new NPCCallbackAction(UpdateThenStopWorrying));
            ThenStopWorryingReaction.AddAction(new ShowOneOffChatAction(toControl, "But...but...all right...I'll try to remain calm."));

            ToughLuckChoice = new Choice("Tough luck.", "*sigh* I've got no chance here do I...");
            ToughLuckReaction = new Reaction();
            ToughLuckReaction.AddAction(new NPCCallbackAction(UpdateToughLuck));
            ToughLuckReaction.AddAction(new ShowOneOffChatAction(toControl, "*sigh* I've got no chance here do I..."));

            OfCourseItIsChoice = new Choice("Of course it is!", "But how do I overcome it?");
            OfCourseItIsReaction = new Reaction();
            OfCourseItIsReaction.AddAction(new NPCCallbackAction(UpdateOfCourseItIs));
            OfCourseItIsReaction.AddAction(new UpdateCurrentTextAction(toControl, "But how do I overcome it?"));

            NoChanceChoice = new Choice("You have no chance", "You're right, I can't overcome my fears.");
            NoChanceReaction = new Reaction();
            NoChanceReaction.AddAction(new NPCCallbackAction(UpdateNoChance));
            NoChanceReaction.AddAction(new ShowOneOffChatAction(toControl, "You're right, I can't overcome my fears."));

            NewThingsAreAlwaysScaryChoice = new Choice("New things are always scary.", "So how do I deal with my fear?");
            NewThingsAreAlwaysScareReaction = new Reaction();
            NewThingsAreAlwaysScareReaction.AddAction(new NPCCallbackAction(UpdateNewThingsAreAlwaysScary));
            NewThingsAreAlwaysScareReaction.AddAction(new UpdateCurrentTextAction(toControl, "So how do I deal with my fear?"));

            JustActNaturallyChoice = new Choice("Just act naturally.", "I...I'll give it my best shot.");
            JustActNaturallyReaction = new Reaction();
            JustActNaturallyReaction.AddAction(new NPCCallbackAction(UpdateJustActNaturally));
            JustActNaturallyReaction.AddAction(new ShowOneOffChatAction(toControl, "I...I'll give it my best shot."));

            GiveUpChoice = new Choice("Give up.", "I've got no chance do I.");
            GiveUpReaction = new Reaction();
            GiveUpReaction.AddAction(new NPCCallbackAction(UpdateGiveUp));
            GiveUpReaction.AddAction(new ShowOneOffChatAction(toControl, "I've got no chance do I."));
        }
示例#26
0
    protected override void SetFlagReactions()
    {
        /*Reaction testOne = new Reaction();
        testOne.AddAction(new NPCAddScheduleAction(this, CastleManFollowSchedule));
        flagReactions.Add(FlagStrings.MusicianFinishedTalkingFriends, testOne);

        Reaction testTwo = new Reaction();
        testTwo.AddAction(new NPCAddScheduleAction(this, CastleManFollowSchedule));
        flagReactions.Add(FlagStrings.MusicianFinishedTalkingNOTFriends, testTwo);*/

        Reaction ChangeToTalkingState = new Reaction();
        ChangeToTalkingState.AddAction(new NPCEmotionUpdateAction(this, new MeetFamily(this, "")));
        //ChangeToTalkingState.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.MoveToMusician, ChangeToTalkingState);

        #region Asfriends
        //Schedule to start the castleman following the player when he is friends
        Reaction FriendsWithPlayer = new Reaction ();
        FriendsWithPlayer.AddAction(new NPCAddScheduleAction(this, CastleManFollowSchedule));
        FriendsWithPlayer.AddAction(new NPCEmotionUpdateAction(this, new CastleManTraveling(this, "")));
        FriendsWithPlayer.AddAction(new NPCCallbackAction(setFriends));
        FriendsWithPlayer.AddAction(new NPCCallbackAction(setHappy));
        flagReactions.Add(FlagStrings.MusicianFinishedTalkingFriends, FriendsWithPlayer);

        //Schedule to start talking to carpenter as friends
        Reaction IntroConversationCarpenterSonFriend = new Reaction ();
        IntroConversationCarpenterSonFriend.AddAction(new NPCAddScheduleAction(this, CastleManTalksFirstFriends));
        IntroConversationCarpenterSonFriend.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSON));
        IntroConversationCarpenterSonFriend.AddAction(new NPCCallbackAction(setSad));
        flagReactions.Add(FlagStrings.InitialConversationWithCSONFriend, IntroConversationCarpenterSonFriend);
        //Sets up the new emotion after the first conversation
        //
        Reaction AfterIntroConversationCarpenterSon = new Reaction();
        AfterIntroConversationCarpenterSon.AddAction(new NPCAddScheduleAction(this, CastleManFollowScheduleVTwo));
        AfterIntroConversationCarpenterSon.AddAction(new NPCEmotionUpdateAction(this, new VisitCarpenterSonAsFriend(this, "")));
        AfterIntroConversationCarpenterSon.AddAction(new NPCCallbackAction(setSad));
        flagReactions.Add(FlagStrings.FinishedInitialConversationWithCSONFriend, AfterIntroConversationCarpenterSon);
        //Sets up the second conversation
        Reaction StartConversationTwoFriends = new Reaction ();
        StartConversationTwoFriends.AddAction(new NPCAddScheduleAction(this, SetFinishedTalkingFlagForSecondConvoFriends));
        StartConversationTwoFriends.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSONTwice));
        StartConversationTwoFriends.AddAction(new NPCCallbackAction(setSad));
        flagReactions.Add(FlagStrings.SecondConversationWithCSONFriend, StartConversationTwoFriends);
        //Sets up the emotion after the second conversation
        //
        Reaction AfterSecondConversationCarpenterSon = new Reaction ();
        AfterSecondConversationCarpenterSon.AddAction(new NPCAddScheduleAction(this, CastleManFollowScheduleVTwo));
        AfterSecondConversationCarpenterSon.AddAction(new NPCEmotionUpdateAction(this, new TalkWithCarpenterSonAsFriendRoundTwo(this, "")));
        AfterSecondConversationCarpenterSon.AddAction(new NPCCallbackAction(setSad));
        flagReactions.Add(FlagStrings.FinishedSecondConversationWithCSONFriend, AfterSecondConversationCarpenterSon);

        //Sets up the third conversation
        Reaction StartConversationThreeFriends = new Reaction ();
        StartConversationThreeFriends.AddAction(new NPCAddScheduleAction(this, SetFinishedTalkingFlagForThirdConvoFriends));
        StartConversationThreeFriends.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSONThrice));
        StartConversationThreeFriends.AddAction(new NPCCallbackAction(testStartGoingToBeachAfterCarpenterSonTalk));
        StartConversationThreeFriends.AddAction(new NPCCallbackAction(setSad));
        flagReactions.Add(FlagStrings.ThirdConvoWithCSONFriend, StartConversationThreeFriends);
        //Moves the Castleman to the beach
        //
        Reaction ReadyForBeachFriends = new Reaction ();
        ReadyForBeachFriends.AddAction(new NPCEmotionUpdateAction(this, new WaitingAtBeachFriend(this, "")));
        ReadyForBeachFriends.AddAction(new NPCAddScheduleAction(this, CastlemanWalkToBeachSchedule));
        ReadyForBeachFriends.AddAction(new NPCCallbackAction(setEmbarrased));
        ReadyForBeachFriends.AddAction(new NPCCallbackAction(setGoingToBeach));
        flagReactions.Add(FlagStrings.BeachBeforeConvoFriendsString, ReadyForBeachFriends);
        #endregion

        #region NOT Friends with Castleman
        //Schedule to start the Castleman following the player When not friends.
        Reaction NOTFriendsWithPlayer = new Reaction ();
        NOTFriendsWithPlayer.AddAction(new NPCCallbackAction(testFunction));
        NOTFriendsWithPlayer.AddAction(new NPCEmotionUpdateAction(this, new CastleManTraveling(this, "")));
        NOTFriendsWithPlayer.AddAction(new NPCAddScheduleAction(this, CastleManFollowSchedule));
        NOTFriendsWithPlayer.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.MusicianFinishedTalkingNOTFriends, NOTFriendsWithPlayer);
        //Schedule for first convo with carpenter not friends
        Reaction IntroConversationCarpenterSonNOTFriend = new Reaction ();
        IntroConversationCarpenterSonNOTFriend.AddAction(new NPCAddScheduleAction(this, CastleManTalksFirstNOTFriends));
        IntroConversationCarpenterSonNOTFriend.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSON));
        IntroConversationCarpenterSonNOTFriend.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.InitialConversationWithCSONNOTFriend, IntroConversationCarpenterSonNOTFriend);
        //Schedule for the second emotion state
        Reaction AfterIntroConversationNOTFriendsCarpenterSon = new Reaction();
        AfterIntroConversationNOTFriendsCarpenterSon.AddAction(new NPCAddScheduleAction(this, CastleManFollowScheduleVTwo));
        AfterIntroConversationNOTFriendsCarpenterSon.AddAction(new NPCEmotionUpdateAction(this, new VisitCarpenterSonNotAsFriend(this, "")));
        AfterIntroConversationNOTFriendsCarpenterSon.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.FinishedInitialConversationWithCSONNOTFriend, AfterIntroConversationNOTFriendsCarpenterSon);
        //Schedule for the second conversation
        Reaction StartConversationTwoNOTFriends = new Reaction ();
        StartConversationTwoNOTFriends.AddAction(new NPCAddScheduleAction(this, SetFinishedTalkingFlagForSecondConvoNOTFriends));
        StartConversationTwoNOTFriends.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSONTwice));
        StartConversationTwoNOTFriends.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.SecondConversationWithCSONNOTFriend, StartConversationTwoNOTFriends);
        //Schedule for setting up the third emotion state
        Reaction AfterSecondConversationNOTFriendsCarpenterSon = new Reaction ();
        AfterSecondConversationNOTFriendsCarpenterSon.AddAction(new NPCAddScheduleAction(this, CastleManFollowScheduleVTwo));
        AfterSecondConversationNOTFriendsCarpenterSon.AddAction(new NPCEmotionUpdateAction(this, new TalkWithCarpenterSonNotAsFriendRoundTwo(this, "")));
        AfterSecondConversationNOTFriendsCarpenterSon.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.FinishedSecondConversationWithCSONNOTFriend, AfterSecondConversationNOTFriendsCarpenterSon);
        //Schedule for Starting the third conversation
        Reaction StartConversationThreeNOTFriends = new Reaction ();
        StartConversationThreeNOTFriends.AddAction(new NPCAddScheduleAction(this, SetFinishedTalkingFlagForThirdConvoNOTFriends));
        StartConversationThreeNOTFriends.AddAction(new NPCAddScheduleAction(this, CastleManTalksToCSONThrice));
        StartConversationThreeNOTFriends.AddAction(new NPCCallbackAction(testStartGoingToBeachAfterCarpenterSonTalk));
        StartConversationThreeNOTFriends.AddAction(new NPCCallbackAction(setAngry));
        flagReactions.Add(FlagStrings.ThirdConvoWithCSONNOTFriend, StartConversationThreeNOTFriends);

        Reaction ReadyForBeachNOTAsFriends = new Reaction ();
        ReadyForBeachNOTAsFriends.AddAction(new NPCEmotionUpdateAction(this, new WaitingAtBeachNotAsFriend(this, "")));
        ReadyForBeachNOTAsFriends.AddAction(new NPCCallbackAction(setEmbarrased));
        ReadyForBeachNOTAsFriends.AddAction(new NPCAddScheduleAction(this, CastlemanWalkToBeachSchedule));
        ReadyForBeachNOTAsFriends.AddAction(new NPCCallbackAction(setGoingToBeach));
        flagReactions.Add(FlagStrings.BeachBeforeConvoNotFriendsString, ReadyForBeachNOTAsFriends);
        #endregion
        Reaction TriggerBeach = new Reaction();
        TriggerBeach.AddAction(new NPCCallbackAction(TimerAndBeach));
        TriggerBeach.AddAction(new NPCEmotionUpdateAction(this, new EmptyEmotion(this, "Let's keep going.  Everyone hates me.")));
        flagReactions.Add(FlagStrings.TimerForGoingToBeach, TriggerBeach);

        Reaction FinishedTalkingWithCSON = new Reaction ();
        FinishedTalkingWithCSON.AddAction(new NPCCallbackAction(testStartGoingToBeachAfterCarpenterSonTalk));
        flagReactions.Add(FlagStrings.FinishedCSONConversation, FinishedTalkingWithCSON);

        Reaction CheckLighthouseAtBeach = new Reaction();
        CheckLighthouseAtBeach.AddAction(new NPCCallbackAction(checkNumberAtBeach));
        flagReactions.Add(FlagStrings.LighthouseAtBeach, CheckLighthouseAtBeach);

        Reaction CheckCastleAtBeach = new Reaction();
        CheckCastleAtBeach.AddAction(new NPCCallbackAction(checkNumberAtBeach));
        flagReactions.Add(FlagStrings.CastleManAtBeach, CheckCastleAtBeach);

        Reaction SetPrepared = new Reaction();
        SetPrepared.AddAction(new NPCCallbackAction(setPrepare));
        flagReactions.Add(FlagStrings.PreparedForConversationWithLighthouse, SetPrepared);
        //This is to talk with the lighthouse girl for the first time.
        Reaction TalkWithLighthouseFirstTime = new Reaction();
        TalkWithLighthouseFirstTime.AddAction(new NPCAddScheduleAction(this, CastleManMeetsLighthouse));
        TalkWithLighthouseFirstTime.AddAction(new NPCEmotionUpdateAction(this, new AfterLighthouse(this, "")));
        TalkWithLighthouseFirstTime.AddAction(new NPCCallbackAction(testStartGoingtoBeachAfterLighthouseTalk));
        TalkWithLighthouseFirstTime.AddAction(new NPCCallbackAction(setEmbarrased));
        flagReactions.Add(FlagStrings.StartTalkingToLighthouse, TalkWithLighthouseFirstTime);

        #region Conversations
        Reaction ConversationPrepared = new Reaction();
        ConversationPrepared.AddAction(new NPCAddScheduleAction(this, CastleManTalksToLighthouseOnBeachFriends));
        flagReactions.Add(FlagStrings.TalkPreparedForConvo, ConversationPrepared);

        Reaction ConversationNOTPrepared = new Reaction();
        ConversationNOTPrepared.AddAction(new NPCAddScheduleAction(this, CastleManTalksToLighthouseOnBeachNOTFriends));
        flagReactions.Add(FlagStrings.TalkNotPreparedForConvo, ConversationNOTPrepared);

        #endregion
    }
示例#27
0
        public VisitCarpenterSonNotAsFriend(NPC toControl, string currentDialogue)
            : base(toControl, "Ugh...people here are just like back home!")
        {
            MaybeYouShouldTryTalkingToHimAgainChoice = new Choice("Maybe you should try talking to him again.", "You're just out to trick me into making a fool of myself!");
            MaybeYouShouldTryTalkingToHimReaction = new Reaction();
            MaybeYouShouldTryTalkingToHimReaction.AddAction(new NPCCallbackAction(UpdateMaybeYouShouldTryTalkingToHimAgain));
            MaybeYouShouldTryTalkingToHimReaction.AddAction(new UpdateCurrentTextAction(toControl, "You're just out to trick me into making a fool of myself!"));
            _allChoiceReactions.Add(MaybeYouShouldTryTalkingToHimAgainChoice, new DispositionDependentReaction(MaybeYouShouldTryTalkingToHimReaction));

            PrettyMuchChoice = new Choice("Pretty much!", "I hate all of you!");
            PrettyMuchReaction = new Reaction();
            PrettyMuchReaction.AddAction(new NPCCallbackAction(UpdatePrettyMuch));
            PrettyMuchReaction.AddAction(new ShowOneOffChatAction(toControl, "I hate all of you!"));
            _allChoiceReactions.Add(PrettyMuchChoice, new DispositionDependentReaction(PrettyMuchReaction));

            WhyWouldIWantToTrickYouChoice = new Choice("Why would I want to trick you?", "That's what someone trying to trick me would say!");
            WhyWouldIWantToTrickYouReaction = new Reaction ();
            WhyWouldIWantToTrickYouReaction.AddAction(new NPCCallbackAction(UpdateWhyWouldIWantToTrickYou));
            WhyWouldIWantToTrickYouReaction.AddAction(new UpdateCurrentTextAction(toControl, "That's what someone trying to trick me would say!"));

            JustTalkAboutFishChoice = new Choice("Just talk to him about fishing!", "I'm not stupid! I'm not going to fall for your trap!");
            JustTalkAboutFishReaction = new Reaction ();
            JustTalkAboutFishReaction.AddAction(new NPCCallbackAction(UpdateJustTalkAboutFish));
            JustTalkAboutFishReaction.AddAction(new UpdateCurrentTextAction(toControl, "I'm not stupid! I'm not going to fall for your trap!"));

            JustTalkToHimChoice =  new Choice ("Just talk to him!", "Fine! But if this is a joke at my expense...");
            JustTalkToHimReaction = new Reaction ();
            JustTalkToHimReaction.AddAction(new NPCCallbackAction(UpdateJustTalkToHim));
            JustTalkToHimReaction.AddAction(new ShowOneOffChatAction(toControl, "Fine! But if this is a joke at my expense..."));

            JustTrustMeChoice = new Choice("Just trust me!", "Hmph fine!");
            JustTrustMeReaction = new Reaction ();
            JustTrustMeReaction.AddAction(new NPCCallbackAction(UpdateJustTrustMe));
            JustTrustMeReaction.AddAction(new ShowOneOffChatAction(toControl, "Hmmpphh!  Fine!"));

            UghFineLetsMoveOnChoice = new Choice ("Ugh!  Fine lets move on!", "");
            UghFineLetsMoveOnReaction = new Reaction();
            UghFineLetsMoveOnReaction.AddAction(new NPCCallbackAction(UpdateUghFineLetsMoveOn));
            UghFineLetsMoveOnReaction.AddAction(new ShowOneOffChatAction(toControl, "I hate all of you!"));
        }
示例#28
0
        public VisitCarpenterSonAsFriend(NPC toControl, string currentDialogue)
            : base(toControl, "Ugh...people here are just like back home!")
        {
            ImSureHeDoesntHateYouChoice = new Choice("I'm sure he doesn't hate you.", "I...I dunno...");
            ImSureHeDoesntHateYouReaction = new Reaction();
            ImSureHeDoesntHateYouReaction.AddAction(new NPCCallbackAction(UpdateImSureHeDoesntHateYou));
            ImSureHeDoesntHateYouReaction.AddAction(new UpdateCurrentTextAction(toControl, "I...I dunno..."));
            _allChoiceReactions.Add(ImSureHeDoesntHateYouChoice, new DispositionDependentReaction(ImSureHeDoesntHateYouReaction));

            HeTotallyHatesYouChoice = new Choice("He totally hates you!", "I'm not surprised! Everyone I meet hates me...");
            HeTotallyHatesYouReaction = new Reaction();
            HeTotallyHatesYouReaction.AddAction(new NPCCallbackAction(UpdateHeTotallyHatesYou));
            HeTotallyHatesYouReaction.AddAction(new ShowOneOffChatAction(toControl, "I'm not surprised! Everyone I meet hates me..."));
            _allChoiceReactions.Add(HeTotallyHatesYouChoice, new DispositionDependentReaction(HeTotallyHatesYouReaction));

            DontBeSoScaredChoice = new Choice("Don't be so scared.", "But I don't know what to say!");
            DontBeSoScaredReaction = new Reaction ();
            DontBeSoScaredReaction.AddAction(new NPCCallbackAction(UpdateDontBeSoScared));
            DontBeSoScaredReaction.AddAction(new UpdateCurrentTextAction(toControl, "But I don't know what to say!"));

            JustTalkAboutFishChoice = new Choice("Just talk to him about fishing!", "But fishing is boring!");
            JustTalkAboutFishReaction = new Reaction ();
            JustTalkAboutFishReaction.AddAction(new NPCCallbackAction(UpdateJustTalkAboutFish));
            JustTalkAboutFishReaction.AddAction(new UpdateCurrentTextAction(toControl, "But fishing is boring!"));

            NotToHimChoice =  new Choice ("Not to him.", "I guess I'll give it another try...");
            NotToHimReaction = new Reaction ();
            NotToHimReaction.AddAction(new NPCCallbackAction(UpdateNotToHim));
            NotToHimReaction.AddAction(new ShowOneOffChatAction(toControl, "I guess I'll give it another try."));

            PoetryIsntBoringToYouChoice = new Choice("Poetry isnt boring to you.", "Yeah...maybe I shouldn't make fun of his interests...");
            PoetryIsntBoringToYouReaction = new Reaction ();
            PoetryIsntBoringToYouReaction.AddAction(new NPCCallbackAction(UpdatePoetryIsntBoring));
            PoetryIsntBoringToYouReaction.AddAction(new ShowOneOffChatAction(toControl, "Yeah...maybe I shouldn't make fun of his interests..."));

            GoodPointLetsMoveOnChoice = new Choice ("Good point! Let's move on.", "");
            GoodPointLetsMoveOnReaction = new Reaction();
            GoodPointLetsMoveOnReaction.AddAction(new NPCCallbackAction(UpdateGoodPointLetsMoveOn));
            GoodPointLetsMoveOnReaction.AddAction(new ShowOneOffChatAction(toControl, "You're right!  This is stupid anyways."));
        }
示例#29
0
        public InitialEmotionState(NPC toControl, string currentDialogue)
            : base(toControl, currentDialogue)
        {
            #region item reactions
            Reaction appleReaction = new Reaction();
            appleReaction.AddAction(new NPCTakeItemAction(toControl));
            appleReaction.AddAction(new UpdateCurrentTextAction(toControl, "This reminds me of when I stole an apple from the royal gardens. I barely escaped with my life!"));
            _allItemReactions.Add(StringsItem.Apple,  new DispositionDependentReaction(appleReaction));

            Reaction applePieReaction = new Reaction();
            applePieReaction.AddAction(new NPCTakeItemAction(toControl));
            applePieReaction.AddAction(new UpdateCurrentTextAction(toControl, "I haven't eaten apple pie this good, since I impersonated a noble to eat at the Sultan's palace!"));
            _allItemReactions.Add(StringsItem.ApplePie,  new DispositionDependentReaction(applePieReaction));

            Reaction veggiesReaction = new Reaction();
            veggiesReaction.AddAction(new NPCTakeItemAction(toControl));
            veggiesReaction.AddAction(new UpdateCurrentTextAction(toControl, "I remember eating a strange root when I was stranded on a deserted island. It made me think that I could drink sea water."));
            _allItemReactions.Add(StringsItem.Vegetable,  new DispositionDependentReaction(veggiesReaction));

            Reaction shovelReaction = new Reaction();
            shovelReaction.AddAction(new NPCTakeItemAction(toControl));
            shovelReaction.AddAction(new UpdateCurrentTextAction(toControl, "Thanks matey! I can now go and dig for treasure."));
            shovelReaction.AddAction(new NPCCallbackAction(UpdateTreasureHuntBegins));
            _allItemReactions.Add(StringsItem.Shovel,  new DispositionDependentReaction(shovelReaction));

            Reaction toyShipReaction = new Reaction();
            toyShipReaction.AddAction(new NPCTakeItemAction(toControl));
            toyShipReaction.AddAction(new UpdateCurrentTextAction(toControl, "Ahhh... what a grand vessel! Reminds me of me own ship. Thanks laddie!"));
            _allItemReactions.Add(StringsItem.ToyBoat,  new DispositionDependentReaction(toyShipReaction));

            Reaction seaShellReaction = new Reaction();
            seaShellReaction.AddAction(new NPCTakeItemAction(toControl));
            seaShellReaction.AddAction(new UpdateCurrentTextAction(toControl, "What is this? There is a pearl inside! My search has not been in vain."));
            _allItemReactions.Add(StringsItem.SeashellTwo,  new DispositionDependentReaction(seaShellReaction));
            #endregion

            #region choices
            whyHereChoice = new Choice("Why are you here?", "I am searching for great treasure said to be buried on this island, but I can not figure out what the map is saying.");
            whyHereReaction = new Reaction();
            whyHereReaction.AddAction(new NPCCallbackAction(UpdateWhyHere));
            whyHereReaction.AddAction(new UpdateCurrentTextAction(toControl, "How 'ave ye been matey?"));
            _allChoiceReactions.Add(whyHereChoice, new DispositionDependentReaction(whyHereReaction));

            whereShipChoice = new Choice("Where is your ship?", "Well... I might have forgotten to drop the anchor before commin' ashore.");
            whereShipReaction = new Reaction();
            whereShipReaction.AddAction(new NPCCallbackAction(UpdateWhereShip));
            whereShipReaction.AddAction(new UpdateCurrentTextAction(toControl, "How 'ave ye been laddie?"));
            _allChoiceReactions.Add(whereShipChoice, new DispositionDependentReaction(whereShipReaction));
            #endregion
        }
示例#30
0
        public TalkWithCarpenterSonAsFriendRoundTwo(NPC toControl, string currentDialogue)
            : base(toControl, "See it didn't work!")
        {
            WhatIfYouWereYourselfChoice = new Choice ("What if you just were yourself?", "No one ever likes who I am...\nHow could he ever like the real me?");
            WhatIfYouWereYourselfReaction = new Reaction();
            WhatIfYouWereYourselfReaction.AddAction(new NPCCallbackAction(UpdateWhatIfYouWereYourself));
            WhatIfYouWereYourselfReaction.AddAction(new UpdateCurrentTextAction(toControl, ""));
            _allChoiceReactions.Add(WhatIfYouWereYourselfChoice, new DispositionDependentReaction(WhatIfYouWereYourselfReaction));

            YeahHeProbablyHatesYouChoice =  new Choice ("Yeah he probably hates you.", "Let's go, I'm tired of being here.");
            YeahHeProbablyHatesYouReaction =  new Reaction();
            YeahHeProbablyHatesYouReaction.AddAction(new NPCCallbackAction(UpdateYeahHeProbablyHatesYou));
            YeahHeProbablyHatesYouReaction.AddAction(new ShowOneOffChatAction(toControl, "Let's go, I'm tired of being here."));
            _allChoiceReactions.Add(YeahHeProbablyHatesYouChoice, new DispositionDependentReaction(YeahHeProbablyHatesYouReaction));

            IDontHateYouChoice =  new Choice("I don't hate you.", "Yeah? But he might...");
            IDontHateYouReaction =  new Reaction();
            IDontHateYouReaction.AddAction(new NPCCallbackAction(UpdateIDontHateYou));
            IDontHateYouReaction.AddAction(new UpdateCurrentTextAction(toControl, "Yeah? But he might..."));

            MaybeYouJustNeedToTryChoice =  new Choice("Maybe you just need to try.", "I dunno about this...");
            MaybeYouJustNeedToTryReaction =  new Reaction();
            MaybeYouJustNeedToTryReaction.AddAction(new NPCCallbackAction(UpdateMaybeYouJustNeedToTry));
            MaybeYouJustNeedToTryReaction.AddAction(new UpdateCurrentTextAction(toControl, "I dunno about this..."));

            JustBeYourselfChoice = new Choice("Just be yourself.", "All right I'll try...");
            JustBeYourselfReaction = new Reaction();
            JustBeYourselfReaction.AddAction(new NPCCallbackAction(UpdateJustBeYourself));
            JustBeYourselfReaction.AddAction(new ShowOneOffChatAction(toControl, "All right I'll try..."));

            OnSecondThoughtHeHatesYouChoice = new Choice("On second thought he hates you.", "I knew it! Let's get out of here...");
            OnSecondThoughtHeHatesYouReaction = new Reaction();
            OnSecondThoughtHeHatesYouReaction.AddAction(new NPCCallbackAction(UpdateOnSecondThoughtHeHatesYou));
            OnSecondThoughtHeHatesYouReaction.AddAction(new ShowOneOffChatAction(toControl, "I knew it! Let's get out of here..."));

            IfImYourFriendThenHeCanBeTooChoice = new Choice("If I'm your friend, then he can be too.", "I guess so...\n I should at least make an effort.");
            IfImYourFriendThenHeCanBeTooReaction = new Reaction();
            IfImYourFriendThenHeCanBeTooReaction.AddAction(new NPCCallbackAction(UpdateIfImYourFriendThenHeCanBeToo));
            IfImYourFriendThenHeCanBeTooReaction.AddAction(new ShowOneOffChatAction(toControl, "I guess so...\nI should at least make an effort."));

            FineLiveInFearChoice =  new Choice ("Fine live in fear!", "I will! Let's get outta here!");
            FineLiveInFearReaction = new Reaction();
            FineLiveInFearReaction.AddAction(new NPCCallbackAction(UpdateFineLiveInFear));
            FineLiveInFearReaction.AddAction(new ShowOneOffChatAction(toControl, "I will! Let's get outta here!"));
        }