Beispiel #1
0
        static public void Battle(IPokemon pkmn1, IPokemon pkmn2, double random1, double random2)
        {
            Console.WriteLine(pkmn1.Name + " attacks " + pkmn2.Name);
            pkmn2.TakeDamage(pkmn1.DoDamage(80, false, random1, 1), false);
            Console.WriteLine();

            if (pkmn2.RemainingHP > 0)
            {
                Console.WriteLine(pkmn2.Name + " attacks " + pkmn1.Name);
                pkmn1.TakeDamage(pkmn2.DoDamage(80, true, random2, 1), true);
                Console.WriteLine();
            }
        }
Beispiel #2
0
        static public void Attack(IPokemon pkmn1, IPokemon pkmn2, double random1, double random2)
        {
            IMove move = pkmn1.Move1;

            Console.WriteLine(pkmn1.Species.Name + " uses " + move.Name + "!");

            pkmn2.TakeDamage(pkmn1.DoDamage(random1, 1, pkmn1.Level, move.GetBasePower()), false);
            Console.WriteLine();

            if (pkmn2.RemainingHP > 0)
            {
                move = pkmn2.Move1;
                Console.WriteLine(pkmn2.Species.Name + " uses " + move.Name + "!");
                pkmn1.TakeDamage(pkmn2.DoDamage(random2, 1, pkmn2.Level, move.GetBasePower()), true);
                Console.WriteLine();
            }
        }