Beispiel #1
0
 public Player(string name, string shipName)
 {
     this.name         = name;
     currentShip       = new Skipper(shipName);
     currentLocation   = Program.world.availableLocations[0];
     lastLocation      = Program.world;
     gold              = 1000;
     travelDays        = 0;
     this.questHistory = new QuestList();
 }
Beispiel #2
0
        public void Act(string error)
        {
            Player currentPlayer = Program.newGame.newPlayer;

            System.Console.Clear();

            System.Console.Write($@"
            ############################################################
            #        You approach the bar and catch the eye of         #
            #    the bartender, they will probably have work available #
            #             or may know of some good rumors.             #
            #     <0-Ask about rumors><1-Ask about work><2-return>     #
            ############################################################
            ");
            string choice = Console.ReadLine();

            if (choice == "0")
            {
                System.Console.WriteLine(getRumor());
                System.Console.ReadLine();
            }
            else if (choice == "1")
            {
                Quest availQuest = QuestList.questRandomizer();
                System.Console.WriteLine("Someone stopped by and posted some work have a look!");
                System.Console.Write(availQuest.Instructions);
                System.Console.WriteLine("Do you want to take on this work? <y><n>");
                string opt = Console.ReadLine();
                {
                    if (opt == "y")
                    {
                        currentPlayer.questHistory.currentQuest = availQuest;
                        if (availQuest.type == "Fetch")
                        {
                            availQuest.pickuplocation.actions.Add(new PickUp());
                        }
                        availQuest.targetlocation.actions.Add(new turnIn());
                        System.Console.WriteLine("You agree to take the job and return to your seat");
                        Console.ReadLine();
                        return;
                    }
                }
            }
            else
            {
                System.Console.WriteLine("You return to your seat at the bar");
                Console.ReadLine();
                return;
            }
        }