Skip to content

Commit

Permalink
Merge pull request #297 from smjes3/v2.2.13
Browse files Browse the repository at this point in the history
V2.2.13
  • Loading branch information
smjes3 authored May 21, 2024
2 parents 465402d + 2df641b commit c43a8aa
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 32 deletions.
44 changes: 40 additions & 4 deletions map/HuangQuan/map_2-1_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,53 @@
],
"map": [
{
"a": 2.56
"a": 2.5
},
{
"s": 3.05
"s": 2
},
{
"a": 2.1
"a": 0.5
},
{
"e": 2
},
{
"a": 0.1
},
{
"e": 2
},
{
"a": 0.1
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"a": 0.1
},
{
"e": 2
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"a": 0.1
},
{
"e": 2
},
Expand All @@ -47,7 +83,7 @@
"e": 2
},
{
"d": 1.01
"d": 2
},
{
"w": 9.8
Expand Down
78 changes: 66 additions & 12 deletions map/HuangQuan/map_2-2_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,92 @@
},
{
"picture\\map_2-2_point_2.png": 1.5
},
},
{
"picture\\map_2-2_point_3.png": 1.5
},
{
"picture\\transfer.png": 1.5
}
],
],
"map": [
{
{
"s": 0.4
},
{
"a": 0.2
},
{
"fighting": 2
},
{
"a": 0.75
},
{
"d": 0.75
},
{
"s": 6.76
"s": 1.7
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"s": 1.25
"s": 0.1
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"a": 1.0
"s": 0.1
},
{
"e": 2
},
{
"a": 1.0
"s": 0.1
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"s": 0.1
},
{
"e": 2
},
{
"a": 1
},
{
"e": 2
},
{
"a": 1
},
{
"w": 2.33
Expand All @@ -51,18 +105,18 @@
},
{
"d": 1.11
},
},
{
"e": 2
},
},
{
"e": 2
},
},
{
"e": 2
},
},
{
"e": 2
"e": 2
}
]
}
5 changes: 3 additions & 2 deletions map/HuangQuan/map_4-0_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"need_allow_map_buy": 1
},
{
"check": [0]
"check": [0,1,2,3,4,5,6]
},
{
"map": 1
Expand All @@ -21,7 +21,8 @@
"picture\\orientation_5.png": 1.5
},
{
"picture\\map_4-0.png": 2
"picture\\map_4-0.png": 2,
"scene": 1
},
{
"picture\\map_4-1_point_0.png": 1.5
Expand Down
5 changes: 1 addition & 4 deletions map/HuangQuan/map_4-0_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"need_allow_map_buy": 1
},
{
"check": [0]
"check": [0,1,2,3,4,5,6]
},
{
"picture\\buy.png": 1.5
Expand All @@ -25,9 +25,6 @@
}
],
"map": [
{
"check": [0]
},
{
"fighting": 2
},
Expand Down
9 changes: 9 additions & 0 deletions map/HuangQuan/map_4-7_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,21 @@
{
"e": 2
},
{
"w": 0.1
},
{
"e": 2
},
{
"w": 0.1
},
{
"e": 2
},
{
"w": 0.1
},
{
"e": 2
},
Expand Down
3 changes: 3 additions & 0 deletions map/HuangQuan/map_4-7_9.json
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@
{
"e": 2
},
{
"s": 0.4
},
{
"d": 0.15
},
Expand Down
5 changes: 3 additions & 2 deletions map/default/map_4-1_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"need_allow_map_buy": 1
},
{
"check": [0]
"check": [0,1,2,3,4,5,6]
},
{
"map": 1
Expand All @@ -21,7 +21,8 @@
"picture\\orientation_5.png": 1.5
},
{
"picture\\map_4-0.png": 2
"picture\\map_4-0.png": 2,
"scene": 1
},
{
"picture\\map_4-1_point_0.png": 1.5
Expand Down
5 changes: 1 addition & 4 deletions map/default/map_4-1_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"need_allow_map_buy": 1
},
{
"check": [0]
"check": [0,1,2,3,4,5,6]
},
{
"picture\\buy.png": 1.5
Expand All @@ -25,9 +25,6 @@
}
],
"map": [
{
"check": [0]
},
{
"fighting": 2
},
Expand Down
2 changes: 1 addition & 1 deletion map/default/map_4-7_7.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"d": 7
},
{
"s": 0.3
"s": 0.5
},
{
"d": 3
Expand Down
2 changes: 1 addition & 1 deletion utils/calculated.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ def monthly_pass(self):
time.sleep(5) # 延时,等待动画可能的加载
self.try_click_pass()

def try_click_pass(self, threshold=0.92, max_click_attempts=2, delay=0):
def try_click_pass(self, threshold=0.91, max_click_attempts=2, delay=0):
"""
说明:
尝试点击月卡。
Expand Down
25 changes: 23 additions & 2 deletions utils/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self):
self.now = datetime.datetime.now()
self.retry_cnt_max = 2
self.map_statu_minimize = False # 地图最小化
self.planet = None # 当前星球初始化

def map_init(self, max_attempts=10):

Expand Down Expand Up @@ -279,10 +280,15 @@ def check_and_skip_forbidden_maps(self, map_data_name):

return False

def check_planet(self, planet):
if self.planet == planet:
log.info(f"星球相同,跳过选择星球 {planet}")
return self.planet == planet

def align_angle(self):
"""校准视角
"""
if not self.cfg.CONFIG.get("angle_set", False):
if not self.cfg.CONFIG.get("angle_set", False) or self.cfg.CONFIG.get("angle", "1.0") == "1.0":
self.calculated.monthly_pass_check() # 月卡检查
self.calculated.back_to_main()
time.sleep(1)
Expand Down Expand Up @@ -432,11 +438,26 @@ def auto_map(self, start, start_in_mid: bool=False, dev: bool = False):
self.find_transfer_point(key, threshold=0.975)
self.calculated.click_target(key, 0.95)
self.temp_point = key
elif key.startswith("picture\\map_4-3_point") or key in ["picture\\orientation_2.png", "picture\\orientation_3.png", "picture\\orientation_4.png", "picture\\orientation_5.png"]:
elif key == "picture\\orientation_1.png":
keys_to_find = ["picture\\orientation_2.png", "picture\\orientation_3.png", "picture\\orientation_4.png", "picture\\orientation_5.png"]
planet_dict = {k: v for item in map_data['start'] for k, v in item.items() if k in keys_to_find}
planet = list(planet_dict.keys())[0]
if self.check_planet(planet):
continue
else:
self.calculated.click_target(key, 0.93, retry_in_map=self.allow_retry_in_map_switch)
elif key.startswith("picture\\map_4-3_point"):
self.find_transfer_point(key, threshold=0.975)
self.calculated.click_target(key, 0.93)
self.temp_point = key
time.sleep(1.7)
elif key in ["picture\\orientation_2.png", "picture\\orientation_3.png", "picture\\orientation_4.png", "picture\\orientation_5.png"]:
if self.check_planet(key):
continue
self.find_transfer_point(key, threshold=0.975)
self.calculated.click_target(key, 0.93)
self.planet = key
time.sleep(1.7)
else:
if self.allow_drap_map_switch or self.map_drag:
self.find_transfer_point(key, threshold=0.975)
Expand Down

0 comments on commit c43a8aa

Please sign in to comment.