Ejemplo n.º 1
0
 public void Identifiers(CharacterCreation charCreate)
 {
     GetName   = charCreate.GetName;
     GetGender = charCreate.GetGender;
     GetClass  = charCreate.GetClass;
     GetTrait  = charCreate.GetPersonalityTrait;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Credits  cred = new Credits();
            MainMenu menu = new MainMenu();
            Random   rand = new Random();
            string   userInput;

            userInput = Console.ReadLine();
            while (userInput != "10")
            {
                switch (userInput)
                {
                case "1":     //START GAME
                    CharacterCreation newChar     = new CharacterCreation();
                    MobDesign         mob         = new MobDesign();
                    PlayerStats       playerstats = new PlayerStats(newChar);
                    _ = new Inventory(newChar, playerstats);
                    Player    player    = new Player(newChar, playerstats);
                    TestDummy testdummy = new TestDummy();
                    MobStats  mobstats  = new MobStats(mob);
                    _ = new StartFight(player, playerstats, rand, testdummy, mobstats);

                    //to reduce clutter, when testing, exit
                    Console.WriteLine("END OF CASE 1, EXITING");
                    Environment.Exit(0);
                    break;

                case "2":     //LOAD GAME
                    Console.WriteLine("Option 2 Works\n");
                    break;

                case "3":     //OPTIONS
                    Console.WriteLine("Option 3 Works\n");
                    break;

                case "7":
                    _ = new Help();
                    break;

                case "8":
                    cred.PrintCredits();
                    break;

                case "9":
                    //Quit
                    Console.WriteLine("Ending Session...");
                    cred.PrintCredits();
                    _ = new Quit();

                    break;

                default:
                    Console.WriteLine("\nInvalid Option |" + userInput + "|" + "\n" + "Try again\n");
                    break;
                }
                menu.CallMenu();
                userInput = Console.ReadLine();
            }
        }
Ejemplo n.º 3
0
 //custom constructor
 public Player(CharacterCreation character, PlayerStats playerstats)
 {
     Identifiers(character);
     if (character.GetPersonalityTrait == "Hard-Headed")
     {
         playerstats.AddStrength(5, character);
     }
     Console.WriteLine(playerstats.ToString(character));
     Console.WriteLine("\nSTATS COMPLETED");
 }
Ejemplo n.º 4
0
 //override
 public string ToString(CharacterCreation mob)
 {
     return("\nHealth: " + GetHealth +
            "\nResource: " + GetResource + " " + mob.GetClass +
            "\nArmor: " + totalArmor +
            "\nStamina: " + totalStamina +
            "\nStrength: " + totalStrength +
            "\nIntelligence: " + totalIntelligence +
            "\nAttack Power: " + totalAttackPower +
            "\nCrit Chance: " + totalCritChance +
            "\nHit Chance: " + totalHitChance +
            "\nSpeed: " + totalSpeed +
            "\nBase Melee Damage  is: " + GetBaseMeleeDamage +
            "\nCalculated Melee Damage: " + meleeDamage);
 }
Ejemplo n.º 5
0
 public PlayerStats(CharacterCreation playerCharacter)
 {
     AddStamina(0);
     AddStrength(0, playerCharacter);
     AddAgility(0);
     AddIntelligence(0, playerCharacter);
     AddSpeed(0);
     RandomBaseMeleeDamage();
     InitializeMeleeDamage();
     AddCritChance(0);
     AddHitChance(0);
     AddDefense(0);
     TotalHealth();
     //Console.WriteLine(ToString());
 }
Ejemplo n.º 6
0
 public void AddIntelligence(int amountOfIntelligence, CharacterCreation playerCharacter)
 {
     totalIntelligence = amountOfIntelligence + totalIntelligence;
     if (playerCharacter.GetClass == "Warrior")
     {
         resource = 100;
     }
     if (playerCharacter.GetClass == "Rogue")
     {
         resource = 100;
     }
     if (playerCharacter.GetClass == "Mage")
     {
         resource = totalIntelligence * 15;
     }
 }
Ejemplo n.º 7
0
 public void AddStrength(int amountOfStrength, CharacterCreation playerClass)
 {
     if (playerClass.GetClass == "Rogue")
     {
         int addOneStrengthFromAgility = totalAgility / 2;
         totalStrength    = addOneStrengthFromAgility + totalStrength;
         totalStrength    = amountOfStrength + totalStrength;
         totalAttackPower = (totalStrength * 2) + totalAttackPower;
         meleeDamage      = (totalAttackPower / 4) + meleeDamage;
     }
     else
     {
         totalStrength    = amountOfStrength + totalStrength;
         totalAttackPower = (totalStrength * 2) + totalAttackPower;
         meleeDamage      = (totalAttackPower / 4) + meleeDamage;
     }
 }
Ejemplo n.º 8
0
        public Inventory(CharacterCreation character, PlayerStats playerstats)
        {
            /*List<Inventory> Armor = new List<Inventory>();
             * List<Inventory> Weapons = new List<Inventory>();
             * List<Inventory> Miscellaneous = new List<Inventory>();*/

            if (character.GetClass == "Warrior")
            {
                playerstats.AddStrength(5, character);
            }

            if (character.GetClass == "Rogue")
            {
                playerstats.AddAgility(5);
            }

            if (character.GetClass == "Mage")
            {
                playerstats.AddIntelligence(5, character);
            }
        }