public void AttackTable_SumOf_AttackResults_Is_100Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var criticalStrikeChance = target.CalculateCriticalStrikeChance(character); var missChance = target.CalculateMissChange(character); var parryChance = target.CalculateParryChance(character, true); var dodgeChance = target.CalculateDodgeChance(character); var blockChance = target.CalculateBlockChance(character); var glancingChance = target.CalculateGlancingBlowChance(character); var attackTable = new WhiteAttackTable( missChance, dodgeChance, parryChance, glancingChance, CrushingBlow.Zero, blockChance, criticalStrikeChance); var random = new Random(); Console.Write(attackTable.ToString()); var totalChance = attackTable.Sum(r => r.Result.Value); Assert.AreEqual(100, totalChance); }
public void MissChance_AgainstBoss_ShouldBe_8Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var missChance = target.CalculateMissChange(character); Assert.AreEqual(8d, missChance.Value); }
public void DodgeChance_AgainstBoss_ShouldBe_6point5Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var dodgeChance = target.CalculateDodgeChance(character); Assert.AreEqual(6.50f, dodgeChance.Value); }
public void CritChance_AgainstBoss_ShouldBe_23Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var criticalStrikeChance = target.CalculateCriticalStrikeChance(character); Assert.AreEqual(14.8d, criticalStrikeChance.Value); }
public void ParryChance_Behind_Boss_ShouldBe_0() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var parryChance = target.CalculateParryChance(character, isBehindTarget: true); Assert.AreEqual(0, parryChance.Value); }
public void ParryChance_InFrontOf_Boss_ShouldBe_14Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var parryChance = target.CalculateParryChance(character, isBehindTarget: false); Assert.AreEqual(14.00f, parryChance.Value); }
public void GlancingBlow_AgainstBoss_ShouldBe_40Percent() { var character = OrcWarrior.Level60(); var target = Boss.Golemagg(); var glancingBlowChance = target.CalculateGlancingBlowChance(character); Assert.AreEqual(40.0d, glancingBlowChance.Value); Assert.AreEqual(35.0d, glancingBlowChance.DamageReduction); }
public void Level60_Orc_Warrior_ShouldHave_Correct_Attributes() { var warrior = OrcWarrior.Level60(); var attributes = warrior.Class.PrimaryAttributes; Assert.AreEqual(123, attributes.Strength.Value); Assert.AreEqual(77, attributes.Agility.Value); Assert.AreEqual(112, attributes.Stamina.Value); Assert.AreEqual(17, attributes.Intellect.Value); Assert.AreEqual(48, attributes.Spirit.Value); }
public void Character_Attributes_ShouldNotBe_NotNull() { var character = OrcWarrior.Level60(); Assert.NotNull(character.MainHandWeapon); }