|
@@ -51,10 +51,14 @@ class PanelOptimizer(wx.Panel):
|
|
|
Tho selctors to choose stats allowed in optimization.
|
|
Tho selctors to choose stats allowed in optimization.
|
|
|
setChoiceList : wx.Choice[3]
|
|
setChoiceList : wx.Choice[3]
|
|
|
List of selector to pik rune sets.
|
|
List of selector to pik rune sets.
|
|
|
|
|
+ optSetCheckListList : wx.CheckListBox
|
|
|
|
|
+ Selectors to choose optional rune sets.
|
|
|
levelChoice : wx.Choice
|
|
levelChoice : wx.Choice
|
|
|
Selector to pick the level for the rune optimization.
|
|
Selector to pick the level for the rune optimization.
|
|
|
inventoryCheck : wx.Checkbox
|
|
inventoryCheck : wx.Checkbox
|
|
|
- Checkbox to use only runes in the inventory
|
|
|
|
|
|
|
+ Checkbox to use only runes in the inventory.
|
|
|
|
|
+ brokenCheck : wx.Checkbox
|
|
|
|
|
+ Checkbox to enable broken sets.
|
|
|
teamCheckList : wx.CheckboxList :
|
|
teamCheckList : wx.CheckboxList :
|
|
|
List of selectable teams to exclude from the optimization.
|
|
List of selectable teams to exclude from the optimization.
|
|
|
progressGauge : wx.Gauge
|
|
progressGauge : wx.Gauge
|
|
@@ -479,26 +483,13 @@ class PanelOptimizer(wx.Panel):
|
|
|
|
|
|
|
|
optSetBox = wx.StaticBox(
|
|
optSetBox = wx.StaticBox(
|
|
|
self, label="Other Rune Sets:", id=wx.ID_ANY,
|
|
self, label="Other Rune Sets:", id=wx.ID_ANY,
|
|
|
- pos=(290, 300), size=(190, 190)
|
|
|
|
|
|
|
+ pos=(290, 300), size=(110, 190)
|
|
|
)
|
|
)
|
|
|
self.optionsSizer.Add(optSetBox)
|
|
self.optionsSizer.Add(optSetBox)
|
|
|
- self.optSetCheckListList = [
|
|
|
|
|
- wx.CheckListBox(
|
|
|
|
|
- parent=optSetBox, id=wx.ID_ANY, pos=(5, 5),
|
|
|
|
|
- size=(70, 160), choices=names[1:7]
|
|
|
|
|
- ),
|
|
|
|
|
- wx.CheckListBox(
|
|
|
|
|
- parent=optSetBox, id=wx.ID_ANY, pos=(75, 5),
|
|
|
|
|
- size=(70, 160), choices=names[8:14]
|
|
|
|
|
- ),
|
|
|
|
|
- wx.CheckListBox(
|
|
|
|
|
- parent=optSetBox, id=wx.ID_ANY, pos=(145, 5),
|
|
|
|
|
- size=(70, 160), choices=names[9:24]
|
|
|
|
|
- )
|
|
|
|
|
- ]
|
|
|
|
|
- for i in range(0, 3):
|
|
|
|
|
- self.optSetCheckListList[i].SetFont(smallFont)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ self.optSetCheckList = wx.CheckListBox(
|
|
|
|
|
+ parent=optSetBox, id=wx.ID_ANY, pos=(5, 5),
|
|
|
|
|
+ size=(100, 160), choices=names[1:]
|
|
|
|
|
+ )
|
|
|
# Team list
|
|
# Team list
|
|
|
teams = []
|
|
teams = []
|
|
|
cursor = conn.execute("""
|
|
cursor = conn.execute("""
|
|
@@ -512,16 +503,9 @@ class PanelOptimizer(wx.Panel):
|
|
|
teams.append(str(row[1]) + " (" + str(row[2]) + ")")
|
|
teams.append(str(row[1]) + " (" + str(row[2]) + ")")
|
|
|
teamsBox = wx.StaticBox(
|
|
teamsBox = wx.StaticBox(
|
|
|
parent=self, label="Exclude runes from units in teams",
|
|
parent=self, label="Exclude runes from units in teams",
|
|
|
- id=wx.ID_ANY, pos=(560, 300), size=(260, 170)
|
|
|
|
|
|
|
+ id=wx.ID_ANY, pos=(410, 300), size=(260, 170)
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
- # Inventory only option
|
|
|
|
|
self.optionsSizer.Add(teamsBox)
|
|
self.optionsSizer.Add(teamsBox)
|
|
|
- self.inventoryCheck = wx.CheckBox(
|
|
|
|
|
- parent=self, id=wx.ID_ANY, label="Only runes in storage",
|
|
|
|
|
- pos=(560, 470), size=(180, 20)
|
|
|
|
|
- )
|
|
|
|
|
- self.optionsSizer.Add(self.inventoryCheck)
|
|
|
|
|
self.teamCheckList = wx.CheckListBox(
|
|
self.teamCheckList = wx.CheckListBox(
|
|
|
parent=teamsBox, id=wx.ID_ANY,
|
|
parent=teamsBox, id=wx.ID_ANY,
|
|
|
pos=(5, 5), size=(250, 110), choices=teams
|
|
pos=(5, 5), size=(250, 110), choices=teams
|
|
@@ -537,6 +521,20 @@ class PanelOptimizer(wx.Panel):
|
|
|
self.Bind(wx.EVT_BUTTON, self.selectAllTeams, btAllTeams)
|
|
self.Bind(wx.EVT_BUTTON, self.selectAllTeams, btAllTeams)
|
|
|
self.Bind(wx.EVT_BUTTON, self.deselectAllTeams, btNoTeams)
|
|
self.Bind(wx.EVT_BUTTON, self.deselectAllTeams, btNoTeams)
|
|
|
|
|
|
|
|
|
|
+ # Broken sets option
|
|
|
|
|
+ self.brokenCheck = wx.CheckBox(
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, label="Allow broken sets",
|
|
|
|
|
+ pos=(400, 470), size=(180, 20)
|
|
|
|
|
+ )
|
|
|
|
|
+ self.optionsSizer.Add(self.brokenCheck)
|
|
|
|
|
+
|
|
|
|
|
+ # Inventory only option
|
|
|
|
|
+ self.inventoryCheck = wx.CheckBox(
|
|
|
|
|
+ parent=self, id=wx.ID_ANY, label="Only runes in storage",
|
|
|
|
|
+ pos=(560, 470), size=(180, 20)
|
|
|
|
|
+ )
|
|
|
|
|
+ self.optionsSizer.Add(self.inventoryCheck)
|
|
|
|
|
+
|
|
|
# Button to start
|
|
# Button to start
|
|
|
btOptimize = wx.Button(
|
|
btOptimize = wx.Button(
|
|
|
parent=self, id=wx.ID_ANY, pos=(600, 500),
|
|
parent=self, id=wx.ID_ANY, pos=(600, 500),
|
|
@@ -805,7 +803,8 @@ class PanelOptimizer(wx.Panel):
|
|
|
if (actualId > 11):
|
|
if (actualId > 11):
|
|
|
actualId -= 1
|
|
actualId -= 1
|
|
|
self.setChoiceList[i].SetSelection(actualId)
|
|
self.setChoiceList[i].SetSelection(actualId)
|
|
|
-
|
|
|
|
|
|
|
+ # Clear all optional sets
|
|
|
|
|
+ self.optSetCheckList.SetCheckedItems(())
|
|
|
|
|
|
|
|
|
|
|
|
|
self.optionsSizer.ShowItems(True)
|
|
self.optionsSizer.ShowItems(True)
|
|
@@ -883,6 +882,55 @@ class PanelOptimizer(wx.Panel):
|
|
|
if len(stats) > 0:
|
|
if len(stats) > 0:
|
|
|
stats = stats[:-1]
|
|
stats = stats[:-1]
|
|
|
# TODO: ELSE ERROR
|
|
# TODO: ELSE ERROR
|
|
|
|
|
+ # Optional sets
|
|
|
|
|
+ optSets = ""
|
|
|
|
|
+ for s in self.optSetCheckList.GetCheckedItems():
|
|
|
|
|
+ if s == 0:
|
|
|
|
|
+ optSets += "energy,"
|
|
|
|
|
+ elif s == 1:
|
|
|
|
|
+ optSets += "guard,"
|
|
|
|
|
+ elif s == 2:
|
|
|
|
|
+ optSets += "swift,"
|
|
|
|
|
+ elif s == 3:
|
|
|
|
|
+ optSets += "blade,"
|
|
|
|
|
+ elif s == 4:
|
|
|
|
|
+ optSets += "rage,"
|
|
|
|
|
+ elif s == 5:
|
|
|
|
|
+ optSets += "focus,"
|
|
|
|
|
+ elif s == 6:
|
|
|
|
|
+ optSets += "endure,"
|
|
|
|
|
+ elif s == 7:
|
|
|
|
|
+ optSets += "fatal,"
|
|
|
|
|
+ elif s == 8:
|
|
|
|
|
+ optSets += "despair,"
|
|
|
|
|
+ elif s == 9:
|
|
|
|
|
+ optSets += "vampire,"
|
|
|
|
|
+ elif s == 10:
|
|
|
|
|
+ optSets += "violent,"
|
|
|
|
|
+ elif s == 11:
|
|
|
|
|
+ optSets += "nemesis,"
|
|
|
|
|
+ elif s == 12:
|
|
|
|
|
+ optSets += "will,"
|
|
|
|
|
+ elif s == 13:
|
|
|
|
|
+ optSets += "shield,"
|
|
|
|
|
+ elif s == 14:
|
|
|
|
|
+ optSets += "revenge,"
|
|
|
|
|
+ elif s == 15:
|
|
|
|
|
+ optSets += "destroy,"
|
|
|
|
|
+ elif s == 16:
|
|
|
|
|
+ optSets += "fight,"
|
|
|
|
|
+ elif s == 17:
|
|
|
|
|
+ optSets += "determination,"
|
|
|
|
|
+ elif s == 18:
|
|
|
|
|
+ optSets += "enhance,"
|
|
|
|
|
+ elif s == 19:
|
|
|
|
|
+ optSets += "accuracy,"
|
|
|
|
|
+ elif s == 20:
|
|
|
|
|
+ optSets += "tolerance,"
|
|
|
|
|
+ if len(optSets) > 0:
|
|
|
|
|
+ optSets = optSets[:-1]
|
|
|
|
|
+ command += (" --opt-sets " + optSets)
|
|
|
|
|
+
|
|
|
command += (" --stats " + stats)
|
|
command += (" --stats " + stats)
|
|
|
command += (" --min-hp " + str(self.minStatSlidList[0].GetValue()))
|
|
command += (" --min-hp " + str(self.minStatSlidList[0].GetValue()))
|
|
|
command += (" --min-atk " + str(self.minStatSlidList[1].GetValue()))
|
|
command += (" --min-atk " + str(self.minStatSlidList[1].GetValue()))
|
|
@@ -897,6 +945,8 @@ class PanelOptimizer(wx.Panel):
|
|
|
|
|
|
|
|
if self.inventoryCheck.GetValue():
|
|
if self.inventoryCheck.GetValue():
|
|
|
command += " --storage"
|
|
command += " --storage"
|
|
|
|
|
+ if self.brokenCheck.GetValue():
|
|
|
|
|
+ command += " --broken"
|
|
|
if len(self.teamCheckList.GetCheckedItems()) > 0:
|
|
if len(self.teamCheckList.GetCheckedItems()) > 0:
|
|
|
command += " --no-teams "
|
|
command += " --no-teams "
|
|
|
for team in self.teamCheckList.GetCheckedItems():
|
|
for team in self.teamCheckList.GetCheckedItems():
|