Пример #1
0
        public override double randAttack()
        {
            int attackValue = Randomizer.Next(1, (int)maxDamage); // 1 to maxDamage

            sword.setDamage(attackValue);
            shield.setDamage(attackValue * 0.5);
            return(attackValue);
        }
Пример #2
0
 public override void hitBy(double damage)
 {
     // int randDamage = Randomizer.Next(0, maxDamage);
     shield.setDamage(damage);
     health -= damage;
 }