@@ -39,7 +39,7 @@ class Role(StrEnum):
39
39
class BaseChar :
40
40
"""角色基类,定义了游戏角色的通用属性和行为。"""
41
41
42
- def __init__ (self , task , index , res_cd = 20 , echo_cd = 20 , liberation_cd = 25 , char_name = None ):
42
+ def __init__ (self , task , index , res_cd = 20 , echo_cd = 20 , liberation_cd = 25 , char_name = None , confidence = 1 ):
43
43
"""初始化角色基础属性。
44
44
45
45
Args:
@@ -68,13 +68,14 @@ def __init__(self, task, index, res_cd=20, echo_cd=20, liberation_cd=25, char_na
68
68
self ._liberation_available = False
69
69
self ._resonance_available = False
70
70
self ._echo_available = False
71
- self .logger = Logger .get_logger (self .name )
72
71
self .full_ring_area = 0
73
72
self .last_perform = 0
74
73
self .current_con = 0
75
74
self .has_tool_box = False
76
75
self .intro_motion_freeze_duration = 0.9
77
76
self .last_outro_time = - 1
77
+ self .confidence = confidence
78
+ self .logger = Logger .get_logger (self .name )
78
79
79
80
def skip_combat_check (self ):
80
81
"""是否在某些操作中跳过战斗状态检查。
@@ -97,7 +98,7 @@ def name(self):
97
98
Returns:
98
99
str: 角色类名字符串。
99
100
"""
100
- return self .__class__ .__name__
101
+ return f" { self .__class__ .__name__ } "
101
102
102
103
def __eq__ (self , other ):
103
104
"""比较两个角色对象是否相同 (基于名称和索引)。"""
@@ -783,9 +784,9 @@ def check_outro(self):
783
784
time = char .last_switch_time
784
785
outro = char .char_name
785
786
self .logger .info (f'erned outro from { outro } ' )
786
- return outro
787
-
788
- # def count_rectangle_forte(self, left=0.42, right=0.57):
787
+ return outro
788
+
789
+ # def count_rectangle_forte(self, left=0.42, right=0.57):
789
790
# """计算矩形共鸣回路充能格数 (已注释)。"""
790
791
# # Perform image cropping once, as it's independent of saturation ranges
791
792
# cropped_image_base = self.task.box_of_screen(left, 0.927, right, 0.931).crop_frame(self.task.frame)
0 commit comments