Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix EP calculation in light of updated spell hit function.

  • Loading branch information...
commit 35bf08da3b573b7592d7310bdaec60e39a7e021b 1 parent 7cbaca7
Aldriana authored
2  shadowcraft/calcs/__init__.py
View
@@ -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):
2  tests/objects_tests/stats_tests.py
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.