@bettergi/types 0.1.16 → 0.1.18

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 (25) hide show
  1. package/bindings/Color.d.ts +12 -0
  2. package/bindings/Pen.d.ts +12 -0
  3. package/bindings/characterDevelopmentTask.d.ts +11 -0
  4. package/index.d.ts +3 -0
  5. package/package.json +1 -1
  6. package/types/BetterGenshinImpact/Core/BgiVision/BvFlow.d.ts +243 -0
  7. package/types/BetterGenshinImpact/Core/BgiVision/BvFlowAction.d.ts +249 -0
  8. package/types/BetterGenshinImpact/Core/BgiVision/BvPage.d.ts +22 -0
  9. package/types/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +3 -3
  10. package/types/BetterGenshinImpact/Core/Recognition/SearchOptions.d.ts +116 -3
  11. package/types/BetterGenshinImpact/Core/Script/Dependence/AutoPathingScript.d.ts +1 -1
  12. package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +1 -1
  13. package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +29 -3
  14. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +6 -0
  15. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -0
  16. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +3 -0
  17. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +101 -3
  18. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +58 -2
  19. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +173 -0
  20. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +2 -26
  21. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +30 -0
  22. package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +2 -0
  23. package/types/BetterGenshinImpact/GameTask/CharacterDevelopment/CharacterDevelopmentTask.d.ts +158 -0
  24. package/types/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +5 -0
  25. package/types/BetterGenshinImpact/GameTask/Model/GameUI/GridScreenName.d.ts +1 -1
@@ -1,20 +1,29 @@
1
1
  import type {
2
2
  ClrHostValue,
3
+ DoubleHost,
3
4
  EnumTypeTrait,
4
5
  HostType,
5
6
  PublicDefaultConstructorTrait,
6
- ReferenceTypeTrait
7
+ ReferenceTypeTrait,
8
+ StrongNumeric,
9
+ ValueTypeTrait
7
10
  } from "../../../Microsoft/ClearScript/HostType";
11
+ import type { HostVariableOut } from "../../../Microsoft/ClearScript/HostVariable";
12
+ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
13
+ import "../../../OpenCvSharp/Rect";
8
14
  import "../../../OpenCvSharp/Size";
9
15
  import "../../../System/Enum";
10
16
  import "../../../System/IComparable";
11
17
  import "../../../System/IConvertible";
18
+ import "../../../System/IEquatable";
12
19
  import "../../../System/IFormattable";
13
20
  import "../../../System/ISpanFormattable";
14
21
  import "../../../System/Nullable";
22
+ import "../../../System/ValueType";
15
23
 
16
24
  /**
17
25
  * 参考搜索的锚定方式;元素在画布右/下侧时通常使用右/下锚定,在左/上侧时通常使用左/上锚定,居中元素使用中心锚定并按画布中心加偏移缩放
26
+ * Auto 按参考包围盒所在区域分别选择水平和垂直锚定,用于模拟游戏 UI 的响应式布局
18
27
  * @since 0.49.0
19
28
  */
20
29
  declare const searchAnchorModeBrand: unique symbol;
@@ -30,7 +39,7 @@ declare global {
30
39
 
31
40
  export interface SearchAnchorModeHostType extends HostType<SearchAnchorMode, EnumTypeTrait> {
32
41
  /**
33
- * 自动选择锚定方式
42
+ * 按参考包围盒中心的 0.4/0.6 分区模拟游戏 UI 的响应式布局
34
43
  * @since 0.49.0
35
44
  */
36
45
  readonly auto: SearchAnchorMode;
@@ -74,10 +83,20 @@ export interface SearchOptions extends ClrHostValue {
74
83
  */
75
84
  anchorMode: BetterGenshinImpact.Core.Recognition.SearchAnchorMode;
76
85
  /**
77
- * 在预测框外额外扩展的像素大小;未指定时默认四周各扩展 10px
86
+ * 参考画布坐标系中的独立搜索框;未指定时以 `RecognitionObject.referenceBoundingBox` 为基础搜索框,指定后与参考包围盒使用相同缩放和锚定规则转换到当前截图坐标系
87
+ * @since 0.64.0
88
+ */
89
+ referenceSearchBox: OpenCvSharp.Rect | null;
90
+ /**
91
+ * 在基础搜索框外额外扩展的像素大小,Width 用于左右,Height 用于上下;未指定时默认四周各扩展 10px;当 expandPercent 有值时不生效
78
92
  * @since 0.49.0
79
93
  */
80
94
  expandSize: OpenCvSharp.Size | null;
95
+ /**
96
+ * 按当前截图宽高计算的四边扩展比例;左右乘截图宽度,上下乘截图高度,例如 0.05 表示 5%;优先于 expandSize,显式设置全零比例可关闭默认的 10px 扩展
97
+ * @since 0.64.0
98
+ */
99
+ expandPercent: BetterGenshinImpact.Core.Recognition.SearchExpandRatio | null;
81
100
  }
82
101
 
83
102
  declare global {
@@ -97,4 +116,98 @@ export interface SearchOptionsHostType extends HostType<
97
116
  new (): SearchOptions;
98
117
  }
99
118
 
119
+ /**
120
+ * 搜索区域四边的扩展比例,属性顺序与 XAML Thickness 的四参数顺序一致:Left、Top、Right、Bottom;值为直接参与计算的小数比例,例如 0.05 表示 5%
121
+ * @since 0.64.0
122
+ */
123
+ declare const searchExpandRatioBrand: unique symbol;
124
+ export interface SearchExpandRatio extends ClrHostValue {
125
+ readonly [searchExpandRatioBrand]: true;
126
+ /**
127
+ * 左侧扩展比例,以当前截图宽度为基准
128
+ * @since 0.64.0
129
+ */
130
+ left: number;
131
+ /**
132
+ * 上侧扩展比例,以当前截图高度为基准
133
+ * @since 0.64.0
134
+ */
135
+ top: number;
136
+ /**
137
+ * 右侧扩展比例,以当前截图宽度为基准
138
+ * @since 0.64.0
139
+ */
140
+ right: number;
141
+ /**
142
+ * 下侧扩展比例,以当前截图高度为基准
143
+ * @since 0.64.0
144
+ */
145
+ bottom: number;
146
+ /**
147
+ * 四边比例是否均为有限且非负的数字;大于 1 的比例合法,最终搜索区域会被裁剪到截图边界
148
+ * @since 0.64.0
149
+ */
150
+ readonly isValid: boolean;
151
+ /**
152
+ * 比较是否相等
153
+ * @param obj 比较对象
154
+ * @since 0.64.0
155
+ */
156
+ equals(obj: unknown | null): boolean;
157
+ /**
158
+ * 比较是否相等
159
+ * @param other 另一扩展比例
160
+ * @since 0.64.0
161
+ */
162
+ equals(other: BetterGenshinImpact.Core.Recognition.SearchExpandRatio): boolean;
163
+ /**
164
+ * 返回哈希码
165
+ * @since 0.64.0
166
+ */
167
+ getHashCode(): number;
168
+ /**
169
+ * 返回字符串表示
170
+ * @since 0.64.0
171
+ */
172
+ toString(): string;
173
+ /**
174
+ * 解构为左右上下四边比例
175
+ * @param left 左侧扩展比例
176
+ * @param top 上侧扩展比例
177
+ * @param right 右侧扩展比例
178
+ * @param bottom 下侧扩展比例
179
+ * @returns ClearScript 宿主空结果
180
+ * @since 0.64.0
181
+ */
182
+ deconstruct(
183
+ left: HostVariableOut<number>,
184
+ top: HostVariableOut<number>,
185
+ right: HostVariableOut<number>,
186
+ bottom: HostVariableOut<number>
187
+ ): VoidResult;
188
+ }
189
+
190
+ declare global {
191
+ namespace BetterGenshinImpact.Core.Recognition {
192
+ type SearchExpandRatio = import("./SearchOptions").SearchExpandRatio;
193
+ }
194
+ }
195
+
196
+ export interface SearchExpandRatioHostType extends HostType<SearchExpandRatio, ValueTypeTrait> {
197
+ /**
198
+ * 按左右上下四边比例构造
199
+ * @param left 左侧扩展比例,以当前截图宽度为基准
200
+ * @param top 上侧扩展比例,以当前截图高度为基准
201
+ * @param right 右侧扩展比例,以当前截图宽度为基准
202
+ * @param bottom 下侧扩展比例,以当前截图高度为基准
203
+ * @since 0.64.0
204
+ */
205
+ new (
206
+ left: number | StrongNumeric<DoubleHost>,
207
+ top: number | StrongNumeric<DoubleHost>,
208
+ right: number | StrongNumeric<DoubleHost>,
209
+ bottom: number | StrongNumeric<DoubleHost>
210
+ ): SearchExpandRatio;
211
+ }
212
+
100
213
  export {};
@@ -67,7 +67,7 @@ export interface AutoPathingScript extends ClrHostValue {
67
67
  * 读取 AutoPathing 目录下指定文件的文本内容
68
68
  * @param subPath 相对于 User\AutoPathing 的文件路径
69
69
  * @returns 文件文本内容,读取失败时返回空字符串
70
- * @since unreleased
70
+ * @since 0.63.0
71
71
  */
72
72
  readTextSync(subPath: string): string;
73
73
  }
@@ -133,7 +133,7 @@ export interface Dispatcher extends ClrHostValue {
133
133
  * @param avatarName 指定操作的角色名,省略时操作当前角色
134
134
  * @param customCt 自定义取消令牌
135
135
  * @returns 在任务完成后兑现的 Promise
136
- * @since unreleased
136
+ * @since 0.63.0
137
137
  */
138
138
  runCombatScript(script: string): Promise<void>;
139
139
  runCombatScript(script: string, avatarName: AvatarName | null): Promise<void>;
@@ -140,7 +140,7 @@ export interface Genshin extends ClrHostValue {
140
140
  * @param y 目标 Y 坐标
141
141
  * @param forceCountry 强制先切换的大地图区域(`SwitchArea` OCR 文案),默认为 null
142
142
  * @returns 在任务完成后兑现的 Promise
143
- * @since unreleased
143
+ * @since 0.63.0
144
144
  */
145
145
  clickMapPoint(
146
146
  x: number | StrongNumeric<DoubleHost>,
@@ -282,13 +282,13 @@ export interface Genshin extends ClrHostValue {
282
282
  /**
283
283
  * 按槽位重组当前队伍角色
284
284
  * 未传入或空字符串的槽位跳过;重组队伍槽位角色,不是按数字键切换当前出战角色
285
- * 示例:`await genshin.switchCharacter("胡桃", "夜兰", "", "钟离")`
285
+ * 默认按队伍物理槽位解释;物理槽位示例:`await genshin.switchCharacter("胡桃", "夜兰", "", "钟离")`
286
286
  * @param slot1 1 号位角色名,空字符串表示跳过
287
287
  * @param slot2 2 号位角色名,空字符串表示跳过
288
288
  * @param slot3 3 号位角色名,空字符串表示跳过
289
289
  * @param slot4 4 号位角色名,空字符串表示跳过
290
290
  * @returns 在任务完成后兑现是否成功的 Promise;完成保存并返回主界面为 true,参数无效、目标角色未找到或流程失败为 false
291
- * @since unreleased
291
+ * @since 0.63.0
292
292
  */
293
293
  switchCharacter(): Promise<boolean>;
294
294
  switchCharacter(slot1: "" | AvatarName): Promise<boolean>;
@@ -304,6 +304,25 @@ export interface Genshin extends ClrHostValue {
304
304
  slot3: "" | AvatarName,
305
305
  slot4: "" | AvatarName
306
306
  ): Promise<boolean>;
307
+ /**
308
+ * 按槽位重组当前队伍角色
309
+ * `usePhysicalSlots` 为 true 时按队伍物理槽位解释 slot1-slot4,为 false 时按当前玩家可控角色顺序解释
310
+ * 可控顺序示例:`await genshin.switchCharacter("胡桃", "夜兰", "", "", false)`
311
+ * @param slot1 1 号位角色名,空字符串表示跳过
312
+ * @param slot2 2 号位角色名,空字符串表示跳过
313
+ * @param slot3 3 号位角色名,空字符串表示跳过
314
+ * @param slot4 4 号位角色名,空字符串表示跳过
315
+ * @param usePhysicalSlots 是否按队伍物理槽位解释,默认 true
316
+ * @returns 在任务完成后兑现是否成功的 Promise;完成保存并返回主界面为 true,参数无效、目标角色未找到或流程失败为 false
317
+ * @since 0.64.0
318
+ */
319
+ switchCharacter(
320
+ slot1: "" | AvatarName,
321
+ slot2: "" | AvatarName,
322
+ slot3: "" | AvatarName,
323
+ slot4: "" | AvatarName,
324
+ usePhysicalSlots: boolean
325
+ ): Promise<boolean>;
307
326
  /**
308
327
  * 清除当前调度器的队伍缓存
309
328
  * @returns ClearScript 宿主空结果
@@ -357,6 +376,13 @@ export interface Genshin extends ClrHostValue {
357
376
  * @since 0.43.1
358
377
  */
359
378
  goToCraftingBench(country: CountryName): Promise<void>;
379
+ /**
380
+ * 前往合成台并合成浓缩树脂
381
+ * @param country 国家名称
382
+ * @returns 在任务完成后兑现的 Promise
383
+ * @since 0.63.0
384
+ */
385
+ goCraftResin(country: CountryName): Promise<void>;
360
386
  /**
361
387
  * 在当前已打开的合成界面中合成指定材料
362
388
  * @param materialName 目标成品材料名
@@ -82,6 +82,7 @@ export interface AutoBossConfig
82
82
  | "specifyRunCount"
83
83
  | "strategyName"
84
84
  | "teamName"
85
+ | "timeout"
85
86
  | "useFragileResin"
86
87
  | "useTransientResin"
87
88
  >,
@@ -108,6 +109,11 @@ export interface AutoBossConfig
108
109
  * @since 0.62.0
109
110
  */
110
111
  rewardRecognitionEnabled: boolean;
112
+ /**
113
+ * 战斗超时时长,单位秒,默认 240
114
+ * @since 0.63.0
115
+ */
116
+ timeout: number;
111
117
  /**
112
118
  * 指定模式下成功领取奖励的目标次数
113
119
  * @since 0.62.0
@@ -29,6 +29,7 @@ export interface AutoBossParam extends Omit<
29
29
  | "specifyRunCount"
30
30
  | "strategyName"
31
31
  | "teamName"
32
+ | "timeout"
32
33
  | "useFragileResin"
33
34
  | "useTransientResin"
34
35
  > {
@@ -88,6 +89,11 @@ export interface AutoBossParam extends Omit<
88
89
  * @since 0.62.0
89
90
  */
90
91
  rewardRecognitionEnabled: boolean;
92
+ /**
93
+ * 战斗超时时长,单位秒,默认 240
94
+ * @since 0.63.0
95
+ */
96
+ timeout: number;
91
97
  /**
92
98
  * 从当前全局自动首领讨伐配置填充默认参数
93
99
  * @returns ClearScript 宿主空结果
@@ -66,6 +66,9 @@ export type DomainName =
66
66
  | "失落的月庭"
67
67
  | "月童的库藏"
68
68
  | "山风的荆冕"
69
+ | "荒坠的圣迹"
70
+ | "逆悬的冰河"
71
+ | "妄念的创痕"
69
72
  | "" // 未指定
70
73
  | (string & {});
71
74
 
@@ -1,11 +1,18 @@
1
1
  import "../../../CommunityToolkit/Mvvm/ComponentModel/ObservableObject";
2
2
  import type {
3
+ ClrHostValue,
4
+ EnumTypeTrait,
3
5
  HostType,
4
6
  PublicDefaultConstructorTrait,
5
7
  ReferenceTypeTrait
6
8
  } from "../../../Microsoft/ClearScript/HostType";
7
9
  import "../../../System/ComponentModel/INotifyPropertyChanged";
8
10
  import "../../../System/ComponentModel/INotifyPropertyChanging";
11
+ import "../../../System/Enum";
12
+ import "../../../System/IComparable";
13
+ import "../../../System/IConvertible";
14
+ import "../../../System/IFormattable";
15
+ import "../../../System/ISpanFormattable";
9
16
 
10
17
  /**
11
18
  * 精英掉落拾取模式
@@ -51,6 +58,9 @@ export interface AutoFightConfig
51
58
  | "actionSchedulerByCd"
52
59
  | "battleThresholdForLoot"
53
60
  | "burstEnabled"
61
+ | "damageNumberRecognitionMode"
62
+ | "drawRecognitionResults"
63
+ | "enableCombatTargeting"
54
64
  | "expBasedPickupEnabled"
55
65
  | "fightFinishDetectEnabled"
56
66
  | "finishDetectConfig"
@@ -59,6 +69,7 @@ export interface AutoFightConfig
59
69
  | "guardianCombatSkip"
60
70
  | "kazuhaPartyName"
61
71
  | "kazuhaPickupEnabled"
72
+ | "lockLostWaitTime"
62
73
  | "onlyPickEliteDropsMode"
63
74
  | "pickDropsAfterFightEnabled"
64
75
  | "pickDropsAfterFightSeconds"
@@ -67,6 +78,7 @@ export interface AutoFightConfig
67
78
  | "strategyName"
68
79
  | "swimmingEnabled"
69
80
  | "teamNames"
81
+ | "targetingDetectionInterval"
70
82
  | "timeout"
71
83
  >,
72
84
  System.ComponentModel.INotifyPropertyChangedInput,
@@ -172,6 +184,31 @@ export interface AutoFightConfig
172
184
  * @since 0.52.0
173
185
  */
174
186
  timeout: number;
187
+ /**
188
+ * 是否在战斗中持续尝试面朝敌人
189
+ * @since 0.63.0
190
+ */
191
+ enableCombatTargeting: boolean;
192
+ /**
193
+ * 敌人不可见后开始旋转索敌前的等待时长,单位秒,默认 0.5
194
+ * @since 0.63.0
195
+ */
196
+ lockLostWaitTime: number;
197
+ /**
198
+ * 索敌识别间隔,单位毫秒,默认 50
199
+ * @since 0.63.0
200
+ */
201
+ targetingDetectionInterval: number;
202
+ /**
203
+ * 伤害数字识别模式
204
+ * @since 0.63.0
205
+ */
206
+ damageNumberRecognitionMode: DamageNumberRecognitionMode;
207
+ /**
208
+ * 是否在遮罩窗口绘制血条、伤害数字等识别结果
209
+ * @since 0.63.0
210
+ */
211
+ drawRecognitionResults: boolean;
175
212
  }
176
213
 
177
214
  /**
@@ -186,13 +223,18 @@ export interface AutoFightConfig_FightFinishDetectConfig
186
223
  | "battleEndProgressBarColor"
187
224
  | "battleEndProgressBarColorTolerance"
188
225
  | "beforeDetectDelay"
226
+ | "blockCheckBeforeBattleSeconds"
227
+ | "checkAfterSwitchAvatar"
189
228
  | "checkBeforeBurst"
190
229
  | "checkEndDelay"
191
230
  | "fastCheckEnabled"
192
231
  | "fastCheckParams"
193
232
  | "isFirstCheck"
233
+ | "paimonEndCheckDelay"
234
+ | "paimonEndCheckEnabled"
194
235
  | "rotaryFactor"
195
236
  | "rotateFindEnemyEnabled"
237
+ | "skipFightEndCheckWhenEnemyVisible"
196
238
  >,
197
239
  System.ComponentModel.INotifyPropertyChangedInput,
198
240
  System.ComponentModel.INotifyPropertyChangingInput {
@@ -218,20 +260,25 @@ export interface AutoFightConfig_FightFinishDetectConfig
218
260
  */
219
261
  checkBeforeBurst: boolean;
220
262
  /**
221
- * 检查战斗结束前的延时,单位秒,可指定角色,格式如 `2.5;白术,1.5;钟离,1.0;`
263
+ * 触发战斗结束检查前的延时,单位秒,确保动作后摇结束;也可为角色单独指定,格式如 `0.4` 或 `0.4;钟离,1.5`
222
264
  * @since 0.52.0
223
265
  */
224
266
  checkEndDelay: string;
225
267
  /**
226
- * 是否启用快速检查战斗结束
268
+ * 是否启用快速检查战斗结束;完成一轮动作后若满足条件则触发一次检查,默认关闭
227
269
  * @since 0.52.0
228
270
  */
229
271
  fastCheckEnabled: boolean;
230
272
  /**
231
- * 快速检查参数,数字为间隔秒数,人名为该角色执行一轮后检查,分号分隔,例如 `15,白术;钟离;`
273
+ * 快速检查参数;数字为距上次检查的间隔秒数,人名为对应角色动作后触发,多项用分号分隔,格式如 `5` 或 `5;白术;`
232
274
  * @since 0.52.0
233
275
  */
234
276
  fastCheckParams: string;
277
+ /**
278
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
279
+ * @since 0.64.0
280
+ */
281
+ checkAfterSwitchAvatar: boolean;
235
282
  /**
236
283
  * 是否在首次检查时进行面敌
237
284
  * @since 0.52.0
@@ -247,6 +294,26 @@ export interface AutoFightConfig_FightFinishDetectConfig
247
294
  * @since 0.52.0
248
295
  */
249
296
  rotateFindEnemyEnabled: boolean;
297
+ /**
298
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
299
+ * @since 0.63.0
300
+ */
301
+ skipFightEndCheckWhenEnemyVisible: boolean;
302
+ /**
303
+ * 开战后阻断战斗结束检查的时长,单位秒;默认 0 不阻断,大于 0 时该时间内的检查视为战斗未结束
304
+ * @since 0.64.0
305
+ */
306
+ blockCheckBeforeBattleSeconds: number;
307
+ /**
308
+ * 是否启用派蒙辅助检测;按 L 后当派蒙头像可见时提前跳出战斗结束检测
309
+ * @since 0.64.0
310
+ */
311
+ paimonEndCheckEnabled: boolean;
312
+ /**
313
+ * 派蒙辅助检测延时,单位秒
314
+ * @since 0.64.0
315
+ */
316
+ paimonEndCheckDelay: number;
250
317
  }
251
318
 
252
319
  export interface AutoFightConfig_FightFinishDetectConfigHostType extends HostType<
@@ -271,6 +338,7 @@ declare global {
271
338
  namespace BetterGenshinImpact.GameTask.AutoFight {
272
339
  type AutoFightConfig = import("./AutoFightConfig").AutoFightConfig;
273
340
  type CombatStrategyName = import("./AutoFightConfig").CombatStrategyName;
341
+ type DamageNumberRecognitionMode = import("./AutoFightConfig").DamageNumberRecognitionMode;
274
342
  type OnlyPickEliteDropsMode = import("./AutoFightConfig").OnlyPickEliteDropsMode;
275
343
  type PartySlotIndex = import("./AutoFightConfig").PartySlotIndex;
276
344
  type StrategyFileKind = import("./AutoFightConfig").StrategyFileKind;
@@ -289,4 +357,34 @@ export interface AutoFightConfigHostType extends HostType<
289
357
  readonly FightFinishDetectConfig: AutoFightConfig_FightFinishDetectConfigHostType;
290
358
  }
291
359
 
360
+ /**
361
+ * 战斗索敌使用的伤害数字识别模式
362
+ * @since 0.63.0
363
+ */
364
+ declare const damageNumberRecognitionModeBrand: unique symbol;
365
+ export interface DamageNumberRecognitionMode extends ClrHostValue {
366
+ readonly [damageNumberRecognitionModeBrand]: true;
367
+ }
368
+
369
+ export interface DamageNumberRecognitionModeHostType extends HostType<
370
+ DamageNumberRecognitionMode,
371
+ EnumTypeTrait
372
+ > {
373
+ /**
374
+ * 禁用伤害数字识别
375
+ * @since 0.63.0
376
+ */
377
+ readonly disabled: DamageNumberRecognitionMode;
378
+ /**
379
+ * 使用 OCR 识别伤害数字
380
+ * @since 0.63.0
381
+ */
382
+ readonly ocr: DamageNumberRecognitionMode;
383
+ /**
384
+ * 使用颜色识别伤害数字
385
+ * @since 0.63.0
386
+ */
387
+ readonly color: DamageNumberRecognitionMode;
388
+ }
389
+
292
390
  export {};
@@ -10,6 +10,7 @@ import "../Model/BaseTaskParam";
10
10
  import "./AutoFightConfig";
11
11
  import type {
12
12
  CombatStrategyName,
13
+ DamageNumberRecognitionMode,
13
14
  OnlyPickEliteDropsMode,
14
15
  PartySlotIndex,
15
16
  StrategyFileKind
@@ -28,6 +29,9 @@ export interface AutoFightParam extends Omit<
28
29
  | "burstEnabled"
29
30
  | "checkBeforeBurst"
30
31
  | "combatStrategyPath"
32
+ | "damageNumberRecognitionMode"
33
+ | "drawRecognitionResults"
34
+ | "enableCombatTargeting"
31
35
  | "expBasedPickupEnabled"
32
36
  | "fightFinishDetectEnabled"
33
37
  | "finishDetectConfig"
@@ -37,6 +41,7 @@ export interface AutoFightParam extends Omit<
37
41
  | "isFirstCheck"
38
42
  | "kazuhaPartyName"
39
43
  | "kazuhaPickupEnabled"
44
+ | "lockLostWaitTime"
40
45
  | "onlyPickEliteDropsMode"
41
46
  | "pickDropsAfterFightEnabled"
42
47
  | "pickDropsAfterFightSeconds"
@@ -44,6 +49,7 @@ export interface AutoFightParam extends Omit<
44
49
  | "rotaryFactor"
45
50
  | "setCombatStrategyPath"
46
51
  | "setDefault"
52
+ | "targetingDetectionInterval"
47
53
  | "timeout"
48
54
  > {
49
55
  readonly [autoFightParamBrand]: true;
@@ -142,6 +148,31 @@ export interface AutoFightParam extends Omit<
142
148
  * @since 0.52.0
143
149
  */
144
150
  qinDoublePickUp: boolean;
151
+ /**
152
+ * 是否在战斗中持续尝试面朝敌人
153
+ * @since 0.63.0
154
+ */
155
+ enableCombatTargeting: boolean;
156
+ /**
157
+ * 索敌识别间隔,单位毫秒,默认 50
158
+ * @since 0.63.0
159
+ */
160
+ targetingDetectionInterval: number;
161
+ /**
162
+ * 是否在遮罩窗口绘制血条、伤害数字等识别结果
163
+ * @since 0.63.0
164
+ */
165
+ drawRecognitionResults: boolean;
166
+ /**
167
+ * 敌人不可见后开始旋转索敌前的等待时长,单位秒,默认 0.5
168
+ * @since 0.63.0
169
+ */
170
+ lockLostWaitTime: number;
171
+ /**
172
+ * 伤害数字识别模式
173
+ * @since 0.63.0
174
+ */
175
+ damageNumberRecognitionMode: DamageNumberRecognitionMode;
145
176
  /**
146
177
  * 是否仅在检测到精英怪经验值图标时执行战后拾取
147
178
  * @since 0.61.0
@@ -186,12 +217,17 @@ export interface AutoFightParam_FightFinishDetectConfig extends ClrHostValue {
186
217
  */
187
218
  fastCheckEnabled: boolean;
188
219
  /**
189
- * 快速检查参数,数字为间隔秒数,人名为该角色执行一轮后检查,分号分隔
220
+ * 快速检查参数;数字为距上次检查的间隔秒数,人名为对应角色动作后触发,多项用分号分隔
190
221
  * @since 0.52.0
191
222
  */
192
223
  fastCheckParams: string;
193
224
  /**
194
- * 检查战斗结束前的延时,单位秒,可指定角色
225
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
226
+ * @since 0.64.0
227
+ */
228
+ checkAfterSwitchAvatar: boolean;
229
+ /**
230
+ * 触发战斗结束检查前的延时,单位秒,确保动作后摇结束;也可为角色单独指定
195
231
  * @since 0.52.0
196
232
  */
197
233
  checkEndDelay: string;
@@ -205,6 +241,26 @@ export interface AutoFightParam_FightFinishDetectConfig extends ClrHostValue {
205
241
  * @since 0.52.0
206
242
  */
207
243
  rotateFindEnemyEnabled: boolean;
244
+ /**
245
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
246
+ * @since 0.63.0
247
+ */
248
+ skipFightEndCheckWhenEnemyVisible: boolean;
249
+ /**
250
+ * 开战后阻断战斗结束检查的时长,单位秒;默认 0 不阻断,大于 0 时该时间内的检查视为战斗未结束
251
+ * @since 0.64.0
252
+ */
253
+ blockCheckBeforeBattleSeconds: number;
254
+ /**
255
+ * 是否启用派蒙辅助检测;按 L 后当派蒙头像可见时提前跳出战斗结束检测
256
+ * @since 0.64.0
257
+ */
258
+ paimonEndCheckEnabled: boolean;
259
+ /**
260
+ * 派蒙辅助检测延时,单位秒
261
+ * @since 0.64.0
262
+ */
263
+ paimonEndCheckDelay: number;
208
264
  }
209
265
 
210
266
  export interface AutoFightParam_FightFinishDetectConfigHostType extends HostType<