@bettergi/types 0.1.17 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bettergi/types",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "BetterGI TypeScript 类型定义",
5
5
  "type": "module",
6
6
  "author": "Bread Grocery<https://github.com/breadgrocery>",
@@ -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 {};
@@ -282,7 +282,7 @@ 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 号位角色名,空字符串表示跳过
@@ -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 宿主空结果
@@ -66,6 +66,9 @@ export type DomainName =
66
66
  | "失落的月庭"
67
67
  | "月童的库藏"
68
68
  | "山风的荆冕"
69
+ | "荒坠的圣迹"
70
+ | "逆悬的冰河"
71
+ | "妄念的创痕"
69
72
  | "" // 未指定
70
73
  | (string & {});
71
74
 
@@ -223,11 +223,15 @@ export interface AutoFightConfig_FightFinishDetectConfig
223
223
  | "battleEndProgressBarColor"
224
224
  | "battleEndProgressBarColorTolerance"
225
225
  | "beforeDetectDelay"
226
+ | "blockCheckBeforeBattleSeconds"
227
+ | "checkAfterSwitchAvatar"
226
228
  | "checkBeforeBurst"
227
229
  | "checkEndDelay"
228
230
  | "fastCheckEnabled"
229
231
  | "fastCheckParams"
230
232
  | "isFirstCheck"
233
+ | "paimonEndCheckDelay"
234
+ | "paimonEndCheckEnabled"
231
235
  | "rotaryFactor"
232
236
  | "rotateFindEnemyEnabled"
233
237
  | "skipFightEndCheckWhenEnemyVisible"
@@ -256,20 +260,25 @@ export interface AutoFightConfig_FightFinishDetectConfig
256
260
  */
257
261
  checkBeforeBurst: boolean;
258
262
  /**
259
- * 检查战斗结束前的延时,单位秒,可指定角色,格式如 `2.5;白术,1.5;钟离,1.0;`
263
+ * 触发战斗结束检查前的延时,单位秒,确保动作后摇结束;也可为角色单独指定,格式如 `0.4` 或 `0.4;钟离,1.5`
260
264
  * @since 0.52.0
261
265
  */
262
266
  checkEndDelay: string;
263
267
  /**
264
- * 是否启用快速检查战斗结束
268
+ * 是否启用快速检查战斗结束;完成一轮动作后若满足条件则触发一次检查,默认关闭
265
269
  * @since 0.52.0
266
270
  */
267
271
  fastCheckEnabled: boolean;
268
272
  /**
269
- * 快速检查参数,数字为间隔秒数,人名为该角色执行一轮后检查,分号分隔,例如 `15,白术;钟离;`
273
+ * 快速检查参数;数字为距上次检查的间隔秒数,人名为对应角色动作后触发,多项用分号分隔,格式如 `5` 或 `5;白术;`
270
274
  * @since 0.52.0
271
275
  */
272
276
  fastCheckParams: string;
277
+ /**
278
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
279
+ * @since 0.64.0
280
+ */
281
+ checkAfterSwitchAvatar: boolean;
273
282
  /**
274
283
  * 是否在首次检查时进行面敌
275
284
  * @since 0.52.0
@@ -286,10 +295,25 @@ export interface AutoFightConfig_FightFinishDetectConfig
286
295
  */
287
296
  rotateFindEnemyEnabled: boolean;
288
297
  /**
289
- * 是否在敌人可见时跳过战斗结束检查;与旋转寻找敌人互斥
298
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
290
299
  * @since 0.63.0
291
300
  */
292
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;
293
317
  }
294
318
 
295
319
  export interface AutoFightConfig_FightFinishDetectConfigHostType extends HostType<
@@ -217,12 +217,17 @@ export interface AutoFightParam_FightFinishDetectConfig extends ClrHostValue {
217
217
  */
218
218
  fastCheckEnabled: boolean;
219
219
  /**
220
- * 快速检查参数,数字为间隔秒数,人名为该角色执行一轮后检查,分号分隔
220
+ * 快速检查参数;数字为距上次检查的间隔秒数,人名为对应角色动作后触发,多项用分号分隔
221
221
  * @since 0.52.0
222
222
  */
223
223
  fastCheckParams: string;
224
224
  /**
225
- * 检查战斗结束前的延时,单位秒,可指定角色
225
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
226
+ * @since 0.64.0
227
+ */
228
+ checkAfterSwitchAvatar: boolean;
229
+ /**
230
+ * 触发战斗结束检查前的延时,单位秒,确保动作后摇结束;也可为角色单独指定
226
231
  * @since 0.52.0
227
232
  */
228
233
  checkEndDelay: string;
@@ -237,10 +242,25 @@ export interface AutoFightParam_FightFinishDetectConfig extends ClrHostValue {
237
242
  */
238
243
  rotateFindEnemyEnabled: boolean;
239
244
  /**
240
- * 是否在敌人可见时跳过战斗结束检查
245
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
241
246
  * @since 0.63.0
242
247
  */
243
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;
244
264
  }
245
265
 
246
266
  export interface AutoFightParam_FightFinishDetectConfigHostType extends HostType<
@@ -5,7 +5,13 @@ import type {
5
5
  ReferenceTypeTrait,
6
6
  StrongNumeric
7
7
  } from "../../../Microsoft/ClearScript/HostType";
8
+ import type { HostVariableOut } from "../../../Microsoft/ClearScript/HostVariable";
9
+ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
10
+ import "../../../System/Collections/Generic/Dictionary";
11
+ import "../../../System/Collections/Generic/List";
12
+ import "../../../System/DateTime";
8
13
  import "../../../System/Threading/CancellationToken";
14
+ import "../../../System/ValueTuple";
9
15
  import "../AutoPathing/Model/WaypointForTrack";
10
16
  import "../ISoloTask";
11
17
  import "./AutoFightParam";
@@ -51,6 +57,132 @@ export interface AutoFightTask extends ClrHostValue, BetterGenshinImpact.GameTas
51
57
  ): Promise<boolean>;
52
58
  }
53
59
 
60
+ /**
61
+ * 战斗结束检测的运行时配置,由自动战斗参数解析而来,供 TXT 与 JSON 策略共用
62
+ * @since 0.64.0
63
+ */
64
+ declare const autoFightTask_TaskFightFinishDetectConfigBrand: unique symbol;
65
+ export interface AutoFightTask_TaskFightFinishDetectConfig extends ClrHostValue {
66
+ readonly [autoFightTask_TaskFightFinishDetectConfigBrand]: true;
67
+ /**
68
+ * 检查战斗结束前的默认延时,单位毫秒,默认 1500
69
+ * @since 0.64.0
70
+ */
71
+ delayTime: number;
72
+ /**
73
+ * 按下切换队伍后检测色块的延时,单位毫秒,默认 450
74
+ * @since 0.64.0
75
+ */
76
+ detectDelayTime: number;
77
+ /**
78
+ * 按角色名覆盖的检查延时,单位毫秒
79
+ * @since 0.64.0
80
+ */
81
+ delayTimes: System.Collections.Generic.Dictionary<string, number>;
82
+ /**
83
+ * 快速检查间隔,单位秒,默认 5
84
+ * @since 0.64.0
85
+ */
86
+ checkTime: number;
87
+ /**
88
+ * 触发快速检查的角色名列表
89
+ * @since 0.64.0
90
+ */
91
+ checkNames: System.Collections.Generic.List<string>;
92
+ /**
93
+ * 是否启用快速检查战斗结束
94
+ * @since 0.64.0
95
+ */
96
+ fastCheckEnabled: boolean;
97
+ /**
98
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
99
+ * @since 0.64.0
100
+ */
101
+ checkAfterSwitchAvatar: boolean;
102
+ /**
103
+ * 是否启用旋转寻找敌人
104
+ * @since 0.64.0
105
+ */
106
+ rotateFindEnemyEnabled: boolean;
107
+ /**
108
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
109
+ * @since 0.64.0
110
+ */
111
+ skipFightEndCheckWhenEnemyVisible: boolean;
112
+ /**
113
+ * 开战后阻断战斗结束检查的时长,单位秒;默认 0 不阻断,大于 0 时该时间内的检查视为战斗未结束
114
+ * @since 0.64.0
115
+ */
116
+ blockCheckBeforeBattleSeconds: number;
117
+ /**
118
+ * 是否启用派蒙辅助检测;按 L 后当派蒙头像可见时提前跳出战斗结束检测
119
+ * @since 0.64.0
120
+ */
121
+ paimonEndCheckEnabled: boolean;
122
+ /**
123
+ * 派蒙辅助检测延时,单位毫秒
124
+ * @since 0.64.0
125
+ */
126
+ paimonEndCheckDelayMs: number;
127
+ /**
128
+ * 判断战斗结束的进度条颜色,RGB 三元组
129
+ * @since 0.64.0
130
+ */
131
+ readonly battleEndProgressBarColor: System.ValueTuple<number, number, number>;
132
+ /**
133
+ * 战斗结束进度条颜色容差,RGB 三元组
134
+ * @since 0.64.0
135
+ */
136
+ readonly battleEndProgressBarColorTolerance: System.ValueTuple<number, number, number>;
137
+ }
138
+
139
+ export interface AutoFightTask_TaskFightFinishDetectConfigHostType extends HostType<
140
+ AutoFightTask_TaskFightFinishDetectConfig,
141
+ ReferenceTypeTrait
142
+ > {
143
+ /**
144
+ * 由自动战斗参数中的战斗结束检测配置构造运行时配置
145
+ * @param finishDetectConfig 自动战斗参数中的战斗结束检测配置
146
+ * @since 0.64.0
147
+ */
148
+ new (
149
+ finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam.FightFinishDetectConfig
150
+ ): AutoFightTask_TaskFightFinishDetectConfig;
151
+ /**
152
+ * 解析快速检查参数字符串
153
+ * @param input 快速检查参数;数字为间隔秒数,人名为对应角色动作后触发,分号分隔
154
+ * @param checkTime 解析得到的检查间隔秒数
155
+ * @param names 解析得到的角色名列表,方法会追加去重后的人名
156
+ * @returns ClearScript 宿主空结果
157
+ * @since 0.64.0
158
+ */
159
+ parseCheckTimeString(
160
+ input: string,
161
+ checkTime: HostVariableOut<number>,
162
+ names: System.Collections.Generic.List<string>
163
+ ): VoidResult;
164
+ /**
165
+ * 解析检查结束延时字符串
166
+ * @param input 延时配置;纯数字为默认秒数,`名字,秒数` 为角色覆盖,分号分隔
167
+ * @param delayTime 解析得到的默认延时,单位毫秒
168
+ * @param nameDelayMap 角色名到延时毫秒的映射,方法会写入覆盖值
169
+ * @returns ClearScript 宿主空结果
170
+ * @since 0.64.0
171
+ */
172
+ parseFastCheckEndDelayString(
173
+ input: string,
174
+ delayTime: HostVariableOut<number>,
175
+ nameDelayMap: System.Collections.Generic.Dictionary<string, number>
176
+ ): VoidResult;
177
+ }
178
+
179
+ declare global {
180
+ namespace BetterGenshinImpact.GameTask.AutoFight.AutoFightTask {
181
+ type TaskFightFinishDetectConfig =
182
+ import("./AutoFightTask").AutoFightTask_TaskFightFinishDetectConfig;
183
+ }
184
+ }
185
+
54
186
  declare global {
55
187
  namespace BetterGenshinImpact.GameTask.AutoFight {
56
188
  type AutoFightTask = import("./AutoFightTask").AutoFightTask;
@@ -64,6 +196,12 @@ export interface AutoFightTaskHostType extends HostType<AutoFightTask, Reference
64
196
  * @since 0.52.0
65
197
  */
66
198
  new (taskParam: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam): AutoFightTask;
199
+ /**
200
+ * 重置「敌人可见时跳过战斗结束检查」的连续跳过计数;每场战斗开始时调用,TXT 与 JSON 策略共用
201
+ * @returns ClearScript 宿主空结果
202
+ * @since 0.64.0
203
+ */
204
+ resetSkipCheckCounter(): VoidResult;
67
205
  /**
68
206
  * 全局战斗进行中标志
69
207
  * @since 0.52.0
@@ -74,6 +212,41 @@ export interface AutoFightTaskHostType extends HostType<AutoFightTask, Reference
74
212
  * @since 0.52.0
75
213
  */
76
214
  fightWaypoint: BetterGenshinImpact.GameTask.AutoPathing.Model.WaypointForTrack;
215
+ /**
216
+ * 最近一次战斗结束检查的时间;TXT 与 JSON 策略共用,供更快触发检查判断间隔
217
+ * @since 0.64.0
218
+ */
219
+ lastFightFinishCheckTime: System.DateTime;
220
+ /**
221
+ * 本次战斗的开战时间;TXT 与 JSON 策略共用,供开战后一段时间阻断战斗结束检查
222
+ * @since 0.64.0
223
+ */
224
+ fightStartTime: System.DateTime;
225
+ /**
226
+ * 检查战斗是否已结束;TXT 与 JSON 策略共用的统一实现
227
+ * @param finishDetectConfig 战斗结束检测运行时配置
228
+ * @param ct 取消令牌
229
+ * @param delayTime 检查前延时,单位毫秒,默认 1500
230
+ * @param detectDelayTime 切换队伍后检测色块的延时,单位毫秒,默认 450
231
+ * @returns 在检测完成后兑现是否结束的 Promise
232
+ * @since 0.64.0
233
+ */
234
+ checkFightFinish(
235
+ finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.AutoFightTask.TaskFightFinishDetectConfig,
236
+ ct: System.Threading.CancellationToken
237
+ ): Promise<boolean>;
238
+ checkFightFinish(
239
+ finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.AutoFightTask.TaskFightFinishDetectConfig,
240
+ ct: System.Threading.CancellationToken,
241
+ delayTime: number | StrongNumeric<Int32Host>
242
+ ): Promise<boolean>;
243
+ checkFightFinish(
244
+ finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.AutoFightTask.TaskFightFinishDetectConfig,
245
+ ct: System.Threading.CancellationToken,
246
+ delayTime: number | StrongNumeric<Int32Host>,
247
+ detectDelayTime: number | StrongNumeric<Int32Host>
248
+ ): Promise<boolean>;
249
+ readonly TaskFightFinishDetectConfig: AutoFightTask_TaskFightFinishDetectConfigHostType;
77
250
  }
78
251
 
79
252
  export {};
@@ -123,8 +123,8 @@ export type AvatarName =
123
123
  | "丝柯克"
124
124
  | "塔利雅"
125
125
  | "伊涅芙"
126
- | "奇偶(男)"
127
- | "奇偶(女)"
126
+ | "奇偶·男性"
127
+ | "奇偶·女性"
128
128
  | "菈乌玛"
129
129
  | "菲林斯"
130
130
  | "爱诺"
@@ -150,13 +150,18 @@ export interface AutoLeyLineOutcropFightConfig_FightFinishDetectConfig
150
150
  | "battleEndProgressBarColor"
151
151
  | "battleEndProgressBarColorTolerance"
152
152
  | "beforeDetectDelay"
153
+ | "blockCheckBeforeBattleSeconds"
154
+ | "checkAfterSwitchAvatar"
153
155
  | "checkBeforeBurst"
154
156
  | "checkEndDelay"
155
157
  | "fastCheckEnabled"
156
158
  | "fastCheckParams"
157
159
  | "isFirstCheck"
160
+ | "paimonEndCheckDelay"
161
+ | "paimonEndCheckEnabled"
158
162
  | "rotaryFactor"
159
163
  | "rotateFindEnemyEnabled"
164
+ | "skipFightEndCheckWhenEnemyVisible"
160
165
  >,
161
166
  System.ComponentModel.INotifyPropertyChangedInput,
162
167
  System.ComponentModel.INotifyPropertyChangingInput {
@@ -196,6 +201,11 @@ export interface AutoLeyLineOutcropFightConfig_FightFinishDetectConfig
196
201
  * @since 0.58.0
197
202
  */
198
203
  fastCheckParams: string;
204
+ /**
205
+ * 是否在切人后再执行战斗结束检查;无需等待上一动作后摇,目前仅 JSON 策略下生效
206
+ * @since 0.64.0
207
+ */
208
+ checkAfterSwitchAvatar: boolean;
199
209
  /**
200
210
  * 是否在首次检查时进行面敌
201
211
  * @since 0.58.0
@@ -211,6 +221,26 @@ export interface AutoLeyLineOutcropFightConfig_FightFinishDetectConfig
211
221
  * @since 0.58.0
212
222
  */
213
223
  rotateFindEnemyEnabled: boolean;
224
+ /**
225
+ * 是否在敌人可见时跳过战斗结束检查;检测到敌人血条时跳过,与旋转寻找敌人互斥
226
+ * @since 0.64.0
227
+ */
228
+ skipFightEndCheckWhenEnemyVisible: boolean;
229
+ /**
230
+ * 开战后阻断战斗结束检查的时长,单位秒;默认 0 不阻断,大于 0 时该时间内的检查视为战斗未结束
231
+ * @since 0.64.0
232
+ */
233
+ blockCheckBeforeBattleSeconds: number;
234
+ /**
235
+ * 是否启用派蒙辅助检测;按 L 后当派蒙头像可见时提前跳出战斗结束检测
236
+ * @since 0.64.0
237
+ */
238
+ paimonEndCheckEnabled: boolean;
239
+ /**
240
+ * 派蒙辅助检测延时,单位秒
241
+ * @since 0.64.0
242
+ */
243
+ paimonEndCheckDelay: number;
214
244
  }
215
245
 
216
246
  export interface AutoLeyLineOutcropFightConfig_FightFinishDetectConfigHostType extends HostType<
@@ -56,6 +56,8 @@ export type HurryOnAvatar =
56
56
  | "流浪者"
57
57
  | "伊法"
58
58
  | "希诺宁"
59
+ | "法尔伽"
60
+ | "夜兰"
59
61
  | (string & {});
60
62
 
61
63
  /**