@bettergi/types 0.1.11 → 0.1.13
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/index.d.ts +7 -0
- package/objects/dispatcher.d.ts +31 -1
- package/objects/file.d.ts +22 -0
- package/objects/globalMethod.d.ts +6 -0
- package/objects/host.d.ts +363 -0
- package/objects/pathingScript.d.ts +29 -0
- package/package.json +1 -1
- package/types/BetterGenshinImpact/Core/BgiVision/BvImage.d.ts +21 -0
- package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +64 -0
- package/types/BetterGenshinImpact/Core/BgiVision/BvPage.d.ts +64 -0
- package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +6 -0
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +50 -0
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +73 -0
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.d.ts +24 -0
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/FightFinishDetectConfig.d.ts +39 -0
- package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +6 -0
- package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +39 -0
- package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +72 -0
- package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtTask.d.ts +24 -0
package/index.d.ts
CHANGED
|
@@ -56,9 +56,16 @@
|
|
|
56
56
|
// 任务参数
|
|
57
57
|
/// <reference path="./types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts" />
|
|
58
58
|
/// <reference path="./types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts" />
|
|
59
|
+
/// <reference path="./types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts" />
|
|
60
|
+
/// <reference path="./types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts" />
|
|
59
61
|
|
|
60
62
|
// 键鼠回调
|
|
61
63
|
/// <reference path="./types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts" />
|
|
62
64
|
|
|
65
|
+
// BvPage类
|
|
66
|
+
/// <reference path="./types/BetterGenshinImpact/Core/BgiVision/BvPage.d.ts" />
|
|
67
|
+
/// <reference path="./types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts" />
|
|
68
|
+
/// <reference path="./types/BetterGenshinImpact/Core/BgiVision/BvImage.d.ts" />
|
|
69
|
+
|
|
63
70
|
/// 设置
|
|
64
71
|
/// <reference path="./objects/settings.d.ts" />
|
package/objects/dispatcher.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import "../types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer"
|
|
|
2
2
|
import "../types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask";
|
|
3
3
|
import "../types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam";
|
|
4
4
|
import "../types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam";
|
|
5
|
+
import "../types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam";
|
|
6
|
+
import "../types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam";
|
|
5
7
|
import "../types/System/Threading/CancellationToken";
|
|
6
8
|
import "../types/System/Threading/CancellationTokenSource";
|
|
7
9
|
|
|
@@ -82,7 +84,7 @@ declare global {
|
|
|
82
84
|
|
|
83
85
|
/**
|
|
84
86
|
* 运行自动战斗任务
|
|
85
|
-
* @param param
|
|
87
|
+
* @param param 任务参数
|
|
86
88
|
* @since 0.52.0
|
|
87
89
|
*/
|
|
88
90
|
function runAutoFightTask(
|
|
@@ -93,6 +95,34 @@ declare global {
|
|
|
93
95
|
param: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam,
|
|
94
96
|
customCt: System.Threading.CancellationToken | null
|
|
95
97
|
): Promise<void>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 运行自动地脉花任务
|
|
101
|
+
* @param param 任务参数
|
|
102
|
+
* @since 0.57.0
|
|
103
|
+
*/
|
|
104
|
+
function runAutoLeyLineOutcropTask(
|
|
105
|
+
param: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropParam
|
|
106
|
+
): Promise<void>;
|
|
107
|
+
// overload
|
|
108
|
+
function runAutoLeyLineOutcropTask(
|
|
109
|
+
param: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropParam,
|
|
110
|
+
customCt: System.Threading.CancellationToken | null
|
|
111
|
+
): Promise<void>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 运行自动幽境危战任务
|
|
115
|
+
* @param param 任务参数
|
|
116
|
+
* @since 0.58.0
|
|
117
|
+
*/
|
|
118
|
+
function runAutoStygianOnslaughtTask(
|
|
119
|
+
param: BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtParam
|
|
120
|
+
): Promise<void>;
|
|
121
|
+
// overload
|
|
122
|
+
function runAutoStygianOnslaughtTask(
|
|
123
|
+
param: BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtParam,
|
|
124
|
+
customCt: System.Threading.CancellationToken | null
|
|
125
|
+
): Promise<void>;
|
|
96
126
|
}
|
|
97
127
|
}
|
|
98
128
|
|
package/objects/file.d.ts
CHANGED
|
@@ -17,6 +17,20 @@ declare global {
|
|
|
17
17
|
*/
|
|
18
18
|
function isFolder(path: string): boolean;
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* 判断指定路径是否为文件
|
|
22
|
+
* @param path 文件路径(相对于脚本根目录)
|
|
23
|
+
* @since 0.58.0
|
|
24
|
+
*/
|
|
25
|
+
function isFile(path: string): boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 判断指定的文件或目录是否存在
|
|
29
|
+
* @param path 文件路径(相对于脚本根目录)
|
|
30
|
+
* @since 0.58.0
|
|
31
|
+
*/
|
|
32
|
+
function isExists(path: string): boolean;
|
|
33
|
+
|
|
20
34
|
/**
|
|
21
35
|
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`, `.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.webp`)
|
|
22
36
|
* @param path 文件路径(相对于脚本根目录)
|
|
@@ -110,6 +124,14 @@ declare global {
|
|
|
110
124
|
* @since 0.48.2
|
|
111
125
|
*/
|
|
112
126
|
function writeImageSync(path: string, mat: Mat): boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 重命名文件或文件夹(相对于根目录)
|
|
130
|
+
* @param oldPath 旧文件路径
|
|
131
|
+
* @param newPath 新文件路径
|
|
132
|
+
* @since 0.59.1
|
|
133
|
+
*/
|
|
134
|
+
function renamePathSync(oldPath: string, newPath: string): boolean;
|
|
113
135
|
}
|
|
114
136
|
}
|
|
115
137
|
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
/** @since 0.58.0 */
|
|
3
|
+
namespace host {
|
|
4
|
+
/**
|
|
5
|
+
* 创建一个空的动态对象
|
|
6
|
+
* @returns 新的空对象,支持动态属性添加和移除
|
|
7
|
+
* @since 0.58.0
|
|
8
|
+
*/
|
|
9
|
+
function newObj(): any;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 创建指定类型的对象实例(泛型版本)
|
|
13
|
+
* @typeparam T 要创建的对象类型
|
|
14
|
+
* @param args 可选的构造函数参数
|
|
15
|
+
* @returns 指定类型的新对象实例
|
|
16
|
+
* @since 0.58.0
|
|
17
|
+
*/
|
|
18
|
+
function newObj<T>(...args: any[]): T;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 创建指定类型的对象实例(非泛型版本)
|
|
22
|
+
* @param type 对象的类型
|
|
23
|
+
* @param args 可选的构造函数参数
|
|
24
|
+
* @returns 指定类型的新对象实例
|
|
25
|
+
* @since 0.58.0
|
|
26
|
+
*/
|
|
27
|
+
function newObj(type: any, ...args: any[]): any;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 创建动态实例
|
|
31
|
+
* @param target 提供实例化操作的动态主对象
|
|
32
|
+
* @param args 可选的实例化参数
|
|
33
|
+
* @returns 操作结果,通常是一个新的动态主对象
|
|
34
|
+
* @since 0.58.0
|
|
35
|
+
*/
|
|
36
|
+
function newObj(target: any, ...args: any[]): any;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 创建指定元素类型的数组(泛型版本)
|
|
40
|
+
* @typeparam T 数组元素类型
|
|
41
|
+
* @param lengths 一个或多个整数,表示数组各维度的长度
|
|
42
|
+
* @returns 指定元素类型的新数组实例
|
|
43
|
+
* @since 0.58.0
|
|
44
|
+
*/
|
|
45
|
+
function newArr<T>(...lengths: number[]): T[];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 创建元素类型为 Object 的数组
|
|
49
|
+
* @param lengths 一个或多个整数,表示数组各维度的长度
|
|
50
|
+
* @returns 元素类型为 Object 的新数组实例
|
|
51
|
+
* @since 0.58.0
|
|
52
|
+
*/
|
|
53
|
+
function newArr(...lengths: number[]): any[];
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 创建指定类型的强类型变量
|
|
57
|
+
* @typeparam T 变量类型
|
|
58
|
+
* @param initValue 可选的初始值
|
|
59
|
+
* @returns 新的强类型变量,支持 value、out、ref 属性
|
|
60
|
+
* @since 0.58.0
|
|
61
|
+
*/
|
|
62
|
+
function newVar<T>(initValue?: T): any;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 创建调用脚本函数的委托
|
|
66
|
+
* @typeparam T 要创建的委托类型
|
|
67
|
+
* @param scriptFunc 脚本函数
|
|
68
|
+
* @returns 调用指定脚本函数的新委托
|
|
69
|
+
* @since 0.58.0
|
|
70
|
+
*/
|
|
71
|
+
function del<T>(scriptFunc: any): T;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 创建不返回值的委托
|
|
75
|
+
* @param argCount 传递给脚本函数的参数数量
|
|
76
|
+
* @param scriptFunc 脚本函数
|
|
77
|
+
* @returns 调用指定脚本函数且不返回值的新委托
|
|
78
|
+
* @since 0.58.0
|
|
79
|
+
*/
|
|
80
|
+
function proc(argCount: number, scriptFunc: any): any;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 创建返回指定类型值的委托
|
|
84
|
+
* @typeparam T 返回值类型
|
|
85
|
+
* @param argCount 传递给脚本函数的参数数量
|
|
86
|
+
* @param scriptFunc 脚本函数
|
|
87
|
+
* @returns 调用指定脚本函数并返回指定类型值的新委托
|
|
88
|
+
* @since 0.58.0
|
|
89
|
+
*/
|
|
90
|
+
function func<T>(argCount: number, scriptFunc: any): any;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 创建返回其结果值的委托
|
|
94
|
+
* @param argCount 传递给脚本函数的参数数量
|
|
95
|
+
* @param scriptFunc 脚本函数
|
|
96
|
+
* @returns 调用指定脚本函数并返回其结果的新委托
|
|
97
|
+
* @since 0.58.0
|
|
98
|
+
*/
|
|
99
|
+
function func(argCount: number, scriptFunc: any): any;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 获取指定主类型的 Type 对象(泛型版本)
|
|
103
|
+
* @typeparam T 要获取 Type 的主类型
|
|
104
|
+
* @returns 指定主类型的 Type 对象
|
|
105
|
+
* @throws 当脚本引擎的 AllowReflection 属性设置为 false 时抛出异常
|
|
106
|
+
* @since 0.58.0
|
|
107
|
+
*/
|
|
108
|
+
function typeOf<T>(): any;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 获取指定主类型的 Type 对象(非泛型版本)
|
|
112
|
+
* @param value 要获取 Type 的主类型
|
|
113
|
+
* @returns 指定主类型的 Type 对象
|
|
114
|
+
* @throws 当脚本引擎的 AllowReflection 属性设置为 false 时抛出异常
|
|
115
|
+
* @since 0.58.0
|
|
116
|
+
*/
|
|
117
|
+
function typeOf(value: any): any;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 判断对象是否与指定的主类型兼容
|
|
121
|
+
* @typeparam T 要测试兼容性的主类型
|
|
122
|
+
* @param value 要测试的对象
|
|
123
|
+
* @returns 如果对象与指定类型兼容则返回 true,否则返回 false
|
|
124
|
+
* @since 0.58.0
|
|
125
|
+
*/
|
|
126
|
+
function isType<T>(value: any): boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 将对象转换为指定的主类型,转换失败时返回 null
|
|
130
|
+
* @typeparam T 要转换的主类型
|
|
131
|
+
* @param value 要转换的对象
|
|
132
|
+
* @returns 转换成功返回结果,转换失败返回 null
|
|
133
|
+
* @since 0.58.0
|
|
134
|
+
*/
|
|
135
|
+
function asType<T>(value: any): T | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 将对象强制转换为指定的主类型
|
|
139
|
+
* @typeparam T 要转换的主类型
|
|
140
|
+
* @param value 要转换的对象
|
|
141
|
+
* @returns 转换后的结果
|
|
142
|
+
* @throws 转换失败时抛出异常
|
|
143
|
+
* @since 0.58.0
|
|
144
|
+
*/
|
|
145
|
+
function cast<T>(value: any): T;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 判断对象是否为主类型(非泛型版本)
|
|
149
|
+
* @param value 要测试的对象
|
|
150
|
+
* @returns 如果对象是主类型则返回 true,否则返回 false
|
|
151
|
+
* @since 0.58.0
|
|
152
|
+
*/
|
|
153
|
+
function isTypeObj(value: any): boolean;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 判断对象是否为主类型(泛型版本)
|
|
157
|
+
* @typeparam T 主类型(被忽略)
|
|
158
|
+
* @returns 始终返回 true
|
|
159
|
+
* @since 0.58.0
|
|
160
|
+
*/
|
|
161
|
+
function isTypeObj<T>(): boolean;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* 判断指定值是否为 null
|
|
165
|
+
* @param value 要测试的值
|
|
166
|
+
* @returns 如果值为 null 则返回 true,否则返回 false
|
|
167
|
+
* @since 0.58.0
|
|
168
|
+
*/
|
|
169
|
+
function isNull(value: any): boolean;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 创建强类型的标志集合
|
|
173
|
+
* @typeparam T 标志集合的类型
|
|
174
|
+
* @param args 要包含在标志集合中的标志
|
|
175
|
+
* @returns 包含指定标志的强类型标志集合
|
|
176
|
+
* @throws 如果 T 不是标志集合类型则抛出异常
|
|
177
|
+
* @since 0.58.0
|
|
178
|
+
*/
|
|
179
|
+
function flags<T>(...args: T[]): T;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 将指定值转换为强类型的 SByte 实例
|
|
183
|
+
* @param value 要转换的值
|
|
184
|
+
* @returns 可以传递给 SByte 参数的对象
|
|
185
|
+
* @since 0.58.0
|
|
186
|
+
*/
|
|
187
|
+
function toSByte(value: any): any;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 将指定值转换为强类型的 Byte 实例
|
|
191
|
+
* @param value 要转换的值
|
|
192
|
+
* @returns 可以传递给 Byte 参数的对象
|
|
193
|
+
* @since 0.58.0
|
|
194
|
+
*/
|
|
195
|
+
function toByte(value: any): any;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 将指定值转换为强类型的 Int16 实例
|
|
199
|
+
* @param value 要转换的值
|
|
200
|
+
* @returns 可以传递给 Int16 参数的对象
|
|
201
|
+
* @since 0.58.0
|
|
202
|
+
*/
|
|
203
|
+
function toInt16(value: any): any;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 将指定值转换为强类型的 UInt16 实例
|
|
207
|
+
* @param value 要转换的值
|
|
208
|
+
* @returns 可以传递给 UInt16 参数的对象
|
|
209
|
+
* @since 0.58.0
|
|
210
|
+
*/
|
|
211
|
+
function toUInt16(value: any): any;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 将指定值转换为强类型的 Char 实例
|
|
215
|
+
* @param value 要转换的值
|
|
216
|
+
* @returns 可以传递给 Char 参数的对象
|
|
217
|
+
* @since 0.58.0
|
|
218
|
+
*/
|
|
219
|
+
function toChar(value: any): any;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* 将指定值转换为强类型的 Int32 实例
|
|
223
|
+
* @param value 要转换的值
|
|
224
|
+
* @returns 可以传递给 Int32 参数的对象
|
|
225
|
+
* @since 0.58.0
|
|
226
|
+
*/
|
|
227
|
+
function toInt32(value: any): any;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* 将指定值转换为强类型的 UInt32 实例
|
|
231
|
+
* @param value 要转换的值
|
|
232
|
+
* @returns 可以传递给 UInt32 参数的对象
|
|
233
|
+
* @since 0.58.0
|
|
234
|
+
*/
|
|
235
|
+
function toUInt32(value: any): any;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 将指定值转换为强类型的 Int64 实例
|
|
239
|
+
* @param value 要转换的值
|
|
240
|
+
* @returns 可以传递给 Int64 参数的对象
|
|
241
|
+
* @since 0.58.0
|
|
242
|
+
*/
|
|
243
|
+
function toInt64(value: any): any;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* 将指定值转换为强类型的 UInt64 实例
|
|
247
|
+
* @param value 要转换的值
|
|
248
|
+
* @returns 可以传递给 UInt64 参数的对象
|
|
249
|
+
* @since 0.58.0
|
|
250
|
+
*/
|
|
251
|
+
function toUInt64(value: any): any;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* 将指定值转换为强类型的 Single (float) 实例
|
|
255
|
+
* @param value 要转换的值
|
|
256
|
+
* @returns 可以传递给 Single 参数的对象
|
|
257
|
+
* @since 0.58.0
|
|
258
|
+
*/
|
|
259
|
+
function toSingle(value: any): any;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* 将指定值转换为强类型的 Double 实例
|
|
263
|
+
* @param value 要转换的值
|
|
264
|
+
* @returns 可以传递给 Double 参数的对象
|
|
265
|
+
* @since 0.58.0
|
|
266
|
+
*/
|
|
267
|
+
function toDouble(value: any): any;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* 将指定值转换为强类型的 Decimal 实例
|
|
271
|
+
* @param value 要转换的值
|
|
272
|
+
* @returns 可以传递给 Decimal 参数的对象
|
|
273
|
+
* @since 0.58.0
|
|
274
|
+
*/
|
|
275
|
+
function toDecimal(value: any): any;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* 获取实现 IPropertyBag 的动态主对象中属性的值
|
|
279
|
+
* @param target 包含要获取的属性的动态主对象
|
|
280
|
+
* @param name 要获取的属性名
|
|
281
|
+
* @returns 指定属性的值
|
|
282
|
+
* @since 0.58.0
|
|
283
|
+
*/
|
|
284
|
+
function getProperty(target: any, name: string): any;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* 设置实现 IPropertyBag 的动态主对象中属性的值
|
|
288
|
+
* @param target 包含要设置的属性的动态主对象
|
|
289
|
+
* @param name 要设置的属性名
|
|
290
|
+
* @param value 属性的新值
|
|
291
|
+
* @returns 操作结果,通常是分配给指定属性的值
|
|
292
|
+
* @since 0.58.0
|
|
293
|
+
*/
|
|
294
|
+
function setProperty(target: any, name: string, value: any): any;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* 从实现 IPropertyBag 的动态主对象中移除属性
|
|
298
|
+
* @param target 包含要移除的属性的动态主对象
|
|
299
|
+
* @param name 要移除的属性名
|
|
300
|
+
* @returns 如果属性被找到并移除则返回 true,否则返回 false
|
|
301
|
+
* @since 0.58.0
|
|
302
|
+
*/
|
|
303
|
+
function removeProperty(target: any, name: string): boolean;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* 获取实现 IDynamicMetaObjectProvider 的动态主对象中元素的值
|
|
307
|
+
* @param target 包含要获取的元素的动态主对象
|
|
308
|
+
* @param indices 一个或多个用于标识元素的索引
|
|
309
|
+
* @returns 指定元素的值
|
|
310
|
+
* @since 0.58.0
|
|
311
|
+
*/
|
|
312
|
+
function getElement(target: any, ...indices: any[]): any;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 设置实现 IDynamicMetaObjectProvider 的动态主对象中元素的值
|
|
316
|
+
* @param target 包含要设置的元素的动态主对象
|
|
317
|
+
* @param value 元素的新值
|
|
318
|
+
* @param indices 一个或多个用于标识元素的索引
|
|
319
|
+
* @returns 操作结果,通常是分配给指定元素的值
|
|
320
|
+
* @since 0.58.0
|
|
321
|
+
*/
|
|
322
|
+
function setElement(target: any, value: any, ...indices: any[]): any;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* 从实现 IDynamicMetaObjectProvider 的动态主对象中移除元素
|
|
326
|
+
* @param target 包含要移除的元素的动态主对象
|
|
327
|
+
* @param indices 一个或多个用于标识元素的索引
|
|
328
|
+
* @returns 如果元素被找到并移除则返回 true,否则返回 false
|
|
329
|
+
* @since 0.58.0
|
|
330
|
+
*/
|
|
331
|
+
function removeElement(target: any, ...indices: any[]): boolean;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* 将动态主对象转换为其静态类型
|
|
335
|
+
* @param value 要转换为静态类型的对象
|
|
336
|
+
* @returns 指定对象的静态类型形式,剥离其动态成员
|
|
337
|
+
* @since 0.58.0
|
|
338
|
+
*/
|
|
339
|
+
function toStaticType(value: any): any;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* 允许脚本代码处理主异常
|
|
343
|
+
* @param tryFunc 调用一个或多个主方法或属性的脚本函数
|
|
344
|
+
* @param catchFunc 当 tryFunc 抛出异常时调用的脚本函数
|
|
345
|
+
* @param finallyFunc 可选的脚本函数,用于执行操作的清理
|
|
346
|
+
* @returns 如果 tryFunc 成功完成返回 true,如果它抛出的异常被 catchFunc 处理则返回 false
|
|
347
|
+
* @since 0.58.0
|
|
348
|
+
*/
|
|
349
|
+
function tryCatch(tryFunc: any, catchFunc: any, finallyFunc?: any): boolean;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* 创建指定类型和维度的多维数组的强类型变量
|
|
353
|
+
* @typeparam T 数组元素类型
|
|
354
|
+
* @param dimensions 数组的维度数
|
|
355
|
+
* @returns 多维数组的强类型变量,支持 value、out、ref 属性
|
|
356
|
+
* @throws 当创建多维数组失败时抛出异常
|
|
357
|
+
* @since 0.58.0
|
|
358
|
+
*/
|
|
359
|
+
function newVarOfArr<T>(dimensions: number): any;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export {};
|
|
@@ -21,6 +21,35 @@ declare global {
|
|
|
21
21
|
* @since 0.37.4
|
|
22
22
|
*/
|
|
23
23
|
function runFileFromUser(path: string): Promise<void>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 判断 AutoPathing 目录下的路径是否存在
|
|
27
|
+
* @param subPath 相对于已订阅的内容目录 `\User\AutoPathing` 的JSON文件路径
|
|
28
|
+
* @since 0.58.0
|
|
29
|
+
*/
|
|
30
|
+
function isExists(subPath: string): boolean;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 判断 AutoPathing 目录下的路径是否为文件夹
|
|
34
|
+
* @param subPath 相对于已订阅的内容目录 `\User\AutoPathing` 的JSON文件路径
|
|
35
|
+
* @since 0.58.0
|
|
36
|
+
*/
|
|
37
|
+
function isFile(subPath: string): boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 判断 AutoPathing 目录下的路径是否为文件夹
|
|
41
|
+
* @param subPath 相对于已订阅的内容目录 `\User\AutoPathing` 的JSON文件路径
|
|
42
|
+
* @since 0.58.0
|
|
43
|
+
*/
|
|
44
|
+
function isFolder(subPath: string): boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 读取 AutoPathing 目录下指定文件夹的内容(非递归方式)
|
|
48
|
+
* @param subPath 相对于已订阅的内容目录 `\User\AutoPathing` 的JSON文件路径
|
|
49
|
+
* @returns 文件夹内所有文件和文件夹的相对路径数组,出错时返回空数组
|
|
50
|
+
* @since 0.58.0
|
|
51
|
+
*/
|
|
52
|
+
function readPathSync(subPath: string): string[];
|
|
24
53
|
}
|
|
25
54
|
}
|
|
26
55
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
+
import "../Recognition/RecognitionObject";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.Core.BgiVision {
|
|
6
|
+
class BvImage {
|
|
7
|
+
recognitionObject: BetterGenshinImpact.Core.Recognition.RecognitionObject;
|
|
8
|
+
|
|
9
|
+
constructor(templateAssert: string);
|
|
10
|
+
|
|
11
|
+
constructor(templateAssert: string, roi: Rect);
|
|
12
|
+
|
|
13
|
+
constructor(templateAssert: string, roi: Rect, threshold: number);
|
|
14
|
+
|
|
15
|
+
toRecognitionObject(): BetterGenshinImpact.Core.Recognition.RecognitionObject;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export import BvImage = BetterGenshinImpact.Core.BgiVision.BvImage;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
+
import "../../../System/Collections/Generic/List";
|
|
3
|
+
import "../../GameTask/Model/Area/Region";
|
|
4
|
+
import "../Recognition/RecognitionObject";
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace BetterGenshinImpact.Core.BgiVision {
|
|
8
|
+
class BvLocator {
|
|
9
|
+
recognitionObject: BetterGenshinImpact.Core.Recognition.RecognitionObject;
|
|
10
|
+
|
|
11
|
+
retryAction: (
|
|
12
|
+
regions: () => System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
13
|
+
) => void;
|
|
14
|
+
|
|
15
|
+
defaultTimeout: number;
|
|
16
|
+
|
|
17
|
+
defaultRetryInterval: number;
|
|
18
|
+
|
|
19
|
+
constructor();
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
recognitionObject: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
23
|
+
cancellationToken: System.Threading.CancellationToken
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
findAll(): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
27
|
+
|
|
28
|
+
isExist(): boolean;
|
|
29
|
+
|
|
30
|
+
click(timeout?: number): Promise<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
31
|
+
|
|
32
|
+
clickUntilDisappears(
|
|
33
|
+
timeout?: number
|
|
34
|
+
): Promise<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
35
|
+
|
|
36
|
+
doubleClick(timeout?: number): Promise<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
37
|
+
|
|
38
|
+
waitFor(
|
|
39
|
+
timeout?: number
|
|
40
|
+
): Promise<System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>>;
|
|
41
|
+
|
|
42
|
+
tryWaitFor(
|
|
43
|
+
timeout?: number
|
|
44
|
+
): Promise<System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>>;
|
|
45
|
+
|
|
46
|
+
waitForDisappear(timeout?: number): Promise<void>;
|
|
47
|
+
|
|
48
|
+
tryWaitForDisappear(timeout?: number): Promise<void>;
|
|
49
|
+
|
|
50
|
+
withRoi: (
|
|
51
|
+
rect: Rect | ((rect: Rect) => Rect)
|
|
52
|
+
) => BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
53
|
+
|
|
54
|
+
withRetryAction: (
|
|
55
|
+
action: (
|
|
56
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
57
|
+
) => void
|
|
58
|
+
) => BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export import BvLocator = BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
+
import "../../../Fischless/WindowsInput/IKeyboardSimulator";
|
|
3
|
+
import "../../../Fischless/WindowsInput/IMouseSimulator";
|
|
4
|
+
import "../../../System/Threading/CancellationToken";
|
|
5
|
+
import "../../GameTask/Model/Area/ImageRegion";
|
|
6
|
+
import "../../GameTask/Model/Area/Region";
|
|
7
|
+
import "../Recognition/RecognitionObject";
|
|
8
|
+
import "./BvImage";
|
|
9
|
+
import "./BvLocator";
|
|
10
|
+
|
|
11
|
+
declare global {
|
|
12
|
+
namespace BetterGenshinImpact.Core.BgiVision {
|
|
13
|
+
class BvPage {
|
|
14
|
+
keyboard: Fischless.WindowsInput.IKeyboardSimulator;
|
|
15
|
+
|
|
16
|
+
mouse: Fischless.WindowsInput.IMouseSimulator;
|
|
17
|
+
|
|
18
|
+
defaultTimeout: number;
|
|
19
|
+
|
|
20
|
+
defaultRetryInterval: number;
|
|
21
|
+
|
|
22
|
+
constructor();
|
|
23
|
+
|
|
24
|
+
constructor(cancellationToken: System.Threading.CancellationToken);
|
|
25
|
+
|
|
26
|
+
screenshot(): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
27
|
+
|
|
28
|
+
wait(milliseconds: number): Promise<void>;
|
|
29
|
+
|
|
30
|
+
locator(
|
|
31
|
+
image: BetterGenshinImpact.Core.BgiVision.BvImage
|
|
32
|
+
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
33
|
+
|
|
34
|
+
locator(text: string): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
35
|
+
|
|
36
|
+
locator(text: string, rect: Rect): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
37
|
+
|
|
38
|
+
locator(
|
|
39
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject
|
|
40
|
+
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
41
|
+
|
|
42
|
+
getByText(): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
43
|
+
|
|
44
|
+
getByText(text: string): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
45
|
+
|
|
46
|
+
getByText(text: string, rect: Rect): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
47
|
+
|
|
48
|
+
getByImage(
|
|
49
|
+
image: BetterGenshinImpact.Core.BgiVision.BvImage
|
|
50
|
+
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
51
|
+
|
|
52
|
+
ocr(): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
53
|
+
|
|
54
|
+
ocr(
|
|
55
|
+
rect: Rect
|
|
56
|
+
): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
57
|
+
|
|
58
|
+
click(x: number, y: number): void;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export import BvPage = BetterGenshinImpact.Core.BgiVision.BvPage;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {};
|
|
@@ -35,6 +35,12 @@ declare global {
|
|
|
35
35
|
/** 使用原粹树脂刷取副本次数 */
|
|
36
36
|
originalResinUseCount: number;
|
|
37
37
|
|
|
38
|
+
/** 使用原粹树脂(20)刷取副本次数 */
|
|
39
|
+
originalResin20UseCount: number;
|
|
40
|
+
|
|
41
|
+
/** 使用原粹树脂(40)刷取副本次数 */
|
|
42
|
+
originalResin40UseCount: number;
|
|
43
|
+
|
|
38
44
|
/** 使用浓缩树脂刷取副本次数 */
|
|
39
45
|
condensedResinUseCount: number;
|
|
40
46
|
|
package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import "./FightFinishDetectConfig";
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
|
|
5
|
+
class AutoLeyLineOutcropFightConfig {
|
|
6
|
+
/** 策略名称 */
|
|
7
|
+
strategyName: string;
|
|
8
|
+
|
|
9
|
+
/** 英文逗号分割,强制指定队伍角色 */
|
|
10
|
+
teamNames: string;
|
|
11
|
+
|
|
12
|
+
/** 检测战斗结束 */
|
|
13
|
+
fightFinishDetectEnabled: boolean;
|
|
14
|
+
|
|
15
|
+
/** 根据技能CD优化出招人员 */
|
|
16
|
+
actionSchedulerByCd: string;
|
|
17
|
+
|
|
18
|
+
/** 战斗结束检测配置 */
|
|
19
|
+
finishDetectConfig: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.FightFinishDetectConfig;
|
|
20
|
+
|
|
21
|
+
/** 护盾角色名称 */
|
|
22
|
+
guardianAvatar: string;
|
|
23
|
+
|
|
24
|
+
/** 护盾角色战斗跳过 */
|
|
25
|
+
guardianCombatSkip: boolean;
|
|
26
|
+
|
|
27
|
+
/** 护盾角色持续时间 */
|
|
28
|
+
guardianAvatarHold: boolean;
|
|
29
|
+
|
|
30
|
+
/** 元素爆发启用状态 */
|
|
31
|
+
burstEnabled: boolean;
|
|
32
|
+
|
|
33
|
+
/** 游泳功能启用状态 */
|
|
34
|
+
swimmingEnabled: boolean;
|
|
35
|
+
|
|
36
|
+
/** 万叶拾取启用状态 */
|
|
37
|
+
kazuhaPickupEnabled: boolean;
|
|
38
|
+
|
|
39
|
+
/** 琴双拾取启用状态 */
|
|
40
|
+
qinDoublePickUp: boolean;
|
|
41
|
+
|
|
42
|
+
/** 任务超时时间 (秒,默认 120) */
|
|
43
|
+
timeout: number;
|
|
44
|
+
|
|
45
|
+
constructor();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import "../../GameTask/Model/BaseTaskParam";
|
|
2
|
+
import "./AutoLeyLineOutcropFightConfig";
|
|
3
|
+
import "./AutoLeyLineOutcropTask";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
|
|
7
|
+
class AutoLeyLineOutcropParam extends BetterGenshinImpact.GameTask.Model
|
|
8
|
+
.BaseTaskParam<BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropTask> {
|
|
9
|
+
/** 刷取次数 */
|
|
10
|
+
count: number;
|
|
11
|
+
|
|
12
|
+
/** 地区 */
|
|
13
|
+
country: string;
|
|
14
|
+
|
|
15
|
+
/** 地脉花类型 */
|
|
16
|
+
leyLineOutcropType: string;
|
|
17
|
+
|
|
18
|
+
/** 开启取小值模式 */
|
|
19
|
+
openModeCountMin: boolean;
|
|
20
|
+
|
|
21
|
+
/** 是否开启树脂耗尽模式 */
|
|
22
|
+
isResinExhaustionMode: boolean;
|
|
23
|
+
|
|
24
|
+
/** 是否使用冒险之证寻找地脉花 */
|
|
25
|
+
useAdventurerHandbook: boolean;
|
|
26
|
+
|
|
27
|
+
/** 好感队名称 */
|
|
28
|
+
friendshipTeam: string;
|
|
29
|
+
|
|
30
|
+
/** 战斗的队伍名称 */
|
|
31
|
+
team: string;
|
|
32
|
+
|
|
33
|
+
/** 超时时间 */
|
|
34
|
+
timeout: number;
|
|
35
|
+
|
|
36
|
+
/** 地脉花独立战斗配置 */
|
|
37
|
+
fightConfig: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropFightConfig;
|
|
38
|
+
|
|
39
|
+
/** 是否前往合成台合成浓缩树脂 */
|
|
40
|
+
isGoToSynthesizer: boolean;
|
|
41
|
+
|
|
42
|
+
/** 是否使用脆弱树脂 */
|
|
43
|
+
useFragileResin: boolean;
|
|
44
|
+
|
|
45
|
+
/** 是否使用须臾树脂 */
|
|
46
|
+
useTransientResin: boolean;
|
|
47
|
+
|
|
48
|
+
/** 通过BGI通知系统发送详细通知 */
|
|
49
|
+
isNotification: boolean;
|
|
50
|
+
|
|
51
|
+
/** 是否在领取奖励后扫描掉落物光柱 */
|
|
52
|
+
scanDropsAfterRewardEnabled: boolean;
|
|
53
|
+
|
|
54
|
+
/** 领取奖励后扫描掉落物光柱的最长时长 (秒) */
|
|
55
|
+
scanDropsAfterRewardSeconds: number;
|
|
56
|
+
|
|
57
|
+
/** 使用默认配置初始化参数 */
|
|
58
|
+
setDefault(): void;
|
|
59
|
+
|
|
60
|
+
/** 设置战斗配置 */
|
|
61
|
+
setAutoLeyLineOutcropConfig(
|
|
62
|
+
config: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropFightConfig
|
|
63
|
+
): void;
|
|
64
|
+
|
|
65
|
+
constructor();
|
|
66
|
+
|
|
67
|
+
constructor(count: number, country: string, leyLineOutcropType: string);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export import AutoLeyLineOutcropParam = BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropParam;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../../../System/Threading/CancellationToken";
|
|
2
|
+
import "../ISoloTask";
|
|
3
|
+
import "./AutoLeyLineOutcropParam";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
|
|
7
|
+
class AutoLeyLineOutcropTask implements BetterGenshinImpact.GameTask.ISoloTask {
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
start(ct: System.Threading.CancellationToken): Promise<void>;
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
taskParam: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropParam
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
taskParam: BetterGenshinImpact.GameTask.AutoLeyLineOutcrop.AutoLeyLineOutcropParam,
|
|
18
|
+
oneDragonMode: boolean
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
|
|
3
|
+
class FightFinishDetectConfig {
|
|
4
|
+
/** 战斗结束进度条颜色 (RGB格式,例如 "95,235,255") */
|
|
5
|
+
battleEndProgressBarColor: string;
|
|
6
|
+
|
|
7
|
+
/** 战斗结束进度条颜色容差 (RGB偏差值,例如 "6,6,6" 或单个值 "6") */
|
|
8
|
+
battleEndProgressBarColorTolerance: string;
|
|
9
|
+
|
|
10
|
+
/** 快速检查战斗结束功能启用状态 */
|
|
11
|
+
fastCheckEnabled: boolean;
|
|
12
|
+
|
|
13
|
+
/** 旋转寻找敌人位置启用状态 */
|
|
14
|
+
rotateFindEnemyEnabled: boolean;
|
|
15
|
+
|
|
16
|
+
/** 快速检查参数 (数字表示秒数,人名用分号分隔,例如 "15,白术;钟离;") */
|
|
17
|
+
fastCheckParams: string;
|
|
18
|
+
|
|
19
|
+
/** 检查战斗结束的延时配置 (格式如 "2.5;白术,1.5;钟离,1.0;") */
|
|
20
|
+
checkEndDelay: string;
|
|
21
|
+
|
|
22
|
+
/** 按下切换队伍后检查屏幕色块的延迟 (秒数,默认 0.45) */
|
|
23
|
+
beforeDetectDelay: string;
|
|
24
|
+
|
|
25
|
+
/** 旋转寻找敌人的旋转因子 (默认值为 10,越大越快) */
|
|
26
|
+
rotaryFactor: number;
|
|
27
|
+
|
|
28
|
+
/** 是否是第一次检查和面敌 */
|
|
29
|
+
isFirstCheck: boolean;
|
|
30
|
+
|
|
31
|
+
/** 是否在元素爆发前检查战斗结束 */
|
|
32
|
+
checkBeforeBurst: boolean;
|
|
33
|
+
|
|
34
|
+
constructor();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export {};
|
package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.GameTask.AutoStygianOnslaught {
|
|
3
|
+
class AutoStygianOnslaughtConfig {
|
|
4
|
+
/** 战斗策略名称 */
|
|
5
|
+
strategyName: string;
|
|
6
|
+
|
|
7
|
+
/** 副本Boss数量 (1~3) */
|
|
8
|
+
bossNum: number;
|
|
9
|
+
|
|
10
|
+
/** 结束后是否自动分解圣遗物 */
|
|
11
|
+
autoArtifactSalvage: boolean;
|
|
12
|
+
|
|
13
|
+
/** 是否指定树脂的使用次数 */
|
|
14
|
+
specifyResinUse: boolean;
|
|
15
|
+
|
|
16
|
+
/** 自定义使用树脂优先级 (默认 ["浓缩树脂","原粹树脂"]) */
|
|
17
|
+
resinPriorityList: string[];
|
|
18
|
+
|
|
19
|
+
/** 使用原粹树脂刷取副本次数 */
|
|
20
|
+
originalResinUseCount: number;
|
|
21
|
+
|
|
22
|
+
/** 使用浓缩树脂刷取副本次数 */
|
|
23
|
+
condensedResinUseCount: number;
|
|
24
|
+
|
|
25
|
+
/** 使用须臾树脂刷取副本次数 */
|
|
26
|
+
transientResinUseCount: number;
|
|
27
|
+
|
|
28
|
+
/** 使用脆弱树脂刷取副本次数 */
|
|
29
|
+
fragileResinUseCount: number;
|
|
30
|
+
|
|
31
|
+
/** 指定战斗队伍名称 */
|
|
32
|
+
fightTeamName: string;
|
|
33
|
+
|
|
34
|
+
constructor();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export {};
|
package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "../../GameTask/Model/BaseTaskParam";
|
|
2
|
+
import "./AutoStygianOnslaughtConfig";
|
|
3
|
+
import "./AutoStygianOnslaughtTask";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace BetterGenshinImpact.GameTask.AutoStygianOnslaught {
|
|
7
|
+
class AutoStygianOnslaughtParam extends BetterGenshinImpact.GameTask.Model
|
|
8
|
+
.BaseTaskParam<BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtTask> {
|
|
9
|
+
/** 副本Boss数量 */
|
|
10
|
+
bossNum: number;
|
|
11
|
+
|
|
12
|
+
/** 结束后是否自动分解圣遗物 */
|
|
13
|
+
autoArtifactSalvage: boolean;
|
|
14
|
+
|
|
15
|
+
/** 是否指定树脂的使用次数 */
|
|
16
|
+
specifyResinUse: boolean;
|
|
17
|
+
|
|
18
|
+
/** 自定义使用树脂优先级 (默认 ["浓缩树脂","原粹树脂"]) */
|
|
19
|
+
resinPriorityList: string[];
|
|
20
|
+
|
|
21
|
+
/** 使用原粹树脂刷取副本次数 */
|
|
22
|
+
originalResinUseCount: number;
|
|
23
|
+
|
|
24
|
+
/** 使用浓缩树脂刷取副本次数 */
|
|
25
|
+
condensedResinUseCount: number;
|
|
26
|
+
|
|
27
|
+
/** 使用须臾树脂刷取副本次数 */
|
|
28
|
+
transientResinUseCount: number;
|
|
29
|
+
|
|
30
|
+
/** 使用脆弱树脂刷取副本次数 */
|
|
31
|
+
fragileResinUseCount: number;
|
|
32
|
+
|
|
33
|
+
/** 指定战斗队伍名称 */
|
|
34
|
+
fightTeamName: string;
|
|
35
|
+
|
|
36
|
+
/** 战斗脚本包路径 */
|
|
37
|
+
combatScriptBagPath: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 使用默认配置初始化参数
|
|
41
|
+
*/
|
|
42
|
+
setDefault(): void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 从配置对象设置自动幽境危战参数
|
|
46
|
+
* @param config 自动幽境危战配置对象
|
|
47
|
+
*/
|
|
48
|
+
setAutoStygianOnslaughtConfig(
|
|
49
|
+
config: BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtConfig
|
|
50
|
+
): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 设置树脂使用优先级列表
|
|
54
|
+
* @param priorities 树脂类型数组,例如 "浓缩树脂","原粹树脂"
|
|
55
|
+
*/
|
|
56
|
+
setResinPriorityList(...priorities: string[]): void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 设置战斗策略路径
|
|
60
|
+
* @param strategyName 策略名称,若为空则使用自动战斗配置中的策略名
|
|
61
|
+
*/
|
|
62
|
+
setCombatStrategyPath(strategyName?: string | null): void;
|
|
63
|
+
|
|
64
|
+
constructor();
|
|
65
|
+
|
|
66
|
+
constructor(combatScriptBagPath: string);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export import AutoStygianOnslaughtParam = BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtParam;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../../../System/Threading/CancellationToken";
|
|
2
|
+
import "../ISoloTask";
|
|
3
|
+
import "./AutoStygianOnslaughtParam";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace BetterGenshinImpact.GameTask.AutoStygianOnslaught {
|
|
7
|
+
class AutoStygianOnslaughtTask implements BetterGenshinImpact.GameTask.ISoloTask {
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
start(ct: System.Threading.CancellationToken): Promise<void>;
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
taskParam: BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtParam
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
taskParam: BetterGenshinImpact.GameTask.AutoStygianOnslaught.AutoStygianOnslaughtParam,
|
|
18
|
+
path: string
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export {};
|