mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-05-21 13:07:52 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
BIN
assets/cn/combat_ui/PAUSE_GildedReverie.png
Normal file
BIN
assets/cn/combat_ui/PAUSE_GildedReverie.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/cn/combat_ui/QUIT_GildedReverie.png
Normal file
BIN
assets/cn/combat_ui/QUIT_GildedReverie.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 746 B |
@@ -6,7 +6,7 @@ from module.logger import logger
|
||||
MAP = CampaignMap('A1')
|
||||
MAP.shape = 'I8'
|
||||
MAP.camera_data = ['D2', 'D6', 'F2', 'F6']
|
||||
MAP.camera_data_spawn_point = ['F2', 'D2']
|
||||
MAP.camera_data_spawn_point = ['D2']
|
||||
MAP.map_data = """
|
||||
-- -- -- SP -- SP -- -- --
|
||||
-- ME ++ -- -- -- -- ME --
|
||||
@@ -63,6 +63,7 @@ class Config:
|
||||
# ===== End of generated config =====
|
||||
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
HOMO_EDGE_HOUGHLINES_THRESHOLD = 210
|
||||
MAP_SWIPE_MULTIPLY = (1.238, 1.261)
|
||||
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.197, 1.219)
|
||||
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.162, 1.183)
|
||||
|
||||
@@ -6,14 +6,17 @@ from .a1 import Config as ConfigBase
|
||||
|
||||
MAP = CampaignMap('A3')
|
||||
MAP.shape = 'H9'
|
||||
MAP.camera_data = ['D2', 'D6', 'D7', 'E2', 'E6', 'E7']
|
||||
MAP.camera_data_spawn_point = ['D2', 'D6']
|
||||
MAP.camera_data = ['E3', 'E5', 'E7']
|
||||
MAP.camera_data_spawn_point = ['D6']
|
||||
# Big pillar at G5 covering G1:H4
|
||||
# Smoke covering fleet ammo icon and current fleet indicator if fleet is at F4
|
||||
# mark covering grids as land, since we won't go there anyway
|
||||
MAP.map_data = """
|
||||
-- -- ++ -- -- ME -- --
|
||||
-- -- ++ Me Me -- -- --
|
||||
++ ++ ++ -- -- ME -- --
|
||||
SP -- -- MS -- -- -- --
|
||||
-- -- MS -- __ Me ++ --
|
||||
-- -- ++ -- -- ME ++ ++
|
||||
-- -- ++ Me Me -- ++ ++
|
||||
++ ++ ++ -- -- ME ++ ++
|
||||
SP -- -- MS -- ++ ++ ++
|
||||
-- -- MS -- __ Me ++ ++
|
||||
SP -- -- MS -- -- MB --
|
||||
++ ++ ++ -- -- -- -- ME
|
||||
-- -- ++ -- Me -- ME --
|
||||
|
||||
@@ -61,6 +61,7 @@ class Config:
|
||||
# ===== End of generated config =====
|
||||
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
HOMO_EDGE_HOUGHLINES_THRESHOLD = 210
|
||||
MAP_SWIPE_MULTIPLY = (1.132, 1.154)
|
||||
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.095, 1.115)
|
||||
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.063, 1.082)
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
from module.base.utils import location2node
|
||||
from module.campaign.campaign_base import CampaignBase
|
||||
from module.map.map_base import CampaignMap
|
||||
from module.map.map_base import CampaignMap, location_ensure
|
||||
from module.map.map_grids import SelectedGrids, RoadGrids
|
||||
from module.logger import logger
|
||||
from .b1 import Config as ConfigBase
|
||||
from .d3 import GridCurrentFleet
|
||||
|
||||
MAP = CampaignMap('B3')
|
||||
MAP.shape = 'I9'
|
||||
MAP.camera_data = ['D3', 'D7', 'F3', 'F7']
|
||||
MAP.camera_data_spawn_point = ['F7', 'D7']
|
||||
MAP.camera_data = ['D3', 'D5', 'D7', 'F3', 'F5', 'F7']
|
||||
MAP.camera_data_spawn_point = ['D7']
|
||||
# Big pillar at E4 covering D1:F2
|
||||
# mark covering grids as land, since we won't go there anyway
|
||||
MAP.map_data = """
|
||||
++ ++ ++ -- -- -- ++ ++ ++
|
||||
-- -- ME -- -- -- ME -- --
|
||||
-- ME -- ME -- ME -- ME --
|
||||
++ ++ ++ ++ ++ ++ ++ ++ ++
|
||||
-- -- ME ++ ++ ++ ME -- --
|
||||
-- ME -- ME ++ ME -- ME --
|
||||
-- ++ -- -- ++ -- -- ++ --
|
||||
ME ++ Me -- -- -- Me ++ ME
|
||||
-- Me -- -- MB -- -- Me --
|
||||
@@ -71,6 +75,15 @@ class Config(ConfigBase):
|
||||
class Campaign(CampaignBase):
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
grid_class = GridCurrentFleet
|
||||
|
||||
def in_sight(self, location, sight=None):
|
||||
# Focus E3 when insight E3, to avoid ammo icon covered by pillar
|
||||
location = location_ensure(location)
|
||||
node = location2node(location)
|
||||
if node == 'E3':
|
||||
return self.focus_to('E3')
|
||||
return super().in_sight(location, sight=sight)
|
||||
|
||||
def battle_0(self):
|
||||
if self.clear_siren():
|
||||
|
||||
@@ -6,7 +6,7 @@ from module.logger import logger
|
||||
MAP = CampaignMap('C1')
|
||||
MAP.shape = 'I8'
|
||||
MAP.camera_data = ['D2', 'D6', 'F2', 'F6']
|
||||
MAP.camera_data_spawn_point = ['F2', 'D2']
|
||||
MAP.camera_data_spawn_point = ['D2']
|
||||
MAP.map_data = """
|
||||
-- -- -- SP -- SP -- -- --
|
||||
-- ME ++ -- -- -- -- ME --
|
||||
@@ -63,6 +63,7 @@ class Config:
|
||||
# ===== End of generated config =====
|
||||
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
HOMO_EDGE_HOUGHLINES_THRESHOLD = 210
|
||||
MAP_SWIPE_MULTIPLY = (1.238, 1.261)
|
||||
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.197, 1.219)
|
||||
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.162, 1.183)
|
||||
|
||||
@@ -6,14 +6,17 @@ from .c1 import Config as ConfigBase
|
||||
|
||||
MAP = CampaignMap('C3')
|
||||
MAP.shape = 'H9'
|
||||
MAP.camera_data = ['D2', 'D6', 'D7', 'E2', 'E6', 'E7']
|
||||
MAP.camera_data_spawn_point = ['D2', 'D6']
|
||||
MAP.camera_data = ['E3', 'E5', 'E7']
|
||||
MAP.camera_data_spawn_point = ['D6']
|
||||
# Big pillar at G5 covering G1:H4
|
||||
# Smoke covering fleet ammo icon and current fleet indicator if fleet is at F4
|
||||
# mark covering grids as land, since we won't go there anyway
|
||||
MAP.map_data = """
|
||||
-- -- ++ -- -- ME -- --
|
||||
-- -- ++ Me Me -- -- --
|
||||
++ ++ ++ -- -- ME -- --
|
||||
SP -- -- MS -- -- -- --
|
||||
-- -- MS -- __ Me ++ --
|
||||
-- -- ++ -- -- ME ++ ++
|
||||
-- -- ++ Me Me -- ++ ++
|
||||
++ ++ ++ -- -- ME ++ ++
|
||||
SP -- -- MS -- ++ ++ ++
|
||||
-- -- MS -- __ Me ++ ++
|
||||
SP -- -- MS -- -- MB --
|
||||
++ ++ ++ -- -- -- -- ME
|
||||
-- -- ++ -- Me -- ME --
|
||||
|
||||
@@ -61,6 +61,7 @@ class Config:
|
||||
# ===== End of generated config =====
|
||||
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
HOMO_EDGE_HOUGHLINES_THRESHOLD = 210
|
||||
MAP_SWIPE_MULTIPLY = (1.132, 1.154)
|
||||
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.095, 1.115)
|
||||
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.063, 1.082)
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
from module.base.utils import color_similarity_2d, location2node
|
||||
from module.campaign.campaign_base import CampaignBase
|
||||
from module.map.map_base import CampaignMap
|
||||
from module.map.map_base import CampaignMap, location_ensure
|
||||
from module.map.map_grids import SelectedGrids, RoadGrids
|
||||
from module.logger import logger
|
||||
from module.map_detection.grid import Grid
|
||||
from module.template.assets import TEMPLATE_FLEET_CURRENT
|
||||
from .d1 import Config as ConfigBase
|
||||
|
||||
MAP = CampaignMap('D3')
|
||||
MAP.shape = 'I9'
|
||||
MAP.camera_data = ['D3', 'D7', 'F3', 'F7']
|
||||
MAP.camera_data_spawn_point = ['F7', 'D7']
|
||||
MAP.camera_data = ['D3', 'D5', 'D7', 'F3', 'F5', 'F7']
|
||||
MAP.camera_data_spawn_point = ['D7']
|
||||
# Big pillar at E4 covering D1:F2
|
||||
# mark covering grids as land, since we won't go there anyway
|
||||
MAP.map_data = """
|
||||
++ ++ ++ -- -- -- ++ ++ ++
|
||||
-- -- ME -- -- -- ME -- --
|
||||
-- ME -- ME -- ME -- ME --
|
||||
++ ++ ++ ++ ++ ++ ++ ++ ++
|
||||
-- -- ME ++ ++ ++ ME -- --
|
||||
-- ME -- ME ++ ME -- ME --
|
||||
-- ++ -- -- ++ -- -- ++ --
|
||||
ME ++ Me -- -- -- Me ++ ME
|
||||
-- Me -- -- MB -- -- Me --
|
||||
@@ -69,9 +74,33 @@ class Config(ConfigBase):
|
||||
# ===== End of generated config =====
|
||||
|
||||
|
||||
class GridCurrentFleet(Grid):
|
||||
def predict_current_fleet(self):
|
||||
# lower count threshold for D3
|
||||
count = self.relative_hsv_count(area=(-0.5, -3.5, 0.5, -2.5), h=(141 - 3, 141 + 10), shape=(50, 50))
|
||||
if count < 150:
|
||||
return False
|
||||
|
||||
image = self.relative_crop((-0.5, -3.5, 0.5, -2.5), shape=(60, 60))
|
||||
image = color_similarity_2d(image, color=(24, 255, 107))
|
||||
if not TEMPLATE_FLEET_CURRENT.match(image):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
MAP = MAP
|
||||
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'
|
||||
grid_class = GridCurrentFleet
|
||||
|
||||
def in_sight(self, location, sight=None):
|
||||
# Focus E3 when insight E3, to avoid ammo icon covered by pillar
|
||||
location = location_ensure(location)
|
||||
node = location2node(location)
|
||||
if node == 'E3':
|
||||
return self.focus_to('E3')
|
||||
return super().in_sight(location, sight=sight)
|
||||
|
||||
def battle_0(self):
|
||||
if self.clear_siren():
|
||||
|
||||
@@ -7,11 +7,12 @@ MAP = CampaignMap('SP')
|
||||
MAP.shape = 'I10'
|
||||
MAP.camera_data = ['D6', 'D8']
|
||||
MAP.camera_data_spawn_point = ['D6']
|
||||
# Big pillar at E4, block D4 F4 to block the upper part of map
|
||||
MAP.map_data = """
|
||||
-- -- -- ++ ++ ++ -- -- --
|
||||
-- ++ -- -- -- -- -- ++ --
|
||||
-- -- -- -- -- -- -- -- --
|
||||
++ ++ ++ -- ++ -- ++ ++ ++
|
||||
++ ++ ++ ++ ++ ++ ++ ++ ++
|
||||
-- -- ME SP -- SP ME -- --
|
||||
-- -- -- -- __ -- -- -- --
|
||||
-- -- ME -- MS -- ME -- --
|
||||
@@ -76,6 +77,9 @@ class Config:
|
||||
|
||||
MAP_IS_ONE_TIME_STAGE = True
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
HOMO_STORAGE = ((8, 6), [(137.405, 104.804), (1046.044, 104.804), (-12.171, 652.093), (1166.717, 652.093)])
|
||||
HOMO_EDGE_HOUGHLINES_THRESHOLD = 210
|
||||
MAP_ENSURE_EDGE_INSIGHT_CORNER = 'bottom'
|
||||
MAP_SWIPE_MULTIPLY = (1.071, 1.091)
|
||||
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.036, 1.055)
|
||||
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.006, 1.024)
|
||||
|
||||
@@ -130,6 +130,8 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
return PAUSE_SpringInn
|
||||
if PAUSE_ElvenVine.match_template_color(self.device.image, offset=(10, 10)):
|
||||
return PAUSE_ElvenVine
|
||||
if PAUSE_GildedReverie.match_template_color(self.device.image, offset=(10, 10)):
|
||||
return PAUSE_GildedReverie
|
||||
return False
|
||||
|
||||
def handle_combat_quit(self, offset=(20, 20), interval=3):
|
||||
@@ -185,6 +187,10 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
self.device.click(QUIT_SpringInn)
|
||||
timer.reset()
|
||||
return True
|
||||
if QUIT_GildedReverie.match_luma(self.device.image, offset=offset):
|
||||
self.device.click(QUIT_GildedReverie)
|
||||
timer.reset()
|
||||
return True
|
||||
return False
|
||||
|
||||
def handle_combat_quit_reconfirm(self, interval=2):
|
||||
|
||||
@@ -11,6 +11,7 @@ PAUSE_Cyber = Button(area={'cn': (1231, 32, 1253, 59), 'en': (1231, 32, 1253, 59
|
||||
PAUSE_DOUBLE_CHECK = Button(area={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, color={'cn': (96, 104, 136), 'en': (83, 98, 118), 'jp': (97, 102, 120), 'tw': (96, 104, 136)}, button={'cn': (1226, 35, 1231, 60), 'en': (1226, 35, 1231, 61), 'jp': (1226, 35, 1230, 60), 'tw': (1226, 35, 1231, 60)}, file={'cn': './assets/cn/combat_ui/PAUSE_DOUBLE_CHECK.png', 'en': './assets/en/combat_ui/PAUSE_DOUBLE_CHECK.png', 'jp': './assets/jp/combat_ui/PAUSE_DOUBLE_CHECK.png', 'tw': './assets/tw/combat_ui/PAUSE_DOUBLE_CHECK.png'})
|
||||
PAUSE_Devil = Button(area={'cn': (1233, 35, 1250, 57), 'en': (1233, 35, 1250, 57), 'jp': (1233, 35, 1250, 57), 'tw': (1233, 35, 1250, 57)}, color={'cn': (193, 98, 108), 'en': (193, 98, 108), 'jp': (193, 98, 108), 'tw': (193, 98, 108)}, button={'cn': (1233, 35, 1250, 57), 'en': (1233, 35, 1250, 57), 'jp': (1233, 35, 1250, 57), 'tw': (1233, 35, 1250, 57)}, file={'cn': './assets/cn/combat_ui/PAUSE_Devil.png', 'en': './assets/cn/combat_ui/PAUSE_Devil.png', 'jp': './assets/cn/combat_ui/PAUSE_Devil.png', 'tw': './assets/cn/combat_ui/PAUSE_Devil.png'})
|
||||
PAUSE_ElvenVine = Button(area={'cn': (1229, 32, 1253, 55), 'en': (1229, 32, 1253, 55), 'jp': (1229, 32, 1253, 55), 'tw': (1229, 32, 1253, 55)}, color={'cn': (152, 189, 166), 'en': (152, 189, 166), 'jp': (152, 189, 166), 'tw': (152, 189, 166)}, button={'cn': (1229, 32, 1253, 55), 'en': (1229, 32, 1253, 55), 'jp': (1229, 32, 1253, 55), 'tw': (1229, 32, 1253, 55)}, file={'cn': './assets/cn/combat_ui/PAUSE_ElvenVine.png', 'en': './assets/cn/combat_ui/PAUSE_ElvenVine.png', 'jp': './assets/cn/combat_ui/PAUSE_ElvenVine.png', 'tw': './assets/cn/combat_ui/PAUSE_ElvenVine.png'})
|
||||
PAUSE_GildedReverie = Button(area={'cn': (1225, 34, 1245, 50), 'en': (1225, 34, 1245, 50), 'jp': (1225, 34, 1245, 50), 'tw': (1225, 34, 1245, 50)}, color={'cn': (166, 154, 127), 'en': (166, 154, 127), 'jp': (166, 154, 127), 'tw': (166, 154, 127)}, button={'cn': (1225, 34, 1245, 50), 'en': (1225, 34, 1245, 50), 'jp': (1225, 34, 1245, 50), 'tw': (1225, 34, 1245, 50)}, file={'cn': './assets/cn/combat_ui/PAUSE_GildedReverie.png', 'en': './assets/cn/combat_ui/PAUSE_GildedReverie.png', 'jp': './assets/cn/combat_ui/PAUSE_GildedReverie.png', 'tw': './assets/cn/combat_ui/PAUSE_GildedReverie.png'})
|
||||
PAUSE_HolyLight = Button(area={'cn': (1233, 35, 1250, 57), 'en': (1233, 35, 1250, 57), 'jp': (1233, 35, 1250, 57), 'tw': (1233, 35, 1250, 57)}, color={'cn': (54, 40, 27), 'en': (54, 40, 27), 'jp': (54, 40, 27), 'tw': (54, 40, 27)}, button={'cn': (1233, 35, 1250, 57), 'en': (1233, 35, 1250, 57), 'jp': (1233, 35, 1250, 57), 'tw': (1233, 35, 1250, 57)}, file={'cn': './assets/cn/combat_ui/PAUSE_HolyLight.png', 'en': './assets/cn/combat_ui/PAUSE_HolyLight.png', 'jp': './assets/cn/combat_ui/PAUSE_HolyLight.png', 'tw': './assets/cn/combat_ui/PAUSE_HolyLight.png'})
|
||||
PAUSE_Iridescent_Fantasy = Button(area={'cn': (1232, 33, 1252, 57), 'en': (1232, 33, 1252, 57), 'jp': (1232, 33, 1252, 57), 'tw': (1232, 33, 1252, 57)}, color={'cn': (124, 139, 190), 'en': (124, 139, 190), 'jp': (124, 139, 190), 'tw': (124, 139, 190)}, button={'cn': (1232, 33, 1252, 57), 'en': (1232, 33, 1252, 57), 'jp': (1232, 33, 1252, 57), 'tw': (1232, 33, 1252, 57)}, file={'cn': './assets/cn/combat_ui/PAUSE_Iridescent_Fantasy.png', 'en': './assets/en/combat_ui/PAUSE_Iridescent_Fantasy.png', 'jp': './assets/jp/combat_ui/PAUSE_Iridescent_Fantasy.png', 'tw': './assets/tw/combat_ui/PAUSE_Iridescent_Fantasy.png'})
|
||||
PAUSE_MaidCafe = Button(area={'cn': (1230, 35, 1248, 54), 'en': (1230, 35, 1248, 54), 'jp': (1230, 35, 1248, 54), 'tw': (1230, 35, 1248, 54)}, color={'cn': (159, 145, 139), 'en': (159, 145, 139), 'jp': (159, 145, 139), 'tw': (159, 145, 139)}, button={'cn': (1230, 35, 1248, 54), 'en': (1230, 35, 1248, 54), 'jp': (1230, 35, 1248, 54), 'tw': (1230, 35, 1248, 54)}, file={'cn': './assets/cn/combat_ui/PAUSE_MaidCafe.png', 'en': './assets/cn/combat_ui/PAUSE_MaidCafe.png', 'jp': './assets/cn/combat_ui/PAUSE_MaidCafe.png', 'tw': './assets/cn/combat_ui/PAUSE_MaidCafe.png'})
|
||||
@@ -26,6 +27,7 @@ PAUSE_Star = Button(area={'cn': (1234, 36, 1250, 57), 'en': (1234, 36, 1250, 57)
|
||||
QUIT = Button(area={'cn': (420, 490, 593, 548), 'en': (473, 508, 567, 532), 'jp': (433, 490, 606, 547), 'tw': (433, 490, 606, 547)}, color={'cn': (199, 122, 114), 'en': (216, 168, 164), 'jp': (196, 120, 113), 'tw': (200, 126, 118)}, button={'cn': (420, 490, 593, 548), 'en': (473, 508, 567, 532), 'jp': (433, 490, 606, 547), 'tw': (433, 490, 606, 547)}, file={'cn': './assets/cn/combat_ui/QUIT.png', 'en': './assets/en/combat_ui/QUIT.png', 'jp': './assets/jp/combat_ui/QUIT.png', 'tw': './assets/tw/combat_ui/QUIT.png'})
|
||||
QUIT_Christmas = Button(area={'cn': (400, 506, 477, 525), 'en': (410, 507, 469, 524), 'jp': (400, 506, 477, 525), 'tw': (400, 506, 477, 525)}, color={'cn': (195, 139, 166), 'en': (207, 166, 185), 'jp': (195, 139, 166), 'tw': (195, 139, 166)}, button={'cn': (400, 506, 477, 525), 'en': (410, 507, 469, 524), 'jp': (400, 506, 477, 525), 'tw': (400, 506, 477, 525)}, file={'cn': './assets/cn/combat_ui/QUIT_Christmas.png', 'en': './assets/en/combat_ui/QUIT_Christmas.png', 'jp': './assets/cn/combat_ui/QUIT_Christmas.png', 'tw': './assets/cn/combat_ui/QUIT_Christmas.png'})
|
||||
QUIT_Cyber = Button(area={'cn': (393, 506, 470, 524), 'en': (393, 506, 470, 524), 'jp': (393, 506, 470, 524), 'tw': (393, 506, 470, 524)}, color={'cn': (255, 198, 190), 'en': (255, 198, 190), 'jp': (255, 198, 190), 'tw': (255, 198, 190)}, button={'cn': (393, 506, 470, 524), 'en': (393, 506, 470, 524), 'jp': (393, 506, 470, 524), 'tw': (393, 506, 470, 524)}, file={'cn': './assets/cn/combat_ui/QUIT_Cyber.png', 'en': './assets/cn/combat_ui/QUIT_Cyber.png', 'jp': './assets/cn/combat_ui/QUIT_Cyber.png', 'tw': './assets/tw/combat_ui/QUIT_Cyber.png'})
|
||||
QUIT_GildedReverie = Button(area={'cn': (422, 553, 500, 572), 'en': (422, 553, 500, 572), 'jp': (422, 553, 500, 572), 'tw': (422, 553, 500, 572)}, color={'cn': (122, 128, 167), 'en': (122, 128, 167), 'jp': (122, 128, 167), 'tw': (122, 128, 167)}, button={'cn': (422, 553, 500, 572), 'en': (422, 553, 500, 572), 'jp': (422, 553, 500, 572), 'tw': (422, 553, 500, 572)}, file={'cn': './assets/cn/combat_ui/QUIT_GildedReverie.png', 'en': './assets/cn/combat_ui/QUIT_GildedReverie.png', 'jp': './assets/cn/combat_ui/QUIT_GildedReverie.png', 'tw': './assets/cn/combat_ui/QUIT_GildedReverie.png'})
|
||||
QUIT_Iridescent_Fantasy = Button(area={'cn': (391, 522, 464, 540), 'en': (402, 507, 460, 523), 'jp': (391, 522, 464, 540), 'tw': (391, 522, 464, 540)}, color={'cn': (121, 73, 79), 'en': (255, 174, 164), 'jp': (108, 60, 70), 'tw': (121, 73, 79)}, button={'cn': (391, 522, 464, 540), 'en': (402, 507, 460, 523), 'jp': (391, 522, 464, 540), 'tw': (391, 522, 464, 540)}, file={'cn': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png', 'en': './assets/en/combat_ui/QUIT_Iridescent_Fantasy.png', 'jp': './assets/jp/combat_ui/QUIT_Iridescent_Fantasy.png', 'tw': './assets/cn/combat_ui/QUIT_Iridescent_Fantasy.png'})
|
||||
QUIT_MaidCafe = Button(area={'cn': (423, 549, 501, 568), 'en': (423, 549, 501, 568), 'jp': (423, 549, 501, 568), 'tw': (423, 549, 501, 568)}, color={'cn': (168, 142, 133), 'en': (168, 142, 133), 'jp': (168, 142, 133), 'tw': (168, 142, 133)}, button={'cn': (423, 549, 501, 568), 'en': (423, 549, 501, 568), 'jp': (423, 549, 501, 568), 'tw': (423, 549, 501, 568)}, file={'cn': './assets/cn/combat_ui/QUIT_MaidCafe.png', 'en': './assets/cn/combat_ui/QUIT_MaidCafe.png', 'jp': './assets/cn/combat_ui/QUIT_MaidCafe.png', 'tw': './assets/cn/combat_ui/QUIT_MaidCafe.png'})
|
||||
QUIT_New = Button(area={'cn': (394, 506, 467, 524), 'en': (404, 506, 463, 523), 'jp': (394, 506, 467, 524), 'tw': (393, 505, 471, 524)}, color={'cn': (255, 180, 171), 'en': (255, 195, 187), 'jp': (255, 180, 171), 'tw': (255, 200, 193)}, button={'cn': (394, 506, 467, 524), 'en': (404, 506, 463, 523), 'jp': (394, 506, 467, 524), 'tw': (393, 505, 471, 524)}, file={'cn': './assets/cn/combat_ui/QUIT_New.png', 'en': './assets/en/combat_ui/QUIT_New.png', 'jp': './assets/cn/combat_ui/QUIT_New.png', 'tw': './assets/tw/combat_ui/QUIT_New.png'})
|
||||
|
||||
@@ -79,6 +79,7 @@ class HpDaemon(ModuleBase):
|
||||
PAUSE_Ancient,
|
||||
PAUSE_SpringInn,
|
||||
PAUSE_ElvenVine,
|
||||
PAUSE_GildedReverie,
|
||||
]:
|
||||
self.attacker_hp = self._calculate_hp(image, area=ATTACKER_HP_AREA_New.area, reverse=True)
|
||||
self.defender_hp = self._calculate_hp(image, area=DEFENDER_HP_AREA_New.area, reverse=True)
|
||||
|
||||
@@ -342,6 +342,7 @@ class InfoHandler(ModuleBase):
|
||||
story_option_color = (247, 247, 247)
|
||||
|
||||
image = color_similarity_2d(self.image_crop(story_detect_area, copy=False), color=story_option_color)
|
||||
cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel=np.ones((5, 5), dtype=np.uint8), dst=image)
|
||||
line = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
|
||||
line[line < 200] = 0
|
||||
line[line >= 200] = 255
|
||||
|
||||
Reference in New Issue
Block a user