@bettergi/types 0.1.14 → 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 (37) hide show
  1. package/bindings/RealtimeTimer.d.ts +1 -1
  2. package/bindings/getAvatars.d.ts +3 -2
  3. package/bindings/htmlMask.d.ts +5 -0
  4. package/bindings/htmlMask.webview.d.ts +92 -0
  5. package/package.json +7 -1
  6. package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
  7. package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +4 -3
  8. package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +20 -9
  9. package/types/BetterGenshinImpact/Core/Script/Dependence/Http.d.ts +1 -0
  10. package/types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts +11 -7
  11. package/types/BetterGenshinImpact/Core/Script/Dependence/LimitedFile.d.ts +12 -5
  12. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +63 -8
  13. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +93 -21
  14. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +62 -3
  15. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -4
  16. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +11 -9
  17. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +61 -0
  18. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +28 -2
  19. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +13 -6
  20. package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
  21. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -7
  22. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +13 -13
  23. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.d.ts +3 -3
  24. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScript.d.ts +3 -2
  25. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/Method.d.ts +63 -3
  26. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +4 -3
  27. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +1 -0
  28. package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +50 -0
  29. package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +2 -0
  30. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +5 -3
  31. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +6 -4
  32. package/types/BetterGenshinImpact/GameTask/Common/Job/CraftMaterialTask.d.ts +19 -2
  33. package/types/BetterGenshinImpact/GameTask/Common/Map/MapScriptNames.d.ts +9 -0
  34. package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +6 -7
  35. package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +18 -15
  36. package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
  37. package/types/System/Windows/Forms/Keys.d.ts +195 -0
@@ -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
  }
@@ -6,6 +6,65 @@ import type {
6
6
  import "../../../../System/Collections/Generic/IEnumerable";
7
7
  import "../../../../System/Collections/Generic/List";
8
8
 
9
+ /**
10
+ * 战斗策略脚本中的动作方法名或别名
11
+ * 与上游 `Method` 静态实例的 `Alias` 对齐;未知写法仍可经 `(string & {})` 传入
12
+ * @since 0.50.0
13
+ */
14
+ export type CombatMethodCode =
15
+ // Skill
16
+ | "skill"
17
+ | "e"
18
+ // Burst
19
+ | "burst"
20
+ | "q"
21
+ // Attack
22
+ | "attack"
23
+ | "普攻"
24
+ | "普通攻击"
25
+ // Charge
26
+ | "charge"
27
+ | "重击"
28
+ // Wait
29
+ | "wait"
30
+ | "after"
31
+ | "等待"
32
+ // Ready
33
+ | "ready"
34
+ | "完成"
35
+ // Check
36
+ | "check"
37
+ | "检测"
38
+ // Walk / 方向
39
+ | "walk"
40
+ | "行走"
41
+ | "w"
42
+ | "a"
43
+ | "s"
44
+ | "d"
45
+ // Aim(已注册静态成员;GetEnumByCode 的 Values 当前未 yield)
46
+ | "aim"
47
+ | "r"
48
+ | "瞄准"
49
+ // Dash / Jump
50
+ | "dash"
51
+ | "冲刺"
52
+ | "jump"
53
+ | "j"
54
+ | "跳跃"
55
+ // 宏
56
+ | "mousedown"
57
+ | "mouseup"
58
+ | "click"
59
+ | "moveby"
60
+ | "keydown"
61
+ | "keyup"
62
+ | "keypress"
63
+ | "scroll"
64
+ | "verticalscroll"
65
+ | "round"
66
+ | (string & {});
67
+
9
68
  /**
10
69
  * 战斗策略脚本中的动作方法
11
70
  * @since 0.50.0
@@ -17,12 +76,13 @@ export interface Method extends ClrHostValue {
17
76
  * 方法别名列表,脚本中可使用其中任一写法
18
77
  * @since 0.50.0
19
78
  */
20
- readonly alias: System.Collections.Generic.List<string>;
79
+ readonly alias: System.Collections.Generic.List<CombatMethodCode>;
21
80
  }
22
81
 
23
82
  declare global {
24
83
  namespace BetterGenshinImpact.GameTask.AutoFight.Script {
25
84
  type Method = import("./Method").Method;
85
+ type CombatMethodCode = import("./Method").CombatMethodCode;
26
86
  }
27
87
  }
28
88
 
@@ -32,7 +92,7 @@ export interface MethodHostType extends HostType<Method, ReferenceTypeTrait> {
32
92
  * @param alias 方法别名列表
33
93
  * @since 0.50.0
34
94
  */
35
- new (alias: System.Collections.Generic.List<string>): Method;
95
+ new (alias: System.Collections.Generic.List<CombatMethodCode>): Method;
36
96
  /**
37
97
  * 元素战技,别名含 `skill`、`e`
38
98
  * @since 0.50.0
@@ -165,7 +225,7 @@ export interface MethodHostType extends HostType<Method, ReferenceTypeTrait> {
165
225
  * @throws 方法名未知时抛出参数异常
166
226
  * @since 0.50.0
167
227
  */
168
- getEnumByCode(method: string): BetterGenshinImpact.GameTask.AutoFight.Script.Method;
228
+ getEnumByCode(method: CombatMethodCode): BetterGenshinImpact.GameTask.AutoFight.Script.Method;
169
229
  }
170
230
 
171
231
  export {};
@@ -8,6 +8,7 @@ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
8
8
  import "../../../System/ComponentModel/INotifyPropertyChanged";
9
9
  import "../../../System/ComponentModel/INotifyPropertyChanging";
10
10
  import "../AutoFight/AutoFightConfig";
11
+ import type { CombatStrategyName, PartySlotIndex } from "../AutoFight/AutoFightConfig";
11
12
 
12
13
  /**
13
14
  * 地脉花独立战斗配置
@@ -84,7 +85,7 @@ export interface AutoLeyLineOutcropFightConfig
84
85
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
85
86
  * @since 0.58.0
86
87
  */
87
- guardianAvatar: string;
88
+ guardianAvatar: PartySlotIndex;
88
89
  /**
89
90
  * 是否跳过盾奶位自身的战斗策略脚本
90
91
  * @since 0.58.0
@@ -116,10 +117,10 @@ export interface AutoLeyLineOutcropFightConfig
116
117
  */
117
118
  seekEnemyRotaryFactor: number;
118
119
  /**
119
- * 战斗策略名称
120
+ * 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
120
121
  * @since 0.58.0
121
122
  */
122
- strategyName: string;
123
+ strategyName: CombatStrategyName;
123
124
  /**
124
125
  * 是否启用游泳脱困检测
125
126
  * @since 0.58.0
@@ -145,6 +145,7 @@ export interface AutoLeyLineOutcropParam extends Omit<
145
145
  declare global {
146
146
  namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
147
147
  type AutoLeyLineOutcropParam = import("./AutoLeyLineOutcropParam").AutoLeyLineOutcropParam;
148
+ type LeyLineOutcropType = import("./AutoLeyLineOutcropParam").LeyLineOutcropType;
148
149
  }
149
150
  }
150
151