@bettergi/types 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/bindings/RealtimeTimer.d.ts +1 -1
  2. package/bindings/getAvatars.d.ts +3 -2
  3. package/package.json +1 -1
  4. package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
  5. package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +4 -3
  6. package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +20 -9
  7. package/types/BetterGenshinImpact/Core/Script/Dependence/Http.d.ts +1 -0
  8. package/types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts +1 -0
  9. package/types/BetterGenshinImpact/Core/Script/Dependence/LimitedFile.d.ts +12 -5
  10. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +63 -8
  11. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +4 -1
  12. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +62 -3
  13. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -4
  14. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +11 -9
  15. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +61 -0
  16. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +28 -2
  17. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +13 -6
  18. package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
  19. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -7
  20. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +13 -13
  21. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.d.ts +3 -3
  22. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScript.d.ts +3 -2
  23. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/Method.d.ts +63 -3
  24. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +4 -3
  25. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +1 -0
  26. package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +50 -0
  27. package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +2 -0
  28. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +5 -3
  29. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +6 -4
  30. package/types/BetterGenshinImpact/GameTask/Common/Job/CraftMaterialTask.d.ts +19 -2
  31. package/types/BetterGenshinImpact/GameTask/Common/Map/MapScriptNames.d.ts +9 -0
  32. package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +6 -7
  33. package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +18 -15
  34. package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
@@ -17,6 +17,28 @@ export type OnlyPickEliteDropsMode =
17
17
  | "DisableAutoPickupForNonElite" // 非精英关闭自动拾取
18
18
  | (string & {});
19
19
 
20
+ /**
21
+ * 战斗策略名称;`根据队伍自动选择` 表示按当前队伍匹配策略目录,其余为 `User/AutoFight` 下策略文件名(不含扩展名)
22
+ * @since 0.52.0
23
+ */
24
+ export type CombatStrategyName = "根据队伍自动选择" | (string & {});
25
+
26
+ /**
27
+ * 战斗策略文件种类标识
28
+ * 与上游 `AutoFightParam.ResolveStrategyPath` 返回的第二项对齐:优先命中 `.json`,否则回退 `.txt`;自动选队目录亦标为 `txt`
29
+ * @since 0.52.0
30
+ */
31
+ export type StrategyFileKind =
32
+ | "json" // JSON 战斗策略
33
+ | "txt" // 文本 / 简易策略(含「根据队伍自动选择」目录)
34
+ | (string & {});
35
+
36
+ /**
37
+ * 队伍内角色槽位序号(字符串),从 1 开始;空字符串表示不指定
38
+ * @since 0.52.0
39
+ */
40
+ export type PartySlotIndex = "1" | "2" | "3" | "4" | "" | (string & {});
41
+
20
42
  /**
21
43
  * 自动战斗配置
22
44
  * @since 0.52.0
@@ -89,7 +111,7 @@ export interface AutoFightConfig
89
111
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
90
112
  * @since 0.52.0
91
113
  */
92
- guardianAvatar: string;
114
+ guardianAvatar: PartySlotIndex;
93
115
  /**
94
116
  * 是否跳过盾奶位自身的战斗策略脚本
95
117
  * @since 0.52.0
@@ -134,7 +156,7 @@ export interface AutoFightConfig
134
156
  * 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
135
157
  * @since 0.52.0
136
158
  */
137
- strategyName: string;
159
+ strategyName: CombatStrategyName;
138
160
  /**
139
161
  * 是否启用游泳脱困检测
140
162
  * @since 0.52.0
@@ -248,6 +270,10 @@ declare global {
248
270
  declare global {
249
271
  namespace BetterGenshinImpact.GameTask.AutoFight {
250
272
  type AutoFightConfig = import("./AutoFightConfig").AutoFightConfig;
273
+ type CombatStrategyName = import("./AutoFightConfig").CombatStrategyName;
274
+ type OnlyPickEliteDropsMode = import("./AutoFightConfig").OnlyPickEliteDropsMode;
275
+ type PartySlotIndex = import("./AutoFightConfig").PartySlotIndex;
276
+ type StrategyFileKind = import("./AutoFightConfig").StrategyFileKind;
251
277
  }
252
278
  }
253
279
 
@@ -8,7 +8,12 @@ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
8
8
  import "../../../System/ValueTuple";
9
9
  import "../Model/BaseTaskParam";
10
10
  import "./AutoFightConfig";
11
- import type { OnlyPickEliteDropsMode } from "./AutoFightConfig";
11
+ import type {
12
+ CombatStrategyName,
13
+ OnlyPickEliteDropsMode,
14
+ PartySlotIndex,
15
+ StrategyFileKind
16
+ } from "./AutoFightConfig";
12
17
  import "./AutoFightTask";
13
18
 
14
19
  /**
@@ -101,7 +106,7 @@ export interface AutoFightParam extends Omit<
101
106
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
102
107
  * @since 0.52.0
103
108
  */
104
- guardianAvatar: string;
109
+ guardianAvatar: PartySlotIndex;
105
110
  /**
106
111
  * 是否跳过盾奶位自身的战斗策略脚本
107
112
  * @since 0.52.0
@@ -149,7 +154,7 @@ export interface AutoFightParam extends Omit<
149
154
  * @since 0.52.0
150
155
  */
151
156
  setCombatStrategyPath(): VoidResult;
152
- setCombatStrategyPath(strategyName: string | null): VoidResult;
157
+ setCombatStrategyPath(strategyName: CombatStrategyName | null): VoidResult;
153
158
  /**
154
159
  * 从当前全局自动战斗配置填充默认参数
155
160
  * @returns ClearScript 宿主空结果
@@ -243,7 +248,7 @@ export interface AutoFightParamHostType extends HostType<AutoFightParam, Referen
243
248
  * @since 0.52.0
244
249
  */
245
250
  new (): AutoFightParam;
246
- new (strategyName: string | null): AutoFightParam;
251
+ new (strategyName: CombatStrategyName | null): AutoFightParam;
247
252
  /**
248
253
  * 是否启用游泳脱困检测
249
254
  * @since 0.52.0
@@ -252,10 +257,12 @@ export interface AutoFightParamHostType extends HostType<AutoFightParam, Referen
252
257
  /**
253
258
  * 解析策略文件路径,优先检测 `.json`,未命中则回退 `.txt`
254
259
  * @param strategyName 策略名称(不含扩展名)
255
- * @returns 完整路径与类型标识组成的元组,类型为 `json` 或 `txt`
260
+ * @returns 完整路径与策略文件种类组成的元组
256
261
  * @since 0.52.0
257
262
  */
258
- resolveStrategyPath(strategyName: string): System.ValueTuple<string, string>;
263
+ resolveStrategyPath(
264
+ strategyName: CombatStrategyName
265
+ ): System.ValueTuple<string, StrategyFileKind>;
259
266
  readonly FightFinishDetectConfig: AutoFightParam_FightFinishDetectConfigHostType;
260
267
  }
261
268
 
@@ -5,6 +5,152 @@ import type {
5
5
  ReferenceTypeTrait
6
6
  } from "../../../../Microsoft/ClearScript/HostType";
7
7
  import "../../../../System/Collections/Generic/List";
8
+ import type { AvatarName } from "../Model/Avatar";
9
+
10
+ /**
11
+ * 战斗角色武器类型编码(`combat_avatar.json` 的 `weapon` 字段)
12
+ * @since 0.50.0
13
+ */
14
+ export type CombatAvatarWeaponCode =
15
+ | "0" // 未知 / 占位
16
+ | "1" // 单手剑
17
+ | "10" // 法器
18
+ | "11" // 双手剑
19
+ | "12" // 弓
20
+ | "13" // 长柄武器
21
+ | (string & {});
22
+
23
+ /**
24
+ * 战斗角色英文名(`combat_avatar.json` 的 `nameEn`)
25
+ * 与 `AvatarName` 一一对应、顺序对齐;配置标准英文名,不是 YOLO 侧面头像 class(分类结果可能含 `Costume` 后缀)
26
+ * @since 0.50.0
27
+ */
28
+ export type CombatAvatarNameEn =
29
+ | "Unknown"
30
+ | "Ayaka"
31
+ | "Qin"
32
+ | "Traveler"
33
+ | "PlayerGirl"
34
+ | "PlayerBoy"
35
+ | "Lisa"
36
+ | "Barbara"
37
+ | "Kaeya"
38
+ | "Diluc"
39
+ | "Razor"
40
+ | "Ambor"
41
+ | "Venti"
42
+ | "Xiangling"
43
+ | "Beidou"
44
+ | "Xingqiu"
45
+ | "Xiao"
46
+ | "Ningguang"
47
+ | "Klee"
48
+ | "Zhongli"
49
+ | "Fischl"
50
+ | "Bennett"
51
+ | "Tartaglia"
52
+ | "Noel"
53
+ | "Qiqi"
54
+ | "Chongyun"
55
+ | "Ganyu"
56
+ | "Albedo"
57
+ | "Diona"
58
+ | "Mona"
59
+ | "Keqing"
60
+ | "Sucrose"
61
+ | "Xinyan"
62
+ | "Rosaria"
63
+ | "Hutao"
64
+ | "Kazuha"
65
+ | "Feiyan"
66
+ | "Yoimiya"
67
+ | "Tohma"
68
+ | "Eula"
69
+ | "Shougun"
70
+ | "Sayu"
71
+ | "Kokomi"
72
+ | "Gorou"
73
+ | "Sara"
74
+ | "Itto"
75
+ | "Yae"
76
+ | "Heizo"
77
+ | "Yelan"
78
+ | "Momoka"
79
+ | "Aloy"
80
+ | "Shenhe"
81
+ | "Yunjin"
82
+ | "Shinobu"
83
+ | "Ayato"
84
+ | "Collei"
85
+ | "Dori"
86
+ | "Tighnari"
87
+ | "Nilou"
88
+ | "Cyno"
89
+ | "Candace"
90
+ | "Nahida"
91
+ | "Layla"
92
+ | "Wanderer"
93
+ | "Faruzan"
94
+ | "Yaoyao"
95
+ | "Alhatham"
96
+ | "Dehya"
97
+ | "Mika"
98
+ | "Kaveh"
99
+ | "Baizhuer"
100
+ | "Linette"
101
+ | "Liney"
102
+ | "Freminet"
103
+ | "Wriothesley"
104
+ | "Neuvillette"
105
+ | "Charlotte"
106
+ | "Furina"
107
+ | "Chevreuse"
108
+ | "Navia"
109
+ | "Gaming"
110
+ | "Liuyun"
111
+ | "Chiori"
112
+ | "Sigewinne"
113
+ | "Arlecchino"
114
+ | "Sethos"
115
+ | "Clorinde"
116
+ | "Emilie"
117
+ | "Kachina"
118
+ | "Kinich"
119
+ | "Mualani"
120
+ | "Xilonen"
121
+ | "Chasca"
122
+ | "Olorun"
123
+ | "Mavuika"
124
+ | "Citlali"
125
+ | "Lanyan"
126
+ | "Mizuki"
127
+ | "Iansan"
128
+ | "Varesa"
129
+ | "Escoffier"
130
+ | "Ifa"
131
+ | "SkirkNew"
132
+ | "Dahlia"
133
+ | "Ineffa"
134
+ | "MannequinBoy"
135
+ | "MannequinGirl"
136
+ | "Lauma"
137
+ | "Flins"
138
+ | "Aino"
139
+ | "Nefer"
140
+ | "Durin"
141
+ | "Jahoda"
142
+ | "Columbina"
143
+ | "Zibai"
144
+ | "Illuga"
145
+ | "Varka"
146
+ | "Linnea"
147
+ | "Lohen"
148
+ | "Nicole"
149
+ | "Prune"
150
+ | "Marionette"
151
+ | "Alyosha"
152
+ | "Odette"
153
+ | (string & {});
8
154
 
9
155
  /**
10
156
  * 战斗角色静态配置
@@ -22,17 +168,17 @@ export interface CombatAvatar extends ClrHostValue {
22
168
  * 角色名称(中文)
23
169
  * @since 0.50.0
24
170
  */
25
- name: string;
171
+ name: AvatarName;
26
172
  /**
27
- * 角色英文名
173
+ * 角色英文名(配置标准名,非 YOLO class)
28
174
  * @since 0.50.0
29
175
  */
30
- nameEn: string;
176
+ nameEn: CombatAvatarNameEn;
31
177
  /**
32
- * 武器类型
178
+ * 武器类型编码(非中文武器名)
33
179
  * @since 0.50.0
34
180
  */
35
- weapon: string;
181
+ weapon: CombatAvatarWeaponCode;
36
182
  /**
37
183
  * 元素战技冷却时长,单位秒
38
184
  * @since 0.50.0
@@ -58,6 +204,8 @@ export interface CombatAvatar extends ClrHostValue {
58
204
  declare global {
59
205
  namespace BetterGenshinImpact.GameTask.AutoFight.Config {
60
206
  type CombatAvatar = import("./CombatAvatar").CombatAvatar;
207
+ type CombatAvatarNameEn = import("./CombatAvatar").CombatAvatarNameEn;
208
+ type CombatAvatarWeaponCode = import("./CombatAvatar").CombatAvatarWeaponCode;
61
209
  }
62
210
  }
63
211
 
@@ -19,11 +19,138 @@ import "../../Model/Area/ImageRegion";
19
19
  import "../Config/CombatAvatar";
20
20
  import "./CombatScenes";
21
21
 
22
+ export type AvatarName =
23
+ | "未知角色"
24
+ | "神里绫华"
25
+ | "琴"
26
+ | "旅行者"
27
+ | "荧"
28
+ | "空"
29
+ | "丽莎"
30
+ | "芭芭拉"
31
+ | "凯亚"
32
+ | "迪卢克"
33
+ | "雷泽"
34
+ | "安柏"
35
+ | "温迪"
36
+ | "香菱"
37
+ | "北斗"
38
+ | "行秋"
39
+ | "魈"
40
+ | "凝光"
41
+ | "可莉"
42
+ | "钟离"
43
+ | "菲谢尔"
44
+ | "班尼特"
45
+ | "达达利亚"
46
+ | "诺艾尔"
47
+ | "七七"
48
+ | "重云"
49
+ | "甘雨"
50
+ | "阿贝多"
51
+ | "迪奥娜"
52
+ | "莫娜"
53
+ | "刻晴"
54
+ | "砂糖"
55
+ | "辛焱"
56
+ | "罗莎莉亚"
57
+ | "胡桃"
58
+ | "枫原万叶"
59
+ | "烟绯"
60
+ | "宵宫"
61
+ | "托马"
62
+ | "优菈"
63
+ | "雷电将军"
64
+ | "早柚"
65
+ | "珊瑚宫心海"
66
+ | "五郎"
67
+ | "九条裟罗"
68
+ | "荒泷一斗"
69
+ | "八重神子"
70
+ | "鹿野院平藏"
71
+ | "夜兰"
72
+ | "绮良良"
73
+ | "埃洛伊"
74
+ | "申鹤"
75
+ | "云堇"
76
+ | "久岐忍"
77
+ | "神里绫人"
78
+ | "柯莱"
79
+ | "多莉"
80
+ | "提纳里"
81
+ | "妮露"
82
+ | "赛诺"
83
+ | "坎蒂丝"
84
+ | "纳西妲"
85
+ | "莱依拉"
86
+ | "流浪者"
87
+ | "珐露珊"
88
+ | "瑶瑶"
89
+ | "艾尔海森"
90
+ | "迪希雅"
91
+ | "米卡"
92
+ | "卡维"
93
+ | "白术"
94
+ | "琳妮特"
95
+ | "林尼"
96
+ | "菲米尼"
97
+ | "莱欧斯利"
98
+ | "那维莱特"
99
+ | "夏洛蒂"
100
+ | "芙宁娜"
101
+ | "夏沃蕾"
102
+ | "娜维娅"
103
+ | "嘉明"
104
+ | "闲云"
105
+ | "千织"
106
+ | "希格雯"
107
+ | "阿蕾奇诺"
108
+ | "赛索斯"
109
+ | "克洛琳德"
110
+ | "艾梅莉埃"
111
+ | "卡齐娜"
112
+ | "基尼奇"
113
+ | "玛拉妮"
114
+ | "希诺宁"
115
+ | "恰斯卡"
116
+ | "欧洛伦"
117
+ | "玛薇卡"
118
+ | "茜特菈莉"
119
+ | "蓝砚"
120
+ | "梦见月瑞希"
121
+ | "伊安珊"
122
+ | "瓦雷莎"
123
+ | "爱可菲"
124
+ | "伊法"
125
+ | "丝柯克"
126
+ | "塔利雅"
127
+ | "伊涅芙"
128
+ | "奇偶(男)"
129
+ | "奇偶(女)"
130
+ | "菈乌玛"
131
+ | "菲林斯"
132
+ | "爱诺"
133
+ | "奈芙尔"
134
+ | "杜林"
135
+ | "雅珂达"
136
+ | "哥伦比娅"
137
+ | "兹白"
138
+ | "叶洛亚"
139
+ | "法尔伽"
140
+ | "莉奈娅"
141
+ | "洛恩"
142
+ | "尼可"
143
+ | "布伦妮"
144
+ | "桑多涅"
145
+ | "阿罗夏"
146
+ | "奥黛塔"
147
+ | (string & {});
148
+
22
149
  /**
23
150
  * 角色行走方向键
24
151
  * @since 0.50.0
25
152
  */
26
- type WalkKey =
153
+ export type WalkKey =
27
154
  | "w" // 前
28
155
  | "s" // 后
29
156
  | "a" // 左
@@ -31,10 +158,10 @@ type WalkKey =
31
158
  | (string & {});
32
159
 
33
160
  /**
34
- * 角色模拟用鼠标按键
161
+ * 角色模拟用鼠标按键(小写;与 `KeyMouseHook.MouseButton` 的 PascalCase 不同)
35
162
  * @since 0.50.0
36
163
  */
37
- type MouseButtonName =
164
+ export type MouseButtonName =
38
165
  | "left" // 左键
39
166
  | "right" // 右键
40
167
  | "middle" // 中键
@@ -56,7 +183,7 @@ export interface Avatar extends ClrHostValue {
56
183
  * 角色名称(中文)
57
184
  * @since 0.50.0
58
185
  */
59
- name: string;
186
+ name: AvatarName;
60
187
  /**
61
188
  * 队伍内序号,从 1 开始
62
189
  * @since 0.50.0
@@ -303,6 +430,9 @@ export interface Avatar extends ClrHostValue {
303
430
  declare global {
304
431
  namespace BetterGenshinImpact.GameTask.AutoFight.Model {
305
432
  type Avatar = import("./Avatar").Avatar;
433
+ type AvatarName = import("./Avatar").AvatarName;
434
+ type MouseButtonName = import("./Avatar").MouseButtonName;
435
+ type WalkKey = import("./Avatar").WalkKey;
306
436
  }
307
437
  }
308
438
 
@@ -318,13 +448,13 @@ export interface AvatarHostType extends HostType<Avatar, ReferenceTypeTrait> {
318
448
  */
319
449
  new (
320
450
  combatScenes: BetterGenshinImpact.GameTask.AutoFight.Model.CombatScenes,
321
- name: string,
451
+ name: AvatarName,
322
452
  index: number | StrongNumeric<Int32Host>,
323
453
  nameRect: OpenCvSharp.Rect
324
454
  ): Avatar;
325
455
  new (
326
456
  combatScenes: BetterGenshinImpact.GameTask.AutoFight.Model.CombatScenes,
327
- name: string,
457
+ name: AvatarName,
328
458
  index: number | StrongNumeric<Int32Host>,
329
459
  nameRect: OpenCvSharp.Rect,
330
460
  manualSkillCd: number | StrongNumeric<DoubleHost>
@@ -355,7 +485,7 @@ export interface AvatarHostType extends HostType<Avatar, ReferenceTypeTrait> {
355
485
  * @returns 仅有角色名时返回 -1,未找到角色返回 null,否则返回冷却秒数
356
486
  * @since 0.50.0
357
487
  */
358
- parseActionSchedulerByCd(avatarName: string, input: string): number | null;
488
+ parseActionSchedulerByCd(avatarName: AvatarName, input: string): number | null;
359
489
  /**
360
490
  * 识别屏幕上的血条位置列表
361
491
  * @param existingCapture 可选的已有截图区域,省略时重新截图
@@ -20,7 +20,7 @@ import "../../Model/Area/ImageRegion";
20
20
  import "../../Model/ISystemInfo";
21
21
  import "../Assets/AutoFightAssets";
22
22
  import "../AutoFightConfig";
23
- import "./Avatar";
23
+ import type { AvatarName } from "./Avatar";
24
24
  import "./AvatarActiveCheckContext";
25
25
  import "./MultiGameStatus";
26
26
 
@@ -104,12 +104,12 @@ export interface CombatScenes extends ClrHostValue, System.IDisposableInput {
104
104
  classifyAvatarCnName(
105
105
  img: SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24>,
106
106
  index: number | StrongNumeric<Int32Host>
107
- ): System.ValueTuple<string, string>;
107
+ ): System.ValueTuple<AvatarName, string>;
108
108
  /**
109
109
  * 对角色头像图像进行名称分类
110
110
  * @param img 角色头像图像
111
111
  * @param index 队伍内序号,从 1 开始
112
- * @returns 角色名称
112
+ * @returns YOLO 英文分类名(可含 `Costume` 后缀),不是中文角色名
113
113
  * @since 0.48.0
114
114
  */
115
115
  classifyAvatarName(
@@ -128,7 +128,7 @@ export interface CombatScenes extends ClrHostValue, System.IDisposableInput {
128
128
  * @returns 配置中有效的角色名列表
129
129
  * @since 0.48.0
130
130
  */
131
- updateActionSchedulerByCd(cdConfig: string): System.Collections.Generic.List<string>;
131
+ updateActionSchedulerByCd(cdConfig: string): System.Collections.Generic.List<AvatarName>;
132
132
  /**
133
133
  * 在战斗任务开始前绑定取消令牌等运行时上下文
134
134
  * @param ct 取消令牌
@@ -154,29 +154,29 @@ export interface CombatScenes extends ClrHostValue, System.IDisposableInput {
154
154
  /**
155
155
  * 按角色名称选择角色
156
156
  * @param name 角色名称(中文)
157
- * @returns 对应角色
157
+ * @returns 对应角色,未找到时为 null
158
158
  * @since 0.48.0
159
159
  */
160
- selectAvatar(name: string): BetterGenshinImpact.GameTask.AutoFight.Model.Avatar;
160
+ selectAvatar(name: AvatarName): BetterGenshinImpact.GameTask.AutoFight.Model.Avatar | null;
161
161
  /**
162
162
  * 获取当前出战角色名,不刷新编号框位置,不推荐使用
163
163
  * @param force 是否强制重新识别
164
164
  * @param region 可选的图像区域
165
165
  * @param ct 取消令牌
166
- * @returns 出战角色名称
166
+ * @returns 出战角色名称,未识别时为 null
167
167
  * @since 0.48.0
168
168
  */
169
- currentAvatar(): string;
170
- currentAvatar(force: boolean): string;
169
+ currentAvatar(): AvatarName | null;
170
+ currentAvatar(force: boolean): AvatarName | null;
171
171
  currentAvatar(
172
172
  force: boolean,
173
173
  region: BetterGenshinImpact.GameTask.Model.Area.ImageRegion | null
174
- ): string;
174
+ ): AvatarName | null;
175
175
  currentAvatar(
176
176
  force: boolean,
177
177
  region: BetterGenshinImpact.GameTask.Model.Area.ImageRegion | null,
178
178
  ct: System.Threading.CancellationToken
179
- ): string;
179
+ ): AvatarName | null;
180
180
  /**
181
181
  * 获取当前出战角色编号,失败后自动刷新编号框位置,推荐使用
182
182
  * @param imageRegion 完整游戏画面的图像区域
@@ -201,11 +201,11 @@ export interface CombatScenes extends ClrHostValue, System.IDisposableInput {
201
201
  /**
202
202
  * 对 OCR 识别结果进行纠错;单字名称(如魈、琴)仍可能无法识别
203
203
  * @param name OCR 原始名称
204
- * @returns 纠错后的角色名称
204
+ * @returns 纠错后的角色名称;未命中纠错规则时原样返回
205
205
  * @deprecated 已过时
206
206
  * @since 0.48.0
207
207
  */
208
- errorOcrCorrection(name: string): string;
208
+ errorOcrCorrection(name: string): AvatarName;
209
209
  /**
210
210
  * 释放资源
211
211
  * @returns ClearScript 宿主空结果
@@ -5,7 +5,7 @@ import type {
5
5
  } from "../../../../Microsoft/ClearScript/HostType";
6
6
  import type { VoidResult } from "../../../../Microsoft/ClearScript/VoidResult";
7
7
  import "../../../../System/Collections/Generic/List";
8
- import "../Model/Avatar";
8
+ import type { AvatarName } from "../Model/Avatar";
9
9
  import "../Model/CombatScenes";
10
10
  import "./Method";
11
11
 
@@ -20,7 +20,7 @@ export interface CombatCommand extends ClrHostValue {
20
20
  * 执行该指令的角色名称
21
21
  * @since 0.50.0
22
22
  */
23
- name: string;
23
+ name: "当前角色" | AvatarName;
24
24
  /**
25
25
  * 指令动作方法
26
26
  * @since 0.50.0
@@ -76,7 +76,7 @@ export interface CombatCommandHostType extends HostType<CombatCommand, Reference
76
76
  * @param command 指令文本,如 `skill` 或 `walk(s, 0.2)`
77
77
  * @since 0.50.0
78
78
  */
79
- new (name: string, command: string): CombatCommand;
79
+ new (name: "当前角色" | AvatarName, command: string): CombatCommand;
80
80
  }
81
81
 
82
82
  export {};
@@ -5,6 +5,7 @@ import type {
5
5
  } from "../../../../Microsoft/ClearScript/HostType";
6
6
  import "../../../../System/Collections/Generic/HashSet";
7
7
  import "../../../../System/Collections/Generic/List";
8
+ import type { AvatarName } from "../Model/Avatar";
8
9
  import "./CombatCommand";
9
10
 
10
11
  /**
@@ -28,7 +29,7 @@ export interface CombatScript extends ClrHostValue {
28
29
  * 脚本涉及的角色名称集合
29
30
  * @since 0.50.0
30
31
  */
31
- avatarNames: System.Collections.Generic.HashSet<string>;
32
+ avatarNames: System.Collections.Generic.HashSet<"当前角色" | AvatarName>;
32
33
  /**
33
34
  * 解析后的战斗指令列表
34
35
  * @since 0.50.0
@@ -55,7 +56,7 @@ export interface CombatScriptHostType extends HostType<CombatScript, ReferenceTy
55
56
  * @since 0.50.0
56
57
  */
57
58
  new (
58
- avatarNames: System.Collections.Generic.HashSet<string>,
59
+ avatarNames: System.Collections.Generic.HashSet<"当前角色" | AvatarName>,
59
60
  combatCommands: System.Collections.Generic.List<BetterGenshinImpact.GameTask.AutoFight.Script.CombatCommand>
60
61
  ): CombatScript;
61
62
  }