Support Greater Potion (#290)

This commit is contained in:
yhkinsar
2021-12-15 22:47:40 +08:00
committed by GitHub
parent 5b70c24c7b
commit 7b7815a021
6 changed files with 6 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -13,6 +13,8 @@ misc_rejuvenation_potion=0
misc_full_rejuvenation_potion=1
misc_super_healing_potion=1
misc_super_mana_potion=1
misc_greater_healing_potion=0
misc_greater_mana_potion=0
;other
misc_tp_scroll=0

View File

@@ -24,7 +24,9 @@ class BeltManager:
"misc_rejuvenation_potion": "rejuv",
"misc_full_rejuvenation_potion": "rejuv",
"misc_super_healing_potion": "health",
"misc_super_mana_potion": "mana"
"misc_greater_healing_potion": "health",
"misc_super_mana_potion": "mana",
"misc_greater_mana_potion": "mana"
}
def get_pot_needs(self):
@@ -160,7 +162,7 @@ class BeltManager:
pot_positions = []
for column, row in itertools.product(range(num_loot_columns), range(4)):
center_pos, slot_img = UiManager.get_slot_pos_and_img(self._config, img, column, row)
found = self._template_finder.search(["SUPER_HEALING_POTION", "SUPER_MANA_POTION", "FULL_REJUV_POTION", "REJUV_POTION"], slot_img, threshold=0.9).valid
found = self._template_finder.search(["GREATER_HEALING_POTION", "GREATER_MANA_POTION", "SUPER_HEALING_POTION", "SUPER_MANA_POTION", "FULL_REJUV_POTION", "REJUV_POTION"], slot_img, threshold=0.9).valid
if found:
pot_positions.append(center_pos)
keyboard.press("shift")