@bettergi/types 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bindings/RealtimeTimer.d.ts +1 -1
- package/bindings/getAvatars.d.ts +3 -2
- package/package.json +1 -1
- package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
- package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +4 -3
- package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +20 -9
- package/types/BetterGenshinImpact/Core/Script/Dependence/Http.d.ts +1 -0
- package/types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts +1 -0
- package/types/BetterGenshinImpact/Core/Script/Dependence/LimitedFile.d.ts +12 -5
- package/types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +63 -8
- package/types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +4 -1
- package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +62 -3
- package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -4
- package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +11 -9
- package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +61 -0
- package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +28 -2
- package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +13 -6
- package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -7
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +13 -13
- package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.d.ts +3 -3
- package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScript.d.ts +3 -2
- package/types/BetterGenshinImpact/GameTask/AutoFight/Script/Method.d.ts +63 -3
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +4 -3
- package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +1 -0
- package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +50 -0
- package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +2 -0
- package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +5 -3
- package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +6 -4
- package/types/BetterGenshinImpact/GameTask/Common/Job/CraftMaterialTask.d.ts +19 -2
- package/types/BetterGenshinImpact/GameTask/Common/Map/MapScriptNames.d.ts +9 -0
- package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +6 -7
- package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +18 -15
- package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
package/bindings/getAvatars.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { AvatarName } from "../types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar";
|
|
1
2
|
import type { HostArray, HostDelegate } from "../types/Microsoft/ClearScript/HostType";
|
|
2
3
|
|
|
3
4
|
interface getAvatarsHostDelegate extends HostDelegate {
|
|
4
|
-
(): HostArray<
|
|
5
|
-
invoke(): HostArray<
|
|
5
|
+
(): HostArray<AvatarName>;
|
|
6
|
+
invoke(): HostArray<AvatarName>;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
declare global {
|
package/package.json
CHANGED
|
@@ -6,14 +6,20 @@ import type {
|
|
|
6
6
|
StrongNumeric
|
|
7
7
|
} from "../../../Microsoft/ClearScript/HostType";
|
|
8
8
|
import "../../../OpenCvSharp/Rect";
|
|
9
|
-
import "../../../System/Action";
|
|
10
9
|
import "../../../System/Collections/Generic/List";
|
|
11
|
-
import "../../../System/Func";
|
|
12
10
|
import "../../../System/Nullable";
|
|
13
11
|
import "../../../System/Threading/CancellationToken";
|
|
14
12
|
import "../../GameTask/Model/Area/Region";
|
|
15
13
|
import "../Recognition/RecognitionObject";
|
|
16
14
|
|
|
15
|
+
/**
|
|
16
|
+
* 重试前回调:收到当前匹配区域列表;可为同步或返回 Promise 的异步脚本函数
|
|
17
|
+
* @since 0.61.0
|
|
18
|
+
*/
|
|
19
|
+
export type BvLocatorRetryAction = (
|
|
20
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
21
|
+
) => void | Promise<void>;
|
|
22
|
+
|
|
17
23
|
/**
|
|
18
24
|
* BgiVision 定位器,按识别配置查找并操作匹配区域
|
|
19
25
|
* @since 0.57.0
|
|
@@ -27,13 +33,10 @@ export interface BvLocator extends ClrHostValue {
|
|
|
27
33
|
*/
|
|
28
34
|
readonly recognitionObject: BetterGenshinImpact.Core.Recognition.RecognitionObject;
|
|
29
35
|
/**
|
|
30
|
-
*
|
|
36
|
+
* 每次重试前执行的回调;脚本侧可直接赋函数,`null` 清除
|
|
31
37
|
* @since 0.57.0
|
|
32
38
|
*/
|
|
33
|
-
retryAction:
|
|
34
|
-
System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>,
|
|
35
|
-
Promise<void>
|
|
36
|
-
>;
|
|
39
|
+
retryAction: BvLocatorRetryAction | null;
|
|
37
40
|
/**
|
|
38
41
|
* 按当前识别配置查找全部匹配区域;不建议脚本直接调用
|
|
39
42
|
* @returns 匹配到的区域列表
|
|
@@ -118,12 +121,12 @@ export interface BvLocator extends ClrHostValue {
|
|
|
118
121
|
tryWaitForDisappear(timeout: number | StrongNumeric<Int32Host> | null | null): Promise<void>;
|
|
119
122
|
/**
|
|
120
123
|
* 设置感兴趣区域(ROI),覆盖识别配置中的 RegionOfInterest
|
|
121
|
-
* @param deltaFunc 由当前最大 1080P 捕获矩形计算 ROI
|
|
124
|
+
* @param deltaFunc 由当前最大 1080P 捕获矩形计算 ROI 的脚本回调
|
|
122
125
|
* @returns 当前定位器,便于链式调用
|
|
123
126
|
* @since 0.57.0
|
|
124
127
|
*/
|
|
125
128
|
withRoi(
|
|
126
|
-
deltaFunc:
|
|
129
|
+
deltaFunc: (captureRect: OpenCvSharp.Rect) => OpenCvSharp.Rect
|
|
127
130
|
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
128
131
|
/**
|
|
129
132
|
* 设置感兴趣区域(ROI),覆盖识别配置中的 RegionOfInterest
|
|
@@ -151,28 +154,20 @@ export interface BvLocator extends ClrHostValue {
|
|
|
151
154
|
retryInterval: number | StrongNumeric<Int32Host>
|
|
152
155
|
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
153
156
|
/**
|
|
154
|
-
*
|
|
155
|
-
* @param action
|
|
157
|
+
* 设置每次重试前执行的回调;支持同步与异步脚本函数(对应上游 `Action` 与 `dynamic` 重载)
|
|
158
|
+
* @param action 收到当前匹配区域列表时调用的脚本回调;传入 null 清除回调
|
|
156
159
|
* @returns 当前定位器,便于链式调用
|
|
157
160
|
* @since 0.61.0
|
|
158
161
|
*/
|
|
159
162
|
withRetryAction(
|
|
160
|
-
action:
|
|
161
|
-
System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
162
|
-
> | null
|
|
163
|
+
action: BvLocatorRetryAction | null
|
|
163
164
|
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
164
|
-
/**
|
|
165
|
-
* 设置每次重试前执行的回调;供脚本传入无法隐式转为 Action 的函数
|
|
166
|
-
* @param action 脚本回调;可为同步函数或返回 Promise 的异步函数
|
|
167
|
-
* @returns 当前定位器,便于链式调用
|
|
168
|
-
* @since 0.61.0
|
|
169
|
-
*/
|
|
170
|
-
withRetryAction(action: unknown): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
171
165
|
}
|
|
172
166
|
|
|
173
167
|
declare global {
|
|
174
168
|
namespace BetterGenshinImpact.Core.BgiVision {
|
|
175
169
|
type BvLocator = import("./BvLocator").BvLocator;
|
|
170
|
+
type BvLocatorRetryAction = import("./BvLocator").BvLocatorRetryAction;
|
|
176
171
|
}
|
|
177
172
|
}
|
|
178
173
|
|
|
@@ -11,10 +11,11 @@ import "../../../../System/Threading/CancellationTokenSource";
|
|
|
11
11
|
import "../../../GameTask/AutoBoss/AutoBossParam";
|
|
12
12
|
import "../../../GameTask/AutoDomain/AutoDomainParam";
|
|
13
13
|
import "../../../GameTask/AutoFight/AutoFightParam";
|
|
14
|
+
import type { AvatarName } from "../../../GameTask/AutoFight/Model/Avatar";
|
|
14
15
|
import "../../../GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam";
|
|
15
16
|
import "../../../GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam";
|
|
16
17
|
import "../../../GameTask/Common/Job/CountInventoryItemParam";
|
|
17
|
-
import "./Model/
|
|
18
|
+
import "./Model/RealtimeTimer";
|
|
18
19
|
import "./Model/SoloTask";
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -135,10 +136,10 @@ export interface Dispatcher extends ClrHostValue {
|
|
|
135
136
|
* @since unreleased
|
|
136
137
|
*/
|
|
137
138
|
runCombatScript(script: string): Promise<void>;
|
|
138
|
-
runCombatScript(script: string, avatarName:
|
|
139
|
+
runCombatScript(script: string, avatarName: AvatarName | null): Promise<void>;
|
|
139
140
|
runCombatScript(
|
|
140
141
|
script: string,
|
|
141
|
-
avatarName:
|
|
142
|
+
avatarName: AvatarName | null,
|
|
142
143
|
customCt: System.Threading.CancellationToken | null | null
|
|
143
144
|
): Promise<void>;
|
|
144
145
|
/**
|
|
@@ -12,8 +12,10 @@ import type { VoidResult } from "../../../../Microsoft/ClearScript/VoidResult";
|
|
|
12
12
|
import "../../../../OpenCvSharp/Point2f";
|
|
13
13
|
import "../../../../System/Lazy";
|
|
14
14
|
import "../../../../System/Nullable";
|
|
15
|
+
import type { AvatarName } from "../../../GameTask/AutoFight/Model/Avatar";
|
|
15
16
|
import "../../../GameTask/AutoPathing/NavigationInstance";
|
|
16
17
|
import "../../../GameTask/Common/Job/CraftMaterialTask";
|
|
18
|
+
import type { CraftMaterialType } from "../../../GameTask/Common/Job/CraftMaterialTask";
|
|
17
19
|
import type {
|
|
18
20
|
Area,
|
|
19
21
|
CountryName,
|
|
@@ -281,18 +283,27 @@ export interface Genshin extends ClrHostValue {
|
|
|
281
283
|
* 按槽位重组当前队伍角色
|
|
282
284
|
* 未传入或空字符串的槽位跳过;重组队伍槽位角色,不是按数字键切换当前出战角色
|
|
283
285
|
* 示例:`await genshin.switchCharacter("胡桃", "夜兰", "", "钟离")`
|
|
284
|
-
* @param slot1 1
|
|
285
|
-
* @param slot2 2
|
|
286
|
-
* @param slot3 3
|
|
287
|
-
* @param slot4 4
|
|
286
|
+
* @param slot1 1 号位角色名,空字符串表示跳过
|
|
287
|
+
* @param slot2 2 号位角色名,空字符串表示跳过
|
|
288
|
+
* @param slot3 3 号位角色名,空字符串表示跳过
|
|
289
|
+
* @param slot4 4 号位角色名,空字符串表示跳过
|
|
288
290
|
* @returns 在任务完成后兑现是否成功的 Promise;完成保存并返回主界面为 true,参数无效、目标角色未找到或流程失败为 false
|
|
289
291
|
* @since unreleased
|
|
290
292
|
*/
|
|
291
293
|
switchCharacter(): Promise<boolean>;
|
|
292
|
-
switchCharacter(slot1:
|
|
293
|
-
switchCharacter(slot1:
|
|
294
|
-
switchCharacter(
|
|
295
|
-
|
|
294
|
+
switchCharacter(slot1: "" | AvatarName): Promise<boolean>;
|
|
295
|
+
switchCharacter(slot1: "" | AvatarName, slot2: "" | AvatarName): Promise<boolean>;
|
|
296
|
+
switchCharacter(
|
|
297
|
+
slot1: "" | AvatarName,
|
|
298
|
+
slot2: "" | AvatarName,
|
|
299
|
+
slot3: "" | AvatarName
|
|
300
|
+
): Promise<boolean>;
|
|
301
|
+
switchCharacter(
|
|
302
|
+
slot1: "" | AvatarName,
|
|
303
|
+
slot2: "" | AvatarName,
|
|
304
|
+
slot3: "" | AvatarName,
|
|
305
|
+
slot4: "" | AvatarName
|
|
306
|
+
): Promise<boolean>;
|
|
296
307
|
/**
|
|
297
308
|
* 清除当前调度器的队伍缓存
|
|
298
309
|
* @returns ClearScript 宿主空结果
|
|
@@ -361,7 +372,7 @@ export interface Genshin extends ClrHostValue {
|
|
|
361
372
|
craftMaterial(
|
|
362
373
|
materialName: string,
|
|
363
374
|
quantity: number | StrongNumeric<Int32Host>,
|
|
364
|
-
materialType:
|
|
375
|
+
materialType: CraftMaterialType | null
|
|
365
376
|
): Promise<BetterGenshinImpact.GameTask.Common.Job.CraftMaterialResult>;
|
|
366
377
|
/**
|
|
367
378
|
* 返回主界面
|
|
@@ -100,6 +100,7 @@ export interface KeyMouseHook extends ClrHostValue, System.IDisposableInput {
|
|
|
100
100
|
declare global {
|
|
101
101
|
namespace BetterGenshinImpact.Core.Script.Dependence {
|
|
102
102
|
type KeyMouseHook = import("./KeyMouseHook").KeyMouseHook;
|
|
103
|
+
type MouseButton = import("./KeyMouseHook").MouseButton;
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -64,11 +64,14 @@ export interface LimitedFile extends ClrHostValue {
|
|
|
64
64
|
* 异步读取文件全部文本
|
|
65
65
|
* 读取失败时通过回调传入错误并返回空字符串
|
|
66
66
|
* @param path 相对工作区的文件路径
|
|
67
|
-
* @param callbackFunc
|
|
67
|
+
* @param callbackFunc 脚本回调 `(error, text)`;成功时 `error` 为 null,失败时 `text` 为 null
|
|
68
68
|
* @returns 在任务完成后兑现文件文本的 Promise
|
|
69
69
|
* @since 0.43.1
|
|
70
70
|
*/
|
|
71
|
-
readText(
|
|
71
|
+
readText(
|
|
72
|
+
path: string,
|
|
73
|
+
callbackFunc: (error: string | null, text: string | null) => void
|
|
74
|
+
): Promise<string>;
|
|
72
75
|
/**
|
|
73
76
|
* 异步读取文件全部文本
|
|
74
77
|
* 读取失败时返回空字符串
|
|
@@ -130,17 +133,21 @@ export interface LimitedFile extends ClrHostValue {
|
|
|
130
133
|
* 异步写入文本到文件并触发回调
|
|
131
134
|
* @param path 相对工作区的文件路径
|
|
132
135
|
* @param content 要写入的内容
|
|
133
|
-
* @param callbackFunc
|
|
136
|
+
* @param callbackFunc 脚本回调 `(error, success)`;成功时 `error` 为 null,失败时 `success` 为 null
|
|
134
137
|
* @param append 是否追加到文件末尾,默认为 false(覆盖)
|
|
135
138
|
* @returns 在任务完成后兑现是否写入成功的 Promise
|
|
136
139
|
* @since 0.44.4
|
|
137
140
|
*/
|
|
138
|
-
writeText(
|
|
141
|
+
writeText(
|
|
142
|
+
path: string,
|
|
143
|
+
content: string,
|
|
144
|
+
callbackFunc: (error: string | null, success: boolean | null) => void
|
|
145
|
+
): Promise<boolean>;
|
|
139
146
|
writeText(path: string, content: string, append: boolean): Promise<boolean>;
|
|
140
147
|
writeText(
|
|
141
148
|
path: string,
|
|
142
149
|
content: string,
|
|
143
|
-
callbackFunc:
|
|
150
|
+
callbackFunc: (error: string | null, success: boolean | null) => void,
|
|
144
151
|
append: boolean
|
|
145
152
|
): Promise<boolean>;
|
|
146
153
|
/**
|
|
@@ -4,6 +4,48 @@ import type {
|
|
|
4
4
|
PublicDefaultConstructorTrait,
|
|
5
5
|
ReferenceTypeTrait
|
|
6
6
|
} from "../../../../../Microsoft/ClearScript/HostType";
|
|
7
|
+
import "../../../../GameTask/AutoSkip/AutoSkipConfig";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 实时触发器名 → RealtimeTimer.Config(唯一真源;配置一律 inline,无额外 type 名)
|
|
11
|
+
* 与 `GameTaskManager.AddTrigger` / `RealtimeTimer` 构造对齐
|
|
12
|
+
* @since 0.43.1
|
|
13
|
+
*/
|
|
14
|
+
export type RealtimeTriggerConfigMap = {
|
|
15
|
+
/**
|
|
16
|
+
* 自动拾取
|
|
17
|
+
* 对应上游 `AutoPickExternalConfig`
|
|
18
|
+
*/
|
|
19
|
+
AutoPick: {
|
|
20
|
+
/** 需要 F 的文本(对话、拾取) */
|
|
21
|
+
textList?: string[];
|
|
22
|
+
/** 无视文本和图标,遇到 F 就点击;默认 false */
|
|
23
|
+
forceInteraction?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 自动跳过剧情
|
|
27
|
+
* 构造侧要求传入 `AutoSkipConfig` 实例
|
|
28
|
+
*/
|
|
29
|
+
AutoSkip: BetterGenshinImpact.GameTask.AutoSkip.AutoSkipConfig;
|
|
30
|
+
/**
|
|
31
|
+
* 自动吃药;`AddTrigger` 可按名添加,构造不解析专用 config
|
|
32
|
+
*/
|
|
33
|
+
AutoEat: void;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 实时触发器注册名 = map key;`(string & {})` 保留未知扩展
|
|
38
|
+
* @see GameTaskManager.AddTrigger
|
|
39
|
+
* @since 0.43.1
|
|
40
|
+
*/
|
|
41
|
+
export type RealtimeTriggerName = keyof RealtimeTriggerConfigMap | (string & {});
|
|
42
|
+
|
|
43
|
+
export type RealtimeTriggerConfigForName<TName extends RealtimeTriggerName> =
|
|
44
|
+
TName extends keyof RealtimeTriggerConfigMap
|
|
45
|
+
? RealtimeTriggerConfigMap[TName] extends void
|
|
46
|
+
? undefined
|
|
47
|
+
: RealtimeTriggerConfigMap[TName]
|
|
48
|
+
: Record<string, unknown>;
|
|
7
49
|
|
|
8
50
|
/**
|
|
9
51
|
* 实时任务触发器
|
|
@@ -16,22 +58,30 @@ export interface RealtimeTimer extends ClrHostValue {
|
|
|
16
58
|
* 实时任务触发器名称
|
|
17
59
|
* @since 0.43.1
|
|
18
60
|
*/
|
|
19
|
-
name:
|
|
61
|
+
name: RealtimeTriggerName;
|
|
20
62
|
/**
|
|
21
63
|
* 实时任务触发间隔,单位毫秒,默认 50
|
|
22
64
|
* @since 0.43.1
|
|
23
65
|
*/
|
|
24
66
|
interval: number;
|
|
25
67
|
/**
|
|
26
|
-
*
|
|
68
|
+
* 实时任务配置(CLR 存 `object?`,JS 侧 plain object 或宿主配置实例)
|
|
27
69
|
* @since 0.43.1
|
|
28
70
|
*/
|
|
29
|
-
config:
|
|
71
|
+
config:
|
|
72
|
+
| Exclude<RealtimeTriggerConfigMap[keyof RealtimeTriggerConfigMap], void>
|
|
73
|
+
| Record<string, unknown>
|
|
74
|
+
| null
|
|
75
|
+
| undefined;
|
|
30
76
|
}
|
|
31
77
|
|
|
32
78
|
declare global {
|
|
33
79
|
namespace BetterGenshinImpact.Core.Script.Dependence.Model {
|
|
34
|
-
type RealtimeTimer = import("./
|
|
80
|
+
type RealtimeTimer = import("./RealtimeTimer").RealtimeTimer;
|
|
81
|
+
type RealtimeTriggerConfigForName<TName extends RealtimeTriggerName> =
|
|
82
|
+
import("./RealtimeTimer").RealtimeTriggerConfigForName<TName>;
|
|
83
|
+
type RealtimeTriggerConfigMap = import("./RealtimeTimer").RealtimeTriggerConfigMap;
|
|
84
|
+
type RealtimeTriggerName = import("./RealtimeTimer").RealtimeTriggerName;
|
|
35
85
|
}
|
|
36
86
|
}
|
|
37
87
|
|
|
@@ -45,18 +95,23 @@ export interface RealtimeTimerHostType extends HostType<
|
|
|
45
95
|
*/
|
|
46
96
|
new (): RealtimeTimer;
|
|
47
97
|
/**
|
|
48
|
-
*
|
|
98
|
+
* 仅名称
|
|
49
99
|
* @param name 实时任务触发器名称
|
|
50
100
|
* @since 0.43.1
|
|
51
101
|
*/
|
|
52
|
-
new (name:
|
|
102
|
+
new (name: RealtimeTriggerName): RealtimeTimer;
|
|
53
103
|
/**
|
|
54
|
-
*
|
|
104
|
+
* 名称 + 配置(按触发器名收窄)
|
|
55
105
|
* @param name 实时任务触发器名称
|
|
56
106
|
* @param config 实时任务配置
|
|
57
107
|
* @since 0.43.1
|
|
58
108
|
*/
|
|
59
|
-
new
|
|
109
|
+
new <TName extends RealtimeTriggerName>(
|
|
110
|
+
name: TName,
|
|
111
|
+
config: RealtimeTriggerConfigForName<TName> extends undefined
|
|
112
|
+
? Record<string, unknown> | undefined
|
|
113
|
+
: RealtimeTriggerConfigForName<TName>
|
|
114
|
+
): RealtimeTimer;
|
|
60
115
|
}
|
|
61
116
|
|
|
62
117
|
export {};
|
|
@@ -3,7 +3,6 @@ import type {
|
|
|
3
3
|
HostType,
|
|
4
4
|
ReferenceTypeTrait
|
|
5
5
|
} from "../../../../../Microsoft/ClearScript/HostType";
|
|
6
|
-
import "../../../../../Microsoft/ClearScript/ScriptObject";
|
|
7
6
|
import "../../../../GameTask/Common/Job/CountInventoryItemParam";
|
|
8
7
|
import "../../../../GameTask/Model/GameUI/GridScreenName";
|
|
9
8
|
|
|
@@ -109,6 +108,10 @@ export interface SoloTask extends ClrHostValue {
|
|
|
109
108
|
declare global {
|
|
110
109
|
namespace BetterGenshinImpact.Core.Script.Dependence.Model {
|
|
111
110
|
type SoloTask = import("./SoloTask").SoloTask;
|
|
111
|
+
type SoloTaskConfigForName<TName extends SoloTaskName> =
|
|
112
|
+
import("./SoloTask").SoloTaskConfigForName<TName>;
|
|
113
|
+
type SoloTaskConfigMap = import("./SoloTask").SoloTaskConfigMap;
|
|
114
|
+
type SoloTaskName = import("./SoloTask").SoloTaskName;
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
|
|
@@ -6,6 +6,64 @@ import type {
|
|
|
6
6
|
} from "../../../Microsoft/ClearScript/HostType";
|
|
7
7
|
import "../../../System/ComponentModel/INotifyPropertyChanged";
|
|
8
8
|
import "../../../System/ComponentModel/INotifyPropertyChanging";
|
|
9
|
+
import type { CombatStrategyName } from "../AutoFight/AutoFightConfig";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 自动首领讨伐支持的 Boss 名称
|
|
13
|
+
* 来源:上游 `AutoBossData.CountryToBosses` 扁平列表(启动时 `IsSupportedBoss` 校验)
|
|
14
|
+
* @since 0.62.0
|
|
15
|
+
*/
|
|
16
|
+
export type BossName =
|
|
17
|
+
// 蒙德
|
|
18
|
+
| "急冻树"
|
|
19
|
+
| "无相之雷"
|
|
20
|
+
| "守望者·堕天"
|
|
21
|
+
// 璃月
|
|
22
|
+
| "爆炎树"
|
|
23
|
+
| "纯水精灵"
|
|
24
|
+
| "古岩龙蜥"
|
|
25
|
+
| "无相之岩"
|
|
26
|
+
| "遗迹巨蛇"
|
|
27
|
+
| "隐山猊兽"
|
|
28
|
+
// 稻妻
|
|
29
|
+
| "无相之火"
|
|
30
|
+
| "恒常机关阵列"
|
|
31
|
+
| "雷音权现"
|
|
32
|
+
| "魔偶剑鬼"
|
|
33
|
+
| "无相之水"
|
|
34
|
+
// 须弥
|
|
35
|
+
| "掣电树"
|
|
36
|
+
| "半永恒统辖矩阵"
|
|
37
|
+
| "翠翎恐蕈"
|
|
38
|
+
| "风蚀沙虫"
|
|
39
|
+
| "无相之草"
|
|
40
|
+
| "深罪浸礼者"
|
|
41
|
+
| "兆载永劫龙兽"
|
|
42
|
+
// 枫丹
|
|
43
|
+
| "歌裴莉娅的葬送"
|
|
44
|
+
| "科培琉司的劫罚"
|
|
45
|
+
| "实验性场力发生装置"
|
|
46
|
+
| "魔像督军"
|
|
47
|
+
| "千年珍珠骏麟"
|
|
48
|
+
| "水形幻人"
|
|
49
|
+
| "铁甲熔火帝皇"
|
|
50
|
+
// 纳塔
|
|
51
|
+
| "金焰绒翼龙暴君"
|
|
52
|
+
| "灵觉隐修的迷者"
|
|
53
|
+
| "秘源机兵·构型械"
|
|
54
|
+
| "秘源机兵·统御械"
|
|
55
|
+
| "熔岩辉龙像"
|
|
56
|
+
| "深邃摹结株"
|
|
57
|
+
| "贪食匿叶龙山王"
|
|
58
|
+
// 挪德卡莱
|
|
59
|
+
| "蕴光月守宫"
|
|
60
|
+
| "深黯魇语之主"
|
|
61
|
+
| "超重型陆巡舰·机动战垒"
|
|
62
|
+
| "霜夜巡天灵主"
|
|
63
|
+
| "蕴光月幻蝶"
|
|
64
|
+
| "重拳出击鸭"
|
|
65
|
+
| "" // 未指定
|
|
66
|
+
| (string & {});
|
|
9
67
|
|
|
10
68
|
/**
|
|
11
69
|
* 自动首领讨伐的持久化配置,由独立任务页使用
|
|
@@ -31,10 +89,10 @@ export interface AutoBossConfig
|
|
|
31
89
|
System.ComponentModel.INotifyPropertyChangingInput {
|
|
32
90
|
readonly [autoBossConfigBrand]: true;
|
|
33
91
|
/**
|
|
34
|
-
* 需要讨伐的 Boss
|
|
92
|
+
* 需要讨伐的 Boss 名称;空字符串表示未指定,启动前须为受支持名单内名称
|
|
35
93
|
* @since 0.62.0
|
|
36
94
|
*/
|
|
37
|
-
bossName:
|
|
95
|
+
bossName: BossName;
|
|
38
96
|
/**
|
|
39
97
|
* 每轮领奖后是否先返回七天神像,再重新前往 Boss
|
|
40
98
|
* @since 0.62.0
|
|
@@ -64,7 +122,7 @@ export interface AutoBossConfig
|
|
|
64
122
|
* 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
|
|
65
123
|
* @since 0.62.0
|
|
66
124
|
*/
|
|
67
|
-
strategyName:
|
|
125
|
+
strategyName: CombatStrategyName;
|
|
68
126
|
/**
|
|
69
127
|
* 讨伐前需要切换到的队伍名称,为空时保持当前队伍
|
|
70
128
|
* @since 0.62.0
|
|
@@ -85,6 +143,7 @@ export interface AutoBossConfig
|
|
|
85
143
|
declare global {
|
|
86
144
|
namespace BetterGenshinImpact.GameTask.AutoBoss {
|
|
87
145
|
type AutoBossConfig = import("./AutoBossConfig").AutoBossConfig;
|
|
146
|
+
type BossName = import("./AutoBossConfig").BossName;
|
|
88
147
|
}
|
|
89
148
|
}
|
|
90
149
|
|
|
@@ -4,7 +4,9 @@ import type {
|
|
|
4
4
|
ReferenceTypeTrait
|
|
5
5
|
} from "../../../Microsoft/ClearScript/HostType";
|
|
6
6
|
import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
|
|
7
|
+
import type { CombatStrategyName } from "../AutoFight/AutoFightConfig";
|
|
7
8
|
import "../Model/BaseTaskParam";
|
|
9
|
+
import type { BossName } from "./AutoBossConfig";
|
|
8
10
|
import "./AutoBossConfig";
|
|
9
11
|
import "./AutoBossTask";
|
|
10
12
|
|
|
@@ -32,15 +34,15 @@ export interface AutoBossParam extends Omit<
|
|
|
32
34
|
> {
|
|
33
35
|
readonly [autoBossParamBrand]: true;
|
|
34
36
|
/**
|
|
35
|
-
* 需要讨伐的 Boss
|
|
37
|
+
* 需要讨伐的 Boss 名称;空字符串表示未指定,启动前须为受支持名单内名称
|
|
36
38
|
* @since 0.62.0
|
|
37
39
|
*/
|
|
38
|
-
bossName:
|
|
40
|
+
bossName: BossName;
|
|
39
41
|
/**
|
|
40
42
|
* 界面中选择的战斗策略名称;无自定义策略路径时会同步更新实际策略路径
|
|
41
43
|
* @since 0.62.0
|
|
42
44
|
*/
|
|
43
|
-
strategyName:
|
|
45
|
+
strategyName: CombatStrategyName;
|
|
44
46
|
/**
|
|
45
47
|
* 实际用于解析自动战斗脚本的路径,脚本可直接设置该路径以覆盖界面选择
|
|
46
48
|
* @since 0.62.0
|
|
@@ -106,7 +108,7 @@ export interface AutoBossParam extends Omit<
|
|
|
106
108
|
* @since 0.62.0
|
|
107
109
|
*/
|
|
108
110
|
setCombatStrategyPath(): VoidResult;
|
|
109
|
-
setCombatStrategyPath(strategyName:
|
|
111
|
+
setCombatStrategyPath(strategyName: CombatStrategyName | null): VoidResult;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
declare global {
|
|
@@ -7,7 +7,9 @@ import type {
|
|
|
7
7
|
} from "../../../Microsoft/ClearScript/HostType";
|
|
8
8
|
import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
|
|
9
9
|
import "../../../System/Collections/Generic/List";
|
|
10
|
+
import type { CombatStrategyName } from "../AutoFight/AutoFightConfig";
|
|
10
11
|
import "../Model/BaseTaskParam";
|
|
12
|
+
import type { ArtifactStar, DomainName, ResinName, SundaySelectedValue } from "./AutoDomainTask";
|
|
11
13
|
import "./AutoDomainTask";
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -54,15 +56,15 @@ export interface AutoDomainParam extends Omit<
|
|
|
54
56
|
*/
|
|
55
57
|
partyName: string;
|
|
56
58
|
/**
|
|
57
|
-
*
|
|
59
|
+
* 需要刷取的秘境名称;空字符串表示未指定
|
|
58
60
|
* @since 0.52.0
|
|
59
61
|
*/
|
|
60
|
-
domainName:
|
|
62
|
+
domainName: DomainName;
|
|
61
63
|
/**
|
|
62
|
-
*
|
|
64
|
+
* 周日 / 限时全开秘境奖励选项序号;空字符串表示不指定
|
|
63
65
|
* @since 0.52.0
|
|
64
66
|
*/
|
|
65
|
-
sundaySelectedValue:
|
|
67
|
+
sundaySelectedValue: SundaySelectedValue;
|
|
66
68
|
/**
|
|
67
69
|
* 是否在结束后自动分解圣遗物
|
|
68
70
|
* @since 0.52.0
|
|
@@ -72,7 +74,7 @@ export interface AutoDomainParam extends Omit<
|
|
|
72
74
|
* 分解圣遗物的最大星级,取值 1–4,默认 `4`
|
|
73
75
|
* @since 0.52.0
|
|
74
76
|
*/
|
|
75
|
-
maxArtifactStar:
|
|
77
|
+
maxArtifactStar: ArtifactStar;
|
|
76
78
|
/**
|
|
77
79
|
* 是否启用指定树脂使用次数模式
|
|
78
80
|
* @since 0.52.0
|
|
@@ -82,7 +84,7 @@ export interface AutoDomainParam extends Omit<
|
|
|
82
84
|
* 使用树脂的优先级列表,默认浓缩树脂优先于原粹树脂
|
|
83
85
|
* @since 0.52.0
|
|
84
86
|
*/
|
|
85
|
-
resinPriorityList: System.Collections.Generic.List<
|
|
87
|
+
resinPriorityList: System.Collections.Generic.List<ResinName>;
|
|
86
88
|
/**
|
|
87
89
|
* 使用原粹树脂刷取副本的次数
|
|
88
90
|
* @since 0.52.0
|
|
@@ -131,15 +133,15 @@ export interface AutoDomainParam extends Omit<
|
|
|
131
133
|
* @since 0.52.0
|
|
132
134
|
*/
|
|
133
135
|
setCombatStrategyPath(): string;
|
|
134
|
-
setCombatStrategyPath(strategyName:
|
|
136
|
+
setCombatStrategyPath(strategyName: CombatStrategyName | null): string;
|
|
135
137
|
/**
|
|
136
138
|
* 设置使用树脂的优先级列表
|
|
137
139
|
* @param priorities 树脂名称数组,顺序即优先级
|
|
138
140
|
* @returns ClearScript 宿主空结果
|
|
139
141
|
* @since 0.52.0
|
|
140
142
|
*/
|
|
141
|
-
setResinPriorityList(priorities: HostArray<
|
|
142
|
-
setResinPriorityList(...priorities:
|
|
143
|
+
setResinPriorityList(priorities: HostArray<ResinName>): VoidResult;
|
|
144
|
+
setResinPriorityList(...priorities: ResinName[]): VoidResult;
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
declare global {
|
|
@@ -19,6 +19,63 @@ import "./AutoDomainParam";
|
|
|
19
19
|
export type ResinName =
|
|
20
20
|
"浓缩树脂" | "原粹树脂" | "原粹树脂20" | "原粹树脂40" | "须臾树脂" | "脆弱树脂" | (string & {});
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* 分解圣遗物最大星级(字符串);上游 `int.TryParse` 后按 1–4 使用
|
|
24
|
+
* @since 0.52.0
|
|
25
|
+
*/
|
|
26
|
+
export type ArtifactStar = "1" | "2" | "3" | "4" | (string & {});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 可自动刷取的秘境名称
|
|
30
|
+
* 来源:`MapLazyAssets` 从 `tp.json` 提取的 BlessDomain / ForgeryDomain / MasteryDomain 点位名
|
|
31
|
+
* @since 0.52.0
|
|
32
|
+
*/
|
|
33
|
+
export type DomainName =
|
|
34
|
+
| "铭记之谷"
|
|
35
|
+
| "忘却之峡"
|
|
36
|
+
| "仲夏庭园"
|
|
37
|
+
| "塞西莉亚苗圃"
|
|
38
|
+
| "无妄引咎密宫"
|
|
39
|
+
| "太山府"
|
|
40
|
+
| "震雷连山密宫"
|
|
41
|
+
| "孤云凌霄之处"
|
|
42
|
+
| "华池岩岫"
|
|
43
|
+
| "芬德尼尔之顶"
|
|
44
|
+
| "山脊守望"
|
|
45
|
+
| "菫色之庭"
|
|
46
|
+
| "椛染之庭"
|
|
47
|
+
| "砂流之庭"
|
|
48
|
+
| "沉眠之庭"
|
|
49
|
+
| "昏识塔"
|
|
50
|
+
| "缘觉塔"
|
|
51
|
+
| "有顶塔"
|
|
52
|
+
| "岩中幽谷"
|
|
53
|
+
| "赤金的城墟"
|
|
54
|
+
| "熔铁的孤塞"
|
|
55
|
+
| "深潮的余响"
|
|
56
|
+
| "苍白的遗荣"
|
|
57
|
+
| "罪祸的终末"
|
|
58
|
+
| "临瀑之城"
|
|
59
|
+
| "褪色的剧场"
|
|
60
|
+
| "蕴火的幽墟"
|
|
61
|
+
| "深古瞭望所"
|
|
62
|
+
| "虹灵的净土"
|
|
63
|
+
| "荒废砌造坞"
|
|
64
|
+
| "无光的深都"
|
|
65
|
+
| "霜凝的机枢"
|
|
66
|
+
| "失落的月庭"
|
|
67
|
+
| "月童的库藏"
|
|
68
|
+
| "山风的荆冕"
|
|
69
|
+
| "" // 未指定
|
|
70
|
+
| (string & {});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 周日 / 限时全开秘境奖励选项序号
|
|
74
|
+
* UI 列表为 `""` / `1` / `2` / `3`;任务内 `switch` 仅处理 1–3
|
|
75
|
+
* @since 0.52.0
|
|
76
|
+
*/
|
|
77
|
+
export type SundaySelectedValue = "" | "1" | "2" | "3" | (string & {});
|
|
78
|
+
|
|
22
79
|
/**
|
|
23
80
|
* 自动秘境独立任务
|
|
24
81
|
* @since 0.52.0
|
|
@@ -51,6 +108,10 @@ export interface AutoDomainTask
|
|
|
51
108
|
declare global {
|
|
52
109
|
namespace BetterGenshinImpact.GameTask.AutoDomain {
|
|
53
110
|
type AutoDomainTask = import("./AutoDomainTask").AutoDomainTask;
|
|
111
|
+
type ArtifactStar = import("./AutoDomainTask").ArtifactStar;
|
|
112
|
+
type DomainName = import("./AutoDomainTask").DomainName;
|
|
113
|
+
type ResinName = import("./AutoDomainTask").ResinName;
|
|
114
|
+
type SundaySelectedValue = import("./AutoDomainTask").SundaySelectedValue;
|
|
54
115
|
}
|
|
55
116
|
}
|
|
56
117
|
|