Add: [EN] New B2 battle logic thanks @justtesting

Add: [EN] New C1 battle logic
Add: [EN] New B3 battle logic
Add: [EN] New D3 battle logic
Add: [EN] New assets
This commit is contained in:
kyO The NinjA 2020-05-30 05:41:06 -03:00
parent 1cdd663935
commit c491fe7ec5
15 changed files with 161 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -24,8 +24,8 @@ A6, B6, C6, D6, E6, F6, G6, H6, \
= MAP.flatten() = MAP.flatten()
class Config: class Config:
SUBMARINE = 1 SUBMARINE = 0
FLEET_BOSS = 1 FLEET_BOSS = 0
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False

View File

@ -25,9 +25,18 @@ A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \ A7, B7, C7, D7, E7, F7, G7, H7, I7, \
= MAP.flatten() = MAP.flatten()
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 2},
{'battle': 1, 'enemy': 1},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1},
{'battle': 5, 'boss': 1},
]
class Config: class Config:
SUBMARINE = 1 SUBMARINE = 0
FLEET_BOSS = 1 FLEET_BOSS = 0
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
@ -56,3 +65,14 @@ class Config:
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_0(self):
if self.clear_siren():
return True
if self.clear_enemy(scale=(2, 3)):
return True
return self.battle_default()
def battle_5(self):
return self.clear_boss()

View File

@ -17,18 +17,71 @@ MAP.map_data = '''
SP -- -- -- ++ -- -- ME -- SP -- -- -- ++ -- -- ME --
SP -- MS -- -- ME -- -- -- SP -- MS -- -- ME -- -- --
''' '''
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
A9, B9, C9, D9, E9, F9, G9, H9, I9, \
= MAP.flatten()
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 2},
{'battle': 1, 'enemy': 1},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1},
{'battle': 5, 'boss': 1},
]
class Config: class Config:
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
MAP_HAS_FLEET_STEP = False MAP_HAS_FLEET_STEP = True
MAP_HAS_MOVABLE_ENEMY = False MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_SIREN = True MAP_HAS_SIREN = True
MAP_HAS_DYNAMIC_RED_BORDER = False
MAP_SIREN_COUNT = 2 MAP_SIREN_COUNT = 2
MAP_HAS_DYNAMIC_RED_BORDER = True
MAP_GRID_CENTER_TOLERANCE = 0.3
MAP_SIREN_TEMPLATE = ['1', '2', '3', 'DD']
INTERNAL_LINES_HOUGHLINES_THRESHOLD = 50
MID_DIFF_RANGE_H = (45, 70)
MID_DIFF_RANGE_V = (97 - 3, 97 + 3)
TRUST_EDGE_LINES = True
VANISH_POINT_RANGE = ((540, 740), (-4000, -2000))
DISTANCE_POINT_X_RANGE = ((-2000, -1000),)
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 40),
'width': (0.9, 10),
'prominence': 10,
'distance': 35,
'wlen': 100,
}
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 40, 255),
'prominence': 10,
'distance': 50,
'wlen': 1000
}
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_0(self):
if self.clear_siren():
return True
if self.clear_enemy(scale=(2, 3)):
return True
return self.battle_default()
def battle_5(self):
return self.clear_boss()

View File

@ -13,10 +13,22 @@ MAP.map_data = '''
-- ME -- -- ++ ME -- ME -- -- ME -- -- ++ ME -- ME --
SP -- -- ME ++ -- ME -- MB SP -- -- ME ++ -- ME -- MB
''' '''
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
= MAP.flatten()
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 2},
{'battle': 1, 'enemy': 1},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'boss': 1},
]
class Config: class Config:
SUBMARINE = 1
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
MAP_HAS_FLEET_STEP = True MAP_HAS_FLEET_STEP = True
@ -44,3 +56,14 @@ class Config:
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_0(self):
if self.clear_siren():
return True
if self.clear_enemy(scale=(2, 3)):
return True
return self.battle_default()
def battle_4(self):
return self.clear_boss()

View File

@ -36,8 +36,8 @@ class Config:
SUBMARINE = 0 SUBMARINE = 0
FLEET_BOSS = 0 FLEET_BOSS = 0
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
MAP_HAS_FLEET_STEP = False MAP_HAS_FLEET_STEP = True
MAP_HAS_MOVABLE_ENEMY = False MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_SIREN = True MAP_HAS_SIREN = True
MAP_HAS_DYNAMIC_RED_BORDER = False MAP_HAS_DYNAMIC_RED_BORDER = False
MAP_SIREN_COUNT = 3 MAP_SIREN_COUNT = 3

View File

@ -7,7 +7,7 @@ from module.logger import logger
MAP = CampaignMap('d3') MAP = CampaignMap('d3')
MAP.shape = 'I9' MAP.shape = 'I9'
MAP.map_data = ''' MAP.map_data = '''
SP -- ++ ++ -- MS -- ME -- SP -- ++ ++ -- -- -- ME --
-- ME ++ ++ -- ME -- -- -- -- ME ++ ++ -- ME -- -- --
-- -- -- -- -- -- ME ME -- -- -- -- -- -- -- ME ME --
ME -- ME ME -- ME ++ ++ ++ ME -- ME ME -- ME ++ ++ ++
@ -17,27 +17,51 @@ MAP.map_data = '''
SP -- -- -- ++ -- -- ME -- SP -- -- -- ++ -- -- ME --
SP -- MS -- -- ME -- -- -- SP -- MS -- -- ME -- -- --
''' '''
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
A9, B9, C9, D9, E9, F9, G9, H9, I9, \
= MAP.flatten()
MAP.spawn_data = [
{'battle': 0, 'enemy': 2, 'siren': 2},
{'battle': 1, 'enemy': 1},
{'battle': 2, 'enemy': 2, 'siren': 1},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1},
{'battle': 5},
{'battle': 6, 'boss': 1},
]
class Config: class Config:
SUBMARINE = 1
FLEET_BOSS = 2
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False
MAP_HAS_FLEET_STEP = True MAP_HAS_FLEET_STEP = True
MAP_HAS_MOVABLE_ENEMY = True MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_SIREN = True MAP_HAS_SIREN = True
MAP_HAS_DYNAMIC_RED_BORDER = True
MAP_SIREN_COUNT = 3 MAP_SIREN_COUNT = 3
MAP_HAS_DYNAMIC_RED_BORDER = True
MAP_GRID_CENTER_TOLERANCE = 0.3
MAP_SIREN_TEMPLATE = ['1', '2', '3', 'DD']
INTERNAL_LINES_HOUGHLINES_THRESHOLD = 50
MID_DIFF_RANGE_H = (45, 70)
MID_DIFF_RANGE_V = (97 - 3, 97 + 3)
TRUST_EDGE_LINES = True TRUST_EDGE_LINES = True
VANISH_POINT_RANGE = ((540, 740), (-4000, -2000))
DISTANCE_POINT_X_RANGE = ((-2000, -1000),)
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = { INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (80, 255 - 40), 'height': (80, 255 - 40),
'width': (0.9, 10), 'width': (0.9, 10),
'prominence': 10, 'prominence': 10,
'distance': 35, 'distance': 35,
'wlen': 100,
} }
EDGE_LINES_FIND_PEAKS_PARAMETERS = { EDGE_LINES_FIND_PEAKS_PARAMETERS = {
'height': (255 - 40, 255), 'height': (255 - 40, 255),
@ -50,3 +74,22 @@ class Config:
class Campaign(CampaignBase): class Campaign(CampaignBase):
MAP = MAP MAP = MAP
def battle_0(self):
if self.clear_siren():
return True
if self.clear_enemy(scale=(2, 3)):
return True
return self.battle_default()
def battle_5(self):
if self.clear_enemy(scale=(1,)):
return True
if self.clear_enemy(scale=(2,)):
return True
return self.battle_default()
def battle_6(self):
return self.fleet_2.clear_boss()

View File

@ -162,7 +162,7 @@ class CampaignOcr:
self.stage_entrance = {} self.stage_entrance = {}
buttons = self.campaign_extract_name_image(image) buttons = self.campaign_extract_name_image(image)
ocr = Ocr(buttons, lang='stage', letter=(255, 255, 255), back=(102, 102, 102), threshold=180) ocr = Ocr(buttons, lang='stage', letter=(255, 255, 255), back=(102, 102, 102), threshold=120)
result = ocr.ocr(image) result = ocr.ocr(image)
if not isinstance(result, list): if not isinstance(result, list):
result = [result] result = [result]

View File

@ -53,7 +53,7 @@ def update_config_from_template(config, file):
sidebar_title='Function', sidebar_title='Function',
terminal_font_family='Consolas', terminal_font_family='Consolas',
language='english', language='english',
default_size=(1000, 720), default_size=(1110, 720),
navigation='SIDEBAR', navigation='SIDEBAR',
tabbed_groups=True, tabbed_groups=True,
show_success_modal=False, show_success_modal=False,

View File

@ -34,7 +34,7 @@ MAP_GREEN = Button(area={'cn': (195, 260, 349, 292), 'en': (201, 259, 341, 290)}
MAP_STAR_1 = Button(area={'cn': (245, 377, 254, 384), 'en': (232, 381, 240, 389)}, color={'cn': (251, 233, 143), 'en': (252, 234, 146)}, button={'cn': (245, 377, 254, 384), 'en': (232, 381, 240, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_1.png', 'en': './assets/en/handler/MAP_STAR_1.png'}) MAP_STAR_1 = Button(area={'cn': (245, 377, 254, 384), 'en': (232, 381, 240, 389)}, color={'cn': (251, 233, 143), 'en': (252, 234, 146)}, button={'cn': (245, 377, 254, 384), 'en': (232, 381, 240, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_1.png', 'en': './assets/en/handler/MAP_STAR_1.png'})
MAP_STAR_2 = Button(area={'cn': (532, 377, 540, 384), 'en': (518, 382, 526, 389)}, color={'cn': (251, 233, 144), 'en': (252, 234, 144)}, button={'cn': (532, 377, 540, 384), 'en': (518, 382, 526, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_2.png', 'en': './assets/en/handler/MAP_STAR_2.png'}) MAP_STAR_2 = Button(area={'cn': (532, 377, 540, 384), 'en': (518, 382, 526, 389)}, color={'cn': (251, 233, 144), 'en': (252, 234, 144)}, button={'cn': (532, 377, 540, 384), 'en': (518, 382, 526, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_2.png', 'en': './assets/en/handler/MAP_STAR_2.png'})
MAP_STAR_3 = Button(area={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, color={'cn': (251, 233, 143), 'en': (252, 234, 144)}, button={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_3.png', 'en': './assets/en/handler/MAP_STAR_3.png'}) MAP_STAR_3 = Button(area={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, color={'cn': (251, 233, 143), 'en': (252, 234, 144)}, button={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_3.png', 'en': './assets/en/handler/MAP_STAR_3.png'})
MAP_WALK_OUT_OF_STEP = Button(area={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, color={'cn': (109, 113, 120), 'en': (109, 113, 120)}, button={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, file={'cn': './assets/cn/handler/MAP_WALK_OUT_OF_STEP.png', 'en': './assets/en/handler/MAP_WALK_OUT_OF_STEP.png'}) MAP_WALK_OUT_OF_STEP = Button(area={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, color={'cn': (109, 113, 120), 'en': (112, 113, 120)}, button={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, file={'cn': './assets/cn/handler/MAP_WALK_OUT_OF_STEP.png', 'en': './assets/en/handler/MAP_WALK_OUT_OF_STEP.png'})
MYSTERY_ITEM = Button(area={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, color={'cn': (144, 127, 83), 'en': (144, 127, 83)}, button={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, file={'cn': './assets/cn/handler/MYSTERY_ITEM.png', 'en': './assets/en/handler/MYSTERY_ITEM.png'}) MYSTERY_ITEM = Button(area={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, color={'cn': (144, 127, 83), 'en': (144, 127, 83)}, button={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, file={'cn': './assets/cn/handler/MYSTERY_ITEM.png', 'en': './assets/en/handler/MYSTERY_ITEM.png'})
POPUP_CANCEL = Button(area={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, color={'cn': (166, 169, 172), 'en': (170, 172, 174)}, button={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, file={'cn': './assets/cn/handler/POPUP_CANCEL.png', 'en': './assets/en/handler/POPUP_CANCEL.png'}) POPUP_CANCEL = Button(area={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, color={'cn': (166, 169, 172), 'en': (170, 172, 174)}, button={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, file={'cn': './assets/cn/handler/POPUP_CANCEL.png', 'en': './assets/en/handler/POPUP_CANCEL.png'})
POPUP_CONFIRM = Button(area={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, color={'cn': (94, 144, 204), 'en': (107, 152, 207)}, button={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, file={'cn': './assets/cn/handler/POPUP_CONFIRM.png', 'en': './assets/en/handler/POPUP_CONFIRM.png'}) POPUP_CONFIRM = Button(area={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, color={'cn': (94, 144, 204), 'en': (107, 152, 207)}, button={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, file={'cn': './assets/cn/handler/POPUP_CONFIRM.png', 'en': './assets/en/handler/POPUP_CONFIRM.png'})

View File

@ -13,9 +13,9 @@ COMMISSION_START = Button(area={'cn': (1028, 322, 1156, 383), 'en': (1031, 333,
COMMISSION_STOP_SCROLLING = Button(area={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, color={'cn': (50, 55, 74), 'en': (50, 55, 74)}, button={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, file={'cn': './assets/cn/reward/COMMISSION_STOP_SCROLLING.png', 'en': './assets/en/reward/COMMISSION_STOP_SCROLLING.png'}) COMMISSION_STOP_SCROLLING = Button(area={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, color={'cn': (50, 55, 74), 'en': (50, 55, 74)}, button={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, file={'cn': './assets/cn/reward/COMMISSION_STOP_SCROLLING.png', 'en': './assets/en/reward/COMMISSION_STOP_SCROLLING.png'})
COMMISSION_URGENT = Button(area={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, color={'cn': (215, 188, 124), 'en': (169, 138, 95)}, button={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, file={'cn': './assets/cn/reward/COMMISSION_URGENT.png', 'en': './assets/en/reward/COMMISSION_URGENT.png'}) COMMISSION_URGENT = Button(area={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, color={'cn': (215, 188, 124), 'en': (169, 138, 95)}, button={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, file={'cn': './assets/cn/reward/COMMISSION_URGENT.png', 'en': './assets/en/reward/COMMISSION_URGENT.png'})
EXP_INFO_S_REWARD = Button(area={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, color={'cn': (233, 241, 127), 'en': (105, 119, 139)}, button={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, file={'cn': './assets/cn/reward/EXP_INFO_S_REWARD.png', 'en': './assets/en/reward/EXP_INFO_S_REWARD.png'}) EXP_INFO_S_REWARD = Button(area={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, color={'cn': (233, 241, 127), 'en': (105, 119, 139)}, button={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, file={'cn': './assets/cn/reward/EXP_INFO_S_REWARD.png', 'en': './assets/en/reward/EXP_INFO_S_REWARD.png'})
MISSION_MULTI = Button(area={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, color={'cn': (226, 192, 142), 'en': (226, 192, 142)}, button={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, file={'cn': './assets/cn/reward/MISSION_MULTI.png', 'en': './assets/en/reward/MISSION_MULTI.png'}) MISSION_MULTI = Button(area={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, color={'cn': (226, 192, 142), 'en': (221, 179, 96)}, button={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, file={'cn': './assets/cn/reward/MISSION_MULTI.png', 'en': './assets/en/reward/MISSION_MULTI.png'})
MISSION_NOTICE = Button(area={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, color={'cn': (183, 83, 66), 'en': (183, 83, 66)}, button={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, file={'cn': './assets/cn/reward/MISSION_NOTICE.png', 'en': './assets/en/reward/MISSION_NOTICE.png'}) MISSION_NOTICE = Button(area={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, color={'cn': (183, 83, 66), 'en': (183, 83, 66)}, button={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, file={'cn': './assets/cn/reward/MISSION_NOTICE.png', 'en': './assets/en/reward/MISSION_NOTICE.png'})
MISSION_SINGLE = Button(area={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, color={'cn': (115, 155, 218), 'en': (115, 155, 218)}, button={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, file={'cn': './assets/cn/reward/MISSION_SINGLE.png', 'en': './assets/en/reward/MISSION_SINGLE.png'}) MISSION_SINGLE = Button(area={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, color={'cn': (115, 155, 218), 'en': (106, 147, 215)}, button={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, file={'cn': './assets/cn/reward/MISSION_SINGLE.png', 'en': './assets/en/reward/MISSION_SINGLE.png'})
OIL = Button(area={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, color={'cn': (71, 72, 71), 'en': (71, 72, 71)}, button={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, file={'cn': './assets/cn/reward/OIL.png', 'en': './assets/en/reward/OIL.png'}) OIL = Button(area={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, color={'cn': (71, 72, 71), 'en': (71, 72, 71)}, button={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, file={'cn': './assets/cn/reward/OIL.png', 'en': './assets/en/reward/OIL.png'})
REWARD_1 = Button(area={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, color={'cn': (238, 168, 81), 'en': (241, 187, 120)}, button={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, file={'cn': './assets/cn/reward/REWARD_1.png', 'en': './assets/en/reward/REWARD_1.png'}) REWARD_1 = Button(area={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, color={'cn': (238, 168, 81), 'en': (241, 187, 120)}, button={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, file={'cn': './assets/cn/reward/REWARD_1.png', 'en': './assets/en/reward/REWARD_1.png'})
REWARD_2 = Button(area={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, color={'cn': (233, 165, 67), 'en': (236, 177, 92)}, button={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, file={'cn': './assets/cn/reward/REWARD_2.png', 'en': './assets/en/reward/REWARD_2.png'}) REWARD_2 = Button(area={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, color={'cn': (233, 165, 67), 'en': (236, 177, 92)}, button={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, file={'cn': './assets/cn/reward/REWARD_2.png', 'en': './assets/en/reward/REWARD_2.png'})

View File

@ -37,7 +37,7 @@ dictionary_en = {
'extra_drill': ['Sailing', 'Defense Patrol', 'Buoy'], 'extra_drill': ['Sailing', 'Defense Patrol', 'Buoy'],
'extra_part': ['veinprotectoncommisionll', 'Forestprtectoncommisionl', 'Forestprotectoncommisionll'], 'extra_part': ['veinprotectoncommisionll', 'Forestprtectoncommisionl', 'Forestprotectoncommisionll'],
'extra_cube': ['Exercise'], 'extra_cube': ['Exercise'],
'extra_oil': ['Large-saleoilExtractionlll', 'FleetCargoTransport', 'Large-saleoilExtractianl', 'Large-saleoilExtractionl', 'Large-saleoilExtractiaonll'], 'extra_oil': ['oilextraction', 'FleetCargoTransport', 'oilExtractianl', '', 'oilExtractiaonll'],
'extra_book': ['LargeMerchantEscort'], 'extra_book': ['LargeMerchantEscort'],
'urgent_drill': ['Cargo Defense', 'Scouts', 'Force', 'Elites', 'FrontierDefensePatrol'], 'urgent_drill': ['Cargo Defense', 'Scouts', 'Force', 'Elites', 'FrontierDefensePatrol'],
'urgent_part': ['Lavella', 'Maui', 'Rendova', 'AidingWongbanna'], 'urgent_part': ['Lavella', 'Maui', 'Rendova', 'AidingWongbanna'],
@ -181,7 +181,7 @@ class Commission:
Returns: Returns:
timedelta: datetime.timedelta instance. timedelta: datetime.timedelta instance.
""" """
string = string.replace('D', '0') # Poor OCR string = string.replace('D', '0').replace(' ', '').replace('-', '') # Poor OCR
result = re.search('(\d+):(\d+):(\d+)', string) result = re.search('(\d+):(\d+):(\d+)', string)
if not result: if not result:
logger.warning(f'Invalid time string: {string}') logger.warning(f'Invalid time string: {string}')