Example #1
0
        public void PrintPlayerStats(PlayerCharacter player)
        {
            PlayerAttackCalculator.CalculatePlayerAttack(player);
            Console.WriteLine($"NAME:...............{player.Name}");
            Console.WriteLine($"GENDER:.............{player.Gender}");
            Console.WriteLine($"RACE:...............{player.Race}");
            Console.WriteLine($"JOB:................{player.Job}");
            Console.WriteLine("");

            Console.WriteLine($"CREDITS:............{player.Credits}");
            Console.WriteLine($"EXPERIENCE:.........{player.Experience}");
            Console.WriteLine($"LEVEL:..............{player.Level}");
            Console.WriteLine("");

            Console.WriteLine($"CURRENT HIT POINTS..{player.CurrentHitPoints}");
            Console.WriteLine($"TOTAL HIT POINTS....{player.TotalHitPoints}");
            Console.WriteLine("");

            Console.WriteLine($"ATTACK:.............{player.Attack}");
            Console.WriteLine($"WEAPON SKILL:.......{player.WeaponSkill}");
            Console.WriteLine($"WEAPON DAMAGE.......{player.CurrentWeaponDamage}");
            Console.WriteLine("");

            Console.WriteLine($"ARMOR SKILL:........{player.ArmorSkill}");
            Console.WriteLine($"NAVIGATION SKILL:...{player.NavigationSkill}");
            Console.WriteLine($"TIME SKILL:.........{player.TimeSkill}");
        }
Example #2
0
        public void ChooseWeaponToAttackWith(Character attacker, Character player, Inventory playerInventory)
        {
            if (attacker == player)
            {
                Console.WriteLine("Choose which weapon to attack with (enter the number) ");
                playerInventory.EunumerateWeapons();
                var TempChosenWeaponToAttackWith = Console.ReadLine();

                // Need to check if the input is an int or else it throws exeption when I type wrong.


                int ChosenWeaponToAttackWith = Convert.ToInt32(TempChosenWeaponToAttackWith);

                player.CurrentWeaponDamage = playerInventory.WeaponList[ChosenWeaponToAttackWith].Attack;

                PlayerAttackCalculator.CalculatePlayerAttack((PlayerCharacter)player);

                playerInventory.WeaponList[ChosenWeaponToAttackWith].Durability -= 1;
            }
        }