Beispiel #1
0
 public void ChooseJob(int baseStats, string name) //precondition has to be one of these options, we must check the input before we pass the int into this method
 {
     StatRoll();
     if (baseStats == 1)
     {
         _strength += 2;
         _attackMod = _strength - 10;
         characters.Add(new Warrior(name, basePlayerHP + Dice.D8(), _strength, _dexterity, _intelligence, warriorArmor, Arsenal.GreatSword, weakenesMod, true, true, _attackMod));
         BattleDisplay.DisplayWarrior();
     }
     else if (baseStats == 2)
     {
         _dexterity += 2;
         _attackMod  = _dexterity - 10;
         characters.Add(new Rogue(name, basePlayerHP + Dice.D6(), _strength, _dexterity, _intelligence, rogueArmor, Arsenal.Dagger, weakenesMod, true, true, _attackMod));
         BattleDisplay.DisplayRogue();
     }
     else if (baseStats == 3)
     {
         _intelligence += 2;
         _attackMod     = _intelligence - 10;
         characters.Add(new Mage(name, basePlayerHP + Dice.D4(), _strength, _dexterity, _intelligence, mageArmor, Arsenal.Staff, weakenesMod, true, true, _attackMod));
         BattleDisplay.DisplayMage();
     }
 }
Beispiel #2
0
        public static void Fight(int ringCount)
        {
            characterList.RandomMonster();
            Console.WriteLine($"A {characterList.ReturnList()[1].Job} approaches for a fight!\n\nPress enter to start the fight!");
            Console.ReadLine();
            Console.Clear();
            BattleDisplay.UI(characterList.ReturnList());

            while (characterList.ReturnList()[0].IsAlive)
            {
                Console.Clear();

                BattleDisplay.UI(characterList.ReturnList());
                Console.WriteLine("Please Select your attack 1-2 \n1: Light Attack \n2: Heavy Attack");
                var attackSelection = ValidateInput(0, 2);
                BattleField.PlayerCombat(characterList.ReturnList(), attackSelection);
                Console.WriteLine("Press enter to continue");
                Console.ReadLine();
                Console.Clear();
                BattleDisplay.UI(characterList.ReturnList());

                if (characterList.ReturnList()[^ 1].IsAlive)