示例#1
0
        public Combat()
        {
            Enemy enemy = new Enemy();

            Console.WriteLine("You are in a battle with a {0}!\n", enemy.Name);

            if (Player.DefaultHP > 0 || enemy.DefaultHP > 0)
            {
                Console.WriteLine ("What would you like to do?\n");
                Console.WriteLine ("\n");
                Console.WriteLine ("1. Attack\n");
                Console.WriteLine ("2. Use a potion\n");
                Console.WriteLine ("3. Run away");

                switch (Int32.Parse(Console.ReadLine()))
                {
                    case 1:
                    // Blah Blah Blahh

                    case 2:
                    // More stuff

                    case 3:
                    // Make this 50/50 chance I guess
                        break;
                }
            }

            else
            {
                // More stuff
            }
        }
示例#2
0
        public void DamageOutput(int nPDamD, int nAIDamD)
        {
            Weapon weapon = new Weapon();
            Enemy enemy = new Enemy();

            playerDamageDealt = nPDamD;
            playerDamageDealt = (weapon.weapDamage * weapon.weapSpeed * (Player.AttackLevel + Player.StrengthLevel)) / enemy.DefenseLevel;

            aiDamageDealt = nAIDamD;
            aiDamageDealt = (enemy.AttackLevel * enemy.StrengthLevel) / Player.DefenseLevel;

            playerDamageDealt = aiDamageTaken;
            aiDamageDealt = playerDamageTaken;
        }