예제 #1
0
        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));
        }
예제 #2
0
        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));
        }