@bettergi/types 0.1.15 → 0.1.17
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/Color.d.ts +12 -0
- package/bindings/Pen.d.ts +12 -0
- package/bindings/RealtimeTimer.d.ts +1 -1
- package/bindings/characterDevelopmentTask.d.ts +11 -0
- package/bindings/getAvatars.d.ts +3 -2
- package/index.d.ts +3 -0
- package/package.json +1 -1
- package/types/BetterGenshinImpact/Core/BgiVision/BvFlow.d.ts +243 -0
- package/types/BetterGenshinImpact/Core/BgiVision/BvFlowAction.d.ts +249 -0
- package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
- package/types/BetterGenshinImpact/Core/BgiVision/BvPage.d.ts +22 -0
- package/types/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +3 -3
- package/types/BetterGenshinImpact/Core/Script/Dependence/AutoPathingScript.d.ts +1 -1
- package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +5 -4
- package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +29 -11
- 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 +68 -3
- package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +12 -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 +102 -2
- package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +49 -6
- package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
- package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -31
- 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/CharacterDevelopment/CharacterDevelopmentTask.d.ts +158 -0
- 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/GameTask/Model/Area/Region.d.ts +5 -0
- package/types/BetterGenshinImpact/GameTask/Model/GameUI/GridScreenName.d.ts +1 -1
- package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
|
@@ -10,11 +10,13 @@ import type {
|
|
|
10
10
|
} from "../../../Microsoft/ClearScript/HostType";
|
|
11
11
|
import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
|
|
12
12
|
import "../../../OpenCvSharp/Rect";
|
|
13
|
+
import "../../../System/Collections/Generic/IEnumerable";
|
|
13
14
|
import "../../../System/Collections/Generic/List";
|
|
14
15
|
import "../../../System/Threading/CancellationToken";
|
|
15
16
|
import "../../GameTask/Model/Area/ImageRegion";
|
|
16
17
|
import "../../GameTask/Model/Area/Region";
|
|
17
18
|
import "../Recognition/RecognitionObject";
|
|
19
|
+
import "./BvFlow";
|
|
18
20
|
import "./BvImage";
|
|
19
21
|
import "./BvLocator";
|
|
20
22
|
|
|
@@ -45,6 +47,12 @@ export interface BvPage extends ClrHostValue {
|
|
|
45
47
|
* @since 0.57.0
|
|
46
48
|
*/
|
|
47
49
|
defaultRetryInterval: number;
|
|
50
|
+
/**
|
|
51
|
+
* 创建使用当前超时与重试间隔的链式流程
|
|
52
|
+
* @returns 新的空流程
|
|
53
|
+
* @since 0.63.0
|
|
54
|
+
*/
|
|
55
|
+
flow(): BetterGenshinImpact.Core.BgiVision.BvFlow;
|
|
48
56
|
/**
|
|
49
57
|
* 截取当前游戏画面为图像区域
|
|
50
58
|
* @returns 当前游戏画面的图像区域
|
|
@@ -97,6 +105,20 @@ export interface BvPage extends ClrHostValue {
|
|
|
97
105
|
getByText(): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
98
106
|
getByText(text: string): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
99
107
|
getByText(text: string, rect: OpenCvSharp.Rect): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
108
|
+
/**
|
|
109
|
+
* 按任一指定文本创建定位器
|
|
110
|
+
* @param texts 字符串集合或 ClearScript JS Array
|
|
111
|
+
* @param rect 感兴趣区域;省略时搜索整幅画面
|
|
112
|
+
* @returns 对应目标的定位器
|
|
113
|
+
* @since 0.63.0
|
|
114
|
+
*/
|
|
115
|
+
getByAnyText(
|
|
116
|
+
texts: readonly string[] | System.Collections.Generic.IEnumerableInput<string>
|
|
117
|
+
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
118
|
+
getByAnyText(
|
|
119
|
+
texts: readonly string[] | System.Collections.Generic.IEnumerableInput<string>,
|
|
120
|
+
rect: OpenCvSharp.Rect
|
|
121
|
+
): BetterGenshinImpact.Core.BgiVision.BvLocator;
|
|
100
122
|
/**
|
|
101
123
|
* 按图像创建定位器
|
|
102
124
|
* @param image BgiVision 模板图像
|
|
@@ -46,17 +46,17 @@ export interface RecognitionObject extends ClrHostValue {
|
|
|
46
46
|
name: string;
|
|
47
47
|
/**
|
|
48
48
|
* 模板图或识别区域所在捕获画布的尺寸,例如 1920×1080、3840×2160,对应模板截取来源图像大小
|
|
49
|
-
* @since
|
|
49
|
+
* @since 0.63.0
|
|
50
50
|
*/
|
|
51
51
|
referenceImageSize: OpenCvSharp.Size | null;
|
|
52
52
|
/**
|
|
53
53
|
* 模板图或识别区域在截取来源图像中的位置与大小;模板匹配时宽高通常等于模板图尺寸,语义接近 bbox
|
|
54
|
-
* @since
|
|
54
|
+
* @since 0.63.0
|
|
55
55
|
*/
|
|
56
56
|
referenceBoundingBox: OpenCvSharp.Rect | null;
|
|
57
57
|
/**
|
|
58
58
|
* 查找位置时的搜索选项;未指定时使用默认机制
|
|
59
|
-
* @since
|
|
59
|
+
* @since 0.63.0
|
|
60
60
|
*/
|
|
61
61
|
searchOptions: BetterGenshinImpact.Core.Recognition.SearchOptions;
|
|
62
62
|
/**
|
|
@@ -67,7 +67,7 @@ export interface AutoPathingScript extends ClrHostValue {
|
|
|
67
67
|
* 读取 AutoPathing 目录下指定文件的文本内容
|
|
68
68
|
* @param subPath 相对于 User\AutoPathing 的文件路径
|
|
69
69
|
* @returns 文件文本内容,读取失败时返回空字符串
|
|
70
|
-
* @since
|
|
70
|
+
* @since 0.63.0
|
|
71
71
|
*/
|
|
72
72
|
readTextSync(subPath: string): string;
|
|
73
73
|
}
|
|
@@ -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
|
/**
|
|
@@ -132,13 +133,13 @@ export interface Dispatcher extends ClrHostValue {
|
|
|
132
133
|
* @param avatarName 指定操作的角色名,省略时操作当前角色
|
|
133
134
|
* @param customCt 自定义取消令牌
|
|
134
135
|
* @returns 在任务完成后兑现的 Promise
|
|
135
|
-
* @since
|
|
136
|
+
* @since 0.63.0
|
|
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,
|
|
@@ -138,7 +140,7 @@ export interface Genshin extends ClrHostValue {
|
|
|
138
140
|
* @param y 目标 Y 坐标
|
|
139
141
|
* @param forceCountry 强制先切换的大地图区域(`SwitchArea` OCR 文案),默认为 null
|
|
140
142
|
* @returns 在任务完成后兑现的 Promise
|
|
141
|
-
* @since
|
|
143
|
+
* @since 0.63.0
|
|
142
144
|
*/
|
|
143
145
|
clickMapPoint(
|
|
144
146
|
x: number | StrongNumeric<DoubleHost>,
|
|
@@ -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
|
-
* @since
|
|
291
|
+
* @since 0.63.0
|
|
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 宿主空结果
|
|
@@ -346,6 +357,13 @@ export interface Genshin extends ClrHostValue {
|
|
|
346
357
|
* @since 0.43.1
|
|
347
358
|
*/
|
|
348
359
|
goToCraftingBench(country: CountryName): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* 前往合成台并合成浓缩树脂
|
|
362
|
+
* @param country 国家名称
|
|
363
|
+
* @returns 在任务完成后兑现的 Promise
|
|
364
|
+
* @since 0.63.0
|
|
365
|
+
*/
|
|
366
|
+
goCraftResin(country: CountryName): Promise<void>;
|
|
349
367
|
/**
|
|
350
368
|
* 在当前已打开的合成界面中合成指定材料
|
|
351
369
|
* @param materialName 目标成品材料名
|
|
@@ -361,7 +379,7 @@ export interface Genshin extends ClrHostValue {
|
|
|
361
379
|
craftMaterial(
|
|
362
380
|
materialName: string,
|
|
363
381
|
quantity: number | StrongNumeric<Int32Host>,
|
|
364
|
-
materialType:
|
|
382
|
+
materialType: CraftMaterialType | null
|
|
365
383
|
): Promise<BetterGenshinImpact.GameTask.Common.Job.CraftMaterialResult>;
|
|
366
384
|
/**
|
|
367
385
|
* 返回主界面
|
|
@@ -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
|
* 自动首领讨伐的持久化配置,由独立任务页使用
|
|
@@ -24,6 +82,7 @@ export interface AutoBossConfig
|
|
|
24
82
|
| "specifyRunCount"
|
|
25
83
|
| "strategyName"
|
|
26
84
|
| "teamName"
|
|
85
|
+
| "timeout"
|
|
27
86
|
| "useFragileResin"
|
|
28
87
|
| "useTransientResin"
|
|
29
88
|
>,
|
|
@@ -31,10 +90,10 @@ export interface AutoBossConfig
|
|
|
31
90
|
System.ComponentModel.INotifyPropertyChangingInput {
|
|
32
91
|
readonly [autoBossConfigBrand]: true;
|
|
33
92
|
/**
|
|
34
|
-
* 需要讨伐的 Boss
|
|
93
|
+
* 需要讨伐的 Boss 名称;空字符串表示未指定,启动前须为受支持名单内名称
|
|
35
94
|
* @since 0.62.0
|
|
36
95
|
*/
|
|
37
|
-
bossName:
|
|
96
|
+
bossName: BossName;
|
|
38
97
|
/**
|
|
39
98
|
* 每轮领奖后是否先返回七天神像,再重新前往 Boss
|
|
40
99
|
* @since 0.62.0
|
|
@@ -50,6 +109,11 @@ export interface AutoBossConfig
|
|
|
50
109
|
* @since 0.62.0
|
|
51
110
|
*/
|
|
52
111
|
rewardRecognitionEnabled: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* 战斗超时时长,单位秒,默认 240
|
|
114
|
+
* @since 0.63.0
|
|
115
|
+
*/
|
|
116
|
+
timeout: number;
|
|
53
117
|
/**
|
|
54
118
|
* 指定模式下成功领取奖励的目标次数
|
|
55
119
|
* @since 0.62.0
|
|
@@ -64,7 +128,7 @@ export interface AutoBossConfig
|
|
|
64
128
|
* 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
|
|
65
129
|
* @since 0.62.0
|
|
66
130
|
*/
|
|
67
|
-
strategyName:
|
|
131
|
+
strategyName: CombatStrategyName;
|
|
68
132
|
/**
|
|
69
133
|
* 讨伐前需要切换到的队伍名称,为空时保持当前队伍
|
|
70
134
|
* @since 0.62.0
|
|
@@ -85,6 +149,7 @@ export interface AutoBossConfig
|
|
|
85
149
|
declare global {
|
|
86
150
|
namespace BetterGenshinImpact.GameTask.AutoBoss {
|
|
87
151
|
type AutoBossConfig = import("./AutoBossConfig").AutoBossConfig;
|
|
152
|
+
type BossName = import("./AutoBossConfig").BossName;
|
|
88
153
|
}
|
|
89
154
|
}
|
|
90
155
|
|
|
@@ -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
|
|
|
@@ -27,20 +29,21 @@ export interface AutoBossParam extends Omit<
|
|
|
27
29
|
| "specifyRunCount"
|
|
28
30
|
| "strategyName"
|
|
29
31
|
| "teamName"
|
|
32
|
+
| "timeout"
|
|
30
33
|
| "useFragileResin"
|
|
31
34
|
| "useTransientResin"
|
|
32
35
|
> {
|
|
33
36
|
readonly [autoBossParamBrand]: true;
|
|
34
37
|
/**
|
|
35
|
-
* 需要讨伐的 Boss
|
|
38
|
+
* 需要讨伐的 Boss 名称;空字符串表示未指定,启动前须为受支持名单内名称
|
|
36
39
|
* @since 0.62.0
|
|
37
40
|
*/
|
|
38
|
-
bossName:
|
|
41
|
+
bossName: BossName;
|
|
39
42
|
/**
|
|
40
43
|
* 界面中选择的战斗策略名称;无自定义策略路径时会同步更新实际策略路径
|
|
41
44
|
* @since 0.62.0
|
|
42
45
|
*/
|
|
43
|
-
strategyName:
|
|
46
|
+
strategyName: CombatStrategyName;
|
|
44
47
|
/**
|
|
45
48
|
* 实际用于解析自动战斗脚本的路径,脚本可直接设置该路径以覆盖界面选择
|
|
46
49
|
* @since 0.62.0
|
|
@@ -86,6 +89,11 @@ export interface AutoBossParam extends Omit<
|
|
|
86
89
|
* @since 0.62.0
|
|
87
90
|
*/
|
|
88
91
|
rewardRecognitionEnabled: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* 战斗超时时长,单位秒,默认 240
|
|
94
|
+
* @since 0.63.0
|
|
95
|
+
*/
|
|
96
|
+
timeout: number;
|
|
89
97
|
/**
|
|
90
98
|
* 从当前全局自动首领讨伐配置填充默认参数
|
|
91
99
|
* @returns ClearScript 宿主空结果
|
|
@@ -106,7 +114,7 @@ export interface AutoBossParam extends Omit<
|
|
|
106
114
|
* @since 0.62.0
|
|
107
115
|
*/
|
|
108
116
|
setCombatStrategyPath(): VoidResult;
|
|
109
|
-
setCombatStrategyPath(strategyName:
|
|
117
|
+
setCombatStrategyPath(strategyName: CombatStrategyName | null): VoidResult;
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
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 {
|