public int attack(IHero hero) { Random damageDealt = new Random(); int minDamageAfterArmor = minDamage * (100 - hero.ArmorWithEquipment()) / 100; int maxDamageAfterArmor = maxDamage * (100 - hero.ArmorWithEquipment()) / 100; return(damageDealt.Next(minDamageAfterArmor, maxDamageAfterArmor)); }
public int shieldbash(IHero hero) { Random damageDealt = new Random(); mana -= shieldbashAbility.mana; int shieldBashDamageAfterArmor = shieldbashAbility.damage * (100 - hero.ArmorWithEquipment()) / 100; return(damageDealt.Next(shieldBashDamageAfterArmor - 2, shieldBashDamageAfterArmor + 2)); }