Example #1
0
        public void DmgArmorTypeCalc()
        {
            /* INFO
             *              Light	Medium	Heavy	Fort	Hero	Unarmored
             *      Normal	100%	150%	100%	70%		100%	100%
             *      Pierce	200%	75%		100%	35%		50%		150%
             *      Siege	100%	50%		100%	150%	50%		150%
             *      Magic	125%	75%		200%	35%		50%		100%
             *      Chaos	100%	100%	100%	100%	100%	100%
             *      Spells	100%	100%	100%	100%	70%		100%
             *      Hero	100%	100%	100%	50%		100%	100%
             */
            var first = DamageCalculator.GetDamageByArmorAndAttack(100, ArmorType.Heavy, TowerDamageType.Normal);

            Assert.Equal(100, first);
            var second = DamageCalculator.GetDamageByArmorAndAttack(100, ArmorType.Light, TowerDamageType.Pierce);

            Assert.Equal(200, second);
            var third = DamageCalculator.GetDamageByArmorAndAttack(100, ArmorType.Medium, TowerDamageType.Magic);

            Assert.Equal(75, third);
        }