Permalink
Browse files

Fix EP calculation in light of updated spell hit function.

  • Loading branch information...
1 parent 7cbaca7 commit 35bf08da3b573b7592d7310bdaec60e39a7e021b @Aldriana committed Oct 17, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 shadowcraft/calcs/__init__.py
  2. +1 −1 tests/objects_tests/stats_tests.py
@@ -450,7 +450,7 @@ def dual_wield_hit_chance(self, dodgeable, parryable, weapon_type):
def spell_hit_chance(self):
hit_chance = 1 - max(self.base_spell_miss_rate - self.stats.get_spell_hit_from_rating() - self.get_spell_hit_from_talents() - self.race.get_racial_hit(), 0)
if self.calculating_ep in ('yellow_hit', 'spell_hit', 'spell_exp'):
- hit_chance -= self.stats.get_spell_hit_from_rating(1)
+ hit_chance -= self.stats.get_spell_hit_from_rating(1, 0)
return hit_chance
def buff_melee_crit(self):
@@ -30,7 +30,7 @@ def test_get_expertise_from_rating(self):
def test_get_spell_hit_from_rating(self):
self.assertAlmostEqual(self.stats.get_spell_hit_from_rating(), .01 * 1086 / 102.445999145507812)
- self.assertAlmostEqual(self.stats.get_spell_hit_from_rating(100), .01 * 100 / 102.445999145507812)
+ self.assertAlmostEqual(self.stats.get_spell_hit_from_rating(100, 0), .01 * 100 / 102.445999145507812)
def test_get_crit_from_rating(self):
self.assertAlmostEqual(self.stats.get_crit_from_rating(), .01 * 1517 / 179.279998779296875)

0 comments on commit 35bf08d

Please sign in to comment.