Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("What is your name?");
            player       = new Player(Console.ReadLine());
            player.Stats = new StatChart()
            {
                Level  = 1,
                MaxHPs = 10,
                HPs    = 10,
                Atk    = 2,
                Def    = 1
            };

            currentArea = WorldBuilder.BuildWorld();

            String command = "";

            Console.WriteLine(currentArea);

            while (!command.ToLower().Equals("quit"))
            {
                // Do the Game Loop!
                Console.Write(">> ");
                command = Console.ReadLine();

                ParseCommand(command.ToLower());
            }

            Console.WriteLine("Bye!");
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            // Initialization
            StartTime = DateTime.Now;
            PrintPositive("What is your name?  ");
            Player = new Player(Console.ReadLine());

            // Check out that second parameter?!?! WAHT!@
            int hps = Dice.Roll(Dice.Type.D6, modifier: 4);  // roll 1d6+4



            Player.Stats = new StatChart()
            {
                Level  = 1,
                MaxHPs = hps,
                HPs    = hps,
                Atk    = new Dice(Dice.Type.D6), // 1d6
                Def    = new Dice(Dice.Type.D4), // 1d4 with a modifier
                Exp    = 0
            };

            // Create the World from the WorldBuilder class.
            CurrentArea = WorldBuilder.BuildWorld();

            string command = "";

            // TODO: VM Easy Achievement:
            // Script an Intro Sequence setting the stage for your game.
            // Start your storyline off with a little more than just dropping
            // the player into the world with no idea what is going on....
            // ... or maybe that's what you want, nobody told me what was going on
            // when I landed in this world.

            // Display the short information about the Starting Area
            Console.WriteLine(CurrentArea);

            #region The Entire Game Happens HERE

            while (!command.ToLowerInvariant().Equals("quit"))
            {
                // Do the Game Loop!
                PrintSpecial(">> ");
                command = Console.ReadLine();

                // This command.ToLowerInvariant() is why all names for things must be in all lowercase.
                ParseCommand(command.ToLowerInvariant());

                // TODO: You can spice up the game by having things happen randomly
                // Add things here to insert them in between the users commands.
            }

            #endregion             // THE GAME

            PrintLinePositive("Bye!");
        }
        public static void Main(string[] args)
        {
            // Initialization
            PrintPositive("What is your name?  ");
            player = new Player(Console.ReadLine());

            // Check out that second parameter?!?! WAHT!@
            int hps = Dice.Roll(Dice.Type.D6, modifier: 4);

            player.Stats = new StatChart()
            {
                Level  = 1,
                MaxHPs = hps,
                HPs    = hps,
                Atk    = new Dice(1, Dice.Type.D6),
                Def    = new Dice(1, Dice.Type.D4),
                Exp    = 0
            };

            // Create the World from the WorldBuilder class.
            currentArea = WorldBuilder.BuildWorld();

            string command = "";

            Console.WriteLine(currentArea);

            while (!command.ToLower().Equals("quit"))
            {
                // Do the Game Loop!
                Console.Write(">> ");
                command = Console.ReadLine();

                ParseCommand(command.ToLower());
            }

            PrintLinePositive("Bye!");
            Console.ReadKey();
        }