public void GetHitStep3() { var correction = 1; correction = HitHelper.GetHitStep3(correction); Assert.AreEqual(HitHelper.GetHitStep3CorrectionMin, correction); correction = 100; correction = HitHelper.GetHitStep3(correction); Assert.AreEqual(HitHelper.GetHitStep3CorrectionMax, correction); }
public void IsHit() { var attackerLevel = 1; var attackerHit = 100; var defenderLevel = 1; var defenderHit = 100; var chance = 100; var correction = HitHelper.GetHitStep1(attackerLevel, defenderLevel); correction += HitHelper.GetHitStep2(attackerHit, defenderHit); correction = HitHelper.GetHitStep3(correction); var hit = HitHelper.GetHitStep4(chance, correction); Assert.AreEqual(hit, HitHelper.IsHit(attackerLevel, attackerHit, defenderLevel, defenderHit, chance)); }