@bettergi/types 0.0.10 → 0.0.12
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/csharp/BetterGenshinImpact/Core/Recognition/OcrEngineTypes.d.ts +13 -7
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +151 -142
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionTypes.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +12 -7
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +72 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +113 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/ISoloTask.d.ts +13 -0
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts +8 -2
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +65 -52
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +190 -136
- package/csharp/BetterGenshinImpact/GameTask/Model/BaseTaskParam.d.ts +13 -0
- package/csharp/BetterGenshinImpact/View/Drawable/DrawContent.d.ts +45 -0
- package/csharp/BetterGenshinImpact/View/Drawable/LineDrawable.d.ts +17 -9
- package/csharp/BetterGenshinImpact/View/Drawable/RectDrawable.d.ts +20 -10
- package/csharp/Microsoft/Extensions/Localization/IStringLocalizer.d.ts +16 -0
- package/csharp/Microsoft/Extensions/Localization/LocalizedString.d.ts +26 -0
- package/csharp/SixLabors/ImageSharp/Image.d.ts +9 -0
- package/csharp/System/Collections/DictionaryEntry.d.ts +14 -0
- package/csharp/System/Collections/Generic/Dictionary.d.ts +193 -34
- package/csharp/System/Collections/Generic/ICollection.d.ts +15 -9
- package/csharp/System/Collections/Generic/IDictionary.d.ts +11 -22
- package/csharp/System/Collections/Generic/IEnumerable.d.ts +10 -3
- package/csharp/System/Collections/Generic/IEnumerator.d.ts +10 -5
- package/csharp/System/Collections/Generic/IEqualityComparer.d.ts +9 -3
- package/csharp/System/Collections/Generic/IList.d.ts +16 -7
- package/csharp/System/Collections/Generic/IReadOnlyCollection.d.ts +9 -3
- package/csharp/System/Collections/Generic/IReadOnlyDictionary.d.ts +15 -10
- package/csharp/System/Collections/Generic/IReadOnlyList.d.ts +9 -3
- package/csharp/System/Collections/Generic/KeyValuePair.d.ts +15 -8
- package/csharp/System/Collections/Generic/List.d.ts +149 -77
- package/csharp/System/Collections/ICollection.d.ts +17 -0
- package/csharp/System/Collections/IDictionary.d.ts +29 -0
- package/csharp/System/Collections/IDictionaryEnumerator.d.ts +14 -0
- package/csharp/System/Collections/IEnumerable.d.ts +9 -0
- package/csharp/System/Collections/IEnumerator.d.ts +13 -0
- package/csharp/System/Collections/IList.d.ts +30 -0
- package/csharp/System/DateTimeOffset.d.ts +8 -0
- package/csharp/System/Drawing/Bitmap.d.ts +8 -2
- package/csharp/System/Drawing/Color.d.ts +341 -2
- package/csharp/System/Drawing/Image.d.ts +8 -2
- package/csharp/System/Drawing/KnownColor.d.ts +357 -0
- package/csharp/System/Drawing/Pen.d.ts +8 -2
- package/csharp/System/Globalization/CultureInfo.d.ts +9 -0
- package/csharp/System/IAsyncDisposable.d.ts +10 -0
- package/csharp/System/IDisposable.d.ts +9 -0
- package/csharp/System/IEquatable.d.ts +8 -0
- package/csharp/System/Runtime/Serialization/IDeserializationCallback.d.ts +9 -0
- package/csharp/System/Runtime/Serialization/ISerializable.d.ts +9 -0
- package/csharp/System/Threading/CancellationToken.d.ts +58 -0
- package/csharp/System/Threading/CancellationTokenRegistration.d.ts +27 -0
- package/csharp/System/Threading/CancellationTokenSource.d.ts +51 -0
- package/csharp/System/Threading/ITimer.d.ts +12 -0
- package/csharp/System/Threading/Tasks/ValueTask.d.ts +12 -0
- package/csharp/System/Threading/WaitHandle.d.ts +8 -0
- package/csharp/System/TimeProvider.d.ts +31 -0
- package/csharp/System/TimeSpan.d.ts +8 -0
- package/csharp/System/Windows/Media/Matrix.d.ts +80 -0
- package/csharp/System/Windows/Point.d.ts +39 -5
- package/csharp/System/Windows/Vector.d.ts +51 -0
- package/index.d.ts +3 -0
- package/modules/dispatcher.d.ts +54 -3
- package/modules/file.d.ts +3 -3
- package/modules/genshin.d.ts +18 -1
- package/modules/globalMethod.d.ts +9 -5
- package/modules/http.d.ts +43 -0
- package/package.json +1 -1
- package/csharp/Vanara/PInvoke/POINT.d.ts +0 -23
- package/csharp/Vanara/PInvoke/RECT.d.ts +0 -37
- package/csharp/Vanara/PInvoke/SIZE.d.ts +0 -19
- package/enums/wood.d.ts +0 -27
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.Core.Recognition {
|
|
3
|
+
enum OcrEngineTypes {
|
|
4
|
+
/** [飞桨](https://github.com/PaddlePaddle/PaddleOCR) */
|
|
5
|
+
Paddle,
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/** [又一个原神圣遗物导出器](https://github.com/wormtql/yas) */
|
|
8
|
+
YasModel,
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
/** [又一个原神拾取器](https://github.com/Alex-Beng/Yap) */
|
|
11
|
+
YapModel
|
|
12
|
+
}
|
|
13
|
+
}
|
|
10
14
|
}
|
|
15
|
+
|
|
16
|
+
export {};
|
|
@@ -5,149 +5,158 @@ import {
|
|
|
5
5
|
Scalar,
|
|
6
6
|
TemplateMatchModes
|
|
7
7
|
} from "mirada/dist/src/types/opencv";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
export interface RecognitionObject {
|
|
16
|
-
/** 匹配类型 */
|
|
17
|
-
recognitionType: RecognitionTypes;
|
|
18
|
-
|
|
19
|
-
/** 感兴趣的区域 */
|
|
20
|
-
regionOfInterest: Rect;
|
|
21
|
-
|
|
22
|
-
/** 识别对象名称 */
|
|
23
|
-
name: string | null;
|
|
24
|
-
|
|
25
|
-
/** 模板匹配的对象(彩色) */
|
|
26
|
-
templateImageMat: Mat | null;
|
|
27
|
-
|
|
28
|
-
/** 模板匹配的对象(灰色) */
|
|
29
|
-
templateImageGreyMat: Mat | null;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 模板匹配阈值
|
|
33
|
-
* @default 0.8
|
|
34
|
-
*/
|
|
35
|
-
threshold: number;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 是否使用3通道匹配
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
use3Channels: boolean;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* [模板匹配算法](https://docs.opencv.org/4.x/df/dfb/group__imgproc__object.html)
|
|
45
|
-
* @default CCoeffNormed
|
|
46
|
-
*/
|
|
47
|
-
templateMatchMode: TemplateMatchModes;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 匹配模板遮罩(图片中不需要匹配的颜色)
|
|
51
|
-
* @default false
|
|
52
|
-
*/
|
|
53
|
-
useMask: boolean;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 模板遮罩颜色(图片中不需要匹配的颜色)不需要匹配的颜色
|
|
57
|
-
* @requires `useMask` 为 true
|
|
58
|
-
* @default 绿色
|
|
59
|
-
*/
|
|
60
|
-
maskColor: Color;
|
|
61
|
-
|
|
62
|
-
maskMat: Mat | null;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 匹配成功时,是否在屏幕上绘制矩形框
|
|
66
|
-
* @requires `name` 不为空
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
drawOnWindow: boolean;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 绘制的矩形框的颜色及线条宽度
|
|
73
|
-
* @default 红色 2px
|
|
74
|
-
*/
|
|
75
|
-
drawOnWindowPen: Pen;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* 一个模板匹配多个结果的时候最大匹配数量
|
|
79
|
-
* @default -1 (不限制)
|
|
80
|
-
*/
|
|
81
|
-
maxMatchCount: number;
|
|
82
|
-
|
|
83
|
-
/** 颜色匹配方式 */
|
|
84
|
-
colorConversionCode: ColorConversionCodes;
|
|
85
|
-
|
|
86
|
-
/** 起始颜色范围 */
|
|
87
|
-
lowerColor: Scalar;
|
|
88
|
-
|
|
89
|
-
/** 终止颜色范围 */
|
|
90
|
-
upperColor: Scalar;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 符合的点的数量要求
|
|
94
|
-
* @default 1
|
|
95
|
-
*/
|
|
96
|
-
matchCount: number;
|
|
97
|
-
|
|
98
|
-
/** OCR 引擎 */
|
|
99
|
-
ocrEngine: OcrEngineTypes;
|
|
100
|
-
|
|
101
|
-
/** 文字识别替换字典(部分文字识别结果不准确) */
|
|
102
|
-
replaceDictionary: Dictionary<string, string[]>;
|
|
103
|
-
|
|
104
|
-
/** 包含匹配 多个值全匹配的情况下才算成功 复杂情况请用正则匹配 */
|
|
105
|
-
allContainMatchText: List<string>;
|
|
106
|
-
|
|
107
|
-
/** 包含匹配 一个值匹配就算成功 */
|
|
108
|
-
oneContainMatchText: List<string>;
|
|
109
|
-
|
|
110
|
-
/** 正则匹配 多个值全匹配的情况下才算成功 */
|
|
111
|
-
regexMatchText: List<string>;
|
|
112
|
-
|
|
113
|
-
/** 初始化模板 */
|
|
114
|
-
initTemplate(): RecognitionObject;
|
|
115
|
-
}
|
|
8
|
+
import "../../../System/Collections/Generic/Dictionary";
|
|
9
|
+
import "../../../System/Collections/Generic/List";
|
|
10
|
+
import "../../../System/Drawing/Color";
|
|
11
|
+
import "../../../System/Drawing/Pen";
|
|
12
|
+
import "../Recognition/OcrEngineTypes";
|
|
13
|
+
import "../Recognition/RecognitionTypes";
|
|
116
14
|
|
|
117
15
|
declare global {
|
|
118
|
-
namespace
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
16
|
+
namespace BetterGenshinImpact.Core.Recognition {
|
|
17
|
+
class RecognitionObject {
|
|
18
|
+
/** 匹配类型 */
|
|
19
|
+
recognitionType: RecognitionTypes;
|
|
20
|
+
|
|
21
|
+
/** 感兴趣的区域 */
|
|
22
|
+
regionOfInterest: Rect;
|
|
23
|
+
|
|
24
|
+
/** 识别对象名称 */
|
|
25
|
+
name: string | null;
|
|
26
|
+
|
|
27
|
+
/** 模板匹配的对象(彩色) */
|
|
28
|
+
templateImageMat: Mat | null;
|
|
29
|
+
|
|
30
|
+
/** 模板匹配的对象(灰色) */
|
|
31
|
+
templateImageGreyMat: Mat | null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 模板匹配阈值
|
|
35
|
+
* @default 0.8
|
|
36
|
+
*/
|
|
37
|
+
threshold: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 是否使用3通道匹配
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
use3Channels: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* [模板匹配算法](https://docs.opencv.org/4.x/df/dfb/group__imgproc__object.html)
|
|
47
|
+
* @default CCoeffNormed
|
|
48
|
+
*/
|
|
49
|
+
templateMatchMode: TemplateMatchModes;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 匹配模板遮罩(图片中不需要匹配的颜色)
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
useMask: boolean;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 模板遮罩颜色(图片中不需要匹配的颜色)不需要匹配的颜色
|
|
59
|
+
* @requires `useMask` 为 true
|
|
60
|
+
* @default 绿色
|
|
61
|
+
*/
|
|
62
|
+
maskColor: System.Drawing.Color;
|
|
63
|
+
|
|
64
|
+
maskMat: Mat | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 匹配成功时,是否在屏幕上绘制矩形框
|
|
68
|
+
* @requires `name` 不为空
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
drawOnWindow: boolean;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 绘制的矩形框的颜色及线条宽度
|
|
75
|
+
* @default 红色 2px
|
|
76
|
+
*/
|
|
77
|
+
drawOnWindowPen: System.Drawing.Pen;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 一个模板匹配多个结果的时候最大匹配数量
|
|
81
|
+
* @default -1 (不限制)
|
|
82
|
+
*/
|
|
83
|
+
maxMatchCount: number;
|
|
84
|
+
|
|
85
|
+
/** 颜色匹配方式 */
|
|
86
|
+
colorConversionCode: ColorConversionCodes;
|
|
87
|
+
|
|
88
|
+
/** 起始颜色范围 */
|
|
89
|
+
lowerColor: Scalar;
|
|
90
|
+
|
|
91
|
+
/** 终止颜色范围 */
|
|
92
|
+
upperColor: Scalar;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 符合的点的数量要求
|
|
96
|
+
* @default 1
|
|
97
|
+
*/
|
|
98
|
+
matchCount: number;
|
|
99
|
+
|
|
100
|
+
/** OCR 引擎 */
|
|
101
|
+
ocrEngine: OcrEngineTypes;
|
|
102
|
+
|
|
103
|
+
/** 文字识别替换字典(部分文字识别结果不准确) */
|
|
104
|
+
replaceDictionary: System.Collections.Generic.Dictionary<string, string[]>;
|
|
105
|
+
|
|
106
|
+
/** 包含匹配 多个值全匹配的情况下才算成功 复杂情况请用正则匹配 */
|
|
107
|
+
allContainMatchText: System.Collections.Generic.List<string>;
|
|
108
|
+
|
|
109
|
+
/** 包含匹配 一个值匹配就算成功 */
|
|
110
|
+
oneContainMatchText: System.Collections.Generic.List<string>;
|
|
111
|
+
|
|
112
|
+
/** 正则匹配 多个值全匹配的情况下才算成功 */
|
|
113
|
+
regexMatchText: System.Collections.Generic.List<string>;
|
|
114
|
+
|
|
115
|
+
/** 初始化模板 */
|
|
116
|
+
initTemplate(): RecognitionObject;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 识别图片模板
|
|
120
|
+
* @param mat 模板图片
|
|
121
|
+
*/
|
|
122
|
+
static templateMatch(mat: Mat): RecognitionObject;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 识别图片模板
|
|
126
|
+
* @param mat 模板图片
|
|
127
|
+
*/
|
|
128
|
+
static templateMatch(mat: Mat): RecognitionObject;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 在指定区域识别图片模板
|
|
132
|
+
* @param mat 模板图片
|
|
133
|
+
* @param x 水平位置(像素)
|
|
134
|
+
* @param y 垂直位置(像素)
|
|
135
|
+
* @param w 宽度
|
|
136
|
+
* @param h 高度
|
|
137
|
+
*/
|
|
138
|
+
static templateMatch(mat: Mat, x: number, y: number, w: number, h: number): RecognitionObject;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 识别指定区域
|
|
142
|
+
* @param x 水平位置(像素)
|
|
143
|
+
* @param y 垂直位置(像素)
|
|
144
|
+
* @param w 宽度
|
|
145
|
+
* @param h 高度
|
|
146
|
+
*/
|
|
147
|
+
static ocr(x: number, y: number, w: number, h: number): RecognitionObject;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 识别矩形区域
|
|
151
|
+
* @param rect 矩形
|
|
152
|
+
*/
|
|
153
|
+
static ocr(rect: Rect): RecognitionObject;
|
|
154
|
+
|
|
155
|
+
/** 识别文字 */
|
|
156
|
+
static readonly ocrThis: RecognitionObject;
|
|
157
|
+
}
|
|
152
158
|
}
|
|
159
|
+
export import RecognitionObject = BetterGenshinImpact.Core.Recognition.RecognitionObject;
|
|
153
160
|
}
|
|
161
|
+
|
|
162
|
+
export {};
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.Core.Recognition {
|
|
3
|
+
enum RecognitionTypes {
|
|
4
|
+
None,
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
/** 模板匹配 */
|
|
7
|
+
TemplateMatch,
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
/** 颜色匹配 */
|
|
10
|
+
ColorMatch,
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
/** 文字识别并匹配 */
|
|
13
|
+
OcrMatch,
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
/** 仅文字识别 */
|
|
16
|
+
Ocr,
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
/** 提取指定颜色后进行文字识别 */
|
|
19
|
+
ColorRangeAndOcr,
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
/** 自动检测 */
|
|
22
|
+
Detect
|
|
23
|
+
}
|
|
24
|
+
}
|
|
21
25
|
}
|
|
26
|
+
|
|
27
|
+
export {};
|
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
export type RealtimeTimerName =
|
|
2
|
+
| "RecognitionTest" // 自定义占位触发器(一个用于开发测试的识别、或者全局占位触发器 这个触发器启动的时候,直接独占)
|
|
3
|
+
| "GameLoading" // 自动开门
|
|
2
4
|
| "AutoPick" // 自动拾取
|
|
3
|
-
| "AutoSkip" // 自动剧情
|
|
4
|
-
| "AutoFish" // 半自动战斗
|
|
5
5
|
| "QuickTeleport" // 快速传送
|
|
6
|
+
| "AutoSkip" // 自动剧情
|
|
7
|
+
| "AutoFish" // 自动钓鱼
|
|
6
8
|
| "AutoCook" // 自动烹饪
|
|
9
|
+
| "AutoEat" // 自动吃药
|
|
7
10
|
| (string & {});
|
|
8
11
|
|
|
9
12
|
declare global {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
namespace BetterGenshinImpact.Core.Script.Dependence.Model {
|
|
14
|
+
class RealtimeTimer {
|
|
15
|
+
/** 任务名称 */
|
|
16
|
+
name: RealtimeTimerName | null;
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* 触发间隔(毫秒)
|
|
20
|
+
* @default 50
|
|
21
|
+
*/
|
|
22
|
+
interval: number;
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
/** 任务配置 */
|
|
25
|
+
config: any | null;
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
constructor(name: RealtimeTimerName);
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
constructor(name: RealtimeTimerName, config: any);
|
|
30
|
+
}
|
|
26
31
|
}
|
|
32
|
+
export import RealtimeTimer = BetterGenshinImpact.Core.Script.Dependence.Model.RealtimeTimer;
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export {};
|
|
@@ -4,20 +4,25 @@ export type SoloTaskName =
|
|
|
4
4
|
| "AutoFight" // 自动战斗
|
|
5
5
|
| "AutoDomain" // 自动秘境
|
|
6
6
|
| "AutoFishing" // 自动钓鱼
|
|
7
|
+
| "AutoEat" // 自动吃药
|
|
8
|
+
| "CountInventoryItem" // 背包数物品
|
|
7
9
|
| (string & {});
|
|
8
10
|
|
|
9
11
|
declare global {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
namespace BetterGenshinImpact.Core.Script.Dependence.Model {
|
|
13
|
+
class SoloTask {
|
|
14
|
+
/** 任务名称 */
|
|
15
|
+
name: SoloTaskName;
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
/** 任务配置 */
|
|
18
|
+
config: any | null;
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
constructor(name: SoloTaskName);
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
constructor(name: SoloTaskName, config: any);
|
|
23
|
+
}
|
|
20
24
|
}
|
|
25
|
+
export import SoloTask = BetterGenshinImpact.Core.Script.Dependence.Model.SoloTask;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "../../GameTask/Model/BaseTaskParam";
|
|
2
|
+
import "./AutoDomainTask";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.GameTask.AutoDomain {
|
|
6
|
+
class AutoDomainParam extends BetterGenshinImpact.GameTask.Model
|
|
7
|
+
.BaseTaskParam<BetterGenshinImpact.GameTask.AutoDomain.AutoDomainTask> {
|
|
8
|
+
/** 刷副本次数 */
|
|
9
|
+
domainRoundNum: number;
|
|
10
|
+
|
|
11
|
+
/** 战斗策略路径 */
|
|
12
|
+
combatStrategyPath: string;
|
|
13
|
+
|
|
14
|
+
/** 刷副本使用的队伍名称 */
|
|
15
|
+
partyName: string;
|
|
16
|
+
|
|
17
|
+
/** 需要刷取的副本名称 */
|
|
18
|
+
domainName: string;
|
|
19
|
+
|
|
20
|
+
/** 需要刷取的副本名称 */
|
|
21
|
+
sundaySelectedValue: string;
|
|
22
|
+
|
|
23
|
+
/** 结束后是否自动分解圣遗物 */
|
|
24
|
+
autoArtifactSalvage: boolean;
|
|
25
|
+
|
|
26
|
+
/** 分解圣遗物的最大星级(1~4) */
|
|
27
|
+
maxArtifactStar: number;
|
|
28
|
+
|
|
29
|
+
/** 指定树脂刷取次数 */
|
|
30
|
+
specifyResinUse: boolean;
|
|
31
|
+
|
|
32
|
+
/** 使用树脂优先级 */
|
|
33
|
+
resinPriorityList: string[];
|
|
34
|
+
|
|
35
|
+
/** 使用原粹树脂刷取副本次数 */
|
|
36
|
+
originalResinUseCount: number;
|
|
37
|
+
|
|
38
|
+
/** 使用浓缩树脂刷取副本次数 */
|
|
39
|
+
condensedResinUseCount: number;
|
|
40
|
+
|
|
41
|
+
/** 使用须臾树脂刷取副本次数 */
|
|
42
|
+
transientResinUseCount: number;
|
|
43
|
+
|
|
44
|
+
/** 使用脆弱树脂刷取副本次数 */
|
|
45
|
+
fragileResinUseCount: number;
|
|
46
|
+
|
|
47
|
+
/** 设置默认值 */
|
|
48
|
+
setDefault(): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 设置战斗策略路径
|
|
52
|
+
* @param strategyName 策略名称
|
|
53
|
+
*/
|
|
54
|
+
setCombatStrategyPath(strategyName?: string): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 设置使用树脂优先级
|
|
58
|
+
* @param priorities 树脂名称列表(越靠前优先级越高)
|
|
59
|
+
*/
|
|
60
|
+
setResinPriorityList(priorities: string[]): void;
|
|
61
|
+
|
|
62
|
+
constructor();
|
|
63
|
+
|
|
64
|
+
constructor(domainRoundNum: number);
|
|
65
|
+
|
|
66
|
+
constructor(domainRoundNum: number, path: string);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export import AutoDomainParam = BetterGenshinImpact.GameTask.AutoDomain.AutoDomainParam;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "../../../System/Collections/Generic/List";
|
|
2
|
+
import "../../../System/Threading/CancellationToken";
|
|
3
|
+
import "../../GameTask/Model/Area/ImageRegion";
|
|
4
|
+
import "../../GameTask/Model/Area/Region";
|
|
5
|
+
import "../ISoloTask";
|
|
6
|
+
import "./AutoDomainParam";
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
namespace BetterGenshinImpact.GameTask.AutoDomain {
|
|
10
|
+
class AutoDomainTask implements BetterGenshinImpact.GameTask.ISoloTask {
|
|
11
|
+
name: string;
|
|
12
|
+
|
|
13
|
+
start(ct: System.Threading.CancellationToken): Promise<void>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 点击使用树脂
|
|
17
|
+
* @param ra 图像识别区域
|
|
18
|
+
* @param resinName 树脂名称
|
|
19
|
+
*/
|
|
20
|
+
static pressUseResin(
|
|
21
|
+
ra: BetterGenshinImpact.GameTask.Model.Area.ImageRegion,
|
|
22
|
+
resinName: string
|
|
23
|
+
): [boolean, number];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 点击使用树脂
|
|
27
|
+
* @param regionList 识别区域列表
|
|
28
|
+
* @param resinName 树脂名称
|
|
29
|
+
*/
|
|
30
|
+
static pressUseResin(
|
|
31
|
+
regionList: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>,
|
|
32
|
+
resinName: string
|
|
33
|
+
): [boolean, number];
|
|
34
|
+
|
|
35
|
+
constructor(taskParam: BetterGenshinImpact.GameTask.AutoDomain.AutoDomainParam);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import "../../GameTask/Model/BaseTaskParam";
|
|
2
|
+
import "./AutoFightTask";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.GameTask.AutoFight {
|
|
6
|
+
class AutoFightParam extends BetterGenshinImpact.GameTask.Model
|
|
7
|
+
.BaseTaskParam<BetterGenshinImpact.GameTask.AutoFight.AutoFightTask> {
|
|
8
|
+
/** 快速检查战斗结束配置 */
|
|
9
|
+
finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.FightFinishDetectConfig;
|
|
10
|
+
|
|
11
|
+
combatStrategyPath: string;
|
|
12
|
+
|
|
13
|
+
/** 检测到战斗已经结束的情况下,停止自动战斗功能 */
|
|
14
|
+
fightFinishDetectEnabled: boolean;
|
|
15
|
+
|
|
16
|
+
/** 战斗结束后尽可能拾取周围掉落物 */
|
|
17
|
+
pickDropsAfterFightEnabled: boolean;
|
|
18
|
+
|
|
19
|
+
/** 战斗结束后拾取周围掉落物延迟(单位为秒,0表示不自动拾取掉落物) */
|
|
20
|
+
pickDropsAfterFightSeconds: number;
|
|
21
|
+
|
|
22
|
+
battleThresholdForLoot: number;
|
|
23
|
+
|
|
24
|
+
/** 到达指定时间后,自动停止战斗 */
|
|
25
|
+
timeout: number;
|
|
26
|
+
|
|
27
|
+
/** 战斗结束后,如存在(万叶/琴),则执行长E聚集材料动作 */
|
|
28
|
+
kazuhaPickupEnabled: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 根据填入人或人和cd,来决定当此人元素战技cd未结束时,跳过此人出招,来优化战斗流程。
|
|
32
|
+
* 可填入人名或人名数字(用逗号分隔),多种用分号分隔。
|
|
33
|
+
* 例如:白术;钟离,12;,
|
|
34
|
+
* 如果是人名,则用内置cd检查(或填入数字也小于0);
|
|
35
|
+
* 如果是人名和数字,则把数字当做出招cd(秒)。
|
|
36
|
+
*/
|
|
37
|
+
actionSchedulerByCd: string;
|
|
38
|
+
|
|
39
|
+
/** 万叶队伍名称 */
|
|
40
|
+
kazuhaPartyName: string;
|
|
41
|
+
|
|
42
|
+
/** 只拾取精英掉落模式 */
|
|
43
|
+
onlyPickEliteDropsMode: string;
|
|
44
|
+
|
|
45
|
+
/** 盾奶位 */
|
|
46
|
+
guardianAvatar: string;
|
|
47
|
+
|
|
48
|
+
/** 盾奶位E战技 */
|
|
49
|
+
guardianCombatSkip: boolean;
|
|
50
|
+
|
|
51
|
+
/** 检测盾奶位战技短按或长按(禁用:短按 / 启用:长按) */
|
|
52
|
+
guardianAvatarHold: boolean;
|
|
53
|
+
|
|
54
|
+
/** 释放Q前检测 */
|
|
55
|
+
checkBeforeBurst: boolean;
|
|
56
|
+
|
|
57
|
+
isFirstCheck: boolean;
|
|
58
|
+
|
|
59
|
+
/** 旋转速度(建议单次360°左右) */
|
|
60
|
+
rotaryFactor: number;
|
|
61
|
+
|
|
62
|
+
/** 释放Q爆发 */
|
|
63
|
+
burstEnabled: boolean;
|
|
64
|
+
|
|
65
|
+
/** 琴二次拾取 */
|
|
66
|
+
qinDoublePickUp: boolean;
|
|
67
|
+
|
|
68
|
+
/** 游泳检测(先回战斗节点,失败则去七天神像) */
|
|
69
|
+
swimmingEnabled: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 设置战斗策略路径
|
|
73
|
+
* @param strategyName 战斗策略名称
|
|
74
|
+
*/
|
|
75
|
+
setCombatStrategyPath(strategyName?: string): void;
|
|
76
|
+
|
|
77
|
+
/** 设置默认值 */
|
|
78
|
+
setDefault(): void;
|
|
79
|
+
|
|
80
|
+
constructor(
|
|
81
|
+
path: string,
|
|
82
|
+
autoFightConfig: BetterGenshinImpact.GameTask.AutoFight.FightFinishDetectConfig
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 快速检查战斗结束配置 */
|
|
87
|
+
class FightFinishDetectConfig {
|
|
88
|
+
/** 判断战斗结束读条颜色 */
|
|
89
|
+
battleEndProgressBarColor: string;
|
|
90
|
+
|
|
91
|
+
/** 对于战斗结束基准色的偏差值 */
|
|
92
|
+
battleEndProgressBarColorTolerance: string;
|
|
93
|
+
|
|
94
|
+
/** 是否启用快速检查战斗结束 */
|
|
95
|
+
fastCheckEnabled: boolean;
|
|
96
|
+
|
|
97
|
+
/** 快速检查战斗结束的参数 */
|
|
98
|
+
fastCheckParams: string;
|
|
99
|
+
|
|
100
|
+
/** 检查战斗结束的延时 */
|
|
101
|
+
checkEndDelay: string;
|
|
102
|
+
|
|
103
|
+
/** 按下切换队伍后去检查屏幕色块的延时 */
|
|
104
|
+
beforeDetectDelay: string;
|
|
105
|
+
|
|
106
|
+
/** 打开队伍界面检测战斗结束前,先检测敌人,判断是否需靠近敌或旋转寻找敌人 */
|
|
107
|
+
rotateFindEnemyEnabled: boolean;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export import AutoFightParam = BetterGenshinImpact.GameTask.AutoFight.AutoFightParam;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export {};
|