Skip to content

Commit

Permalink
Merge pull request #3213 from Tharre/warlock_fixes
Browse files Browse the repository at this point in the history
core: only roll for hit if we can actually miss
  • Loading branch information
Tharre committed Jun 26, 2023
2 parents d2511a9 + 380ae35 commit f90abaf
Show file tree
Hide file tree
Showing 39 changed files with 6,035 additions and 6,035 deletions.
2 changes: 1 addition & 1 deletion sim/core/spell_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (spell *Spell) SpellChanceToMiss(attackTable *AttackTable) float64 {
return math.Max(0, attackTable.BaseSpellMissChance-spell.SpellHitChance(attackTable.Defender))
}
func (spell *Spell) MagicHitCheck(sim *Simulation, attackTable *AttackTable) bool {
return sim.RandomFloat("Magical Hit Roll") > spell.SpellChanceToMiss(attackTable)
return sim.Proc(1.0-spell.SpellChanceToMiss(attackTable), "Magical Hit Roll")
}

func (spell *Spell) spellCritRating(target *Unit) float64 {
Expand Down
Loading

0 comments on commit f90abaf

Please sign in to comment.