Пример #1
0
        public void Execute(GameSession parentSession)
        {
            if (!visited)
            {
                parentSession.SendText("\nHey! Priest told me about you. Do adventures interest you?");
                int choice = parentSession.ListBoxInteractionChoice(new List <string>()
                {
                    "What is the deal?", "I am bussy right now"
                });
                switch (choice)
                {
                case 0:
                    parentSession.SendText("\nOur ancestors hid our tresury in five caves and sealed them with magic, but it's dangerous place. I will give you talisman, that lets you in.");
                    parentSession.AddThisItem(new Game.Engine.Items.QuestItem.ElfsTalisman());
                    visited = true;
                    break;

                default:
                    parentSession.SendText("\nOk, I can wait");
                    break;
                }
            }
            else
            {
                parentSession.SendText("\nHow are you doing, friend?");
            }
        }
Пример #2
0
        private void ChopWood(GameSession parentSession, GymirEncounter myself, HymirEncounter myBrother)
        {
            parentSession.SendText("Wspaniale! Mozesz uzyc mojego topora, ktory lezy w szopie.");
            int choice = parentSession.GetListBoxChoice(new List <string>()
            {
                "Spedz nastepna godzine na rabaniu drzewa", "Poczekaj az Gymir sie oddali i ucieknij z jego toporem"
            });

            if (choice == 0)
            {
                if (payment == 0)
                {
                    parentSession.SendText("Jestem naprawde wdzieczny za twoja pomoc! Powinienes poznac mojego brata Hymira. To bardzo mila osoba, zupelnie jak ty.");
                    myBrother.Strategy = new HymirFriendlyStrategy();   // Hymir will hear about this and he will like you now
                    myself.ChangeState(new GymirCompleteState(), true); // this interaction is now complete
                }
                else
                {
                    parentSession.SendText("W porzadku, oto twoja zaplata.");
                    parentSession.UpdateStat(8, payment);        // +15 gold
                    myself.ChangeState(new GymirNoMoneyState()); // this interaction is still not complete, but the player can return here
                }
            }
            else
            {
                parentSession.SendText("Chwila moment, dokad sie wybierasz z moim toporem? WRACAJ TU!");
                parentSession.AddThisItem(Index.ProduceSpecificItem("item0009")); //gymir's axe
                myBrother.Strategy = new HymirHostileStrategy();                  // Hymir will hear about this and he will hate you now
                myself.ChangeState(new GymirHostileState(), true);                // this interaction is now complete, but Gymir will no longer let you work here
            }
        }
Пример #3
0
        public void Execute(GameSession parentSession, QuestInteraction quest)
        {
            GoldenKey goldenKey = new GoldenKey();

            parentSession.SendText("You defeated dragon? Thanks a lot! Of course I will give you the key, my savior.");
            parentSession.AddThisItem(goldenKey);
            quest.Strategy = new QuestCompleteStrategy();
        }
Пример #4
0
        public void Execute(GameSession parentSession, QuestInteraction quest)
        {
            GoldenKey goldenKey = new GoldenKey();

            int GetListBoxChoice(List <string> choices)
            {
                return(parentSession.ListBoxInteractionChoice(choices));
            }

            parentSession.SendText("Welcome! You're looking for a key? I'm not sure if I should give it to you...what can you do to change my mind?");
            int choice = GetListBoxChoice(new List <string>()
            {
                "I'm a very brave knight, so I deserve a key.", "How about we play a game?", "Just give me the key!"
            });

            switch (choice)
            {
            case 0:
                parentSession.SendText("\nOoooh? We will see then!");
                for (int i = 0; i < 3; i++)
                {
                    parentSession.FightRandomMonster();
                }
                parentSession.SendText("\nAmazing! Here is the key.");
                parentSession.AddThisItem(goldenKey);
                quest.Strategy = new QuestCompleteStrategy();
                break;

            case 1:
                parentSession.SendText("\nActually I'm suuuuper bored. So let's play.");
                WarGame();
                break;

            default:
                parentSession.SendText("\nSuch a rude fellow...! Go away then!");
                break;
            }

            void WarGame()
            {
                parentSession.SendText("\nYou need to get a higher number than princess. If you win 2 out of 3 rounds you win.");
                int yourScore = 0;

                for (int i = 0; i < 3; i++)
                {
                    int princessResult = Index.RNG(1, 7);
                    int yourResult     = Index.RNG(1, 7);
                    parentSession.SendText("Press 1 to continue or ENTER to quit");
                    string key = parentSession.GetValidKeyResponse(new List <string>()
                    {
                        "Return", "1"
                    }).Item1;
                    if (key == "Return")
                    {
                        return;
                    }
                    if (key == "1")
                    {
                        parentSession.SendText("\nPrincess score: " + princessResult);
                        parentSession.SendText("Your score: " + yourResult);
                        if (yourResult > princessResult)
                        {
                            parentSession.SendText("\nYou won round " + (i + 1));
                            yourScore++;
                        }
                        else if (yourResult == princessResult)
                        {
                            parentSession.SendText("\nIt's a draw. One more time");
                            i--;
                        }
                        else
                        {
                            parentSession.SendText("\nYou lost round " + (i + 1));
                        }
                    }
                }
                if (yourScore >= 2)
                {
                    parentSession.SendText("\nYou won! Ok, here is the key.");
                    parentSession.AddThisItem(goldenKey);
                    quest.Strategy = new QuestCompleteStrategy();
                }
                else
                {
                    parentSession.SendText("\nHahaha, you loser. Maybe next time you'll be more lucky.");
                }
            }
        }