Bladeren bron

Bug fixes:
- [CLI] Fixed an error counting despair as a set of two.
- [GUI] Damage calculation in results panel.

Iñigo Valentin 4 jaren geleden
bovenliggende
commit
34ba60108f

+ 2 - 2
RuneOptimizerGUI/classes/PanelResults.py

@@ -607,8 +607,8 @@ class PanelResults(wx.Panel):
             crr = row[4]
             crd = row[5]
             dmg = math.ceil(
-              (atk * (100 - crr) / 100) +
-              ((atk + (atk * crd / 100)) * crr / 100)
+              (atk * (100 - crr) / 100) +            # Non-crit
+              (atk * (      crr  / 100) * crd / 100) # Crit
             )
             self.unitStats[9] = dmg
 

+ 1 - 1
RuneOptimizerGUI/classes/PanelUnits.py

@@ -677,7 +677,7 @@ class PanelUnits(wx.Panel):
         self.statGrid.SetCellValue(row=9, col=0, s=str(baseDmg))
         currentAtk = int(self.statGrid.GetCellValue(row=1, col=1))
         currentCrr = \
-          int(self.statGrid.GetCellValue(row=4, col=0).replace("%", ""))
+          int(self.statGrid.GetCellValue(row=4, col=1).replace("%", ""))
         currentCrd = \
           int(self.statGrid.GetCellValue(row=5, col=1).replace("%", ""))
         if (currentCrr > 100):

+ 2 - 2
src/RuneOptimizer/optimize/optimize_count_runes_for_sets.c

@@ -80,8 +80,8 @@ char optimize_count_runes_for_sets(
                 total_requested_runes += 4;
                 break;
             case DESPAIR:
-                requested_set_count->despair += 2;
-                total_requested_runes += 2;
+                requested_set_count->despair += 4;
+                total_requested_runes += 4;
                 break;
             case VAMPIRE:
                 requested_set_count->vampire += 4;