//-5000 to -2500- Starving
 //-2500 to -1000- Hungry
 //-1000 to 0- Slightly Hungry
 //0 to 1000- Fed
 //1000 to 2500- Well Fed
 //2500 to 5000- Stuffed
 public Player(string n, Species sp, Class c)
 {
     name = n;
     species = sp;
     career = c;
     identifier = species.abbrv + career.abbrv;
     stats = species.baseStats.addStatMod(career.statMod).adjust();
     stats.xp = 0;
     if (species == Species._darkElf)
     {
         status.addStatus(new Status("Shadowbound", 1, true, ConsoleForeground.Maroon, ConsoleBackground.Black));
         status.addStatus(new Status("Accursed", 1, true, ConsoleForeground.Red, ConsoleBackground.Black));
     }
     if (species == Species._faerie)
     {
         status.addStatus(new Status("Magic Sight", 1, true, ConsoleForeground.Yellow, ConsoleBackground.Black));
         status.addStatus(new Status("Fly", 1, true, ConsoleForeground.Cyan, ConsoleBackground.Black));
     }
     if (species == Species._woodElf)
     {
         status.addStatus(new Status("rPoison", 1, true, ConsoleForeground.Green, ConsoleBackground.Black));
     }
     if (species == Species._merfolk)
     {
         status.addStatus(new Status("Swimmer", 1, true, ConsoleForeground.Cyan, ConsoleBackground.Black));
     }
     if (species == Species._karura)
     {
         status.addStatus(new Status("Fast Metabolism", 1, true, ConsoleForeground.Maroon, ConsoleBackground.Black));
     }
     //status.addStatus(new Status("Clairvoyance", 1, true, ConsoleForeground.Olive, ConsoleBackground.Black));
     equipment = new Equipment();
     abilities.Add(new Ability("Rest and Heal", AbilityEffect.RESTHEAL, 0, 0));
     //status.addStatus(new Status("Fly", 1, 2000, ConsoleForeground.Cyan, ConsoleBackground.Black));
 }
Beispiel #2
0
 public static void drawClass(Class s)
 {
     Console.WriteLine(s.name + " (" + s.abbrv + ")");
 }
        public static void showMainMenu()
        {
            Boolean hasSelectedSpecies = false;
            Boolean hasSelectedClass = false;

            //Draw the species list
            while (!hasSelectedSpecies)
            {
                string bufferClear = "";
                for (int x = 0; x < 69; x++)
                {
                    bufferClear += " ";
                }
                ConsoleEx.DrawRectangle(BorderStyle.Text, 0, 0, 70, Species.speciesList.Length + 3, false);
                Util.writeLn("Select a species", 2, 0);
                Species.drawAllSpecies();
                Util.writeLn(bufferClear, 1, Species.speciesList.Length + 2);
                Util.writeLn(Species.speciesList[selectedSpecies].lore, 1, Species.speciesList.Length + 2);
                ConsoleKeyInfo keyInfo = Console.ReadKey();
                if (keyInfo.Key == ConsoleKey.DownArrow)
                {
                    selectedSpecies++;
                    if (selectedSpecies > Species.speciesList.Length - 1)
                    {
                        selectedSpecies = 0;
                    }
                }
                if (keyInfo.Key == ConsoleKey.UpArrow)
                {
                    selectedSpecies--;
                    if (selectedSpecies < 0)
                    {
                        selectedSpecies = Species.speciesList.Length - 1;
                    }
                }
                if (keyInfo.Key == ConsoleKey.Enter)
                {
                    currSpecies = Species.speciesList[selectedSpecies];
                    hasSelectedSpecies = true;
                }
            }
            Console.Clear();
            selectedSpecies = 0;
            while (!hasSelectedClass)
            {
                ConsoleEx.TextColor(ConsoleForeground.DarkGray, ConsoleBackground.Black);
                ConsoleEx.DrawRectangle(BorderStyle.Text, 0, Class.classList.Length + 2, 70, Species.speciesList.Length + 3, false);
                Util.writeLn("Select a species", Class.classList.Length + 4, 0);
                Species.drawAllSpecies(Class.classList.Length + 2);
                Util.writeLn(currSpecies.lore, 1, Species.speciesList.Length + 2 + Class.classList.Length + 2);

                ConsoleEx.TextColor(ConsoleForeground.LightGray, ConsoleBackground.Black);
                ConsoleEx.DrawRectangle(BorderStyle.Text, 0, 0, 70, Class.classList.Length + 1, false);
                Util.writeLn("Select a class--Species: " + currSpecies.abbrv, 2, 0);
                Class.drawAllClasses();
                ConsoleKeyInfo keyInfo = Console.ReadKey();
                if (keyInfo.Key == ConsoleKey.DownArrow)
                {
                    selectedSpecies++;
                    if (selectedSpecies > Species.speciesList.Length - 1)
                    {
                        selectedSpecies = 0;
                    }
                }
                if (keyInfo.Key == ConsoleKey.UpArrow)
                {
                    selectedSpecies--;
                    if (selectedSpecies < 0)
                    {
                        selectedSpecies = Species.speciesList.Length - 1;
                    }
                }
                if (keyInfo.Key == ConsoleKey.Enter)
                {
                    currClass = Class.classList[selectedSpecies];
                    hasSelectedClass = true;
                }
            }
            Console.Clear();
            Console.WriteLine("What is your name?");
            player = new Player(Console.ReadLine(), currSpecies, currClass);
            //Console.WriteLine("You are a " + player.identifier);
            Console.WriteLine();
            player.WriteStats();
            player.stats.calcStats();
            Console.ReadLine();
            world.genMap();
            levelMap.Add(Program.area + ":" + Program.floor, world);
            startGame();
        }