Ejemplo n.º 1
0
        /// <summary>
        /// Called when this unit attacks another unit.
        /// </summary>
        /// <param name="board">The board to attack in</param>
        /// <param name="unit">The unit to attack</param>
        public void Charge(Tile[,] board, Unit unit)
        {
            int RealDamage = type.GetDamage();

            unit.Damage(board, RealDamage);

            int reflect = (int)(RealDamage * unit.type.GetReflect());

            Damage(board, reflect);

            Console.WriteLine(this + " charged " + unit + ", dealing " + RealDamage + " damage and receiving " + reflect + " reflect damage.");
        }