Ejemplo n.º 1
0
        public string AtacarEnano(Enano p1)
        {
            int damageReceived = 0;

            damageReceived = this.GetAttackValue() - p1.GetDeffValue();

            if (damageReceived > 0)
            {
                string log = string.Empty;
                p1.Health = p1.Health - damageReceived;
                log       = $"El jugador {p1.Name} recibe {damageReceived} puntos de daño";
                return(log);
            }
            else
            {
                string log = string.Empty;
                log = $"El jugador {p1.Name} no recibe daño.";
                return(log);
            }
        }